]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
* pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
[gcc.git] / gcc / cp / ChangeLog
1 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
2
3 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4
5 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
6
7 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
8 cc happy.
9
10 * decl2.c (import_export_class): Also return if
11 CLASSTYPE_INTERFACE_ONLY is set.
12
13 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
14
15 * decl.c (push_overloaded_decl): Only overwrite the old binding if
16 there was one.
17 * decl2.c (do_local_using_decl): Fix loop termination.
18
19 1999-03-02 Mark Mitchell <mark@markmitchell.com>
20
21 * cp-tree.h (determine_specialization): Don't declare.
22 * pt.c (determine_specialization): Make it static. Eliminate
23 complain parameter. Note that decl is always non-NULL now, and
24 simplify accordingly.
25
26 * decl.c (maybe_push_to_top_level): Always call
27 push_cp_function_context.
28 (pop_from_top_level): Always call pop_cp_function_context.
29
30 1999-02-26 Nathan Sidwell <nathan@acm.org>
31
32 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
33 diagnostics.
34 cp-tree.h (complete_type_or_else): Added VALUE parameter.
35 * init.c (build_new_1): Extra arg to complete_type_or_else.
36 (build_delete): Likewise.
37 * typeck.c (require_complete_type): Likewise.
38 (pointer_int_sum): Likewise.
39 (pointer_diff): Likewise.
40 (build_component_ref): Likewise.
41
42 * typeck2.c (incomplete_type_error): Always use cp_error.
43 Show declaration of undefined type, if appropriate.
44 Deal with UNKNOWN_TYPE nodes.
45
46 * typeck.c (require_complete_type): Use TYPE_SIZE as
47 size_zero_node to mean incomplete type.
48 (require_complete_type_in_void): New function.
49 (build_compound_expr): Call complete_type_in_void for LHS.
50 (build_c_cast): Call complete_type_in_void for void cast.
51 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
52 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
53 require_complete_type_in_void. Call it.
54 * cp-tree.h (require_complete_type_in_void): Prototype new function.
55
56 * typeck.c (convert_arguments): Use alternative format for function
57 decls. Don't require_complete_type here. Simplify diagnostic printing.
58 (convert_for_initialization): Don't require_complete_type on RHS yet.
59 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
60
61 * call.c (build_over_call): Cope with qualified void return type.
62 * semantics.c (finish_call_expr): Likewise
63 * typeck.c (build_function_call_real): Likewise
64 (c_expand_return): Likewise
65 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
66
67 * call.c (print_z_candidates): Use alternate print format, to be
68 consistant with (pt.c) print_candidates.
69 method.c (hack_identifier): List candidate members.
70 search.c (lookup_field): Build ambiguous list, and show it, if
71 ambiguous.
72
73 1999-02-26 Mark Mitchell <mark@markmitchell.com>
74
75 * typeck.c (decay_conversion): Don't confuse constant array
76 variables with their intiailizers.
77
78 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
79 merging decls.
80 * pt.c (regenerate_decl_from_template): Tweak for clarity.
81 (instantiate_decl): Mark a decl instantiated before regenerating
82 it to avoid recursion.
83 * tree.c (mapcar): Don't call decl_constant_value unless we know
84 something is TREE_READONLY_DECL_P.
85
86 * class.c (check_for_override): Don't stop checking when we find
87 the first overridden function. Delete #if 0'd code.
88 * search.c (get_matching_virtual): Likewise.
89
90 1999-02-25 Richard Henderson <rth@cygnus.com>
91
92 * lang-specs.h: Define __FAST_MATH__ when appropriate.
93
94 1999-02-24 Mike Stump <mrs@wrs.com>
95
96 * typeck.c (convert_for_assignment): Allow boolean integral constant
97 expressions to convert to null pointer.
98
99 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
100
101 * decl.c (lookup_namespace_name): Resolve namespace aliases.
102
103 * class.c (push_nested_class): Allow namespaces.
104
105 * decl2.c (set_decl_namespace): Add friendp parameter.
106 * decl.c (grokfndecl): Pass it.
107 (grokvardecl): Likewise.
108 * cp-tree.h: Change declaration.
109
110 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
111
112 * pt.c (tsubst): Allow an array of explicit size zero.
113
114 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
115
116 * errfn.c: Change varargs code to look like toplev.c.
117
118 * method.c (process_modifiers): Don't prepend 'U' for char or
119 wchar_t.
120
121 1999-02-20 Craig Burley <craig@jcb-sc.com>
122
123 * Make-lang.in (cplib2.ready): Don't consider updating
124 cplib2 stuff if the current directory isn't writable, as
125 it won't work (such as during a `make install').
126
127 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
128
129 * decl2.c (start_objects): Make file scope constructors and
130 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
131 ASM_OUTPUT_DESTRUCTOR are defined.
132
133 1999-02-19 Mark Mitchell <mark@markmitchell.com>
134
135 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
136 (fn_type_unification): Adjust prototype.
137 (lookup_fnfields_1): Declare.
138 * call.c (add_template_candidate_real): Adjust call to
139 fn_type_unification.
140 * class.c (add_method): Don't allow duplicate declarations of
141 constructors or destructors.
142 (resolve_address_of_overloaded_function): Remove unused variable.
143 Adjust call to fn_type_unification.
144 * decl.c (grokfndecl): Be more robust in the face of illegal
145 specializations.
146 * decl2.c (check_classfn): Remove hokey handling of member
147 templates.
148 * pt.c (determine_specialization): Improve comments. Adjust to
149 handle template argument deduction as per the standard.
150 (check_explicit_specialization): Fix comment spacing. Handle
151 type-conversion operators correctly. Improve error-recovery.
152 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
153 (get_bindings_real): Simplify handling of static members.
154 * search.c (lookup_fnfields_1): Make it have external linkage.
155 * typeck.c (compparms): Fix comment.
156 (build_unary_op): Don't try to figure out which template
157 specialization is being referred to when when the address-of
158 operator is used with a template function.
159
160 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
161
162 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
163 keyword to match an analogous change at the top level.
164
165 * tree.c (lvalue_or_else): Likewise.
166
167 1999-02-17 Mark Mitchell <mark@markmitchell.com>
168
169 * decl.c (xref_basetypes): Comment.
170 * pt.c (instantiate_class_template): Use xref_basetypes.
171
172 1999-02-16 Mark Mitchell <mark@markmitchell.com>
173
174 * cp-tree.h (tsubst): Change prototype.
175 (tsubst_expr): Likewise.
176 (tsubst_copy): Likewise.
177 (type_unification): Remove prototype.
178 * call.c (convert_default_arg): Adjust call to tsubst_expr.
179 * class.c (resolve_address_of_overloaded_function): Just use
180 fn_type_unification.
181 * decl.c (grokdeclarator): Adjust call to tsubst.
182 * method.c (build_template_parm_names): Likewise.
183 * pt.c (GTB_VIA_VIRTUAL): New macro.
184 (GTB_IGNORE_TYPE): Likewise.
185 (resolve_overloaded_unification): Add `complain' parameter.
186 (try_one_overload): Likewise.
187 (tsubst_template_arg_vector): Likewise.
188 (tsubst_template_parms): Likewise.
189 (tsubst_aggr_type): Likewise.
190 (tsubst_arg_types): Likewise.
191 (tsubst_call_declarator_parms): Likewise.
192 (unify): Remove explicit_mask.
193 (type_unification_real): Likewise.
194 (get_template_base_recursive): Likewise.
195 (coerce_template_template_parms): Provide prototype.
196 (tsubst_function_type): Likewise.
197 (try_class_unification): New function.
198 All callers changed to use new complain parameter.
199 (get_template_base): Use try_class_unification.
200 (unify): Adjust handling of classes derived from template types.
201 (fn_type_unification): Substitute explicit arguments before
202 unification.
203
204 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
205
206 * decl.c (pushdecl): Remove dead code.
207
208 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
209
210 * decl2.c (finish_objects): Fix code I missed in previous change.
211
212 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
213
214 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
215 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
216
217 * pt.c (maybe_process_partial_specialization): Complain about
218 'template <>' on non-specialization.
219
220 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
221
222 * decl.c (grokdeclarator): Catch wierd declarators.
223 * decl2.c (finish_file): Don't abort because of namespace parsing
224 failure.
225 (check_decl_namespace): Remove.
226
227 1999-02-09 Mark Mitchell <mark@markmitchell.com>
228
229 * cp-tree.h (get_template_base): Don't declare.
230 (dfs_walk): Declare.
231 (dfs_unmark): Likewise.
232 (markedp): Likewise.
233 * pt.c (unify): Remove duplicate declaration. Pass tparms and
234 targs to get_template_base.
235 (get_template_base_recursive): Move here from search.c. Check to
236 see that the base found can be instantiated to form the desired
237 type.
238 (get_template_base): Likewise.
239 (get_class_bindings): Simplify.
240 * search.c (get_template_base_recursive): Move to pt.c.
241 (get_template_base): Likewise.
242 (markedp): Make it global.
243 (dfs_walk): Likewise.
244 (dfs_unmark): Likewise.
245
246 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
247
248 * pt.c (maybe_process_partial_specialization): Complain about
249 specialization in wrong namespace.
250 * tree.c (decl_namespace_context): New fn.
251
252 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
253
254 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
255 * pt.c (coerce_template_template_parms): Handle nested
256 template template parameters.
257
258 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
259
260 * typeck2.c: Update email addrsses.
261
262 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
263
264 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
265 turned off.
266
267 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
268
269 * lex.c (retrofit_lang_decl): Split out...
270 (build_lang_decl): From here.
271 * decl.c (pushdecl): Call it for functions generated by the middle
272 end that don't have DECL_LANG_SPECIFIC.
273 * cp-tree.h: Declare it.
274
275 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
276 (start_objects, finish_objects): Only use special
277 init_priority code if the user specified a priority.
278 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
279 objects.
280
281 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
282
283 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
284 mkstemp.o. Get them from libiberty now.
285 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
286
287 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
288
289 * decl2.c (lang_decode_option): Use read_integral_parameter.
290
291 1999-02-01 Mark Mitchell <mark@markmitchell.com>
292
293 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
294 before calling complete_type_or_else.
295
296 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
297
298 * input.c (inline): Don't define, its handled by system.h.
299
300 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
301
302 * decl2.c: Don't define flag_no_ident here. Don't process
303 -f(no-)ident here.
304 * cp-tree.h: Don't declare flag_no_ident here.
305 * lang-specs.h: Map -Qn to -fno-ident.
306
307 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
308
309 * cp-tree.h (struct tree_binding): Replace scope field with a union.
310 (BINDING_SCOPE): Adjust.
311 * decl.c (BINDING_LEVEL): Adjust.
312
313 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
314
315 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
316 member constants.
317
318 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
319 a ctor initializer.
320
321 * tree.c (equal_functions): Fix name in prototype.
322
323 * decl.c (push_local_binding): Add FLAGS argument.
324 (pushdecl, push_overloaded_decl): Pass it.
325 * decl2.c (do_local_using_decl): Likewise.
326 * cp-tree.h: Adjust prototype.
327 * decl.c (poplevel): Fix logic.
328
329 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
330 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
331 (cat_namespace_levels): Don't loop forever.
332
333 1999-01-25 Richard Henderson <rth@cygnus.com>
334
335 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
336
337 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
338
339 * class.c (resolve_address_of_overloaded_function): Mark the
340 chosen function used.
341
342 * call.c (build_call): Make sure that a function coming in has
343 been marked used already.
344 * decl.c (expand_static_init): Call mark_used instead of
345 assemble_external.
346 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
347 alloc_eh_object, expand_throw): Likewise.
348 * init.c (build_builtin_delete_call): Likewise.
349 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
350 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
351 expand_generic_desc): Likewise.
352
353 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
354
355 * tree.c (equal_functions): New function.
356 (ovl_member): Call it.
357
358 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
359
360 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
361
362 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
363
364 * decl.c (decls_match): Return 1 if old and new are identical.
365 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
366
367 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
368
369 * decl.c (start_function): Make member functions one_only on windows.
370 * decl2.c (import_export_decl): Likewise.
371
372 * decl.c (grokdeclarator): Don't complain about implicit int in
373 a system header. Change same-name field check to not complain in
374 a system header instead of within extern "C".
375
376 1999-01-21 Mark Mitchell <mark@markmitchell.com>
377
378 * cp-tree.h (PUSH_GLOBAL): New macro.
379 (PUSH_LOCAL): Likewise.
380 (PUSH_USING): Likewise.
381 (namespace_bindings_p): Declare.
382 (push_overloaded_decl): Likewise.
383 * decl.c (push_overloaded_decl): Don't make it static. Check for
384 illegal declarations after using declarations here.
385 (namespace_bindings_p): Likewise.
386 (duplicate_decls): Don't consider declarations from different
387 namespaces to be the same.
388 (pushdecl): Use symbolic PUSH_ constants in calls to
389 push_overloaded_decl.
390 (push_overloaded_decl_1): Likewise.
391 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
392 (do_nonmember_using_decl): Check for illegal using declarations
393 after ordinary declarations here.
394 (do_local_using_decl): Call pushdecl to insert declarations.
395
396 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
397
398 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
399
400 1999-01-21 Mark Mitchell <mark@markmitchell.com>
401
402 * tree.c (build_cplus_array_type_1): Don't call build_array_type
403 for types involving template parameters.
404
405 * cp-tree.h (PARM_DECL_EXPR): Delete.
406 (convert_default_arg): Change prototype.
407 (check_default_argument): Declare.
408 (search_tree): Likewise.
409 * call.c (convert_default_arg): Take the function to which the
410 default argument belongs as a parameter, and do any necessary
411 instantiation here, instead of ...
412 (build_over_call): Here.
413 * decl.c (local_variable_p): New function.
414 (check_default_argument): Likewise, split out and tidied from ...
415 (grokparms): Here.
416 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
417 * pt.c (tsubst_call_declarator_parms): New function.
418 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
419 with CALL_EXPRs, rather than trying to be clever.
420 (tsubst): Use tsubst_call_declarator_parms.
421 * tree.c (search_tree): Don't make it static.
422 * typeck.c (convert_arguments): Use new interface to
423 convert_default_arg.
424
425 1999-01-20 Mark Mitchell <mark@markmitchell.com>
426
427 * error.c (dump_function_decl): Don't print the argument types for
428 a function when the verbosity level is negative.
429
430 * call.c (build_over_call): Check format attributes at call-time.
431
432 * pt.c (tsubst_copy): Fix comment.
433 (unify): Don't allow unification with variable-sized arrays.
434
435 * semantics.c (finish_stmt_expr): When processing a template make
436 the BIND_EXPR long-lived.
437
438 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
439
440 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
441 (import_export_vtable): Not here.
442
443 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
444
445 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
446 non-static member function.
447
448 1999-01-18 Nathan Sidwell <nathan@acm.org>
449
450 * class.c (instantiate_type): Only diagnose illegal address of member
451 function if complaining.
452
453 * decl.c (lookup_name_real): Remove duplicate code.
454
455 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
456
457 * tree.c (copy_template_template_parm): Use permanent_obstack.
458
459 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
460
461 * pt.c (unify): Remove restrictions on deduction of argument
462 of template template parameters.
463
464 1999-01-18 Nathan Sidwell <nathan@acm.org>
465
466 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
467
468 * class.c (resolve_address_of_overloaded_function): Show list of
469 all candidates, when none of them match.
470
471 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
472
473 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
474 definition of 'casting away const' in reinterpret_cast<>.
475
476 1999-01-18 Graham <grahams@rcp.co.uk>
477
478 * cvt.c: Add include for decl.h, remove extern for
479 static_aggregates which is now provided by decl.h.
480
481 * Makefile.in (cvt.o): Add dependency for decl.h and missing
482 dependencies for convert.h and flags.h.
483
484 1999-01-18 Nathan Sidwell <nathan@acm.org>
485
486 * decl2.c (do_dtors): Set current location to that of the
487 decl, for sensible diagnostics and debugging.
488 (check_classfn): Issue `incomplete type' error, if
489 class is not defined.
490
491 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
492
493 * cp-tree.h: Add prototype for bound_pmf_p.
494
495 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
496 Manfred Hollstein <manfred@s-direktnet.de>
497
498 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
499 -Wreturn-type.
500
501 1999-01-16 Nathan Sidwell <nathan@acm.org>
502
503 * cp-tree.h (struct lang_type): Added has_mutable flag.
504 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
505 (TYPE_HAS_MUTABLE_P): New macro to read it.
506 (cp_has_mutable_p): Prototype for new function.
507 * class.c (finish_struct_1): Set has_mutable from members.
508 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
509 it contains a mutable.
510 * typeck.c (cp_has_mutable_p): New function.
511
512 1999-01-15 Mark Mitchell <mark@markmitchell.com>
513
514 * pt.c (process_template_parm): Ignore top-level qualifiers on
515 non-type parameters.
516
517 * decl.c (start_function): Use current_function_parms in the call
518 to require_complete_type_for_parms, not the probably empty
519 DECL_ARGUMENTS.
520
521 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
522
523 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
524
525 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
526 that we don't suppress the other copies.
527 * lex.c (handle_cp_pragma): Likewise.
528
529 1999-01-13 Mark Mitchell <mark@markmitchell.com>
530
531 * decl.c (grokdeclarator): Undo 1998-12-14 change.
532 * tree.c (build_cplus_array_type_1): Likewise.
533 * pt.c (instantiate_class_template): Remove misleading comment.
534 (tsubst_aggr_type): Substitute if there are template parameters,
535 regardless of whether or not they use template arguments.
536 (unify): Likewise, but for unification.
537
538 1999-01-12 Richard Henderson <rth@cygnus.com>
539
540 * cp-tree.h (flag_permissive): Declare extern.
541
542 1999-01-06 Mark Mitchell <mark@markmitchell.com>
543
544 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
545 here.
546 (lang_type): Add is_partial_instantiation. Decrease width of
547 dummy.
548 (PARTIAL_INSTANTIATION_P): New macro.
549 (OPERATOR_TYPENAME_P): Remove.
550 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
551 OPERATOR_TYPENAME_P.
552 (grok_op_properties): Likewise.
553 * friend.c (do_friend): Handle friends that are member functions
554 correctly.
555 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
556 * pt.c (instantiate_class_template): Rework for clarity. Avoid
557 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
558 any more partial instantiation than is absolutely necessary for
559 implicit typename. Set PARTIAL_INSTANTIATION_P.
560 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
561 * semantics.c (begin_class_definition): Handle partial
562 specializations of a type that was previously partially
563 instantiated.
564
565 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
566
567 * g++spec.c (LIBSTDCXX): Provide default definition.
568 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
569
570 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
571
572 * Make-lang.in (g++.o): Depend on prefix.h.
573
574 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
575
576 * tree.c (bound_pmf_p): New fn.
577 * typeck.c (build_c_cast): Use it.
578
579 * decl.c (grok_op_properties): Use same_type_p.
580
581 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
582
583 * Makefile.in (cvt.o): Depend on toplev.h.
584
585 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
586
587 * cvt.c: Include toplev.h.
588
589 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
590 definitions.
591
592 * init.c (expand_vec_init): Initialize variable `itype'.
593
594 * lex.c (yyerror): Cast the argument passed to a ctype function to
595 an unsigned char.
596
597 * method.c (build_mangled_C9x_name): Wrap prototype and definition
598 in "HOST_BITS_PER_WIDE_INT >= 64".
599
600 * typeck.c (build_binary_op): Mark parameter `convert_p' with
601 ATTRIBUTE_UNUSED.
602
603 1998-12-22 Mark Mitchell <mark@markmitchell.com>
604
605 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
606 * tree.c (build_exception_variant): Don't crash on empty throw
607 specs.
608
609 1998-12-18 DJ Delorie <dj@cygnus.com>
610
611 * cvt.c (convert_to_reference): Check for both error_mark_node
612 and NULL_NODE after call to convert_for_initialization.
613
614 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
615
616 * error.c (interesting_scope_p): New fn.
617 (dump_simple_decl): Use it.
618 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
619 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
620
621 1998-12-16 Mark Mitchell <mark@markmitchell.com>
622
623 * class.c (resolve_address_of_overloaded_function): Do conversion
624 to correct type here, rather than ...
625 (instantiate_type): Here.
626
627 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
628 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
629 (decl_template_parm_p): Remove.
630 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
631 paramter.
632 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
633 * pt.c (push_inline_template_parms_recursive): Set it.
634 (decl_template_parm_p): Remove.
635 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
636 (process_template_parm): Set it.
637
638 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
639
640 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
641 if configured with cpplib.
642
643 1998-12-15 Mark Mitchell <mark@markmitchell.com>
644
645 * decl.c (poplevel): Make sure ns_binding is initialized.
646
647 * decl.c (finish_function): Undo inadvertant change in previous
648 patch.
649
650 1998-12-14 Mark Mitchell <mark@markmitchell.com>
651
652 * class.c (pushclass): Tweak handling of class-level bindings.
653 (resolve_address_of_overloaded_function): Update pointer-to-member
654 handling.
655 (instantiate_type): Likewise.
656 * cvt.c (cp_convert_to_pointer): Likewise.
657 * decl.c (pop_binding): Take the DECL to pop, not just the name.
658 Deal with `struct stat' hack.
659 (binding_level): Add to documentation.
660 (push_binding): Clear BINDING_TYPE.
661 (add_binding): New function.
662 (push_local_binding): Use it.
663 (push_class_binding): Likewise.
664 (poplevel): Adjust calls to pop_binding.
665 (poplevel_class): Likewise.
666 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
667 declarations to current binding level.
668 (push_class_level_binding): Likewise.
669 (push_overloaded_decl): Adjust handling of OVERLOADs in local
670 bindings.
671 (lookup_namespace_name): Don't crash when confronted with a
672 TEMPLATE_DECL.
673 (lookup_name_real): Do `struct stat' hack in local binding
674 contexts.
675 (build_ptrmemfunc_type): Adjust documentation.
676 (grokdeclarator): Don't avoid building real array types when
677 processing templates unless really necessary.
678 (finish_method): Adjust calls to pop_binding.
679 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
680 not reparse_decl_as_expr.
681 (build_expr_from_tree): Deal with a template-id as the function to
682 call in a METHOD_CALL_EXPR.
683 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
684 (maybe_adjust_types_For_deduction): Don't do peculiar things with
685 METHOD_TYPEs here.
686 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
687 pointer-to-member types where necessary.
688 * tree.c (build_cplus_array_type_1): Don't avoid building real
689 array types when processing templates unless really necessary.
690 (build_exception_variant): Compare the exception lists correctly.
691
692 1998-12-13 Mark Mitchell <mark@markmitchell.com>
693
694 * cp-tree.def (CPLUS_BINDING): Update documentation.
695 * cp-tree.h (LOCAL_BINDING_P): New macro.
696 (lang_identifier): Rename local_value to bindings.
697 (tree_binding): Make `scope' of type `void*', not `tree'.
698 (BINDING_SCOPE): Update documentation.
699 (IDENTIFIER_LOCAL_VALUE): Remove.
700 (IDENTIFIER_CLASS_VALUE): Document.
701 (IDENTIFIER_BINDING): New macro.
702 (IDENTIFIER_VALUE): Likewise.
703 (TIME_IDENTIFIER_TIME): Likewise.
704 (TIME_IDENTIFIER_FILEINFO): Likewise.
705 (IMPLICIT_TYPENAME_P): Likewise.
706 (set_identifier_local_value): Remove.
707 (push_local_binding): New function.
708 (push_class_binding): Likewise.
709 * class.c (pushclass): Update comments; use push_class_binding.
710 * decl.c (set_identifier_local_value_with_scope): Remove.
711 (set_identifier_local_value): Likewise.
712 (push_binding): New function.
713 (pop_binding): Likewise.
714 (binding_level): Update documentation. Remove shadowed.
715 (BINDING_LEVEL): New macro.
716 (free_binding_nodes): New variable.
717 (poplevel): Adjust for new name-lookup scheme. Don't mess up
718 BLOCK_VARs when doing for-scope extension. Remove effectively
719 dead code.
720 (pushlevel_class): Tweak formatting.
721 (poplevel_class): Adjust for new name-lookup scheme.
722 (print_binding_level): Likewise.
723 (store_bindings): Likewise.
724 (pushdecl): Likewise.
725 (pushdecl_class_level): Likewise.
726 (push_class_level_binding): Likewise.
727 (push_overloaded_decl): Update comments. Adjust for new
728 name-lookup scheme.
729 (lookup_name_real): Likewise.
730 (lookup_name_current_level): Likewise.
731 (cp_finish_decl): Likewise.
732 (require_complete_types_for_parms): Likewise. Remove misleading
733 #if 0'd code.
734 (grok_parms): Likewise. Don't call
735 require_complete_types_for_parms here.
736 (grok_ctor_properties): Don't treat templates as copy
737 constructors.
738 (grop_op_properties): Or as assignment operators.
739 (start_function): Document. Adjust for new name-lookup scheme.
740 (finish_function): Likewise.
741 * decl2.c (do_local_using_decl): Use push_local_binding.
742 * lex.c (begin_definition_of_inclass_inline): New function, split
743 out from ...
744 (do_pending_inlines): Here, and ...
745 (process_next_inline): Here.
746 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
747 (init_filename_times): Likewise.
748 (extract_interface_info): Likewise.
749 (ste_typedecl_interface_info): Likewise.
750 (check_newline): Likewise.
751 (dump_time_statistics): Likewise.
752 (handle_cp_pragma): Likewise.
753 (do_identifier): Adjust for new name-lookup scheme.
754 * parse.y (function_try_block): Return ctor_initializer_opt value.
755 (fndef): Use it.
756 (fn.defpen): Pass appropriate values to start_function.
757 (pending_inline): Use functor_try_block value, and pass
758 appropriate values to finish_function.
759 * pt.c (is_member_template): Update documentation; remove handling
760 of FUNCTION_DECLs. As per name, this function should deal only in
761 TEMPLATE_DECLs.
762 (decl_template_parm_p): Change name of olddecl parameter to decl.
763 (check_template_shadow): Adjust for new name-lookup scheme.
764 (lookup_template_class): Likewise.
765 (tsubst_decl): Tweak so as not to confuse member templates with
766 copy constructors and assignment operators.
767 (unify): Handle UNION_TYPEs.
768 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
769 (lang_print_xnode): Adjust for new name-lookup scheme.
770 * typeck.c (mark_addressable): Likewise.
771 (c_expand_return): Likewise.
772
773 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
774
775 * decl.c (grokdeclarator): Allow field with same name as class
776 in extern "C".
777
778 * decl.c (lookup_name_real): Don't limit field lookup to types.
779 * class.c (check_member_decl_is_same_in_complete_scope): No error
780 if icv and x are the same.
781 * lex.c (do_identifier): Tweak error message.
782
783 1998-12-10 Mark Mitchell <mark@markmitchell.com>
784
785 * decl.c (start_enum): Use push_obstacks, not
786 end_temporary_allocation.
787 (finish_enum): Call pop_obstacks.
788
789 1998-12-10 Mark Mitchell <mark@markmitchell.com>
790
791 * class.c (instantiate_type): Return error_mark_node rather than
792 junk.
793
794 1998-12-09 Mark Mitchell <mark@markmitchell.com>
795
796 * cp-tree.h (most_specialized_instantiation): New function.
797 (print_candidates): Likewise.
798 * class.c (validate_lhs): Remove.
799 (resolve_address_of_overloaded_function): New function, split out
800 and then substantially reworked, from ...
801 (instantiate_type): Use it. Simplify.
802 * cvt.c (convert_to_reference): Complain when caller has indicated
803 that's the right thing to do. Don't crash if instantiate_type
804 fails.
805 * pt.c: Substitute `parameters' for `paramters' throughout.
806 (print_candidates): Don't make it static.
807 (most_specialized_instantiation): Split out from ...
808 (most_specialized): Here.
809
810 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
811
812 * lex.c (lang_init_options): Initialize cpplib.
813 * decl2.c (parse_options,cpp_initialized): Removed.
814 (lang_decode_option): Move initialization of cpplib to
815 lang_init_options.
816
817 1998-12-09 Mark Mitchell <mark@markmitchell.com>
818
819 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
820 well as the TYPE_DECL, when a typedef name is assigned to a
821 previously anonymous type.
822
823 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
824
825 * cp/except.c (call_eh_info): use __start_cp_handler instead of
826 __cp_eh_info for getting the eh info pointer. Add table_index to
827 field list.
828 (push_eh_cleanup): Don't increment 'handlers' data field.
829 (process_start_catch_block): Don't set the 'caught' field.
830
831 * cp/exception.cc (CP_EH_INFO): New macro for getting the
832 exception info pointer within library routines.
833 (__cp_eh_info): Use CP_EH_INFO.
834 (__start_cp_handler): Get exception info pointer, set caught field,
835 and increment the handlers field. Avoids this being done by handlers.
836 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
837 (uncaught_exception): Use CP_EH_INFO macro.
838
839 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
840
841 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
842
843 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
844
845 * lex.c (check_newline): Add support for \ as `natural'
846 characters in file names in #line to be consistent with #include
847 handling. We support escape prcessing in the # 1 "..." version of
848 the command. See also support in cp/lex.c.
849
850 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
851
852 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
853 structure.
854
855 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
856
857 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
858
859 * error.c (dump_simple_decl): Also print namespace context.
860 (dump_function_decl): Likewise.
861
862 * decl2.c (ambiguous_decl): Don't print old value if it's
863 error_mark_node.
864
865 * decl.c (lookup_name_real): Fix handling of local types shadowed
866 by a non-type decl. Remove obsolete code.
867 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
868
869 * lang-options.h: Add -fpermissive.
870 * decl2.c: Likewise.
871 * cp-tree.h: Add flag_permissive.
872 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
873 were specified, set flag_pedantic_errors.
874 * call.c (build_over_call): Turn dropped qualifier messages
875 back into pedwarns.
876 * cvt.c (convert_to_reference): Likewise.
877 * typeck.c (convert_for_assignment): Likewise.
878
879 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
880
881 * decl2.c (coerce_new_type): Use same_type_p.
882 (coerce_delete_type): Likewise.
883
884 * call.c (check_dtor_name): Return 1, not error_mark_node.
885
886 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
887
888 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
889 if MULTIPLE_SYMBOL_SPACES.
890
891 * pt.c (check_template_shadow): New fn.
892 * decl2.c (grokfield): Use it.
893 * decl.c (pushdecl): Likewise.
894 (pushdecl_class_level): Likewise.
895 (start_method): Likewise.
896 (xref_tag): Don't try to use 't' if we're defining.
897
898 * call.c (check_dtor_name): Just return an error_mark_node.
899 * pt.c (lookup_template_class): Complain about using non-template here.
900 * parse.y (apparent_template_type): Not here.
901
902 * pt.c (check_explicit_specialization): Complain about specialization
903 with C linkage.
904
905 * lang-options.h: Add -f{no-,}implicit-inline-templates.
906
907 * pt.c (convert_nontype_argument): Don't assume that any integer
908 argument is intended to be a constant-expression.
909
910 1998-12-03 Mark Mitchell <mark@markmitchell.com>
911
912 * class.c (handle_using_decl): Fix comment. Don't lookup
913 constructors in base classes.
914 (validate_lhs): Fix typo in comment.
915 * search.c (lookup_field_1): Don't return a USING_DECL.
916
917 * cp-tree.h (DECL_ACCESS): Improve documentation.
918
919 * decl.c (expand_static_init): Don't set the initialization-done
920 flag until the initialization is done.
921
922 1998-12-02 Mark Mitchell <mark@markmitchell.com>
923
924 * decl2.c (validate_nonmember_using_decl): Complain about using
925 declarations for class members.
926
927 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
928
929 * typeck2.c (process_init_constructor): Use same_type_p.
930
931 * decl.c (check_tag_decl): Don't warn about null decl inside a
932 class.
933
934 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
935 UNIFY_ALLOW_NONE.
936 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
937 (resolve_overloaded_unification): Strip baselinks.
938
939 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
940
941 * g++spec.c: Don't prototype xmalloc.
942
943 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
944
945 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
946
947 * decl.c (check_tag_decl): Do complain about null friend decl at
948 file scope.
949
950 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
951
952 * lex.c (make_lang_type): Clear the whole struct lang_type, not
953 only the first multiple of sizeof (int).
954
955 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
956
957 * decl.c (start_decl): An explicit specialization of a static data
958 member is only a definition if it has an initializer.
959
960 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
961 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
962 cp_finish_decl.
963 * init.c (expand_default_init): Check for DIRECT_BIND instead of
964 DECL_ARTIFICIAL.
965
966 * call.c (build_over_call): Use build_decl.
967
968 * except.c (expand_throw): Just use convert, not
969 build_reinterpret_cast.
970
971 * lex.c (handle_generic_pragma): Use token_buffer.
972
973 * decl.c (check_tag_decl): Don't complain about null friend decl.
974
975 1998-11-24 Dave Pitts <dpitts@cozx.com>
976
977 * Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the
978 first position.
979 * lex.c (check_newline): Use ISALPHA.
980 (readescape): Use ISGRAPH.
981 (yyerror): Use ISGRAPH.
982
983 1998-11-24 Nathan Sidwell <nathan@acm.org>
984
985 * search.c (get_abstract_virtuals): Do not use initial
986 CLASSTYPE_ABSTRACT_VIRTUALS.
987 * typeck2.c (abstract_virtuals_error): Show location of abstract
988 declaration.
989 * call.c (build_new_method_call): Use
990 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
991 * class.c (finish_struct_bits): Don't bother working out whether
992 get_abstract_virtuals will do anything, just do it.
993
994 1998-11-24 Graham <grahams@rcp.co.uk>
995
996 * typeck.c (build_component_ref): Remove unused statement.
997
998 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
999
1000 * class.c (add_method): Catch invalid overloads.
1001
1002 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
1003 * search.c (lookup_conversions): Handle getting real OVERLOADs.
1004 (add_conversions): Likewise. Revert last change.
1005 * call.c (add_conv_candidate): Pass totype to add_candidate instead
1006 of fn. Don't add a new candidate if the last one was for the same
1007 type.
1008 (print_z_candidates): Handle getting a type as a function.
1009 (joust): If we got two conversion candidates to the same type,
1010 just pick one.
1011 (build_object_call): Lose 'templates'.
1012 (build_user_type_conversion_1): Handle getting real OVERLOADs.
1013
1014 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1015
1016 * typeck2.c (process_init_constructor): If there are elements
1017 that don't have initializers and they need to have constructors
1018 run, supply them with initializers.
1019
1020 * class.c (finish_struct_1): A class with a 0-width bitfield is
1021 still empty.
1022
1023 1998-11-23 Mark Mitchell <mark@markmitchell.com>
1024
1025 * pt.c (instantiate_class_template): Don't try to figure out what
1026 specialization to use for a partial instantiation. Correct
1027 typos in a couple of comments. Avoid calling uses_template_parms
1028 multiple times.
1029
1030 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
1031
1032 * method.c (process_overload_item): Add call to
1033 build_mangled_C9x_name for intTI_type_nodes.
1034 (build_mangled_C9x_name): Add prototype, define.
1035 * decl.c (init_decl_processing): Add names for
1036 TImode_type_node.
1037
1038 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1039
1040 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
1041
1042 * class.c (finish_struct_1): Set things up for 0-width bitfields
1043 like we do for others.
1044
1045 * decl.c (check_tag_decl): New fn.
1046 (shadow_tag): Split out from here.
1047 * decl2.c (grok_x_components): Call it.
1048
1049 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
1050
1051 * decl.c: Lose warn_about_return_type.
1052 (grokdeclarator): Always complain about implicit int, except for
1053 `main () { ... }'.
1054
1055 * decl.c (tag_name): New fn.
1056 (xref_tag): Complain about using typedef-name after class-key.
1057
1058 * init.c (expand_vec_init): Also keep going if from_array.
1059
1060 * tree.c (is_overloaded_fn): Also handle the output of
1061 build_offset_ref.
1062
1063 * decl.c (grokdeclarator): Use constructor_name when comparing
1064 field name against enclosing class.
1065 * class.c (finish_struct_anon): Likewise.
1066
1067 1998-11-22 Mark Mitchell <mark@markmitchell.com>
1068
1069 * decl.c (poplevel): Remove code to handle KEEP == 2.
1070 (finish_function): Don't confuse BLOCK-order when
1071 processing a destructor.
1072
1073 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1074
1075 * decl.c (require_complete_types_for_parms): Call layout_decl
1076 after we've completed the type.
1077
1078 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
1079
1080 * decl2.c (validate_nonmember_using_decl): Allow using templates
1081 from the global namespace.
1082
1083 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1084
1085 Handle specifying template args to member function templates.
1086 * tree.c (build_overload): Always create an OVERLOAD for a template.
1087 * search.c (add_conversions): Handle finding an OVERLOAD.
1088 * decl2.c (check_classfn): Likewise.
1089 * lex.c (identifier_type): See through a baselink.
1090 * parse.y (do_id): Don't call do_identifier if we got a baselink.
1091 * class.c (instantiate_type, case TREE_LIST): Recurse.
1092
1093 * decl.c (grokdeclarator): Allow a boolean constant for array
1094 bounds, odd as that sounds.
1095
1096 * pt.c (unify): Be more strict about non-type parms, except for
1097 array bounds.
1098 (UNIFY_ALLOW_INTEGER): New macro.
1099
1100 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
1101
1102 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
1103
1104 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
1105
1106 * semantics.c (begin_class_definition): Call
1107 maybe_process_partial_specialization before push_template_decl.
1108 Don't call push_template_decl for a specialization.
1109 * search.c (lookup_field): Do return a member template class.
1110 * decl2.c (handle_class_head): Handle member template classes.
1111
1112 * decl.c (grokdeclarator): A parm type need not be complete.
1113
1114 * pt.c (convert_nontype_argument): Fix thinko.
1115
1116 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1117
1118 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
1119 (global_delete_fndecl): New variable.
1120 * decl.c (global_delete_fndecl): Define it.
1121 (init_decl_processing): Set it.
1122 * init.c (build_builtin_delete_call): Use it.
1123 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
1124 nodes.
1125
1126 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1127
1128 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
1129 type.
1130
1131 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
1132 * call.c (build_object_call): Also support references to functions.
1133 * typeck.c (convert_for_initialization): Don't decay a function
1134 if the target is a reference to function.
1135
1136 * search.c (add_conversions): Get all the overloads from a class.
1137
1138 * decl.c (grok_ctor_properties): Complain about any constructor
1139 that will take a single arg of the class type by value.
1140
1141 * typeck2.c (build_functional_cast): Can't create objects of
1142 abstract classes this way.
1143 * cvt.c (ocp_convert): Likewise.
1144
1145 * decl.c (grokfndecl): Member functions of local classes are not
1146 public.
1147
1148 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1149
1150 * Make-lang.in (cc1plus): Add dependency on hash.o.
1151
1152 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1153
1154 * search.c (get_abstract_virtuals): Complain about virtuals with
1155 no final overrider.
1156 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
1157 with no final overrider.
1158 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
1159 on virtuals with no final overrider.
1160
1161 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
1162
1163 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
1164 after layout_type.
1165
1166 * friend.c (do_friend): Don't set_mangled_name_for_decl.
1167
1168 * class.c (finish_struct_anon): Complain about non-fields.
1169 * decl2.c (build_anon_union_vars): Likewise.
1170
1171 * decl.c (grokdeclarator): Normal data members can't have the same
1172 name as the class, either.
1173 * class.c (finish_struct_anon): Neither can members of an
1174 anonymous union.
1175
1176 1998-11-17 Mark Mitchell <mark@markmitchell.com>
1177
1178 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
1179 (TYPE_BINFO): Likewise.
1180 (IS_AGGR_TYPE): Tweak.
1181 (SET_IS_AGGR_TYPE): New macro.
1182 (CLASS_TYPE_P): Tweak.
1183 (lang_type): Group mark bitfields together. Remove linenum.
1184 (CLASSTYPE_SOURCE_LINE): Remove macro.
1185 (CLASSTYPE_MARKED_N): New macro.
1186 (SET_CLASSTYPE_MARKED_N): Likewise.
1187 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
1188 (CLASS_TYPE_MARKED_*): Use them.
1189 (SET_CLASSTYPE_MARKED_*): Likewise.
1190 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
1191 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1192 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
1193 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
1194 * class.c (class_cache_obstack): New variable.
1195 (class_cache_firstobj): Likewise.
1196 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
1197 (pushclass): Free the cache, when appropriate.
1198 (popclass): Tidy.
1199 (maybe_push_cache_obstack): Use class_cache_obstack.
1200 * decl.c (include hash.h).
1201 (typename_hash): New function.
1202 (typename_compare): Likewise.
1203 (build_typename_type): Check the hash table to avoid creating
1204 duplicates.
1205 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
1206 (grokdeclarator): Use CLASS_TYPE_P.
1207 (xref_basetypes): Likewise.
1208 (start_function): Likewise. Don't put current_class_ref on the
1209 permanent obstack.
1210 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
1211 and TYPE_TI_ARGS.
1212 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
1213 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
1214 fields for types other than class types. Do clear TYPE_ALIAS_SET
1215 for types other than class types, though.
1216 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
1217 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1218 * pt.c (process_template_parm): Don't set
1219 CLASSTYPE_GOT_SEMICOLON.
1220 (lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1221 Coerce arguments on the momentary obstack.
1222 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1223 (instantiate_class_template): Calculate template arguments on the
1224 momentary obstack. Tidy.
1225 (tsubst_template_arg_vector): Use make_temp_vec.
1226 (tsubst_aggr_type): Put template arguments on the momentary
1227 obstack.
1228 (tsubst_decl): Likewise.
1229 (tsubst): Copy the array bounds index to the permanent obstack
1230 before building index types. Use new macros.
1231 (unify): Use new macros.
1232 (do_type_instantiation): Likewise.
1233 * search.c (lookup_fnfields_1): Use new macros.
1234 (dfs_pushdecls): Build envelopes on the cache obstack.
1235 (dfs_compress_decls): Use new macros.
1236 (push_class_decls): Build on the cache obstack.
1237 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
1238 * sign.c (build_signature_pointer_or_reference_type): Use
1239 SET_IS_AGGR_TYPE.
1240 * tree.c (make_binfo): Check CLASS_TYPE_P.
1241 (copy_template_template_parm): Adjust.
1242 (make_temp_vec): Use push_expresion_obstack.
1243 * typeck.c (complete_type): Use new macros.
1244 (comptypes): Likewise.
1245
1246 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
1247
1248 * pt.c (tsubst): Add diagnostics for invalid array, reference
1249 and pointer to member types.
1250
1251 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
1252
1253 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
1254
1255 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
1256 Simplify.
1257
1258 * parse.y (structsp): Fix cut-and-paste error.
1259
1260 * init.c (build_new): Complain about non-integral size.
1261
1262 * parse.y (unary_expr): Complain about defining types in sizeof.
1263
1264 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
1265
1266 * rtti.c (build_x_typeid): Complain about typeid without
1267 including <typeinfo>.
1268 (get_typeid): Likewise. Complain about typeid of incomplete type.
1269 (get_tinfo_fn_dynamic): Likewise.
1270 (get_typeid_1): Not static anymore.
1271 * except.c (build_eh_type_type): Use get_typeid_1.
1272
1273 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
1274 ambiguous or private bases. Fix warning for reference cast.
1275
1276 1998-11-16 Mark Mitchell <mark@markmitchell.com>
1277
1278 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
1279 * decl.c (duplicate_decls): Remove special-case code to deal with
1280 template friends, and just do the obvious thing.
1281 * pt.c (register_specialization): Tweak for clarity, and also to
1282 clear DECL_INITIAL for an instantiation before it is merged with a
1283 specialization.
1284 (check_explicit_specialization): Fix indentation.
1285 (tsubst_friend_function): Handle both definitions in friend
1286 declaration and outside friend declarations.
1287 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
1288 (regenerate_decl_from_template): Tweak accordingly.
1289 (instantiate_decl): Likewise.
1290
1291 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
1292
1293 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
1294 member function reference to error.
1295 * cvt.c (ocp_convert): Complain about converting an overloaded
1296 function to void.
1297
1298 * init.c (build_offset_ref): Just return a lone static member
1299 function.
1300
1301 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
1302 not internal ones.
1303
1304 * typeck.c (build_binary_op_nodefault): Improve error handling.
1305
1306 * decl.c (grokfndecl): Complain about making 'main' a template.
1307
1308 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
1309
1310 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
1311 TYPE_DECL in a template.
1312
1313 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
1314
1315 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
1316
1317 * decl.c (struct cp_function): Add named_label_uses.
1318 (push_cp_function_context): Save it.
1319 (pop_cp_function_context): Restore it.
1320 (define_label): Also complain about jumping into the scope of
1321 non-POD objects that don't have constructors.
1322 * tree.c (pod_type_p): New fn.
1323
1324 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
1325 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
1326 (get_tinfo_fn): Not here.
1327 * repo.c (repo_get_id): Abort if we get called for an incomplete
1328 type.
1329
1330 1998-11-13 Mark Mitchell <mark@markmitchell.com>
1331
1332 * except.c (expand_throw): Make sure first argument to
1333 __cp_push_exception is of type `void*' to avoid spurious error
1334 messages.
1335
1336 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
1337
1338 * pt.c (try_one_overload): Take orig_targs again. Only check for
1339 mismatches against them; we don't care what a previous call found.
1340 (resolve_overloaded_unification): Adjust.
1341
1342 * search.c (lookup_field): Don't return anything for a non-type
1343 field from a dependent type.
1344 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
1345 in an array declarator.
1346 (start_decl): Push into the class before looking for the field.
1347
1348 1998-11-08 Mark Mitchell <mark@markmitchell.com>
1349
1350 * method.c (build_overload_value): Handle REFERENCE_TYPE.
1351
1352 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
1353
1354 * decl.c (grokdeclarator): Allow namespace-scoped members if they
1355 are friends.
1356
1357 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
1358
1359 * pt.c (tsubst_decl): Don't mess with the global value of an
1360 un-mangled DECL_ASSEMBLER_NAME.
1361
1362 1998-11-03 Christopher Faylor <cgf@cygnus.com>
1363
1364 * decl.c (init_decl_processing): Remove CYGWIN conditional
1365 since CYGWIN is now able to deal with trapping signals.
1366
1367 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1368
1369 * cp-tree.h: Don't include gansidecl.h.
1370 * exception.cc: Include gansidecl.h (since we don't include config.h)
1371 * g++spec.c: Don't include gansidecl.h.
1372
1373 1998-11-06 Mark Mitchell <mark@markmitchell.com>
1374
1375 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
1376 size of dummy.
1377 (DECL_DEFINED_IN_CLASS_P): New macro.
1378 (TEMPLATE_PARMS_FOR_INLINE): Document.
1379 (check_static_variable_definition): New function.
1380 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
1381 appropriate.
1382 (check_static_variable_definition): Split out from ...
1383 (grokdeclarator): Here.
1384 * pt.c (check_default_tmpl_args): New function, split out from ...
1385 (push_template_decl_real): Here.
1386 (instantiate_template): Fix comment.
1387
1388 1998-11-04 Mark Mitchell <mark@markmitchell.com>
1389
1390 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
1391 (CP_TYPE_VOLATILE_P): Likewise.
1392 (CP_TYPE_RESTRICT_P): Likewise.
1393
1394 1998-11-03 Mark Mitchell <mark@markmitchell.com>
1395
1396 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
1397
1398 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
1399
1400 * class.c (instantiate_type): Be more helpful.
1401
1402 * decl2.c (import_export_decl): Call import_export_class.
1403
1404 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
1405 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
1406 * pt.c (tsubst_copy): Likewise.
1407
1408 1998-11-02 Mark Mitchell <mark@markmitchell.com>
1409
1410 * init.c (expand_vec_init): Fix off-by-one error.
1411
1412 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
1413
1414 * parse.y (apparent_template_type): new type
1415 (named_complex_class_head_sans_basetype): use it
1416 * Makefile.in (CONFLICTS): one new conflict
1417 * parse.c: Regenerated
1418
1419 1998-11-01 Mark Mitchell <mark@markmitchell.com>
1420
1421 * cp-tree.h (COMPARE_STRICT): New macro.
1422 (COMPARE_BASE): Likewise.
1423 (COMPARE_RELAXED): Likewise.
1424 (COMPARE_REDECLARATION): Likewise.
1425 (same_type_p): Likewise.
1426 (same_or_base_type_p): Likewise.
1427 * call.c (standard_conversion): Use them, in place of comptypes
1428 with numeric arguments.
1429 (reference_binding): Likewise.
1430 (convert_like): Likewise.
1431 (build_over_call): Likewise.
1432 (is_subseq): Likewise.
1433 (is_properly_derived_from): Likewise.
1434 (compare_ics): Likewise.
1435 (joust): Likewise.
1436 * class.c (delete_duplicate_fields_1): Likewise.
1437 (resolves_to_fixed_type_p): Likewise.
1438 (instantiate_type): Likewise. Remove #if 0'd code.
1439 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
1440 (pushdecl): Likewise.
1441 (lookup_name_real): Likewise.
1442 (grokdeclarator): Likewise. Check for illegal array declarations.
1443 (grokparms): Likewise.
1444 (grok_op_properties): Likewise.
1445 * decl2.c (check_classfn): Likewise.
1446 * friend.c (is_friend): Likewise.
1447 (make_friend_class): Likewise.
1448 * init.c (expand_aggr_init): Likewise.
1449 (expand_vec_init): Likewise.
1450 * pt.c (is_member_template_class): Remove declaration.
1451 (is_specialization_of): Use COMPARE_* and new macros.
1452 (comp_template_parms): Likewise.
1453 (convert_nontype_argument): Likewise.
1454 (coerce_template_template_parms): Likewise.
1455 (template_args_equal): Likewise.
1456 (lookup_template_class): Likewise.
1457 (type_unification_real): Likewise.
1458 (unify): Likewise.
1459 (get_bindings_real): Likewise.
1460 * search.c (covariant_return_p): Likewise.
1461 (get_matching_virtual): Likewise.
1462 * sig.c (match_method_types): Likewise.
1463 * tree.c (vec_binfo_member): Likewise.
1464 (cp_tree_equal): Likewise.
1465 * typeck.c (common_type): Likewise.
1466 (comp_array_types): Likewise. Get issues involving unknown array
1467 bounds right.
1468 (comptypes): Update comments. Use new flags.
1469 (comp_target_types): Use new macros.
1470 (compparms): Likewise.
1471 (comp_target_parms): Likewise.
1472 (string_conv_p): Likewise.
1473 (build_component_ref): Likewise.
1474 (build_indirect_ref): Likewise.
1475 (build_conditional_expr): Likewise.
1476 (build_static_cast): Likewise.
1477 (build_reinterpret_cast): Likewise.
1478 (build_const_cast): Likewise.
1479 (build_modify_expr): Likewise.
1480 (convert_for_assignment): Likewise.
1481 (comp_ptr_ttypes_real): Likewise.
1482 (ptr_reasonably_similar): Likewise.
1483 (comp_ptr_ttypes_const): Likewise.
1484
1485 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
1486
1487 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
1488
1489 1998-10-30 Mark Mitchell <mark@markmitchell.com>
1490
1491 * decl2.c (delete_sanity): Pass integer_zero_node, not
1492 integer_two_node, to build_vec_delete.
1493 * init.c (build_array_eh_cleanup): Remove.
1494 (expand_vec_init_try_block): New function.
1495 (expand_vec_init_catch_clause): Likewise.
1496 (build_vec_delete_1): Don't deal with case that auto_delete_vec
1497 might be integer_two_node anymore.
1498 (expand_vec_init): Rework for initialization-correctness and
1499 exception-correctness.
1500 * typeck2.c (process_init_constructor): Make mutual exclusivity
1501 of cases more obvious.
1502
1503 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
1504
1505 * decl.c (lookup_name_real): OK, only warn if not lexing.
1506 Simplify suggested fix.
1507
1508 * cp-tree.h (IDENTIFIER_MARKED): New macro.
1509 * search.c (lookup_conversions): Use breadth_first_search.
1510 (add_conversions): Avoid adding two conversions to the same type.
1511 (breadth_first_search): Work with base binfos, rather
1512 than binfos and base indices.
1513 (get_virtual_destructor): Adjust.
1514 (tree_has_any_destructor_p): Adjust.
1515 (get_matching_virtual): Adjust.
1516
1517 * pt.c (push_template_decl_real): Generalize check for incorrect
1518 number of template parms.
1519 (is_member_template_class): #if 0.
1520
1521 1998-10-29 Richard Henderson <rth@cygnus.com>
1522
1523 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
1524 last.
1525
1526 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
1527
1528 * lex.c: Call check_newline from lang_init always. After
1529 calling cpp_start_read, set yy_cur and yy_lim to read from the
1530 cpplib token buffer.
1531
1532 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
1533
1534 * class.c (instantiate_type): Don't consider templates for a normal
1535 match.
1536
1537 * class.c (finish_struct_1): Don't complain about non-copy
1538 assignment ops in union members.
1539
1540 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
1541 (prepare_fresh_vtable): Likewise.
1542 (finish_struct_1): Don't call import_export_class.
1543 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
1544 (finish_prevtable_vardecl): Lose.
1545 (finish_file): Don't call it.
1546 * pt.c (instantiate_class_template): Likewise.
1547 * cp-tree.h: Remove it.
1548
1549 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
1550 * decl.c (finish_function): Not here.
1551 (start_function): Do set DECL_INITIAL.
1552
1553 * pt.c (push_template_decl_real): Complain about default template
1554 args for enclosing classes.
1555
1556 * call.c (add_function_candidate): Treat conversion functions
1557 as coming from the argument's class.
1558 * cp-tree.h (DECL_CONV_FN_P): New fn.
1559 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
1560 * class.c (add_method): Use DECL_CONV_FN_P.
1561 * decl2.c (check_classfn): Likewise.
1562 * error.c (dump_function_name): Likewise.
1563 (dump_function_decl): Likewise.
1564 * pt.c (fn_type_unification): Likewise.
1565 * search.c (add_conversions): Likewise.
1566
1567 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
1568
1569 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
1570 * method.c (hack_identifier): Also check for using RESULT_DECL
1571 from outer context.
1572
1573 1998-10-27 Mark Mitchell <mark@markmitchell.com>
1574
1575 * decl.c (grokdeclarator): Use type_quals, rather than constp,
1576 consistently.
1577
1578 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
1579
1580 * call.c (standard_conversion): instantiate_type here.
1581 (reference_binding): And here.
1582 (implicit_conversion): Not here.
1583 (build_op_delete_call): No need to cons up an OVERLOAD.
1584 * cvt.c (cp_convert_to_pointer): instantiate_type here.
1585 (convert_to_reference): And here.
1586 * decl.c (grok_reference_init): Not here.
1587 (grokparms): Or here.
1588 * typeck2.c (digest_init): Or here.
1589 * typeck.c (decay_conversion): Take the address of overloaded
1590 functions, too.
1591 (require_instantiated_type): Lose.
1592 (convert_arguments): Don't handle unknown types here.
1593 (build_c_cast): Likewise.
1594 (build_binary_op): Gut.
1595 (build_conditional_expr): Don't require_instantiated_type.
1596 (build_modify_expr): Likewise.
1597 (build_static_cast): Don't instantiate_type.
1598 (build_reinterpret_cast): Likewise.
1599 (build_const_cast): Likewise.
1600 (convert_for_initialization): Likewise.
1601 (build_ptrmemfunc): Use type_unknown_p.
1602 (convert_for_assignment): Also do default_conversion on overloaded
1603 functions. Hand them off to ocp_convert.
1604
1605 1998-10-26 Mark Mitchell <mark@markmitchell.com>
1606
1607 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
1608 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
1609
1610 * class.c (finish_struct_1): Use build_cplus_array_type to build
1611 array types.
1612 * decl.c (init_decl_processing): Likewise.
1613 * except.c (expand_end_eh_spec): Likewise.
1614 * search.c (expand_upcast_fixups): Simplify very slightly.
1615
1616 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1617
1618 * decl.c (grokdeclarator): Complain about a variable using
1619 constructor syntax coming back null from start_decl.
1620
1621 * friend.c (make_friend_class): Complain about trying to make
1622 a non-class type a friend.
1623
1624 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
1625 (start_function): Not here.
1626
1627 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
1628
1629 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1630
1631 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1632
1633 * typeck2.c (process_init_constructor): Only skip anonymous fields
1634 if they are bitfields.
1635
1636 * cp-tree.def (TYPEOF_TYPE): New code.
1637 * error.c (dump_type_real): Handle it.
1638 * pt.c (tsubst): Likewise.
1639 * tree.c (search_tree): Likewise.
1640 * semantics.c (finish_typeof): New fn.
1641 * parse.y (typespec): Use it.
1642 * cp-tree.h: Declare it.
1643
1644 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
1645
1646 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
1647
1648 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1649
1650 * typeck.c (convert_arguments): Don't handle pmf references
1651 specially.
1652
1653 * init.c (build_member_call): Don't try to convert to the base type
1654 if it's ambiguous or pedantic.
1655
1656 * typeck2.c (check_for_new_type): Only depend on pedantic for
1657 C-style casts.
1658
1659 1998-10-25 Mark Mitchell <mark@markmitchell.com>
1660
1661 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
1662 non-converting constructors.
1663
1664 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
1665
1666 * gxxint.texi: Correct documentation for n, N, Q, and B.
1667
1668 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
1669
1670 * parse.y (condition): Convert VAR_DECL from reference to indirect
1671 reference.
1672
1673 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
1674
1675 * exception.cc (__cp_pop_exception): Free the original exception
1676 value, not the potentially coerced one.
1677
1678 1998-10-23 Mark Mitchell <mark@markmitchell.com>
1679
1680 * Makefile.in (hash.h): Run gperf when necessary.
1681
1682 * cp-tree.h (CP_TYPE_READONLY): Remove.
1683 (CP_TYPE_VOLATILE): Likewise.
1684 (CP_TYPE_QUALS): New macro.
1685 (CP_TYPE_CONST_P): Likewise.
1686 (CP_TYPE_VOLATILE_P): Likewise.
1687 (CP_TYPE_RESTRICT_P): Likewise.
1688 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
1689 (cp_build_type_variant): Rename to ...
1690 (cp_build_qualified_type): New function.
1691 (c_apply_type_quals_to_decl): Declare.
1692 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
1693 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
1694 (cp_type_qual_from_rid): New function.
1695 (compparms): Remove unused parameter. All callers changed.
1696 (cp_type_quals): New function.
1697 (at_least_as_qualified_p): Likewise.
1698 (more_qualified_p): Likewise.
1699
1700 * call.c (standard_conversion): Replace calls to
1701 cp_build_type_variant with cp_build_qualified_type. Use
1702 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
1703 compare them. Use CP_TYPE_* macros to check qualifiers.
1704 (reference_binding): Likewise.
1705 (implicit_conversion): Likewise.
1706 (add_builtin_candidates): Likewise.
1707 (build_over_call): Likewise.
1708 * class.c (overrides): Compare all qualifiers, not just `const',
1709 on method declarations.
1710 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
1711 (convert_pointer_to_real): Likewise.
1712 (type_promotes_to): Likewise.
1713 * decl.c (check_for_uninitialized_const_var): New function.
1714 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
1715 (cp_finish_decl): Use check_for_uninitialized_const_var.
1716 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
1717 handle `restrict'.
1718 (grok_ctor_properties): Likewise.
1719 (grok_op_properties): Likewise.
1720 (start_function): Likewise.
1721 (rever_static_member_fn): Likewise.
1722 * decl2.c (grok_method_quals): Likewise.
1723 (grokfield): Likewise.
1724 * error.c (dump_readonly_or_volatile): Rename to ...
1725 (dump_qualifiers): New function. Handle `restrict'.
1726 (dump_type_real): Use it.
1727 (dump_aggr_type): Likewise.
1728 (dump_type_prefix): Likewise.
1729 (dump_type_suffix): Likewise.
1730 (dump_function_decl): Likewise.
1731 (cv_as_string): Likewise.
1732 * gxx.gperf: Add __restrict and __restrict__.
1733 * gxxint.texi: Document `u' as used for `__restrict', and a few
1734 other previously undocumented codes.
1735 * hash.h: Regenerated.
1736 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
1737 (build_member_call): Likewise.
1738 (build_new_1): Likewise.
1739 * lex.c (init_parse): Add entry for RID_RESTRICT.
1740 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
1741 (cp_type_qual_from_rid): Define.
1742 * lex.h (enum rid): Add RID_RESTRICT.
1743 * method.c (process_modifiers): Deal with `restrict'.
1744 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
1745 * parse.c: Regenerated.
1746 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
1747 (tsubst_aggr_type): Likewise.
1748 (tsubst): Likewise.
1749 (check_cv_quals_for_unify): Likewise.
1750 (unify): Likewise.
1751 * rtti.c (init_rtti_processing): Likewise.
1752 (build_headof): Likewise.
1753 (get_tinfo_var): Likewise.
1754 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
1755 (expand_class_desc): Likewise.
1756 (expand_attr_desc): Likewise.
1757 (synthesize_tinfo_fn): Likewise.
1758 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
1759 (get_matching_virtual): Likewise.
1760 (expand_upcast_fixups): Likewise.
1761 * sig.c (build_signature_pointer_or_reference_name): Take
1762 type_quals, not constp and volatilep.
1763 (build_signature_pointer_or_reference_type): Likewise.
1764 (match_method_types): More CP_TYPE_QUALS conversion, etc.
1765 (build_signature_pointer_constructor): Likewise.
1766 (build_signature_method_call): Likewise.
1767 * tree.c (build_cplus_array_type): Likewise.
1768 (cp_build_type_variant): Rename to ...
1769 (cp_build_qualified_type): New function. Deal with `__restrict'.
1770 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
1771 (build_exception_variant): Likewise.
1772 (mapcar): Likewise.
1773 * typeck.c (qualif_type): Likewise.
1774 (common_type): Likewise.
1775 (comptypes): Likewise.
1776 (comp_cv_target_types): Likewise.
1777 (at_least_as_qualified_p): Define.
1778 (more_qualified_p): Likewise.
1779 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
1780 (compparms): Likewise.
1781 (inline_conversion): Likewise.
1782 (string_conv_p): Likewise.
1783 (build_component_ref): Likewise.
1784 (build_indirect_ref): Likewise.
1785 (build_array_ref): Likewise.
1786 (build_unary_op): Likewise.
1787 (build_conditional_expr): Likewise.
1788 (build_static_cast): Likewise.
1789 (build_c_cast): Likewise.
1790 (build_modify_expr): Likewise.
1791 (convert_For_assignment): Likewise.
1792 (comp_ptr_ttypes_real): Likewise.
1793 (cp_type_quals): New function.
1794
1795 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
1796
1797 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
1798 (CP_TYPE_VOLATILE): Likewise.
1799 * decl.c (grokdeclarator): Use them.
1800 * tree.c (canonical_type_variant): Likewise.
1801
1802 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
1803
1804 * parse.y (named_class_head): Push into class while parsing the
1805 base class list.
1806 * decl2.c (push_scope, pop_scope): New functions.
1807 * cp-tree.h: Declare them.
1808 * init.c (build_new_1): Delay cleanup until end of full expression.
1809
1810 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
1811
1812 * typeck.c (build_component_ref): Use of a type here is an error.
1813
1814 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
1815
1816 Revamp references to member functions.
1817 * method.c (hack_identifier): Call build_component_ref for a
1818 reference to a member function.
1819 * typeck.c (build_component_ref): Only return a single function
1820 if it's static. Otherwise, return a COMPONENT_REF.
1821 (build_x_function_call): Handle a COMPONENT_REF.
1822 (build_unary_op): Handle all unknown-type things.
1823 * decl2.c (arg_assoc): Handle COMPONENT_REF.
1824 * class.c (instantiate_type): Complain if the function we get is a
1825 nonstatic member function. Remove code for finding "compatible"
1826 functions.
1827 * pt.c (tsubst_copy): Handle NOP_EXPR.
1828 * tree.c (build_dummy_object): New fn.
1829 (maybe_dummy_object): New fn.
1830 (is_dummy_object): New fn.
1831 * cp-tree.h: Declare them.
1832 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
1833 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
1834 * init.c (build_member_call): Use maybe_dummy_object and
1835 is_dummy_object.
1836 (build_offset_ref): Use maybe_dummy_object.
1837 (resolve_offset_ref): Use is_dummy_object.
1838 * typeck.c (build_x_function_call): Call build_dummy_object.
1839 (unary_complex_lvalue): Call is_dummy_object.
1840
1841 * typeck.c (build_component_addr): Make sure field is a field.
1842
1843 * call.c (build_new_op): Delete obsolete code.
1844
1845 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
1846
1847 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
1848
1849 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
1850 std if std is ignored.
1851
1852 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1853
1854 * decl.c (grokvardecl): Fix thinko.
1855
1856 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1857 not the left.
1858
1859 * parse.y (fn.def2): Fix 'attrs' format.
1860
1861 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
1862
1863 * Makefile.in (CONFLICTS): Update.
1864 * parse.y (expr_or_declarator_intern): New rule.
1865 (expr_or_declarator, direct_notype_declarator, primary,
1866 functional_cast): Use it.
1867 (notype_declarator_intern): New rule.
1868 (notype_declarator, complex_notype_declarator): Use it.
1869
1870 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
1871
1872 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
1873 (grokvardecl): Likewise.
1874
1875 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1876
1877 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
1878 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
1879
1880 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
1881
1882 * pt.c (process_partial_specialization): Cast 1st argument of
1883 `bzero' to (PTR).
1884
1885 * tree.c (build_base_fields): Cast `base_align' to (int) when
1886 comparing against one.
1887
1888 1998-10-16 Mark Mitchell <mark@markmitchell.com>
1889
1890 * decl.c (lookup_name_real): Handle template parameters for member
1891 templates where said parameters have the same name as the
1892 surrounding class.
1893
1894 * decl.c (expand_static_init): Build cleanups before entering the
1895 anonymous function used to do them to avoid access-checking
1896 confusion.
1897
1898 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
1899 accidentally removed by previous change, and make DECL_RTL here.
1900 * class.c (add_method): Don't make DECL_RTL here.
1901
1902 * pt.c (for_each_template_parm): Don't examine uninstantiated
1903 default arguments.
1904
1905 1998-10-16 Dave Brolley <brolley@cygnus.com>
1906
1907 * lex.c (real_yylex): Fix unaligned access of wchar_t.
1908
1909 1998-10-16 Mark Mitchell <mark@markmitchell.com>
1910
1911 * class.c (add_method): Fix documentation to reflect previous
1912 changes. Check for duplicate method declarations here.
1913 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
1914 correctly; such things never match.
1915 (grokfndecl): Don't look for duplicate methods here.
1916 * decl2.c (check_classfn): Don't assume names are mangled.
1917 Don't add bogus member function declarations to a class before the
1918 class type is complete.
1919 (grokfield): Reformat error message.
1920 * method.c (set_mangled_name_for_decl): Don't mangle names while
1921 procesing_template_decl.
1922
1923 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
1924
1925 * typeck.c (build_indirect_ref): Complain about a pointer to data
1926 member, too.
1927 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
1928 data member.
1929 * init.c (resolve_offset_ref): Don't undo the above.
1930
1931 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
1932 (struct lang_decl_flags): Add `bitfield'.
1933 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
1934 DECL_BIT_FIELD.
1935 * decl2.c (grokbitfield, grok_alignof): Likewise.
1936 * init.c (build_offset_ref): Likewise.
1937 * typeck.c (build_component_addr, expr_sizeof): Likewise.
1938 * cvt.c (build_up_reference): Don't crash if taking the address
1939 returns error_mark_node.
1940
1941 * decl.c (grokfndecl): Also check ctype when checking for ::main().
1942
1943 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
1944
1945 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
1946 Do mangling here.
1947 (grokdeclarator): Instead of here.
1948 * friend.c (do_friend): Lose special handling of ::main and
1949 __builtin_*.
1950 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
1951
1952 * spew.c (yylex): Clear looking_for_typename if we got
1953 'enum { ... };'.
1954
1955 1998-10-15 Mark Mitchell <mark@markmitchell.com>
1956
1957 * class.c (maybe_warn_about_overly_private_class): Improve error
1958 messages for class with only private constructors.
1959
1960 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
1961 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
1962 (build_typename_type): New function.
1963 * decl.c (build_typename_type): Broken out from ...
1964 (make_typename_type): Use it.
1965 * search.c (lookup_field): Likewise.
1966
1967 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1968
1969 * pt.c (convert_nontype_argument): Check against type_referred_to.
1970 * decl.c (grokvardecl): Check for declarator name before building
1971 DECL_ASSEMBLER_NAME.
1972
1973 1998-10-14 Mark Mitchell <mark@markmitchell.com>
1974
1975 * pt.c (lookup_template_class): Add comment.
1976 (instantiate_class_template): Don't mark the _TYPE node for
1977 member class templates as an instantiation.
1978
1979 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
1980
1981 * decl.c (grokfndecl): Fix my thinko.
1982
1983 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
1984
1985 * tinfo2.cc (fast_compare): Remove.
1986 (before): Just use strcmp.
1987 * tinfo.cc (operator==): Just use strcmp.
1988
1989 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
1990
1991 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
1992 declarations.
1993
1994 1998-10-13 Mark Mitchell <mark@markmitchell.com>
1995
1996 * cp-tree.h (specializations_of_same_template_p): Remove.
1997 * search.c (get_template_base): Don't use it.
1998 (get_template_base_recursive): Likewise.
1999 * pt.c (specializations_of_same_template_p): Remove.
2000 (unify): Don't use it.
2001 (lookup_template_class): Find the correct parent when setting
2002 CLASSTYPE_TI_TEMPLATE.
2003
2004 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2005
2006 * tinfo.cc (operator==): Always compare names.
2007
2008 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2009
2010 * decl.c (start_function): Fix cut-and-paste error.
2011
2012 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2013
2014 * inc/typeinfo: Add #pragma interface.
2015 (operator!=): Just call operator==.
2016 * tinfo.cc: Add #pragma implementation.
2017 (operator==): Move from inc/typeinfo and tinfo2.cc.
2018 Check __COMMON_UNRELIABLE instead of _WIN32.
2019
2020 * typeck2.c (my_friendly_abort): Add URL.
2021
2022 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
2023
2024 * decl.c (start_method): Added extra parameter for attributes.
2025 * cp-tree.h (start_method): Update prototype.
2026 * parse.y (fn.def2): Update start_method parameter list.
2027
2028 1998-10-11 Mark Mitchell <mark@markmitchell.com>
2029
2030 * cp-tree.h (specializations_of_same_template_p): Declare.
2031 * pt.c (specializations_of_same_template_p): New function.
2032 (unify): Use it.
2033 * search.c (get_template_base): Use it.
2034 (get_template_base_recursive): Likewise.
2035
2036 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
2037
2038 * decl2.c (start_objects): Add new variable `joiner' and
2039 initialize it properly.
2040
2041 1998-10-09 Mark Mitchell <mark@markmitchell.com>
2042
2043 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
2044 change to vtable types.
2045
2046 * cvt.c (ocp_convert): Avoid infinite recursion caused by
2047 1998-10-03 change.
2048
2049 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
2050
2051 * pt.c (resolve_overloaded_unification): New fn.
2052 (try_one_overload): Likewise.
2053 (unify): Don't fail on unknown type.
2054 (type_unification_real): Likewise. Use resolve_overloaded_unification
2055 to handle an overloaded argument.
2056 (template_args_equal): Split out...
2057 (comp_template_args): From here.
2058 (determine_specialization): Also allow a template with more
2059 parms than were explicitly specified.
2060 * cp-tree.h: Add template_args_equal.
2061 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
2062
2063 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
2064
2065 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
2066 change.
2067
2068 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
2069
2070 * typeck.c (unsigned_type): Only return TItype nodes when
2071 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2072 (signed_type): Similarly.
2073 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
2074 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2075 (init_decl_processing): Only create TItype nodes when
2076 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2077 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
2078 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2079
2080 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2081
2082 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
2083 (gxx.gperf): Update comments describing invocation flags.
2084 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
2085
2086 1998-10-07 Mark Mitchell <mark@markmitchell.com>
2087
2088 * class.c (finish_struct_1): Add commentary on prevous change.
2089
2090 * cp-tree.h (vtbl_ptr_type_node): New variable.
2091 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
2092 already of the right type.
2093 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
2094 Simplify code to grow vtable.
2095 * decl.c (vtbl_ptr_type_node): Define.
2096 (init_decl_processing): Initialize it.
2097
2098 1998-10-06 Mark Mitchell <mark@markmitchell.com>
2099
2100 * cp-tree.def (PTRMEM_CST): New tree node.
2101 * cp-tree.h (ptrmem_cst): New type.
2102 (lang_type): Remove local_typedecls.
2103 (dummy): Increase to 12 bits from 11.
2104 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
2105 (PTRMEM_CST_CLASS): New macro.
2106 (PTRMEM_CST_MEMBER): Likewise.
2107 (current_access_specifier): New variable.
2108 (current_class_type): Remove duplicate declaration.
2109 (finish_struct): Change prototype.
2110 (unreverse_member_declarations): New function.
2111 (pushdecl_class_level): Change prototype.
2112 (grok_enum_decls): Remove.
2113 (fixup_anonymous_union): New function.
2114 (grok_x_components): Change prototype.
2115 (tsubst_chain): Remove.
2116 (finish_member_template_decl): Likewise.
2117 (check_explicit_specialization): Fix indentation.
2118 (finish_class_definition): Change prototype.
2119 (finish_member_class_template): Likewise.
2120 (finish_member_declaration): New function.
2121 (check_multiple_declarators): Likewise.
2122 * class.c (class_stack_node_t): New type.
2123 (current_class_base): Remove.
2124 (current_class_stack): Change type.
2125 (current_access_specifier): New variable.
2126 (grow_method): Remove.
2127 (check_member_decl_is_same_in_complete_scope): Break out from
2128 finish_struct.
2129 (make_method_vec): New function.
2130 (free_method_vec): Likewise.
2131 (add_implicitly_declared_members): Break out from finish_struct_1.
2132 (free_method_vecs): New variable.
2133 (add_method): Rework for direct use from parser.
2134 (handle_using_decl): Watch for NULL_TREE while iterating through
2135 CLASSTYPE_METHOD_VEC.
2136 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
2137 just do some error-checking.
2138 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
2139 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
2140 (finish_struct): Change prototype. Simplify; fields and methods
2141 are already set up at this point.
2142 (init_class_processing): Set up current_class_stack.
2143 (pushclass): Save current_access_specifier.
2144 (popclass): Restore it.
2145 (currently_open_class): Simplify.
2146 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
2147 * decl.c (saved_scope): Add access_specifier.
2148 (maybe_push_to_top_level): Save it.
2149 (pop_from_top_level): Restore it.
2150 (maybe_process_template_type_declaration): Use
2151 finish_member_declaration.
2152 (pushtag): Likewise.
2153 (pushdecl_class_level): Don't return a value.
2154 (fixup_anonymous_union): Break out from grok_x_components.
2155 (shadow_tag): Use it.
2156 (xref_tag): Complain about using an elaborated type specifier to
2157 reference a template type parameter or typedef name.
2158 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2159 (current_local_enum): Remove.
2160 (build_enumerator): Call finish_member_declaration.
2161 (grok_enum_decls): Remove.
2162 * decl2.c (grok_x_components): Simplify.
2163 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
2164 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2165 (merge_functions): Add to comment.
2166 (arg_assoc_type): Prototype.
2167 (arg_assoc): Pass as many arguments as there are parameters.
2168 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
2169 OFFSET_REF.
2170 * expr.c (cpls_expand_expr): Remove dead code. Handle
2171 PTRMEM_CST.
2172 * friend.c (do_friend): Lookup friends when in nested classes.
2173 Change comments.
2174 * init.c (build_offset_ref): Do lookup even for classes that are
2175 only partially defined.
2176 (decl_constant_value): Remove dead code.
2177 * method.c (build_overload_value): Remove hack where by TYPE was
2178 not a TYPE. Handle PTRMEM_CST.
2179 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
2180 should go.
2181 * parse.y (components, notype_components, component_decl,
2182 component_decl_1, component_declarator, component_declarator0):
2183 Now all are itype rather than ttype. Rework to add members to
2184 classes on the fly.
2185 (typesqpecqual_reserved): Use check_multiple_declarators.
2186 (structsp): Update class to finish_class_definition.
2187 (do_xref_defn): Unsplit into named_class_head.
2188 (access_specifier): Set current_access_specifier.
2189 * pt.c (set_current_access_from_decl): New function.
2190 (finish_member_template_decl): Don't take the parameters.
2191 (comp_template_args): Make more robust.
2192 (lookup_template_class): Don't use current_local_enum.
2193 (for_each_template_parm): Handle PTRMEM_CST.
2194 (instantiate_class_template): Use set_current_access_from_decl,
2195 finish_member_declaration and unreverse_member_declarations. Set
2196 lineno/input_filename before generating implicit member functions.
2197 (type_unification_real): Don't assume back-unification happens
2198 only for the last argument.
2199 (regenerate_decl_from_template): Call pushclass a bit earlier.
2200 (tsubst_chain): Remove.
2201 (tsubst_enum): Use set_current_access_from_decl.
2202 (set_mangled_name_for_template_decl): Fix indentation.
2203 * search.c (lookup_fnfields_1): Change iteration through
2204 CLASSTYPE_METHOD_VEC.
2205 (dfs_pushdecls): Likewise.
2206 (dfs_compress_decls): Likewise.
2207 (add_conversions): Likewise.
2208 * semantics.c (finish_class_definition): Don't take components.
2209 Change call to finish_struct.
2210 (finish_member_declaration): New function.
2211 (finish_member_class_template): Don't take template parameters.
2212 Change call to grok_x_components. Call finish_member_template_decl.
2213 (check_multiple_declarators): New function.
2214 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
2215 a passed in fieldlist.
2216 * tree.c (search_tree): Handle PTRMEM_CST.
2217 (mapcar): Likewise.
2218 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
2219 INTEGER_CSTs, for pointer-to-data members.
2220
2221 * call.c (resolve_args): Resolve template specializations, if
2222 possible.
2223
2224 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2225
2226 * Makefile.in (spew.o): Depend on toplev.h.
2227
2228 * call.c (compare_ics): Initialize variables `deref_from_type2',
2229 `deref_to_type1' and `deref_to_type2'.
2230
2231 * except.c (get_eh_type): Hide prototype and definition.
2232 (process_start_catch_block_old): Remove unused static prototype.
2233
2234 * pt.c (tsubst_decl): Initialize variable `argvec'.
2235
2236 * spew.c: Include toplev.h.
2237
2238 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
2239
2240 * pt.c (instantiate_decl): Do save and restore file position.
2241
2242 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
2243
2244 * method.c (build_decl_overload_real): Clear
2245 numeric_output_need_bar after __.
2246
2247 1998-10-05 Nathan Sidwell <nathan@acm.org>
2248
2249 * call.c (build_new_method_call): Issue 'incomplete type' error,
2250 if class is not defined.
2251
2252 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2253
2254 * call.c (build_object_call): Move declaration of variable
2255 `fn' into the scope where it is used. Don't access variable
2256 `fn' when it is uninitialized, instead use `fns'.
2257
2258 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2259
2260 * errfn.c (cp_thing): Print buf as a string not as a printf format
2261 to avoid problems with the operator%. Consequently, `%%' sequences
2262 in format are copied as `%' in buf.
2263
2264 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
2265
2266 * pt.c (pop_tinst_level): Call extract_interface_info.
2267 (instantiate_decl): Don't save and restore file position.
2268
2269 * decl.c (cp_finish_decl): Make statics in extern inlines and
2270 templates common, if possible and the target doesn't support weak
2271 symbols.
2272
2273 * decl.c (grokdeclarator): Remove redundant calls to
2274 build_type_variant and some duplicated code.
2275 * sig.c (build_signature_reference_type): Only take the type parm.
2276 (build_signature_pointer_type): Likewise.
2277 * tree.c (build_cplus_method_type): Adjust.
2278 * cp-tree.h: Update.
2279
2280 1998-10-04 Mark Mitchell <mark@markmitchell.com>
2281
2282 * call.c (build_over_call): Make pedwarns about dropped qualifiers
2283 into full-fledged errors.
2284 * cvt.c (convert_to_reference): Likewise.
2285 * typeck.c (convert_for_assignment): Likewise.
2286
2287 * search.c (expand_upcast_vtables): In addition to unsetting
2288 TREE_READONLY, remove top-level const type qualifier.
2289
2290 1998-10-03 Mark Mitchell <mark@markmitchell.com>
2291
2292 * class.c (current_class_ptr, current_class_ref): Clarify
2293 documentation.
2294 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
2295 NOP type conversions.
2296 * decl.c (decls_match): Use comptypes directly; ignore
2297 qualifiers on the DECL.
2298 (duplicate_decls): Remove qualifier checks on DECL.
2299 (grokdeclarator): Make the type built up include top-level
2300 qualifiers.
2301 * decl2.c (do_dtors): Fix spelling error.
2302 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
2303 when printing type information.
2304 * init.c (build_new_1): Add documentation. Deal with the fact
2305 that type of allocated memory now contains qualifiers.
2306 * lex.c (is_global): Improve error-recovery.
2307 * sig.c (build_member_function_pointer): Don't cast away const
2308 on fields of sigtable_entry_type.
2309 * tree.c (lvalue_type): Don't look at top-level qualifiers on
2310 expressions.
2311 * typeck.c (decay_conversion): Likewise.
2312 (build_component_ref): Make sure the type of the COMPONENT_REF
2313 contains top-level qualifiers, as appropriate. Improve
2314 error-handling.
2315 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
2316 (build_array_ref): Likewise.
2317 (build_unary_op): Improve error-recovery.
2318 (unary_complex_lvalue): Make taking the address a bound member
2319 function an error, not a sorry.
2320 (build_conditional_expr): Look at the type qualifiers, not the
2321 qualifiers on the expression itself.
2322
2323 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
2324
2325 * decl2.c (merge_functions): Remove duplicates.
2326
2327 * decl2.c: Add -f{no-,}implicit-inline-templates.
2328 (import_export_decl): Check it.
2329
2330 * decl.c (lookup_name_real): Template parms also take precedence
2331 over implicit typename. Only warn if yylex.
2332
2333 * typeck.c (build_conditional_expr): Only fold if ifexp is an
2334 INTEGER_CST.
2335
2336 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
2337 instead of linkage.
2338
2339 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
2340
2341 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
2342 * class.c (build_vbase_pointer): Use it.
2343 * rtti.c (expand_class_desc): Likewise.
2344 * tree.c (build_vbase_pointer_fields): Likewise.
2345
2346 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
2347
2348 * decl.c (start_decl): Add invocation of
2349 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
2350 (start_function): Add invocation of
2351 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
2352
2353 * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with
2354 HANDLE_GENERIC_PRAGMAS.
2355
2356 1998-09-28 Anthony Green <green@cygnus.com>
2357
2358 * semantics.c (finish_asm_stmt): Always permit volatile asms.
2359
2360 1998-09-28 Mark Mitchell <mark@markmitchell.com>
2361
2362 * decl.c (grokdeclarator): Tighten checks for invalid
2363 destructors. Improve error-messages and error-recovery.
2364 * decl2.c (check_classfn): Don't assume that mangled destructor
2365 names contain type information.
2366
2367 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
2368
2369 * search.c (get_base_distance): Remove assert.
2370
2371 * decl2.c (build_anon_union_vars): Don't process a field with no
2372 name.
2373 (finish_anon_union): Also complain about local anon unions with no
2374 members.
2375
2376 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
2377
2378 * decl.c (lookup_namespace_name): If the name is a namespace,
2379 return it immediately.
2380
2381 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2382
2383 * cp-tree.h (define_case_label): Remove unused parameter.
2384 (check_java_method): Likewise.
2385 (grokclassfn): Likewise.
2386 (expand_aggr_init): Likewise.
2387 (build_x_delete): Likewise.
2388 (maybe_end_member_template_processing): Likewise.
2389 (unshare_base_binfos): Add prototype.
2390 (string_conv_p): Likewise.
2391 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
2392
2393 * cvt.c (build_up_reference): Remove unused parameter
2394 `checkconst', all callers changed.
2395 (build_type_conversion): Mark parameter `code' with
2396 ATTRIBUTE_UNUSED.
2397 (build_expr_type_conversion): Initialize variable `conv'.
2398
2399 * decl.c (push_namespace): Initialize variable `d'.
2400 (define_case_label): Remove unused parameter `decl', all callers
2401 changed.
2402
2403 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
2404 `argc' with ATTRIBUTE_UNUSED.
2405 (grokclassfn): Remove unused parameter `cname', all callers
2406 changed.
2407 (check_java_method): Likewise for parameter `ctype'.
2408 (copy_assignment_arg_p): Mark parameter `virtualp' with
2409 ATTRIBUTE_UNUSED.
2410 (finish_prevtable_vardecl): Likewise for parameter `prev'.
2411
2412 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
2413
2414 * init.c (expand_aggr_init_1): Remove unused parameter
2415 `alias_this', all callers changed.
2416 (expand_aggr_init): Likewise.
2417 (expand_default_init): Likewise.
2418 (build_new_1): Initialize variable `susp'.
2419 (build_x_delete): Remove unused parameter `type', all callers
2420 changed.
2421
2422 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
2423 ATTRIBUTE_UNUSED.
2424 (readescape): Use (unsigned) value in shift.
2425 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
2426 comparing to a signed quantity.
2427
2428 * pt.c (maybe_end_member_template_processing): Remove unused
2429 parameter `decl', all callers changed.
2430 (check_explicit_specialization): Add braces around empty body in
2431 an else-statement.
2432 (current_template_args): Initialize variable `args'.
2433 (lookup_template_class): Likewise for variable `prev_local_enum'.
2434 (tsubst_decl): Likewise for variable `r'.
2435 (set_mangled_name_for_template_decl): Initialize variable
2436 `context'.
2437
2438 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
2439 Likewise for variable `i'.
2440 (yylex): Initialize variable `trrr'.
2441
2442 * typeck.c (compparms): Mark variable `strict' with
2443 ATTRIBUTE_UNUSED.
2444
2445 * xref.c (simplify_type): Cast argument of ctype function to
2446 `unsigned char'.
2447
2448 1998-09-24 Mark Mitchell <mark@markmitchell.com>
2449
2450 * cp-tree.h (language_lvalue_valid): Remove.
2451 * decl.c (grokdeclarator): Don't disallow references to functions.
2452 * tree.c (lvalue_p_1): New function, combining duplicated
2453 code from ...
2454 (lvalue_p): Use it.
2455 (real_lvalue_p): Likewise.
2456 * typeck.c (language_lvalue_valid): Remove.
2457 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
2458 they don't have TREE_READONLY set.
2459 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
2460
2461 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
2462
2463 * spew.c (yylex): Give diagnostic.
2464 * hash.h (is_reserved_word): Add export.
2465 * gxx.gperf: Ditto.
2466 * lex.h (rid): Add RID_EXPORT.
2467 * lex.c (init_parse): Ditto.
2468
2469 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2470
2471 * friend.c (do_friend): Make warning a full sentence.
2472
2473 1998-09-22 Mark Mitchell <mark@markmitchell.com>
2474
2475 * parse.y (component_decl_list): Improve error-recovery.
2476
2477 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
2478
2479 * decl.c (make_typename_type): Move error to point where name
2480 variable can be used by dump_type.
2481
2482 1998-09-22 Mark Mitchell <mark@markmitchell.com>
2483
2484 * decl.c (grokfndecl): Improve error-recovery.
2485 * decl2.c (grokfield): Likewise.
2486 * pt.c (finish_member_template_decl): Likewise.
2487
2488 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
2489
2490 * method.c (hack_identifier): Finding multiple members is always
2491 an error.
2492
2493 1998-09-21 Per Bothner <bothner@cygnus.com>
2494
2495 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
2496
2497 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
2498
2499 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
2500
2501 1998-09-20 Mark Mitchell <mark@markmitchell.com>
2502
2503 * class.c (maybe_warn_about_overly_private_class): Reformat.
2504
2505 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
2506
2507 * exception.cc (__cplus_type_matcher): realign some code.
2508
2509 1998-09-16 Mark Mitchell <mark@markmitchell.com>
2510
2511 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
2512 (tinfo2.o): Likewise.
2513 (exception.o): Likewise.
2514 (new.o): Likewise.
2515 (opnew.o): Likewise.
2516 (opnewnt.o): Likewise.
2517 (opvnew.o): Likewise.
2518 (opvnewnt.o): Likewise.
2519 (opdel.o): Likewise.
2520 (opdelnt.o): Likewise.
2521 (opvdel.o): Likewise.
2522 (opvdelnt.o): Likewise.
2523
2524 1998-09-16 Richard Henderson <rth@cygnus.com>
2525
2526 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
2527
2528 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
2529
2530 * call.c (build_field_call): handle static data members too
2531
2532 * typeck.c (comptypes): when comparing pointer types, check
2533 whether referred types match even in strictest modes
2534
2535 1998-09-15 Mark Mitchell <mark@markmitchell.com>
2536
2537 * cp-tree.h: Revert previous change.
2538 (finish_struct_methods): Remove declaration.
2539 * class.c: Revert previous change.
2540 (maybe_warn_about_overly_private_class): New function.
2541 (finish_struct_methods): Declare here, and make static. Remove
2542 unnecessary parameters. Tidy slightly. Use
2543 maybe_warn_about_overly_private_class.
2544 (finish_struct_1): Adjust. Remove check for private constructors,
2545 now done elsewhere.
2546 (finish_struct): Adjust.
2547
2548 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
2549
2550 * except.c (expand_start_catch_block): No need to check for new
2551 exception model.
2552 (process_start_catch_block_old): Deleted.
2553 (process_start_catch_block): Add call to start_decl_1().
2554 (expand_end_catch_block): Add call to end_catch_handler().
2555 * exception.cc (__cplus_type_matcher): Only check the exception
2556 language if there is an exception table.
2557
2558 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
2559
2560 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
2561 as used to prevent conflicts with virtual function tables.
2562
2563 1998-09-14 Mark Mitchell <mark@markmitchell.com>
2564
2565 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
2566 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
2567 * class.c (maybe_class_too_private_p): New function.
2568 (finish_struct_methods): Use it.
2569 (finish_struct_1): Likewise.
2570 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
2571 appropriate.
2572
2573 * pt.c (check_specialization_scope): Fix spelling error.
2574 (check_explicit_specialization): Remove code to handle explicit
2575 specializations in class scope; they are now correctly diagnosed
2576 as errors.
2577
2578 1998-09-10 Mark Mitchell <mark@markmitchell.com>
2579
2580 * decl.c (pushdecl): Don't copy types if the
2581 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
2582 type.
2583
2584 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2585
2586 * class.c (get_enclosing_class): New function.
2587 (is_base_of_enclosing_class): Likewise.
2588 * cp-tree.h (get_enclosing_class): Declare.
2589 (is_base_of_enclosing_class): Likewise.
2590 * pt.c (coerce_template_parms): Use them.
2591
2592 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
2593
2594 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
2595 null to decide whether to use it.
2596
2597 * error.c (dump_type_real): Handle NAMESPACE_DECL.
2598 * parse.y (base_class.1): Avoid crash on error.
2599
2600 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
2601
2602 * decl.c (make_typename_type): If context is a namespace, the code
2603 is in error.
2604
2605 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
2606
2607 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
2608
2609 1998-09-08 Mark Mitchell <mark@markmitchell.com>
2610
2611 * cp-tree.h (anonymous_namespace_name): Declare.
2612 * decl.c: Define it.
2613 (push_namespace): Use anonymous_namespace_name, rather than local
2614 static anon_name.
2615 * error.c (dump_decl): If a namespace is named
2616 anonymous_namespace_name, call it {anonymous}.
2617
2618 * decl.c (grokparms): Distinguish between references and pointers
2619 in error message.
2620
2621 1998-09-08 Richard Henderson <rth@cygnus.com>
2622 Mark Mitchell <mark@markmitchell.com>
2623
2624 * pt.c (process_partial_specialization): Consistantly allocate
2625 and zero tpd.parms based on ntparms. Use tpd2.parms, not
2626 tpd.parms, where appropriate.
2627
2628 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
2629
2630 * Makefile.in (INCLUDES): Update after recent toplevel gcc
2631 reorganizations.
2632
2633 1998-09-05 Mark Mitchell <mark@markmitchell.com>
2634
2635 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
2636 * class.c (finish_struct): Remove hackery to deal with explicit
2637 specializations in class scope.
2638 * decl.c (grokfndecl): Improve error-recovery.
2639 * decl2.c (grokfield): Likewise.
2640 * pt.c (check_specialization_scope): New function.
2641 (begin_specialization): Call it.
2642 (process_partial_specialization): New function, split out from
2643 push_template_decl. Check partial specializations more
2644 stringently.
2645 (push_template_decl): Call it.
2646 (check_explicit_specialization): Don't attempt to handle explicit
2647 specializations in class scope.
2648 (template_parm_data): Document. Add current_arg and
2649 arg_uses_template_parms.
2650 (mark_template_parm): Set it.
2651 (tsubst_arg_types): Remove unused variable.
2652 * semantics.c (begin_class_definition): Tweak.
2653
2654 1998-09-04 Mark Mitchell <mark@markmitchell.com>
2655
2656 * inc/typeinfo (type_info::type_info(const char*)): Make
2657 `explicit'.
2658
2659 * cp-tree.h (hash_tree_cons_simple): New macro.
2660 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
2661 (coerce_template_parms): Use make_temp_vec, instead of
2662 make_tree_vec. Document this behavior.
2663 (lookup_template_class): Likewise.
2664 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
2665 Remove dead code (and add ssertion to check its deadness). Fix
2666 bug w.r.t. exception specifications.
2667
2668 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
2669
2670 * decl2.c (import_export_vtable): Always make artificials comdat.
2671 (import_export_decl): Likewise.
2672 * pt.c (mark_decl_instantiated): Likewise.
2673
2674 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2675
2676 * cp-tree.h (finish_globally_qualified_member_call_expr):
2677 Rename to ...
2678 (finish_qualified_call_expr).
2679 * semantics.c: Likewise.
2680 * parse.y (primary): Use it.
2681 * method.c (hack_identifier): Remove redundant code.
2682
2683 * init.c (resolve_offset_ref): Call convert_from_reference to
2684 handle members of reference type. Improve error recovery.
2685
2686 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
2687
2688 * cp-tree.h: Declare warn_nontemplate_friend.
2689 * decl2.c (lang_decode_option): Set.
2690 * lang-options.h: Add -Wnon-template-friend.
2691 * friend.c (do_friend): Use to toggle non-template function warning.
2692
2693 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2694
2695 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
2696 corresponding INTEGER_CSTs when processing_template_decl.
2697 * pt.c (tsubst_enum): Tweak accordingly.
2698
2699 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2700
2701 * decl.c (pushdecl_class_level): Add warning here.
2702 (pushdecl): Tweak.
2703
2704 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
2705
2706 * cvt.c (convert_pointer_to_real): Tidy.
2707 * search.c (get_base_distance_recursive): Simplify.
2708 (get_base_distance): Likewise.
2709
2710 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
2711 parms.
2712
2713 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
2714
2715 * lex.c (check_newline): Call HANDLE_PRAGMA before
2716 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
2717 if unknown pragmas are encountered.
2718 (handle_sysv_pragma): Interpret return code from
2719 handle_pragma_token (). Return success/failure indication rather
2720 than next unprocessed character.
2721 (pragma_getc): New function: retrieves characters from the
2722 input stream. Defined when HANDLE_PRAGMA is defined.
2723 (pragma_ungetc): New function: replaces characters back into the
2724 input stream. Defined when HANDLE_PRAGMA is defined.
2725
2726 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
2727
2728 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
2729 * class.c (build_vtable_entry_ref): Likewise.
2730
2731 1998-09-01 Mark Mitchell <mark@markmitchell.com>
2732
2733 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
2734 * decl2.c (import_export_decl): Likewise.
2735 * pt.c (instantiate_decl): Use it.
2736
2737 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
2738
2739 * decl.c (lookup_name_real): Also do implicit typename thing for
2740 artificial TYPE_DECLs.
2741 * search.c (lookup_field): Likewise.
2742 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
2743 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
2744 (enter_scope_of): Extract type from implicit typename.
2745 (begin_class_definition): Likewise.
2746 * lex.c (identifier_type): Handle implicit typename when checking
2747 for SELFNAME.
2748
2749 * cp-tree.h: Declare flag_strict_prototype.
2750 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
2751 -fstrict-prototype.
2752 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
2753 specified, set it to the value of pedantic.
2754
2755 1998-09-01 Mark Mitchell <mark@markmitchell.com>
2756
2757 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
2758
2759 1998-08-31 Mark Mitchell <mark@markmitchell.com>
2760
2761 * decl.c (finish_enum): Handle member enums of classes declared in
2762 template functions.
2763
2764 * decl2.c (grok_x_components): Strip attributres before calling
2765 groktypename.
2766
2767 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
2768
2769 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
2770 -fenum-int-equivalence and -fno-nonnull-objects.
2771 * class.c (check_for_override): Remove support for -fall-virtual.
2772 (finish_struct_1): Likewise.
2773 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
2774 * typeck.c (build_binary_op_nodefault): Likewise.
2775 * cvt.c (ocp_convert): Likewise.
2776 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
2777 * class.c (build_vbase_path): Likewise.
2778
2779 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
2780
2781 * Makefile.in (INTERFACE): New, set to 1.
2782
2783 1998-08-30 Mark Mitchell <mark@markmitchell.com>
2784
2785 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
2786 comparing with global_namespace.
2787 (dump_aggr_type): Likewise.
2788
2789 * decl.c (grokfndecl): Issue error on declaration of friend
2790 templates with explicit template arguments.
2791
2792 * pt.c (convert_template_argument): New function, split out
2793 from...
2794 (coerce_template_parms): Here.
2795 (tsubst): Attempt better error-recovery.
2796
2797 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
2798
2799 * pt.c (decl_template_parm_p): Add checks for
2800 TEMPLATE_TEMPLATE_PARM.
2801
2802 1998-08-28 Mark Mitchell <mark@markmitchell.com>
2803
2804 * lex.c (do_identifier): Fix thinko in previous change.
2805
2806 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
2807
2808 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
2809 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
2810
2811 1998-08-28 Richard Henderson <rth@cygnus.com>
2812
2813 Add support for discarding unused virtual functions.
2814 * lang-options.h: Add -fvtable-gc.
2815 * cp-tree.h: Add flag_vtable_gc.
2816 * decl2.c (output_vtable_inherit): New fn.
2817 (finish_vtable_vardecl): Call it.
2818 * class.c (build_vtable_entry_ref): New fn.
2819 (build_vtbl_ref): Call it.
2820
2821 1998-08-28 Mark Mitchell <mark@markmitchell.com>
2822
2823 * cp-tree.h (build_enumerator): Take the enumeration type as a
2824 paramter.
2825 * decl.c (finish_enum): Don't set the TREE_TYPE for the
2826 enumeration constant values if we're processing_template_decls.
2827 Don't set the type for the CONST_DECLs either; that's done in
2828 build_enumerator.
2829 (build_enumerator): Take the enumeration type as a
2830 parameter.
2831 * lex.c (do_identifier): Don't resolve enumeration constants while
2832 processing template declarations, even if they happen to be
2833 TEMPLATE_PARM_INDEXs.
2834
2835 * parse.y (current_enum_type): New variable.
2836 (primary): Don't allow statement-expression in local classes just
2837 as we don't in global classes.
2838 (structsp): Use current_enum_type.
2839 (enum_list): Likewise.
2840 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
2841 finish_enum; they no longer occur.
2842
2843 * cp-tree.h (finish_base_specifier): New function.
2844 * parse.y (base_class): Use it.
2845 * semantics.c (finish_base_specifier): Define it.
2846
2847 * parse.y (structsp): Warn on use of typename outside of template
2848 declarations.
2849
2850 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
2851
2852 * lex.c (handle_cp_pragma): Remove #pragma vtable.
2853 * lang-options.h: Remove +e options.
2854 * decl2.c (lang_decode_option): Likewise.
2855 (import_export_vtable): Don't check write_virtuals.
2856 (finish_vtable_vardecl, finish_file): Likewise.
2857 * search.c (dfs_debug_mark): Likewise.
2858 * semantics.c (begin_class_definition): Likewise.
2859 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
2860
2861 * call.c (build_over_call): Check flag_elide_constructors.
2862 * decl2.c: flag_elide_constructors defaults to 1.
2863 * typeck.c (convert_arguments): Remove return_loc parm.
2864 (build_function_call_real): Adjust.
2865
2866 * search.c: Tear out all mi_matrix and memoize code.
2867 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
2868 * lang-options.h: Remove documentation for -fhandle-exceptions,
2869 -fmemoize-lookups and -fsave-memoized.
2870 * cp-tree.h: Lose mi_matrix and memoize support.
2871 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
2872 * class.c: Lose struct class_level.
2873 (pushclass, popclass): Lose memoize support.
2874 * init.c (build_offset_ref): Likewise.
2875
2876 Never change BINFO_INHERITANCE_CHAIN.
2877 * init.c (emit_base_init): Change modification of
2878 BINFO_INHERITANCE_CHAIN to an assert.
2879 * search.c (get_base_distance_recursive): Likewise.
2880 (get_base_distance): Likewise.
2881 (lookup_member): Likewise.
2882 (convert_pointer_to_single_level): Likewise.
2883 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
2884 (lookup_fnfields): Likewise.
2885 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
2886 (unshare_base_binfos): Don't call propagate_binfo_offsets.
2887 (layout_basetypes): Call propagate_binfo_offsets instead of
2888 unshare_base_binfos.
2889 * decl.c (xref_basetypes): Call unshare_base_binfos.
2890 * pt.c (instantiate_class_template): Likewise.
2891 * tree.c (reverse_path): Remove 'copy' parm; always make a
2892 temporary copy.
2893 * class.c (build_vbase_path): Just call it.
2894 * search.c (compute_access): Likewise. Don't re-reverse.
2895
2896 1998-08-27 Mark Mitchell <mark@markmitchell.com>
2897
2898 * class.c (build_vbase_path): Use reverse_path.
2899 (finish_base_struct): Move warnings for inaccessible bases to
2900 layout_basetypes.
2901 (modify_one_vtable): Remove check of TREE_USED (binfo).
2902 (fixup_vtable_deltas1): Likewise.
2903 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
2904 (xref_tag): Remove binfos parameter.
2905 (make_binfo): Remove chain parameter.
2906 (reverse_path): Add copy parameter.
2907 * decl.c (init_decl_processing): Change calls to xref_tag.
2908 (xref_tag): Remove binfos parameter.
2909 (xref_basetypes): Change calls to make_binfo.
2910 * decl2.c (grok_x_components): Change calls to xref_tag.
2911 (handle_class_head): Likewise.
2912 * friend.c (do_friend): Likewise.
2913 * lex.c (make_lang_type): Change calls to make_binfo.
2914 * parse.y (structsp): Change calls to xref_tag.
2915 (named_complex_class_head_sans_basetype): Likewise.
2916 (named_class_head): Likewise.
2917 * rtti.c (init_rtti_processing): Likewise.
2918 * search.c (compute_access): Change calls to reverse_path.
2919 (dfs_get_vbase_types): Change calls to make_binfo.
2920 (get_vbase_types): Remove dead code.
2921 * tree.c (unshare_base_binfos): Change calls to make_binfo.
2922 (layout_basetypes): Warn here about inaccessible bases.
2923 (make_binfo): Remove chain parameter.
2924 (reverse_path): Add copy parameter.
2925
2926 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
2927
2928 * class.c: #if 0 complete_type_p.
2929 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
2930 * method.c (process_overload_item): Likewise.
2931 * typeck.c (comp_target_types): Likewise.
2932
2933 Stop sharing binfos for indirect virtual bases.
2934 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
2935 (layout_basetypes): Likewise.
2936 (unshare_base_binfos): Copy vbases, too.
2937 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
2938 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
2939 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
2940 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
2941 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
2942 reference to BINFO_VIA_PUBLIC.
2943 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
2944 (push_class_decls): Use them.
2945 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
2946 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
2947
2948 1998-08-27 Mark Mitchell <mark@markmitchell.com>
2949
2950 * decl.c (build_enumerator): Set DECL_CONTEXT for the
2951 CONST_DECLs.
2952
2953 1998-08-26 Mark Mitchell <mark@markmitchell.com>
2954
2955 * cp-tree.h (finish_enum): Change prototype.
2956 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
2957 VALUES parameter. Don't try to compute mins/maxs if
2958 processing_template_decl.
2959 * parse.y (structsp): Use new calling sequence for finish_enum.
2960 * pt.c (tsubst_enum): Likewise. Take the new type as input.
2961 (lookup_template_class): Remove unused variables. Tweak.
2962 Register enums on instantiation list before substituting
2963 enumeration constants.
2964 (tsubst_decl): Remove unused variables.
2965 (regenerate_decl_from_template): Likewise.
2966
2967 * decl.c (duplicate_decls): Don't obliterate the
2968 DECL_TEMPLATE_INFO for a template if we're not replacing it with
2969 anything.
2970
2971 * lex.c (do_identifier): Fix typo in comment.
2972
2973 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2974
2975 * errfn.c: Remove stdarg.h/varargs.h.
2976 * tree.c: Likewise.
2977
2978 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
2979
2980 * pt.c (tsubst_copy): Only do typename overloading on an
2981 IDENTIFIER_NODE that happens to look like a typename if it actually
2982 has a type for us to use.
2983
2984 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
2985
2986 * typeck.c (comp_cv_target_types): Split out...
2987 (comp_target_types): From here. Don't allow cv-qual changes under
2988 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
2989 (build_ptrmemfunc): Pass 1 to nptrs.
2990 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2991
2992 1998-08-25 Mark Mitchell <mark@markmitchell.com>
2993
2994 * search.c (dependent_base_p): Don't compare a binfo to
2995 current_class_type; use the TREE_TYPE of the binfo instead.
2996
2997 * cp-tree.h (CLASS_TYPE_P): Revise definition.
2998
2999 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
3000
3001 * decl.c (duplicate_decls): Don't complain about different
3002 exceptions from an internal decl even if pedantic.
3003
3004 * typeck.c (convert_for_assignment): Converting from pm of vbase
3005 to derived is an error, not a sorry.
3006
3007 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
3008 * class.c (fixed_type_or_null): Rename from
3009 resolves_to_fixed_type_p. Return the dynamic type of the
3010 expression, if fixed, or null.
3011 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
3012 does not match the static type.
3013 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
3014 resolves_to_fixed_type_p again.
3015
3016 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3017
3018 * pt.c (tsubst_decl): Move special case code for dealing with
3019 tricky friend templates here from ...
3020 (regenerate_decl_from_template): Here.
3021
3022 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3023
3024 * decl.c (start_decl): Remove redundant linkage check.
3025
3026 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
3027
3028 * typeck.c (c_expand_return): Handle the case that valtype
3029 is wider than the functions return type.
3030
3031 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3032
3033 * cp-tree.h (CLASS_TYPE_P): New macro.
3034 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
3035 * pt.c (process_template_parm): Undo previous change.
3036
3037 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
3038
3039 * cp-tree.h: Declare.
3040 * pt.c (decl_template_parm_p): New function.
3041 * decl.c (pushdecl): Check decls for redeclaring template parms.
3042 (xref_tag): Make redeclaration an error, print decl.
3043 * decl2.c (grokfield): Check field_decls for redeclaration as well.
3044
3045 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3046
3047 * parse.y (primary): Fix up the type of string constants.
3048
3049 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3050
3051 * typeck.c (convert_for_initialization): Move check for odd uses
3052 of NULL to avoid duplicate warnings.
3053
3054 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3055
3056 * tree.c (lvalue_type): Fix for arrays.
3057 * typeck.c (string_conv_p): New fn.
3058 (convert_for_assignment): Use it.
3059 (build_unary_op): Use lvalue_type.
3060 * call.c (standard_conversion, convert_like): Use string_conv_p.
3061 (add_function_candidate): Use lvalue_type.
3062 * cvt.c (convert_to_reference): Likewise.
3063 * decl2.c (lang_decode_option): Ignore -traditional.
3064 * decl.c (init_decl_processing): flag_writable_strings inhibits
3065 flag_const_strings.
3066
3067 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
3068
3069 * lang-options.h (lang_options): Add fconst-strings to the list
3070 of valid options.
3071 * decl2.c (lang_f_options, lang_decode_option): Likewise.
3072
3073 1998-08-24 Nathan Sidwell <nathan@acm.org>
3074
3075 * lex.c (real_yylex): Don't warn about long long constants if
3076 we're allowing long long.
3077
3078 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3079
3080 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
3081 accessing bindings directly.
3082
3083 * search.c (my_tree_cons): Reimplement.
3084
3085 * lang-specs.h: Remove __HONOR_STD.
3086 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
3087
3088 1998-08-23 Mark Mitchell <mark@markmitchell.com>
3089
3090 * decl.c (grokdeclarator): Complain about in-class initialization
3091 of aggregates and/or references.
3092 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
3093 TEMPLATE_TYPE_PARMs.
3094
3095 * decl2.c (grok_array_decl): Add comment.
3096 (mark_used): Don't instantiate an explicit instantiation.
3097 * friend.c (make_friend_class): Remove bogus comment. Fix check
3098 for partial specializations.
3099 * pt.c (check_explicit_specialization): Don't
3100 SET_DECL_EXPLICIT_INSTANTIATION here.
3101 (mark_decl_instantiated): Or here.
3102 (do_decl_instantiation): Do it here, instead. Add checks for
3103 duplicate explicit instantiations, etc. Tidy.
3104 (do_type_instantiation): Likewise.
3105 (instantiate_decl): Improve comments. Complain about explicit
3106 instantiations where no definition is available.
3107
3108 * cp-tree.h (ansi_null_node): Remove.
3109 * call.c (build_over_call): Warn about converting NULL to an
3110 arithmetic type.
3111 * cvt.c (build_expr_type_conversion): Likewise. Use
3112 null_ptr_cst_p instead of expanding it inline.
3113 * decl.c (ansi_null_node): Remove.
3114 (init_decl_processing): Make null_node always have integral type.
3115 * except.c (build_throw): Warn about converting NULL to an
3116 arithmetic type.
3117 * lex.c (init_parse): Remove handling of ansi_null_node.
3118 * pt.c (type_unification_real): Don't convert NULL to void* type.
3119 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
3120 (convert_for_assignment): Warn about converting NULL to an
3121 arithmetic type.
3122 (convert_for_initialization): Likewise.
3123
3124 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3125
3126 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
3127 * pt.c (coerce_template_parms): Use no_linkage_check.
3128 * decl.c (grokvardecl): Likewise.
3129 (grokfndecl): Likewise. Members of anonymous types have no linkage.
3130
3131 * method.c (process_overload_item): Remove useless code.
3132
3133 1998-08-20 Per Bothner <bothner@cygnus.com>
3134
3135 Handle new'ing of Java classes.
3136 * init.c (build_class_classref): New function.
3137 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
3138 constructor does not return this; don't need to exception-protect.
3139
3140 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
3141 * decl2.c (acceptable_java_type): Handle template-derived types.
3142
3143 1998-08-20 Per Bothner <bothner@cygnus.com>
3144
3145 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
3146
3147 1998-08-20 Mark Mitchell <mark@markmitchell.com>
3148
3149 * decl.c (duplicate_decls): Always merge the old and new patterns
3150 for templates, regardless of whether or not the new one has
3151 DECL_INITIAL. Don't throw away specializations. Merge
3152 DECL_SAVED_TREE.
3153 * pt.c (tsubst_decl): Use the right pattern when calculating the
3154 complete args for a new template instance.
3155 (do_decl_instantiation): Fix typo in comment.
3156 (regenerate_decl_from_template): Deal with tricky friend template
3157 case.
3158 (instantiate_decl): Likewise.
3159
3160 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
3161
3162 * init.c (build_builtin_delete_call): Add missing assemble_external
3163 call.
3164
3165 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3166
3167 * parse.y (notype_unqualified_id): Also accept ~A<int>.
3168
3169 1998-08-19 Mark Mitchell <mark@markmitchell.com>
3170
3171 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
3172 arithmetic.
3173 * except.c (build_throw): Warn when NULL is thrown, even with
3174 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
3175 thrown expression.
3176
3177 * cp-tree.h (ansi_null_node): New variable.
3178 * decl.c (ansi_null_node): New variable.
3179 (init_decl_processing): Initialize its type.
3180 * lex.c (init_parse): Initialize its value. Use ansi_null_node
3181 for null_node in non-ANSI mode.
3182 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
3183 place of null_node to avoid spurious errors.
3184
3185 1998-08-17 Mark Mitchell <mark@markmitchell.com>
3186
3187 * cp-tree.h (enter_scope_of): New function.
3188 * parse.y (complex_direct_notype_declarator): Use it.
3189 * semantics.c (enter_scope_of): New function.
3190
3191 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
3192
3193 * decl.c (grokparms): No, here.
3194
3195 * decl.c (grokdeclarator): Catch parm with pointer to array of
3196 unknown bound here...
3197 * method.c (process_overload_item): ...not here.
3198
3199 * gxxint.texi: Remove obsolete documentation of overloading code.
3200
3201 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
3202 * class.c (finish_struct_bits): Likewise.
3203
3204 * tree.c (lvalue_type): Fix for arrays.
3205 * typeck.c (build_unary_op): Use lvalue_type.
3206 * call.c (add_function_candidate): Likewise.
3207 * cvt.c (convert_to_reference): Likewise.
3208
3209 * decl2.c (lang_decode_option): Ignore -traditional.
3210
3211 * init.c (build_offset_ref): Don't mess with error_mark_node.
3212 * lex.c (do_scoped_id): Use cp_error.
3213
3214 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
3215
3216 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
3217
3218 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
3219
3220 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
3221
3222 * cp-tree.h (set_identifier_local_value): Provide prototype.
3223
3224 * decl2.c (do_namespace_alias): Remove unused variables `binding'
3225 and `old'.
3226
3227 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
3228
3229 * Makefile.in: Rename BBISON to BISON so that it can be properly
3230 inherited from the parent makefile.
3231
3232 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
3233
3234 * lang-options.h: Add -finit-priority.
3235 * decl2.c: Likewise. Check flag_init_priority instead of
3236 USE_INIT_PRIORITY.
3237
3238 * decl2.c (setup_initp): New fn.
3239 (start_objects, finish_objects, do_ctors): Handle init_priority.
3240 (do_dtors, finish_file): Likewise.
3241
3242 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
3243
3244 * pt.c (tsubst_copy): Hush warning.
3245
3246 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
3247
3248 1998-08-12 Mark Mitchell <mark@markmitchell.com>
3249
3250 * pt.c (print_template_context): Don't abort when instantiating a
3251 synthesized method.
3252
3253 * decl.c (grokdeclarator): Issue errors on namespace qualified
3254 declarators in parameter lists or in class scope.
3255
3256 1998-08-09 Mark Mitchell <mark@markmitchell.com>
3257
3258 * pt.c (check_explicit_specialization): Don't abort on bogus
3259 explicit instantiations.
3260
3261 1998-08-07 Mark Mitchell <mark@markmitchell.com>
3262
3263 * typeck.c (require_complete_type): Use complete_type_or_else.
3264 (complete_type_or_else): Always return NULL_TREE on failure, as
3265 documented.
3266
3267 * pt.c (tsubst_aggr_type): Prototype.
3268 (tsubst_decl): New function, split out from tsubst. Set
3269 input_filename and lineno as appropriate.
3270 (pop_tinst_level): Restore the file and line number saved in
3271 push_tinst_level.
3272 (instantiate_class_template): Set input_filename and lineno as
3273 appropriate.
3274 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
3275 context for a TYPENAME_TYPE is complete.
3276
3277 * decl2.c (grokbitfield): Issue errors on bitfields declared with
3278 function type.
3279 (do_dtors): As in do_ctors, pretend to be a member of the same
3280 class as a static data member while generating a call to its
3281 destructor.
3282
3283 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
3284 conversions, even in complex virtual base class hierarchies.
3285
3286 1998-08-06 Mark Mitchell <mark@markmitchell.com>
3287
3288 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
3289 (TYPE_TEMPLATE_INFO): Likewise.
3290 (SET_TYPE_TEMPLATE_INFO): Likewise.
3291 (ENUM_TI_TEMPLATE): Likewise.
3292 (ENUM_TI_ARGS): Likewise.
3293 (lookup_nested_type_by_name): Remove.
3294 * decl.c (maybe_process_template_type_declaration): Handle enums.
3295 (start_enum): Don't check for primary-template enum declarations
3296 here.
3297 (finish_enum): Clean up, document. Make sure template enum
3298 constants get the correct type.
3299 (build_enumerator): Copy initializers for template enumerations,
3300 too.
3301 (grok_enum_decls): Document.
3302 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
3303 better. Build LOOKUP_EXPRs for local variables, even if they are
3304 TREE_PERMANENT.
3305 * pt.c (tsubst_enum): Remove field_chain parameter.
3306 (template_class_depth): Include the depth of surrounding function
3307 contexts.
3308 (push_template_decl): Check for primary-template enum declarations
3309 here. Deal with enumeration templates.
3310 (lookup_template_class): Likewise.
3311 (for_each_template_parm): Likewise.
3312 (instantiate_class_template): Don't call tsubst_enum directly,
3313 call tsubst instead, to instantiate enums. Deal with all
3314 field_chain issues here, not in tsubst_enum.
3315 (lookup_nested_type_by_name): Remove.
3316 (tsubst_aggr_type): Revise handling of enumeration types.
3317 (tsubst): Likewise.
3318 (tsubst_copy): Likewise.
3319 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
3320
3321 1998-08-04 Mark Mitchell <mark@markmitchell.com>
3322
3323 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
3324 uses template parameters.
3325 * method.c (build_template_parm_names): Use the full set of
3326 template arguments for tsubst'ing.
3327 (build_overload_identifier): Pass the full set of template
3328 arguments to build_template_parm_names, not just the
3329 innermost_args.
3330 * pt.c (TMPL_ARGS_DEPTH): Define using
3331 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
3332 (NUM_TMPL_ARGS): New macro.
3333 (add_outermost_template_args): Deal with the case where the outer
3334 args will be completely discarded.
3335 (coerce_template_parms): Use the full set of template arguments
3336 for tsubst'ing. Simplify. Add some asserts. Improve
3337 error messages.
3338 (lookup_template_class): Pass the full set of template arguments
3339 to coerce_template_parms.
3340 (tsubst): Add assertion.
3341 (do_type_instantiation): Don't instantiate member template
3342 classes.
3343
3344 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
3345 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
3346
3347 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
3348
3349 * method.c (set_mangled_name_for_decl): Change return type to void.
3350
3351 * decl.c (lookup_name_real): A namespace-level decl takes priority
3352 over implicit typename. Avoid doing the same lookup twice.
3353
3354 * search.c (dependent_base_p): New fn.
3355 (dfs_pushdecls, dfs_compress_decls): Use it.
3356
3357 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
3358 virtual functions if the type doesn't have any.
3359
3360 1998-08-03 Mark Mitchell <mark@markmitchell.com>
3361
3362 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
3363 uses template parameters.
3364
3365 1998-08-02 Mark Mitchell <mark@markmitchell.com>
3366
3367 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
3368 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
3369 * lex.c (do_identifier): Don't use a second argument, or a type,
3370 when building LOOKUP_EXPRs.
3371 (do_identifier): Likewise.
3372 (do_scoped_id): Likewise.
3373 * method.c (hack_identifier): Improve error message.
3374 * pt.c (lookup_template_function): Don't needlessly call
3375 copy_to_permanent or build_min.
3376 (tsubst_copy): Remove #if 0'd code. Tsubst into LOOKUP_EXPRs if
3377 necessary.
3378 (do_decl_instantiation): Improve error message.
3379 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
3380 (build_min): Copy the type to the permanent obstack, too.
3381
3382 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
3383
3384 * init.c (init_init_processing): Remove BI* handling.
3385 (build_builtin_call): Remove.
3386 (build_builtin_delete_call): New fn.
3387 (build_delete): Use it.
3388
3389 1998-07-31 Mark Mitchell <mark@markmitchell.com>
3390
3391 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
3392 (maybe_check_template_type): New function.
3393 * decl.c (maybe_process_template_type_declaration): New function,
3394 split out from pushtag Call maybe_check_template_type.
3395 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
3396 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
3397 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
3398 * pt.c (template_class_depth_real): Generalization of ...
3399 (template_class_depth): Use it.
3400 (register_specialization): Use duplicate_decls for duplicate
3401 declarations of specializations.
3402 (maybe_check_template_type): New function.
3403 (push_template_decl_real): Fix comment.
3404 (convert_nontype_argument): Likewise.
3405 (lookup_template_class): Likewise. Avoid an infinite loop on
3406 erroneous code.
3407 (tsubst_friend_function): Fix comment.
3408 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
3409 an IDENTIFIER_NODE.
3410 * semantics.c (begin_function_definition): Use
3411 reset_specialization to note that template headers don't apply
3412 directly to declarations after the opening curly for a function.
3413
3414 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
3415
3416 * decl.c (push_overloaded_decl): Use current_namespace instead of
3417 DECL_CONTEXT (decl) to determine where we go.
3418
3419 * decl.c (lookup_name_real): Fix typo.
3420
3421 1998-07-28 Mark Mitchell <mark@markmitchell.com>
3422
3423 * friend.c (is_friend): Be lenient with member functions to deal
3424 with nested friends.
3425
3426 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
3427
3428 * class.c (finish_struct_1): Convert integer_zero_node to
3429 ssizetype before passing it to set_rtti_entry.
3430 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
3431 of any size to a pointer.
3432
3433 1998-07-27 Mark Mitchell <mark@markmitchell.com>
3434
3435 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
3436 (build_template_decl_overload): Remove.
3437 (set_mangled_name_for_decl): New function.
3438 (innermost_args): Remove is_spec parameter.
3439 (most_specialized, most_specialized_class): Remove declarations.
3440 (lookup_template_class): Add entering_scope parameter.
3441 (maybe_process_partial_specialization): New function.
3442 (finish_template_decl): Likewise.
3443 (finish_template_type): Likewise.
3444 * class.c (finish_struct): Clean up processing of member template
3445 specializations.
3446 * decl.c (pushtag): Fix formatting.
3447 (lookup_tag): Improve handling of pseudo-global levels.
3448 (make_typename_type): Adjust call to lookup_template_class.
3449 (shadow_tag): Use maybe_process_partial_specialization.
3450 (xref_tag): Improve handling of member friends.
3451 (start_function): Call push_nested_class before
3452 push_template_decl. Don't call push_template_decl for
3453 specializations.
3454 * decl2.c (grok_x_components): Don't call xref_tag for
3455 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
3456 (grokclassfn): Use set_mangled_name_for_decl.
3457 (arg_assoc_class): Adjust call to innermost_args.
3458 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
3459 * error.c (dump_function_name): Improve printing of template
3460 function names.
3461 * friend.c (is_friend): Don't compare types of decls to determine
3462 friendship, unless flag_guiding_decls.
3463 (make_friend_class): Partial specializations cannot be friends.
3464 (do_friend): Use set_mangled_name_for_decl. Call
3465 push_template_decl_real instead of push_template_decl.
3466 * method.c (build_decl_overload_real): Remove prototype. Give it
3467 external linkage.
3468 (build_overload_identififer): Adjust call to innermost_args.
3469 (build_template_decl_overload): Remove.
3470 (set_mangled_name_for_decl): New function.
3471 * parse.y (.finish_template_type): New non-terminal.
3472 (template_def): Use finish_template_decl. Use template_extdef
3473 instead of extdef.
3474 (template_extdef, template_datadef): New non-terminals, containing
3475 only those rules for things which can be templates.
3476 (datadef): Tidy.
3477 (template_type, self_template_type): Use .finish_template_type.
3478 (named_class_head): Use maybe_process_partial_specialization.
3479 * pt.c (mangle_class_name_for_template): Remove context parameter.
3480 (get_class_bindings): Remove outer_args parameter.
3481 (complete_template_args): Remove.
3482 (add_outermost_template_args): New function.
3483 (register_specialization): Return the specialization.
3484 (unregister_specialization): New function.
3485 (tsubst_template_parms): Likewise.
3486 (most_specialized, most_specialized_class): Prototype here as
3487 static.
3488 (original_template): Rename to most_general_template.
3489 (tsubst_template_parms): New function.
3490 (set_mangled_name_for_template_decl): Likewise.
3491 (TMPL_ARGS_DEPTH): New macro.
3492 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
3493 (TMPL_ARGS_LEVEL): New macro.
3494 (SET_TMPL_ARGS_LEVEL): Likewise.
3495 (TMPL_ARG): Likewise.
3496 (SET_TMPL_ARG): Likewise.
3497 (TMPL_ARGS_DEPTH): Likewise.
3498 (finish_member_template_decl): Use finish_template_decl.
3499 (maybe_process_partial_specialization): New function, split out
3500 from tsubst.
3501 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
3502 (maybe_begin_member_template_processing): Use new macros.
3503 (is_member_template): Likewise.
3504 (is_member_template_class): Likewise.
3505 (add_to_template_args): Likewise. Deal with multiple levels of
3506 args.
3507 (maybe_process_partial_specialization): New function.
3508 (retrieve_specialization): Add consistency check.
3509 (determine_specialization): Return full argument list.
3510 (check_explicit_specialization): Tweak friend handling. Use full
3511 argument lists. Simplify.
3512 (current_template_args): Use new macros.
3513 (push_template_decl_real): Change ill-named mainargs to specargs.
3514 Check that a partial specialization actually specializes at least
3515 one parameter. Improve friend handling. Modify for full
3516 template arguments.
3517 (classtype_mangled_name): Don't mangle the names of
3518 specializations.
3519 (lookup_template_class): Add entering_scope parameter. Use it to
3520 avoid finding a template type when an instantiation is required.
3521 Simplify. Use full template arguments.
3522 (tsubst_friend_function): Use unregister_specialization. Use new
3523 macros. Use full template arguments.
3524 (tsubst_friend_class): Substitute, using tsubst_template_parms,
3525 into the template parameters before passing them to
3526 redeclare_class_template.
3527 (instantiate_class_template): Simplify. Use full template
3528 arguments. Adjust calls to get_class_bindings. Use
3529 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
3530 (innermost_args): Use new macros.
3531 (tsubst_aggr_type): New function, split out from tsubst.
3532 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
3533 conventions for lookup_tmeplate_class. Refine handling of partial
3534 instantiations. Remove calls to complete_template_args.
3535 Simplify. Add consistency checks. Use set_mangled_name_for_decl
3536 and set_mangled_name_for_template_decl.
3537 (tsubst_copy): Use tsubst_aggr_type.
3538 (instantiate_template): Use full template arguments.
3539 (more_specialized): Improve formatting.
3540 (more_specialized_class): Adjust calls to get_class_bindings.
3541 (get_bindings_real): Don't call complete_template_args.
3542 (most_specialized): Don't overwrite input; create a new list.
3543 (most_specialized_class): Use most_general_template.
3544 (regenerate_decl_from_template): Use unregister_specialization.
3545 Use full template arguments.
3546 (instantiate_decl): Use full template arguments.
3547 (set_mangled_name_for_template_decl): New function.
3548 * semantics.c (begin_class_definition): Use
3549 maybe_process_partial_specialization.
3550 (finish_member_class_template): New function.
3551 (finish_template_decl): Likewise.
3552 (finish_template_type): Likewise.
3553 (typeck.c): Don't crash after issuing a compiler_error.
3554 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
3555
3556 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
3557
3558 * typeck2.c (build_functional_cast): Handle default-initialization.
3559
3560 * call.c (build_over_call): Pass 1 to popclass.
3561
3562 * parse.y (direct_notype_declarator): Add precedence declaration
3563 to notype_unqualified_id case.
3564 * Makefile.in (EXPECT): Adjust.
3565
3566 * tree.c (ovl_member): Fix for single function in OVL.
3567
3568 1998-07-27 Dave Brolley <brolley@cygnus.com>
3569
3570 * c-lex.c (yylex): Fix boundary conditions in character literal and
3571 string literal loops.
3572
3573 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
3574
3575 * decl.c (lookup_name_real): OK, do return the from_obj value
3576 unless got_object depends on template parms.
3577
3578 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
3579
3580 * pt.c (coerce_template_parms): Also complain about local enums.
3581
3582 * cp-tree.h: Add prototype for set_identifier_local_value.
3583 * decl.c (set_identifier_local_value_with_scope): Make static,
3584 prototype.
3585 * search.c (covariant_return_p): Likewise.
3586 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
3587
3588 * call.c (build_method_call): Only pull out the type of a destructor
3589 if it's a template type parm.
3590 * decl.c (lookup_name_real): Never return the from_obj value.
3591
3592 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
3593
3594 * except.c (process_start_catch_block_old): Call start_decl_1 for
3595 catch parm.
3596 * decl.c (start_decl_1): Avoid duplicate error.
3597
3598 * init.c (expand_default_init): Only perform the initialization if
3599 it will do something.
3600
3601 1998-07-23 H.J. Lu (hjl@gnu.org)
3602
3603 * parse.y (base_class): Check for invalid base class.
3604
3605 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
3606
3607 * decl2.c (import_export_template): Fold in...
3608 (import_export_class): ...to here. Handle dllimport/export.
3609
3610 * class.c (build_vtable): Pass at_eof to import_export_vtable.
3611 (prepare_fresh_vtable): Likewise.
3612 * decl2.c (import_export_class): Split out...
3613 (finish_prevtable_vardecl): From here.
3614 * class.c (finish_struct_1): Call import_export_class if at_eof.
3615
3616 * decl.c (start_function): #if 0 mysterious code I wrote and have
3617 forgotten why.
3618 * rtti.c (get_tinfo_fn): If this is for a class type, set
3619 DECL_CONTEXT.
3620
3621 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
3622
3623 * inc/exception: Change terminate and unexpected to ().
3624
3625 * parse.y (named_class_head_sans_basetype_defn): A
3626 named_class_head_sans_basetype followed by '{' or ':' is a defn.
3627
3628 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
3629
3630 * tree.c (canonical_type_variant): New fn to handle arrays.
3631 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
3632 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
3633 * method.c (process_overload_item): Use build_overload_value for
3634 arrays.
3635
3636 1998-07-20 Dave Brolley <brolley@cygnus.com>
3637
3638 * lex.c (mbchar.h): #include it.
3639 (GET_ENVIRONMENT): New macro.
3640 (init_parse): Set character set based on LANG environment variable.
3641 (real_yylex): Handle multibyte characters in character literals.
3642 (real_yylex): Handle multibyte characters in string literals.
3643
3644 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
3645
3646 * lex.c (do_identifier): Look for class value even if we don't
3647 have a global value. Do implicit declaration if parsing is 2.
3648 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
3649 lookup.
3650
3651 1998-07-19 Mark Mitchell <mark@markmitchell.com>
3652
3653 * decl.c (pushtag): Revert previous change.
3654 * pt.c (lookup_template_class): Don't put out debugging
3655 information for types that use template parameters.
3656
3657 * decl.c (pushtag): Don't put out debugging information for
3658 compiler-generated typedefs.
3659
3660 * error.c (dump_type_real): Don't crash when presented with
3661 intQI_type_node or the like.
3662
3663 * semantics.c (finish_translation_unit): Fix spelling error in
3664 comment.
3665
3666 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
3667
3668 * decl.c (lookup_name_real): Pull out single function here.
3669 (select_decl): Not here.
3670 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
3671
3672 * decl.c (qualify_lookup): Tweak again.
3673
3674 * pt.c (lookup_template_class): Don't mess with the context of the
3675 instantiation.
3676 * decl2.c (current_decl_namespace): Remove special handling for
3677 templates.
3678
3679 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
3680 a member template specialization.
3681
3682 * tree.c (ovl_member): Use decls_match to compare functions.
3683 * decl.c (decls_match): Check the context of a function.
3684
3685 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
3686 in Koenig lookup support rules.
3687 * semantics.c (finish_call_expr): Handle the new cases.
3688
3689 * typeck.c (build_x_function_call): Handle overloaded methods.
3690
3691 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
3692
3693 1998-07-16 Mark Mitchell <mark@markmitchell.com>
3694
3695 * semantics.c (finish_object_call_expr): Revert previous change.
3696 * call.c (build_new_method_call): Likewise. Instead, convert
3697 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
3698
3699 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
3700
3701 * decl.c (qualify_lookup): Handle templates.
3702
3703 * decl2.c (do_using_directive): Don't pass ancestor.
3704 * decl.c (push_using_directive): Calculate ancestor.
3705
3706 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
3707 * decl.c (pushdecl): Move type shadowing handling from here...
3708 (duplicate_decls): ...to here.
3709 * decl.c (set_identifier_local_value_with_scope): New fn.
3710 (pushdecl): Use it.
3711 (set_identifier_local_value, lookup_type_current_level): New fns.
3712 * decl2.c (do_local_using_decl): Handle types and binding level
3713 stuff properly.
3714
3715 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
3716 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
3717 (lookup_namespace_name): Likewise.
3718 * typeck.c (build_unary_op): Not here anymore.
3719
3720 * decl2.c (do_class_using_decl): Make sure we get an identifier.
3721 * class.c (handle_using_decl): Ignore TYPE_DECLs.
3722
3723 * decl.c (qualify_lookup): New fn.
3724 (lookup_name_real): Use it.
3725
3726 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
3727
3728 * decl2.c (add_using_namespace): When directly using a namespace
3729 that was indirect before, promote it.
3730
3731 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
3732 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
3733 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
3734 * decl.c (select_decl): Replace two flag parameters by one.
3735 (unqualified_namespace_lookup): Likewise, pass flag.
3736 (lookup_flags): New function.
3737 (lookup_name_real): Compute flags, pass them.
3738 (lookup_namespace_name): Call with zero-flag.
3739 * decl2.c (ambiguous_decl): Add flag parameter, complain only
3740 according to flags.
3741 (lookup_using_namespace, qualified_lookup_using_namespace):
3742 Add flag parameter, pass them through.
3743 * lex.c (do_scoped_id): Call with zero-flag.
3744
3745 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
3746
3747 * typeck.c (convert_for_assignment): Use comptypes.
3748
3749 1998-07-16 Mark Mitchell <mark@markmitchell.com>
3750
3751 * semantics.c (finish_object_call_expr): Move test for the
3752 function called being a TYPE_DECL to ...
3753 * call.c (build_new_method_call): Here.
3754
3755 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
3756
3757 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
3758 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
3759
3760 * lex.c (looking_for_typename): Don't initialize.
3761
3762 * decl2.c (ambiguous_decl): Clarify error message.
3763
3764 * decl.c (push_using_directive): Iterate over namespaces used
3765 indirectly.
3766
3767 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3768
3769 * decl2.c (add_using_namespace): Iterate over namespaces used
3770 indirectly.
3771
3772 * decl.c (lookup_name_real): Accept namespace aliases as locals.
3773 (cat_namespace_levels): Ignore aliases.
3774 (duplicate_decls): Ignore duplicate aliases.
3775 * decl2.c (do_namespace_alias): Process block level namespace
3776 aliases. Store alias with pushdecl. Remove odr errors.
3777 * parse.y (namespace_alias): New non-terminal.
3778 (extdef): Use it.
3779
3780 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
3781
3782 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
3783 Handle TEMPLATE_TYPE_PARM.
3784 (arg_assoc): Rewrite.
3785
3786 * pt.c (complete_template_args): Don't look at the context unless
3787 we have to.
3788
3789 * method.c (build_decl_overload_real): Fix namespace handling.
3790
3791 * typeck.c (build_unary_op): Extract a lone function from an
3792 OVERLOAD.
3793
3794 * call.c (build_scoped_method_call): Handle getting a namespace
3795 for basetype in a destructor call.
3796 (check_dtor_name): Handle enums.
3797
3798 * parse.y (using_directive): New nonterminal.
3799 (extdef, simple_stmt): Use it.
3800
3801 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3802
3803 * decl2.c (add_function): Move error message ...
3804 (arg_assoc_namespace): ... from here.
3805
3806 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
3807
3808 * parse.y (namespace_qualifier): Fix multiple level handling.
3809 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
3810 (arg_assoc): Don't skip the first argument of a function.
3811
3812 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
3813
3814 * search.c (my_tree_cons): Clean up.
3815
3816 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
3817
3818 * call.c (joust): Don't warn about "confusing" conversions to the
3819 same type.
3820
3821 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3822
3823 * class.c (push_nested_class): Complain about namespaces.
3824 * decl.c (start_decl): Enter the object's namespace.
3825 (cp_finish_decl): Leave it.
3826 (grokdeclarator): Likewise.
3827 * decl2.c (check_decl_namespace): New function.
3828 (finish_file): Call it.
3829 * parse.y (complex_direct_notype_declarator): Set complexity
3830 of namespace-qualified ids to -1, enter the namespace.
3831
3832 * method.c (build_template_decl_overload): Expect _DECL as first
3833 parameter. Put context temporarily into current_namespace.
3834 * pt.c (check_explicit_specialization): Change caller.
3835 (tsubst): Likewise.
3836
3837 * init.c (build_offset_ref): Call mark_used and
3838 convert_from_reference for namespace members.
3839
3840 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
3841
3842 * search.c (my_tree_cons): The bitfield is at index 2.
3843
3844 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
3845
3846 * lang-options.h: Format changed to work with new --help support
3847 in gcc/toplev.c
3848
3849 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3850
3851 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
3852 Do Koenig lookup in CALL_EXPR.
3853 (arg_assoc): Handle error_mark.
3854 * lex.c (is_global): New function.
3855 (do_identifier): Expect arguments for Koenig lookup.
3856 * parse.y (primary): Add rules for calls of unqualified function calls.
3857 (do_id): Change call of do_identifier.
3858 * pt.c (finish_stmt_expr): Likewise.
3859 * semantics.c (finish_id_expr): Likewise.
3860 (finish_call_expr): Add integer parameter to indicate
3861 argument-dependent lookup.
3862
3863 * decl.c (struct binding_level): New field using_directives.
3864 (push_using_decl): Not sorry anymore.
3865 (push_using_directive): New function.
3866 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
3867 (unqualified_namespace_lookup): New function, code from ...
3868 (lookup_name_real): ... here.
3869 * decl2.c (lookup_using_namespace): Pass using list instead of
3870 initial scope.
3871 (validate_nonmember_using_decl): New function.
3872 (do_nonmember_using_decl): New function.
3873 (do_toplevel_using_decl): Use them.
3874 (do_local_using_decl): New function.
3875 (do_using_directive): Support block-level directives.
3876 * parse.y (simple_stmt): Support using declarations and
3877 directives.
3878 (namespace_qualifier, namespace_using_decl): New non-terminals.
3879
3880 * xref.c (classname): New function.
3881 (GNU_xref_hier): Change class and base parameters to tree.
3882 * decl.c (xref_baseypes): Change caller.
3883 * friend.c (make_friend_class): Likewise.
3884
3885 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3886
3887 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
3888 comparison.
3889
3890 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
3891 template template parameter, record its use.
3892 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
3893 its template arguments if exists.
3894
3895 * pt.c (coerce_template_template_parms): New function equivalent
3896 to coerce_template_parms when IS_TMPL_PARM is true.
3897 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
3898 all callers changed.
3899
3900 (coerce_template_parms): Access ARGLIST properly when creating a
3901 new vector. Only accept implicit TYPE_DECL as valid argument for
3902 a template template parameter when it is a base class of
3903 current_class_type. Don't display error message when COMPLAIN is
3904 false.
3905
3906 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
3907
3908 * repo.c (get_base_filename): Use file_name_nondirectory.
3909 (open_repo_file): Ditto.
3910 * cp-tree.h (file_name_nondirectory): Add prototype.
3911
3912 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
3913
3914 * friend.c (do_friend): Pull the identifier out of declarator.
3915 Use cp_error and friends.
3916 * decl2.c (qualified_lookup_using_namespace): Fix call to
3917 purpose_member.
3918 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
3919 (grokvardecl): Use DECL_CLASS_SCOPE_P.
3920 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
3921 * class.c (warn_hidden): Fix for OVERLOAD.
3922 From grahams@rcp.co.uk:
3923 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
3924 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
3925
3926 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
3927
3928 * g++.1 (-traditional): Remove duplicated documentation.
3929
3930 1998-07-11 Mark Mitchell <mark@markmitchell.com>
3931
3932 * method.c (flush_repeats): Add nrepeats parameter.
3933 (issue_nrepeats): Likewise.
3934 (is_back_referenceable_type): New function. Don't back-reference
3935 TEMPLATE_TYPE_PARMs as well as simple types like integers.
3936 (build_mangled_name_for_type): Likewise.
3937 (build_mangled_name_for_type_with_Gcode): Likewise.
3938 (lasttype): Remove.
3939 (nrepeats): Likewise.
3940 (Nrepeats): Likewise.
3941 (start_squangling): Don't clear the variables removed above.
3942 (end_squangling): Likewise.
3943 (flush_repeats): Tidy. Use nrepeats parameter rather than
3944 Nrepeats global.
3945 (issue_nrepeats): Likewise, but with nrepeats global. Use
3946 is_backreferenceable_type.
3947 (build_overload_nested_name): Tidy. Add comment. Use
3948 build_mangled_name_for_type.
3949 (build_underscore_int): Comment.
3950 (build_overload_scope_ref): Use build_mangled_name_for_type.
3951 (build_overload_int): Likewise.
3952 (build_template_template_parm_names): Tidy.
3953 (build_template_parm_names): Use build_mangled_name_for_type.
3954 (build_overload_identifier): Add comments.
3955 (build_mangled_name_for_type_with_Gcode): Split out from
3956 build_mangled_name.
3957 (build_mangled_name_for_type): Use it.
3958 (build_mangled_name): Rework to use build_mangled_name_for_type
3959 and to not use global nrepeats/Nrepeats. Tidy.
3960 (process_modifiers): Tidy.
3961 (check_btype): Use is_backreferenceable_type. Add comment.
3962 Rename `node' to `type'.
3963 (process_overload_item): Set numeric_output_need_bar here.
3964 Use build_mangled_name_for_type. Tidy.
3965 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
3966 build_mangled_name_for_type.
3967
3968 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
3969 for TYPE_DECLs.
3970
3971 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
3972
3973 * cp-tree.h (warn_long_long): Define.
3974 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
3975 warning "ANSI C++ does not support `long long'".
3976 * decl2.c (warn_long_long): Define.
3977 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
3978
3979 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
3980
3981 * decl.c (xref_tag): Handle attributes between 'class' and name.
3982 * parse.y (aggr): Likewise.
3983 * semantics.c (finish_class_definition): Likewise.
3984 * Makefile.in (EXPECTED): Adjust.
3985
3986 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
3987 * decl2.c: Define them.
3988 (lang_decode_option): Handle them.
3989 * lang-options.h: Add -foptional-diags.
3990 * class.c (finish_struct): Don't complain about multiple meanings of
3991 name if -fno-optional-diags.
3992 * decl.c (pushdecl_class_level): Likewise.
3993 * lex.c (real_yylex): Check warn_multichar.
3994
3995 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
3996
3997 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
3998
3999 * tree.c (make_binfo): Fix length.
4000
4001 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
4002
4003 * decl2.c (lang_decode_option): Remove warn_template_debugging.
4004 * lang-options.h: Ditto.
4005
4006 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4007
4008 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
4009 (process_start_catch_block): Likewise for variables
4010 `false_label_rtx', `call_rtx' and `return_value_rtx'.
4011
4012 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
4013
4014 * tree.c (build_srcloc): Make sure we allocate this node on the
4015 permanent obstack.
4016
4017 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
4018
4019 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
4020 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
4021 (lang_specific_driver): Only add -lm automatically if need_math is
4022 nonzero.
4023
4024 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
4025
4026 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
4027
4028 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4029
4030 * Makefile.in (EXPR_H): New dependency variable.
4031 (decl2.o): Depend on $(EXPR_H).
4032 (typeck.o): Likewise.
4033 (init.o): Likewise.
4034 (expr.o): Likewise.
4035
4036 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
4037
4038 * decl.c (start_enum): Put local enums on permanent_obstack.
4039
4040 1998-06-25 Mark Mitchell <mark@markmitchell.com>
4041
4042 * cp-tree.h (c_get_alias_set): Declare.
4043 * decl.c (init_decl_processing): Set lang_get_alias_set.
4044
4045 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
4046
4047 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
4048 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
4049 flag for all function decls which are in the exception table.
4050 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
4051 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
4052 code is emitted for any referenced rtti function.
4053
4054 1998-06-25 Dave Brolley <brolley@cygnus.com>
4055
4056 * lang-specs.h: Use new | syntax to eliminate
4057 string concatenation.
4058
4059 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
4060
4061 * cp-tree.h (CP_DECL_CONTEXT): New macro.
4062 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
4063 * method.c (build_overload_nested_name): Likewise.
4064 * sig.c (build_signature_pointer_or_reference_type): Don't set
4065 DECL_CONTEXT.
4066
4067 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4068
4069 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
4070 * cp-tree.h (FROB_CONTEXT): New macro.
4071 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
4072 * decl.c (namespace_binding): Replace NULL_TREE with
4073 global_namespace.
4074 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
4075 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
4076 Likewise.
4077 * decl.c (pushtag): Use FROB_CONTEXT.
4078 (pushdecl, make_typename_type, define_function, grokdeclarator):
4079 Likewise.
4080 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
4081 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
4082 Likewise.
4083 * decl2.c (decl_namespace): Return global_namespace if no context.
4084 * method.c (build_overload_nested_name): Expect null as context.
4085 * pt.c (mangle_class_name_for_template): Do nothing for null
4086 contexts.
4087 (lookup_template_class): Allow for null id_context.
4088
4089 1998-06-25 Richard Henderson <rth@cygnus.com>
4090
4091 * method.c (emit_thunk): Set current_function_is_thunk for the
4092 ASM_OUTPUT_MI_THUNK case as well.
4093
4094 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4095
4096 * exception.cc (__cplus_type_matcher): Get a match_info pointer
4097 instead of an exception table entry as a parameter.
4098
4099 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4100
4101 * parse.y (function_try_block): Don't call start_catch_handler.
4102 * except.c (call_eh_info): Remove coerced field from declaration.
4103 (build_eh_type_type_ref): New function to create an address of a
4104 rtti function for the new style exception tables.
4105 (expand_start_catch_block): Split function, this contains the
4106 common part.
4107 (process_start_catch_block_old): New function to perform the rest
4108 of expand_start_catch_block under old style exceptions.
4109 (process_start_catch_block_old): New function to perform the rest
4110 of expand_start_catch_block under new style exceptions.
4111 (expand_end_catch_block): Only pop the false label off the stack under
4112 the old style of exceptions.
4113 * semantics.c (finish_try_block): Don't call start_catch_handler.
4114 * exception.cc (struct cp_eh_info): Add original_value field.
4115 (__cplus_type_matcher): Perform type matching on the original exception
4116 value, and if we have a match, set the current value.
4117 (__cp_push_exception): Set the original expcetion value.
4118
4119 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
4120
4121 * call.c (joust): Fix confusing conversion warning.
4122
4123 * call.c (build_op_delete_call): Add placement parm. Check
4124 LOOKUP_SPECULATIVELY.
4125 * cp-tree.h, decl2.c, init.c: Adjust.
4126 * decl.c (finish_function): Use it.
4127
4128 * pt.c (tsubst): Diagnose creating void fields or variables.
4129
4130 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4131
4132 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
4133
4134 * cp-tree.h (check_dtor_name): Add prototype.
4135
4136 * init.c (expand_member_init): Remove unused variables
4137 `ptr_type_node', `parm' and `rval'.
4138
4139 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
4140 in call to fprintf.
4141 (lang_print_xnode): Likewise.
4142
4143 * typeck2.c (enum_name_string): Cast argument to sprintf to long
4144 and use %ld specifier.
4145
4146 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
4147 specifier in call to fprintf.
4148 (GNU_xref_member): Cast argument to sprintf to int.
4149
4150 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4151
4152 * typeck2.c (pop_init_level): Warn about implicit zero initialization
4153 of struct members.
4154
4155 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4156
4157 * cp-tree.h: Prototype function `check_java_method'.
4158
4159 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4160
4161 * class.c (finish_struct): Make conflicting use of id a pedwarn.
4162 * decl.c (pushdecl_class_level): Likewise.
4163
4164 1998-06-17 Mark Mitchell <mark@markmitchell.com>
4165
4166 * pt.c (convert_nontype_argument): Issue an error when presented
4167 with an integer (real) constant that cannot be simplified to an
4168 INT_CST (REAL_CST).
4169
4170 * cp-tree.h (c_get_alias_set): Remove declaration added in
4171 1998-06-13 change that should never have been checked in.
4172
4173 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4174
4175 * typeck.c (build_binary_op_nodefault): Change % in format strings
4176 to %%.
4177
4178 * decl.c (grokvardecl): Don't build_static_name for decls that
4179 aren't at namespace scope.
4180
4181 * init.c (perform_member_init): Catch default-initialization of
4182 references.
4183
4184 1998-06-17 Mark Mitchell <mark@markmitchell.com>
4185
4186 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
4187
4188 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4189
4190 * method.c (hack_identifier): Complain about getting a namespace
4191 or class template.
4192 * typeck.c (decay_conversion): Remove check for namespaces.
4193 * typeck2.c (incomplete_type_error): Likewise.
4194 * parse.y (template_arg): Add PTYPENAME expansion.
4195
4196 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
4197
4198 * decl.c (grokvardecl): Don't build external assembler names for
4199 TYPENAMEs in other namespaces as there is no declarator.
4200 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
4201 info from DECL_CONTEXT if it is NULL.
4202
4203 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
4204
4205 * call.c (check_dtor_name): Split out.
4206 (build_scoped_method_call): Use it.
4207 (build_method_call): Use it.
4208 * init.c (build_offset_ref): Use it.
4209
4210 * typeck.c (build_static_cast): Fix handling of pointers to members.
4211
4212 * decl.c (finish_function): Just return nothing from a constructor.
4213 * typeck.c (c_expand_return): Complain about returning a void
4214 expression from a destructor.
4215
4216 1998-06-13 Mark Mitchell <mark@markmitchell.com>
4217
4218 * class.c (alter_access): Accept a BINFO explaining how to get
4219 from the entity whose accessed is being altered to the type doing
4220 the altering.
4221 (handle_using_decl): New function containing code split out from ...
4222 (finish_struct_1): Here.
4223
4224 * cp-tree.h (complete_type_or_else): Declare.
4225 * init.c (build_new_1, build_delete): Use it.
4226 * typeck.c (require_complete_type): Use complete_type, rather than
4227 expanding it inline.
4228 (complete_type_or_else): New function.
4229 (build_component_ref): Use it.
4230 (pointer_int_sum): Make sure the type pointed to is complete.
4231 (pointer_diff): Likewise.
4232
4233 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
4234 types.
4235
4236 * search.c (get_matching_virtual): Note that member templates
4237 cannot override virtual functions.
4238
4239 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
4240
4241 * pt.c (check_explicit_specialization): If DECLARATOR turned into
4242 an error_mark_node from lookup_template_function, return the same.
4243 (determine_specialization): Also make sure TEMPLATE_ID isn't an
4244 error_mark_node, before we try to read its operands.
4245 * decl.c (grokdeclarator): If we got an error_mark_node from
4246 check_explicit_specialization, just return it right back.
4247
4248 1998-06-12 Mark Mitchell <mark@markmitchell.com>
4249
4250 * class.c (instantiate_type): Don't treat template-ids that don't
4251 specify any template arguments as equivalent to ordinary
4252 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
4253 pointer-to-members for member templates. Tidy slightly.
4254 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
4255 * init.c (build_offset_ref): Handle template-ids like ordinary
4256 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
4257 offset part of the OFFSET_REF.
4258 * typeck.c (build_unary_op): Change check for unknown types to
4259 look for OFFSET_REFs, not SCOPE_REFs.
4260
4261 1998-06-11 Mark Mitchell <mark@markmitchell.com>
4262
4263 * pt.c (is_member_template_class): New function.
4264 (push_template_decl_real): Use it.
4265
4266 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
4267
4268 * friend.c (do_friend): Add support for nested classes using
4269 member functions of the enclosing class as friends.
4270
4271 1998-06-10 Mark Mitchell <mark@markmitchell.com>
4272
4273 * call.c (convert_default_arg): Make global, not static.
4274 (convert_arg_for_ellipsis): Split out from ...
4275 (build_over_call): Here.
4276 * cp-tree.h (convert_default_arg); Declare.
4277 (convert_arg_to_ellipsis): Likewise.
4278 (do_member_init): Remove.
4279 * init.c (do_member_init): Remove; this code is dead.
4280 (expand_member_init): Remove much of this code; it is dead.
4281 * typeck.c (convert_arguments): Use convert_default_arg and
4282 convert_arg_for_ellipsis, rather than duplicating here.
4283
4284 * call.c (convert_like): Don't fail silently if
4285 build_user_type_conversion fails. Always return error_mark_node
4286 for failure.
4287
4288 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4289
4290 * search.c (covariant_return_p): Complain about ambiguous base.
4291
4292 * typeck.c (build_component_ref): Diagnose ref to nested type.
4293
4294 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
4295
4296 * decl.c (grokparms): Check that INIT isn't an error_mark_node
4297 before giving error about invalid type for default arg.
4298
4299 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4300
4301 * call.c (build_method_call): Fix thinko.
4302
4303 1998-06-10 Dave Brolley <brolley@cygnus.com>
4304
4305 * decl2.c (lang_decode_option): New argc/argv interface.
4306 * cp-tree.h (lang_decode_option): New argc/argv interface.
4307 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
4308 specified for cpplib-enabled compilers.
4309 * lex.c (lang_init): Don't check_newline for cpplib.
4310 (init_parse): Don't initialize cpplib here.
4311
4312 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
4313
4314 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
4315 piece before checking DECL_MUTABLE_P.
4316
4317 1998-06-10 John Carr <jfc@mit.edu>
4318
4319 * tree.c (debug_binfo): Make printf format match arguments.
4320
4321 * error.c (OB_PUTI): Make printf format match arguments.
4322
4323 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4324
4325 * init.c (perform_member_init): Handle default-initialization.
4326
4327 * except.c (build_throw): Handle throwing NULL.
4328
4329 * typeck.c (build_x_function_call): Use resolve_offset_ref.
4330
4331 * search.c (compute_access): Only strip an anonymous union
4332 for a FIELD_DECL.
4333
4334 * call.c (add_builtin_candidates): Tweak.
4335
4336 * cvt.c (build_expr_type_conversion): Restore code for conversion
4337 from class types.
4338 * decl2.c (delete_sanity): Use it. Clean up.
4339
4340 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
4341
4342 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
4343
4344 * typeck.c (c_expand_return): Don't warn about void expressions on
4345 return statements in functions returning void.
4346
4347 1998-06-09 Mark Mitchell <mark@markmitchell.com>
4348
4349 * pt.c (fn_type_unification): Revise documentation. Tidy.
4350 (type_unification): Likewise.
4351
4352 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
4353
4354 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
4355 expand_end_catch.
4356 * parse.y (function_try_block): Rename expand_start_catch, and delete
4357 expand_end_catch.
4358 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
4359 expand_end_catch.
4360
4361 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
4362
4363 * search.c (lookup_member): New fn.
4364 * class.c (finish_struct_1): Use it.
4365 * decl.c (lookup_name_real): Use it.
4366
4367 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4368
4369 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
4370
4371 * cp-tree.h: Add prototype for `maybe_print_template_context' and
4372 `maybe_make_one_only'.
4373
4374 * decl.c (auto_function): Remove unused variable `decl'.
4375
4376 * decl2.c: Include dwarf2out.h and dwarfout.h.
4377
4378 * lex.c: Remove redundant declarations of `set_float_handler' and
4379 `asm_out_file'.
4380
4381 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
4382
4383 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
4384 time flag. Call __cp_eh_info instead of __cp_exception_info.
4385 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
4386 (__cp_exception_info): Return offset into cp_eh_info structure to
4387 match what use to be the start of this structure.
4388 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
4389 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
4390 compile time flag.
4391 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
4392 __cp_eh_info instead of __cp_exception_info.
4393
4394 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
4395
4396 * decl.c (cp_finish_decl): Disable inlining of extern inlines
4397 with static variables.
4398
4399 1998-06-08 Mark Mitchell <mark@markmitchell.com>
4400
4401 * init.c (build_offset_ref): Correct previous change to use build,
4402 not build_min.
4403
4404 1998-06-07 Mark Mitchell <mark@markmitchell.com>
4405
4406 * class.c (instantiate_type): Handle pointer-to-members where the
4407 member is a template.
4408 * init.c (build_offset_ref): Likewise.
4409 * typeck.c (build_unary_op): Likewise.
4410
4411 1998-06-07 Richard Henderson <rth@cygnus.com>
4412
4413 * lex.c (lang_init_options): New function.
4414 (lang_init): Remove flag_exceptions == 2 hack.
4415
4416 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
4417
4418 * search.c (envelope_add_decl): Tweak for implicit typename.
4419
4420 * call.c (joust): Also warn about confusing conversion op/constructor
4421 overload resolution.
4422
4423 * spew.c (yylex): Also return the TYPE_DECL if got_object.
4424 Don't clear got_object after '~'.
4425 * call.c (build_scoped_method_call): Tweak destructor handling.
4426 (build_method_call): Likewise.
4427 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
4428 TYPE_MAIN_VARIANT for destructors.
4429 * semantics.c (finish_object_call_expr): Complain about calling a
4430 TYPE_DECL.
4431
4432 1998-06-05 Per Bothner <bothner@cygnus.com>
4433
4434 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
4435 Define - update needed by gcc.c change.
4436
4437 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
4438
4439 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
4440
4441 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4442
4443 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
4444 * decl.c (lookup_name_real): Add namespaces_only parameter.
4445 If set, return only NAMESPACE_DECLs.
4446 (select_decl): Likewise.
4447 (identifier_type_value): Give additional parameter.
4448 (lookup_name_nonclass): Likewise.
4449 (lookup_name): Likewise.
4450 (find_binding): Skip namespace aliases.
4451 (binding_for_name): Likewise.
4452 (push_namespace): Check for namespace aliases.
4453 (lookup_name_namespace_only): New function.
4454 (begin_only_namespace_names, end_only_namespace_names): New functions.
4455 * decl2.c (set_decl_namespace): Skip namespace aliases.
4456 (do_using_directive): Likewise.
4457 (do_namespace_alias): Produce namespace aliases, fix alias
4458 redeclaration.
4459 * error.c (dump_decl): Support SCOPE_REF.
4460 * parse.y (extdef): Wrap lookup with namespace_only for namespace
4461 aliases and using declarations.
4462
4463 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
4464
4465 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
4466
4467 * error.c (dump_expr): Clean up NEW_EXPR case.
4468
4469 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
4470
4471 Suggested by Brendan Kehoe
4472 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
4473 treat it as using ::decl.
4474
4475 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
4476
4477 * tree.c (mapcar): Support NEW_EXPR.
4478
4479 * error.c (dump_expr): Support NEW_EXPR.
4480
4481 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
4482
4483 * method.c (make_thunk): Use overload machinery to make name.
4484 * search.c (covariant_return_p): New fn.
4485 (get_matching_virtual): Use it.
4486
4487 * init.c (build_new_1): Fix check for void.
4488
4489 1998-06-01 Per Bothner <bothner@cygnus.com>
4490
4491 * cp-tree.h (TYPE_FOR_JAVA): New macro.
4492 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
4493 java_int_type_node, java_long_type_node, java_float_type_node,
4494 java_double_type_node, java_char_type_node, java_boolean_type_node):
4495 New "primitive" types, with predefined names __java_byte etc.
4496 (record_builtin_java_type): New function.
4497 (init_decl_processing): Make Java types with record_builtin_java_type.
4498 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
4499 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
4500 (grokfndecl): Call check_java_method for Java classes.
4501 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
4502 (process_overload_item): Match types against specific
4503 java_XX_type_node types, rather than using is_java_type.
4504 * class.c (finish_struct_1): Don't add default copy constructor
4505 or operator= if TYPE_FOR_JAVA.
4506 (pop_lang_conext): Restore strict_prototyp proper if Java.
4507 * decl2.c (acceptable_java_type, check_java_method): New functions.
4508 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
4509 (tsubst): Move common statement after if statement.
4510 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
4511
4512 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
4513
4514 * pt.c (for_each_template_parm): Use first_rtl_op.
4515
4516 * tree.c (build_cplus_array_type_1): Also check index_type for
4517 template parms.
4518
4519 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
4520
4521 * pt.c (tsubst): Always copy BINFO_BASETYPES.
4522
4523 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
4524
4525 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
4526 TYPE_SIZE_UNIT too.
4527
4528 1998-05-29 Mark Mitchell <mark@markmitchell.com>
4529
4530 * decl.c (grokdeclarator): Don't complain about in-class
4531 initialization of static consts if we don't really know the type
4532 of the variable.
4533
4534 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
4535
4536 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
4537 * method.c (build_destructor_name): New fn.
4538 * decl2.c (maybe_retrofit_in_chrg): Split out...
4539 (grokclassfn): From here. Reorganize.
4540 * decl.c (grok_ctor_properties): Make sure ctors for types with
4541 vbases have the in_chrg parm.
4542 * pt.c (instantiate_class_template): Update
4543 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
4544 grok_*_properties.
4545 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
4546
4547 1998-05-28 Mark Mitchell <mark@markmitchell.com>
4548
4549 * pt.c (instantiate_decl): Make test for whether or not static
4550 variables should be instantiated early match its comment.
4551
4552 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
4553
4554 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
4555 a member.
4556 (start_function): Call check_default_args.
4557 * decl2.c (grokfield): Don't call check_default_args.
4558 (check_default_args): Use cp_error_at.
4559 * lex.c (do_pending_defargs): Call check_default_args.
4560
4561 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
4562
4563 * call.c (build_method_call): Make sure get_type_value returns
4564 something before we try to use its TYPE_MAIN_VARIANT.
4565 (build_scoped_method_call): Likewise.
4566
4567 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
4568
4569 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
4570 initialize an array.
4571
4572 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
4573 DECL_VIRTUAL_P.
4574
4575 * friend.c (do_friend): Clarify template warning.
4576
4577 1998-05-27 Mark Mitchell <mark@markmitchell.com>
4578
4579 * decl.c (shadow_label): Don't treat decls as identifiers.
4580 (maybe_push_to_top_level): Clear shadowed_labels.
4581
4582 * pt.c (instantiate_decl): Reset lineno and filename after calling
4583 regenerate_decl_from_template.
4584
4585 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
4586 error_mark_node.
4587
4588 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
4589
4590 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
4591
4592 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4593
4594 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
4595 (convert_nontype_argument): Handle cases when nontype template
4596 parameters become classes after substitution.
4597
4598 1998-05-26 Mark Mitchell <mark@markmitchell.com>
4599
4600 * friend.c (is_friend): Use comptypes, rather than == to compare
4601 types. Modify for new representation of template friends.
4602 (make_friend_class): Likewise.
4603 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
4604 (instantiate_class_template): Deal with template friends.
4605
4606 * decl.c (store_parm_decls): Remove redundant call to
4607 expand_main_function.
4608
4609 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
4610
4611 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
4612 DECL_USE_TEMPLATE.
4613
4614 1998-05-26 Per Bothner <bothner@cygnus.com>
4615
4616 * language_as_string: Handle lang_java.
4617
4618 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
4619
4620 * decl.c (pushdecl): Don't copy the type_decl.
4621
4622 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4623
4624 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
4625 current_class_type.
4626 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
4627
4628 * parse.y (complex_direct_notype_declarator): Use $1 to access
4629 scope of notype_qualified_id.
4630
4631 1998-05-26 Dave Brolley <brolley@cygnus.com>
4632
4633 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
4634 (init_parse): Initialize cpplib interface.
4635
4636 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
4637 empty continuation.
4638
4639 1998-05-26 Mark Mitchell <mark@markmitchell.com>
4640
4641 * decl.c (pushtag): Avoid crashing on erroneous input.
4642
4643 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4644
4645 * decl.c (push_namespace): Only produce one unique name for
4646 anonymous namespaces.
4647 (get_unique_name): Remove.
4648
4649 1998-05-25 Mark Mitchell <mark@markmitchell.com>
4650
4651 * call.c (tourney): Don't do any extra comparisons.
4652
4653 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
4654
4655 * cp-tree.h (processing_template_parmlist): Declare.
4656 * decl.c (pushtag): Don't call push_template_decl when we
4657 shouldn't.
4658 * pt.c (processing_template_parmlist): New variable.
4659 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
4660 (complete_template_args): Use it.
4661 (add_to_template_args): Likewise.
4662 (innermost_args): Likewise.
4663 (tsubst): Likewise.
4664 (begin_template_parm_list): Use processing_template_parmlist.
4665 (end_template_parm_list): Likewise.
4666
4667 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4668 * decl.c (grokdeclarator): Use it.
4669 * decl2.c (grok_x_components): Likewise.
4670 * init.c (initializing_context): Likewise.
4671 * method.c (do_build_copy_constructor): Likewise.
4672 (do_build_assign_ref): Likewise.
4673 * search.c (compute_access): Likewise.
4674 * typeck.c (build_component_ref): Likewise.
4675
4676 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
4677 unnamed type a typedef name "for linkage purposes".
4678
4679 * pt.c (lookup_template_class): Don't look at
4680 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
4681
4682 * method.c (build_overload_int): Handle error cases gracefully.
4683
4684 * pt.c (instantiate_decl): Handle static member variables
4685 correctly.
4686
4687 * pt.c (tsubst): Use the tsubst'd type when producing new
4688 TEMPLATE_PARM_INDEX nodes.
4689
4690 1998-05-24 Mark Mitchell <mark@markmitchell.com>
4691
4692 * tree.c (cp_tree_equal): Handle pointers to member functions.
4693
4694 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
4695 sure the type of the REF_BIND is a reference type.
4696 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
4697 target_type for clarity.
4698
4699 * parse.y (xcond): Move call to condition_conversion ...
4700 * semantics.c (finish_for_cond): Here.
4701 * parse.c: Regenerated.
4702
4703 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
4704
4705 * decl.c (push_namespace): Namespaces have type void.
4706 * typeck2.c (incomplete_type_error): Complain about namespace
4707 used as expression.
4708 * typeck.c (decay_conversion): Likewise.
4709
4710 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4711
4712 * error.c (dump_expr): Support namespaces.
4713
4714 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
4715
4716 * cp-tree.def: Add SRCLOC.
4717 * cp-tree.h: Add struct tree_srcloc and accessor macros.
4718 * tree.c (build_srcloc, build_srcloc_here): New fns.
4719 * pt.c (add_pending_template): Use build_srcloc_here.
4720 (push_tinst_level): Update last_template_error_tick before erroring.
4721 (instantiate_decl): Restore lineno and input_filename before
4722 calling add_pending_template.
4723 * decl2.c (finish_file): Set up lineno and input_filename for
4724 pending templates.
4725
4726 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
4727
4728 * decl.c (lang_print_error_function): New fn.
4729 (init_decl_processing): Set print_error_function to use it.
4730 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
4731
4732 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
4733 ICS_BAD_FLAG.
4734
4735 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
4736 copy-initialization.
4737
4738 * class.c (build_vtable_entry): Use int_fits_type_p.
4739 (build_vtable): Pass a signed offset to build_vtable_entry.
4740 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
4741 set_rtti_entry): Likewise.
4742
4743 1998-05-22 Per Bothner <bothner@cygnus.com>
4744
4745 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
4746 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
4747
4748 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
4749
4750 * pt.c (print_template_context): Use fprintf instead of cp_error.
4751
4752 * pt.c (determine_specialization): Just return an error_mark_node.
4753 Also print the decl we want in error messages. If we complain,
4754 return error_mark_node.
4755 (tsubst_friend_function): Set lineno and input_filename so
4756 error messages will be useful.
4757 (instantiate_template): Just return an error_mark_node.
4758 (check_explicit_specialization): Don't mess with a returned
4759 error_mark_node.
4760
4761 * pt.c (print_template_context): Add new argument.
4762 (maybe_print_template_context): New fn.
4763 (push_tinst_level): Increment tinst_level_tick.
4764 (pop_tinst_level): Likewise.
4765 * errfn.c (cp_thing): Call maybe_print_template_context. Use
4766 xrealloc instead of xmalloc.
4767
4768 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
4769
4770 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
4771
4772 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
4773 if the template we looked up is the same as the one we already
4774 have.
4775
4776 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
4777
4778 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
4779 (cpp_reader,parse_in): Add for cpplib.
4780 (check_newline): Call handle_sysv_pragma with new interface.
4781 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
4782
4783 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
4784 (sub_getch): Call GETC for cpplib.
4785
4786 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
4787 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
4788
4789 * Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
4790
4791 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
4792
4793 * decl2.c (maybe_make_one_only): New fn.
4794 (import_export_vtable): Use it.
4795 (import_export_decl): Likewise.
4796 * pt.c (mark_decl_instantiated): Likewise.
4797
4798 1998-05-21 Mark Mitchell <mmitchell@usa.net>
4799
4800 * decl2.c (find_representative_member): Rename to ...
4801 (build_anon_union_vars): New function.
4802 (finish_anon_union): Fix stupidity of previous change.
4803
4804 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
4805
4806 * decl.c (grokfndecl): Handle definition of specialization in
4807 friend declaration.
4808
4809 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
4810
4811 1998-05-20 Mark Mitchell <mmitchell@usa.net>
4812
4813 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
4814 to look for type declarations.
4815 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
4816 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
4817 (finish_member_class_template): Declare.
4818 * decl.c (pushtag): Put member class templates on the
4819 CLASSTYPE_TAGS list, just as for ordinary member classes.
4820 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
4821 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
4822 IDENTIFIER_NAMESPACE_VALUEs.
4823 * parse.y (component_decl): Move code to ...
4824 * semantics.c (finish_member_class_template): New function.
4825 Don't put member class templates on the list of components for a
4826 class.
4827 * parse.c: Regenerated.
4828 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
4829 In fact, don't use DECL_CONTEXT at all here.
4830
4831 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
4832
4833 * decl.c (record_unknown_type): New function.
4834 (init_decl_processing): Call it for the unknown and global type
4835 nodes.
4836
4837 1998-05-20 Mark Mitchell <mmitchell@usa.net>
4838
4839 * decl2.c (find_representative_member): New function.
4840 (finish_anon_union): Use it.
4841
4842 * cp-tree.h (MAIN_NAME_P): New macro.
4843 (DECL_MAIN_P): Likwise.
4844 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
4845 (grokfndecl): Use the new macros.
4846 (grokdeclarator): Likewise.
4847 (start_function): Likewise.
4848 (store_parm_decls): Likewise.
4849 (finsh_function): Likewise.
4850 * friend.c (do_friend): Likewise.
4851 * typeck.c (build_function_call_real): Likewise.
4852 (build_unary_op): Likewise.
4853
4854 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
4855
4856 * decl2.c (start_objects, finish_objects, do_dtors,
4857 do_ctors): Split out from...
4858 (finish_file): ...here.
4859
4860 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
4861
4862 * tree.c (is_overloaded_fn): Don't abort on placeholders from
4863 push_class_decls.
4864
4865 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
4866
4867 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
4868
4869 * error.c (dump_expr): Handle an ARROW_EXPR.
4870
4871 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
4872
4873 * decl.c (saveable_obstack): Declare.
4874 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
4875 declare, if necessary.
4876
4877 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
4878
4879 * call.c (compare_qual): Remove.
4880 (is_subseq): Tweak.
4881 (is_properly_derived_from): New function.
4882 (maybe_handle_ref_bind): Likewise.
4883 (maybe_handle_implicit_object): Likewise.
4884 (compare_ics): Modify substantially to bring into conformance with
4885 the standard.
4886 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
4887 (comp_cv_qualification): Declare.
4888 (comp_cv_qual_signature): Likewise.
4889 * typeck.c (comp_cv_qualification): Likewise.
4890 (comp_cv_qual_signature): Likewise.
4891
4892 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4893
4894 * Makefile.in (parse.o): Depend on toplev.h.
4895
4896 * class.c (typecode_p): Remove prototype and definition.
4897
4898 * cp-tree.h (currently_open_class, is_empty_class, member_p):
4899 Add prototype.
4900
4901 * decl.c (push_overloaded_decl_top_level): Remove prototype and
4902 definition.
4903
4904 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
4905 in call to `cp_thing'.
4906 (cp_warning): Likewise for function pointer `warning'.
4907
4908 * except.c (do_function_call): Remove prototype and definition.
4909 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
4910
4911 * method.c (is_java_type): Add prototype and make it static.
4912
4913 * parse.y: Include toplev.h.
4914
4915 * pt.c (type_unification): Remove unused variable `arg'.
4916 (instantiate_decl): likewise for `save_ti'.
4917
4918 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
4919
4920 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
4921
4922 * init.c (build_member_call): Handle template_ids.
4923 * parse.y (primary): Add global_scope template_id.
4924
4925 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
4926
4927 * decl2.c (get_sentry): Use end_temporary_allocation.
4928 Don't declare permanent_obstack.
4929
4930 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
4931
4932 * parse.y (.finish_new_placement): New non-terminal.
4933 (unary_expr, new_type_id): Use it.
4934 * parse.c: Regenerated.
4935
4936 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
4937
4938 * pt.c (redeclare_class_template): Say where the original definition
4939 of the template-parameter's default argument appeared.
4940
4941 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
4942
4943 * call.c (build_over_call): Tweak empty class handling.
4944
4945 * decl.c (make_typename_type): Use currently_open_class.
4946
4947 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
4948
4949 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4950
4951 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
4952 for a type unless it is one.
4953
4954 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
4955
4956 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
4957
4958 * Makefile.in (program_transform_name, objdir): Define.
4959
4960 * Makefile.in (BISON): Use bison from the build tree if it exists.
4961 (FLEX): Similarly.
4962
4963 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4964
4965 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
4966
4967 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
4968
4969 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
4970
4971 * call.c (build_scoped_method_call): Likewise.
4972
4973 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
4974
4975 * init.c (build_new_1): Call suspend_momentary around the creation
4976 of values that must be saved for exception handling.
4977 * parse.y (.build_new_placement): New non-terminal.
4978 (unary_expr, new_placement): Use it.
4979 * parse.c: Regenerated.
4980
4981 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
4982
4983 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
4984 old and new types.
4985
4986 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
4987 canonical type.
4988
4989 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
4990
4991 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
4992
4993 * decl.c (start_decl): Revert problem change.
4994
4995 * Makefile.in (CONFLICTS): Fix.
4996
4997 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
4998
4999 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
5000
5001 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
5002
5003 * class.c (finish_struct_1): Use BINFO_SIZE.
5004
5005 * decl.c (start_decl): Use 'tem'.
5006
5007 Thu May 14 16:30:47 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5008
5009 * exception.cc: Include eh-common.h.
5010 (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
5011 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
5012 (__cp_push_exception): Initialize eh_info struct as well.
5013 * except.c: Remove local structs and include eh-common.h.
5014 (init_exception_processing): Set language and version codes.
5015 (call_eh_info): add presence of eh_info to runtime description of
5016 struct cp_eh_info.
5017 (expand_end_eh_spec): call start_catch_block() and end_catch_block().
5018 * semantics.c (finish_try_block): call start_catch_block() and
5019 end_catch_block().
5020 * parse.y (function_try_block): call start_catch_block() and
5021 end_catch_block().
5022
5023 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
5024
5025 * typeck.c (original_type): New function.
5026 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
5027 to see if they're actually the same.
5028 * cp-tree.h (original_type): Declare.
5029
5030 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5031
5032 * Makefile.in (lex.o): Depend on output.h.
5033
5034 * call.c (add_function_candidate): Remove unused variable `cand'.
5035 (add_conv_candidate): Likewise.
5036 (build_builtin_candidate): Likewise.
5037
5038 * cp-tree.h: Add prototype for `types_overlap_p'.
5039
5040 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
5041
5042 * decl2.c (merge_functions): Remove unused variables `tmp' and
5043 `tempn'.
5044
5045 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
5046 (code_as_string): Likewise.
5047 (language_as_string): Likewise.
5048 (parm_as_string): Likewise.
5049 (op_as_string): Likewise.
5050 (assop_as_string): Likewise.
5051 (cv_as_string): Likewise.
5052
5053 * lex.c: Include output.h.
5054
5055 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
5056
5057 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
5058 ATTRIBUTE_UNUSED.
5059
5060 * tinfo.cc (__class_type_info::dcast): Change the type of variable
5061 `i' from int to size_t.
5062
5063 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
5064 ATTRIBUTE_UNUSED.
5065
5066 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
5067
5068 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
5069 DECL_NAMESPACE_SCOPE_P.
5070 (lang_decl_name): Likewise.
5071 * pt.c (tsubst_friend_function, tsubst): Likewise.
5072 * decl.c (pushdecl, redeclaration_error_message, start_decl,
5073 cp_finish_decl, start_function): Likewise.
5074 * class.c (finish_struct_1): Likewise.
5075 * call.c (build_over_call): Likewise.
5076 (compare_ics): Use DERIVED_FROM_P.
5077
5078 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
5079
5080 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
5081 * method.c (build_mangled_name): Use it.
5082 (build_decl_overload_real): Likewise.
5083
5084 * error.c (dump_simple_decl): New function, broken out from ...
5085 (dump_decl): Use it.
5086
5087 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
5088
5089 * ptree.c (lang_print_xnode): Add missing `break'.
5090
5091 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
5092
5093 * call.c (add_template_candidate): Adjust for changes to
5094 fn_type_unification.
5095 (add_template_candidate_real): Likewise.
5096 (add_template_conv_candidate): Likewise.
5097 (build_user_type_conversion_1): Likewise.
5098 (build_new_function_call): Likewise.
5099 (build_object_call): Likewise.
5100 (build_new_op): Likewise.
5101 (build_new_method_call): Likewise.
5102 * class.c (instantiate_type): Likewise.
5103 * cp-tree.h (unification_kind_t): New type.
5104 (fn_type_unification): Adjust prototype.
5105 (type_unificaiton): Likewise.
5106 * pt.c (UNIFY_ALLOW_NONE): New macro.
5107 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
5108 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
5109 (UNIFY_ALLOW_DERIVED): Likewise.
5110 (unify): Change prototype.
5111 (maybe_adjust_types_for_deduction): New function.
5112 (check_cv_quals_for_unify): Likewise.
5113 (determine_specialization): Adjust.
5114 (fn_type_unification): Likewise.
5115 (type_unification): Likewise.
5116 (type_unification_real): Likewise. Use
5117 maybe_adjust_types_for_deduction. Fix mishandling of
5118 back-unification of template functions passed as arguments. Pass
5119 appropriate combination of UNIFY_ALLOW_* to unify.
5120 (unify): Remove unused NTPARMS parameter. Use
5121 check_cv_quals_for_unify. Remove bogus code that allowed
5122 too-generous unification in order to adhere more closely to standard.
5123 (get_bindings_real): Adjust.
5124 (get_class_bindings): Likewise.
5125
5126 * method.c (build_overload_identifier): Only use the innermost
5127 template arguments when mangling.
5128 * pt.c (tsubst_template_argument_vector): New function.
5129 (complete_template_args): Deal with the situation where the
5130 extra_args contain more than one level of arguments.
5131 (lookup_template_class): Deal with member template classes, which
5132 may have more than one level of arguments.
5133 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
5134 Improve handling of member template classes. Use
5135 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
5136 tsubst_template_argument_vector where appropriate.
5137 (regenerate_decl_from_template): Break out from ...
5138 (instantiate_decl): Here.
5139
5140 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
5141 * parse.h: Regenerated.
5142 * parse.c: Really regenerated.
5143
5144 * cp-tree.h (finish_unary_op_expr): New function.
5145 (finish_id_expr): Likewise.
5146 (begin_new_placement): Likewise.
5147 (finish_new_placement): Likewise.
5148 (finish_declarator): Likewise.
5149 (finish_translation_unit): Likewise.
5150 (finish_parmlist): Likewise.
5151 (begin_class_definition): Likewise.
5152 (finish_class_definition): Likewise.
5153 (finish_default_args): Likewise.
5154 (finish_inline_definitions): Likewise.
5155 * parse.y (GCC_ASM_KEYWORD): Remove.
5156 (TYPENAME_ELLIPSIS): Likewise.
5157 * parse.c: Regenerated.
5158 Use new functions in semantics.c in the actions for many rules.
5159 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
5160 * hash.h: Regenerated.
5161 * semantics.c (finish_expr_stmt): Allow NULL expr.
5162 (finish_unary_op_expr): New function, containing
5163 code previously in parse.y.
5164 (finish_id_expr): Likewise.
5165 (begin_new_placement): Likewise.
5166 (finish_new_placement): Likewise.
5167 (finish_declarator): Likewise.
5168 (finish_translation_unit): Likewise.
5169 (finish_parmlist): Likewise.
5170 (begin_class_definition): Likewise.
5171 (finish_class_definition): Likewise.
5172 (finish_default_args): Likewise.
5173 (finish_inline_definitions): Likewise.
5174
5175 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
5176
5177 * typeck.c (build_c_cast): Don't decay arrays and functions to
5178 pointer type when converting to a class type.
5179
5180 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
5181
5182 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
5183 (DECL_CLASS_SCOPE_P): Likewise.
5184
5185 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
5186
5187 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
5188 * decl2.c (constructor_name_full): Likewise.
5189
5190 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
5191
5192 * tree.c (mapcar): Add OVERLOAD support.
5193
5194 * init.c (resolve_offset_ref): We must use basetype_path before we
5195 destroy it with a call to convert_pointer_to.
5196
5197 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
5198
5199 * class.c (currently_open_class): New fn.
5200 * decl.c (lookup_name_real): Use it.
5201 * search.c (lookup_field): Likewise.
5202
5203 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
5204
5205 * cp-tree.def (OVERLOAD): New node.
5206 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
5207 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
5208 (NAMESPACE_BINDING): Remove.
5209 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
5210 namespace_binding.
5211 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
5212 Define.
5213 (tree_overload): New struct.
5214 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
5215 (REAL_IDENTIFIER_TYPE_VALUE): Define.
5216 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
5217 (lang_decl_flags): Remove in_namespace.
5218 (lang_decl): Remove chain.
5219 (DECL_CHAIN, DECL_NAMESPACE): Remove.
5220 (flag_honor_std): Declare extern.
5221 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
5222 namespace_binding, set_namespace_binding,
5223 lookup_function_nonclass, cat_namespace_levels,
5224 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
5225 scratch_ovl_cons, ovl_member, build_overload): Declare.
5226 (decl_list_length, get_namespace_id, current_namespace_id,
5227 overloaded_globals_p): Remove.
5228 (lookup_using_namespace, qualified_lookup_using_namespace): Change
5229 return type.
5230 (push_scratch_obstack): New macro.
5231 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
5232 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
5233 convs, fns.
5234 (build_new_function_call): Iterate using OVL_CHAIN.
5235 Print DECL_NAME in when reporting ambiguities.
5236 (build_object_call): Iterate using OVL_NEXT for fns, convs.
5237 (build_new_op): Call lookup_function_nonclass.
5238 Iterate using OVL_NEXT.
5239 (build_op_delete_call): Change detection of members.
5240 Do not wrap TREE_LIST around fields and single global functions.
5241 (build_over_call): Don't push a class level if the context is a
5242 namespace.
5243 (build_new_method_call): Iterate using OVL_NEXT.
5244 * class.c (add_method): Chain overloaded members using
5245 build_overload. Remove copying of method.
5246 (grow_method): When iterating through the obstack, expect OVERLOAD
5247 nodes. Chain overload members.
5248 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
5249 nodes in call to get_baselinks.
5250 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
5251 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
5252 fdecls that are OVERLOAD nodes.
5253 (validate_lhs): New function.
5254 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
5255 code. Use DECL_NAME in error messages. Split code between global
5256 and member function processing.
5257 * decl.c (global_type_node): New static variable.
5258 (in_std): New global.
5259 (struct binding_level): New field usings.
5260 (resume_binding_level): Assert that we are not in a class.
5261 (toplevel_bindings_p): Just check for namespace_p or
5262 pseudo_global.
5263 (resume_level): Remove.
5264 (find_binding): New function.
5265 (binding_for_name): Call it.
5266 (namespace_binding, set_namespace_binding): New functions.
5267 (push_namespace): Associate binding level with new namespace,
5268 resume_binding_level for existing namespace. Remove old code.
5269 Fake std by counting.
5270 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
5271 (maybe_push_to_top_level): Save current namespace.
5272 (pop_from_top_level): Restore saved namespace.
5273 (pop_namespace): Call suspend_binding_level. Remove old code.
5274 (cat_namespace_levels): New function.
5275 (set_identifier_type_value_with_scope): For namespace bindings,
5276 set BINDING_TYPE, and use global_type_node.
5277 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
5278 (identifier_type_value): New function.
5279 (pushtag): If no context, use current_namespace.
5280 (duplicate_decls): Don't process DECL_CHAIN.
5281 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
5282 already set. Never reset it to NULL_TREE. Lookup global variables
5283 in their namespace. Push overloaded templates if they are on
5284 namespace level.
5285 (pushdecl_namespace_level): New function.
5286 (pushdecl_top_level): Implement using pushdecl_namespace_level.
5287 (pushdecl_using_decl): New function.
5288 (overloaded_globals_p): Remove.
5289 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
5290 them. Use namespace_binding and set_namespace_value.
5291 (redeclaration_error_message): Complain if the declarations come
5292 from different namespaces.
5293 (lookup_tag): On namespace level, look in the BINDING_TYPE.
5294 (lookup_namespace_name): Pass tree_bindings from stack. Remove
5295 old code.
5296 (select_decl): New function.
5297 (lookup_name_real): Call it for qualified and unqualified lookup.
5298 Pass tree_bindings from the stack.
5299 If prefer_type is 1, also accept namespaces.
5300 (lookup_function_nonclass): New function.
5301 (init_decl_processing): Set the binding level of the global
5302 namespace to global_binding_level.
5303 Build a proper type list for __builtin_apply.
5304 Initialize std_node to "fake std" if flag_honor_std is set.
5305 Initialize global_type_node.
5306 Allocated bad_alloc in namespace std if flag_honor_std.
5307 (define_function): Set the DECL_CONTEXT to the current_namespace.
5308 (start_decl): A namespace is not considered as a context here. If
5309 the DECL_CONTEXT is a namespace, push the decl.
5310 (cp_finish_decl): Check for namespaces used as initializers.
5311 (grokfndecl): Add namespace parameter. Remove processing of
5312 DECL_CHAIN.
5313 (grokvardecl): Add namespace parameter.
5314 (grokdeclarator): Process SCOPEs that are namespaces. For
5315 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
5316 (start_function): Check for contexts that are namespaces.
5317 Set context for declarations that have not been pushed.
5318 (store_parm_decls): Check for ::main only.
5319 (finish_function): Likewise.
5320 (start_method): Check for contexts that are namespaces.
5321 (start_method): Remove DECL_CHAIN processing.
5322 * decl2.c (flag_honor_std): Declare.
5323 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
5324 (decl_namespace_list): New static global.
5325 (grok_x_components): Ignore namespaces as type contexts.
5326 (check_classfn): Expect OVERLOAD nodes.
5327 (grokfield): Remove DECL_CHAIN processing.
5328 (finish_file): Call cat_namespace_levels.
5329 (merge_functions): New function.
5330 (ambiguous_decl): Rewrite.
5331 (lookup_using_namespace): Produce tree_bindings.
5332 (qualified_lookup_using_namespace): Likewise.
5333 (set_decl_namespace, decl_namespace, current_decl_namespace,
5334 push_decl_namespace, pop_decl_namespace): New functions.
5335 (arg_lookup): New struct.
5336 (add_function, arg_assoc_namespace, arg_assoc_class,
5337 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
5338 New functions.
5339 (get_namespace_id, current_namespace_id): Remove.
5340 (do_toplevel_using_decl): Rewrite.
5341 (do_class_using_decl): Complain about namespace qualifiers.
5342 (do_using_directive): Sorry if not on namespace level. Complain
5343 about unknown namespaces.
5344 * error.c (dump_aggr_type): Check for namespace contexts.
5345 * except.c (init_exception_processing): Push terminate into std.
5346 * friend.c (is_friend): A namespace is not a context, here.
5347 * init.c (expand_member_init): Remove DECL_CHAIN processing.
5348 (build_offset_ref): Process OVERLOAD nodes.
5349 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
5350 * lex.c (identifier_type): Loop using OVL_CHAIN.
5351 (see_typename): Set looking_for_typename to 2.
5352 (real_yylex): Likewise.
5353 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
5354 (do_scoped_id): Expect OVERLOAD nodes.
5355 Change calling convention for qualified_lookup_using_namespace.
5356 (build_lang_decl): Don't set in_namespace anymore.
5357 * method.c (typevec_size): New global.
5358 (build_overload_nested_name): Return if global_namespace.
5359 Otherwise, always expect a declaration context.
5360 (build_qualified_name): Likewise.
5361 Make sure we don't write beyond typevec_size.
5362 (build_decl_overload_real): Likewise.
5363 Allocate one extra slot for the namespace.
5364 (hack_identifier): Mark code dead.
5365 Process OVERLOAD and NAMESPACE_DECL nodes.
5366 * parse.y (program): Pop namespaces until in global namespace.
5367 (extdef): In a using-declaration, don't discard the identifier if
5368 there is no declaration.
5369 (left_curly): Ignore type contexts which are namespaces.
5370 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
5371 used as scope.
5372 * pt.c (template_class_depth): Expect types to be namespaces.
5373 (determine_specialization): Simplify by expecting OVERLOAD nodes.
5374 (push_template_decl): Push into namespace level.
5375 Reset ctx if it is a namespace.
5376 Set DECL_CONTEXT to current_namespace if not set already.
5377 Ignore real contexts that are namespaces.
5378 (mangle_class_name_for_template): Skip global_namespace.
5379 Mangle other namepaces as declarations.
5380 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
5381 (lookup_template_class): Push into namespace of context.
5382 If the context is a namespace, set it to global_namespace.
5383 Use id_context for mangling.
5384 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
5385 (tsubst_friend_function): Ignore namespace contexts.
5386 Push into namespace level.
5387 (tsubst): Handle NAMESPACE_DECL nodes.
5388 Remove DECL_CHAIN processing.
5389 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
5390 * ptree.c (print_lang_identifier): Print bindings.
5391 (lang_print_xnode): Print OVERLOAD nodes.
5392 * rtti.c (init_rtti_processing): Push type_info into std.
5393 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
5394 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
5395 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
5396 lookup_fnfields_here): Likewise.
5397 Process all nodes, instead of going through TREE_CHAIN.
5398 * sig.c (build_signature_pointer_or_reference_type): Set context
5399 to global_namespace.
5400 (build_signature_table_constructor): Expect OVERLOAD nodes.
5401 * spew.c (yylex): Save old setting of looking_for_typename.
5402 * tree.c (decl_list_length): Remove.
5403 (binding_init): New function.
5404 (count_functions): Rewrite.
5405 (is_overloaded_fn): Expect OVERLOAD nodes.
5406 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
5407 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
5408 ovl_member): New functions.
5409 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
5410 (type_unknown_p): Likewise.
5411 (require_instantiated_type): Likewise.
5412 (build_component_ref): Declare code dead.
5413 (build_x_function_call): Create and expect OVERLOAD nodes.
5414 (build_function_call_real): Check for ::main only.
5415 (build_unary_op): Likewise. Expect OVERLOAD nodes.
5416 (convert_for_assignment): Check for TREE_LIST before accessing
5417 TREE_VALUE.
5418 * decl.c (duplicate_decls): Check for namespace bindings instead
5419 of global bindings.
5420 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
5421 lookup_name_current_level, start_decl, xref_tag,
5422 finish_enum): Likewise.
5423 * init.c (build_offset_ref): Likewise.
5424 * search.c (lookup_field): Likewise.
5425 (lookup_fnfields): Likewise.
5426 (dfs_debug_mark): Likewise.
5427 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
5428 (poplevel_class, pop_from_top_level): Likewise.
5429 * decl2.c (finish_method): Likewise.
5430 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
5431 * decl.c (record_builtin_type): Likewise.
5432 (init_decl_processing, grokfndecl): Likewise.
5433 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
5434 (make_lang_type): Likewise.
5435 * parse.y (make_thunk): Likewise.
5436 * pt.c (tsubst): Likewise.
5437 * tree.c (debug_binfo): Likewise.
5438 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
5439 tinfo2.cc, inc/new.h: Add std qualifications.
5440 * inc/new: Wrap with namespace std if __HONOR_STD.
5441 * inc/typeinfo: Likewise.
5442
5443 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
5444
5445 * call.c (build_user_type_conversion_1): Handle second_conv
5446 properly for templates.
5447
5448 Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5449
5450 * method.c (build_decl_overload_real): Set TREE_USED flag to
5451 zero for build_type_variants nodes as well.
5452
5453 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
5454
5455 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
5456
5457 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
5458
5459 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
5460 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
5461 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
5462 xref.o): Add toplev.h dependencies.
5463
5464 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
5465
5466 * errfn.c (cp_error, cp_warning): Remove declarations for
5467 error and warning respectively.
5468
5469 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5470
5471 * error.c: Convert to using ctype macros defined in system.h.
5472 * method.c: Likewise.
5473 * xref.c: Likewise.
5474 * lex.c: Likewise. Also remove redundant system header stuff.
5475
5476 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
5477
5478 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
5479 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
5480 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
5481 xref.c: Add include of toplev.h.
5482
5483 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
5484
5485 * tree.c (perm_manip): Also regenerate the RTL of an extern.
5486 (copy_to_permanent): Use end_temporary_allocation.
5487
5488 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
5489
5490 * init.c (expand_vec_init): The initialization of each array
5491 element is a full-expression.
5492
5493 Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5494
5495 * method.c (build_mangled_name): Add a call to build_type_variant
5496 to get the right type.
5497
5498 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
5499
5500 * Makefile.in: Add .SUFFIXES.
5501
5502 * cp-tree.def: Remove NAMESPACE_DECL.
5503
5504 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
5505
5506 * call.c (build_over_call): Do evaluate arg even if it has empty
5507 class type.
5508 * decl.c (start_function): Don't push a member function.
5509
5510 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
5511
5512 * Makefile.in (g++FAQ.info): Put -o option before input file.
5513
5514 Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5515
5516 * gxxint.texi: Add info for squangling codes K and B.
5517
5518 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
5519
5520 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
5521 the expression in templates.
5522 (finish_stmt_expr): Likewise.
5523
5524 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
5525
5526 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
5527
5528 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
5529
5530 * decl.c (maybe_push_to_top_level): Always clear
5531 current_template_parms and processing_template_decl.
5532 (pushtag): Remove check of current_class_type and some comments,
5533 since maybe_push_to_top_level no longer creates confusion.
5534
5535 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
5536
5537 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
5538 (DECL_CLASS_TEMPLATE_P): Likewise.
5539 (DECL_PRIMARY_TEMPLATE): Likewise.
5540 (PRIMARY_TEMPLATE_P): Use it.
5541 (push_template_decl_real): New function.
5542 (redeclare_class_template): Take new template parameters as
5543 input.
5544 (is_specialization_of): New function.
5545 (comp_template_args): Declare.
5546 * decl.c (pushtag): Handle friend template classes.
5547 (xref_tag): Likewise. Use new calling convention for
5548 redeclare_class_template.
5549 * decl2.c (grok_x_components): Handle friend templates.
5550 * friend.c (is_friend): Use is_specialization_of where
5551 appropriate. Deal with friend class templates.
5552 (make_friend_class): Let a class template be friends with itself.
5553 * pt.c (comp_template_args): Remove declaration.
5554 (tsubst_friend_class): New function.
5555 (push_template_decl_real): New function.
5556 (push_template_decl): Use it.
5557 (redeclare_class_template): Adjust for new calling convention.
5558 (comp_template_args): Give it external linkage.
5559 (instantiate_class_type): Use tsubst_friend_class to deal
5560 with friend templates.
5561 * typeck.c (comptypes): Use comp_template_args, rather than
5562 expanding it inline.
5563 * parse.y (component_decl): Handle a nested template type
5564 like other component type declarations.
5565
5566 * pt.c (check_explicit_specialization): Handle overloaded
5567 constructors correctly.
5568
5569 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
5570 (lookup_template_class): Use it.
5571
5572 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
5573
5574 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
5575 * cp-tree.h: Add WRAPPER support.
5576 * call.c (add_candidate): Split out from add_*_candidate fns.
5577 (build_over_call): Take the candidate instead of function and args.
5578 Enforce access control here. Emit overload warnings here.
5579 (add_warning): New fn.
5580 (joust): Add WARN parm. If not set, call add_warning instead of
5581 printing a warning. Reenable some warnings.
5582 (tourney): Pass it.
5583 (convert_like): Adjust.
5584 (build_new_op): Adjust.
5585 (build_new_function_call): Adjust.
5586 (build_user_type_conversion_1): Adjust.
5587 (USER_CONV_FN): Adjust.
5588 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
5589 build_int_wrapper): New fns.
5590
5591 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
5592
5593 * pt.c (unify): Fix typo in previous change.
5594
5595 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
5596
5597 * error.c (dump_type_real): Declare canonical_name.
5598
5599 * typeck.c (comp_target_types): Fix PMFs.
5600
5601 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
5602
5603 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
5604 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
5605 TEMPLATE_DECL.
5606
5607 * pt.c (tsubst): Decrease the template-level of
5608 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
5609 TEMPLATE_PARM_INDEX.
5610 (template_decl_level): New function.
5611 (unify): Make sure to record unifications for template
5612 parameters, even when the parameters exactly match the arguments.
5613 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
5614 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
5615 aren't from the level we're currently working on.
5616
5617 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
5618
5619 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
5620
5621 * decl2.c (check_member_template): Set DECL_IGNORED for member
5622 class templates, too.
5623
5624 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
5625
5626 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5627
5628 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
5629
5630 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
5631
5632 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
5633 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
5634 (init_decl_processing): Handle TI types.
5635 * typeck.c (unsigned_type, signed_type): Handle TI types.
5636
5637 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
5638
5639 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
5640 New local added_libraries. Increment count when add library to
5641 arglist.
5642
5643 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
5644
5645 * cp-tree.h (type_as_string_real): New function.
5646 * pt.c (mangle_class_name_for_template): Use it.
5647 * error.c (dump_aggr_type): Change prototype.
5648 (dump_type_prefix): Likewise.
5649 (dump_type_suffix): Likewise.
5650 (dump_type_real): Convert from dump_type. If desired, the
5651 "canonica" name of a typedef, i.e., the name of the underlying
5652 type, can be printed.
5653 (dump_type): Call dump_type_real.
5654
5655 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
5656
5657 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
5658
5659 * typeck.c (comp_target_types): Tweak pedantic case.
5660 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
5661 Return -1 or 1 instead of 1 or 2.
5662 (compparms): Remove STRICT handling.
5663 (convert_for_assignment): Fix handling of pmfs.
5664
5665 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
5666
5667 * typeck.c (comp_target_types): Handle references like pointers.
5668 (comp_target_parms): Note that return code from comp_target_types
5669 can be negative to indicate failure.
5670
5671 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5672
5673 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
5674 which requires a working target compiler to build.
5675
5676 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
5677
5678 * tree.c (avoid_overlap): Add prototype.
5679
5680 * spew.c (num_tokens): Add prototype.
5681 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
5682
5683 * search.c (dfs_check_overlap): Add prototype.
5684 (dfs_no_overlap_yet): Likewise.
5685
5686 * pt.c (original_template): Add prototype.
5687 (inline_needs_template_parms): Likewise.
5688 (push_inline_template_parms_recursive): Likewise.
5689 (retrieve_specialization, register_specialization): Likewise.
5690 (print_candidates, reduce_template_parm_level): Likewise.
5691 (build_template_decl, mark_template_parm): Likewise.
5692 (tsubst_friend_function, get_bindings_real): Likewise.
5693
5694 * method.c (start_squangling): Add prototype.
5695 (end_squangling, check_ktype, issue_ktype): Likewise.
5696 (build_overloaded_scope_ref, check_btype): Likewise.
5697 (build_mangled_template_parm_index): Likewise.
5698
5699 * lex.c (init_cpp_parse): Add prototype.
5700 (handle_cp_pragma, handle_sysv_pragma): Likewise.
5701 (reduce_cmp, token_cmp): Likewise.
5702
5703 * except.c (call_eh_info): Add prototype.
5704 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
5705 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
5706
5707 * decl2.c (is_namespace_ancestor): Add prototype.
5708 (namespace_ancestor, add_using_namespace): Likewise.
5709 (ambiguous_decl): Likewise.
5710
5711 * decl.c (indent): Add prototype.
5712
5713 * call.c (add_template_candidate_real): Add prototype.
5714
5715 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
5716
5717 * decl2.c (build_expr_from_tree): Just return a PMF.
5718
5719 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
5720
5721 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
5722 when doing initializations.
5723
5724 * pt.c (unify): Use comptypes to compare type args.
5725
5726 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
5727
5728 * decl.c (duplicate_decls): Fix check for when it's safe to free
5729 the new decl.
5730
5731 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
5732 to type_as_string.
5733
5734 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
5735
5736 * pt.c (build_template_parm_index): Add prototype.
5737
5738 * search.c (my_tree_cons): Don't clear words outside the
5739 newly allocated node.
5740
5741 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
5742
5743 * lex.c (init_parse): Now returns char* containing the filename.
5744
5745 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
5746 Jeff Law <law@cygnus.com>
5747
5748 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
5749 than a pointer.
5750
5751 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5752
5753 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
5754
5755 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
5756
5757 * decl.c (duplicate_decls): Don't warn for redundant decls if
5758 friend: let add_friend take care of it.
5759
5760 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
5761
5762 * sig.c (build_signature_pointer_constructor): Don't set
5763 TREE_HAS_CONSTRUCTOR for a signature pointer.
5764 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
5765 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
5766 here, too.
5767 * typeck.c (build_unary_op): Only allow taking the address of a
5768 real constructor.
5769 * typeck2.c (digest_init): Simplify.
5770 (store_init_value): Don't pedwarn about using { } for pmfs.
5771
5772 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
5773
5774 * cp-tree.h (start_decl): Update prototype.
5775 * decl.c (start_decl): Like the C version, new parameters
5776 for the attributes. Call cplus_decl_attributes here,
5777 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
5778 (grokdeclarator): Pass NULL for new start_decl arguments.
5779 * pt.c (tsubst_expr): Likewise.
5780 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
5781 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
5782 * lex.c (build_lang_decl): Add lang_name_java.
5783 * class.c (push_lang_context): Add lang_name_java.
5784 * method.c (build_mangled_name): Check for is_java_type.
5785
5786 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
5787
5788 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
5789 * call.c (build_scoped_method_call): Check for TREE_CODE for
5790 VOID_TYPE instead of type == void_type_node.
5791 (build_method_call): Ditto.
5792 * decl.c (lookup_name_real): Ditto.
5793 (grokdeclarator): Ditto.
5794 (start_decl): Ditto.
5795 (grokparms): Ditto.
5796 (start_function): Ditto.
5797 (finish_function): Ditto.
5798 (start_method): Ditto.
5799
5800 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
5801
5802 * lex.c (finput): New variable.
5803 (init_cpp_parse): Renamed from init_parse.
5804 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
5805 (finish_parse): New function.
5806 * cp-tree.h (init_lex, init_parse): Remove declarations.
5807
5808 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
5809
5810 * call.c (build_call): Still evaluate the actual argument.
5811 * class.c (is_empty_class): Update for -fnew-abi.
5812
5813 * decl2.c: -fnew-abi implies -fsquangle.
5814
5815 * method.c (do_build_assign_ref): Don't do anything to copy
5816 an empty class.
5817 (do_build_copy_constructor): Likewise.
5818 * call.c (build_over_call): Likewise.
5819
5820 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
5821
5822 * tree.c (avoid_overlap): Return a value.
5823
5824 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
5825
5826 * method.c (check_btype): Add missing argument to xrealloc.
5827 (check_ktype): Likewise.
5828
5829 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
5830
5831 Implement empty base optimization.
5832 * class.c (finish_struct_1): Add vbase fields earlier. Set
5833 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
5834 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
5835 (types_overlap_p): New fn.
5836 * tree.c (avoid_overlap): New fn.
5837 (build_base_fields): Use it to avoid overlapping empty bases.
5838 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
5839
5840 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
5841
5842 Re-implement allocation of base class subobjects.
5843 * tree.c (unshare_base_binfos): New fn.
5844 (layout_basetypes): Use it. Now handles offsets of both virtual and
5845 non-virtual bases, after layout_type.
5846 (layout_vbasetypes): Remove.
5847 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
5848 (build_vbase_pointer_fields): Split out from old layout_basetypes.
5849 * class.c (finish_base_struct): Lose offset handling code.
5850 Move nonvdtor warning here. Don't mess with t_binfo anymore.
5851 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
5852 * cp-tree.h: Adjust.
5853
5854 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
5855
5856 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
5857 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
5858 * class.c (duplicate_tag_error): Likewise.
5859 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
5860 * tree.c (layout_vbasetypes): Update from layout_record, remove
5861 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
5862 (layout_basetypes): Likewise.
5863
5864 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
5865
5866 * class.c, Make sure system.h is included just after config.h.
5867 Delete lingering stdio and errno references too.
5868 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
5869
5870 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
5871
5872 * friend.c (is_friend): Fix access control for local classes.
5873
5874 * class.c (is_empty_class): New fn.
5875 * call.c (build_call): Don't pass empty class objects to a function.
5876
5877 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
5878
5879 * call.c (build_over_call): Do name resolution for default
5880 arguments of function templates in the scope of the templates.
5881
5882 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
5883
5884 * call.c: Include system.h. Remove includes, declarations and
5885 defines provided by system.h.
5886 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
5887 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
5888 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
5889 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
5890 * typeck2.c, xref.c: Likewise.
5891 * Makefile.in: Dependencies updated as appropriate.
5892 * Make-lang.in: Likewise.
5893
5894 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
5895
5896 * pt.c (fn_type_unification): Allow incomplete unification without
5897 an immediate error message.
5898
5899 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
5900
5901 * tree.c (member_p): New fn.
5902 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
5903 initializing class members.
5904
5905 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
5906 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
5907
5908 * call.c (build_method_call): Handle non-scoped destructors, too.
5909 * pt.c (tsubst_copy): Likewise.
5910
5911 * pt.c (print_template_context): Split out...
5912 (push_tinst_level): ...from here.
5913
5914 * friend.c (is_friend): Don't pass a type to decl_function_context.
5915
5916 * typeck.c (convert_for_initialization): Always hand off
5917 conversions to class type.
5918
5919 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
5920
5921 * friend.c (is_friend): Local classes have the same access as the
5922 enclosing function.
5923
5924 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
5925
5926 * typeck.c (expand_target_expr): Delete dead function.
5927
5928 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
5929
5930 * repo.c (save_string): Delete dead function.
5931
5932 * method.c (thunk_printable_name): Delete dead function.
5933
5934 * lex.c (yynextch): Delete dead function.
5935
5936 * expr.c (tree_extract_aggr_init): #if 0 out.
5937
5938 * except.c (do_unwind): Delete dead function.
5939 (easy_expand_asm): Likewise.
5940
5941 * cvt.c (build_conversion_type_1): Delete dead function.
5942
5943 * cp-tree.h (push_expression_obstack): Declare.
5944
5945 * call.c (source_type): #if 0 out.
5946
5947 * class.c (alter_access): Remove unused label. Add braces
5948 around empty else clause.
5949
5950 * lex.c (yyprint): Fix argument to printf.
5951
5952 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
5953
5954 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
5955
5956 * pt.c (instantiate_class_template): Make sure template
5957 arguments are permanent.
5958 * init.c (resolve_offset_ref): Don't go looking around in
5959 template types.
5960
5961 * semantics.c: Add routines to handle expressions, and some
5962 declaration processing.
5963 * parse.y: Use them.
5964 (current_class_depth): Move declaration to cp-tree.h.
5965 * parse.c: Regenerated.
5966 * cp-tree.h: Use them.
5967 (current_class_depth): Declare.
5968 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
5969
5970 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
5971
5972 * error.c (dump_decl): Be a bit more explicit with template
5973 type arguments, when verbose.
5974
5975 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
5976
5977 * inc/exception: Reorder closing braces.
5978
5979 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
5980
5981 * pt.c (redeclare_class_template): New function.
5982 * cp_tree.h (redeclare_class_template): Declare it.
5983 * decl.c (xref_tag): Use it.
5984
5985 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
5986
5987 * call.c (build_over_call): Check IS_AGGR_TYPE, not
5988 TYPE_LANG_SPECIFIC.
5989 * typeck.c (convert_arguments): Likewise.
5990
5991 * decl.c (grokdeclarator): Remove const and volatile from type after
5992 setting constp and volatilep.
5993
5994 * class.c (finish_struct_1): Don't warn about bool bitfield larger
5995 than one bit.
5996
5997 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
5998
5999 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
6000
6001 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
6002
6003 * call.c (build_object_call): Complain about ambiguous operator(),
6004 rather that crashing.
6005 (build_new_op): Likewise.
6006 (build_op_delete_call): Likewise.
6007
6008 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
6009
6010 * cvt.c (perform_qualification_conversions): Use comp_target_types
6011 instead of comp_ptr_ttypes.
6012
6013 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
6014
6015 * cp-tree.h (enforce_access): Declare.
6016 * call.c (enforce_access): Make it extern, not static.
6017 * class.c (alter_access): Use enforce_access; modify code for ISO
6018 compliance, rather than ARM rules.
6019
6020 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6021
6022 * cp-tree.h: Fix typo.
6023
6024 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
6025
6026 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
6027 if (aggregate_value_p (type)).
6028
6029 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
6030
6031 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
6032
6033 * tree.c (mapcar): When dealing with a DECL, use it's constant
6034 value, if any.
6035 * pt.c (lookup_template_class): Don't mangle the names of template
6036 classes whose arguments are unknown.
6037
6038 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
6039
6040 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
6041
6042 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
6043
6044 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
6045
6046 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
6047 boolean_type_node to 1.
6048
6049 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
6050
6051 * error.c (dump_expr): Remove unused variable `l'.
6052
6053 * pt.c (for_each_template_parm): New function, created by
6054 converting uses_template_parms.
6055 (tree_fn_t): New typedef.
6056 (uses_template_parms): Use it.
6057 (mark_template_parm): New function.
6058 (push_template_decl): Check that the argument list of a partial
6059 specialization uses all the template parameters.
6060
6061 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
6062 with it; we might want it for debugging.
6063 * cp-tree.h (type_unification): Change interface.
6064 * class.c (finish_struct_1): Skip nested template types, just like
6065 ordinary nested types.
6066 (instantiate_type): Use new interface to type_unification.
6067 * lex.c (init_lex): Add __sz as opname for sizeof.
6068 * method.c (build_overload_scope_ref): New function.
6069 (build_overload_int): Handle complex expressions. Set
6070 numeric_output_need_bar if necessary.
6071 (build_overload_value): Handle non-PARM_DECL nodes; this
6072 routine is now used by build_overload_int. Remove some
6073 assignments to numeric_output_need_bar. Use
6074 build_overload_scope_ref.
6075 (build_qualified_name): Note that some template mangled names end
6076 with digits, and set numeric_output_need_bar appropriately. Use
6077 build_underscore_int.
6078 * pt.c (unify): Change interface.
6079 (type_unification_real): Likewise.
6080 (determine_specialization): Use new interfaces.
6081 (tsubst): Deal gracefully with situations in which the argument
6082 vector is not fully filled.
6083 (fn_type_unification): Use new interfaces.
6084 (type_unification): Likewise. Remove NOP_EXPR hack.
6085 (type_unification_real): Likewise.
6086 (unify): Likewise. Deal with unification of complex expresions.
6087
6088 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6089
6090 * pt.c (complete_template_args): Initialize skip properly.
6091
6092 * decl.c (make_typename_type): Revert.
6093 (make_implicit_typename): Remove.
6094 (lookup_name_real): Don't call it. Call lookup_field if we see a
6095 TYPE_DECL from a template base.
6096 * search.c (lookup_field): Do implicit typename stuff.
6097
6098 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
6099 Geoff Noer <noer@cygnus.com>
6100
6101 * Makefile.in: Various fixes for building cygwin32 native toolchains.
6102 * Make-lang.in: Likewise.
6103
6104 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6105
6106 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
6107
6108 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
6109
6110 * decl.c (make_implicit_typename): Rewrite removed code.
6111 (make_typename_type): Call it if the type we look up comes from
6112 a base that uses template parms.
6113
6114 * pt.c (complete_template_args): Rewrite.
6115 (tsubst, FUNCTION_DECL): Use it.
6116
6117 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
6118
6119 * semantics.c (finish_asm_stmt): Fix combine strings. Call
6120 c_expand_asm_operands () if output_operands, input_operands or
6121 clobbers is not NULL_TREE.
6122
6123 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6124
6125 * pt.c (complete_template_args): New function.
6126 (get_bindings): Deal with specializations of function templates
6127 with return type containing parameters from outer class
6128 templates.
6129 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
6130 substitute arguments and compose a new type.
6131
6132 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
6133
6134 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
6135 FUNCTION_DECLs.
6136
6137 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6138
6139 * decl.c (make_implicit_typename): Lose useless code.
6140
6141 * call.c (standard_conversion): Handle A* -> const A* properly.
6142
6143 * pt.c (get_bindings_real): Rename from get_bindings. Add
6144 check_rettype parm.
6145 (get_bindings): Pass 1.
6146 (get_bindings_overload): Pass 0.
6147
6148 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
6149
6150 * pt.c (check_explicit_specialization): When reverting a static
6151 member function, also remove the `this' parameter from
6152 last_function_parms.
6153
6154 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6155
6156 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
6157 a function context.
6158
6159 * decl.c (store_bindings): Use free_binding_vecs.
6160 (pop_from_top_level): Likewise.
6161
6162 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
6163
6164 * decl.c (make_implicit_typename): Only change the type of a
6165 TYPENAME_TYPE.
6166
6167 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
6168
6169 * semantics.c: New file, containing routines to perform the
6170 semantic phase of parsing.
6171 * parse.y: Use it.
6172 * pt.c (tsubst_expr): Likewise.
6173 * cp-tree.h: Declare the various functions in semantics.c.
6174 Provide macros to access _STMT tree nodes.
6175 * cp-tree.def: Add ASM_STMT tree node.
6176 * Makefile.in, Make-lang.in: Add dependencies on and for
6177 semantics.c.
6178
6179 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
6180
6181 * pt.c (push_template_decl): Only check primary templates.
6182
6183 * pt.c (check_explicit_specialization): Complain about default args
6184 in explicit specialization.
6185
6186 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
6187 constructor_declarator.
6188
6189 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
6190
6191 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
6192 has no overloaded operator ->.
6193
6194 * call.c (build_field_call): Don't crash when presented with a
6195 field that is actually a nested type.
6196
6197 * decl.c (pushtag): Deal with friend class injection in local
6198 classes.
6199
6200 * call.c (build_object_call): Don't crash if OBJ is a
6201 pointer-to-member-function.
6202
6203 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
6204
6205 * pt.c (push_template_decl): Complain about template with C linkage,
6206 anonymous template class.
6207
6208 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
6209
6210 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
6211 * search.c: Likewise.
6212
6213 * lex.c (do_pending_defargs): Only call
6214 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
6215
6216 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
6217
6218 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
6219
6220 * parse.y: Deal with CONSTRUCTORS in new_initializers.
6221
6222 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
6223
6224 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
6225 closely mimics the behavior in parse.y.
6226 (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
6227 into a compound statement.
6228
6229 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
6230
6231 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
6232 * pt.c (inline_needs_template_parms): New fn.
6233 (original_template): New fn.
6234 (push_inline_template_parms_recursive): New fn.
6235 (maybe_begin_member_template_processing): Use them.
6236 (maybe_end_member_template_processing): Likewise.
6237 (is_member_or_friend_template): Rename to is_member_template.
6238 Member functions of local classes are never member templates.
6239
6240 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6241
6242 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
6243 added in the class scope to catch redefinition error.
6244
6245 * pt.c (reduce_template_parm_level): Also copy
6246 the DECL_TEMPLATE_PARMS field.
6247
6248 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
6249
6250 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
6251 reduced-level template type parameter.
6252
6253 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
6254
6255 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
6256 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
6257 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
6258 * decl.c (duplicate_decls): Propagate it.
6259 * typeck2.c (abstract_virtuals_error): Use two loops to emit
6260 abstract virtual functions and virtual functions which need a
6261 final overrider separately.
6262
6263 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
6264
6265 * lang-specs.h: Properly put brackets around array elements in
6266 initializer.
6267
6268 * typeck.c (build_binary_op_nodefault): Correctly place parens around
6269 && and || in expression.
6270
6271 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
6272
6273 * call.c (default_parm_conversions): Remove prototype definition.
6274 (build_method_call): Remove unused variable result.
6275
6276 * cvt.c (ocp_convert): Remove unused variable conversion.
6277
6278 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
6279
6280 * except.c (do_unwind): #if 0 definition of unused variables fcall
6281 and next_pc.
6282
6283 * expr.c (extract_scalar_init): #if 0 prototype and function
6284 definition.
6285
6286 * init.c (expand_aggr_init_1): Remove unused variable init_type.
6287 (build_new_1): Remove unused variable t.
6288
6289 * pt.c (instantiate_class_template): Remove unused variable newtag;
6290 cast called function return value to void.
6291 (do_decl_instantiation): Remove unused variables name and fn.
6292
6293 * tree.c (get_type_decl): Add default return to shut up compiler from
6294 complaining control reaches end of non-void function.
6295
6296 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
6297
6298 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
6299
6300 * call.c (default_parm_conversions): Remove prototype definition.
6301 (build_method_call): Remove unused variable result.
6302 (build_over_call): Add default case in enumeration switch.
6303
6304 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
6305
6306 * decl2.c (lang_decode_option): Change j's type to size_t.
6307
6308 * tree.c (layout_vbasetypes): record_align and desired_align are of
6309 type unsigned int; const_size and nonvirtual_const_size likewise.
6310
6311 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
6312
6313 * parse.y (new_initializer): Make sure all initializers are
6314 lists.
6315
6316 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
6317
6318 * decl2.c (import_export_decl): Mark tinfo functions for
6319 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
6320
6321 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
6322
6323 * method.c: Fix typo.
6324
6325 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6326
6327 * method.c: Include "system.h" to get stdlib.h, stdio.h,
6328 ctype.h, string.h, etc.
6329 (issue_nrepeats): Add default case in enumeration switch.
6330 (check_btype): Likewise.
6331 (process_overload_item): Likewise.
6332
6333 * Makefile.in (method.o): Depend on system.h.
6334
6335 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6336
6337 * lex.c (do_scoped_id): Fix parenthesizing.
6338
6339 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
6340
6341 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
6342 FLAG_RTTI is unset, initialize type info machinery and continue
6343 with FLAG_RTTI enabled.
6344 (get_typeid): Ditto.
6345
6346 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
6347
6348 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
6349 from B.
6350
6351 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
6352
6353 * pt.c (finish_member_template_decl): Deal more gracefully with
6354 invalid declarations.
6355
6356 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
6357
6358 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
6359 cp-tree.h: Clean up more old overloading code, old RTTI code, and
6360 some formatting quirks.
6361
6362 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
6363 method.c, pt.c, ptree.c, typeck.c: Remove support for
6364 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
6365 * class.h: Remove.
6366 * Makefile.in: Adjust.
6367
6368 * pt.c (unify): Don't allow reduced cv-quals when strict.
6369
6370 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
6371 *type_unification* and unify.
6372
6373 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
6374
6375 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
6376 (nested_name_specifier): And add it before this use.
6377 (typename_sub0): And this use. Also add use without the keyword.
6378 (typename_sub1): Likewise.
6379 * pt.c (instantiate_class_template): Don't actually instantiate
6380 anything if our type uses template parms.
6381
6382 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
6383
6384 * decl.c (start_function): Don't call temporary_allocation for a
6385 nested function.
6386
6387 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6388
6389 * pt.c (instantiate_class_template): Don't mess with friends if
6390 our type uses template parms.
6391
6392 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
6393
6394 * parse.y (nested_name_specifier): Use explicit_template_type.
6395 (typename_sub): Allow a template_type, an explicit_template_type,
6396 or an implicit template type at the end.
6397 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
6398 * decl.c (make_typename_type): Handle template-id where the name
6399 is a TEMPLATE_DECL.
6400 * call.c (build_scoped_method_call): Handle member template
6401 destructor call.
6402 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
6403 destructor is represented by the type.
6404
6405 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
6406 * parse.y (nested_name_specifier): Add 'template' case.
6407 (explicit_template_type): New rule.
6408 (typename_sub): Use it.
6409 * decl.c (make_typename_type): Handle getting a template-id for NAME.
6410 * pt.c (tsubst): Likewise.
6411
6412 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
6413
6414 * pt.c (add_to_template_args): Fix thinko.
6415 (instantiate_class_template): Call it later.
6416
6417 * pt.c (get_class_bindings): Add outer_args parm.
6418 (most_specialized_class): Likewise.
6419 (instantiate_class_template): Pass it.
6420 (more_specialized_class): Likewise.
6421 (lookup_template_class): Get context from template if none
6422 was specified.
6423 (finish_member_template_decl): Don't do anything with a
6424 partial specialization.
6425 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
6426 AGGREGATE_TYPE_P.
6427 * class.c (finish_struct): Member class templates have already been
6428 checked for name clashes.
6429 * decl.c (pushdecl_with_scope): Handle pushing at class level.
6430
6431 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
6432
6433 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
6434 (tsubst, *_PARM): Support multiple levels of template classes.
6435 (instantiate_class_template): Look up the pattern from the
6436 original template.
6437 (lookup_template_class): Handle getting a template for d1.
6438 (push_template_decl): Correct setting of 'primary'.
6439 (reduce_template_parm_level): Add 'levels' parm.
6440 (finish_member_template_decl): Support member class templates.
6441 (template_class_depth): Handle multiple levels.
6442 * parse.y (component_decl_1, fn.def2): Remove member template case.
6443 (component_decl): Add member template cases.
6444 * decl2.c (check_member_template): We now handle member template
6445 classes.
6446 * decl.c (pushtag): Handle member templates.
6447 * method.c (do_inline_function_hair): Don't touch
6448 IDENTIFIER_GLOBAL_VALUE.
6449 * init.c (build_offset_ref): If name isn't an identifier, just
6450 return it.
6451 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
6452
6453 * typeck.c (get_delta_difference): Do adjust for conversions to
6454 and from virtual base.
6455
6456 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
6457
6458 * typeck.c (get_delta_difference): Give hard error for conversion
6459 from virtual base.
6460
6461 * cp-tree.h: Tweak formatting.
6462
6463 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
6464
6465 * decl.c (push_namespace): Handle redeclaration error.
6466
6467 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
6468 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
6469 (NAMESPACE_BINDING): New macro.
6470 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
6471 * *.c: Use them.
6472
6473 * pt.c (push_template_decl): Use innermost_args.
6474
6475 * decl.c (get_unique_name): Tweak from earlier in the name.
6476
6477 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
6478
6479 * cp-tree.def: Add CPLUS_BINDING node.
6480 * cp-tree.h (tree_binding): new struct
6481 (BINDING_SCOPE, BINDING_VALUE): new macros
6482 (current_namespace, global_namespace): declare extern
6483 (struct lang_decl_flags): new field in_namespace
6484 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
6485 (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
6486 (TREE_INDIRECT_USING): new macro
6487 * decl2.c (current_namespace, global_namespace): Declare. The
6488 value is a NAMESPACE_DECL now, not a TREE_LIST.
6489 (is_namespace_ancestor, namespace_ancestor):new static functions.
6490 (add_using_namespace, ambiguous_decl): likewise.
6491 (lookup_using_namespace): new support function for lookup_name.
6492 (qualified_lookup_using_namespace): new support function for
6493 do_scoped_id and lookup_namespace_name
6494 (get_namespace_id): mark as obsolete.
6495 (current_namespace_id): Likewise.
6496 (do_namespace_alias): Implement.
6497 (do_using_directive): Implement as call to add_using_namespace.
6498 * decl.c (binding_for_name): new function.
6499 (push_namespace, pop_namespace): implement.
6500 (push_decl): don't install a FUNCTION_DECL in the global branch.
6501 (lookup_namespace_name): implement using qualified lookup.
6502 (lookup_name_real): For global scoping, lookup in
6503 global_namespace. For namespace scoping, lookup in given
6504 namespace. For unscoped lookup, iterate over namespace,
6505 considering using directives.
6506 (init_decl_processing): initialize global_namespace.
6507 (grokvardecl): Build assembler name as static name for globals.
6508 (grokdeclarator): Remove old namespace mangling.
6509 (xref_tag): When installing a global binding for the
6510 tag, make sure we have an identifier.
6511 * method.c (build_overload_nested_name): mangle namespaces.
6512 (build_qualified_name): Likewise.
6513 (build_decl_overload_real): Likewise.
6514 * lex.c (build_lang_decl): set namespace for new declaration to
6515 current_namespace.
6516 (do_scoped_id): find global names in global or current
6517 namespace, or using qualified namespace lookup, depending on
6518 context.
6519 * init.c (build_member_call): When scope is namespace, use
6520 build_x_function_call instead.
6521 (build_offset_ref): When scope is namespace, collapse processing
6522 to lookup_namespace_name instead.
6523 * error.c (dump_decl): Support NAMESPACE_DECL.
6524 * decl.c (pushdecl): Bind globals to current namespace.
6525 (push_overloaded_decl): Likewise.
6526 (lookup_tag): Likewise.
6527 (lookup_name_current_level): Likewise.
6528 (xref_tag): Likewise.
6529 (start_function): Likewise.
6530 * lex.c (do_identifier): Likewise.
6531 (identifier_typedecl_value): Likewise.
6532 (real_yylex): Likewise.
6533 * method.c (do_inline_function_hair): Likewise.
6534 * parse.y (unscoped): Likewise.
6535 * pt.c (check_explicit_specialization): Likewise.
6536 (lookup_template_class): Likewise.
6537 * rtti.c (call_void_fn): Likewise.
6538 * sig.c (build_sigtable): Likewise.
6539 * ptree.c (lang_print_xnode): New function.
6540
6541 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
6542
6543 * pt.c (instantiate_class_template): Don't instantiate if pedantic
6544 and the args use template parms.
6545
6546 * pt.c (push_tinst_level): If the instantiaton uses template parms,
6547 fail silently.
6548 * decl.c (xref_basetypes): Do call complete_type for basetypes
6549 that involve template parameters.
6550
6551 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
6552
6553 * typeck2.c (process_init_constructor): Fix labeled init check.
6554
6555 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
6556
6557 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
6558 argument to tsubst and friends.
6559
6560 * pt.c (tsubst, FUNCTION_DECL): Tidy.
6561
6562 * typeck.c (build_x_function_call): Handle static member function
6563 templates like non-templates. Handle friend templates like normal
6564 function templates.
6565 * pt.c (tsubst, *_PARM): Don't use orig_level.
6566 (get_bindings): Don't call add_to_template_args.
6567 (instantiate_template): Likewise.
6568 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
6569 * ptree.c (print_lang_type): Print index/level for template parms.
6570
6571 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
6572
6573 * Make-lang.in (cc1plus): Note that cc1plus depends on
6574 cp/cp-tree.h and cp/cp-tree.def.
6575
6576 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
6577 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
6578 position in a template parameter list.
6579 * cp-tree.h (template_parm_index): New structure, used as the tree
6580 structure for a TEMPLATE_PARM_INDEX.
6581 (TEMPLATE_PARM_IDX): New macro.
6582 (TEMPLATE_PARM_LEVEL): Likewise.
6583 (TEMPLATE_PARM_DESCENDANTS): Likewise.
6584 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
6585 (TEMPLATE_PARM_DECL): Likewise.
6586 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6587 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
6588 (TEMPLATE_TYPE_DECL): Likewise.
6589 (TEMPLATE_CONST_IDX): Remove.
6590 (TEMPLATE_CONST_LEVEL): Likewise.
6591 (TEMPLATE_CONST_SET_INFO): Likewise.
6592 (TEMPLATE_TYPE_SET_INFO): Likewise.
6593 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
6594 node.
6595 (TEMPLATE_TYPE_LEVEL): Likewise.
6596 * decl.c (decls_match): Call comp_template_parms, rather than
6597 expanding it inline.
6598 (duplicate_decls): If two template declarations are being merged,
6599 then their TEMPLATE_INFOs should be merged as well.
6600 (grokfndecl): Save template-id information when declaring a friend
6601 with explicit template arguments. Pass arguments to
6602 check_explicit_specialization via correct convention; at some
6603 point check_explicit_specialization changed, but these call-sites
6604 did not.
6605 (grokdeclarator): Tidy up slightly.
6606 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
6607 two template functions with the same DECL_ASSEMBLER_NAME the same,
6608 since the names are not yet mangled.
6609 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
6610 TEMPLATE_CONST_PARM.
6611 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
6612 decl for a non-type parameter, rather than printing `<tparm ...>'.
6613 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
6614 (do_friend): Deal with template friends.
6615 * lex.c (do_pending_inlines): Call
6616 maybe_begin_member_template_processing, rather than
6617 conditionally calling begin_member_template_processing.
6618 (process_next_inline): Likewise. Call
6619 maybe_end_member_template_processing, rather than
6620 conditionally calling end_member_template_processing.
6621 (do_pending_defargs): Likewise.
6622 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
6623 TEMPLATE_CONST_PARM.
6624 * method.c (build_mangled_template_parm_index): New function.
6625 (build_overload_value): Use it.
6626 (build_overload_name): Likewise.
6627 * pt.c (finish_member_template_decl): Allow friend declarations.
6628 (template_class_depth): New function.
6629 (is_member_template): Rename, and modify, to become...
6630 (is_member_or_friend_template): New function.
6631 (end_member_template_processing): Rename, and modify, to become...
6632 (maybe_end_member_template_processing).
6633 (build_template_parm_index): New function.
6634 (reduce_template_parm_level): New function.
6635 (process_template_parm): Modify to use build_template_parm_index.
6636 (push_template_decl): Deal with friend templates.
6637 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
6638 TEMPLATE_CONST_PARM.
6639 (tsubst_friend_function): New function.
6640 (instantiate_class_template): Generate the DECL_FRIENDLIST
6641 for a new instantiation by using tsubst_friend_function rather
6642 than just tsubst.
6643 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
6644 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
6645 appropriate new macros. Use reduce_template_parm_level to
6646 generate lower-level template parameters. Handle tsubst'ing into
6647 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
6648 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
6649 templates. Similarly for the template parameters for a new
6650 template.
6651 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
6652 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
6653 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
6654 (get_bindings): Call add_to_template_args if necessary.
6655 (instantiate_decl): Handle instantiations of friend templates.
6656 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
6657 TEMPLATE_TYPE_PARM as a list of fields; it's not!
6658 * spew.c (yylex): Do a little manual constant propogation to
6659 clarify the code.
6660
6661 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
6662
6663 * error.c: Include sys/types.h.
6664
6665 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
6666
6667 * method.c (build_mangled_name): Start CPP directives in column zero.
6668
6669 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6670
6671 * typeck2.c (process_init_constructor): Sorry about non-trivial
6672 labeled initializers.
6673 * parse.y (initlist): Reenable labeled initializers.
6674
6675 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6676
6677 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
6678 all callers changed. Rely on the new parameter instead of arg
6679 being a TREE_LIST when determine whether we are working inside
6680 template template parameter. Clean up is_type test.
6681
6682 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
6683
6684 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
6685 * typeck2.c (initializer_constant_valid_p): Allow conversions
6686 between pointers and refrerences.
6687
6688 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
6689
6690 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
6691 if pedantic || warn_pointer_arith.
6692
6693 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6694
6695 * pt.c (unify): Handle TEMPLATE_DECL.
6696
6697 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
6698
6699 * cp-tree.h (strip_attrs): Remove decl.
6700
6701 1998-02-18 Doug Evans <devans@cygnus.com>
6702
6703 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
6704 Update olddecl's attributes too.
6705 (strip_attrs): Remove function.
6706 * typeck.c (common_type): Call merge_machine_type_attributes.
6707
6708 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
6709
6710 * parse.y (initdcl0_innards): New grammar symbol.
6711 (nomods_initdecls, nomods_initdcl0): Change type from itype to
6712 none, since the resulting value is never used.
6713 (parse_decl): New function.
6714 (datadef): Remove redundant actions.
6715 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
6716 * parse.c: Regenerated.
6717
6718 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
6719
6720 * parse.y (simple_stmt): Use getdecls() to check for decl.
6721
6722 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
6723
6724 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
6725 macros.
6726 (c++.install-common): Install c++filt properly as native or as cross
6727 variant.
6728 (c++.uninstall): Add c++filt.
6729
6730 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6731
6732 * call.c (standard_conversion): Fix multi-level ptr conversions.
6733
6734 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
6735
6736 * init.c (build_new): Propagate error_mark_node up.
6737
6738 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
6739
6740 * parse.y (simple_stmt): If the condition isn't a declaration,
6741 start the controlled block after the test.
6742
6743 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6744
6745 * call.c (build_over_call): Convert builtin abs, labs and fabs to
6746 tree-codes.
6747 * decl.c (init_decl_processing): Reenable abs, labs and fabs as
6748 builtins.
6749
6750 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6751
6752 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
6753
6754 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6755
6756 * cp-tree.h: Add access_protected_virtual_node.
6757 * class.c (init_class_processing): Initialize it.
6758 * decl.c (xref_basetypes): Use it.
6759 * parse.y (base_class_access_list): Likewise.
6760
6761 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
6762 (c++.install-common): Install c++filt.
6763
6764 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6765
6766 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
6767
6768 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
6769
6770 * call.c (reference_binding): Use comptypes when comparing
6771 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
6772
6773 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
6774
6775 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
6776 (really_overloaded_fn): Move check here from is_overloaded_fn.
6777 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
6778
6779 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
6780
6781 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
6782 conversions.
6783
6784 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
6785
6786 * cp-tree.h (push_template_decl): Return the decl passed in, or an
6787 equivalent duplicate.
6788 * decl.c (pushtag): Use the return value from push_template_decl.
6789 (duplicate_decls): When duplicating a template declaration, merge
6790 the DECL_TEMPLATE_RESULTs as well.
6791 (make_implicit_typename): Don't try to dive into typename types to
6792 find a context for making a new implicit typename.
6793 (start_decl): Use the return value from push_template_decl.
6794 (grokdeclarator): Complain about declarations list `const operator
6795 int'. Since we don't correctly handle in-class initializations of
6796 non-static data members, complain about this (now illegal)
6797 practice. Issue an error for initializations of non-const statics
6798 since that is illegal as well, and since we don't handle that case
6799 correctly either.
6800 (start_function): Use the return value from push_template_decl.
6801 (start_method): Likewise.
6802 * decl2.c (grokfield): Likewise. Since the change to
6803 grokdeclarator ensures that all initialized fields are in fact
6804 static, remove a redundant test for TREE_PUBLIC.
6805 * parse.y (initlist): Disable labeled initializers since they do
6806 not work as per the documentation, and since they do not use the
6807 same syntax as the C front end.
6808 * pt.c (push_template_decl): Return the decl passed in, or an
6809 equivalent duplicate.
6810 (lookup_template_class): When searching in a nested context,
6811 use the right arguments.
6812 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
6813 * typeck.c (build_component_ref): Assign the correct type to the
6814 result of build_vfn_ref.
6815
6816 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
6817
6818 * pt.c (convert_nontype_argument): Fix typo.
6819 (check_explicit_specialization): Allow old-style specialization
6820 of class template members.
6821
6822 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
6823 Manfred Hollstein <manfred@s-direktnet.de>
6824
6825 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
6826 when deciding to override DECL_ASSEMBLER_NAME.
6827
6828 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
6829
6830 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
6831 * cp-tree.h (flag_do_squangling): Add declaration.
6832 * lang-options.h: Add -fsquangle and -fno-squangle.
6833 * method.c: Add macros and static variables for squangling.
6834 (build_overload_name): Rename to build_mangled_name, add logic for B
6835 compression, and split into process_modifiers and
6836 process_overload_item.
6837 (process_modifiers): New function, to handle constant, reference,
6838 and pointer types.
6839 (process_overload_item): New function, handles issue of type codes.
6840 (build_overload_name): New function, start squangling and call
6841 build_mangled_name.
6842 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
6843 (start_squangling): New function to initialize squangling structs.
6844 (end_squangling): New function to destroy squangling structs.
6845 (nrepeats): Rename variable to Nrepeats.
6846 (issue_nrepeats): New function for issuing 'n' type repeats.
6847 (check_ktype): New function to check for type K name compression.
6848 (build_overload_nested_name): Add a check for K name compression.
6849 (build_qualified_name): Add a check for K name compression and don't
6850 use DECL_ASSEMBLER_NAME when squangling is on.
6851 (check_btype): New function, checks for B type compression.
6852 (build_static_name, build_decl_overload_real): Initiate squangling.
6853 (build_typename_overload, build_overload_with_type): Initiate
6854 squangling
6855
6856 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
6857
6858 * method.c (make_thunk): Avoid name buffer overflow.
6859
6860 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
6861
6862 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
6863 don't define them yet.
6864
6865 * parse.y (nomods_initdcl0): Add constructor_declarator case.
6866
6867 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6868
6869 * config-lang.in (diff_excludes): Use basename only.
6870
6871 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
6872
6873 * tinfo2.cc: Add tinfo for signed char.
6874
6875 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
6876
6877 * search.c (compute_access): Handle protected constructors in derived
6878 classes as accessible.
6879
6880 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
6881
6882 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
6883 Call convert_from_reference sooner.
6884
6885 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
6886
6887 * cvt.c (ocp_convert): Obtain the constant values from constant
6888 decls even if the destination type is the same as the type of the
6889 decl.
6890
6891 * decl2.c (finish_file): Make sure that static inlines with
6892 definitions are not marked DECL_EXTERNAL before returning.
6893
6894 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6895
6896 * decl.c: Lose arg_looking_for_template.
6897 (lookup_name_real): Likewise.
6898 * parse.y: Lose processing_template_arg, template_arg1
6899 (primary): Likewise.
6900 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
6901
6902 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6903
6904 * error.c (dump_decl): Fix type of default arguments for template
6905 template parameters and nontype template parameters.
6906 * parse.y (template_parm): Handle invalid default template
6907 template arguments here.
6908
6909 * parse.y (template_parm): Use template_arg instead of PTYPENAME
6910 for default template template argument.
6911 * pt.c (coerce_template_parms): Merge default template argument
6912 codes. Can treat RECORD_TYPE as template name if it is implicitly
6913 created. Fix argument index in error message.
6914 * typeck.c (comptypes): Merge template argument comparison codes in
6915 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
6916
6917 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
6918
6919 * lex.c (file_name_nondirectory): Also check for '/'.
6920
6921 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
6922
6923 * parse.y (primary): Deal with statement-expressions in
6924 templates.
6925 * pt.c (tsubst_copy): Handle BIND_EXPR.
6926 * tree.c (mapcar): Likewise.
6927
6928 * call.c (add_template_candidate_real): Pass extra parameter to
6929 fn_type_unification.
6930 * cp-tree.h (fn_type_unification): Add parameter.
6931 * pt.c (fn_type_unification): Add additional parameter to deal with
6932 static member functions.
6933 (get_bindings): Deal with static member functions.
6934
6935 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
6936 (revert_static_member_fn): Declare.
6937 * decl.c (revert_static_member_fn): Remove declaration. Change
6938 linkage from internal to external.
6939 (cp_finish_decl): Deal with virtual functions in classes local to
6940 template functions.
6941 * decl2.c (finish_file): Don't forget to emit increment/decrement
6942 expressions in initializers for file-scope variables.
6943 * parse.y (typename_sub2): If the typename doesn't names a
6944 template, rather than a type, issue an error message.
6945 * pt.c (check_explicit_specialization): Handle specializations of
6946 static member functions.
6947 (coerce_template_parms): Handle offset references to lists of
6948 member functions.
6949 * search.c (note_debug_info_needed): Don't crash when handed a
6950 type which is being defined.
6951 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
6952 that can happen with some illegal code.
6953
6954 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6955
6956 * call.c (user_harshness): Initialize `code' to 0.
6957 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
6958 (null_ptr_cst_p): Add parentheses around && within ||.
6959 (standard_conversion): Likewise.
6960 (z_candidate): Likewise.
6961 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
6962 (build_object_call): Likewise for `mem_args'.
6963 (build_new_op): Likewise for `mem_arglist'. Add `return' from
6964 default case in enumeration switch.
6965
6966 * class.c (build_vtable_entry): Add explicit braces to avoid
6967 ambiguous `else'.
6968 (build_class_init_list): Likewise.
6969 (finish_struct_1): Initialize `width' to 0.
6970 (instantiate_type): Initialize `name' to NULL_TREE. Add
6971 explicit braces to avoid ambiguous `else'.
6972
6973 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
6974 `else'.
6975
6976 * decl.c (grok_reference_init): Eliminate unused parameter, all
6977 callers changed.
6978 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
6979 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
6980 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
6981 (grokdeclarator): Add parentheses around && within ||. Add
6982 explicit braces to avoid ambiguous `else'.
6983 (grokparms): Initialize `type' to NULL_TREE.
6984 (xref_tag): Remove unused label `just_return'.
6985 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
6986 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
6987 (hack_incomplete_structures): Add parentheses around assignment
6988 used as truth value.
6989
6990 * decl2.c (coerce_delete_type): Hide definition of `e3'.
6991
6992 * error.c: Include <stdlib.h>.
6993 (dump_expr): Change the type of `i' to size_t. Remove unused
6994 label `error'.
6995
6996 * except.c (init_exception_processing): Remove unused variable `d'.
6997 (expand_throw): Likewise for `label'.
6998
6999 * friend.c (add_friends): Add explicit braces to avoid ambiguous
7000 `else'.
7001
7002 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
7003 (sort_base_init): Likewise for `binfo'.
7004 (expand_member_init): Likewise for `rval'.
7005 (build_member_call): Add parentheses around assignment used as
7006 truth value.
7007 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
7008 (build_new): Initialize `nelts' to NULL_TREE. Initialize
7009 `old_immediate_size_expand' to 0.
7010 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
7011 (build_vec_delete_1): Remove unused variable `block'.
7012 (expand_vec_init): Initialize `itype' to NULL_TREE.
7013
7014 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
7015 declaration of `index' and `rindex' with autoconf macros.
7016 (reinit_parse_for_expr): Remove unused variables
7017 `look_for_semicolon' and `look_for_lbrac'.
7018 (cons_up_default_function): Initialize `args' to NULL_TREE.
7019 (readescape): Initialize `firstdig' to 0.
7020 (real_yylex): Add parentheses around assignment used as truth value.
7021
7022 * method.c: Include <strings.h> if we don't have <string.h>.
7023 Protect declaration of `index' with autoconf macro.
7024
7025 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
7026 Initialize `type' to NULL_TREE.
7027 (structsp): Remove unused variable `id'.
7028
7029 * pt.c (coerce_template_parms): Add explicit braces to avoid
7030 ambiguous `else'.
7031 (lookup_template_class): Initialize `template' to NULL_TREE.
7032 (instantiate_class_template): Remove unused variable `name' and `e'.
7033 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
7034 (do_poplevel): Initialize `saved_warn_unused' to 0.
7035 (type_unification): Remove unused varable `parm'.
7036 (unify): Likewise for `j'.
7037
7038 * repo.c (init_repo): Add parentheses around assignment used as
7039 truth value.
7040 (finish_repo): Remove unused varable `p'.
7041
7042 * search.c (get_binfo): Initiize `type' to NULL_TREE.
7043 (get_base_distance): Likewise.
7044 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
7045 and `new_v' to NULL_TREE.
7046 (lookup_fnfields): Likewise for `rval_binfo_h'.
7047 (breadth_first_search): Add parentheses around assignment used as
7048 truth value.
7049 (get_template_base): Initialize `type' to NULL_TREE.
7050
7051 * sig.c (append_signature_fields): Initialize `last_mfptr' to
7052 NULL_TREE.
7053 (build_signature_table_constructor): Likewise for
7054 `last_rhs_field', `pfn' and `vt_off'.
7055 (build_sigtable): Likewise for `init'.
7056
7057 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
7058 (propagate_binfo_offsets): Likewise for `delta'.
7059 (hash_tree_cons): Initialize hashcode to 0.
7060 (can_free): Likewise for `size'.
7061 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
7062
7063 * typeck.c (convert_sequence): Hide prototype.
7064 (common_type): Add explicit braces to avoid ambiguous `else'.
7065 (comp_target_types): Likewise.
7066 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
7067 (build_function_call_real): Add explicit braces to avoid ambiguous
7068 `else'.
7069 (convert_arguments): Initialize `called_thing' to 0.
7070 (convert_for_initialization): Initialize `savew' and `savee' to 0.
7071
7072 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
7073 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
7074 (build_x_arrow): Likewise for `last_rval'.
7075
7076 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
7077
7078 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
7079
7080 * decl.c (init_decl_processing): Use set_sizetype.
7081 * decl2.c (sizetype): Don't declare.
7082 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
7083 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
7084 (build_component_addr, unary_complex_lvalue): Likewise.
7085 * rtti.c (expand_class_desc): Likewise.
7086 * class.c (get_vfield_offset): Likewise.
7087
7088 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
7089
7090 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
7091 early to avoid bogus error. Handle overloaded function
7092 names provided as template arguments correctly.
7093 (coerce_template_parms): Don't mishandle overloaded functions when
7094 dealing with template template parameters.
7095 (lookup_template_class): Issue an error message, rather than
7096 crashing, when the TYPE_DECL provided is not a template type.
7097
7098 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
7099
7100 * class.c (instantiate_type): Don't just return a known type if
7101 it's wrong.
7102
7103 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
7104
7105 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
7106 since that code could never be reached.
7107
7108 * error.c (dump_decl): Avoid aborting in the midst of printing an
7109 error message about an illegal template declaration.
7110
7111 * parse.y (structsp): Print an error message, rather than crashing,
7112 when a class-head does not name a class.
7113
7114 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
7115 template arguments as a g++ extension.
7116
7117 * cp-tree.def (ALIGNOF_EXPR): New tree code.
7118 * decl2.c (grok_alignof): If processing_template_decl, just store
7119 the expression.
7120 * typeck.c (c_alignof): Likewise.
7121 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
7122 * error.c (dump_expr): Likewise.
7123 * pt.c (tsubst_copy): Likewise.
7124 * tree.c (cp_tree_equal): Likewise.
7125 * pt.c (uses_template_parms): Correctly determine whether or not a
7126 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
7127 folding can be done.
7128
7129 * cp-tree.h (grok_enum_decls): Remove type parameter.
7130 * decl.c (grok_enum_decls): Likewise.
7131 * decl2.c (grok_x_components): Call grok_enum_decls
7132 unconditionally, since it will do nothing if there is no
7133 current_local_enum. Use the new calling sequence.
7134 * pt.c (tsubst_enum): Use the new calling sequence for
7135 grok_enum_decls.
7136
7137 * decl.c (start_function): Make member functions of local classes
7138 in extern inline functions have comdat linkage here...
7139 (grokdeclarator): Rather than here.
7140
7141 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
7142
7143 * pt.c (convert_nontype_argument): Use decl_constant_value.
7144
7145 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
7146
7147 * call.c (add_template_candidate_real): New function.
7148 (add_template_candidate): Use it.
7149 (add_template_conv_candidate): Likewise.
7150 (joust): Pass extra argument to more_specialized.
7151 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
7152 (is_local_class): Remove.
7153 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
7154 * cp-tree.h (is_local_class): Remove.
7155 (perform_array_to_pointer_conversion): Likewise.
7156 (finish_member_template_decl): Add.
7157 (check_explicit_specialization): Return a tree, not an int.
7158 (more_specialized): Take additional argument.
7159 (get_bindings): Likewise.
7160 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
7161 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7162 (perform_array_to_pointer_conversion): Remove.
7163 * decl.c (saved_scope): Add processing_specialization,
7164 processing_explicit_instantiation fields.
7165 (maybe_push_to_top_level): Save them.
7166 (pop_from_top_level): Restore them.
7167 (grokfndecl): Use new return value from
7168 check_explicit_specialization.
7169 (start_decl): Don't check flag_guiding_decls before pushing
7170 decls.
7171 (cp_finish_decl): Remove previous (bogus) change.
7172 (grok_declarator): Use decl_function_context rather than
7173 is_local_class.
7174 * decl2.c (finish_file): Pass extra argument to get_bindings.
7175 (build_expr_from_tree): Let build_x_component_ref check
7176 validity of arguments rather than doing it here.
7177 * lex.c (cons_up_default_function): Remove code fooling with
7178 processing_specialization, processing_explicit_instantiation
7179 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
7180 * method.c (build_overload_identifier): Mangle local classes in
7181 template functions correctly.
7182 * parse.y (finish_member_template_decl): Move to pt.c.
7183 * pt.c (finish_member_template_decl): Moved here from parse.y.
7184 (print_candidates): New function.
7185 (determine_specialization): Change interface. Properly look for
7186 most specialized versions of template candidates.
7187 (check_explicit_specialization): Fully process explicit
7188 instantiations.
7189 (push_template_decl): Avoid looking at CLASSTYPE fields in
7190 FUNCTION_DECLS.
7191 (determine_overloaded_function): Remove.
7192 (convert_nontype_argument): Change name from
7193 convert_nontype_parameter. Use determine_overloaded_function
7194 instead of instantiate_type.
7195 (mangle_class_name_for_template): Handle type contexts as well as
7196 function contexts.
7197 (classtype_mangled_name): Likewise.
7198 (lookup_template_class): Likewise.
7199 (tsubst): Likewise.
7200 (more_specialized): Take explict template arguments as a
7201 parameter.
7202 (most_specialized): Likewise.
7203 (get_bindings): Likewise. Check that return types match before
7204 proclaiming a function a match.
7205 (do_decl_instantiation): Remove code searching for function to
7206 instantiate; that is now done in check_explicit_specialization.
7207 (add_maybe_template): Pass extra argument to get_bindings.
7208 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
7209 implementation.
7210 * typeck.c (build_component_ref): Check for invalid arguments.
7211
7212 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
7213
7214 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
7215 return_target and call_target are equivalent.
7216
7217 * pt.c (type_unification_real): Just accept function parms that
7218 don't use any template parms.
7219
7220 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
7221
7222 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
7223 unset DECL_NOT_REALLY_EXTERN.
7224
7225 * parse.y (typename_sub*): Fix std::.
7226
7227 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
7228
7229 * error.c (dump_decl): Fix type default template args.
7230 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
7231
7232 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
7233
7234 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
7235 (file_name_nondirectory): Use.
7236
7237 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7238
7239 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
7240 that are not really present. Substitute default arguments in
7241 template template arguments. Correctly convert TEMPLATE_DECL to
7242 TEMPLATE_TEMPLATE_PARM.
7243 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
7244 are no longer treated specially here.
7245 * parse.y (template_template_parm): Fix copy error.
7246 * decl.c (grokdeclarator): Warn about missing `typename' for nested
7247 type created from template template parameters.
7248 * parse.y (bad_parm): Likewise
7249
7250 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
7251 (push_nested_class): Likewise.
7252 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
7253 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
7254 (copy_template_template_parm): Declare.
7255 * decl.c (arg_looking_for_template): New variable.
7256 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
7257 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
7258 node if arg_looking_for_template is nonzero.
7259 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
7260 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
7261 (grokdeclarator): Handle TEMPLATE_DECL.
7262 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
7263 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
7264 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
7265 (dump_decl): Handle unnamed template type parameters.
7266 Handle template template parameters.
7267 (dump_function_name): Handle template template parameters.
7268 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
7269 Handle TEMPLATE_TEMPLATE_PARM.
7270 * method.c (build_template_template_parm_names): New function.
7271 (build_template_parm_names): Handle TEMPLATE_DECL.
7272 (build_overload_nested_name, build_overload_name):
7273 Handle TEMPLATE_TEMPLATE_PARM.
7274 * parse.y (maybe_identifier): New nonterminal.
7275 (template_type_parm): Use it.
7276 (template_template_parm, template_arg1): New nonterminal.
7277 (template_parm): Add template_template_parm rules.
7278 (template_arg): Set processing_template_arg.
7279 (template_arg1): Rules moved from template_arg.
7280 (primary, nonnested_type): Set arg_looking_for_template if we are
7281 processing template arguments.
7282 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
7283 (process_template_parm): Handle template template parameters.
7284 (coerce_template_parms, comp_template_args): Likewise.
7285 (mangle_class_name_for_template, lookup_template_class): Likewise.
7286 (uses_template_parms): Handle TEMPLATE_DECL and
7287 TEMPLATE_TEMPLATE_PARM.
7288 (current_template_args): Handle TEMPLATE_DECL.
7289 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
7290 * search.c (dfs_walk, dfs_record_inheritance):
7291 Handle TEMPLATE_TEMPLATE_PARM.
7292 * tree.c (copy_template_template_parm): New function.
7293 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
7294 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
7295
7296 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
7297
7298 * decl.c (start_decl): Don't allow duplicate definitions of static
7299 data members.
7300
7301 * call.c (build_user_type_conversion_1): Handle user-defined
7302 template conversion operators correctly.
7303
7304 * decl2.c (build_expr_from_tree): Issue an error message if the
7305 object in a COMPONENT_REF is a TEMPLATE_DECL.
7306
7307 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
7308
7309 * class.c (is_local_class): New function.
7310 * cp-tree.h (is_local_class): Declare it.
7311 (last_tree): Likewise.
7312 (begin_tree): Likewise.
7313 (end_tree): Likewise.
7314 (lookup_template_class): Change prototype.
7315 * decl.c (cp_finish_decl): Check for NULL where necesary.
7316 Consider FUNCTION_DECLS to declare objects with top-level binding,
7317 when calling make_decl_rtl.
7318 (grokdeclarator): Give members of local classes internal linkage.
7319 (start_function): Remove declaration of last_tree.
7320 (finish_function): Set flag_keep_inline_functions around call to
7321 rest_of_compilation if we are processing a member function in a
7322 local class.
7323 (start_method): Call push_template_decl for member functions of
7324 local classes in template functions.
7325 * decl2.c (import_export_decl): Don't give external linkage to
7326 instantiations of templates with internal linkage.
7327 * parse.y (last_tree): Remove declaration.
7328 (template_type): Pass extra parameter to lookup_template_class.
7329 (self_template_type): Likewise.
7330 (structsp): Move call to reset_specialization into left_curly.
7331 (left_curly): Call reset_specialization, and begin_tree.
7332 * pt.c (saved_trees): New variable.
7333 (mangle_class_name_for_template): Change prototype. Use
7334 additional function context to name local classes in templates
7335 correctly.
7336 (classtype_mangled_name): Pass the context.
7337 (push_template_decl): Handle local classes and templates, and
7338 member functions for such classes.
7339 (convert_nontype_parameter): Fix handling of pointer-to-member
7340 constants.
7341 (lookup_template_class): Handle local classes in templates.
7342 (tsubst): Likewise. Don't assume that template instantiations
7343 have external linkage; pay attention to the template declaration.
7344 (mark_decl_instantiated): Likewise.
7345 (begin_tree): New function.
7346 (end_tree): Likewise.
7347
7348 * decl.c (xref_basetypes): Don't call complete_type for basetypes
7349 that involve template parameters; that can lead to infinite
7350 recursion unnecessarily.
7351
7352 * pt.c (register_specialization): Do not register specializations
7353 that aren't ready to be registered yet.
7354 (check_explicit_specialization): Handle explicit specialization of
7355 constructors and destructors.
7356 (build_template_decl): New function.
7357 (push_template_delc): Handle out-of-class specializations of
7358 member templates.
7359
7360 * pt.c (check_explicit_specialization): Set up the template
7361 information before registering the specialization.
7362 (coerce_template_parms): Fix thinko.
7363 (tsubst): Handle specializations of member templates correctly.
7364
7365 * class.c (finish_struct_methods): Remove calls to
7366 check_explicit_specialization from here.
7367 (finish_struct): And insert them here.
7368 * cp-tree.h (perform_qualification_conversions): New function.
7369 (perform_array_to_pointer_conversion): Likewise.
7370 (begin_explicit_instantiation): Likewise.
7371 (end_explicit_instantiation): Likewise.
7372 (determine_specialization): Renamed from
7373 determine_explicit_specialization.
7374 (comp_template_parms): New function.
7375 (processing_explicit_instantiation): New variable.
7376 * cvt.c (perform_qualification_conversions): New function.
7377 (perform_array_to_pointer_conversion): Likewise.
7378 * decl.c (duplicate_decls): Don't consider template functions
7379 alike unless they have the same parameters. Refine handling of
7380 instantiation/specialization mismatches.
7381 (start_decl): Don't call pushdecl for template specializations,
7382 since they don't affect overloading.
7383 (start_function): Likewise
7384 (grokfndecl): Call check_explicit_specialization a little later.
7385 Don't call duplicate_decls for memberm template specializations.
7386 (grokdeclarator): Don't update template_count for classes that are
7387 themselves specializations. Remove use of `2' as parameter to
7388 grokfndecl since that value isn't used.
7389 * lex.c (cons_up_default_function): Save and restore
7390 processing_explicit_instantiation around calls to grokfield.
7391 * parse.y (finish_member_template_decl): New function.
7392 (component_decl_1): Use it.
7393 (fn.def2): Likewise.
7394 (template_arg_list_opt): New nonterminal.
7395 (template_type): Use it.
7396 (self_template_type): Likewise.
7397 (template_id): Likewise.
7398 (object_template_id): Likewise.
7399 (notype_template_declarator): Likwise.
7400 (begin_explicit_instantiation): Likewise.
7401 (end_explicit_instantiation): Likewise.
7402 (explicit_instantiation): Use them.
7403 * pt.c (coerce_template_parms): Add parameters.
7404 (processing_explicit_instantiation): New variable.
7405 (convert_nontype_parameter): New function.
7406 (determine_overloaded_function): Likewise.
7407 (begin_explicit_instantiation): Likewise.
7408 (end_explicit_instantiation): Likewise.
7409 (retrieve_specialization): Likewise.
7410 (register_specialization): Likewise.
7411 (processing_explicit_specialization): Removed.
7412 (determine_specialization): Handle specializations of member
7413 functions of template class instantiations.
7414 (check_explicit_specialization): Refine to conform to standard.
7415 (comp_template_parms): New function.
7416 (coerce_template_parms): Call convert_nontype_parameter.
7417 (tsubst): Refine handling of member templates. Use
7418 register_specialization.
7419 (instantiate_template): Use retrieve_specialization.
7420 (do_decl_instantiation): Likewise.
7421 (instantiate_decl): Likewise.
7422 (type_unification): Improve handling of explict template
7423 arguments.
7424 * tree.c (mapcar): Return error_mark_node, rather than aborting,
7425 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
7426 * typeck.c (build_unary_op): Call determine_specialization, rather
7427 than determine_explicit_specialization.
7428
7429 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
7430
7431 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
7432
7433 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7434
7435 * error.c (dump_decl): For enum tags, output the tag, not its value.
7436
7437 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
7438
7439 * decl.c (init_decl_processing): Only call init_rtti_processing
7440 FLAG_RTTI is set.
7441
7442 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
7443
7444 * init.c (build_new_1): Split out from build_new.
7445 (build_new): Just return a NEW_EXPR.
7446 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
7447
7448 * decl2.c (get_temp_regvar): Tweak.
7449
7450 * cp-tree.h (TREE_CALLS_NEW): Comment out.
7451 * class.c (resolves_to_fixed_type_p): Remove use.
7452 * method.c (build_opfncall): Likewise.
7453 * call.c (build_new_op): Likewise.
7454
7455 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
7456
7457 * exception.cc (__eh_alloc, __eh_free): New fns.
7458 (__cp_push_exception, __cp_pop_exception): Use them.
7459 (__uncatch_exception): Call terminate here if no exception.
7460 * except.c (build_terminate_handler): New fn.
7461 (expand_start_catch_block): Use it.
7462 (expand_exception_blocks): Likewise.
7463 (alloc_eh_object): New fn.
7464 (expand_throw): Use it. Protect exception init with terminate.
7465 * typeck.c (build_modify_expr): Remove code that ignores trivial
7466 methods.
7467
7468 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7469
7470 * call.c (add_builtin_candidate): Add default case in enumeration
7471 switch.
7472 (build_new_op): Likewise.
7473 (convert_like): Likewise.
7474 * cvt.c (build_expr_type_conversion): Likewise.
7475 * tree.c (real_lvalue_p): Likewise.
7476 (lvalue_p): Likewise.
7477 (cp_tree_equal): Likewise.
7478 * typeck.c (comptypes): Likewise.
7479 (build_component_ref): Likewise.
7480 (build_function_call_real): Likewise.
7481 (build_binary_op_nodefault): Likewise.
7482 (build_unary_op): Likewise.
7483 (build_modify_expr): Likewise.
7484 * typeck2.c (initializer_constant_valid_p): Likewise.
7485
7486 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
7487
7488 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
7489
7490 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
7491
7492 * pt.c (coerce_template_parms): Make sure to digest_init if
7493 possible.
7494
7495 * decl.c (duplicate_decls): Make the newdecl virtual if the
7496 olddecl was, just as is done with other attributes of olddecl.
7497
7498 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
7499
7500 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
7501 address of an OFFSET_REF.
7502
7503 * cp-tree.def: Add AGGR_INIT_EXPR.
7504 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
7505 AGGR_INIT_EXPR where appropriate.
7506 * expr.c (cplus_expand_expr): Likewise. Simplify.
7507
7508 * decl2.c (finish_file): Remove call to register_exception_table.
7509
7510 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7511
7512 * pt.c (instantiate_class_template): Don't do injection when
7513 processing_template_decl is true, as pollutes current_binding_level
7514 for base classes.
7515
7516 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
7517
7518 * pt.c (maybe_fold_nontype_arg): Add prototype.
7519
7520 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7521
7522 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
7523 * error.c (dump_expr): Likewise.
7524
7525 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
7526
7527 * typeck.c (build_function_call_real): Remove "inline called before
7528 definition" pedwarn.
7529
7530 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
7531
7532 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7533
7534 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
7535
7536 * pt.c (type_unification_real): Change __null to type void* with
7537 a warning.
7538
7539 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
7540
7541 * call.c (implicit_conversion): Don't call
7542 build_user_type_conversion_1 with a NULL expr, since it will
7543 crash.
7544
7545 * pt.c (unify): Don't try to unify array bounds if either array is
7546 unbounded.
7547
7548 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7549
7550 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
7551 Replace extern decls with casts.
7552
7553 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
7554 Update last_parm_cleanup_insn.
7555 (store_after_parms): Remove.
7556 * cp-tree.h: Adjust.
7557
7558 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
7559
7560 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
7561 (finish_file): Check DECL_COMDAT instead of weak|one_only.
7562 (import_export_vtable): Use make_decl_one_only instead of
7563 comdat_linkage for win32 tweak.
7564 (import_export_decl): Likewise.
7565 * pt.c (mark_decl_instantiated): Likewise.
7566
7567 * decl2.c (finish_file): Lose handling of templates in pending_statics.
7568
7569 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
7570
7571 * decl2.c (finish_file): Lose call to expand_builtin_throw.
7572 * except.c (expand_builtin_throw): Remove.
7573 * cp-tree.h: Remove ptr_ptr_type_node.
7574 * decl.c: Likewise.
7575
7576 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
7577
7578 * decl.c (ptr_ptr_type_node): Define.
7579 (init_decl_processing): Initialize it.
7580 * cp-tree.h: Declare it.
7581 * exception.cc (__cp_exception_info): Use __get_eh_info.
7582 (__cp_push_exception): Ditto.
7583 (__cp_pop_exception): Ditto.
7584
7585 From Scott Snyder <snyder@d0sgif.fnal.gov>:
7586 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
7587 saved_pc.
7588 (init_exception_processing): Removed saved_pc initialization.
7589
7590 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
7591
7592 * pt.c (instantiate_decl): Defer all templates but inline functions.
7593
7594 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
7595
7596 * init.c (expand_vec_init): Don't fold a list of parameters.
7597
7598 * decl.c (copy_args_p): Handle copy elision for types with virtual
7599 bases.
7600 * call.c (build_over_call): Likewise.
7601
7602 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
7603
7604 * pt.c (lookup_template_function): Copy the template arguments,
7605 not just the list containing them, to the permanent obstack.
7606
7607 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
7608
7609 * except.c (expand_start_catch_block): suspend_momentary for the
7610 terminate handler.
7611
7612 * error.c (dump_decl): Handle LOOKUP_EXPR.
7613
7614 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
7615
7616 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
7617 permanent obstack if we are processing a template decl.
7618 * typeck.c (build_static_cast): Likewise.
7619 (build_const_cast): Likewise.
7620 (build_reinterpret_cast): Likewise.
7621
7622 * pt.c (coerce_template_parms): Coerce some expressions, even
7623 when processing_template_decl.
7624
7625 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7626
7627 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
7628 handling of pointer difference expressions.
7629
7630 * typeck.c (comp_target_types): Comparison of function/method types
7631 is independent of nptrs.
7632
7633 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
7634
7635 * pt.c (tsubst): Avoid creating pointer to reference and
7636 reference to reference types.
7637
7638 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
7639
7640 * parse.y (do_id): New nonterminal.
7641 (template_id): Use it.
7642
7643 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
7644
7645 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
7646 * spew.c (yylex): Don't do_identifier here.
7647 * decl2.c (build_expr_from_tree): Revert last change.
7648
7649 * decl2.c (build_expr_from_tree): Expand the name for a method call.
7650 * parse.y (object_template_id): Don't try to take the DECL_NAME.
7651
7652 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
7653
7654 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
7655 alloc_expr.
7656 * call.c (build_op_delete_call): Adjust.
7657
7658 * except.c (expand_end_catch_block): Lose rethrow region.
7659 (expand_start_catch_block): Likewise.
7660 (expand_end_catch_block): Don't expand_leftover_cleanups.
7661
7662 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7663
7664 * pt.c (tsubst): Remove tree_cons call (places redundant info into
7665 DECL_TEMPLATE_INSTANTIATION).
7666
7667 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
7668
7669 * tree.c (is_overloaded_fn): Handle getting a fn template.
7670 (really_overloaded_fn): Likewise.
7671 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
7672 * pt.c (check_explicit_specialization): Tweak.
7673 (determine_explicit_specialization): Tweak.
7674
7675 * tree.c, cp-tree.h (get_target_expr): New fn.
7676
7677 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
7678
7679 * pt.c (check_explicit_specialization): Fix misspelling in
7680 diagnostic: `preceeded'.
7681 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
7682 `conversiona'.
7683
7684 1997-12-02 Mark Mitchell <mmitchell@usa.net>
7685
7686 * pt.c (determine_explicit_specialization): Avoid an internal
7687 error for bad specializations.
7688
7689 * method.c (build_overload_value): Handle SCOPE_REF.
7690
7691 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
7692
7693 * class.c (prepare_fresh_vtable): Enable even more complex MI
7694 vtable names.
7695
7696 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
7697
7698 * exception.cc (__check_eh_spec): Optimize a bit.
7699
7700 * exception.cc (__cp_pop_exception): Lose handler arg.
7701 * except.c (do_pop_exception): Likewise.
7702 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
7703 (expand_end_catch_block): Likewise.
7704
7705 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7706
7707 * pt.c (check_explicit_specialization): Complain about using a
7708 template-id for a non-specialization.
7709
7710 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
7711
7712 * repo.c: Prototype rindex only if needed.
7713 * xref.c: Likewise.
7714
7715 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7716
7717 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
7718
7719 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
7720
7721 * typeck.c (build_const_cast): Handle references here instead of
7722 handing off to convert_to_reference.
7723
7724 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
7725 TerminateFunctionCall.
7726 (init_exception_processing): Likewise. Terminate et al are now
7727 the fns, not ADDR_EXPRs.
7728 (various): Lose redundant assemble_external calls.
7729 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
7730
7731 * cp-tree.h (struct lang_decl_flags): Add comdat.
7732 (DECL_COMDAT): New macro.
7733 * decl.c (duplicate_decls): Propagate it.
7734 (cp_finish_decl): Handle it.
7735 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
7736
7737 * class.c: Remove static pending_hard_virtuals.
7738 (add_virtual_function): Take pointers to pending_virtuals
7739 and pending_hard_virtuals.
7740 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
7741
7742 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
7743
7744 * decl2.c (import_export_vtable): If we support one_only but not
7745 weak symbols, mark instantiated template vtables one_only.
7746 (import_export_decl): Likewise for tinfo functions.
7747 (finish_vtable_vardecl): Also write out vtables from explicitly
7748 instantiated template classes.
7749 * pt.c (mark_class_instantiated): Revert last change.
7750
7751 * except.c (expand_throw): Call mark_used on the destructor.
7752
7753 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
7754
7755 * lex.c (lang_init): Enable flag_exceptions by default if no
7756 command line switch was specified.
7757
7758 1997-11-26 Mark Mitchell <mmitchell@usa.net>
7759
7760 * pt.c (unify): Handle `void' template parameters in
7761 specializations.
7762
7763 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
7764
7765 * rtti.c (build_dynamic_cast): Handle template case here.
7766 (build_dynamic_cast_1): Not here.
7767
7768 * typeck2.c (digest_init): Make copies where appropriate.
7769
7770 * decl2.c (delete_sanity): resolve_offset_ref.
7771
7772 * except.c: Call terminate without caching so many bits.
7773
7774 * except.c (expand_start_catch_block): Fix catching a reference
7775 to pointer.
7776
7777 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
7778
7779 * init.c (build_new): Copy size to the saveable obstack.
7780
7781 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
7782 TRY_CATCH_EXPR for now.
7783
7784 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
7785
7786 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
7787 has DECL_LANG_SPECIFIC.
7788
7789 * exception.cc (struct cp_eh_info): Add handlers field.
7790 (__cp_push_exception): Initialize it.
7791 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
7792 (__throw_bad_exception): Remove.
7793 * except.c (call_eh_info): Add handlers field.
7794 (get_eh_handlers): New fn.
7795 (push_eh_cleanup): Increment handlers.
7796
7797 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
7798
7799 * except.c (expand_start_eh_spec): Use the try/catch code.
7800 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
7801 doing everything inline.
7802 (init_exception_processing): throw_type_match now takes
7803 const void pointers.
7804 * exception.cc (__check_eh_spec): New fn.
7805 * inc/exception: Neither terminate nor unexpected return.
7806 * decl.c: Make const_ptr_type_node public.
7807 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
7808
7809 * except.c (expand_start_catch_block): We only need the rethrow
7810 region for non-sjlj exceptions.
7811 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
7812
7813 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
7814
7815 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
7816 (various.o): Likewise.
7817 * inc/new: Add placement deletes. Add throw specs for default new.
7818 * new.cc (set_new_handler): Move here from libgcc2.
7819 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
7820 (new): Move from libgcc2. Throw bad_alloc.
7821 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
7822 * decl.c (init_decl_processing): Update exception specs on new and
7823 delete.
7824
7825 * method.c (build_decl_overload_real): Don't mess with global
7826 placement delete.
7827
7828 * init.c (build_new): Check for null throw spec, not nothrow_t.
7829
7830 * decl.c (duplicate_decls): Don't complain about different exceptions
7831 from an internal declaration.
7832
7833 * call.c (build_op_delete_call): Fix check for member fns again.
7834
7835 * decl2.c (import_export_decl): Interface hackery affects
7836 virtual synthesized methods.
7837
7838 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7839
7840 * decl.c (start_decl): Don't just complain about a mismatched
7841 scope, fix it.
7842
7843 * decl.c (make_implicit_typename): Handle case where t is not
7844 actually from context.
7845 * tree.c (get_type_decl): Lose identifier case.
7846 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
7847 * parse.y (nonnested_type): Just use lookup_name.
7848 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
7849
7850 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
7851
7852 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
7853 T was built in C language context (for example, by
7854 output_func_start_profiler).
7855
7856 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
7857
7858 * decl.c (make_implicit_typename): New fn.
7859 (lookup_name_real): Use it. Use current_class_type as the context.
7860
7861 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
7862
7863 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
7864
7865 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
7866
7867 * friend.c (do_friend): Warn about non-template friends in templates.
7868
7869 * call.c (build_op_delete_call): Fix handling of inherited delete.
7870
7871 * search.c (dfs_record_inheritance): Ignore template type parms.
7872
7873 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
7874
7875 * call.c (build_new_op): Fix copy error.
7876 (build_op_new_call): New fn.
7877 (build_op_delete_call): New fn.
7878 * cp-tree.h: Declare them.
7879 * init.c (build_new): Use them. Support placement delete.
7880 (build_x_delete): Use build_op_delete_call.
7881 (build_delete): Likewise.
7882 * decl2.c (delete_sanity): Likewise.
7883 (coerce_delete_type): Don't complain about placement delete.
7884
7885 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
7886
7887 * call.c (build_new_function_call): Remove unused 'obj' parm.
7888 * cp-tree.h, typeck.c: Adjust.
7889
7890 * init.c (build_new): Make the cleanup last longer.
7891 (expand_vec_init): Call do_pending_stack_adjust.
7892
7893 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
7894
7895 * pt.c (do_type_instantiation): Fix typo.
7896 (mark_class_instantiated): If we support one_only but not weak
7897 symbols, don't mark this as known.
7898
7899 * init.c (build_new): Handle vec delete in EH cleanup.
7900
7901 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7902
7903 * call.c (build_method_call): Call complete_type before checking
7904 for destructor.
7905
7906 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
7907
7908 * decl.c (add_block_current_level): Delete.
7909 * init.c (build_vec_delete_1): Delete build_block and
7910 add_block_current_level calls.
7911
7912 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
7913
7914 * init.c (build_new): Handle freeing allocated memory when the
7915 constructor throws.
7916
7917 * call.c (build_new_method_call): Fix flags arg.
7918
7919 * pt.c (do_type_instantiation): Don't try to instantiate
7920 member templates.
7921 (mark_decl_instantiated): If we support one_only but not
7922 weak symbols, mark this one_only.
7923 * decl2.c (import_export_vtable): Don't defer handling of vtables
7924 if MULTIPLE_SYMBOL_SPACES.
7925
7926 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
7927
7928 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
7929
7930 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
7931
7932 * except.c (do_pop_exception): Return a value.
7933
7934 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
7935
7936 * call.c (build_new_method_call): Handle getting a
7937 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
7938 if we got template parms.
7939 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
7940 not just the args.
7941 * decl2.c (build_expr_from_tree): Tweak last change.
7942 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
7943 (maybe_fold_nontype_arg): Split out from tsubst_copy.
7944 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
7945
7946 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7947
7948 * pt.c (tsubst_copy): Handle explicit template arguments in
7949 function calls.
7950 * typeck.c (build_x_function_call): Likewise.
7951 * decl2.c (build_expr_from_tree): Lookup function name if it
7952 hasn't been done.
7953
7954 * pt.c (tsubst): Instantiate template functions properly when
7955 template parameter does not appear in function arguments and return
7956 type.
7957 (comp_template_args): Handle member templates required by tsubst.
7958
7959 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
7960
7961 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
7962 previous change.
7963
7964 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7965
7966 * pt.c (coerce_template_parms): Tweak error message.
7967
7968 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
7969 return type defaults to `int', even if there are storage-class
7970 specifiers.
7971
7972 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7973
7974 Complete nested exception support.
7975 * except.c (do_pop_exception): Split out...
7976 (push_eh_cleanup): From here. Handle the EH region by hand.
7977 (expand_start_catch_block): Add a new level for the catch parm.
7978 Move the rethrow region outside the two cleanup regions.
7979 Protect the initializer for the catch parm with terminate.
7980 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
7981 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
7982 popping off the middle of the stack.
7983 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
7984 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
7985 (build_cplus_new): Only wrap CALL_EXPRs.
7986 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
7987 the constructor call.
7988
7989 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7990
7991 * Make-lang.in (c++.distdir): Make inc subdirectory.
7992
7993 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
7994
7995 * decl2.c (finish_file): Put back some code.
7996
7997 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7998
7999 * decl2.c (finish_file): Remove redundant code.
8000 * method.c (emit_thunk): Don't let the backend defer generic thunks.
8001
8002 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
8003
8004 * except.c (call_eh_info): Split out...
8005 (push_eh_info): From here.
8006 (expand_builtin_throw): Use it.
8007 (expand_start_catch_block): Move region start back.
8008
8009 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
8010
8011 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
8012 (real_yylex): Record wide strings using target endianness, not host.
8013
8014 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
8015
8016 * repo.c (rindex): Add decl unconditionally.
8017 (get_base_filename, open_repo_file): Don't cast rindex.
8018 * xref.c (rindex): Add decl unconditionally.
8019 (index): Remove unused decl.
8020 (open_xref_file): Don't cast rindex.
8021
8022 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8023
8024 * class.c (build_vbase_path): Propagate the result type properly.
8025
8026 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
8027
8028 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
8029 remaining use of saved_throw_type with a call to get_eh_type.
8030
8031 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
8032
8033 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
8034 (file_name_nondirectory): New function, doing the same as the macro.
8035 (set_typedecl_interface_info): Use it instead of the macro.
8036 (check_newline): Likewise.
8037 (handle_cp_pragma): Likewise.
8038
8039 * repo.c (get_base_filename): Cast result of rindex to char*.
8040 (open_repo_file): Likewise.
8041 * xref.c (open_xref_file): Likewise.
8042 * error.c (dump_char): Make its arg int, not char.
8043
8044 * except.c (push_eh_info): Pass the number of fields - 1 down, not
8045 the exact number of fields.
8046
8047 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8048
8049 Support for nested exceptions.
8050 * tinfo2.cc (__is_pointer): New fn.
8051 * exception.cc (struct cp_eh_info): Define.
8052 (__cp_exception_info, __uncatch_exception): New fns.
8053 (__cp_push_exception, __cp_pop_exception): New fns.
8054 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
8055 Lose empty_fndecl.
8056 (init_exception_processing): Likewise. __eh_pc is now external.
8057 (push_eh_info): New fn.
8058 (get_eh_{info,value,type,caught}): New fns.
8059 (push_eh_cleanup): Just call __cp_pop_exception.
8060 (expand_start_catch_block): Use push_eh_info. Start the eh region
8061 sooner.
8062 (expand_end_eh_spec): Use push_eh_info.
8063 (expand_throw): Call __cp_push_exception to set up the exception info.
8064 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
8065 when we rethrow.
8066 (expand_builtin_throw): Don't refer to empty_fndecl.
8067
8068 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
8069
8070 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
8071
8072 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
8073
8074 * method.c (build_template_parm_names, build_decl_overload_real):
8075 Add static to definitions.
8076 * pt.c (add_to_template_args, note_template_header,
8077 processing_explicit_specialization, type_unification_real): Likewise.
8078 ({determine,check}_explicit_specialization): Use a single string for
8079 error messages.
8080
8081 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
8082
8083 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
8084 (expand_end_catch_block): Likewise.
8085 (expand_end_eh_spec): Likewise.
8086
8087 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
8088
8089 * decl.c (duplicate_decls): Handle template specializations
8090 correctly.
8091 * error.c (dump_function_name): Fix printing of specializations of
8092 member functions that are not member templates.
8093 * cp-tree.h (processing_specialization): Make global.
8094 * pt.c (processing_specialization): Likewise.
8095 * lex.c (cons_up_default_function): Save and restore
8096 processing_specialization to avoid confusion.
8097
8098 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8099
8100 * decl.c (init_decl_processing): Give null_node unknown* type.
8101 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
8102 (common_type): Likewise.
8103 * error.c (args_as_string): Recognize null_node.
8104
8105 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8106
8107 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
8108 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
8109
8110 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
8111
8112 * Make-lang.in (g++): Include prefix.o.
8113
8114 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
8115
8116 * pt.c (determine_explicit_specialization): Initialize "dummy"
8117 to keep Purify quiet.
8118
8119 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8120
8121 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
8122 (build_overload_int): Not here.
8123
8124 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
8125
8126 * class.c (build_type_pathname): Remove.
8127 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
8128
8129 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
8130
8131 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
8132 &&label GNU extension.
8133
8134 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
8135
8136 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
8137 so as to avoid incorrect manglings.
8138 * method.c (build_decl_overload_real): Don't mangle return types
8139 for constructors.
8140
8141 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8142
8143 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
8144 scratch_tree_cons): Define as macros for now.
8145 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
8146 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
8147 typeck2.c: Use them and the expression_obstack variants.
8148
8149 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8150
8151 * decl.c (store_return_init): Allow classes with explicit ctors to
8152 be used with the named return values extension.
8153
8154 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
8155
8156 * pt.c (instantiate_decl): Fix previous change.
8157
8158 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8159
8160 * pt.c (tsubst): Fix thinko.
8161 (instantiate_decl): Really use the original template.
8162
8163 * call.c (build_new_method_call): Use simple constructor_name for
8164 error messages.
8165
8166 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
8167
8168 * method.c (build_underscore_int): Don't use ANSI specific
8169 features.
8170
8171 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8172
8173 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
8174 for our key method; it might have been inlined by -O3.
8175
8176 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
8177
8178 * decl.c (make_typename_type): Do not try to call lookup_field for
8179 non-aggregate types.
8180
8181 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
8182
8183 * typeck.c (build_reinterpret_cast): Tweak.
8184
8185 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
8186
8187 * typeck.c (build_reinterpret_cast): converting a void pointer
8188 to function pointer with a reinterpret_cast produces a warning
8189 if -pedantic is issued
8190
8191 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8192
8193 * typeck.c (c_expand_return): Don't warn about returning a
8194 reference-type variable as a reference.
8195
8196 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8197
8198 * method.c (build_static_name): Fix typo.
8199
8200 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
8201
8202 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
8203 OLDDECL before we try to do DECL_USE_TEMPLATE.
8204
8205 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8206
8207 * decl.c (duplicate_decls): Don't warn about template instances.
8208
8209 * typeck.c (mark_addressable): Lose ancient code that unsets
8210 DECL_EXTERNAL.
8211
8212 * pt.c (do_decl_instantiation): Lose support for instantiating
8213 non-templates.
8214
8215 * call.c (build_new_function_call): Fix handling of null explicit
8216 template args.
8217 (build_new_method_call): Likewise.
8218
8219 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
8220
8221 * method.c (build_underscore_int): Fix typo.
8222
8223 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
8224
8225 * tree.c (print_lang_statistics): #if 0 call to
8226 print_inline_obstack_statistics until its definition is checked in.
8227
8228 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8229
8230 * decl2.c (finish_file): Move dump_tree_statistics to end.
8231
8232 * pt.c (instantiate_decl): Look for the original template.
8233 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
8234 of member templates.
8235
8236 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8237
8238 * Makefile.in (g++FAQ.*): New rules.
8239 (CONFLICTS): Update.
8240 * g++FAQ.texi: Moved from libg++.
8241
8242 * parse.y (PFUNCNAME): Only specify the type once.
8243
8244 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
8245
8246 * lex.c (real_yylex): Clean up the code to fully behave the way
8247 the c-lex.c parser does for complex and real numbers.
8248
8249 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8250
8251 * method.c (build_decl_overload_real): Reformat.
8252
8253 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
8254
8255 * method.c (synthesize_method): If at_eof, determine our linkage.
8256
8257 1997-09-29 Paul Eggert <eggert@twinsun.com>
8258
8259 * lex.c (real_yylex): Treat `$' just like `_', except issue a
8260 diagnostic if !dollars_in_ident or if pedantic.
8261
8262 * lang-specs.h (@c++): -ansi no longer implies -$.
8263
8264 * decl2.c (lang_decode_option):
8265 -traditional and -ansi now do not mess with
8266 dollars_in_ident.
8267
8268 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8269
8270 * Makefile.in (parse.o, decl.o): Also depend on
8271 $(srcdir)/../except.h $(srcdir)/../output.h.
8272 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
8273 $(srcdir)/../except.h $(srcdir)/../output.h.
8274 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
8275 ../insn-codes.h.
8276
8277 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
8278
8279 * expr.c (cplus_expand_expr): Make it static.
8280
8281 * decl2.c, init.c, typeck.c: Include "expr.h".
8282 (expand_expr): Use proper values when calling the function.
8283
8284 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
8285
8286 * lang-options.h: new -Wold-style-cast flag.
8287 * cp-tree.h (warn_old_style_cast): new variable.
8288 * decl2.c (warn_old_style_cast): ditto.
8289 (lang_decode_option): support -Wold-style-cast.
8290 (reparse_absdcl_as_casts): produce old-style-cast warning.
8291
8292 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8293
8294 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
8295 TREE_USED, reset value based on already_used.
8296
8297 * init.c (expand_member_init): Revert change.
8298
8299 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
8300
8301 * cp-tree.h, decl.c, decl2.c, pt.c:
8302 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
8303
8304 * decl2.c (lang_decode_option): Add missing ;.
8305
8306 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8307
8308 * friend.c (do_friend): Disable injection for all template-derived
8309 decls.
8310 * decl2.c (lang_decode_option): Handle -fguiding-decls.
8311 * parse.y (notype_template_declarator): New nonterminal.
8312 (direct_notype_declarator): Use it.
8313 (complex_direct_notype_declarator): Likewise.
8314 (object_template_id): Accept any kind of identifier after TEMPLATE.
8315 (notype_qualified_id): Don't add template declarators here.
8316
8317 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
8318
8319 * call.c (add_template_candidate): Add explicit_targs parameter.
8320 (build_scoped_method_call): Use it.
8321 (build_overload_call_real): Likewise.
8322 (build_user_type_conversion_1): Likewise.
8323 (build_new_function_call): Likewise.
8324 (build_object_call): Likewise.
8325 (build_new_op): Likewise.
8326 (build_new_method_call): Likewise.
8327 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
8328 (build_new_method_call): Likewise.
8329
8330 * class.c (finish_struct_methods): Add specialization pass to
8331 determine which methods were specializing which other methods.
8332 (instantiate_type): Handle TEMPLATE_ID_EXPR.
8333
8334 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
8335
8336 * cp-tree.h (name_mangling_version): New variable.
8337 (flag_guiding_decls): Likewise.
8338 (build_template_decl_overload): New function.
8339 (begin_specialization): Likewise.
8340 (reset_specialization): Likewise.
8341 (end_specialization): Likewise.
8342 (determine_explicit_specialization): Likewise.
8343 (check_explicit_specialization): Likewise.
8344 (lookup_template_function): Likewise.
8345 (fn_type_unification): Add explicit_targs parameter.
8346 (type_unification): Likewise.
8347
8348 * decl.c (duplicate_decls): Add smarts for explicit
8349 specializations.
8350 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
8351 specializations.
8352 (grokfndecl): Call check_explicit_specialization.
8353
8354 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
8355 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
8356 (check_classfn): Handle specializations.
8357
8358 * error.c (dump_function_name): Print specialization arguments.
8359
8360 * friend.c (do_friend): Don't call pushdecl for template
8361 instantiations.
8362
8363 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
8364
8365 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
8366 and -fno-guiding-decls.
8367
8368 * lex.c (identifier_type): Return PFUNCNAME for template function
8369 names.
8370
8371 * method.c (build_decl_overload_real): New function.
8372 (build_template_parm_names): New function.
8373 (build_overload_identifier): Use it.
8374 (build_underscore_int): New function.
8375 (build_overload_int): Use it. Add levels for template
8376 parameters.
8377 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
8378 (build_overload_nested_names): Handle template type parameters.
8379 (build_template_decl_overload): New function.
8380
8381 * parse.y (YYSTYPE): New ntype member.
8382 (nested_name_specifier): Use it.
8383 (nested_name_specifier_1): Likewise.
8384 (PFUNCNAME): New token.
8385 (template_id, object_template_id): New non-terminals.
8386 (template_parm_list): Note specializations.
8387 (template_def): Likewise.
8388 (structsp): Likewise.
8389 (fn.def2): Handle member template specializations.
8390 (component_decl_1): Likewise.
8391 (direct_notype_declarator): Handle template-ids.
8392 (component_decl_1): Likewise.
8393 (direct_notype_declarator): Handle template-ids.
8394 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
8395
8396 * pt.c (processing_specializations): New variable.
8397 (template_header_count): Likewise.
8398 (type_unification_real): New function.
8399 (processing_explicit_specialization): Likewise.
8400 (note_template_header): Likewise.
8401 (is_member_template): Handle specializations.
8402 (end_template_decl): Call reset_specialization.
8403 (push_template_decl): Handle member template specializations.
8404 (tsubst): Likewise.
8405 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
8406 (instantiate_template): Handle specializations.
8407 (instantiate_decl): Likewise.
8408 (fn_type_unification): Handle explicit_targs.
8409 (type_unification): Likewise. Allow incomplete unification
8410 without an error message, if allow_incomplete.
8411 (get_bindings): Use new calling sequence for fn_type_unification.
8412
8413 * spew.c (yylex): Handle PFUNCNAME.
8414
8415 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
8416 (really_overloaded_fn): Likewise.
8417 (get_first_fn): Handle function templates.
8418
8419 * typeck.c (build_x_function_call): Use really_overloaded_fn.
8420 Handle TEMPLATE_ID_EXPR.
8421 (build_x_unary_op): Likewise.
8422 (build_unary_op): Likewise.
8423 (mark_addressable): Templates whose address is taken are marked
8424 as used.
8425
8426 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8427
8428 * decl.c (init_decl_processing): Declare __builtin_constant_p as
8429 accepting any kind of type, not only int.
8430
8431 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
8432
8433 * search.c (get_matching_virtual): Notice virtual bases when sorrying
8434 about covariant returns.
8435
8436 * parse.y (member_init): Also imply typename here. Remove ancient
8437 extension for initializing base members.
8438
8439 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8440
8441 Handle multi-level typenames and implicit typename in base list.
8442 * parse.y (typename_sub{,[0-2]}): New rules.
8443 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
8444 (nonnested_type): New rule.
8445 (complete_type_name): Use it.
8446 (base_class.1): Use typename_sub and nonnested_type.
8447 (nested_name_specifier): Don't elide std:: here.
8448 * decl.c (make_typename_type): Handle getting a type for NAME.
8449 (lookup_name_real): Turn std:: into :: here.
8450
8451 Rvalue conversions were removed in London.
8452 * call.c (is_subseq): Don't consider lvalue transformations.
8453 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
8454 (joust): Reenable ?: kludge.
8455
8456 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
8457
8458 * decl.c (start_function): Up warning of no return type to be a
8459 pedwarn.
8460
8461 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8462
8463 * init.c (expand_member_init): Don't set TREE_USED.
8464 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
8465 set,don't clear TREE_USED wholesale.
8466
8467 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
8468
8469 * call.c (build_over_call): Do require_complete_type before
8470 build_cplus_new.
8471
8472 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
8473
8474 * search.c (lookup_field): Call complete_type in all cases.
8475
8476 * decl.c (finish_function): Just warn about flowing off the end.
8477
8478 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8479
8480 * decl.c (grokparms): Don't bash a permanent list node if we're
8481 in a function.
8482
8483 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
8484
8485 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
8486
8487 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
8488
8489 * call.c (build_new_op): Give better error for syntactically
8490 correct, but semantically invalid, use of undeclared template.
8491
8492 * call.c (compare_qual): Handle pmfs.
8493
8494 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
8495 after the exception spec.
8496
8497 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8498
8499 * call.c (null_ptr_cst_p): Integer type, not integral type.
8500
8501 * call.c (joust): Disable warnings until they can be moved to the
8502 right place.
8503
8504 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
8505
8506 * Makefile.in, config-lang.in: Convert to autoconf.
8507
8508 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8509
8510 * decl.c (lookup_name_real): Add implicit 'typename' to types from
8511 base classes.
8512
8513 * pt.c (most_specialized_class): Fix typo.
8514 (tsubst): Move constant folding to TREE_VEC case.
8515
8516 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
8517
8518 * pt.c (do_poplevel): Don't warn about unused local variables
8519 while processing_template_decl since we don't always know whether
8520 or not they will need constructing/destructing.
8521
8522 * pt.c (uses_template_parms): Check the values of an enumeration
8523 type to make sure they don't depend on template parms.
8524
8525 * decl.c (make_typename_type): Don't lookup the field if the
8526 context uses template parms, even if we're not
8527 processing_template_decl at the moment.
8528
8529 * pt.c (coerce_template_parms): Avoid looking at the
8530 TYPE_LANG_DECL portion of a typename type, since there won't be
8531 one.
8532 (tsubst): Do constant folding as necessary to make sure that
8533 arguments passed to lookup_template_class really are constants.
8534
8535 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8536
8537 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
8538 * decl2.c (finish_file): Only register exception tables if we
8539 need to.
8540
8541 * decl.c (init_decl_processing): Add __builtin_[fs]p.
8542
8543 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8544
8545 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
8546
8547 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
8548
8549 * error.c (dump_decl): Avoid crashing when presented with a
8550 uninitialized constant, as can occur with a template parameter.
8551 (dump_expr): Make sure that there are enough levels of
8552 current_template_parms before we start diving through them.
8553
8554 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
8555
8556 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
8557 c-typeck.c.
8558
8559 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8560
8561 * except.c (expand_throw): Call build_delete for all
8562 exception types, not just objects with destructors.
8563
8564 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
8565
8566 * decl.c (current_local_enum): Remove static.
8567 * pt.c (tsubst_enum): Save and restore value of current_local_enum
8568 in case template is expanded in enum decl.
8569 (instantiate_class_template) : Use new tsubst_enum signature.
8570 (tsubst_expr): Likewise.
8571
8572 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
8573
8574 * pt.c (begin_member_template_processing): Take a function as
8575 argument, not a set of template arguments. Use the template
8576 parameters, rather than the arguments. Handle non-type parameters
8577 correctly. Push a binding level for the parameters so that multiple
8578 member templates using the same parameter names can be declared.
8579 (end_member_template_processing): Pop the binding level.
8580 (push_template_decl): Mark member templates as static when
8581 appropriate.
8582
8583 * lex.c (do_pending_inlines): Pass the function, not its template
8584 arguments, to begin_member_template_processing.
8585 (process_next_inline): Likewise.
8586 (do_pending_defargs): Likewise.
8587
8588 * error.c (dump_expr): Obtain the correct declaration for a
8589 TEMPLATE_CONST_PARM.
8590
8591 * call.c (add_template_conv_candidate): New function.
8592 (build_object_call): Handle member templates, as done in the other
8593 build_ functions.
8594
8595 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
8596
8597 * decl.c (replace_defag): Undo previous change.
8598 * lex.c (do_pending_defargs): Deal with member templates.
8599
8600 * pt.c (is_member_template): Avoid crashing when passed a
8601 non-function argument.
8602
8603 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8604
8605 * class.c (grow_method): Remove check for redeclaration.
8606
8607 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
8608
8609 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
8610 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
8611 (PRIMARY_TEMPLATE_P): Use it.
8612 * call.c (build_overload_call_real): Use it.
8613 * class.c (instantiate_type): Likewise.
8614 * decl.c (decls_match): Likewise.
8615 * method.c (build_overload_identifier): Likewise.
8616 * pt.c (push_template_decl): Likewise.
8617 (classtype_mangled_name): Likewise.
8618 (lookup_template_class): Likewise.
8619
8620 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
8621 DECL_NTPARMS to conform to usage elsewhere.
8622 * call.c (add_template_candidate): Likewise.
8623 * class.c (instantiate_type): Likewise.
8624 * pt.c (instantiate_template): Likewise.
8625 (get_bindings): Likewise.
8626
8627 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
8628 is_member_template.
8629
8630 * pt.c (unify): Undo changes to allow multiple levels of template
8631 parameters.
8632 (type_unification): Likewise.
8633 (fn_type_unification): Likewise.
8634 (get_class_bindings): Likewise.
8635 * cp-tree.h (Likewise).
8636
8637 * decl.c (replace_defarg): Check that the type of the default
8638 parameter does not invlove a template type before complaining
8639 about the initialization.
8640
8641 * error.c (dump_expr): Deal with template constant parameters in
8642 member templates correctly.
8643
8644 * pt.c (is_member_template): Deal with class specializations
8645 correctly.
8646 (tsubst): Handle "partial instantiation" of member templates
8647 correctly.
8648
8649 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
8650
8651 * pt.c (type_unification): Change calling squence to allow for
8652 multiple levels of template parameters.
8653 (tsubst_expr): Likewise.
8654 (tsubst): Likewise.
8655 (tsubst_copy): Likewise.
8656 (instantiate_template): Likewise.
8657 (unify): Likewise.
8658 * call.c (build_overload_call_real): Use it.
8659 (add_builtin_candidate): Use it.
8660 (build_new_method_call): Use it.
8661 * class.c (instantiate_type): Use it.
8662 * decl.c (grokdeclarator): Use it.
8663 * decl2.c (finish_file): Use it.
8664 * method.c (build_overload_identifier): Use it.
8665
8666 * call.c (add_template_candidate): Add additional parameter for
8667 the function return type. Call fn_type_unification istead of
8668 type_unification.
8669 (build_user_type_conversion_1): Handle member templates.
8670 (build_new_function_call): Likewise.
8671 (build_new_op): Likewise.
8672 (build_new_method_call): Likewise.
8673
8674 * class.c (grow_method): Don't give an error message indicating
8675 that two member templates with the same name are ambiguous.
8676 (finish_struct): Treat member template functions just like member
8677 functions.
8678
8679 * cp-tree.h (check_member_template): Add declaration.
8680 (begin_member_template_processing): Likewise.
8681 (end_member_template_processing): Likewise.
8682 (fn_type_unification): Likewise.
8683 (is_member_template): Likewise.
8684 (tsubst): Change prototype.
8685 (tsubst_expr): Likewise.
8686 (tsubst_copy): Likewise.
8687 (instantiate_template): Likewise.
8688 (get_bindings): Likewise.
8689
8690 * decl.c (decls_match): Handle multiple levels of template
8691 parameters.
8692 (pushdecl): Handle template type params just like other type
8693 declarations.
8694 (push_class_level_binding): Return immediately if the
8695 class_binding_level is NULL.
8696 (grokfndecl): If check_classfn() returns a member_template, use
8697 the result of the template, not the template itself.
8698
8699 * decl2.c (check_member_template): New function. Check to see
8700 that the entity declared to be a member template can be one.
8701 (check_classfn): Allow redeclaration of member template functions
8702 with different types; the new functions can be specializations or
8703 explicit instantiations.
8704
8705 * error.c (dump_decl): Handle multiple levels of template
8706 parameters.
8707 (dump_function_decl): Update to handle function templates.
8708
8709 * lex.c (do_pending_inlines): Set up template parameter context
8710 for member templates.
8711 (process_next_inline): Likewise.
8712
8713 * method. (build_overload_identifier): Adjust for multiple levels
8714 of template parameters.
8715
8716 * parse.y (fn.def2): Add member templates.
8717 (component_decl_1): Likewise.
8718
8719 * pt.c (begin_member_template_processing): New function.
8720 (end_member_template_processing): Likewise.
8721 (is_member_template): Likewise.
8722 (fn_type_unification): Likewise.
8723 (current_template_parms): Return a vector of all the template
8724 parms, not just the innermost level of parms.
8725 (push_template_decl): Deal with the possibility of member
8726 templates.
8727 (lookup_template_class): Likewise.
8728 (uses_template_parms): Likewise.
8729 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
8730 TEMPLATE_CONST_PARM to deal with multiple levels of template
8731 arguments. Add processing of TEMPLATE_DECL to produce new
8732 TEMPLATE_DECLs from old ones.
8733 (do_decl_instantiation): Handle member templates.
8734
8735 * search.c (lookup_fnfields_1): Handle member template conversion
8736 operators.
8737
8738 * tree.c (cp_tree_equal): Check the levels, as well as the
8739 indices, of TEMPLATE_CONST_PARMs.
8740
8741 * typeck.c (comptypes): Check the levels, as well as the indices,
8742 fo TEMPLATE_TYPE_PARMs.
8743 (build_x_function_call): Treat member templates like member
8744 functions.
8745
8746 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8747
8748 * typeck.c (c_expand_return): Always convert_for_initialization
8749 before checking for returning a pointer to local.
8750
8751 * pt.c (type_unification): If strict and the function parm doesn't
8752 use template parms, just compare types.
8753
8754 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
8755
8756 * method.c (build_overloaded_value): Replace direct call
8757 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
8758
8759 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
8760
8761 * typeck.c (convert_arguments): Don't arbitrarily choose the first
8762 of a set of overloaded functions.
8763
8764 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8765
8766 * lex.c (real_yylex): Don't elide __FUNCTION__.
8767
8768 * method.c (build_overload_value): Add in_template parm.
8769 (build_overload_int): Likewise.
8770 (build_overload_identifier): Pass it.
8771
8772 * decl.c (duplicate_decls): Don't bash a previous template
8773 definition with a redeclaration.
8774
8775 * pt.c (unify): float doesn't match double.
8776
8777 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
8778 TYPE_DECL. Handle getting non-template types.
8779 * parse.y (explicit_instantiation): Use typespec instead of
8780 aggr template_type.
8781
8782 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
8783
8784 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
8785
8786 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
8787
8788 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
8789 (compare_ics): Likewise.
8790
8791 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8792
8793 * call.c (joust): Warn about choosing one conversion op over
8794 another because of 'this' argument when the other return type is
8795 better.
8796 (source_type): New fn.
8797
8798 * call.c (build_new_op): Strip leading REF_BIND from first operand
8799 to builtin operator.
8800
8801 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
8802 use its RTL.
8803
8804 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
8805
8806 * call.c (null_ptr_cst_p): Remove support for (void*)0.
8807
8808 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
8809
8810 * typeck.c (expand_target_expr): Make definition match declaration.
8811
8812 * class.c (get_basefndecls): Make definition match declaration.
8813
8814 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
8815
8816 * input.c (sub_getch): Eventually give up and release the input file.
8817
8818 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
8819 right place.
8820
8821 * call.c (joust): Tweak message.
8822
8823 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
8824
8825 * error.c (type_as_string): Put const/volatile on template type
8826 parameters where appropriate.
8827
8828 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
8829
8830 * call.c (strictly_better): Make arguments unsigned ints.
8831
8832 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
8833
8834 * lex.c (real_yylex): Refer to __complex instead of complex.
8835
8836 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
8837
8838 * lex.c (real_yylex): Don't use getc directly.
8839
8840 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
8841
8842 * call.c (is_subseq): Don't try to be clever.
8843
8844 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8845
8846 * parse.y, pt.c: Include "except.h".
8847 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
8848 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
8849 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
8850 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
8851 prototyping.
8852
8853 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
8854
8855 * decl2.c (mark_vtable_entries): Instead of replacing pure
8856 virtuals with a reference to __pure_virtual, copy the decl and
8857 change the RTL.
8858
8859 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
8860
8861 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
8862
8863 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
8864
8865 * pt.c (instantiate_class_template): Call repo_template_used
8866 before finish_prevtable_vardecl.
8867
8868 * call.c (is_subseq): New fn.
8869 (compare_ics): Use it.
8870
8871 * repo.c (finish_repo): Don't crash on no args.
8872
8873 * parse.y (named_complex_class_head_sans_basetype): Handle
8874 explicit global scope.
8875 * decl2.c (handle_class_head): New fn.
8876
8877 * pt.c (unify): Add CONST_DECL case.
8878
8879 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8880
8881 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
8882
8883 * cp-tree.h (report_type_mismatch): Add prototype.
8884 * call.c (build_overload_call_real): Remove erroneous fourth
8885 argument to report_type_mismatch.
8886 (build_user_type_conversion_1): Remove erroneous second arg to
8887 tourney.
8888 (build_new_function_call): Likewise.
8889 (build_object_call): Likewise.
8890 (build_new_op): Likewise.
8891 (build_new_method_call): Likewise.
8892
8893 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8894
8895 * error.c (dump_decl): Don't bother processing a function with no
8896 DECL_LANG_SPECIFIC.
8897
8898 * method.c (emit_thunk): Call init_function_start in the macro case.
8899
8900 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8901
8902 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
8903 defined and used to set flag_vtable_thunks.
8904
8905 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8906
8907 * parse.y: Don't clear the inlines from their obstack until they've
8908 all been processed.
8909
8910 * decl.c (duplicate_decls): Don't complain about exception
8911 specification mismatch if flag_exceptions is off.
8912
8913 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
8914
8915 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
8916
8917 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
8918
8919 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
8920 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
8921 Include <stdio.h> before include files that formerly used STDIO_PROTO.
8922
8923 * decl.c, g++spec.c, lex.c, method.c, repo.c:
8924 Include "config.h" first, as per autoconf manual.
8925
8926 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8927
8928 * decl.c (duplicate_decls): Tweak wording.
8929 * lex.c (do_pending_defargs): Don't die if we see a default arg
8930 that isn't a DEFAULT_ARG.
8931 * error.c (dump_expr): Handle DEFAULT_ARG.
8932
8933 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
8934 * lang-options.h: Add -fhandle-exceptions.
8935
8936 * class.c (build_vtable): vtables are artificial.
8937 (prepare_fresh_vtable): Likewise.
8938
8939 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8940
8941 * cvt.c (ocp_convert): After converting to the target type, set
8942 LOOKUP_NO_CONVERSION.
8943
8944 * call.c (joust): Warn about potentially confusing promotion rules
8945 with -Wsign-promo.
8946 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
8947
8948 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
8949
8950 * exception.cc: Declare __terminate_func with noreturn attribute.
8951
8952 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
8953
8954 * parse.y: Break out eat_saved_input, handle errors.
8955 (function_try_block): Use compstmt instead of compstmt_or_error.
8956
8957 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8958
8959 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
8960
8961 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8962
8963 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
8964 existence of cc1plus check whether $(LANGUAGES) contains C++.
8965
8966 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8967
8968 * method.c (do_build_copy_constructor): When copying an anonymous
8969 union member loop around to handle nested anonymous unions. Use
8970 the offset of the member relative to the outer structure, not the
8971 union.
8972
8973 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8974
8975 * call.c (resolve_args): New fn.
8976 (build_new_function_call): Use it.
8977 (build_object_call): Likewise.
8978 (build_new_method_call): Likewise.
8979
8980 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8981
8982 * call.c (build_over_call): tsubst all default parms from templates.
8983
8984 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8985
8986 * decl.c (struct cp_function): Add static_labelno.
8987 (push_cp_function_context): Save it.
8988 (pop_cp_function_context): Restore it.
8989
8990 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8991
8992 * typeck.c (build_component_ref_1): Convert from reference.
8993
8994 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8995
8996 * parse.y (current_declspecs, prefix_attributes): Initialize to
8997 NULL_TREE.
8998
8999 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
9000 before we try to force it to be a TREE_LIST.
9001 (decl): Make sure $1.t is non-nil.
9002
9003 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9004
9005 * pt.c (uses_template_parms): Handle template first-parse codes.
9006
9007 * decl.c (cp_finish_decl): Only warn about user-defined statics.
9008
9009 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9010
9011 * pt.c (unify): Handle BOOLEAN_TYPE.
9012
9013 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
9014 * pt.c (tsubst): Don't set it.
9015 * call.c (build_over_call): Use uses_template_parms.
9016
9017 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9018
9019 * method.c (build_overload_nested_name): Use static_labelno
9020 instead of var_labelno.
9021 (build_qualified_name): New fn.
9022 (build_overload_name): Split out from here.
9023 (build_static_name): Use build_qualified_name.
9024 * decl.c (cp_finish_decl): Statics in extern inline functions
9025 have comdat linkage.
9026 (start_function): Initialize static_labelno.
9027
9028 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9029
9030 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
9031 before "all member functions in class [] are private"
9032
9033 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9034
9035 * lex.c (do_scoped_id): convert_from_reference.
9036 * init.c (build_offset_ref): Likewise.
9037
9038 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9039
9040 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
9041
9042 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9043
9044 * typeck.c (get_member_function_from_ptrfunc): Promote index
9045 before saving it.
9046
9047 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
9048
9049 * tree.c (layout_basetypes): Move non-virtual destructor warning.
9050 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
9051
9052 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9053
9054 * decl.c (grokdeclarator): Call add_defarg_fn for the function
9055 type, too.
9056 * lex.c (add_defarg_fn): Adjust.
9057 (do_pending_defargs): Adjust. Don't skip the first parm.
9058
9059 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9060
9061 * decl.c (build_enumerator): Global enumerators are also readonly.
9062
9063 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
9064 (build_dynamic_cast): Call it and convert_from_reference.
9065
9066 * lex.c (add_defarg_fn): New fn.
9067 (snarf_defarg): Don't add to defarg_types.
9068 (do_pending_defargs): Lose defarg_types. All fns we process now
9069 have defargs.
9070 * decl.c (grokfndecl): Call add_defarg_fn.
9071
9072 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
9073 * cp-tree.def: Add DEFAULT_ARG.
9074 * spew.c (yylex): Call snarf_defarg as appropriate.
9075 * parse.y: New tokens DEFARG and DEFARG_MARKER.
9076 (defarg_again, pending_defargs, defarg, defarg1): New rules.
9077 (structsp): Use pending_defargs.
9078 (parms, full_parm): Use defarg.
9079 * lex.c (init_lex): Initialize inline_text_firstobj.
9080 (do_pending_inlines): Never pass the obstack to feed_input.
9081 (process_next_inline): Call end_input instead of restore_pending_input.
9082 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
9083 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
9084 * input.c (end_input): New fn.
9085 (sub_getch): At the end of some fed input, just keep returning EOF
9086 until someone calls end_input.
9087 Remove 'obstack' field from struct input_source.
9088 * decl.c (grokparms): Handle DEFAULT_ARG.
9089 (replace_defarg): New fn.
9090 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
9091
9092 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9093
9094 * call.c (implicit_conversion): If nothing else works, try binding
9095 an rvalue to a reference.
9096
9097 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
9098
9099 * decl.c (init_decl_processing): fix Jun 30 patch -- move
9100 ifndef for Cygwin32 to include SIGSEGV.
9101
9102 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9103
9104 * class.c (finish_struct_1): Only complain about pointers without
9105 copy stuff if there are any constructors.
9106
9107 * rtti.c (build_dynamic_cast): Call complete_type on the types.
9108
9109 * decl.c (grokfndecl): If the function we chose doesn't actually
9110 match, die.
9111
9112 * decl2.c (grokclassfn): Don't specify 'const int' for the
9113 artificial destructor parm.
9114
9115 * pt.c (type_unification): If we are called recursively, nothing
9116 decays.
9117
9118 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
9119
9120 * decl.c (init_decl_processing): Stop trying to catch signals
9121 other than SIGABRT since the Cygwin32 library doesn't support
9122 them correctly yet. This fixes a situation in which g++ causes
9123 a hang on SIGSEGVs and other such signals in our Win32-hosted
9124 tools.
9125
9126 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
9127
9128 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
9129
9130 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
9131
9132 * typeck2.c (store_init_value): Always return the value if our
9133 type needs constructing.
9134
9135 * method.c (hack_identifier): Convert class statics from
9136 reference, too.
9137
9138 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9139
9140 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
9141
9142 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
9143
9144 * typeck.c (c_expand_return): Make sure we clean up temporaries at
9145 the end of return x;
9146
9147 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9148
9149 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
9150
9151 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
9152
9153 * except.c (expand_builtin_throw): Add support
9154 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
9155
9156 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9157
9158 * repo.c (extract_string): Null-terminate.
9159
9160 * cp-tree.h (TI_SPEC_INFO): New macro.
9161 (CLASSTYPE_TI_SPEC_INFO): New macro.
9162 * pt.c (push_template_decl): Correctly determine # of template parms
9163 for partial specs.
9164
9165 * call.c (compare_ics): Really fix 'this' conversions.
9166
9167 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
9168 non-template fn.
9169
9170 * pt.c (push_template_decl): Complain about mismatch in # of
9171 template parms between a class template and a member template.
9172
9173 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9174
9175 * method.c (synthesize_method): You can't call
9176 function_cannot_inline_p after finish_function.
9177 * decl.c (finish_function): Turn on flag_inline_functions and turn
9178 off DECL_INLINE before handing a synthesized method to the
9179 backend.
9180
9181 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9182
9183 * method.c (synthesize_method): Remove July 30 change to never set
9184 DECL_INLINE if at_eof.
9185
9186 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
9187
9188 * xref.c (GNU_xref_member): Ensure that the node has a
9189 decl_lang_specific part before checking DECL_FRIEND_P.
9190
9191 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9192
9193 * pt.c (instantiate_class_template): Diagnose non-class types used
9194 as bases.
9195
9196 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9197
9198 * typeck.c (build_conditional_expr): Use convert_for_initialization
9199 instead of convert_and_check.
9200
9201 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9202
9203 * parse.y (typespec): Don't pedwarn for typeof.
9204
9205 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
9206
9207 * repo.c (finish_repo): Only check changes if we would write a
9208 repo file.
9209
9210 * call.c (compare_ics): Fix handling of 'this' conversions.
9211
9212 * pt.c (do_decl_instantiation): Support static data too. Rename
9213 from do_function_instantiation.
9214 * cp-tree.h: Adjust.
9215 * parse.y: Adjust.
9216
9217 * repo.c (extract_string): New fn.
9218 (get_base_filename): Use it.
9219 (init_repo): Compare old args with current args.
9220
9221 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
9222
9223 * Makefile.in, Make-lang.in: Protect C-ls with a comment
9224 character, idea from Paul Eggert <eggert@twinsun.com>.
9225
9226 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
9227
9228 * typeck.c (c_expand_return): Be more persistent in looking for
9229 returned temps.
9230
9231 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
9232 pointer to reference.
9233
9234 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
9235
9236 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9237
9238 * init.c (build_member_call, build_offset_ref):
9239 Use do_scoped_id instead of do_identifier.
9240
9241 * cvt.c (convert): Remove bogosity.
9242
9243 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9244
9245 * cvt.c (build_up_reference): Do checks of ARGTYPE and
9246 TARGET_TYPE before trying to use get_binfo.
9247
9248 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
9249
9250 * cvt.c (build_up_reference): Call get_binfo to get access control.
9251
9252 * decl2.c (import_export_decl): If we don't support weaks, leave
9253 statics undefined.
9254
9255 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
9256
9257 * except.c (expand_builtin_throw): Add support for machines that
9258 cannot access globals after throw's epilogue when
9259 -fno-sjlj-exceptions is used.
9260
9261 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
9262
9263 * parse.y: 'std::' becomes '::'.
9264 * lex.c (real_yylex): Remove 'namespace' warning.
9265 * init.c (build_member_call): Ignore 'std::'.
9266 (build_offset_ref): Likewise.
9267 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
9268 (do_toplevel_using_decl): Ignore 'using std::whatever'.
9269 * decl.c (push_namespace): Just sorry.
9270 (pop_namespace): Nop.
9271 (init_decl_processing): Declare std namespace.
9272
9273 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9274
9275 * search.c (push_class_decls): A name which ambiguously refers to
9276 several instantiations of the same template just refers to the
9277 template.
9278
9279 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
9280
9281 * decl.c (build_enumerator): fix problem with unsigned long
9282 enumerated values being smashed to ints, causing overflow
9283 when computing next enumerated value. (for enum values around
9284 MAX_VAL).
9285
9286 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9287
9288 * typeck.c (build_component_ref): Only call mark_used on a decl.
9289
9290 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9291
9292 * typeck.c (build_c_cast): Make the check for a ptr to function
9293 more specific before possible default_conversion call.
9294
9295 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
9296
9297 * except.c (expand_exception_blocks): Simplify and fix and make
9298 sure we don't end a region in a sequence, as expand_end_bindings
9299 doesn't like it.
9300
9301 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
9302
9303 * except.c (init_exception_processing): Mark terminate as not
9304 returning so that the optimizer can optimize better.
9305
9306 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
9307
9308 * cvt.c (convert): Don't do any extra work, if we can avoid it
9309 easily.
9310
9311 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
9312
9313 * *.[chy]: Change cp_convert to ocp_convert, change convert to
9314 cp_convert. convert is now reserved for the backend, and doesn't
9315 have the semantics a frontend person should ever want.
9316
9317 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9318
9319 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
9320 Lose -traditional support.
9321
9322 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9323
9324 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
9325
9326 * parse.y (self_reference): Do it for templates, too.
9327 * class.c (pushclass): Don't overload_template_name; the alias
9328 generated by build_self_reference serves the same purpose.
9329
9330 * tree.c (list_hash): Make static, take more args.
9331 (list_hash_lookup): Likewise.
9332 (list_hash_add): Make static.
9333 (list_hash_canon): Lose.
9334 (hash_tree_cons): Only build a new node if one isn't already in the
9335 hashtable.
9336 (hash_tree_chain): Use hash_tree_cons.
9337 * cp-tree.h: Adjust.
9338 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
9339 of calling lookup_name.
9340
9341 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
9342
9343 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
9344 doesn't refer to the CONST_DECLs.
9345
9346 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
9347
9348 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
9349 is bigger.
9350 (expand_class_desc): Convert the last argument to a sizetype.
9351
9352 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9353
9354 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
9355 __real__): Add reswords.
9356 * hash.h: Regenerate.
9357 * lex.h (rid): Add RID_COMPLEX.
9358 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
9359 * lex.c (init_lex): Add building of RID_COMPLEX.
9360 (real_yylex): General cleanup in line with what c-lex.c also has,
9361 sans the cruft for traditional; add handling of SPEC_IMAG, complex
9362 types, and imaginary numeric constants.
9363 * parse.y (REALPART, IMAGPART): Add tokens.
9364 (unary_expr): Add REALPART and IMAGPART rules.
9365 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
9366 * decl.c (complex_{integer,float,double,long}_type_node): Define
9367 types.
9368 (init_decl_processing): Set up the types.
9369 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
9370 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
9371 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
9372 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
9373 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
9374 COMPLEX_TYPE case.
9375 * method.c (build_overload_name): Add handling of the different
9376 COMPLEX_TYPEs, prefixing them with `J'.
9377 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
9378 as a template parm.
9379 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
9380 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
9381 (mapcar): Handle COMPLEX_CST.
9382 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
9383 (common_type): Add code for complex types.
9384 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
9385 (convert_for_assignment): Likewise.
9386 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
9387
9388 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9389
9390 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
9391 tsubst_expr, as it might try to do overload resolution.
9392
9393 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9394
9395 * pt.c (instantiate_class_template): Oops.
9396
9397 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9398
9399 * cp-tree.def: Add TAG_DEFN.
9400 * pt.c (tsubst_enum): New fn.
9401 (instantiate_class_template): Use it.
9402 (tsubst_expr): Support TAG_DEFN.
9403 (tsubst): Support local enums.
9404 (tsubst_copy): Likewise.
9405 * decl.c (finish_enum): Likewise.
9406 (start_enum): If this is a local enum, switch to permanent_obstack.
9407
9408 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
9409
9410 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
9411 (finish_function): Put the base init code for constructors just
9412 after the parm cleanup insns.
9413 (struct cp_function): Add last_parm_cleanup_insn.
9414 (push_cp_function_context): Likewise.
9415 (pop_cp_function_context): Likewise.
9416
9417 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9418
9419 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
9420
9421 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9422
9423 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
9424 for THUNK_FNDECL before we switch to temporary allocation.
9425
9426 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9427
9428 * call.c (build_new_op): Handle null arg2 for ?:.
9429
9430 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
9431
9432 * except.c (expand_exception_blocks): Ensure that we flow through
9433 the end of the exception region for the exception specification.
9434 Move exception region for the exception specification in, so that
9435 it doesn't protect the parm cleanup. Remove some obsolete code.
9436 * decl.c (store_parm_decls): Likewise.
9437 (finish_function): Likewise.
9438
9439 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
9440
9441 * init.c (build_new): Fix nothrow handling.
9442
9443 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9444
9445 * init.c (emit_base_init): Don't warn about the initialization
9446 list for an artificial member.
9447
9448 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9449
9450 * expr.c (do_case): Handle !START case for the error msg.
9451
9452 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9453
9454 * decl2.c, lang-options.h: New option -Weffc++.
9455 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
9456 to -Weffc++.
9457
9458 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
9459 to MULTIPLE_SYMBOL_SPACES.
9460
9461 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9462
9463 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
9464
9465 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
9466
9467 * typeck.c (c_expand_return): Don't complain about returning void
9468 to void in an artificial function.
9469 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
9470 don't set DECL_RESULT, set DECL_ARTIFICIAL.
9471 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
9472
9473 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
9474
9475 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
9476 exception handling.
9477 * except.c (init_exception_processing): Likewise.
9478 (expand_end_catch_block): Likewise.
9479 (expand_exception_blocks): Likewise.
9480 (expand_throw): Likewise.
9481 * exception.cc (__default_terminate): Likewise.
9482
9483 * init.c (perform_member_init): Use new method of expr level
9484 cleanups, instead of cleanups_this_call and friends.
9485 (emit_base_init): Likewise.
9486 (expand_aggr_vbase_init_1): Likewise.
9487 (expand_vec_init): Likewise.
9488 * decl.c (cp_finish_decl): Likewise.
9489 (expand_static_init): Likewise.
9490 (store_parm_decls): Likewise.
9491 (cplus_expand_expr_stmt): Likewise.
9492 * decl2.c (finish_file): Likewise.
9493
9494 * Make-lang.in (exception.o): Ok to compile with -O now.
9495
9496 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
9497 we know it will be done later by the backend.
9498
9499 * decl2.c (lang_f_options): Remove support for short temps.
9500 * lang-options.h: Likewise.
9501
9502 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9503
9504 * tree.c (varargs_function_p): New fn.
9505 * method.c (emit_thunk): Replace broken generic code with code to
9506 generate a heavyweight thunk function.
9507
9508 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
9509
9510 * pt.c (process_template_parm): pedwarn about floating-point parms.
9511
9512 * decl.c (grokdeclarator): inline no longer implies static.
9513
9514 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
9515
9516 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9517
9518 * class.c (check_for_override): The signature of an overriding
9519 function is not changed.
9520
9521 * call.c (build_over_call): Move setting of conv into the loop.
9522 Note: this change, along with the related changes of the 18th thru
9523 the 20th of April, fix an infinite loop problem in conversions.
9524
9525 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9526
9527 * call.c (build_user_type_conversion_1): Really ignore rvalue
9528 conversions when looking for a REFERENCE_TYPE.
9529
9530 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
9531 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
9532 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
9533 (build_unary_op): Likewise.
9534 * call.c (build_over_call): See through a CONVERT_EXPR around the
9535 ADDR_EXPR for on a temporary.
9536 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
9537 the ADDR_EXPR for a local variable.
9538
9539 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
9540
9541 * call.c (build_user_type_conversion_1): If we're trying to
9542 convert to a REFERENCE_TYPE, only consider lvalue conversions.
9543 (build_new_function_call): Print candidates.
9544 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
9545 (reference_binding): Binding a temporary of a reference-related type
9546 is BAD.
9547
9548 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9549
9550 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
9551 * tinfo2.cc (type_info::before): Likewise.
9552
9553 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
9554
9555 * call.c (implicit_conversion): Oops.
9556
9557 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9558
9559 * call.c (implicit_conversion): Try to find a reference conversion
9560 before binding a const reference to a temporary.
9561
9562 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
9563
9564 * exception.cc (__default_unexpected): Call terminate by default,
9565 so that if the user overrides terminate, the correct function will
9566 be called.
9567
9568 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
9569
9570 * parse.y (left_curly): Avoid trying to use any fields of
9571 error_mark_node, as there aren't any.
9572
9573 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9574
9575 * lex.c (do_identifier): Avoid breaking on overloaded methods
9576 as default arguments.
9577
9578 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
9579
9580 * call.c (add_template_candidate): Initialize the variable "dummy".
9581
9582 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
9583
9584 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
9585 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
9586
9587 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9588
9589 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
9590 (debug_binfo): Delete decl, not needed.
9591
9592 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
9593 promotes_to_aggr_type): Delete fns.
9594 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
9595 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
9596 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
9597
9598 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
9599
9600 * friend.c (is_friend_type): Delete fn.
9601 * cp-tree.h (is_friend_type): Delete decl.
9602
9603 * decl.c (original_result_rtx, double_ftype_double,
9604 double_ftype_double_double, int_ftype_int, long_ftype_long,
9605 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
9606 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
9607
9608 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
9609 fwd decls.
9610 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
9611
9612 * decl.c (pushdecl_nonclass_level): #if 0, unused.
9613 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
9614
9615 * lex.c (reinit_lang_specific): #if 0, unused.
9616 * cp-tree.h (reinit_lang_specific): #if 0 decl.
9617
9618 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
9619 * cp-tree.h (revert_static_member_fn): Delete decl.
9620
9621 * class.c (root_lang_context_p): Delete fn.
9622 * cp-tree.h (root_lang_context_p): Delete decl.
9623
9624 * decl.c (set_current_level_tags_transparency): #if 0, unused.
9625 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
9626
9627 * lex.c (set_vardecl_interface_info): Make static.
9628 * cp-tree.h (set_vardecl_interface_info): Delete decl.
9629
9630 * call.c (find_scoped_type): Make static.
9631 * cp-tree.h (find_scoped_type): Delete decl.
9632
9633 * search.c (convert_pointer_to_vbase): Make static.
9634 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
9635
9636 * decl.c (const_ptr_type_node): Likewise.
9637 * cp-tree.h (const_ptr_type_node): Delete decl.
9638
9639 * typeck.c (common_base_type): Make static.
9640 * cp-tree.h (common_base_types): Delete erroneous decl.
9641
9642 * pt.c (classtype_mangled_name): Make static.
9643 * cp-tree.h (classtype_mangled_name): Delete decl.
9644
9645 * lex.c (check_newline): Make static.
9646 * cp-tree.h (check_newline): Delete decl.
9647
9648 * typeck.c (build_x_array_ref): Delete fn, same idea as
9649 grok_array_decl.
9650 * cp-tree.h (build_x_array_ref): Delete decl.
9651
9652 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
9653 copy_lang_decl.
9654 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
9655
9656 * class.c (build_vtable_entry): Make static.
9657 * cp-tree.h (build_vtable_entry): Delete decl.
9658
9659 * class.c (build_vbase_pointer): Make static.
9660 * cp-tree.h (build_vbase_pointer): Delete decl.
9661
9662 * sig.c (build_sptr_ref): Add forward decl and make static.
9663 * cp-tree.h (build_sptr_ref): Delete decl.
9664
9665 * call.c (build_new_method_call): Add forward decl and make static.
9666 * cp-tree.h (build_new_method_call): Delete decl.
9667
9668 * call.c (build_object_call): Make static.
9669 * class.c (check_for_override, complete_type_p, mark_overriders):
9670 Likewise.
9671 * decl.c (cp_function_chain): Likewise.
9672 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
9673 Likewise.
9674 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
9675 Likewise.
9676 * tree.c (build_cplus_array_type_1): Likewise.
9677 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
9678 (comp_target_parms): Likewise.
9679
9680 * init.c (build_builtin_call): Make static.
9681 * cp-tree.h (build_builtin_call): Delete decl.
9682
9683 * typeck.c (binary_op_error): Delete decl.
9684 * cp-tree.h (binary_op_error): Likewise.
9685
9686 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9687
9688 * call.c (build_method_call): Compare against error_mark_node
9689 directly, rather than the ERROR_MARK tree code.
9690 * cvt.c (cp_convert): Likewise.
9691 * decl.c (print_binding_level): Likewise.
9692 (duplicate_decls): Likewise.
9693 (grokdeclarator): Likewise.
9694 (grokdeclarator): Likewise.
9695 * init.c (expand_aggr_init_1): Likewise.
9696 (decl_constant_value): Likewise.
9697 * method.c (build_opfncall): Likewise.
9698 (hack_identifier): Likewise.
9699 * typeck.c (build_modify_expr): Likewise.
9700
9701 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
9702
9703 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9704
9705 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
9706
9707 * pt.c (coerce_template_parms): Add new error message.
9708
9709 * method.c (build_overload_value): Implement name mangling for
9710 floating-point template arguments.
9711
9712 * method.c (build_overload_int, icat, dicat): Fix mangling of template
9713 arguments whose absolute value doesn't fit in a signed word.
9714
9715 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9716
9717 * friend.c: New file; put all of the friend stuff in here.
9718 * init.c: Instead of here.
9719 * Makefile.in (CXX_OBJS): Add friend.o.
9720 (friend.o): Add dependencies.
9721 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
9722
9723 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
9724
9725 * call.c (build_scoped_method_call): Complain if the scope isn't a
9726 base.
9727
9728 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9729
9730 * parse.y (left_curly): Don't crash on erroneous type.
9731
9732 * init.c (build_delete): Fix type of ref.
9733
9734 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9735
9736 * search.c (get_vbase_1): Renamed from get_vbase.
9737 (get_vbase): Wrapper, now non-static.
9738 (convert_pointer_to_vbase): Now static.
9739
9740 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
9741 * init.c (build_delete): Pass one.
9742 (build_partial_cleanup_for): Use build_scoped_method_call.
9743 * decl.c (finish_function): Pass a binfo.
9744
9745 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9746
9747 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
9748
9749 * typeck.c (build_c_cast): Lose other reference to flag.
9750
9751 * call.c (build_field_call): Don't look for [cd]tor_identifier.
9752 * decl2.c (delete_sanity): Remove meaningless use of
9753 LOOKUP_HAS_IN_CHARGE.
9754 * decl.c (finish_function): Use build_scoped_method_call instead
9755 of build_delete for running vbase dtors.
9756 * init.c (build_delete): Call overload resolution code instead of
9757 duplicating it badly.
9758
9759 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
9760
9761 * call.c (build_over_call): Call mark_used before trying to elide
9762 the call.
9763
9764 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
9765
9766 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9767
9768 * typeck.c (build_modify_expr): Always pedwarn for a cast to
9769 non-reference used as an lvalue.
9770
9771 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9772
9773 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
9774
9775 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9776
9777 * parse.y (handler): Fix template typo.
9778
9779 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9780
9781 * error.c (lang_decl_name): New fn.
9782 * tree.c (lang_printable_name): Use it.
9783
9784 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
9785
9786 * g++spec.c: Include config.h so that we can catch bzero #defines
9787 from the config file.
9788
9789 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
9790
9791 * new1.cc: Include a declaration for malloc, to avoid warning, and
9792 avoid lossing on systems that require one (ones that define malloc
9793 in xm.h).
9794
9795 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9796
9797 * decl2.c (max_tinst_depth): New variable.
9798 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
9799 option.
9800 * pt.c (max_tinst_depth): Variable moved.
9801 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
9802 as legal.
9803
9804 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
9805
9806 * decl.c (xref_basetypes): Allow a base class that depends on
9807 template parms to be incomplete.
9808
9809 * decl2.c (build_expr_from_tree): Support typeid(type).
9810 * rtti.c (get_typeid): Support templates.
9811 (expand_si_desc, expand_class_desc): Fix string length.
9812 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
9813
9814 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
9815
9816 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
9817
9818 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
9819
9820 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9821
9822 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
9823 smashes together template and non-template decls of the same
9824 signature.
9825
9826 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
9827
9828 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
9829
9830 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9831
9832 * decl.c (duplicate_decls): Next route, pedwarn about different
9833 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
9834
9835 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9836
9837 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
9838 (struct lang_type): Delete has_default_implementation member.
9839 Increase dummy to 21.
9840 * decl.c (start_method): Delete usage.
9841
9842 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
9843 store_after_parms, start_decl_1, auto_function): Add decls.
9844 (get_arglist_len_in_bytes, declare_implicit_exception,
9845 have_exceptions_p, make_type_decl, typedecl_for_tag,
9846 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
9847 build_component_type_expr, cplus_exception_name,
9848 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
9849 * call.c (build_this): Make static.
9850 (is_complete): Likewise.
9851 (implicit_conversion): Likewise.
9852 (reference_binding): Likewise.
9853 (standard_conversion): Likewise.
9854 (strip_top_quals): Likewise.
9855 (non_reference): Likewise.
9856 (build_conv): Likewise.
9857 (user_harshness): Likewise.
9858 (rank_for_ideal): Likewise.
9859 * decl.c (start_decl_1): Delete forward decl.
9860 (push_decl_level): Make static.
9861 (resume_binding_level): Make static.
9862 (namespace_bindings_p): Make static.
9863 (declare_namespace_level): Make static.
9864 (lookup_name_real): Make static.
9865 (duplicate_decls): Make static. Take register off NEWDECL and
9866 OLDDECL parm decls.
9867 * decl2.c (get_sentry): Make static.
9868 (temp_name_p): Delete fn.
9869 * except.c (auto_function): Delete decl.
9870 * lex.c (handle_{cp,sysv}_pragma): Make static.
9871 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
9872 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
9873 * pt.c (tsubst_expr_values): Make static.
9874 * rtti.c (combine_strings): Delete decl.
9875
9876 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9877
9878 * pt.c (push_template_decl): Handle getting a typedef.
9879
9880 * call.c (build_new_function_call): Complain about void arg.
9881
9882 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9883
9884 * decl.c (duplicate_decls): Give pedwarn of different exceptions
9885 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
9886
9887 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
9888
9889 * except.c (expand_throw): Don't expand the cleanup tree here,
9890 since we are not going to write the rtl out. Fixes problem with
9891 -g -O on SPARC.
9892
9893 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
9894
9895 * Make-lang.in: Add $(exeext) as necessary.
9896
9897 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
9898
9899 * parse.y (handler_seq): Must have at least one catch clause.
9900
9901 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9902
9903 * call.c (add_builtin_candidate): Restore ?: hack.
9904
9905 * decl.c (grok_op_properties): More warnings.
9906
9907 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9908
9909 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
9910 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
9911
9912 * decl.c (duplicate_decls): Scale back to a warning, and only do
9913 'em if -pedantic.
9914
9915 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
9916
9917 * decl.c (duplicate_decls): pedwarn mismatched exception
9918 specifications.
9919
9920 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
9921
9922 * call.c (build_new_method_call): Don't display the invisible
9923 argument for controlling virtual bases.
9924
9925 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
9926
9927 * new: Add nothrow new and delete, bad_alloc and throw specifications
9928 for delete.
9929 * decl.c (init_decl_processing): Add throw specification for delete.
9930 * new.cc (nothrow): Define.
9931 * lex.c (real_yylex): Removing warning that throw and friends are
9932 keywords.
9933 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
9934 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
9935 * Make-lang.in: Add new{1,2}.{cc,o}.
9936
9937 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9938
9939 * lex.c (cons_up_default_function): Fix return type of synth op=.
9940
9941 * init.c (emit_base_init): Add warnings for uninitialized members
9942 and bases.
9943
9944 * decl.c (xref_basetypes): Add warning for non-polymorphic type
9945 with destructor used as base type.
9946
9947 * decl.c (grok_op_properties): Add warning for op= returning void.
9948 * typeck.c (c_expand_return): Add warning for op= returning anything
9949 other than *this.
9950
9951 * class.c (finish_struct_1): Add warning for class with pointers
9952 but not copy ctor or copy op=.
9953
9954 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
9955 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
9956 (instantiate_template): If -fexternal-templates, add this
9957 instantiation to pending_templates.
9958
9959 * decl2.c (copy_assignment_arg_p): Disable old hack to support
9960 Booch components.
9961
9962 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
9963
9964 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
9965
9966 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
9967
9968 * call.c (standard_conversion): Handle getting references. Tack
9969 on RVALUE_CONV here. Do it for non-class types, too.
9970 (reference_binding): Pass references to standard_conversion.
9971 (implicit_conversion): Likewise.
9972 (add_builtin_candidate): Disable one ?: kludge.
9973 (convert_like): Handle RVALUE_CONVs for non-class types.
9974 (joust): Disable the other ?: kludge.
9975
9976 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9977
9978 * decl.c (init_decl_processing): Add code to build up common
9979 function types beforehand, to avoid creation then removal of
9980 things already in the hash table.
9981
9982 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
9983
9984 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
9985 the arguments.
9986
9987 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
9988 current_template_parms.
9989
9990 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
9991
9992 * search.c (lookup_field): Don't return a function, check want_type.
9993
9994 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9995
9996 * init.c (build_new): Make sure PLACEMENT has a type.
9997
9998 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9999
10000 * init.c (build_new): Support new (nothrow).
10001
10002 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10003
10004 * pt.c (instantiate_decl): Also do push_to_top_level before setting
10005 up DECL_INITIAL.
10006
10007 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
10008 * pt.c (tsubst): Defer instantiation of default args.
10009 * call.c (build_over_call): Until here.
10010
10011 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10012
10013 * search.c (lookup_field): Make sure we have an
10014 IDENTIFIER_CLASS_VALUE before we try to return it.
10015
10016 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10017
10018 * call.c (build_method_call): Delete unused var PARM.
10019 (build_overload_call_real): Likewise.
10020 (build_object_call): Delete unused var P.
10021 (build_new_op): Likewise.
10022 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
10023 var definitions, which are never used.
10024 (shadow_tag): Delete unused var FN.
10025 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
10026 * init.c (build_new): Delete unused var ALLOC_TEMP.
10027 * method.c (hack_identifier): Delete unused var CONTEXT.
10028 (do_build_copy_constructor): Delete unused var NAME.
10029 (synthesize_method): Delete unused var BASE.
10030 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
10031 * rtti.c (build_headof): Delete unused var VPTR.
10032 (get_typeid): Delete unused var T.
10033 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
10034 and ORIG_OP2.
10035 (build_ptrmemfunc): Delete unused vars U and NINDEX.
10036 * typeck2.c (build_functional_cast): Delete unused var BINFO.
10037
10038 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
10039
10040 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
10041 things in a type being defined.
10042 * decl.c (finish_enum): Reverse the values so that they are in
10043 the correct order.
10044
10045 * pt.c (instantiate_class_template): Don't initialize
10046 BINFO_BASETYPES until the vector is filled out.
10047 (unify): Don't abort on conflicting bindings, just fail.
10048 (instantiate_decl): Do push_tinst_level before any tsubsting.
10049
10050 * method.c (build_overload_value): Handle getting a
10051 TEMPLATE_CONST_PARM for a pointer.
10052
10053 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
10054
10055 * init.c (expand_member_init): Don't give 'not a base' error for
10056 templates.
10057
10058 * pt.c (instantiate_decl): Call import_export_decl later.
10059
10060 * pt.c (instantiate_class_template): Return a value.
10061
10062 * parse.y (extension): New rule for __extension__.
10063 (extdef, unary_expr, decl, component_decl): Use it.
10064
10065 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
10066
10067 * class.c (base_binfo): Remove unused base_has_virtual member.
10068 (finish_base_struct): Likewise.
10069 (finish_struct_1): Likewise.
10070
10071 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
10072
10073 * search.c (expand_upcast_fixups): Fix bogus code generation
10074 problem where the generated code uses the wrong index into the
10075 runtime built vtable on the stack. Old code could clobber random
10076 stack values.
10077
10078 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
10079
10080 * init.c (perform_member_init): Make sure the partial EH cleanups
10081 live on the function_obstack.
10082
10083 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
10084
10085 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
10086 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
10087
10088 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
10089
10090 * decl.c (grokvardecl): Avoid ANSI style initialization.
10091
10092 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
10093
10094 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
10095
10096 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
10097
10098 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
10099
10100 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10101
10102 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
10103 arguments we compare against. Start the count of I at 1, not 0,
10104 since argv[0] is still the command.
10105
10106 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
10107
10108 * lang-specs.h: Accept .cp as an C++ extension.
10109
10110 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10111
10112 * cp-tree.h (ptr_reasonably_similar): Add decl.
10113
10114 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10115
10116 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
10117 pointer. New local SPECBITS with the parm's value.
10118 (grokdeclarator): Pass &specbits down.
10119
10120 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
10121 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
10122
10123 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
10124 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
10125
10126 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
10127 not an error_mark_node.
10128
10129 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10130
10131 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
10132 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
10133
10134 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
10135
10136 * decl.c (grokdeclarator): When giving an anonymous struct a name,
10137 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
10138 not affected).
10139
10140 * typeck2.c (build_m_component_ref): If component is a pointer
10141 to data member, resolve the OFFSET_REF now.
10142
10143 * call.c (convert_like): Don't go into infinite recursion.
10144
10145 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
10146
10147 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
10148 * tree.c (layout_basetypes): And on the vbase ptr.
10149
10150 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10151
10152 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
10153 CHAR_TYPE_SIZE so bool is always the same size as another type.
10154
10155 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
10156
10157 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
10158
10159 * decl2.c (grok_x_components): Remove synthesized methods from
10160 TYPE_METHODS of an anonymous union, complain about member
10161 functions.
10162 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
10163 anonymous unions.
10164 (finish_function): Just clear the DECL_RTL of our arguments.
10165
10166 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10167
10168 * decl2.c (finish_file): Emit DWARF debugging info for static data
10169 members.
10170
10171 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
10172
10173 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
10174
10175 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
10176 IDENTIFIER_NODE.
10177
10178 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10179
10180 * Make-lang.in (g++-cross$(exeext)): Fix typo.
10181
10182 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10183
10184 Make the g++ driver now be a standalone program, rather than one
10185 that tries to run the gcc driver after munging up the options.
10186 * Make-lang.in (g++.c, g++spec.o): New rules.
10187 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
10188 added.
10189 (g++$(exeext)): New rule, based on xgcc rule.
10190 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
10191 * g++spec.c: New file.
10192 * g++.c: Removed file.
10193
10194 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
10195
10196 * cvt.c (build_up_reference): Arrange for any temporary values
10197 that have been keep in registers until now to be put into memory.
10198
10199 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10200
10201 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
10202 that make -j3 bootstrap works better.
10203
10204 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
10205
10206 * decl.c (pushtag): Do pushdecl for anon tags.
10207
10208 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
10209
10210 * typeck.c (c_expand_return): Fix logic.
10211 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
10212
10213 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
10214
10215 * g++.c (main): Make sure arglist has a final NULL entry. Add
10216 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
10217 stdin/stdout of the invoked program are redirected to
10218 nowheresville.
10219
10220 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10221
10222 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
10223
10224 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
10225
10226 * init.c (resolve_offset_ref): Handle obj.vfn better.
10227 * typeck.c (build_component_ref): Set TREE_TYPE on result from
10228 build_vfn_ref.
10229
10230 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
10231
10232 * typeck.c (convert_for_assignment): Also handle anachronistic
10233 implicit conversions from (::*)() to cv void*.
10234 * cvt.c (cp_convert_to_pointer): Likewise.
10235
10236 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
10237
10238 * lex.c (handle_cp_pragma): Fix bogus warning.
10239
10240 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
10241
10242 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
10243 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
10244
10245 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10246
10247 * class.c (finish_struct_1): Support DWARF2_DEBUG.
10248 * search.c (dfs_debug_mark): Likewise.
10249 * decl2.c (finish_vtable_vardecl): Likewise.
10250 * decl.c (pushtag, finish_enum): Likewise.
10251 * lex.c (check_newline): Use debug_* instead of calling *out
10252 functions directly.
10253
10254 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10255
10256 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
10257 on some picky hosts.
10258
10259 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10260
10261 * class.c (finish_struct_1): A class has a non-trivial copy
10262 constructor if it has virtual functions.
10263
10264 * cvt.c (cp_convert): Always call a constructor.
10265
10266 * call.c (reference_binding): Still tack on a REF_BIND
10267 for bad conversions.
10268 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
10269
10270 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
10271 (c_expand_return): Likewise.
10272 * typeck2.c (digest_init): Likewise for { }.
10273 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
10274 * cvt.c (cp_convert): Handle failure better.
10275
10276 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10277
10278 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
10279 of GCC be path-relative.
10280
10281 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10282
10283 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
10284 it does need choose-temp.o and pexecute.o.
10285
10286 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10287
10288 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
10289 that we still use it.
10290 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
10291
10292 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
10293
10294 * init.c (expand_default_init): Avoid calling constructors to
10295 initialize reference temps.
10296
10297 * cvt.c (convert_to_reference): Fix.
10298
10299 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10300
10301 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
10302 (convert_to_reference): Likewise.
10303 * typeck.c (convert_for_initialization): Likewise.
10304 * init.c (expand_default_init): Likewise.
10305 (expand_aggr_init_1): Likewise.
10306 * cp-tree.h (CONV_NONCONVERTING): Lose.
10307 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
10308 * *.c: Adjust.
10309 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
10310
10311 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
10312
10313 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
10314
10315 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10316
10317 * init.c (expand_aggr_init_1): Don't crash on non-constructor
10318 TARGET_EXPR.
10319
10320 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10321
10322 * g++.c: Include gansidecl.h.
10323 (VPROTO, PVPROTO, VA_START): Delete.
10324 (choose_temp_base_try, choose_temp_base, perror_exec,
10325 run_dos) [__MSDOS__]: Delete fns.
10326 (pfatal_with_name): Delete fn.
10327 (temp_filename): Declare like in gcc.c.
10328 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
10329 (error_count, signal_count): Define.
10330 (error): Delete both definitions.
10331 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
10332 (pfatal_pexecute): Add fn from gcc.c.
10333 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
10334 code to use the pexecute stuff also used by gcc.c.
10335 (MIN_FATAL_STATUS): Define.
10336 * Make-lang.in (g++): Add dependency on and linking with
10337 choose-temp.o and pexecute.o.
10338
10339 * cp-tree.h: Include gansidecl.h.
10340 (STDIO_PROTO): Delete #undef/#define.
10341 * cvt.c (NULL): Delete #undef/#define.
10342 * expr.c (NULL): Likewise.
10343 * init.c (NULL): Likewise.
10344 * rtti.c (NULL): Likewise.
10345 * xref.c (NULL): Likewise.
10346
10347 * cp-tree.h (build_user_type_conversion): Add prototype.
10348 * call.c (build_user_type_conversion): Delete prototype. Correct
10349 decl of FLAGS arg to be an int.
10350 * cvt.c (build_user_type_conversion): Likewise.
10351
10352 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
10353
10354 * cp-tree.def: Add TRY_BLOCK and HANDLER.
10355 * except.c (expand_start_catch_block): Support templates.
10356 * parse.y (try_block, handler_seq): Likewise.
10357 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
10358
10359 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
10360
10361 * pt.c (current_template_args): New fn.
10362 (push_template_decl): Use it.
10363 * decl.c (grokdeclarator): Use it.
10364
10365 * decl2.c (build_expr_from_tree): Dereference ref vars.
10366
10367 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
10368 the decl-specifier-seq.
10369
10370 * decl.c (grok_op_properties): Don't force the type of a conversion
10371 op to be complete. Don't warn about converting to the same type
10372 for template instantiations.
10373
10374 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
10375 methods.
10376
10377 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
10378
10379 * typeck.c (get_delta_difference): Remove previous bogusness.
10380 Don't give errors if force is set.
10381
10382 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10383
10384 * decl2.c (finish_file): Don't emit debug info.
10385 * decl.c (pushdecl): Lose obsolete code.
10386 (grokdeclarator): Still do the long long thing after complaining.
10387 * search.c (note_debug_info_needed): Don't do anything if we're in a
10388 template.
10389 * method.c (synthesize_method): For non-local classes,
10390 push_to_top_level first.
10391
10392 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
10393
10394 * typeck.c (get_delta_difference): Add no_error parameter.
10395 (build_ptrmemfunc): Call get_delta_difference with no_error set;
10396 we don't want error messages when converting unrelated
10397 pointer-to-member functions.
10398
10399 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
10400
10401 * error.c (dump_expr): Improve the wording on error messages that
10402 involve pointer to member functions.
10403
10404 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
10405
10406 * cvt.c (cp_convert_to_pointer): Move code for conversions from
10407 (::*)() to void* or (*)() up a bit, so that we can convert from
10408 METHOD_TYPEs as well.
10409
10410 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10411
10412 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
10413 There are no 'member' types.
10414 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
10415 (build_x_typeid): Handle errors.
10416
10417 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
10418
10419 * typeck.c (convert_for_assignment): Handle anachronistic implicit
10420 conversions from (::*)() to void* or (*)().
10421 * cvt.c (cp_convert_to_pointer): Likewise.
10422 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
10423 conversions from here.
10424 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
10425 * lang-options.h: Likewise.
10426 * decl2.c (warn_pmf2ptr): Define.
10427 * cp-tree.h: Declare it.
10428 * typeck2.c (digest_init): Allow pmfs down into
10429 convert_for_initialization.
10430
10431 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
10432
10433 * typeck.c (c_expand_return): Fix for returning overloaded fn.
10434
10435 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10436
10437 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
10438 * decl.c (grok_reference_init): Pass DIRECT_BIND.
10439 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
10440 DIRECT_BIND.
10441 * call.c (convert_like): Don't pass INDIRECT_BIND.
10442 * typeck.c (convert_arguments): Likewise.
10443 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
10444
10445 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
10446
10447 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
10448 similar code in build_up_ref.
10449 * cvt.c (build_up_reference): Drastically simplify.
10450
10451 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
10452
10453 * typeck.c (signed_or_unsigned_type): If the given type already
10454 as the correct signedness, then just return it.
10455
10456 * typeck.c ({un,}signed_type): If can't do anything, call
10457 signed_or_unsigned_type.
10458
10459 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
10460
10461 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
10462 current_class_type is NULL.
10463
10464 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
10465
10466 * class.c (finish_struct_1): Avoid empty structs by adding a field
10467 so layout_type gets the mode right.
10468
10469 * typeck.c (c_expand_return): Drastically simplify.
10470
10471 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
10472
10473 * typeck.c (decay_conversion): Handle overloaded methods.
10474
10475 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
10476
10477 * call.c (build_over_call): A TARGET_EXPR has side-effects.
10478
10479 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
10480
10481 * cvt.c (convert_to_pointer_force): Add code to support pointer to
10482 member function to pointer to function conversions.
10483 * init.c (resolve_offset_ref): Add code to allow faked up objects,
10484 ignoring them if they are not used, and giving an error, if they
10485 are needed.
10486 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
10487 code, and so that we can give an error, if we needed an object,
10488 and one was not provided.
10489 (build_c_cast): Don't call default_conversion when we want to
10490 convert to pointer to function from a METHOD_TYPE.
10491
10492 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
10493
10494 * Make-lang.in (cplib2.ready): Fix logic.
10495
10496 * decl.c (shadow_tag): Only complain about non-artificial function
10497 members.
10498
10499 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
10500
10501 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
10502
10503 * expr.c (cplus_expand_expr): Pre-tweak call_target like
10504 expand_inline_function would.
10505
10506 * pt.c (mark_decl_instantiated): If extern_p, call
10507 mark_inline_for_output.
10508
10509 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
10510
10511 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
10512 pmd conversions.
10513
10514 * typeck.c (get_delta_difference): Fix wording, as we can be used
10515 for pointer to data members.
10516
10517 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
10518
10519 * pt.c (tsubst): If the function decl isn't a member of this
10520 template, return a copy of the decl (including copying the
10521 lang-specific part) so we don't hose ourselves later.
10522
10523 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10524
10525 * class.c (finish_struct): Remove DWARF-specific tag handling.
10526 * decl.c (pushtag): Likewise.
10527 (finish_function): Always clear DECL_ARGUMENTS on function decls with
10528 no saved RTX.
10529 * decl2.c (finish_file): Emit DWARF debugging info for static data
10530 members.
10531
10532 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
10533
10534 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
10535 isn't the same as the new one before we whack it.
10536
10537 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
10538
10539 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
10540 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
10541 warn_traditional and warn_strict_prototypes; remove ancient
10542 'overload' code; remove references to flag_traditional.
10543
10544 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
10545
10546 * input.c (sub_getch): Handle 8-bit characters in string literals.
10547
10548 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
10549
10550 * tree.c (mapcar): Handle CONSTRUCTORs.
10551 (copy_to_permanent): Handle expression_obstack properly.
10552
10553 * Make-lang.in (cplib2.txt): Also depend on the headers.
10554
10555 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
10556 INT_TYPE_SIZE.
10557 (expand_class_desc): Use USItype for offset field.
10558 * tinfo.h (struct __class_type_info): Likewise.
10559
10560 * method.c (build_overload_int): TYPE_PRECISION should be applied
10561 to types.
10562
10563 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
10564
10565 * call.c (build_new_op): A COND_EXPR involving void must be a
10566 builtin.
10567
10568 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10569
10570 * typeck.c (build_x_component_ref): New fn.
10571 (build_object_ref): Use it.
10572 * parse.y (primary): Use it.
10573 * decl2.c (build_expr_from_tree): Use it.
10574 * cp-tree.h: Declare it.
10575
10576 * decl.c (start_decl): variable-sized arrays cannot be initialized.
10577 * error.c (dump_type_suffix): Handle variable arrays.
10578
10579 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10580
10581 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
10582
10583 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
10584
10585 * decl.c (lookup_name_real): Don't try to look up anything in a
10586 TYPENAME_TYPE.
10587
10588 * tinfo2.cc (__throw_type_match_rtti): Oops.
10589
10590 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10591
10592 * Make-lang.in (exception.o): Use -fno-PIC for now.
10593
10594 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
10595
10596 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
10597 calling them.
10598 (get_tinfo_fn_dynamic): Extracted from build_typeid.
10599 * tinfo2.cc (__dynamic_cast): Adjust.
10600
10601 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
10602 (build_x_typeid): Likewise.
10603
10604 * parse.y: Call build_x_typeid instead of build_typeid.
10605 * cp-tree.def: Add TYPEID_EXPR.
10606 * pt.c (tsubst_copy): Handle typeid.
10607 * decl2.c (build_expr_from_tree): Likewise.
10608 * rtti.c (build_x_typeid): Throw bad_typeid from here.
10609 (build_typeid): Not here.
10610 * cp-tree.h: Declare build_x_typeid.
10611
10612 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
10613
10614 * call.c (convert_like): Pull out constant values.
10615
10616 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
10617
10618 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10619
10620 * decl.c (init_decl_processing): Create short int types before
10621 creating size_t in case a machine description needs to use
10622 unsigned short for size_t.
10623
10624 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10625
10626 * Make-lang.in (exception.o): Turn off pic.
10627
10628 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
10629 type, multi-level ptr conversions.
10630
10631 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
10632 (throw_bad_cast): Use it.
10633 (throw_bad_typeid): New fn.
10634 (build_typeid): Throw bad_typeid as needed.
10635 Use build_call.
10636 (synthesize_tinfo_fn): Handle functions and arrays before checking
10637 for cv-quals.
10638
10639 * Remove .h from standard C++ headers, add new.h, move into inc
10640 subdirectory.
10641
10642 * exception*: Remove pointer from object, constructors. Add
10643 default exception::what that uses type_info::name. Add
10644 __throw_bad_typeid.
10645
10646 * init.c (build_new): Don't add a cookie to new (void *) T[2].
10647
10648 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
10649
10650 * Make-lang.in: Building C++ code depends on cc1plus.
10651
10652 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10653
10654 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
10655 a HOST_WIDE_INT, not a tree.
10656
10657 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
10658
10659 * exception.cc: Don't include <stdlib.h>.
10660
10661 * Make-lang.in (c++.clean): Remove cplib2.*.
10662
10663 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
10664
10665 * parse.y (component_decl_1, component_costructor_declarator case):
10666 Pass attributes/prefix_attributes in tree list.
10667
10668 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
10669
10670 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
10671
10672 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10673
10674 * lex.c (do_identifier): Don't do deferred lookup in a template
10675 header.
10676
10677 * typeck2.c (store_init_value): Oops.
10678
10679 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
10680 New files for C++ lang-support library.
10681 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
10682 (CXX_LIB2FUNCS): Define.
10683 And rules for building the C++ lang-support code.
10684 * config-lang.in (headers): Define.
10685 (lib2funcs): Define.
10686
10687 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10688
10689 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
10690 digest_init.
10691 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
10692 * typeck2.c (store_init_value): Check for initializing pmf with { }
10693 here.
10694 (process_init_constructor): Not here.
10695
10696 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10697
10698 * pt.c (begin_template_parm_list): Increment
10699 processing_template_decl here.
10700 (end_template_parm_list): Not here.
10701 (process_template_parm): No need to add 1 to it now.
10702 * *.c: Use processing_template_decl instead of current_template_parms
10703 to check for being in a template.
10704
10705 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
10706 (tsubst_copy): Handle CONSTRUCTOR.
10707 (instantiate_decl): Set up context properly for variables.
10708 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
10709 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
10710
10711 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10712
10713 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
10714
10715 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10716
10717 * method.c (make_thunk): Call comdat_linkage before setting the
10718 TREE_CODE.
10719
10720 * decl2.c (comdat_linkage): Use make_decl_one_only.
10721 (import_export_decl): Likewise.
10722 * decl.c (init_decl_processing): Check supports_one_only instead of
10723 SUPPORTS_WEAK.
10724
10725 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
10726
10727 * decl2.c (grokfield): Tighten checking for access decls.
10728
10729 * decl.c (make_typename_type): Resolve references to
10730 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
10731 (lookup_name_real): Types that depend on a template parameter get
10732 an implicit 'typename' unless they're in the current scope.
10733 (start_decl_1): We don't care about incomplete types that depend
10734 on a template parm.
10735 (grokdeclarator): Resolve 'typename's in the type specifier that
10736 refer to members of the current scope.
10737
10738 * call.c (build_over_call): Remove 'inline called before
10739 definition' diagnostic.
10740 (build_method_call): Likewise.
10741 * decl.c (duplicate_decls): Downgrade 'used before declared
10742 inline' to a warning, only with -Winline.
10743
10744 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
10745
10746 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
10747
10748 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10749
10750 * call.c (build_method_call): When calling a signature
10751 default implementation, as in other cases, let instance_ptr simply
10752 be instance.
10753
10754 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
10755
10756 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
10757
10758 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
10759
10760 * except.c (expand_start_catch_block): Add a pushlevel so that -g
10761 works on hppa and SPARC.
10762
10763 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10764
10765 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
10766
10767 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10768
10769 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
10770 before testing whether it's a signature.
10771
10772 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10773
10774 * call.c (build_new_method_call): Don't complain about signature
10775 pointers and references not being an aggr type.
10776 (build_this): If a signature pointer or reference was passed in,
10777 just return it.
10778 (build_new_method_call): If instance is a signature pointer, set
10779 basetype to the signature type of instance.
10780 * sig.c (build_signature_method_call): Deleted basetype and
10781 instance parameters, they can be found as the DECL_CONTEXT of
10782 function and as the first argument passed in.
10783 * cp-tree.h: Changed declaration of build_signature_method_call.
10784 * call.c (build_method_call): Deleted first two arguments in call
10785 of build_signature_method_call.
10786 (build_over_call): Added call to build_signature_method_call.
10787
10788 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10789
10790 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
10791 target_expr.
10792
10793 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10794
10795 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
10796
10797 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
10798
10799 * except.c (expand_start_try_stmts): Move to except.c in the backend.
10800 (expand_end_try_stmts): Remove.
10801
10802 * init.c (perform_member_init): Use add_partial_entry () instead
10803 of directly manipulating lists.
10804 (emit_base_init): Ditto.
10805
10806 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
10807
10808 * except.c (expand_exception_blocks): Always make sure USE and
10809 CLOBBER insns that came at the end still do, the backend relies
10810 upon this.
10811
10812 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
10813
10814 * call.c (build_over_call): We can only use a TARGET_EXPR of the
10815 right type.
10816
10817 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
10818
10819 * cvt.c (convert_to_reference): Revert last change, don't complain
10820 about temp without target decl.
10821
10822 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
10823
10824 * decl.c (grokdeclarator): Don't core dump when void() is given.
10825
10826 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
10827
10828 * decl.c (copy_args_p): Don't crash.
10829
10830 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
10831
10832 * pt.c (tsubst): And support template args inside the exception
10833 specification.
10834
10835 * pt.c (tsubst): Add support for exception specifications in
10836 template functions.
10837
10838 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
10839
10840 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
10841 fields now.
10842 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
10843 (start_function): Likewise.
10844 (start_method): Likewise.
10845 (grokfield): Likewise.
10846 (make_call_declarator): Add throw spec parameter.
10847 (set_quals_and_spec): Add routine.
10848 * lex.c (set_quals_and_spec): Likewise.
10849 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
10850 * decl.c (shadow_tag): Eliminate the throw spec parameter to
10851 grokdeclarator.
10852 (groktypename): Likewise.
10853 (start_decl): Eliminate the throw spec parameter. Eliminate the
10854 throw spec parameter to grokdeclarator. Eliminate the throw spec
10855 field in DECL_STMT.
10856 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
10857 (grokfndecl): Remove useless set of raises.
10858 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
10859 the throw spec parameter to start_decl. Pull the throw spec out
10860 of the call declarator.
10861 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
10862 (start_function): Eliminate the throw spec parameter. Eliminate
10863 the throw spec parameter to grokdeclarator.
10864 (start_method): Likewise.
10865 * decl2.c (grokfield): Likewise.
10866 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
10867 (grokoptypename): Likewise.
10868 (finish_file): Eliminate the throw spec parameter to
10869 start_function. Add throw spec to make_call_declarator.
10870 * except.c (init_exception_processing): Add throw spec to
10871 make_call_declarator. Eliminate the throw spec parameter to
10872 start_decl.
10873 (expand_start_catch_block): Eliminate the throw spec parameter to
10874 grokdeclarator.
10875 (expand_builtin_throw): Add throw spec to make_call_declarator.
10876 Eliminate the throw spec parameter to start_function.
10877 (start_anon_func): Likewise.
10878 * lex.c (make_call_declarator): Add throw spec parameter.
10879 (set_quals_and_spec): New routine.
10880 (cons_up_default_function): Add throw spec to make_call_declarator.
10881 Eliminate the throw spec parameter to grokfield.
10882 * method.c (synthesize_method): Eliminate the throw spec parameter
10883 to start_function.
10884 * pt.c (process_template_parm): Eliminate the throw spec parameter
10885 to grokdeclarator.
10886 (tsubst): Add throw spec to make_call_declarator.
10887 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
10888 (do_function_instantiation): Eliminate the throw spec parameter to
10889 grokdeclarator. Eliminate the throw spec parameter to
10890 start_function.
10891 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
10892 to start_function.
10893 * parse.y (datadef): Remove non-winning optimization.
10894 (decl): Likewise.
10895 (fndef): Remove ambiguous error productions uncovered by grammer
10896 fixing.
10897 (constructor_declarator): Add exception_specification_opt here.
10898 (component_constructor_declarator): Likewise.
10899 (direct_after_type_declarator): Likewise.
10900 (complex_direct_notype_declarator): Likewise.
10901 (direct_abstract_declarator): Likewise.
10902 (fn.def1): Remove exception_specification_opt.
10903 (fn.def2): Likewise.
10904 (condition): Likewise.
10905 (initdcl0): Likewise.
10906 (initdcl): Likewise.
10907 (notype_initdcl0): Likewise.
10908 (nomods_initdcl0): Likewise.
10909 (component_decl_1): Likewise.
10910 (component_declarator): Likewise.
10911 (after_type_component_declarator0): Likewise.
10912 (after_type_component_declarator): Likewise.
10913 (notype_component_declarator): Likewise.
10914
10915 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10916
10917 * call.c (build_over_call): Also use an INIT_EXPR when
10918 initializing anything from an rvalue.
10919
10920 * call.c (build_over_call): Call stabilize_reference when building
10921 an INIT_EXPR instead of calling the copy ctor.
10922
10923 * call.c (joust): Extend the previous change to all comparisons.
10924
10925 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
10926 NO_LINKAGE_HEURISTICS.
10927
10928 * decl2.c (finish_file): Emit any statics that weren't already.
10929
10930 * typeck.c (build_static_cast): Implement.
10931 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
10932 * decl.c (grokparms): Use can_convert_arg instead of
10933 implicit_conversion directly.
10934 (copy_args_p): New fn.
10935 * cvt.c (convert_to_reference): Don't complain about temp with
10936 static_cast.
10937 (build_up_reference): Handle TARGET_EXPRs.
10938 * call.c (build_over_call): Elide unnecessary temps.
10939 (can_convert*): Use new overloading code.
10940
10941 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
10942
10943 * call.c: Move TYPE_PTR*_MACROS ...
10944 * cp-tree.h: To here.
10945 * typeck.c (build_reinterpret_cast): Implement.
10946
10947 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
10948 ptr_complete_ob.
10949 (joust): If we're comparing a function to a builtin and the worst
10950 conversion for the builtin is worse than the worst conversion for the
10951 function, take the function.
10952
10953 * typeck.c (build_const_cast): Implement.
10954 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
10955 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
10956
10957 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
10958
10959 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
10960 too early. Make sure we explode if exprtype turns out to be a
10961 NULL_TREE when it shouldn't be.
10962
10963 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
10964
10965 * cp-tree.h: New routine make_call_declarator.
10966 * lex.c (make_call_declarator): Define it.
10967 * except.c (init_exception_processing): Use it.
10968 (expand_builtin_throw): Likewise.
10969 (start_anon_func): Likewise.
10970 * decl2.c (finish_file): Likewise.
10971 * lex.c (cons_up_default_function): Likewise.
10972 * parse.y: Likewise.
10973 * pt.c (tsubst): Likewise.
10974
10975 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
10976
10977 * decl2.c (groktypefield): Remove unused code.
10978
10979 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
10980
10981 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
10982 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
10983 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
10984 nonempty_cv_qualifiers.
10985 * hash.h: Rebuild.
10986
10987 * lex.c (make_pointer_declarator): Change type_quals into
10988 cv_qualifiers.
10989 (make_reference_declarator): Likewise.
10990
10991 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10992
10993 * decl.c (start_function): Only check interface_* for templates
10994 with flag_alt_external_templates.
10995
10996 * call.c (build_new_op): Check for comparison of different enum types.
10997 (build_over_call): Fix arg # output.
10998
10999 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
11000
11001 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
11002
11003 * call.c (build_new_op): Check for erroneous args.
11004
11005 * call.c (build_new_method_call): Add missing args to cp_error.
11006
11007 * tree.c (error_type): Dont print reference-to-array.
11008
11009 * typeck.c (convert_for_assignment): Don't say contravariance for
11010 removing const.
11011
11012 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11013
11014 * call.c (build_over_call): Diagnose bad convs for `this'.
11015
11016 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
11017 on _ctor_arg.
11018
11019 * call.c (convert_like): Handle bad convs.
11020 (build_over_call): Handle bad convs better.
11021
11022 * decl2.c: -fansi-overloading is now the default.
11023
11024 * call.c (build_new_method_call): Check for erroneous args.
11025
11026 * pt.c (instantiate_class_template): Propagate
11027 TYPE_USES_MULTIPLE_INHERITANCE.
11028
11029 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
11030
11031 * call.c (enforce_access): Add static to routine.
11032
11033 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11034
11035 * call.c (build_user_type_conversion_1): Fix bad handling.
11036 (compare_ics): Likewise.
11037
11038 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11039
11040 * call.c (standard_conversion): Oops.
11041
11042 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
11043
11044 * g++.c: Update test for win32 (&& ! cygwin32).
11045
11046 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11047
11048 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
11049 (ptr_reasonably_similar): New fn.
11050 * call.c (BAD_RANK): New rank.
11051 (ICS_BAD_FLAG): New macro.
11052 (standard_conversion): Handle almost-right pointer conversions.
11053 (reference_binding): Handle bad rvalue bindings.
11054 (add_*_candidate): Stuff.
11055 (build_over_call): Pass bad conversions to convert_for_initialization.
11056 (compare_ics): Handle bad convs.
11057 (joust): Likewise.
11058
11059 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
11060
11061 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
11062 integer_type_node when computing pointer offsets.
11063
11064 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
11065
11066 * tree.c (lvalue_type): New fn.
11067 (error_type): New fn.
11068 * call.c (op_error): Use error_type.
11069 (add_conv_candidate): Use lvalue_type.
11070 (add_builtin_candidates): Likewise.
11071 * error.c (args_as_string): Use error_type.
11072
11073 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11074
11075 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
11076 (tsubst): Not here.
11077
11078 * decl.c (init_decl_processing): With -ansi, __null's type is the
11079 signed integral type with the same number of bits as a pointer.
11080 Introduce a new variable null_node for it.
11081 * cp-tree.h: Adjust.
11082 * call.c (null_ptr_cst_p): Adjust.
11083
11084 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
11085
11086 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
11087 optimize.
11088
11089 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
11090
11091 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
11092 fns of classes without virtual functions.
11093
11094 * call.c (add_function_candidate): Handle `this' specially.
11095 (compare_ics): Likewise.
11096
11097 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
11098
11099 * typeck.c (build_conditional_expr): Fix handling of __null.
11100
11101 * decl2.c (comdat_linkage): New fn.
11102 (import_export_vtable): Use it.
11103 (import_export_decl): Use it.
11104 * method.c (make_thunk): Use it.
11105
11106 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
11107
11108 * pt.c (end_template_decl): If we don't actually have parms, return.
11109 * parse.y (template_header): Accept 'template <>'.
11110
11111 * errfn.c: Allow 5 args.
11112
11113 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11114
11115 * tree.c (make_temp_vec): New fn.
11116 * pt.c (push_template_decl): Handle partial specs.
11117 (instantiate_class_template): Likewise.
11118 (more_specialized): Use get_bindings.
11119 (more_specialized_class): New fn.
11120 (get_class_bindings): New fn.
11121 (most_specialized_class): New fn.
11122 (do_function_instantiation): List candidates for ambiguous case.
11123 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
11124 (shadow_tag): Call push_template_decl for partial specializations.
11125 * parse.y: Likewise.
11126 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
11127 DECL_TEMPLATE_MEMBERS.
11128 * call.c (print_z_candidates): Reduce duplication.
11129
11130 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11131
11132 * decl2.c (lang_decode_option): Allow -fansi-overloading.
11133
11134 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
11135
11136 * pt.c (get_bindings): New fn.
11137 (most_specialized): Likewise.
11138 (do_function_instantiation): Use them.
11139 (add_maybe_template): New fn.
11140 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
11141 * call.c (build_new_op): Handle guiding decls.
11142 (build_new_function_call): Likewise.
11143 * decl2.c (finish_file): Likewise.
11144
11145 * decl2.c (mark_used): Do synthesis here.
11146 * call.c (build_method_call): Not here.
11147 (build_over_call): Or here.
11148 * typeck.c (build_function_call_real): Or here.
11149 * tree.c (bot_manip): Call mark_used on functions used in default
11150 args.
11151
11152 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11153
11154 * decl2.c (import_export_vtable): Delete code that disabled vtable
11155 heuristic on systems with ASM_OUTPUT_EXTERNAL.
11156
11157 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11158
11159 * typeck.c (build_x_function_call): Handle static call context
11160 better.
11161
11162 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
11163 the function, not its outer block.
11164
11165 * call.c (build_field_call): Pass fields on to build_opfncall
11166 regardless of TYPE_OVERLOADS_CALL_EXPR.
11167 (build_method_call): Pass on to build_new_method_call sooner.
11168
11169 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
11170 gives us.
11171 * class.c (instantiate_type): Don't put a POINTER_TYPE to
11172 METHOD_TYPE on an expression. Also make a copy of rhs instead of
11173 modifying it.
11174
11175 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11176
11177 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
11178 (add_builtin_candidate): Don't take enums for ++.
11179 (build_new_method_call): Handle non-aggregates and field calls.
11180 Move new overloading code from...
11181 * cvt.c: Here.
11182
11183 * decl.c (grokparms): Don't check default args in templates.
11184
11185 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
11186
11187 * cvt.c (build_new_op): Fix args to build_unary_op.
11188 (add_builtin_candidates): Don't call type_promotes_to on float.
11189
11190 * decl.c (grokparms): Check the type of the default arg.
11191
11192 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
11193 returning NULL_TREE.
11194
11195 * typeck.c (build_x_binary_op): Avoid doing extra work.
11196 (build_x_unary_op): Likewise.
11197 (build_x_conditional_expr): Likewise.
11198 * cvt.c (build_over_call): Return.
11199 (add_builtin_candidate): Fix MEMBER_REF.
11200 (build_new_op): Likewise.
11201
11202 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
11203
11204 * method.c (build_overload_name): Put bug fix into code but leave
11205 disabled for now so we can be bug compatible with older releases
11206 that do repeats incorrectly. In the future, we can enable it.
11207
11208 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11209
11210 * cvt.c (convert_like): Don't call build_cplus_new twice.
11211
11212 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
11213 Control new overloading code with -fansi-overloading.
11214
11215 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11216
11217 * cvt.c (build_over_call): Call build_cplus_new.
11218 * call.c (build_method_call): Likewise.
11219 * typeck.c (build_function_call_real): Likewise.
11220 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
11221 the COND_EXPR in a TARGET_EXPR so they use the same slot.
11222
11223 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
11224 recursive calls.
11225 * typeck.c (complete_type): Propagate
11226 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
11227
11228 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11229
11230 * cvt.c (joust): More ?: kludging. Sigh.
11231 (build_over_call): Don't try to synthesize global fns.
11232
11233 * search.c (lookup_conversions): Use binfo marking.
11234
11235 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
11236
11237 * search.c (build_mi_matrix): Use the correct value of cid
11238 when determining the new mi_size.
11239
11240 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11241
11242 * cvt.c (add_builtin_candidates): Do consider type conversion ops
11243 for the first parms of += et al.
11244 (strip_top_quals): New fn.
11245 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
11246 (implicit_conversion): Likewise.
11247 (add_builtin_candidates): Be careful about arrays.
11248 (build_new_method_call): Handle vtable optimization.
11249
11250 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
11251
11252 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
11253 * cvt.c (reference_binding): Use it.
11254 (implicit_conversion): Use it.
11255 (add_builtin_candidate, COND_EXPR): Use it.
11256
11257 * cvt.c (build_new_function_call): Check for error args.
11258
11259 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
11260
11261 * gxx.gperf: Add __null.
11262 * hash.h: Regenerate.
11263 * lex.h: Add RID_NULL.
11264 * lex.c (init_lex): Create null_pointer_node here, stick it in
11265 RID_NULL.
11266 * decl.c (init_decl_processing): Still set its type here.
11267 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
11268 (convert_to_pointer_force): Likewise.
11269 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
11270 if (! pedantic).
11271 * call.c (convert_harshness): Use null_ptr_cst_p.
11272 * typeck.c (convert_for_assignment): Likewise. Don't produce
11273 null_pointer_node.
11274
11275 * error.c (args_as_string): Handle lists of actual args, too.
11276 * cvt.c (null_ptr_cst): Support (void*)0 for now.
11277 (build_user_type_conversion_1): Improve diagnostics.
11278 (build_new_function_call): Likewise.
11279 (build_object_call): Likewise.
11280 (build_new_method_call): Likewise. Move call before def diagnostic...
11281 (build_over_call): Here.
11282
11283 * cvt.c (build_new_method_call): Don't complain about no match if
11284 LOOKUP_SPECULATIVELY.
11285 (build_over_call): Fix 'this' for virtual fn.
11286 (build_new_method_call): Add diagnostic.
11287
11288 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11289
11290 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
11291 constructors to be passed in.
11292 (build_over_call): Likewise.
11293 (build_user_type_conversion_1): Pass them in.
11294 (convert_like): Likewise.
11295 (build_object_call): Handle overloaded conversions.
11296 (build_over_call): Pass the right args to build_vfn_ref.
11297 (standard_conversion): Fix pmf convs.
11298 (joust): Handle comparing statics and non-statics.
11299 (build_new_method_call): New fn.
11300 * call.c (build_method_call): Call it if NEW_OVER.
11301
11302 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
11303
11304 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
11305 %D instead.
11306
11307 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
11308
11309 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
11310 instead of just maybe_build_cleanup so that we deallocate the
11311 thrown object.
11312
11313 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11314
11315 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
11316 * cp-tree.h (finish_prevtable_vardecl): Add decl.
11317
11318 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
11319
11320 * pt.c (instantiate_class_template): Call complete_type. Also, if
11321 we're at the end of the file and we just instantiated a template
11322 class with a vtable, call finish_prevtable_vardecl.
11323
11324 * error.c (dump_decl): Don't explode (or explode more gracefully
11325 as appropriate) if the object being dumped has a null type.
11326 (dump_expr): Likewise.
11327
11328 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
11329 by counting the number of nodes that we'll need before allocating
11330 the array.
11331 (lookup_fnfields): Fix comment.
11332 (breadth_first_search): Fix comment.
11333
11334 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
11335
11336 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
11337 TYPE_ALIGN.
11338 * class.c (finish_struct): Call cplus_decl_attributes here.
11339 (finish_struct_1): Not here.
11340 * cp-tree.h: Adjust.
11341
11342 * pt.c (type_unification): New parameter STRICT.
11343 (unify): If STRICT, don't allow cv addition or base deduction.
11344 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
11345
11346 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11347
11348 * search.c (get_template_base{_recursive}): New fns.
11349 * pt.c (more_specialized): New fn.
11350 (do_function_instantiation): Use it.
11351 (unify): Handle base deduction.
11352 * cvt.c (joust): Use more_specialized.
11353 Don't arbitrarily choose between non-builtin candidates.
11354 (build_over_call): Call require_complete_type.
11355
11356 * decl.c (start_function): Statics are static even in a #pragma
11357 interface file.
11358
11359 * decl2.c (import_export_vtable): Disable vtable heuristic on
11360 systems with ASM_OUTPUT_EXTERNAL.
11361
11362 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
11363 (standard_conversion): No std conv to enum type.
11364
11365 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
11366 for ptm's.
11367
11368 * cvt.c (reference_binding): Bind directly to a base subobject of
11369 a class rvalue.
11370
11371 * cvt.c (build_new_op): Enforce access control.
11372
11373 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
11374
11375 * typeck2.c (process_init_constructor): When scanning the
11376 union for a named field, skip things that aren't FIELD_DECLs.
11377
11378 * method.c (synthesize_method): Don't scan fndecl's rtl if
11379 we're at the end of the file; just assume the function can't
11380 be inlined.
11381
11382 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11383
11384 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
11385 it failed.
11386
11387 * cvt.c (build_user_type_conversion_1): Handle overloaded
11388 conversion ops.
11389
11390 * cvt.c (add_builtin_candidates): Don't consider type conversion
11391 operators for the first parameter of operator=.
11392
11393 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
11394
11395 * typeck.c (complete_type): Only call layout_type if we're not
11396 expanding a template.
11397
11398 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
11399
11400 * cvt.c (compare_ics): Oops.
11401
11402 * cvt.c (op_error): Oops.
11403
11404 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
11405 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
11406 (build_conv): Use them.
11407 (implicit_conversion): Use them.
11408 (convert_like): Handle them.
11409 (build_new_op): Handle builtin COND_EXPR again.
11410 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
11411 in lists of types for COND_EXPR.
11412 (add_builtin_candidate): Add enum candidates for COND_EXPR.
11413
11414 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
11415
11416 * typeck.c (build_modify_expr): Always attempt to build a call to
11417 the assignment operator, even if we're using a default one.
11418 (convert_for_initialization): Call complete_type.
11419
11420 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11421
11422 * cvt.c (reference_binding): A REF_BIND gets the reference type.
11423 (implicit_conversion): Likewise.
11424 (convert_like): Likewise.
11425 (compare_ics): Likewise.
11426 (compare_qual): Likewise.
11427 (print_z_candidates): Handle no candidates.
11428 (build_new_op): Don't handle builtin COND_EXPR for now.
11429
11430 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
11431
11432 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
11433
11434 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11435
11436 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
11437
11438 * cvt.c (build_builtin_candidate): Oops.
11439 (build_new_op): Oops.
11440
11441 * method.c (build_opfncall): Pass COND_EXPR on.
11442 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
11443 (add_builtin_candidate{,s}): Likewise.
11444 (add_builtin_candidates): Likewise.
11445 (print_z_candidates, op_error, build_new_op): Likewise.
11446 (type_decays_to): New fn.
11447 * lex.c (init_lex): Just say ?: for COND_EXPR.
11448
11449 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
11450
11451 * typeck.c (complete_type): Call layout_type rather than building
11452 a new array type.
11453
11454 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
11455 only use ptrdiff_t.
11456
11457 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11458
11459 * cvt.c: Always compile the new overloading code (but don't use it).
11460 (implicit_conversion): Add a BASE_CONV when converting to
11461 the same class type.
11462 (convert_like): Handle BASE_CONV.
11463
11464 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11465
11466 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
11467 (add_builtin_candidate): Likewise.
11468
11469 NEW_OVER changes:
11470 * typeck.c (build_x_function_call): Try an operator function
11471 whenever we call an object of class type.
11472 * method.c (build_opfncall): Pass CALL_EXPRs through.
11473 * cvt.c (implicit_conversion): Do const-ref case first.
11474 (add_conv_candidate, build_object_call, op_error): New fns.
11475 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
11476 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
11477 builtin candidates.
11478 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
11479 Fall back on preincrement handling. Use op_error.
11480 Handle warn_synth.
11481 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
11482 an error_mark_node.
11483 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
11484 properly.
11485
11486 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
11487
11488 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
11489
11490 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
11491
11492 * typeck.c (build_component_ref_1): Use build_component_ref
11493 instead of open coding it here.
11494
11495 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11496
11497 * g++.c (main): Don't link with -lg++.
11498
11499 NEW_OVER changes:
11500 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
11501 result of build_type_conversion.
11502 (cp_convert): Only call build_method_call for ctors if
11503 build_type_conversion failed.
11504 (ptr_complete_ob): New function.
11505 (TYPE_PTR{,OB,MEM}_P): New macros.
11506 ({add,build}_builtin_candidate{,s}): New functions.
11507 (print_z_candidates): Handle builtins.
11508 (build_user_type_conversion_1): Don't use conversion fns for
11509 converting to a base type.
11510 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
11511 (build_user_type_conversion): Use convert_from_reference.
11512 (build_new_op): New function.
11513 (build_over_call): Fix handling of methods.
11514 (compare_ics): Handle AMBIG_CONV properly.
11515 * typeck2.c: Increment abort count.
11516 * method.c (build_opfncall): Forward most requests to build_new_op.
11517 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
11518
11519 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11520
11521 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
11522 invalid second argument to dump_expr_list.
11523
11524 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
11525
11526 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
11527
11528 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
11529
11530 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
11531 ASSEMBLE_EXTERNAL.
11532
11533 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
11534
11535 * typeck2.c (process_init_constructor): New pedwarn for using { }
11536 to initialize a pointer to member function.
11537 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
11538 we can avoid the new error.
11539
11540 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
11541
11542 * typeck.c (build_ptrmemfunc1): New function to hide details of
11543 pointer to member functions better.
11544
11545 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
11546
11547 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
11548 methods into the actual method, as we know the implied object is
11549 not used.
11550
11551 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11552
11553 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
11554 inside a system header.
11555
11556 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
11557
11558 * call.c (build_method_call): Call complete_type on the
11559 instance type.
11560
11561 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
11562
11563 * typeck.c (build_component_ref): Always build up an OFFSET_REF
11564 for obj_ptr->func so that we can know which object to use in a
11565 method call.
11566
11567 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
11568
11569 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
11570 around things. Also improve maintainability.
11571
11572 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
11573
11574 * decl.c (grokdeclarator): Check for overflow when evaluating an
11575 array dimension.
11576
11577 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
11578
11579 * cvt.c (cp_convert): Don't check for ambiguity with constructor
11580 if NEW_OVER.
11581
11582 * typeck.c (build_x_function_call): Pass function overload
11583 questions to new overloading code if NEW_OVER.
11584 * init.c (expand_aggr_init_1): Only check for type conversion ops
11585 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
11586 Don't check for ambiguity with constructor if NEW_OVER.
11587 * cvt.c (convert_to_reference): Dereference the result of a type
11588 conversion operator.
11589 (build_conv): Propagate ICS_USER_FLAG.
11590 (implicit_conversion): Call instantiate_type.
11591 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
11592 (add_function_candidate): Fix cv-quals on argtype.
11593 (print_z_candidates): New function.
11594 (build_new_function_call): Call it.
11595 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
11596 consider non-converting constructors.
11597 Call print_z_candidates.
11598 Return an AMBIG_CONV for an ambiguous conversion.
11599 (build_user_type_conversion): Handle AMBIG_CONV.
11600 (convert_like): Fix test for building TARGET_EXPR.
11601 Call instantiate_type.
11602 Handle AMBIG_CONV and LVALUE_CONV.
11603 (build_over_call): Handle 0 args and ellipsis.
11604 * cp-tree.def: Add AMBIG_CONV.
11605
11606 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
11607
11608 * decl.c (lookup_name_real): If we find mem in obj when parsing
11609 `obj->mem', make sure we return the right value.
11610
11611 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
11612
11613 * search.c (get_base_distance): Call complete_type.
11614
11615 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
11616
11617 * decl.c (store_bindings): Make static.
11618
11619 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11620
11621 * init.c (expand_aggr_init_1): Don't check type conversions if
11622 NEW_OVER.
11623
11624 * cvt.c (z_candidate): Put back template field.
11625 (add_function_candidate): Set it.
11626 (add_template_candidate): Likewise.
11627 (joust): Use it.
11628 (compare_qual): Handle references and pointers to members.
11629 (compare_ics): Handle reference bindings.
11630
11631 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
11632
11633 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
11634
11635 * call.c (compute_conversion_costs): Call complete_type.
11636
11637 * tree.c (vec_binfo_member): Use comptypes instead of comparing
11638 pointers, so we can handle template parameters.
11639
11640 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
11641
11642 * cvt.c (cp_convert_to_pointer): We have to call complete_type
11643 here; let's make it explicit instead of a side effect of an
11644 error check.
11645
11646 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11647
11648 * cvt.c (z_candidate): Remove template field.
11649 (reference_binding): Handle binding to temporary.
11650 (implicit_conversion): Likewise.
11651 (add_function_candidate): Handle artificial constructor parms.
11652 Handle functions with too few parms.
11653 (add_template_candidate): New function.
11654 (build_user_type_conversion_1): Handle constructors.
11655 (convert_like): Likewise.
11656 (build_over_call): Likewise.
11657 (build_new_function_call): Support templates.
11658 (compare_ics): Fix reference, inheritance handling.
11659
11660 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
11661
11662 * decl.c: Add signed_size_zero_node.
11663 (init_decl_processing): Build it.
11664 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
11665 when we're trying to make a negative delta.
11666
11667 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11668
11669 Stop doing this damn index==strchr variable name confusion.
11670 * class.c (add_virtual_function): Change local var INDEX to be
11671 named IDX.
11672 (add_method): Likewise.
11673 * lex.c (print_parse_statistics): Likewise.
11674 * search.c (make_memoized_table_entry): Likewise.
11675 (lookup_fnfields_here): Likewise.
11676 (lookup_field): Likewise.
11677 (lookup_fnfields): Likewise.
11678 (get_baselinks): Likewise.
11679 * sig.c (build_signature_table_constructor): Likewise.
11680 (build_signature_method_call): Likewise.
11681 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
11682 (get_member_function_from_ptrfunc): Likewise.
11683 (build_ptrmemfunc): Change local var INDEX to be IDX.
11684 (c_expand_start_case): Likewise.
11685
11686 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11687
11688 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
11689 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
11690 (convert_to_reference): Use build_type_conversion to convert to
11691 the reference type directly.
11692 (standard_conversion): Fix void* case, non-conversions.
11693 (reference_binding): Fix expr == 0 case, non-conversions.
11694 (convert_like): Support REF_BIND.
11695 (compare_qual): Split out from compare_ics.
11696 (compare_ics): Use it, handle icses with only a qual_conv.
11697
11698 * init.c (expand_vec_init): Don't crash if decl is NULL.
11699
11700 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
11701
11702 * mpw-config.in: New file, configury for Mac MPW.
11703 * mpw-make.sed: New file, makefile editing for MPW.
11704
11705 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11706
11707 * pt.c (instantiate_class_template): Call repo_template_used.
11708
11709 * search.c (lookup_conversions): Only lookup conversions in
11710 complete types.
11711
11712 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11713
11714 * cp-tree.def: Renamed from tree.def, to avoid confusion with
11715 gcc's tree.def.
11716 * cp-tree.h, lex.c: Include cp-tree.def.
11717 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
11718
11719 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
11720
11721 * init.c (build_vec_delete_1): Call complete_type.
11722
11723 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
11724
11725 * except.c (start_anon_func): Make sure anonymous functions are
11726 never external.
11727
11728 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11729
11730 * decl.c (finish_function): If function_depth > 1, set nested.
11731
11732 * decl2.c (grokbitfield): Revert Bob's change.
11733 * class.c (finish_struct_1): Fix handling of named bitfield widths.
11734
11735 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
11736
11737 * pt.c (add_pending_template): Handle types.
11738 (lookup_template_class): With -fexternal-templates, just add the class
11739 to pending_templates instead of instantiating it now.
11740 * decl2.c (finish_file): Handle types in pending_templates.
11741
11742 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
11743
11744 * decl2.c (grokbitfield): Handle constant decls appropriately.
11745 Give an appropriate error message now instead of spewing core
11746 later.
11747
11748 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11749
11750 * decl2.c: Don't turn on thunks by default for now.
11751
11752 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
11753
11754 * typeck.c (complete_type): Handle error_mark_node.
11755 (common_type, OFFSET_TYPE): Handle template_type_parms.
11756
11757 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
11758
11759 * pt.c (instantiate_decl): If at_eof, call import_export_decl
11760 regardless of DECL_INLINE.
11761
11762 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
11763
11764 * class.c (finish_struct_bits): Copy TYPE_SIZE.
11765
11766 * rtti.c (build_dynamic_cast): Support templates.
11767 * tree.def: Support DYNAMIC_CAST_EXPR.
11768 * pt.c (tsubst_copy): Likewise.
11769 * decl2.c (build_expr_from_tree): Likewise.
11770
11771 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
11772
11773 * typeck.c (build_static_cast): Support templates.
11774 (build_const_cast): Likewise.
11775 * tree.def: Support CONST/STATIC_CAST_EXPR.
11776 * pt.c (tsubst_copy): Likewise.
11777 * decl2.c (build_expr_from_tree): Likewise.
11778
11779 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
11780
11781 * decl2.c (finish_vtable_vardecl): Don't trust
11782 TREE_SYMBOL_REFERENCED for vtables of local classes.
11783
11784 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
11785
11786 * pt.c (tsubst_copy): Handle operator T.
11787
11788 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11789
11790 * init.c (build_delete): Move creation of PARMS inside test of
11791 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
11792
11793 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
11794
11795 * typeck.c (build_conditional_expr): Don't assume that
11796 the arguments to ?: are always pointers or records.
11797
11798 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
11799
11800 * decl2.c (import_export_decl): Still emit static/weak/comdat
11801 copies of inline template functions with -fno-implicit-templates.
11802
11803 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
11804
11805 * init.c (build_delete): Determine the complete basetype
11806 path to the destructor we're calling.
11807
11808 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
11809
11810 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
11811 initialize the enum, because we really and truly don't know where
11812 it came from.
11813 (start_enum): Don't copy integer_zero_node because
11814 build_enumerator will do it.
11815
11816 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11817
11818 * decl.c (finish_function): Do access control on base destructors.
11819
11820 * pt.c (tsubst, case FUNCTION_DECL): Set up
11821 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
11822 hose us.
11823
11824 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
11825
11826 * cvt.c (build_up_reference): If we have already extended the
11827 lifetime of the temporary, don't try it again.
11828 * typeck.c (c_expand_return): Don't try and convert the return
11829 value twice when we want a reference, once is enough.
11830
11831 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
11832
11833 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
11834 LOOKUP_ONLYCONVERTING at all for now.
11835
11836 * search.c (add_conversions): Put the conversion function in
11837 TREE_VALUE, the basetype in TREE_PURPOSE.
11838 * cvt.c (build_type_conversion): Adjust.
11839 * cvt.c (build_expr_type_conversion): Adjust.
11840 * call.c (user_harshness): Adjust.
11841
11842 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
11843
11844 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
11845 backend's benefit.
11846
11847 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
11848
11849 * except.c (expand_start_catch_block): Add a dummy region, if we
11850 get an error, so that we can avoid core dumping later.
11851
11852 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
11853
11854 * cp-tree.h (OFFSET_REF): Remove.
11855 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
11856 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
11857 * init.c (expand_aggr_init_1): Likewise.
11858 (build_new): Likewise.
11859 * typeck.c (expand_target_expr): Likewise.
11860
11861 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11862
11863 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
11864 TARGET_EXPR.
11865
11866 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
11867
11868 * cvt.c (build_up_reference): Redo how and when temporaries are
11869 created.
11870 * decl.c (grok_reference_init): Don't try and be smart about
11871 running cleanups.
11872
11873 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
11874
11875 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
11876 (TARGET_EXPR...), now that it has 4 arguments.
11877 * tree.c (build_cplus_new): Likewise.
11878
11879 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11880
11881 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
11882
11883 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
11884 * decl.c (struct saved_scope): Remove named_labels,
11885 {base,member}_init_list.
11886 (maybe_push_to_top_level): Don't set them. Call
11887 push_cp_function_context if appropriate.
11888 (pop_from_top_level): Likewise.
11889
11890 * method.c (do_build_assign_ref): Remove obsolete check of
11891 TYPE_HAS_ASSIGN_REF (basetype).
11892
11893 * decl.c (grokfndecl): Diagnose user definition of
11894 implicitly-declared methods.
11895
11896 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
11897
11898 * method.c (do_build_copy_constructor): Add code to give
11899 meaningful error messages instead of crashing.
11900 (do_build_assign_ref): Don't synthesize assignment operators for
11901 classes containing reference or const members.
11902
11903 * class.c (struct base_info): Remove cant_synth_copy_ctor
11904 and cant_synth_asn_ref.
11905 (finish_base_struct): Remove the code that tries to conditionalize
11906 synthesis of copy constructors & assignment operators based on
11907 access permissions. Instead, let it fail when it tries to
11908 synthesize the copy constructor. This will give meaningful error
11909 messages instead of silently generating code to perform a bitcopy.
11910
11911 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
11912
11913 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
11914 determining types for constant values.
11915
11916 * decl.c (struct named_label_list): Use instead of stuffing
11917 random items into a TREE_LIST node.
11918 (named_label_uses): Use the new struct.
11919 (poplevel): Likewise.
11920 (lookup_label): Likewise.
11921 (define_label): Add an error message to tell the user the line
11922 where the goto is located in addition to the destination of the
11923 goto.
11924 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
11925 named_label_uses.
11926 (finish_function): Likewise.
11927
11928 (start_decl): Complain about defining a static data member
11929 in a different type from which it was declared.
11930
11931 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
11932
11933 * cvt.c (build_expr_type_conversion): Adjust.
11934
11935 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
11936
11937 * call.c (build_method_call): Always convert 'this' to the
11938 appropriate type.
11939
11940 * search.c (add_conversions): Put the conversion function in
11941 TREE_VALUE, the type in TREE_PURPOSE.
11942 * cvt.c (build_type_conversion): Adjust.
11943 * call.c (user_harshness): Adjust.
11944
11945 * method.c (emit_thunk): Call temporary_allocation and
11946 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
11947
11948 * tree.c (build_cplus_array_type): Handle tweaking of
11949 TYPE_MAIN_VARIANT here.
11950 * typeck.c (common_type): Not here.
11951
11952 * typeck.c (complete_type): Only try to complete an array type if
11953 it has a domain.
11954
11955 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
11956
11957 * decl.c (grokvardecl): Call complete_type.
11958 (grokdeclarator): Call complete_type for PARM_DECLs.
11959
11960 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11961
11962 * pt.c (instantiate_class_template): Re-set
11963 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
11964
11965 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
11966
11967 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
11968 smart enough to do it right.
11969 * tree.c (cp_expand_decl_cleanup): Likewise.
11970 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
11971 cp_expand_decl_cleanup.
11972 (store_parm_decls): Likewise.
11973 (hack_incomplete_structures): Likewise.
11974 * except.c (push_eh_cleanup): Likewise.
11975
11976 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
11977
11978 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
11979 frontend to the backend where it belongs.
11980 * tree.c (unsave_expr): Likewise.
11981 (unsave_expr_now): Likewise.
11982 * tree.def (UNSAVE_EXPR): Likewise.
11983 * cp-tree.h (unsave_expr): Likewise.
11984 (unsave_expr_now): Likewise.
11985
11986 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
11987
11988 * init.c (emit_base_init): Make sure the partial EH cleanups live
11989 on the function_obstack.
11990
11991 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
11992
11993 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
11994 when checking for pointer types.
11995
11996 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11997
11998 * pt.c (instantiate_class_template): Remove obsolete check for
11999 access declarations.
12000
12001 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
12002
12003 * call.c (build_overload_call): Simplify calls to
12004 build_overload_call by removing last parameter.
12005 (build_method_call): Likewise.
12006 * cp-tree.h: Likewise.
12007 * method.c (build_opfncall): Likewise.
12008 * typeck.c (build_x_function_call): Likewise.
12009
12010 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
12011
12012 * call.c (default_parm_conversions): Factor out common code.
12013 (build_method_call): Use it.
12014 (build_overload_call_real): Use it.
12015
12016 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
12017
12018 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
12019 but pedwarn as the code is bogus.
12020 * typeck.c (decay_conversion): Likewise.
12021 (build_function_call_real): Use build_addr_func instead of
12022 default_conversion. Don't allow pointer-to-method functions down
12023 here.
12024 (build_unary_op): Use real pointer-to-member functions instead of
12025 fake ones.
12026 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
12027 (convert_for_assignment): Removed some obsolete code.
12028 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
12029 build_x_function_call instead of current_class_ptr. Only call
12030 digest_init once on an initializer, we do this just checking
12031 TREE_TYPE.
12032 (build_expr_from_tree): Pass current_class_ref to
12033 build_x_function_call instead of current_class_ptr.
12034 * init.c (build_member_call): Likewise.
12035 * pase.y: Likewise.
12036 * error.c (dump_expr): Handle OFFSET_REFs better.
12037 * pt.c (unify): Handle pointer-to-member functions better.
12038 * decl.c (finish_function): Clear out current_class_ref just like
12039 we do for current_class_ptr.
12040
12041 * typeck.c (get_delta_difference): Handle virtual bases better.
12042
12043 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
12044
12045 * sig.c (build_signature_table_constructor): Use the delta for
12046 the original basetype for this virtual function with thunks.
12047 (build_signature_method_call): We still need to adjust 'this'
12048 with thunks.
12049
12050 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
12051
12052 * call.c (build_addr_func): New routine. Used to get the `real'
12053 address of a function or a method. Needed to avoid getting a
12054 pointer-to-member function.
12055 (build_call): New routine to build CALL_EXPRs.
12056 (build_method_call): Use it.
12057 * cvt.c (convert_to_aggr): Likewise.
12058 * typeck.c (build_function_call_real): Likewise.
12059 * sig.c (build_signature_table_constructor): Use build_addr_func.
12060 * cp-tree.h (build_call, build_addr_func): Declare them.
12061
12062 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
12063
12064 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
12065 * parse.y: Remove uses of LOOKUP_AGGR.
12066
12067 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
12068
12069 * *.[chy]: Rename current_class_decl to current_class_ptr, and
12070 C_C_D to current_class_ref.
12071
12072 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12073
12074 * call.c (convert_harshness): Tighten up pointer conversions.
12075
12076 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
12077
12078 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
12079 (finish_file): Likewise.
12080
12081 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12082
12083 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
12084
12085 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
12086 code.
12087
12088 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12089
12090 * decl2.c: Turn on thunks by default where supported.
12091
12092 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
12093
12094 * cp-tree.h (build_overload_call_maybe): Removed.
12095 * call.c (build_overload_call_real): Invert meaning of last arg to
12096 be require_complete.
12097 (build_overload_call): Likewise.
12098 * typeck.c (build_x_function_call): Use build_overload_call_real
12099 instead of build_overload_call_maybe.
12100
12101 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12102
12103 * decl2.c (finish_file): Don't try to emit functions that haven't
12104 been compiled.
12105
12106 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12107
12108 * decl2.c (finish_vtable_vardecl): Oops.
12109
12110 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
12111 Also store the bindings from previous_class_values.
12112 (pop_from_top_level): Restore them.
12113
12114 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12115
12116 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
12117 symbol has been referenced.
12118 (finish_file): Re-join synthesis/vtable loop with inline emission
12119 loop, disable inlining when an inline is output.
12120
12121 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
12122
12123 * except.c (init_exception_processing): Setup saved_in_catch.
12124 (push_eh_cleanup): Reset __eh_in_catch.
12125 (expand_start_catch_block): Set __eh_in_catch.
12126
12127 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
12128
12129 * except.c (push_eh_cleanup): Add tracking for whether or not we
12130 have an active exception object.
12131 (expand_builtin_throw): Use it to make sure a rethrow without an
12132 exception object is caught.
12133
12134 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
12135
12136 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
12137 cache.
12138
12139 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
12140
12141 * decl2.c (finish_file): Also use sentries for vars with
12142 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
12143 created).
12144
12145 * lex.c (handle_cp_pragma): Disable #pragma
12146 interface/implementation if SUPPORTS_ONE_ONLY > 1.
12147
12148 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12149
12150 * method.c (emit_thunk): Wrap default case in
12151 temporary/permanent_allocation.
12152
12153 * method.c (make_thunk): Use DECL_ONE_ONLY.
12154 (emit_thunk): Call assemble_end_function.
12155
12156 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12157
12158 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
12159 (import_export_decl): Likewise.
12160 (finish_prevtable_vardecl): Disable vtable hack if
12161 SUPPORTS_ONE_ONLY > 1.
12162
12163 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
12164
12165 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
12166 PREDECREMENT_EXPRs take two arguments, not one.
12167
12168 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
12169
12170 * class.c (build_vtable_entry): Don't build thunks for abstract
12171 virtuals.
12172
12173 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
12174 frontend.
12175
12176 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
12177
12178 * class.c (set_rtti_entry): Use size_zero_node.
12179 (build_vtable): Likewise.
12180
12181 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
12182
12183 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
12184 (prepare_fresh_vtable): Likewise.
12185
12186 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
12187
12188 * method.c (emit_thunk): Call mark_used on the target function.
12189
12190 * call.c (build_method_call): Don't warn about pending templates.
12191
12192 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12193
12194 * decl2.c (finish_file): Fix list walking logic.
12195
12196 * typeck2.c (check_for_new_type): Only warn if -pedantic.
12197
12198 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
12199
12200 * class.c (finish_struct_1): Remove old code for
12201 dont_allow_type_definitions.
12202 * cp-tree.h: Likewise.
12203 * spew.c: Make sure cp-tree.h is included before parse.h, so the
12204 definition of flagged_type_tree is found before it is used.
12205 * lex.c: Likewise.
12206 * parse.y: Added the ftype member to the type union, and changed a
12207 number of rules to use it instead of ttype. Added calls to
12208 check_for_new_type() as appropriate.
12209 * typeck2.c (check_for_new_type): New function for checking
12210 if a newly defined type appears in the specified tree.
12211 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
12212 for check_for_new_type().
12213
12214 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
12215
12216 * decl2.c (finish_file): Only use a sentry if the decl is public.
12217
12218 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
12219 don't pass LOOKUP_ONLYCONVERTING.
12220
12221 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
12222
12223 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
12224 properly keeps track of const and volatile type modifiers.
12225
12226 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12227
12228 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
12229 * pt.c (comp_template_args): Use it.
12230
12231 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
12232 assemble_external for artificial function decls.
12233
12234 * decl.c (cp_finish_decl): Oops.
12235
12236 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
12237
12238 * decl2.c (import_export_decl): Put static data member templates
12239 into common storage, or make them weak, depending on whether they
12240 are dynamically or statically initialized.
12241 (get_sentry): New function.
12242 (finish_file): Do import_export_decl for static data members before
12243 building the init/fini functions. Don't init/fini a variable that's
12244 EXTERNAL. Use a sentry for variables in common. Fix mismatching
12245 push/pop_temp_slots.
12246 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
12247 expand_static_init thang.
12248 * method.c (get_id_2): New function.
12249
12250 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
12251
12252 * parse.y (empty_parms): Make sure we use C++-style prototypes
12253 when we're declaring member functions.
12254
12255 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12256
12257 * Makefile.in (CONFLICTS): 16 s/r conflicts.
12258 * parse.y (self_template_type): New nonterminal.
12259
12260 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12261
12262 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
12263 name.
12264 * parse.y (base_class.1): Allow 'typename foo::bar'.
12265
12266 * lex.c (check_newline): Remove #pragma code that plays with the
12267 input stream, since we now deal with tokens. Clear nextchar when
12268 we're done.
12269 (handle_cp_pragma): Use real_yylex.
12270 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
12271 in one place.
12272
12273 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
12274
12275 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
12276
12277 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12278
12279 * parse.y: New token SELFNAME for potential constructor.
12280 * spew.c (yylex): Handle it.
12281 * lex.c (identifier_type): Produce it.
12282
12283 * parse.y (complete_type_name): In :: case, don't push class binding.
12284 (complex_type_name): Likewise.
12285
12286 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
12287
12288 * typeck.c (build_reinterpret_cast): Handle pointer to member
12289 functions.
12290
12291 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12292
12293 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
12294 pragmas.
12295 (check_newline): Put the vtable/unit/implementation/interface pragma
12296 code into handle_cp_pragma, replacing it with a call.
12297 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
12298 args. Get the next token after handling the pragma token.
12299
12300 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
12301
12302 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
12303 (convert_to_pointer_force): Likewise.
12304
12305 * init.c (build_new): Fix array new without -fcheck-new.
12306
12307 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12308
12309 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
12310 tree.c: Lose TYPE_NESTED_NAME.
12311
12312 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
12313 as identifiers.
12314
12315 * tree.def: Add VEC_INIT_EXPR.
12316 * expr.c (cplus_expand_expr): Handle it.
12317 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
12318 the extra file-scope symbol nastiness.
12319
12320 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12321
12322 * method.c (make_thunk): Thunks are static.
12323 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
12324
12325 * decl2.c (mark_vtable_entries): Emit thunks as needed.
12326 (finish_file): Don't emit them here.
12327
12328 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
12329
12330 * rtti.c (build_dynamic_cast): Handle null pointers.
12331 (ifnonnull): New function.
12332
12333 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
12334
12335 * call.c (build_method_call): Remember the original basetype we
12336 were called with. Give an error message instead of trying
12337 (incorrectly) to call a non-static member function through a
12338 non-inherited class.
12339
12340 * search.c (expand_upcast_fixups): Mark the new fixup as
12341 DECL_ARTIFICIAL.
12342
12343 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12344
12345 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
12346
12347 * class.c (set_rtti_entry): Fix for thunks.
12348
12349 * decl2.c (import_export_decl): Still emit typeinfo fns for
12350 cv-variants of builtin types.
12351
12352 * rtti.c (expand_class_desc): Set up base_info_type_node here.
12353 (init_rtti_processing): Instead of here.
12354
12355 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12356
12357 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
12358 (build_typeid): Only complain about taking dynamic typeid without
12359 -frtti.
12360
12361 * decl2.c: flag_rtti defaults to 1.
12362
12363 * rtti.c (get_tinfo_var): The general class case is now smaller.
12364 (init_rtti_processing): Pack the latter three fields of base_info
12365 into 32 bits.
12366
12367 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
12368
12369 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
12370
12371 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
12372
12373 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
12374 (push_memoized_context): Split out code to undefer pop_type_level to
12375 (clear_memoized_cache): here.
12376 (pop_memoized_context): We can only handle one layer of deferral of
12377 pop_type_level so clear the cache, if there was a previous level.
12378
12379 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12380
12381 * rtti.c (init_rtti_processing): Build up base_info_type_node.
12382 (expand_class_desc): Use one pointer to an array of base_info
12383 structs, passed using a CONSTRUCTOR.
12384
12385 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
12386
12387 * class.c (build_vbase_path): Remove block extern for
12388 flag_assume_nonnull_objects here.
12389 (build_vfn_ref): Split out functionality into build_vtbl_ref.
12390 (build_vtbl_ref): New routine.
12391 (build_vtable): Set up rtti info here.
12392 (add_virtual_function): Note in CLASSTYPE_RTTI the best
12393 place where we can get the rtti pointers from to avoid having to
12394 search around for a place.
12395 (finish_base_struct): Likewise.
12396 (finish_struct_1): Likewise. Never create totally new vtables
12397 with totally new vtable pointers for rtti. Disable code to layout
12398 vtable pointers better until we want to break binary
12399 compatibility.
12400 * rtti.c (build_headof_sub): New routine to convert down to a
12401 sub-object that has an rtti pointer in the vtable.
12402 (build_headof): Use it. Also, use build_vtbl_ref now to be more
12403 maintainable.
12404 (build_dynamic_cast): Make sure we have saved it, if we need to.
12405 * search.c (dfs_init_vbase_pointers): Disable code that deals with
12406 a more efficient vtable layout, enable later.
12407 * call.c (flag_assume_nonnull_objects): Moved declaration to
12408 * cp-tree.h: here. Declare build_vtbl_ref.
12409 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
12410 function calls that want a tree.
12411
12412 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12413
12414 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
12415 other X subobjects in the most derived type. Ack.
12416
12417 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
12418 get_typeid will do it for us.
12419 (get_typeid_1): Break out call-building for expand_*_desc to use.
12420 (get_typeid): Call it.
12421 (expand_*_desc): Likewise.
12422 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
12423 and void *.
12424 (init_decl_processing): Lose builtin_type_tdescs lossage.
12425 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
12426
12427 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
12428
12429 * pt.c (tsubst): When calling set_nested_typename, use
12430 TYPE_NESTED_NAME (current_class_type) instead of
12431 current_class_name.
12432
12433 * decl.c (pushdecl): Likewise.
12434 (pushdecl_class_level): Likewise.
12435 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
12436 set_nested_typename.
12437
12438 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12439
12440 * rtti.c (synthesize_tinfo_fn): Handle arrays.
12441
12442 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
12443
12444 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
12445
12446 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
12447 (init_rtti_processing): Lose bad_cast_type.
12448 (build_dynamic_cast): Use throw_bad_cast.
12449
12450 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
12451
12452 * decl2.c (finish_file): Don't synthesize artificial functions
12453 that are external and not inline.
12454
12455 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
12456
12457 * decl2.c (finish_file): Handle having new inlines added to
12458 saved_inlines by synthesis.
12459
12460 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
12461
12462 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12463
12464 RTTI rewrite to initialize nodes as needed, not require that
12465 users #include <typeinfo>, complete functionality and reduce wasted
12466 space.
12467 * rtti.c (init_rtti_processing): New fn.
12468 (build_typeid): The vtable entry is now a function.
12469 (get_tinfo_var): New fn.
12470 (get_tinfo_fn): Likewise.
12471 (get_typeid): Use it.
12472 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
12473 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
12474 points __rtti_*.
12475 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
12476 (synthesize_tinfo_fn): New fn.
12477 * method.c (build_t_desc_overload): Lose.
12478 (build_overload_with_type): More generic.
12479 * decl.c (init_decl_processing): Call init_rtti_processing.
12480 * class.c (set_rtti_entry): Use get_tinfo_fn.
12481 * decl2.c (mark_vtable_entries): Mark the rtti function.
12482 (finish_prevtable_vardecl): Don't build_t_desc.
12483 (import_export_decl): Handle tinfo functions.
12484 (finish_file): Likewise.
12485 * typeck.c (inline_conversion): New fn.
12486 (build_function_call_real): Use it.
12487 * cp-tree.h: Add decls.
12488
12489 * method.c (hack_identifier): Also convert component_refs from
12490 references.
12491
12492 * lex.c (cons_up_default_function): Use the type, not the name, in
12493 declspecs.
12494
12495 * decl2.c (import_export_vtable): Fix weak vtables.
12496
12497 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
12498
12499 * search.c (get_base_distance_recursive): Fix access checks for
12500 protected bases.
12501
12502 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12503
12504 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
12505 cp-tree.h.
12506 (convert_harshness): Add prototypes wrapped by PROTO.
12507 * decl2.c (grok_function_init): Likewise.
12508 (do_toplevel_using_decl): Change to void return type.
12509 * class.c (build_vtable_entry): Remove decl of make_thunk.
12510 (merge_overrides): Fix order of arg definitions.
12511 (finish_vtbls): Likewise.
12512 (fixup_vtable_deltas): Likewise.
12513 (modify_all_direct_vtables): Likewise.
12514 (modify_all_indirect_vtables): Likewise.
12515 * search.c (get_base_distance_recursive): Likewise.
12516 (get_abstract_virtuals_1): Likewise.
12517 (fixup_virtual_upcast_offsets): Likewise.
12518 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
12519 * init.c (perform_member_init): Fix order of arg definitions.
12520 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
12521 * cp-tree.h (make_thunk): Add decl.
12522 (overload_template_name, push_template_decl): Add decls.
12523 (do_toplevel_using_decl): Change to void return type.
12524 (vec_binfo_member): Add decl.
12525
12526 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12527
12528 * typeck.c (mark_addressable, convert_for_assignment,
12529 convert_for_initialization, pointer_int_sum, pointer_diff,
12530 unary_complex_lvalue): Add prototypes wrapped by PROTO.
12531 (convert_sequence): #if 0 fn decl, since definition also is.
12532
12533 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
12534
12535 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
12536 cast to pointer types for type searching.
12537
12538 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12539
12540 * typeck.c (get_delta_difference): Use cp_error, not error, in the
12541 case where BINFO == 0.
12542
12543 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
12544
12545 * call.c (build_method_call): Fix wording of error messages so
12546 constructors come out right.
12547
12548 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
12549
12550 * decl.c (push_overloaded_decl): Don't warn about hidden
12551 constructors when both the type and the function are declared
12552 in a system header file.
12553
12554 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
12555
12556 * class.c (finish_struct_1): Propagate the TYPE_PACKED
12557 flag for the type to the type's fields.
12558
12559 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12560
12561 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
12562
12563 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
12564
12565 * class.c (base_info, finish_base_struct): Replace
12566 needs_virtual_dtor with base_has_virtual.
12567
12568 (finish_struct_1): Remove the old code that tried to make default
12569 destructors virtual. Use base_has_virtual when checking if we need
12570 to add a vtable entry for the rtti code.
12571
12572 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12573
12574 * pt.c (push_template_decl): Complain about template decl with
12575 inappropriate declaration.
12576
12577 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
12578
12579 * typeck.c (build_x_unary_op): Remove bogus check for taking
12580 the address of a member function.
12581
12582 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12583
12584 * parse.y (constructor_declarator): Only push the class if
12585 we are not already in the class.
12586
12587 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
12588
12589 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
12590 Add additional argument to INIT_CUMULATIVE_ARGS.
12591
12592 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
12593
12594 * decl.c (shadow_tag): Fix error about anon union with methods.
12595
12596 * parse.y (self_reference): Only generate a self-reference if this
12597 is a non-template class.
12598 (opt.component_decl_list): Only use it if it was generated.
12599
12600 * parse.y (component_decl_1): Use constructor_declarator.
12601 (fn.def2): Likewise.
12602 (notype_component_declarator0): Likewise.
12603
12604 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
12605
12606 * typeck.c (build_x_unary_op): Add checks for taking the address
12607 of a TARGET_EXPR or of a member function, and give appropriate
12608 warnings.
12609
12610 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12611
12612 * pt.c (process_template_parm): Allow template type parms to be
12613 used as types for template const parms.
12614
12615 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
12616
12617 * init.c (expand_vec_init): Ensure the eh cleanups are on the
12618 function_obstack.
12619
12620 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12621
12622 * decl.c (lookup_name_real): Be even more picky about the
12623 ambiguous lookup warning.
12624 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
12625 * parse.y (constructor_declarator): Rather than here.
12626
12627 * parse.y (constructor_declarator): New nonterminal.
12628 (fn.def1): Use it.
12629 (explicit_instantiation): Likewise.
12630
12631 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12632
12633 Add implicit declaration of class name at class scope.
12634 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
12635 * parse.y (self_reference): New nonterminal.
12636 (opt.component_decl_list): Use it.
12637 (fn.def1): Add nested_name_specifier type_name cases.
12638 * class.c (build_self_reference): New function.
12639 (finish_struct): Handle access_default later, move self-reference
12640 decl to the end.
12641 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
12642 * cp-tree.h: Adjust.
12643
12644 * pt.c (do_function_instantiation): Separate handling of member
12645 functions and non-member functions properly.
12646
12647 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12648
12649 * pt.c (process_template_parm): Improve error for 'volatile class K'.
12650
12651 * class.c (finish_struct_1): Check the right slot for destructors.
12652
12653 * decl.c (start_enum): Complain about enum templates.
12654
12655 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
12656
12657 * init.c (resolve_offset_ref): Offset pointers to member data by one.
12658 * typeck.c (unary_complex_lvalue): Likewise.
12659
12660 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
12661
12662 * typeck.c (c_expand_return): Check for a returned local
12663 array name, similar to the check for an ADDR_EXPR.
12664
12665 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12666
12667 * decl.c (cp_finish_decl): Don't build cleanups for static
12668 variables here.
12669
12670 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
12671
12672 * typeck.c (build_modify_expr): Fix error messages to be more
12673 accurate.
12674 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
12675 assignment operators.
12676 * error.c (assop_as_string): Likewise. Add support for `%Q' for
12677 assignment operators.
12678
12679 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12680
12681 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
12682 give an error if initialized. Pedwarn about nested type with the
12683 same name as its enclosing class.
12684
12685 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
12686
12687 * typeck.c (require_complete_type): Be sure to instantiate the
12688 MAIN_VARIANT of the type.
12689
12690 * decl2.c (finish_file): Instantiate pending templates before
12691 processing static constructors and destructors.
12692
12693 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
12694 unless at_eof.
12695
12696 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
12697
12698 * decl2.c (delete_sanity): If error_mark_node is passed
12699 in as an expression, quit while we're ahead.
12700
12701 * decl.c (grokdeclarator): Give an error message if `friend'
12702 is combined with any storage class specifiers.
12703
12704 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
12705
12706 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
12707 definition of nonexistent nested type.
12708
12709 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
12710 not to say 'typedef'.
12711
12712 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12713
12714 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
12715 * search.c (dfs_walk, dfs_init_vbase_pointers,
12716 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
12717 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
12718
12719 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
12720
12721 * except.c (build_throw): Support minimal parse.
12722 * pt.c (tsubst_copy): Support THROW_EXPR.
12723 * decl2.c (build_expr_from_tree): Likewise.
12724
12725 * pt.c (mangle_class_name_for_template): Always allocate
12726 scratch_firstobj.
12727
12728 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
12729
12730 * cvt.c (cp_convert_to_pointer): Give an appropriate error
12731 when trying to cast from an incomplete type.
12732
12733 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12734
12735 * pt.c (instantiate_class_template): Don't bother setting up
12736 CLASSTYPE_TAGS explicitly, as the nested types will add
12737 themselves.
12738
12739 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
12740
12741 * decl.c (shadow_tag): Remove old error check for usage of
12742 an enum without a previous declaration.
12743 (xref_tag): Add error message about usage of enums without a
12744 previous declaration.
12745
12746 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
12747
12748 * lex.c (do_identifier): Only do name consistency check if we're
12749 parsing.
12750
12751 * pt.c (push_template_decl): Don't crash if we get a member defn
12752 that doesn't match.
12753
12754 * decl.c (xref_tag_from_type): New function to do an xref without
12755 always having to figure out code_type_node.
12756 * cp-tree.h: Declare it.
12757 * pt.c (instantiate_class_template): Use it for friend classes.
12758 (lookup_template_class): Use it.
12759
12760 * typeck2.c (build_functional_cast): Pull out a single parm before
12761 passing it to build_c_cast.
12762
12763 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
12764
12765 * expr.c (do_case): Give an error message if a pointer is
12766 given as a case value.
12767
12768 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12769
12770 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
12771 an overload list.
12772
12773 * lex.c (cons_up_default_function): Really, now, interface hackery
12774 does not apply to synthesized methods.
12775
12776 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
12777
12778 * call.c (build_method_call): Ctors and dtors now have special names
12779 with respect to lookups.
12780 * class.c (add_method): Likewise.
12781 (grow_method): Likewise.
12782 (finish_struct_methods): Likewise.
12783 (warn_hidden): Likewise.
12784 (finish_struct_1): Likewise.
12785 * cvt.c (convert_to_reference): Likewise.
12786 (convert_to_aggr): Likewise.
12787 (cp_convert): Likewise.
12788 * decl2.c (check_classfn): Likewise.
12789 * init.c (expand_member_init): Likewise.
12790 (expand_default_init): Likewise.
12791 (expand_aggr_init_1): Likewise.
12792 (build_offset_ref): Likewise.
12793 (build_new): Likewise.
12794 (build_delete): Likewise.
12795 * lex.c (do_inline_function_hair): Likewise.
12796 * search.c (lookup_field_1): Likewise.
12797 (lookup_fnfields_here): Likewise.
12798 (lookup_field): Likewise.
12799 (lookup_fnfields): Likewise.
12800 (get_virtual_destructor): Likewise.
12801 (dfs_debug_mark): Likewise.
12802 (dfs_pushdecls): Likewise.
12803 (dfs_compress_decls): Likewise.
12804 * tree.c (layout_basetypes): Likewise.
12805 * typeck.c (build_component_ref): Likewise.
12806 (build_x_function_call): Likewise.
12807 (build_modify_expr): Likewise.
12808 (convert_for_initialization): Likewise.
12809 (build_functional_cast): Likewise.
12810 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
12811 (CTOR_NAME): New.
12812 (DTOR_NAME): New.
12813 * decl.c (ctor_identifier): New.
12814 (dtor_identifier): New.
12815 (init_decl_processing): Set them.
12816
12817 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
12818
12819 * typeck.c (build_component_ref): Don't get confused by fields whose
12820 context has no type name, like pointer to member functions.
12821
12822 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
12823
12824 * decl.c (grokdeclarator): Handle typedef without declarator.
12825
12826 * pt.c (tsubst): Handle SCOPE_REF in declarator.
12827
12828 * parse.y (bad_parm): Catch another case of missing `typename'.
12829
12830 * lex.c (yyprint): Handle TYPE_DECLs.
12831
12832 * decl.c (start_function): Don't try to be clever.
12833
12834 * lex.c: Lose compiler_error_with_decl.
12835 * typeck2.c: Lose error_with_aggr_type.
12836 (incomplete_type_error): Use cp_* instead of old functions.
12837 (readonly_error): Likewise.
12838 * typeck.c (convert_arguments): Likewise.
12839 * search.c (lookup_nested_field): Likewise.
12840 * method.c (make_thunk): Likewise.
12841 * decl.c (grokparms): Likewise.
12842 * cp-tree.h: Update.
12843
12844 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
12845 and value.
12846
12847 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
12848
12849 * method.c (build_opfncall): When deleting a pointer to an
12850 array, build a new pointer to the tree past any ARRAY_TYPE
12851 nodes.
12852
12853 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12854
12855 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
12856
12857 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12858
12859 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
12860 and ! DECL_INLINE.
12861
12862 * decl.c (finish_function): Don't set nested based on
12863 hack_decl_function_context.
12864 * parse.y (function_try_block): Check for nested function.
12865 (pending_inlines): Likewise.
12866
12867 * decl2.c (build_expr_from_tree): If a unary op already has a
12868 type, just return it.
12869
12870 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
12871
12872 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
12873 (finish_file): Check the return value of walk_vtables.
12874 (finish_prevtable_vardecl): Return int.
12875 (finish_vtable_vardecl): Likewise.
12876 (prune_vtable_vardecl): Likewise.
12877 * lex.c (set_vardecl_interface_info): Likewise.
12878 * cp-tree.h: Adjust return types.
12879
12880 * class.c (delete_duplicate_fields_1): Don't complain about
12881 duplicate nested types if they're the same type.
12882 (finish_struct): Remove check for duplicate.
12883 * decl2.c (grokfield): Don't check for typedef of anonymous type.
12884
12885 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12886
12887 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
12888
12889 * decl.c (grokdeclarator): Lose special handling of class-level
12890 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
12891 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
12892
12893 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
12894
12895 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
12896
12897 * search.c (compute_access): Fix handling of anonymous union
12898 members.
12899 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
12900 from anonymous unions to their members.
12901
12902 * typeck.c (build_x_function_call): For static member functions,
12903 hand off to build_member_call.
12904
12905 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
12906
12907 * typeck.c (build_component_ref): Handle OFFSET_REFs.
12908
12909 * init.c (expand_vec_init): Fix init == 0 case.
12910
12911 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12912
12913 * init.c (build_new): Pedwarn about init and array new.
12914 (expand_vec_init): Handle lists, use convert_for_initialization.
12915
12916 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
12917 when converting to an aggregate type.
12918 * cvt.c (cp_convert): Pass it through.
12919
12920 * typeck.c (build_conditional_expr): Handle user-defined
12921 conversions to slightly different types.
12922
12923 * decl.c (grokdeclarator): Force an array type in a parm to be
12924 permanent.
12925
12926 * decl2.c (do_using_directive): Sorry.
12927 (do_namespace_alias): Likewise.
12928 * lex.c (real_yylex): Warn about using the `namespace' keyword.
12929
12930 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12931
12932 * parse.y (datadef): Move call to note_list_got_semicolon up.
12933
12934 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
12935
12936 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
12937
12938 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
12939
12940 * decl.c (cp_finish_decl): The exception regions have to be
12941 nested, not overlapping. We start the exception region for a
12942 decl, after it has been fully built, and all temporaries for it
12943 have been cleaned up.
12944
12945 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
12946
12947 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
12948
12949 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12950
12951 * tree.def: Add RETURN_INIT.
12952 * pt.c (instantiate_decl): Handle RETURN_INIT.
12953 * decl.c (store_return_init): Handle minimal_parse_mode.
12954
12955 * tree.c (cp_build_type_variant): Just return an error_mark_node.
12956 * decl.c (make_typename_type): Don't try to get the file and line
12957 of an identifier.
12958 * typeck.c (comptypes): Handle TYPENAME_TYPE.
12959
12960 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
12961
12962 * decl.c (poplevel): Make sure we clear out and restore old local
12963 non-VAR_DECL values by default when they go out of scope.
12964
12965 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12966
12967 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
12968 referring to addresses of variables and functions.
12969
12970 * error.c (dump_expr): Support SIZEOF_EXPR.
12971
12972 * init.c (do_friend): Use the return value of check_classfn.
12973
12974 * typeck.c (convert_arguments): Call complete_type.
12975
12976 * method.c (hack_identifier): After giving an error, set value to
12977 error_mark_node.
12978
12979 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12980
12981 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
12982 lossage for local classes.
12983 * cp-tree.h: Declare it.
12984 * decl.c (lookup_name_real): Evil, painful hack for local classes.
12985 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
12986 Use hack_decl_function_context.
12987 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
12988 (start_function): Use hack_decl_function_context.
12989 (finish_function): Likewise.
12990 * method.c (synthesize_method): Likewise.
12991 * lex.c (process_next_inline): Likewise.
12992 (do_pending_inlines): Likewise.
12993 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
12994 done with it.
12995
12996 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
12997
12998 * sig.c (build_signature_pointer_or_reference_type): Align
12999 signature pointers/references on 8-byte boundaries so they can be
13000 grabbed 2 words at a time on a Sparc.
13001
13002 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
13003
13004 * method.c (hack_identifier): Requiring a static chain is now a
13005 hard error.
13006 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
13007 functions.
13008
13009 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13010
13011 * init.c (build_offset_ref): Call complete_type.
13012
13013 * decl.c (pop_from_top_level): Always pop previous_class_type.
13014
13015 * parse.y: Handle multiple decls in a for-init-statement.
13016 * pt.c (tsubst_expr): Likewise.
13017
13018 * pt.c (tsubst): Use tsubst_expr for the second operand of an
13019 ARRAY_REF.
13020
13021 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
13022 (poplevel_class): Set it here.
13023 (pop_from_top_level): Pop it here if we're returning to class scope.
13024 * class.c (pushclass): Don't set it here.
13025
13026 * decl.c (maybe_push_to_top_level): Save current_template_parms,
13027 and clear it if !pseudo.
13028 (pop_from_top_level): Restore it.
13029
13030 * decl2.c (finish_file): Push the dummy each time we walk the list
13031 of vtables.
13032
13033 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
13034 something for CAST_EXPR.
13035
13036 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13037
13038 * cvt.c (cp_convert): Warn about implicit conversion of the
13039 address of a function to bool, as it is always true.
13040
13041 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13042
13043 * typeck.c (c_expand_return): Fix warning for local externs returned.
13044
13045 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
13046
13047 * tree.c (mapcar): Propagate const and volatile properly.
13048
13049 * typeck.c (complete_type): Be sure to instantiate the
13050 MAIN_VARIANT of the type.
13051
13052 * method.c (synthesize_method): Class interface hackery does not
13053 apply to synthesized methods.
13054
13055 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13056
13057 * pt.c (comp_template_args): Use comptypes rather than just
13058 checking for TEMPLATE_TYPE_PARM equivalence.
13059
13060 * typeck.c (build_x_function_call): Call complete_type before
13061 checking TYPE_OVERLOADS_CALL_EXPR.
13062
13063 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
13064
13065 * g++.c (main): Check also for new define ALT_LIBM.
13066
13067 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13068
13069 * pt.c (instantiate_class_template): If we don't have a pattern
13070 yet, that's OK.
13071 (coerce_template_parms): If we see a local class, bail.
13072
13073 * decl.c (grok_reference_init): Make sure there's a type before
13074 checking its code.
13075
13076 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
13077 (push_template_decl): Likewise.
13078
13079 * parse.y (named_class_head): Set
13080 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
13081
13082 * decl.c (xref_tag): Diagnose redeclaration of template
13083 type-parameter name.
13084
13085 * error.c (dump_type): Handle anonymous template type parms.
13086
13087 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
13088 TYPE_STUB_DECL.
13089 (coerce_template_parms): Likewise.
13090
13091 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
13092
13093 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
13094 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
13095
13096 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13097
13098 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
13099 before trying to get its STUB_DECL.
13100 (coerce_template_parms): Likewise.
13101
13102 * parse.y (template_type_parm): If they didn't use 'class',
13103 pretend they did after giving an error.
13104
13105 * pt.c (coerce_template_parms): Diagnose use of local class.
13106
13107 * decl.c (grok_reference_init): Use instantiate_type.
13108
13109 * error.c (dump_expr): Handle TEMPLATE_DECLs.
13110
13111 * parse.y (named_class_head): Diagnose mismatching types and tags.
13112
13113 * decl.c (pushdecl): Type decls and class templates clash with
13114 artificial type decls, not hide them.
13115
13116 * decl.c (redeclaration_error_message): Diagnose redefinition of
13117 templates properly.
13118 (duplicate_decls): Diagnose disallowed overloads for template
13119 functions, too.
13120
13121 * decl.c (start_decl): Call complete_type before checking for a
13122 destructor.
13123
13124 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
13125
13126 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
13127
13128 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13129
13130 * decl.c (grok_op_properties): Don't check for operator++(int) in
13131 a template.
13132
13133 * tree.c (perm_manip): Return a copy of variable and function
13134 decls with external linkage.
13135
13136 * tree.def: Change some of the min tree codes to type "1".
13137 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
13138 * method.c (build_overload_int): Emit something arbitrary for
13139 anything but an INTEGER_CST if we're in a template.
13140
13141 * decl.c (cp_finish_decl): Call complete_type before deciding
13142 whether or not to lay out the decl.
13143
13144 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
13145
13146 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13147
13148 * typeck2.c (build_x_arrow): Call complete_type.
13149
13150 * pt.c (add_pending_template): Broken out.
13151 (lookup_template_class): If -fexternal-templates, call it for all
13152 the methods of implemented types.
13153 (instantiate_class_template): Instead of instantiating them here.
13154 (instantiate_decl): Handle -fexternal-templates earlier.
13155
13156 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13157
13158 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
13159 memoized lookup stuff inside GATHER_STATISTICS.
13160
13161 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13162
13163 * decl.c (start_decl): Complain about array of incomplete type
13164 here.
13165 (grokdeclarator): Not here.
13166
13167 * parse.y (template_parm): Expand full_parm inline so we can set
13168 the rule's precedence.
13169
13170 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
13171 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
13172 * decl2.c (grokbitfield): Don't check for integer constant here.
13173 * class.c (finish_struct_1): Check here.
13174
13175 * decl.c (define_label): Make the min decl go on permanent_obstack.
13176
13177 * pt.c (unify): Don't handle CONST_DECLs.
13178 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
13179 (tsubst_copy): Likewise.
13180
13181 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
13182 CONST_DECL for a template parm.
13183
13184 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
13185
13186 * decl.c (grokdeclarator): Complain about array of incomplete type
13187 here.
13188 (start_decl_1): Not here.
13189
13190 * pt.c (tsubst): Handle pointer-to-function declarators.
13191
13192 * method.c (hack_identifier): If pedantic, diagnose local class
13193 methods that require a static chain.
13194
13195 * decl.c (grok_op_properties): No longer static.
13196 * cp-tree.h: Declare it.
13197 * pt.c (tsubst): Call it for operators.
13198 Use tsubst_copy for TREE_VECs.
13199
13200 * parse.y (template_arg): The expr has precedence like '>'.
13201
13202 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13203
13204 * pt.c (coerce_template_parms): Don't coerce an expression using
13205 template parms.
13206 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
13207 (tsubst): Don't use build_index_2_type if the max_value uses template
13208 parms.
13209 * method.c (build_overload_int): Emit something arbitrary for an
13210 expression using template parms.
13211
13212 * parse.y (template_close_bracket): New non-terminal to catch use
13213 of '>>' instead of '> >' in template class names.
13214 (template_type): Use it.
13215 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
13216
13217 * tree.def: Add CAST_EXPR.
13218 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
13219 CONVERT_EXPR for minimal_parse_mode.
13220 * typeck.c (build_c_cast): Likewise.
13221 * pt.c (tsubst_copy): Likewise.
13222 * decl2.c (build_expr_from_tree): Likewise.
13223 * error.c (dump_expr): Likewise.
13224
13225 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13226
13227 * except.c (SetTerminate, SetUnexpected): Put back global vars.
13228 (init_exception_processing): Put back decl/init of
13229 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
13230 fns from libstdc++.
13231
13232 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
13233 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
13234 Delete unused fns.
13235 * cp-tree.h (declare_uninstantiated_type_level,
13236 uninstantiated_type_level_p): Delete prototypes.
13237
13238 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
13239
13240 * pt.c (tsubst_expr): Add default return.
13241
13242 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13243
13244 * error.c (fndecl_as_string): Delete unused arg CNAME.
13245 * sig.c (build_signature_table_constructor,
13246 build_signature_method_call): Fix calls.
13247
13248 * class.c (the_null_vtable_entry): Delete var definition.
13249 (init_class_processing): Delete tree the_null_vtable_entry init.
13250 * decl.c (no_print_{functions, builtins}): Declare as static.
13251 (__tp_desc_type_node): #if 0 var definition.
13252 (init_type_desc): #if 0 init of __tp_desc_type_node.
13253 (vb_off_identifier): Move var decl into init_decl_processing.
13254 (current_function_assigns_this): Declare as static.
13255 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
13256 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
13257 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
13258 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
13259 * init.c (BI_header_type, BI_header_size): Declare as static.
13260 * pt.c (template_classes): Delete unused var.
13261 (add_pending_template): Delete decl for non-existent fn.
13262 (lookup_template_class): Delete vars CODE and TAG_CODE.
13263 (instantiate_template): Delete unused var TARGS.
13264 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
13265 Delete decls.
13266 (__tp_desc_type_node): #if 0 var decl.
13267 (fndecl_as_string): Fix prototype.
13268
13269 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13270
13271 * tree.def: Add GOTO_STMT.
13272 * pt.c (tsubst_expr): Support goto and labels.
13273 * decl.c (define_label): Support minimal parsing.
13274 * parse.y (simple_stmt): Likewise.
13275
13276 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13277
13278 * xref.c (GNU_xref_member): Only define/set var I if
13279 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
13280 used.
13281 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
13282 (GNU_xref_end): Fix call.
13283 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
13284 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
13285
13286 * tree.c (build_exception_variant): Delete unused vars I, A, T,
13287 T2, and CNAME.
13288 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
13289 (mapcar): Delete unused var CODE.
13290 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
13291 (break_out_cleanups): Fix call.
13292 (bot_manip): Likewise.
13293 * call.c (build_method_call): Likewise.
13294 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
13295 Likewise.
13296 * typeck.c (unary_complex_lvalue, build_modify_expr,
13297 convert_for_initialization): Likewise.
13298 * typeck2.c (build_functional_cast): Likewise.
13299 * cp-tree.h (build_cplus_new): Fix prototype.
13300
13301 * repo.c (open_repo_file): Delete unused var Q.
13302 (repo_compile_flags, repo_template_declared,
13303 repo_template_defined, repo_class_defined, repo_inline_used,
13304 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
13305 (repo_get_id, repo_vtable_used): Declare as static.
13306 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
13307 prototypes.
13308
13309 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13310
13311 * parse.y (pending_inlines): Add function_try_block case.
13312
13313 * pt.c (unify): Fix for template const parms.
13314
13315 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13316
13317 * lex.c (extract_interface_info): Delete forward decl.
13318 (default_copy_constructor_body, default_assign_ref_body): Delete
13319 decls for non-existent functions.
13320 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
13321 (init_lex): Delete setting them.
13322 (cons_up_default_function): Delete unused vars FUNC_BUF,
13323 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
13324 #if 0'd synth code.
13325 (toplevel, expression_obstack): Delete unused extern decls.
13326 (tree_node_kind): Delete unused enum.
13327 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
13328 GATHER_STATISTICS.
13329 (tree_node_kind_names): Delete unused extern decl.
13330 (synth_obstack): Delete unused var.
13331 (init_lex): Don't set it.
13332 (init_parse): Add decl before use.
13333 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
13334 (current_unit_{name, language}): Delete unused vars.
13335 (check_newline): Don't bother setting them, just accept the #pragma.
13336 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
13337 (current_unit_{name, language}): Delete decls.
13338
13339 * search.c: Wrap all of the memoized functions, macros, and
13340 variables inside #ifdef GATHER_STATISTICS.
13341 (lookup_field, lookup_fnfields): Likewise.
13342 (init_search_processing): Likewise.
13343 (reinit_search_statistics): Wrap whole function.
13344 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
13345
13346 * decl.c (finish_function): Only call pop_memoized_context if
13347 GATHER_STATISTICS is defined.
13348 (start_function): Likewise for push_memoized_context.
13349 * class.c (pushclass, popclass): Likewise.
13350
13351 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
13352 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
13353
13354 * cvt.c (cp_convert): Delete unused local var FORM.
13355 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
13356 prototypes.
13357
13358 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13359
13360 * pt.c (do_poplevel): Oops; really return what we get from
13361 poplevel this time.
13362
13363 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13364
13365 * cp-tree.h (is_aggr_type): Add prototype.
13366
13367 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
13368 * method.c ({push,pop}_cp_function_context): Delete decls.
13369 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
13370 (SetUnexpected, SetTerminate): Delete unused vars.
13371 (init_exception_processing): Don't set SetUnexpected or
13372 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
13373 (output_exception_table_entry): Delete unused array LABEL.
13374 (expand_internal_throw): Delete unused var PARAMS.
13375 (expand_start_catch_block): Delete unused var CLEANUP.
13376 (emit_exception_table): Delete unused var EH_NODE_DECL.
13377 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
13378 GOTO_UNWIND_AND_THROW. Don't set them.
13379 (end_eh_unwinder): Add top decl.
13380 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
13381 (exception_section, push_rtl_perm, do_function_call,
13382 lang_interim_eh, push_eh_cleanup, eh_outer_context,
13383 expand_end_eh_spec, end_eh_unwinder): Declare as static.
13384 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
13385 throw_used): Likewise.
13386 * cp-tree.h (expand_end_eh_spec): Delete prototype.
13387
13388 * search.c (dfs_mark, dfs_mark_vtable_path,
13389 dfs_unmark_vtable_path, dfs_mark_new_vtable,
13390 dfs_unmark_new_vtable, dfs_clear_search_slot,
13391 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
13392 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
13393 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
13394 functions.
13395 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
13396 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
13397 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
13398 Only define #ifdef GATHER_STATISTICS.
13399 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
13400 is defined.
13401 (vbase_decl): Delete var definition.
13402 (init_search): Delete old decl.
13403 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
13404 never actually used.
13405 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
13406 (get_base_distance_recursive): Delete unused fourth arg
13407 BASETYPE_PATH. Fix call .
13408 (get_base_distance): Fix call.
13409 (push_class_decls): Delete unused var ID.
13410 (make_memoized_table_entry): Declare as static.
13411 (breadth_first_search): Declare as static.
13412 (tree_has_any_destructor_p): Declare as static.
13413 (pop_class_decls): Delete unused arg pop_class_decls.
13414 * class.c (popclass): Fix call to pop_class_decls.
13415 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
13416 tree_has_any_destructor_p): Delete prototypes.
13417
13418 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
13419 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
13420 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
13421 (build_user_desc): Delete unused var T.
13422 (build_class_desc): Delete unused vars T and OFF.
13423 (build_t_desc): Delete unused var NAME_STRING.
13424 (build_headof): Make static.
13425 (get_bad_cast_node): Likewise.
13426 (get_def_to_follow): Likewise.
13427 * cp-tree.h (init_type_desc): Add prototype.
13428 (build_headof): Remove prototype.
13429
13430 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13431
13432 * pt.c (tsubst): Only look for matching decls at file scope for
13433 non-member functions.
13434
13435 * call.c (build_scoped_method_call): Handle scoped destructor
13436 calls in templates.
13437
13438 * decl.c (*_top_level): Also save previous_class_values.
13439
13440 * pt.c (tsubst_expr): Support do {} while loops.
13441 * parse.y (simple_stmt): Likewise.
13442 * tree.def: Likewise.
13443
13444 * method.c (build_overload_identifier): For a class nested in a
13445 template class, don't mangle in the template parms from our
13446 context.
13447
13448 * lex.c, cp-tree.h: Remove support for template instantiations in
13449 the pending_inlines code.
13450 * pt.c: Remove dead functions and unused arguments.
13451 (uses_template_parms): TYPENAME_TYPEs always use template parms.
13452 * parse.y: Stop passing anything to end_template_decl.
13453 * tree.c (print_lang_statistics): Only print tinst info #ifdef
13454 GATHER_STATISTICS.
13455
13456 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13457
13458 * init.c (expand_recursive_init{,_1}): Delete decls.
13459 (sort_member_init): Delete unused var INIT.
13460 (emit_base_init): Delete unused var X.
13461 (build_offset_ref): Delete unused var CNAME.
13462 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
13463 (emit_base_init): Delete unused local var BASE. Delete extern
13464 decl of IN_CHARGE_IDENTIFIER.
13465 (build_delete): Delete unused local var VIRTUAL_SIZE.
13466
13467 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
13468 (build_delete): Fix call.
13469 * decl2.c (delete_sanity): Likewise.
13470 * cp-tree.h (build_vec_delete): Update prototype.
13471
13472 * typeck.c (common_base_type): Delete unused var TMP.
13473 (build_binary_op): Delete local var ARGS_SAVE.
13474 (build_array_ref): Delete unused var ITYPE.
13475 (c_expand_return): Delete unused var USE_TEMP.
13476
13477 * typeck.c (compexcepttypes): Delete unused arg STRICT.
13478 (comptypes): Fix calls.
13479 * decl.c (duplicate_decls): Likewise.
13480 * cp-tree.h (compexcepttypes): Delete extra arg.
13481
13482 * decl2.c (check_classfn): Delete unused second arg CNAME.
13483 * decl.c (start_decl, grokfndecl): Fix calls.
13484 * init.c (do_friend): Likewise.
13485 * cp-tree.h (check_classfn): Update prototype.
13486
13487 * cp-tree.h (signature_error, import_export_vtable,
13488 append_signature_fields, id_in_current_class, mark_used,
13489 copy_assignment_arg_p): Add decls.
13490 * decl2.c (mark_used): Delete decl.
13491
13492 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
13493
13494 * class.c (get_vtable_entry): Diable unused function.
13495 (doing_hard_virtuals): Delete unused static global var.
13496 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
13497 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
13498 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
13499 (modify_one_vtable): Delete unused var OLD_RTTI.
13500 (finish_struct_anon): Delete unused vars OFFSET and X.
13501 (finish_struct_bits): Delete unused var METHOD_VEC.
13502 (get_basefndecls): Delete unused var PURPOSE. Delete unused
13503 for-scope local variable METHODS.
13504
13505 * call.c (user_harshness): Delete unused/unneeded arg PARM.
13506 (ideal_candidate): Delete unused args BASETYPE and PARMS.
13507 (build_method_call): Delete unused args passed into ideal_candidate.
13508 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
13509 * cp-tree.h (synthesize_method): Add decl.
13510
13511 * decl.c (note_level_for_for): Give void return type.
13512 (pushdecl_nonclass_level): Likewise.
13513 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
13514 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
13515 (suspend_binding_level): Delete unused var LEVEL.
13516 (duplicate_decls): Delete unused var CTYPE.
13517 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
13518 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
13519 PTR_ENDLINK.
13520 (grokdeclarator): Delete unused var C.
13521 (grokdeclarator): Delete unused var SIZE_VARIES.
13522 (grokparms): Delete unused var SAW_VOID.
13523 (start_function): Delete unused var OLDDECL.
13524 (cplus_expand_expr_stmt): Delete unused var
13525 REMOVE_IMPLICIT_IMMEDIATELY.
13526
13527 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
13528
13529 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
13530
13531 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13532
13533 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
13534 (build_min_nt): Likewise.
13535 * pt.c (do_pushlevel): Emit line note.
13536 (do_poplevel): Return what we get from poplevel.
13537 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
13538 * parse.y: Use do_pushlevel and do_poplevel.
13539 * cp-tree.h: Declare do_poplevel.
13540
13541 * cp-tree.h: Declare at_eof.
13542 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
13543 * decl2.c (import_export_decl): Renamed from import_export_inline.
13544 (finish_file): Call it to do interface handling for statics.
13545 * pt.c (tsubst_copy): Call mark_used on variables and functions
13546 used here.
13547
13548 * decl2.c (finish_file): Don't emit statics we can't generate.
13549 * pt.c (instantiate_decl): Don't set interface on instantiations
13550 we can't generate.
13551
13552 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
13553 * tree.c (print_lang_statistics): Print max template depth.
13554 * pt.c (push_tinst_level): Dump entire instantiation context.
13555 (instantiate_class_template): Use it and pop_tinst_level.
13556 (instantiate_decl): Likewise.
13557
13558 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
13559 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
13560
13561 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13562
13563 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
13564 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
13565 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
13566 the new template implementation.
13567
13568 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13569
13570 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
13571
13572 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
13573
13574 * decl.c (cp_finish_decl): Delay emitting the debug information for
13575 a typedef that has been installed as the canonical typedef, if the
13576 type has not yet been defined.
13577
13578 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13579
13580 * decl2.c (grokfield): Still call pop_nested_class for access decls.
13581
13582 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13583
13584 * decl.c (lookup_label): Call label_rtx.
13585
13586 * decl.c (make_binding_level): New function.
13587 (pushlevel, pushlevel_class): Call it instead of explicit
13588 duplicate calls to xmalloc.
13589
13590 * decl.c (init_decl_processing): Delete useless build_pointer_type
13591 call.
13592
13593 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
13594 (sizet_ftype_string): Delete variable.
13595 (init_decl_processing): Add built-in functions fabsf, fabsl,
13596 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
13597 variable strlen_ftype, used for strlen.
13598
13599 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13600
13601 * decl.c (push_to_top_level): Start from current_binding_level
13602 again for now; the stl hacks depend on g++ being broken in this
13603 way, and it'll be fixed in the template rewrite.
13604
13605 * tree.def: Add USING_DECL.
13606 * decl2.c (do_class_using_decl): Implement.
13607 (grokfield): Pass access decls off to do_class_using_decl instead of
13608 grokdeclarator.
13609 * error.c (dump_decl): Handle USING_DECLs.
13610 * decl.c (grokdeclarator): Remove code for handling access decls.
13611 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
13612 as access decls for now.
13613 (finish_struct): Don't check USING_DECLs for other uses of the name.
13614
13615 * search.c (get_matching_virtual): Use cp_error_at.
13616
13617 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13618
13619 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
13620 match c-typeck.c.
13621 (self_promoting_args_p): Move the check that TYPE is non-nil
13622 before trying to look at its main variant.
13623 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
13624
13625 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
13626 Delete macros.
13627 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
13628 (do_friend): Delete call to xref_friend.
13629 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
13630
13631 * typeck.c (convert_sequence): #if 0 unused function.
13632
13633 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
13634 be in decl_in_memory_p.
13635 (decl_in_memory_p): Delete decl.
13636 * expr.c (decl_in_memory_p): Delete fn.
13637 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
13638
13639 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
13640
13641 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
13642
13643 * class.c (finish_struct_1): Check for a pure-specifier on a
13644 non-virtual function here.
13645
13646 * decl2.c (grok_function_init): Don't check whether the function
13647 is virtual here.
13648 (grokfield): Don't call check_for_override here.
13649
13650 * decl.c (push_to_top_level): Start from inner_binding_level,
13651 check class_shadowed in class levels.
13652
13653 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
13654
13655 * decl.c (resume_level): Ignore things that don't have names, instead
13656 of core dumping.
13657
13658 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13659
13660 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
13661
13662 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
13663
13664 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
13665 synthesized dtor.
13666
13667 * parse.y (complete_type_name): Bind global_scope earlier.
13668 (complex_type_name): Likewise.
13669 (qualified_type_name): Remove.
13670
13671 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
13672
13673 * decl.c (grokfndecl): Move code that looks for virtuals in base
13674 classes...
13675 * class.c (check_for_override): ... to a new function.
13676 (finish_struct_1): Call it.
13677
13678 * cp-tree.h: Declare warn_sign_compare.
13679
13680 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
13681 rather than extra_warnings to decide whether to warn about
13682 comparison of signed and unsigned.
13683
13684 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
13685 implies -Wsign-compare. -Wall doesn't imply -W.
13686
13687 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
13688
13689 * typeck.c (build_component_ref): Fix to handle anon unions in base
13690 classes as well.
13691
13692 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13693
13694 * class.c (resolves_to_fixed_type_p): Delete code dealing with
13695 a WITH_CLEANUP_EXPR, since we don't generate them any more.
13696 * cvt.c (build_up_reference): Likewise.
13697 * decl.c (grok_reference_init): Likewise.
13698 (cp_finish_decl): Likewise.
13699 * error.c (dump_expr): Likewise.
13700 * tree.c (real_lvalue_p): Likewise.
13701 (lvalue_p): Likewise.
13702 (build_cplus_new): Likewise.
13703 (unsave_expr_now): Likewise.
13704 * typeck.c (unary_complex_lvalue, build_modify_expr,
13705 c_expand_return): Likewise.
13706
13707 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13708
13709 Make the C++ front-end pay attention to attributes for structures.
13710 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
13711 finish_struct_1.
13712 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
13713 Take out old round_up_size use and setting the DECL_ALIGN possibly
13714 using it. Take out setting of TYPE_ALIGN to round_up_size, which
13715 can override what the attribute set.
13716 * cp-tree.h (finish_struct): Update prototype.
13717 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
13718 attributes to finish_struct.
13719 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
13720 value down into finish_struct.
13721 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
13722
13723 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
13724
13725 * decl.c (poplevel): Re-word dead for local handling.
13726 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
13727 (cp_finish_decl): If is_for_scope, check for duplicates so
13728 we can disable is_for_scope. Otherwise, preserve_temp_slots.
13729
13730 * lex.c (do_identifier): Use global binding in preference of
13731 dead for local variable.
13732
13733 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
13734
13735 * init.c (initializing_context): Handle anon union changes, the
13736 context where fields of anon unions can be initialized now has to be
13737 found by walking up the TYPE_CONTEXT chain.
13738
13739 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
13740
13741 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
13742 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
13743 (obscure_complex_init): If bss is supported, always set
13744 DECL_INITIAL to error_mark_node.
13745
13746 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13747
13748 * init.c (is_friend): Make sure there's a context before we see if
13749 it's an aggr type.
13750
13751 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
13752
13753 * init.c (is_friend): Classes are not friendly with nested classes.
13754
13755 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
13756
13757 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
13758 and record its result.
13759
13760 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
13761
13762 * class.c (finish_struct_anon): Switch around code to not move anon
13763 union elements around, nor mess up their contexts, nor offsets,
13764 instead we now build up the right number of COMPONENT_REFs for all
13765 the anon unions that may be present at build_component_ref time.
13766 * typeck.c (lookup_anon_field): New routine to handle field lookup
13767 on fields without names. We find them, based upon their unique type
13768 instead.
13769 * typeck.c (build_component_ref): Allow FIELD_DECL components.
13770 Handle finding components in anonymous unions, and ensure that a
13771 COMPONENT_REF is built for each level as necessary.
13772
13773 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
13774
13775 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
13776 code that ensures that copy ctors are used if appropriate.
13777
13778 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13779
13780 * init.c (build_vec_delete): Only give an error if base isn't an
13781 error_mark_node.
13782
13783 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
13784
13785 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
13786 (yylex): If we see `new', keep slurping.
13787
13788 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
13789
13790 * class.c (finish_struct_1): Move code for handling anon unions...
13791 (finish_struct_anon): to here. Fixup so that we do the offset
13792 calculations right, and so that the fields are physically moved to
13793 the containers's chain.
13794
13795 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13796
13797 * decl.c (grokdeclarator): Avoid trying to get an operand off an
13798 identifier node.
13799
13800 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
13801
13802 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
13803 POINTER_SIZE to agree with expr.c.
13804
13805 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
13806
13807 * search.c (lookup_field): Don't report ambiguities if protect is 0,
13808 instead return NULL_TREE.
13809
13810 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
13811
13812 * class.c (finish_struct_1): Call warn_hidden if we want warnings
13813 about overloaded virtual functions.
13814 (warn_hidden): New routine to warn of virtual functions that are
13815 hidden by other virtual functions, that are not overridden.
13816 (get_basefndecls): New routine, used by warn_hidden.
13817 (mark_overriders): New routine, used by warn_hidden.
13818 * search.c (get_matching_virtual): Remove old warning that just
13819 isn't very useful.
13820
13821 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13822
13823 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
13824
13825 * typeck.c (null_ptr_cst_p): Delete unused fn.
13826 (build_function_call_maybe): Delete unused fn.
13827
13828 * expr.c (extract_init): #if 0 the code after unconditional return 0
13829 for now.
13830
13831 Delete old cadillac code.
13832 * edsel.c: Remove file.
13833 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
13834 * Makefile.in (CXX_OBJS): Delete edsel.o.
13835 (edsel.o): Delete rule.
13836 * cp-tree.h (flag_cadillac): Delete var decl.
13837 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
13838 * decl2.c (flag_cadillac): Delete var definition.
13839 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
13840 (grokfield): Delete code depending on flag_cadillac.
13841 (finish_anon_union): Likewise.
13842 * class.c (finish_struct_1): Likewise.
13843 (pushclass): Likewise.
13844 (popclass): Likewise.
13845 (push_lang_context): Likewise.
13846 (pop_lang_context): Likewise.
13847 * decl.c (init_decl_processing): Likewise.
13848 (start_decl): Likewise.
13849 (cp_finish_decl): Likewise.
13850 (xref_tag): Likewise.
13851 (finish_enum): Likewise.
13852 (start_function): Likewise.
13853 (finish_function): Likewise.
13854 (finish_stmt): Likewise.
13855 * lex.c (lang_init): Likewise.
13856 (check_newline): Likewise.
13857
13858 * lex.c (do_pending_inlines): Delete synthesized method kludge.
13859
13860 Delete defunct, ancient garbage collection implementation.
13861 * rtti.c: New file with the RTTI stuff from gc.c.
13862 * gc.c: Removed file (moved the remaining stuff into rtti.c).
13863 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
13864 (rtti.o): New rule, replacing gc.o.
13865 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
13866 * cp-tree.h: Delete gc-related fn decls.
13867 (DECL_GC_OFFSET): Delete macro.
13868 (flag_gc): Delete extern decl.
13869 * decl.c (current_function_obstack_index): Delete var decl.
13870 (current_function_obstack_usage): Delete var decl.
13871 (start_function): Delete clearing of current_function_obstack_index
13872 and current_function_obstack_usage.
13873 (init_decl_processing): Delete code relying on -fgc.
13874 Delete call to init_gc_processing.
13875 (cp_finish_decl): Delete calls to build_static_gc_entry and
13876 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
13877 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
13878 and to expand_expr of a __gc_main call.
13879 (maybe_gc_cleanup): Delete var decl.
13880 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
13881 * decl2.c (flag_gc): Delete var decl.
13882 (lang_f_options): Delete offering of -fgc.
13883 (lang_decode_option): Delete -fgc and -fno-gc handling.
13884 (get_temp_regvar): Delete gc code.
13885 * init.c (build_new): Delete gc code.
13886 * lex.c (init_lex): Delete checking of flag_gc.
13887
13888 * typeck.c (convert_arguments): Delete gc code.
13889 (build_component_addr): Delete -fgc warning.
13890 (build_modify_expr): Delete gc code.
13891
13892 * decl2.c (build_push_scope): Delete fn.
13893 * cp-tree.h (build_push_scope): Delete decl.
13894
13895 * search.c (clear_search_slots): Delete fn.
13896 * cp-tree.h (clear_search_slots): Delete decl.
13897
13898 * search.c (tree_needs_constructor_p): Delete fn.
13899 * cp-tree.h (tree_needs_constructor_p): Delete decl.
13900
13901 * tree.c (id_cmp): Delete fn.
13902
13903 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
13904 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
13905
13906 * tree.c (decl_value_member): Delete fn.
13907 * cp-tree.h (decl_value_member): Delete decl.
13908
13909 * tree.c (list_hash_lookup_or_cons): Delete fn.
13910 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
13911
13912 * method.c (cplus_exception_name): Delete fn.
13913 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
13914
13915 * spew.c (shift_tokens): Delete fn.
13916
13917 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13918
13919 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
13920 to cp_finish_decl.
13921 * parse.y: Likewise.
13922
13923 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13924
13925 * tree.c (build_cplus_staticfn_type): Delete function definition;
13926 never used.
13927 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
13928
13929 * tree.c (virtual_member): Delete function definition; never used.
13930 * cp-tree.h (virtual_member): Delete decl.
13931
13932 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
13933
13934 * typeck.c (build_component_ref): Handle getting vbase pointers
13935 out of complex multiple inheritance better.
13936
13937 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
13938
13939 * typeck.c (build_object_ref): Make sure we use the real type, not
13940 any reference type.
13941
13942 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
13943
13944 * tree.c (build_exception_variant): Don't create new types if we
13945 don't have to, also build new types on the right obstack.
13946
13947 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13948
13949 * decl.c (store_bindings): Split out from push_to_top_level.
13950 (push_to_top_level): Call it for b->type_shadowed on class binding
13951 levels.
13952
13953 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
13954
13955 * search.c (expand_upcast_fixups): Fix so that offsets stored in
13956 vbase_offsets are always right. Fixes a problem where virtual base
13957 upcasting and downcasting could be wrong during conversions on this
13958 during virtual function dispatch at ctor/dtor time when dynamic
13959 vtable fixups for deltas are needed. This only sounds easier than
13960 it is. :-)
13961 (fixup_virtual_upcast_offsets): Change to reflect new calling
13962 convention for expand_upcast_fixups.
13963
13964 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13965
13966 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
13967 check that it's usable as the bitfield width.
13968
13969 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13970
13971 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
13972 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
13973 only ever used for functions in it.
13974
13975 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13976
13977 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
13978 (nested_type): Likewise.
13979 (nested_name_specifier): Use lastiddecl.
13980
13981 * decl.c (grokdeclarator): Adjust accordingly.
13982 * init.c (expand_member_init): Likewise.
13983 * parse.y (base_class): Likewise.
13984 * typeck2.c (build_functional_cast): Likewise.
13985
13986 * typeck2.c (build_functional_cast): Fill in name after we've
13987 checked for non-aggr type.
13988
13989 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
13990
13991 * decl2.c (warn_pointer_arith): Default to on.
13992
13993 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13994
13995 * lex.c (is_rid): New function.
13996 * decl.c (grokdeclarator): Diagnose reserved words used as
13997 declarator-ids.
13998
13999 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14000
14001 * tree.c (get_decl_list): Don't lose cv-quals.
14002
14003 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
14004 typespecs used as declarator-ids.
14005
14006 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
14007
14008 * decl.c (poplevel): When poping a level, don't give a warning for
14009 any subblocks that already exist.
14010
14011 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14012
14013 * typeck.c (build_object_ref): Finish what I started.
14014
14015 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
14016
14017 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
14018
14019 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
14020 scope.
14021
14022 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14023
14024 * decl.c (xref_tag): Handle passing a type in directly.
14025
14026 * parse.y (qualified_type_name): Pull out the type.
14027 (nested_type): Likewise.
14028 Take types directly instead of as identifiers.
14029 * call.c (build_scoped_method_call): Take types directly instead of
14030 as identifiers.
14031 * decl.c (xref_basetypes): Likewise.
14032 * init.c (expand_member_init): Likewise.
14033 (build_member_call): Likewise.
14034 (build_offset_ref): Likewise.
14035 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
14036 * method.c (do_build_assign_ref): Likewise.
14037 * decl.c (grokdeclarator): Handle a type appearing as the
14038 declarator-id for constructors.
14039 * method.c (do_build_copy_constructor): current_base_init_list now
14040 uses the types directly, not their names.
14041 * init.c (sort_base_init): Likewise.
14042 (expand_member_init): Likewise.
14043 * init.c (is_aggr_type): New function, like is_aggr_typedef.
14044
14045 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
14046
14047 * tree.c (layout_basetypes): Call build_lang_field_decl instead
14048 of build_lang_decl if first arg is a FIELD_DECL.
14049
14050 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14051
14052 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
14053 non-empty.
14054 * except.c (expand_start_catch_block): Set TREE_USED to avoid
14055 warnings about the catch handler.
14056
14057 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
14058
14059 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
14060 expand_target_expr.
14061
14062 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14063
14064 Fix access control to use trees rather than integers.
14065 * class.c (access_{default, public, protected, private,
14066 default_virtual, public_virtual, private_virtual}_node): Add
14067 definitions.
14068 (init_class_processing): Do creation of those nodes.
14069 * cp-tree.h (access_type): Delete enum decl.
14070 (access_{default, public, protected, private, default_virtual,
14071 public_virtual, private_virtual}_node): Add decls.
14072 (compute_access): Change return type.
14073 * search.c (compute_access): Have tree return type, instead of enum.
14074 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
14075 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
14076 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
14077 * parse.y (VISSPEC): Make ttype rather than itype.
14078 (base_class_access_list): Likewise.
14079 * *.[cy]: Change all refs of `access_public' to `access_public_node',
14080 etc.
14081 * call.c (build_method_call): Make ACCESS be a tree.
14082 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
14083 * cvt.c (convert_to_aggr): Likewise.
14084 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
14085 Likewise.
14086 * method.c (hack_identifier): Likewise.
14087 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
14088
14089 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
14090
14091 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
14092 frontend, and make it more consistent with respect to
14093 warn_pointer_arith.
14094
14095 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14096
14097 * decl.c (pushdecl): Check for duplicate parameter names.
14098
14099 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
14100
14101 * decl.c (expand_static_init): Call assemble_external for atexit.
14102
14103 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
14104
14105 * except.c (do_unwind): Remove some generated dead code.
14106 (eh_outer_context): New routine, factor out some common code from
14107 expand_builtin_throw and end_eh_unwinder. Add code to do return
14108 address masking for the PA.
14109 (expand_builtin_throw): Use eh_outer_context instead of open coding
14110 it here.
14111 (end_eh_unwinder): Likewise.
14112
14113 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
14114
14115 * except.c (expand_throw): Call assemble_external for __empty, if we
14116 use it.
14117
14118 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
14119
14120 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
14121 NORMAL_RETURN_ADDR_OFFSET.
14122 (end_eh_unwinder): Likewise.
14123
14124 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
14125
14126 * gc.c (build_dynamic_cast): Make sure we don't cast away const
14127 when dealing with references, and make sure we handle dynamic
14128 casting to a cv qualified reference.
14129
14130 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
14131
14132 * except.c (struct eh_context): New structure top hold eh context
14133 information.
14134 (push_eh_context): New routine.
14135 (pop_eh_context): Likewise.
14136 * decl.c (push_cp_function_context): Use them.
14137 (pop_cp_function_context): Likewise.
14138
14139 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
14140
14141 * decl2.c (finish_file): Also prune uninteresting functions in the
14142 inline emission loop.
14143
14144 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
14145
14146 * sig.c (build_signature_table_constructor): Mark functions
14147 in the signature as referenced.
14148
14149 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
14150
14151 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
14152 the inline emission stuff.
14153
14154 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
14155
14156 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
14157 weak symbols.
14158 * lang-options.h: Add -f{no-,}weak.
14159 * decl.c (init_decl_processing): If the target does not support weak
14160 symbols, don't use them.
14161 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
14162
14163 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
14164
14165 * init.c (expand_member_init): warning for base init after members.
14166
14167 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
14168
14169 * cvt.c (build_expr_type_conversion): Don't convert to a reference
14170 type.
14171
14172 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
14173
14174 * method.c (report_type_mismatch): Improve wording for volatile
14175 mismatches.
14176
14177 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
14178
14179 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
14180 expand_assignment, as the later doesn't handle things that have
14181 copy constructors well. The compiler would do bitwise copying,
14182 instead of ctor calling in some cases.
14183
14184 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
14185
14186 * g++.c (my_strerror): Return "cannot access" if errno is 0.
14187 (pfatal_with_name, perror_exec): Don't assume that
14188 the returned value from my_strerror contains no '%'s.
14189 (concat): Remove.
14190 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
14191
14192 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
14193
14194 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
14195 TYPE_METHODS/TREE_CHAIN mean what they used to.
14196 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
14197 instead of TYPE_METHODS.
14198 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
14199 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
14200 * cp-tree.h (CLASSTYPE_METHODS): Lose.
14201 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
14202 TYPE_METHODS.
14203 (struct lang_decl): Lose next_method field.
14204 (DECL_NEXT_METHOD): Lose.
14205 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
14206 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
14207 anymore.
14208 (finish_struct_methods): Don't mess with the TREE_CHAINs in
14209 fn_fields.
14210
14211 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
14212 vector.
14213
14214 * call.c (build_method_call): Synthesize here even when not inlining.
14215 * typeck.c (build_function_call_real): Likewise.
14216
14217 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
14218
14219 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
14220 == DBX_DEBUG, call dbxout_start_new_source_file and
14221 dbxout_resume_previous_source_file when appropriate.
14222
14223 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
14224
14225 * except.c (start_anon_func): Push to the top level.
14226 (end_anon_func): Pop from the top level.
14227
14228 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
14229
14230 * cp-tree.h (build_cleanup): New routine to build cleanups.
14231 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
14232 call at ctor time and use atexit to run it later.
14233 * decl2.c (build_cleanup): New routine, taken from finish_file.
14234 (finish_file): Use build_cleanup instead, and don't put function
14235 local statics in global dtor list.
14236
14237 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
14238
14239 * except.c (expand_throw): Ensure that we have cleanups, if we try
14240 and expand cleanups.
14241
14242 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
14243
14244 * except.c (expand_throw): Add logic to manage dynamic cleanups for
14245 the EH object.
14246 (expand_end_catch_block): Use the magic of expand_goto, instead of
14247 emit_jump so that we get the cleanup for any catch clause parameter
14248 and the cleanup for the exception object. Update to reflect label
14249 changes.
14250 (push_eh_cleanup): New routine to register a cleanup for an
14251 exception object.
14252 (empty_fndecl): Used to default cleanup actions to
14253 nothing.
14254 (init_exception_processing): Setup empty_fndecl. Setup
14255 saved_cleanup.
14256 (expand_start_catch_block): Update to reflect label changes. Call
14257 push_eh_object to register the cleanup for the EH object.
14258 (start_anon_func): New routine to start building lambda expressions
14259 from trees.
14260 (end_anon_func): New routine to end them.
14261 (struct labelNode): Change so that we can use tree labels, or rtx
14262 labels.
14263 (saved_cleanup): Object to check for dynamic cleanups for the
14264 exception handling object.
14265 (push_label_entry): Change so that we can use tree labels, or rtx
14266 labels.
14267 (pop_label_entry): Likewise.
14268 (top_label_entry): Likewise.
14269 (expand_start_all_catch): Use tree label instead of rtx label, so
14270 that we can get the magic of expand_goto.
14271 (expand_end_all_catch): Update to reflect label changes.
14272
14273 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
14274 use UNSAVE_EXPRs.
14275 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
14276 building_cleanup logic, as we now use UNSAVE_EXPRs.
14277 * cp-tree.h (unsave_expr): Declare it.
14278 * decl.c (building_cleanup): Remove.
14279 (maybe_build_cleanup): Remove building_cleanup logic, and use
14280 UNSAVE_EXPR instead.
14281
14282 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
14283
14284 * gc.c (build_t_desc): Update error message to say <typeinfo>.
14285
14286 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14287
14288 * decl.c (pushdecl): Only warn about shadowing a local variable if
14289 warn_shadow is true.
14290
14291 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
14292
14293 * typeck.c (build_binary_op_nodefault): Added warning about
14294 comparisons between different enum types with -Wall, unless
14295 -fenum-int-equiv set.
14296
14297 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
14298
14299 * class.c (finish_struct_1): Skip down to the inner type in
14300 multidimensional arrays. Ensures ctors will be made for types that
14301 need constructing.
14302
14303 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
14304
14305 * decl.c (last_dtor_insn): New to track the last compiler generated
14306 insn in a dtor.
14307 (store_parm_decls): Set it.
14308 (finish_function): Use it to see if the dtor is empty. Avoid doing
14309 vtable setup all the time, if we can.
14310 (struct cp_function): Add last_dtor_insn.
14311 (push_cp_function_context): Save it.
14312 (pop_cp_function_context): Restore it.
14313
14314 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
14315
14316 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
14317 warnings.
14318
14319 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
14320
14321 * typeck.c (expand_target_expr): Make sure targets get put into the
14322 current temp_slot_level, so that the free_temp_slots call will reuse
14323 them.
14324
14325 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
14326
14327 * class.c (finish_struct_1): Delay delta fixups for virtual bases
14328 until after we have done the hard virtuals, to avoid a bogus `every
14329 virtual function must have a unique final overrider' for virtual
14330 functions that are only overridden by hard virtuals.
14331
14332 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
14333
14334 * pt.c (do_function_instantiation): Don't try to find a file-scope
14335 template for a member function.
14336
14337 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
14338
14339 * g++.c (main): Add handling of -nodefaultlibs.
14340
14341 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
14342
14343 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
14344 distinguish between direct bindings of reference variables, and
14345 indirect bindings of reference variables.
14346 * cvt.c (build_up_reference): Use it.
14347 * typeck.c (convert_arguments): Use it to indicate this is an
14348 indirect binding.
14349 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
14350 as they are unused.
14351 (expand_static_init): Likewise.
14352 (cplus_expand_expr_stmt): Likewise.
14353 * decl2.c (finish_file): Likewise.
14354 * init.c (perform_member_init): Likewise.
14355 (emit_base_init): Likewise.
14356 (expand_aggr_vbase_init_1): Likewise.
14357
14358 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14359
14360 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
14361 get a DECL_LANG_SPECIFIC node.
14362 * cp-tree.h (lang_decl_flags): Add new member `level'.
14363 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
14364 decl_flags level member.
14365
14366 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14367
14368 * call.c (build_method_call): Make sure instance has a
14369 TYPE_LANG_SPECIFIC node before we dive into it.
14370
14371 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
14372
14373 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
14374
14375 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
14376
14377 * decl.c (duplicate_decls): When smashing decls, smash staticness in
14378 the usual way.
14379
14380 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
14381
14382 * decl.c (poplevel): Handle the merging of subblocks of cleanups
14383 when finishing blocks that have already been created (usually due to
14384 the fixup goto code). Fixes bad debugging information.
14385
14386 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
14387
14388 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
14389 that's not a list of overloaded functions.
14390
14391 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14392
14393 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
14394 before trying to use DECL_ABSTRACT_VIRTUAL_P.
14395
14396 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
14397
14398 * decl2.c (mark_used): New function for hooking into setting of
14399 TREE_USED on decls.
14400 * call.c (build_method_call): Use it.
14401 * class.c (instantiate_type): Likewise.
14402 * init.c (build_offset_ref): Likewise. Don't call assemble_external
14403 for all like-named functions.
14404 * method.c (hack_identifier): Likewise.
14405 (emit_thunk): Don't call assemble_external.
14406 (make_thunk): Create thunk as a FUNCTION_DECL so that it
14407 gets the right mode and ENCODE_SECTION_INFO works.
14408
14409 * parse.y: Use mark_used. Pass operator names to do_identifier.
14410 * lex.c (do_identifier): Handle operator names.
14411
14412 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
14413
14414 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14415
14416 * errfn.c: Include stdio.h.
14417 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
14418
14419 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
14420
14421 * typeck2.c (digest_init): Always convert initializers to the
14422 right type.
14423
14424 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
14425
14426 * init.c (member_init_ok_or_else): Don't allow member initializers
14427 for indirect members, as it is invalid.
14428
14429 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14430
14431 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
14432
14433 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
14434
14435 * parse.y (for.init.statement): Catch compound statements inside for
14436 initializations, if we're being pedantic.
14437
14438 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
14439
14440 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
14441 looking for.
14442
14443 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
14444
14445 * error.c (dump_expr): Don't core dump when a boolean expression is
14446 used as a default argument.
14447
14448 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
14449
14450 * class.c (finish_struct_bits): Check aggregate_value_p instead of
14451 RETURN_IN_MEMORY.
14452
14453 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
14454
14455 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
14456 BLKmode type that would otherwise be returned in registers.
14457
14458 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14459
14460 * g++.c (WITHLIBC): New macro.
14461 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
14462 saw_libc and pass it at the end if it was set.
14463
14464 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14465
14466 * parse.y (fn.def1): Call split_specs_attrs in
14467 declmods notype_declarator case.
This page took 0.556347 seconds and 6 git commands to generate.