]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
[gcc.git] / gcc / cp / ChangeLog
1 1999-03-22 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4 Document internals of pointer-to-member-functions.
5 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6 (PFN_FROM_PTRMEMFUNC): Similarly.
7 (build_type_conversion): Remove unused parameter.
8 (build_ptrmemfunc1): Declare.
9 (expand_ptrmemfunc_cst): New function.
10 (delta2_from_ptrmemfunc): Likewise.
11 (pfn_from_ptrmemfunc): Likewise.
12 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
13 build_type_conversion. Use TYPE_PTRMEM_P for readability.
14 (convert_to_reference): Remove unused parameter to
15 build_type_conversion.
16 (ocp_convert): Likewise.
17 (build_user_type_conversion): Likewise.
18 * error.c (dump_expr): Handle NULL pointer-to-member functions.
19 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
20 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
21 open when handling pointer-to-member functions.
22 * pt.c (convert_nontype_argument): Clean up error messages. Be
23 more stringent with pointers-to-members.
24 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
25 (build_unary_op): Tidy ever-so-slightly.
26 (build_conditional_expr): Remove extra parameter to
27 build_type_conversion.
28 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
29 we're using.
30 (expand_ptrmemfunc_cst): Define.
31 (delta2_from_ptrmemfunc): Likewise.
32 (pfn_from_ptrmemfunc): Likewise.
33
34 1999-03-19 Mark Mitchell <mark@codesourcery.com>
35
36 * init.c (build_member_call): Handle template-id expressions
37 correctly.
38 * typeck.c (build_x_function_call): Likewise.
39
40 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
41
42 * friend.c (make_friend_class): Avoid core dump when
43 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
44
45 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
46
47 * decl.c (start_function): Suppress normal linkage heuristics
48 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
49
50 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
51
52 * Make-lang.in: ($(INTL_TARGETS)): depend on cp/parse.c
53 ($(srcdir)/cp/parse.c): moved from ../Makefile.in
54
55 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
56
57 * parse.y (named_complex_class_head_sans_basetype):
58 Do not push a scope for error_mark_node.
59 (maybe_base_class_list): Likewise.
60
61 * decl.c (start_decl): Check for error_mark_node as a type.
62 Detected by g++.brendan/array-refs.C.
63 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
64 (maybe_build_cleanup_1): Likewise. Detected by
65 g++.jason/incomplete1.C.
66
67 * tree.c (build_dummy_object): Use void_zero_node instead of the
68 error_mark_node
69 (is_dummy_object): Check for such a node.
70 Detected by g++.bob/inherit1.C
71
72 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
73
74 * method.c (old_backref_index): Split out...
75 (flush_repeats): From here. Rename back from try_old_backref.
76 (build_mangled_name): Put back some old-style repeat handling.
77
78 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
79
80 * lex.c: Don't include setjmp.h.
81 (parse_float): New static function.
82 (pf_args): New struct.
83 (real_yylex): Use them in call to `do_float_handler'.
84
85 1999-03-15 Mark Mitchell <mark@markmitchell.com>
86
87 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
88 * tree.c (layout_basetypes): Not here.
89 * search.c (dfs_search): Remove; no longer used.
90
91 1999-03-12 Mark Mitchell <mark@markmitchell.com>
92
93 * decl2.c (validate_nonmember_using_decl): Issue sensible
94 error-messages on bogus qualifiers.
95
96 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
97
98 * call.c (add_function_candidate): Fix uninitialized variable.
99
100 * Makefile.in (search.o): Add dependency on varray.h.
101
102 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
103
104 * decl.c (duplicate_decls): Use same_type_p.
105 * method.c (try_old_backref): Renamed from flush_repeats. Use
106 same_type_p. Don't try to handle repeats. Return success.
107 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
108 calls from old-style code, too.
109 (check_ktype): Use same_type_p.
110 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
111 (build_qualified_name): Simplify logic.
112 (process_overload_item): Strip typedefs and quals at the top.
113 (build_mangled_name_for_type_with_Gcode): Remove call to
114 type_canonical_variant.
115 (build_mangled_name): Likewise. Remove support for old-style
116 repeats, which have been disabled since 2.7.2. Don't mess with
117 TREE_USED.
118 (build_decl_overload_real): Don't mess with TREE_USED.
119
120 1999-03-13 Nathan Sidwell <nathan@acm.org>
121
122 * error.c (cp_printers): Add 'F' escape character.
123 (dump_type_real): Remove TREE_LIST (fnargs) printing.
124 Functionality moved to dump_parameters.
125 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
126 (dump_function_decl): Extend meaning of V parameter. Use
127 dump_parameters and dump_exception_spec.
128 (dump_parameters): New static function.
129 (dump_exception_spec): New static function.
130 (fndecl_as_string): Change argument semantics. Use
131 dump_function_decl directly.
132
133 * sig.c (build_signature_table_constructor): Use cp_error.
134
135 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
136
137 * semantics.c (finish_switch_cond): Handle error cases gracefully.
138 Detected by g++.law/enum5.C
139
140 * typeck.c (build_modify_expr): Check for errors after resolving
141 offsets. Detected by g++.brendan/static1.C
142
143 * decl.c (complete_array_type): Ignore initial_value if it is an
144 error. Detected by g++.benjamin/17930.C
145
146 * typeck2.c (process_init_constructor): Return error if one argument
147 is in error. Detected by g++.benjamin/13478.C
148
149 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
150
151 * decl.c (select_decl): Allow class templates when we need types.
152 * decl2.c (ambiguous_decl): Likewise.
153
154 1999-03-12 Mark Mitchell <mark@markmitchell.com>
155
156 * lex.c (do_identifier): Correct call to enforce_access.
157 * search.c (accessible_p): Tweak comment.
158
159 1999-03-10 Mark Mitchell <mark@markmitchell.com>
160
161 * semantics.c (begin_class_definition): Call build_self_reference.
162 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
163
164 * search.c (assert_canonical_unmarked): Fix typo in prototype.
165
166 * search.c (dfs_canonical_queue): New function.
167 (dfs_assert_unmarked_p): Likewise.
168 (assert_canonical_unmarked): Likewise.
169 (access_in_type): Use it.
170 (accessible_p): Likewise. Walk the whole tree when umarking.
171
172 * sig.c (build_signature_table_constructor): Use accessible_p
173 instead of compute_access.
174
175 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
176
177 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
178
179 1999-03-09 Mark Mitchell <mark@markmitchell.com>
180
181 * cp-tree.h (flag_access_control): Declare.
182 (TREE_VIA_PPUBLIC): Document.
183 (DECL_NONSTATIC_MEMBER_P): New macro.
184 (enforce_access): Return an indication of whether or not access
185 was permitted.
186 (build_self_reference): Change prototype.
187 (compute_access): Replace with ...
188 (accessible_p): New function.
189 (dfs_walk): Change prototype.
190 (dfs_unmark): Likewise.
191 (markedp): Likewise.
192 * call.c (enforce_access): Use accessible_p.
193 * class.c (build_self_reference): Insert the declaration into the
194 list of members for this type, and make it public.
195 * decl.c (xref_basetypes): Avoid ill-timed recursion.
196 * init.c (build_offset_ref): Use lookup_member, not three separate
197 name-lookups. Call enforce_access rather than checking for
198 illegal accesses here.
199 (resolve_offset_ref): Likewise.
200 * lex.c (do_identifier): Likewise.
201 * method.c (hack_identifier): Likewise.
202 * parse.y (self_reference): Remove.
203 (opt_component_decl_list): Don't use it.
204 * parse.c: Regenerated.
205 * pt.c (print_candidates): Generalize to handle lists of
206 overloaded functions.
207 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
208 not set.
209 (get_template_base): Use new calling convention for dfs_walk.
210 * search.c: Include varray.h. Add prototypes.
211 (dfs_walk): Accept a data pointer to pass to the work functions.
212 All callers changed. All work functions changed.
213 (breadth_first_search): Rename to bfs_walk, and make consistent
214 with dfs_walk.
215 (dfs_walk_real): New function.
216 (canonical_binfo): New function.
217 (context_for_name_lookup): Likewise.
218 (shared_marked_p): Likewise.
219 (shared_unmarked_p): Likewise.
220 (lokup_field_queue_p): Likewise.
221 (lookup_field_r): Generalize to handle both functions and fields.
222 (lookup_field): Just call lookup_member.
223 (lookup_fnfields): Likewise.
224 (lookup_member): Move body of lookup_field here and generalize.
225 (dfs_accessible_queue_p): Likewise.
226 (dfs_accessible_p): Likewise.
227 (dfs_access_in_type): Likewise.
228 (access_in_type): Likewise.
229 (compute_access): Remove, and replace with ...
230 (accessible_p): New function.
231 (vbase_types): Remove.
232 (vbase_decl_ptr_intermediate): Likewise.
233 (vbase_decl_ptr): Likewise.
234 (vbase_init_result): Likewise.
235 (closed_envelopes): Likewise.
236 (bvtable): Likewise.
237
238 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
239
240 * call.c (add_function_candidate): Check for proper number of args
241 before checking the validity of those args.
242
243 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
244
245 * cp-tree.h (struct lang_type): Add anon_union field.
246 (ANON_UNION_TYPE_P): Use it instead of examining type.
247 (SET_ANON_UNION_TYPE_P): New macro.
248 * decl.c (check_tag_decl): Use it.
249
250 * search.c (compute_access): Handle non-type contexts earlier, and
251 handle NULL_TREE.
252
253 * tree.c (build_exception_variant): Use copy_to_permanent.
254
255 * decl2.c (setup_initp): Give statics with no priority the default
256 priority here.
257 (do_dtors, do_ctors, finish_file): Remove special handling of
258 non-prioritized statics.
259
260 1999-03-05 Mark Mitchell <mark@markmitchell.com>
261
262 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
263 * decl.c (make_typename_type): Don't issue an error if an
264 immediate lookup fails; it migt be resolved later.
265 * friend.c (is_friend): Add comment.
266 * search.c (breadth_first_search): Add POSTFN and DATA
267 parameters. Tidy. All callers changed.
268 (lookup_field_queue_p): New function.
269 (lookup_field_r): Likewise.
270 (lookup_field_post): Likewise.
271 (lookup_field): Use them, via breadth_first_search, instead of
272 duplicating logic.
273 (compute_access): Robustify.
274 (lookup_fnfield_info): New structure.
275
276 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
277
278 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
279
280 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
281
282 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
283 cc happy.
284
285 * decl2.c (import_export_class): Also return if
286 CLASSTYPE_INTERFACE_ONLY is set.
287
288 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
289
290 * decl.c (push_overloaded_decl): Only overwrite the old binding if
291 there was one.
292 * decl2.c (do_local_using_decl): Fix loop termination.
293
294 1999-03-02 Mark Mitchell <mark@markmitchell.com>
295
296 * cp-tree.h (determine_specialization): Don't declare.
297 * pt.c (determine_specialization): Make it static. Eliminate
298 complain parameter. Note that decl is always non-NULL now, and
299 simplify accordingly.
300
301 * decl.c (maybe_push_to_top_level): Always call
302 push_cp_function_context.
303 (pop_from_top_level): Always call pop_cp_function_context.
304
305 1999-02-26 Nathan Sidwell <nathan@acm.org>
306
307 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
308 diagnostics.
309 cp-tree.h (complete_type_or_else): Added VALUE parameter.
310 * init.c (build_new_1): Extra arg to complete_type_or_else.
311 (build_delete): Likewise.
312 * typeck.c (require_complete_type): Likewise.
313 (pointer_int_sum): Likewise.
314 (pointer_diff): Likewise.
315 (build_component_ref): Likewise.
316
317 * typeck2.c (incomplete_type_error): Always use cp_error.
318 Show declaration of undefined type, if appropriate.
319 Deal with UNKNOWN_TYPE nodes.
320
321 * typeck.c (require_complete_type): Use TYPE_SIZE as
322 size_zero_node to mean incomplete type.
323 (require_complete_type_in_void): New function.
324 (build_compound_expr): Call complete_type_in_void for LHS.
325 (build_c_cast): Call complete_type_in_void for void cast.
326 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
327 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
328 require_complete_type_in_void. Call it.
329 * cp-tree.h (require_complete_type_in_void): Prototype new function.
330
331 * typeck.c (convert_arguments): Use alternative format for function
332 decls. Don't require_complete_type here. Simplify diagnostic printing.
333 (convert_for_initialization): Don't require_complete_type on RHS yet.
334 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
335
336 * call.c (build_over_call): Cope with qualified void return type.
337 * semantics.c (finish_call_expr): Likewise
338 * typeck.c (build_function_call_real): Likewise
339 (c_expand_return): Likewise
340 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
341
342 * call.c (print_z_candidates): Use alternate print format, to be
343 consistant with (pt.c) print_candidates.
344 method.c (hack_identifier): List candidate members.
345 search.c (lookup_field): Build ambiguous list, and show it, if
346 ambiguous.
347
348 1999-02-26 Mark Mitchell <mark@markmitchell.com>
349
350 * typeck.c (decay_conversion): Don't confuse constant array
351 variables with their intiailizers.
352
353 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
354 merging decls.
355 * pt.c (regenerate_decl_from_template): Tweak for clarity.
356 (instantiate_decl): Mark a decl instantiated before regenerating
357 it to avoid recursion.
358 * tree.c (mapcar): Don't call decl_constant_value unless we know
359 something is TREE_READONLY_DECL_P.
360
361 * class.c (check_for_override): Don't stop checking when we find
362 the first overridden function. Delete #if 0'd code.
363 * search.c (get_matching_virtual): Likewise.
364
365 1999-02-25 Richard Henderson <rth@cygnus.com>
366
367 * lang-specs.h: Define __FAST_MATH__ when appropriate.
368
369 1999-02-24 Mike Stump <mrs@wrs.com>
370
371 * typeck.c (convert_for_assignment): Allow boolean integral constant
372 expressions to convert to null pointer.
373
374 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
375
376 * decl.c (lookup_namespace_name): Resolve namespace aliases.
377
378 * class.c (push_nested_class): Allow namespaces.
379
380 * decl2.c (set_decl_namespace): Add friendp parameter.
381 * decl.c (grokfndecl): Pass it.
382 (grokvardecl): Likewise.
383 * cp-tree.h: Change declaration.
384
385 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
386
387 * pt.c (tsubst): Allow an array of explicit size zero.
388
389 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
390
391 * errfn.c: Change varargs code to look like toplev.c.
392
393 * method.c (process_modifiers): Don't prepend 'U' for char or
394 wchar_t.
395
396 1999-02-20 Craig Burley <craig@jcb-sc.com>
397
398 * Make-lang.in (cplib2.ready): Don't consider updating
399 cplib2 stuff if the current directory isn't writable, as
400 it won't work (such as during a `make install').
401
402 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
403
404 * decl2.c (start_objects): Make file scope constructors and
405 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
406 ASM_OUTPUT_DESTRUCTOR are defined.
407
408 1999-02-19 Mark Mitchell <mark@markmitchell.com>
409
410 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
411 (fn_type_unification): Adjust prototype.
412 (lookup_fnfields_1): Declare.
413 * call.c (add_template_candidate_real): Adjust call to
414 fn_type_unification.
415 * class.c (add_method): Don't allow duplicate declarations of
416 constructors or destructors.
417 (resolve_address_of_overloaded_function): Remove unused variable.
418 Adjust call to fn_type_unification.
419 * decl.c (grokfndecl): Be more robust in the face of illegal
420 specializations.
421 * decl2.c (check_classfn): Remove hokey handling of member
422 templates.
423 * pt.c (determine_specialization): Improve comments. Adjust to
424 handle template argument deduction as per the standard.
425 (check_explicit_specialization): Fix comment spacing. Handle
426 type-conversion operators correctly. Improve error-recovery.
427 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
428 (get_bindings_real): Simplify handling of static members.
429 * search.c (lookup_fnfields_1): Make it have external linkage.
430 * typeck.c (compparms): Fix comment.
431 (build_unary_op): Don't try to figure out which template
432 specialization is being referred to when when the address-of
433 operator is used with a template function.
434
435 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
436
437 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
438 keyword to match an analogous change at the top level.
439
440 * tree.c (lvalue_or_else): Likewise.
441
442 1999-02-17 Mark Mitchell <mark@markmitchell.com>
443
444 * decl.c (xref_basetypes): Comment.
445 * pt.c (instantiate_class_template): Use xref_basetypes.
446
447 1999-02-16 Mark Mitchell <mark@markmitchell.com>
448
449 * cp-tree.h (tsubst): Change prototype.
450 (tsubst_expr): Likewise.
451 (tsubst_copy): Likewise.
452 (type_unification): Remove prototype.
453 * call.c (convert_default_arg): Adjust call to tsubst_expr.
454 * class.c (resolve_address_of_overloaded_function): Just use
455 fn_type_unification.
456 * decl.c (grokdeclarator): Adjust call to tsubst.
457 * method.c (build_template_parm_names): Likewise.
458 * pt.c (GTB_VIA_VIRTUAL): New macro.
459 (GTB_IGNORE_TYPE): Likewise.
460 (resolve_overloaded_unification): Add `complain' parameter.
461 (try_one_overload): Likewise.
462 (tsubst_template_arg_vector): Likewise.
463 (tsubst_template_parms): Likewise.
464 (tsubst_aggr_type): Likewise.
465 (tsubst_arg_types): Likewise.
466 (tsubst_call_declarator_parms): Likewise.
467 (unify): Remove explicit_mask.
468 (type_unification_real): Likewise.
469 (get_template_base_recursive): Likewise.
470 (coerce_template_template_parms): Provide prototype.
471 (tsubst_function_type): Likewise.
472 (try_class_unification): New function.
473 All callers changed to use new complain parameter.
474 (get_template_base): Use try_class_unification.
475 (unify): Adjust handling of classes derived from template types.
476 (fn_type_unification): Substitute explicit arguments before
477 unification.
478
479 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
480
481 * decl.c (pushdecl): Remove dead code.
482
483 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
484
485 * decl2.c (finish_objects): Fix code I missed in previous change.
486
487 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
488
489 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
490 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
491
492 * pt.c (maybe_process_partial_specialization): Complain about
493 'template <>' on non-specialization.
494
495 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
496
497 * decl.c (grokdeclarator): Catch wierd declarators.
498 * decl2.c (finish_file): Don't abort because of namespace parsing
499 failure.
500 (check_decl_namespace): Remove.
501
502 1999-02-09 Mark Mitchell <mark@markmitchell.com>
503
504 * cp-tree.h (get_template_base): Don't declare.
505 (dfs_walk): Declare.
506 (dfs_unmark): Likewise.
507 (markedp): Likewise.
508 * pt.c (unify): Remove duplicate declaration. Pass tparms and
509 targs to get_template_base.
510 (get_template_base_recursive): Move here from search.c. Check to
511 see that the base found can be instantiated to form the desired
512 type.
513 (get_template_base): Likewise.
514 (get_class_bindings): Simplify.
515 * search.c (get_template_base_recursive): Move to pt.c.
516 (get_template_base): Likewise.
517 (markedp): Make it global.
518 (dfs_walk): Likewise.
519 (dfs_unmark): Likewise.
520
521 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
522
523 * pt.c (maybe_process_partial_specialization): Complain about
524 specialization in wrong namespace.
525 * tree.c (decl_namespace_context): New fn.
526
527 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
528
529 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
530 * pt.c (coerce_template_template_parms): Handle nested
531 template template parameters.
532
533 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
534
535 * typeck2.c: Update email addrsses.
536
537 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
538
539 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
540 turned off.
541
542 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
543
544 * lex.c (retrofit_lang_decl): Split out...
545 (build_lang_decl): From here.
546 * decl.c (pushdecl): Call it for functions generated by the middle
547 end that don't have DECL_LANG_SPECIFIC.
548 * cp-tree.h: Declare it.
549
550 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
551 (start_objects, finish_objects): Only use special
552 init_priority code if the user specified a priority.
553 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
554 objects.
555
556 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
557
558 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
559 mkstemp.o. Get them from libiberty now.
560 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
561
562 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
563
564 * decl2.c (lang_decode_option): Use read_integral_parameter.
565
566 1999-02-01 Mark Mitchell <mark@markmitchell.com>
567
568 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
569 before calling complete_type_or_else.
570
571 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
572
573 * input.c (inline): Don't define, its handled by system.h.
574
575 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
576
577 * decl2.c: Don't define flag_no_ident here. Don't process
578 -f(no-)ident here.
579 * cp-tree.h: Don't declare flag_no_ident here.
580 * lang-specs.h: Map -Qn to -fno-ident.
581
582 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
583
584 * cp-tree.h (struct tree_binding): Replace scope field with a union.
585 (BINDING_SCOPE): Adjust.
586 * decl.c (BINDING_LEVEL): Adjust.
587
588 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
589
590 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
591 member constants.
592
593 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
594 a ctor initializer.
595
596 * tree.c (equal_functions): Fix name in prototype.
597
598 * decl.c (push_local_binding): Add FLAGS argument.
599 (pushdecl, push_overloaded_decl): Pass it.
600 * decl2.c (do_local_using_decl): Likewise.
601 * cp-tree.h: Adjust prototype.
602 * decl.c (poplevel): Fix logic.
603
604 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
605 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
606 (cat_namespace_levels): Don't loop forever.
607
608 1999-01-25 Richard Henderson <rth@cygnus.com>
609
610 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
611
612 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
613
614 * class.c (resolve_address_of_overloaded_function): Mark the
615 chosen function used.
616
617 * call.c (build_call): Make sure that a function coming in has
618 been marked used already.
619 * decl.c (expand_static_init): Call mark_used instead of
620 assemble_external.
621 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
622 alloc_eh_object, expand_throw): Likewise.
623 * init.c (build_builtin_delete_call): Likewise.
624 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
625 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
626 expand_generic_desc): Likewise.
627
628 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
629
630 * tree.c (equal_functions): New function.
631 (ovl_member): Call it.
632
633 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
634
635 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
636
637 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
638
639 * decl.c (decls_match): Return 1 if old and new are identical.
640 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
641
642 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
643
644 * decl.c (start_function): Make member functions one_only on windows.
645 * decl2.c (import_export_decl): Likewise.
646
647 * decl.c (grokdeclarator): Don't complain about implicit int in
648 a system header. Change same-name field check to not complain in
649 a system header instead of within extern "C".
650
651 1999-01-21 Mark Mitchell <mark@markmitchell.com>
652
653 * cp-tree.h (PUSH_GLOBAL): New macro.
654 (PUSH_LOCAL): Likewise.
655 (PUSH_USING): Likewise.
656 (namespace_bindings_p): Declare.
657 (push_overloaded_decl): Likewise.
658 * decl.c (push_overloaded_decl): Don't make it static. Check for
659 illegal declarations after using declarations here.
660 (namespace_bindings_p): Likewise.
661 (duplicate_decls): Don't consider declarations from different
662 namespaces to be the same.
663 (pushdecl): Use symbolic PUSH_ constants in calls to
664 push_overloaded_decl.
665 (push_overloaded_decl_1): Likewise.
666 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
667 (do_nonmember_using_decl): Check for illegal using declarations
668 after ordinary declarations here.
669 (do_local_using_decl): Call pushdecl to insert declarations.
670
671 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
672
673 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
674
675 1999-01-21 Mark Mitchell <mark@markmitchell.com>
676
677 * tree.c (build_cplus_array_type_1): Don't call build_array_type
678 for types involving template parameters.
679
680 * cp-tree.h (PARM_DECL_EXPR): Delete.
681 (convert_default_arg): Change prototype.
682 (check_default_argument): Declare.
683 (search_tree): Likewise.
684 * call.c (convert_default_arg): Take the function to which the
685 default argument belongs as a parameter, and do any necessary
686 instantiation here, instead of ...
687 (build_over_call): Here.
688 * decl.c (local_variable_p): New function.
689 (check_default_argument): Likewise, split out and tidied from ...
690 (grokparms): Here.
691 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
692 * pt.c (tsubst_call_declarator_parms): New function.
693 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
694 with CALL_EXPRs, rather than trying to be clever.
695 (tsubst): Use tsubst_call_declarator_parms.
696 * tree.c (search_tree): Don't make it static.
697 * typeck.c (convert_arguments): Use new interface to
698 convert_default_arg.
699
700 1999-01-20 Mark Mitchell <mark@markmitchell.com>
701
702 * error.c (dump_function_decl): Don't print the argument types for
703 a function when the verbosity level is negative.
704
705 * call.c (build_over_call): Check format attributes at call-time.
706
707 * pt.c (tsubst_copy): Fix comment.
708 (unify): Don't allow unification with variable-sized arrays.
709
710 * semantics.c (finish_stmt_expr): When processing a template make
711 the BIND_EXPR long-lived.
712
713 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
714
715 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
716 (import_export_vtable): Not here.
717
718 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
719
720 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
721 non-static member function.
722
723 1999-01-18 Nathan Sidwell <nathan@acm.org>
724
725 * class.c (instantiate_type): Only diagnose illegal address of member
726 function if complaining.
727
728 * decl.c (lookup_name_real): Remove duplicate code.
729
730 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
731
732 * tree.c (copy_template_template_parm): Use permanent_obstack.
733
734 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
735
736 * pt.c (unify): Remove restrictions on deduction of argument
737 of template template parameters.
738
739 1999-01-18 Nathan Sidwell <nathan@acm.org>
740
741 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
742
743 * class.c (resolve_address_of_overloaded_function): Show list of
744 all candidates, when none of them match.
745
746 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
747
748 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
749 definition of 'casting away const' in reinterpret_cast<>.
750
751 1999-01-18 Graham <grahams@rcp.co.uk>
752
753 * cvt.c: Add include for decl.h, remove extern for
754 static_aggregates which is now provided by decl.h.
755
756 * Makefile.in (cvt.o): Add dependency for decl.h and missing
757 dependencies for convert.h and flags.h.
758
759 1999-01-18 Nathan Sidwell <nathan@acm.org>
760
761 * decl2.c (do_dtors): Set current location to that of the
762 decl, for sensible diagnostics and debugging.
763 (check_classfn): Issue `incomplete type' error, if
764 class is not defined.
765
766 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
767
768 * cp-tree.h: Add prototype for bound_pmf_p.
769
770 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
771 Manfred Hollstein <manfred@s-direktnet.de>
772
773 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
774 -Wreturn-type.
775
776 1999-01-16 Nathan Sidwell <nathan@acm.org>
777
778 * cp-tree.h (struct lang_type): Added has_mutable flag.
779 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
780 (TYPE_HAS_MUTABLE_P): New macro to read it.
781 (cp_has_mutable_p): Prototype for new function.
782 * class.c (finish_struct_1): Set has_mutable from members.
783 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
784 it contains a mutable.
785 * typeck.c (cp_has_mutable_p): New function.
786
787 1999-01-15 Mark Mitchell <mark@markmitchell.com>
788
789 * pt.c (process_template_parm): Ignore top-level qualifiers on
790 non-type parameters.
791
792 * decl.c (start_function): Use current_function_parms in the call
793 to require_complete_type_for_parms, not the probably empty
794 DECL_ARGUMENTS.
795
796 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
797
798 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
799
800 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
801 that we don't suppress the other copies.
802 * lex.c (handle_cp_pragma): Likewise.
803
804 1999-01-13 Mark Mitchell <mark@markmitchell.com>
805
806 * decl.c (grokdeclarator): Undo 1998-12-14 change.
807 * tree.c (build_cplus_array_type_1): Likewise.
808 * pt.c (instantiate_class_template): Remove misleading comment.
809 (tsubst_aggr_type): Substitute if there are template parameters,
810 regardless of whether or not they use template arguments.
811 (unify): Likewise, but for unification.
812
813 1999-01-12 Richard Henderson <rth@cygnus.com>
814
815 * cp-tree.h (flag_permissive): Declare extern.
816
817 1999-01-06 Mark Mitchell <mark@markmitchell.com>
818
819 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
820 here.
821 (lang_type): Add is_partial_instantiation. Decrease width of
822 dummy.
823 (PARTIAL_INSTANTIATION_P): New macro.
824 (OPERATOR_TYPENAME_P): Remove.
825 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
826 OPERATOR_TYPENAME_P.
827 (grok_op_properties): Likewise.
828 * friend.c (do_friend): Handle friends that are member functions
829 correctly.
830 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
831 * pt.c (instantiate_class_template): Rework for clarity. Avoid
832 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
833 any more partial instantiation than is absolutely necessary for
834 implicit typename. Set PARTIAL_INSTANTIATION_P.
835 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
836 * semantics.c (begin_class_definition): Handle partial
837 specializations of a type that was previously partially
838 instantiated.
839
840 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
841
842 * g++spec.c (LIBSTDCXX): Provide default definition.
843 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
844
845 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
846
847 * Make-lang.in (g++.o): Depend on prefix.h.
848
849 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
850
851 * tree.c (bound_pmf_p): New fn.
852 * typeck.c (build_c_cast): Use it.
853
854 * decl.c (grok_op_properties): Use same_type_p.
855
856 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
857
858 * Makefile.in (cvt.o): Depend on toplev.h.
859
860 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
861
862 * cvt.c: Include toplev.h.
863
864 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
865 definitions.
866
867 * init.c (expand_vec_init): Initialize variable `itype'.
868
869 * lex.c (yyerror): Cast the argument passed to a ctype function to
870 an unsigned char.
871
872 * method.c (build_mangled_C9x_name): Wrap prototype and definition
873 in "HOST_BITS_PER_WIDE_INT >= 64".
874
875 * typeck.c (build_binary_op): Mark parameter `convert_p' with
876 ATTRIBUTE_UNUSED.
877
878 1998-12-22 Mark Mitchell <mark@markmitchell.com>
879
880 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
881 * tree.c (build_exception_variant): Don't crash on empty throw
882 specs.
883
884 1998-12-18 DJ Delorie <dj@cygnus.com>
885
886 * cvt.c (convert_to_reference): Check for both error_mark_node
887 and NULL_NODE after call to convert_for_initialization.
888
889 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
890
891 * error.c (interesting_scope_p): New fn.
892 (dump_simple_decl): Use it.
893 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
894 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
895
896 1998-12-16 Mark Mitchell <mark@markmitchell.com>
897
898 * class.c (resolve_address_of_overloaded_function): Do conversion
899 to correct type here, rather than ...
900 (instantiate_type): Here.
901
902 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
903 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
904 (decl_template_parm_p): Remove.
905 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
906 paramter.
907 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
908 * pt.c (push_inline_template_parms_recursive): Set it.
909 (decl_template_parm_p): Remove.
910 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
911 (process_template_parm): Set it.
912
913 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
914
915 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
916 if configured with cpplib.
917
918 1998-12-15 Mark Mitchell <mark@markmitchell.com>
919
920 * decl.c (poplevel): Make sure ns_binding is initialized.
921
922 * decl.c (finish_function): Undo inadvertant change in previous
923 patch.
924
925 1998-12-14 Mark Mitchell <mark@markmitchell.com>
926
927 * class.c (pushclass): Tweak handling of class-level bindings.
928 (resolve_address_of_overloaded_function): Update pointer-to-member
929 handling.
930 (instantiate_type): Likewise.
931 * cvt.c (cp_convert_to_pointer): Likewise.
932 * decl.c (pop_binding): Take the DECL to pop, not just the name.
933 Deal with `struct stat' hack.
934 (binding_level): Add to documentation.
935 (push_binding): Clear BINDING_TYPE.
936 (add_binding): New function.
937 (push_local_binding): Use it.
938 (push_class_binding): Likewise.
939 (poplevel): Adjust calls to pop_binding.
940 (poplevel_class): Likewise.
941 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
942 declarations to current binding level.
943 (push_class_level_binding): Likewise.
944 (push_overloaded_decl): Adjust handling of OVERLOADs in local
945 bindings.
946 (lookup_namespace_name): Don't crash when confronted with a
947 TEMPLATE_DECL.
948 (lookup_name_real): Do `struct stat' hack in local binding
949 contexts.
950 (build_ptrmemfunc_type): Adjust documentation.
951 (grokdeclarator): Don't avoid building real array types when
952 processing templates unless really necessary.
953 (finish_method): Adjust calls to pop_binding.
954 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
955 not reparse_decl_as_expr.
956 (build_expr_from_tree): Deal with a template-id as the function to
957 call in a METHOD_CALL_EXPR.
958 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
959 (maybe_adjust_types_For_deduction): Don't do peculiar things with
960 METHOD_TYPEs here.
961 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
962 pointer-to-member types where necessary.
963 * tree.c (build_cplus_array_type_1): Don't avoid building real
964 array types when processing templates unless really necessary.
965 (build_exception_variant): Compare the exception lists correctly.
966
967 1998-12-13 Mark Mitchell <mark@markmitchell.com>
968
969 * cp-tree.def (CPLUS_BINDING): Update documentation.
970 * cp-tree.h (LOCAL_BINDING_P): New macro.
971 (lang_identifier): Rename local_value to bindings.
972 (tree_binding): Make `scope' of type `void*', not `tree'.
973 (BINDING_SCOPE): Update documentation.
974 (IDENTIFIER_LOCAL_VALUE): Remove.
975 (IDENTIFIER_CLASS_VALUE): Document.
976 (IDENTIFIER_BINDING): New macro.
977 (IDENTIFIER_VALUE): Likewise.
978 (TIME_IDENTIFIER_TIME): Likewise.
979 (TIME_IDENTIFIER_FILEINFO): Likewise.
980 (IMPLICIT_TYPENAME_P): Likewise.
981 (set_identifier_local_value): Remove.
982 (push_local_binding): New function.
983 (push_class_binding): Likewise.
984 * class.c (pushclass): Update comments; use push_class_binding.
985 * decl.c (set_identifier_local_value_with_scope): Remove.
986 (set_identifier_local_value): Likewise.
987 (push_binding): New function.
988 (pop_binding): Likewise.
989 (binding_level): Update documentation. Remove shadowed.
990 (BINDING_LEVEL): New macro.
991 (free_binding_nodes): New variable.
992 (poplevel): Adjust for new name-lookup scheme. Don't mess up
993 BLOCK_VARs when doing for-scope extension. Remove effectively
994 dead code.
995 (pushlevel_class): Tweak formatting.
996 (poplevel_class): Adjust for new name-lookup scheme.
997 (print_binding_level): Likewise.
998 (store_bindings): Likewise.
999 (pushdecl): Likewise.
1000 (pushdecl_class_level): Likewise.
1001 (push_class_level_binding): Likewise.
1002 (push_overloaded_decl): Update comments. Adjust for new
1003 name-lookup scheme.
1004 (lookup_name_real): Likewise.
1005 (lookup_name_current_level): Likewise.
1006 (cp_finish_decl): Likewise.
1007 (require_complete_types_for_parms): Likewise. Remove misleading
1008 #if 0'd code.
1009 (grok_parms): Likewise. Don't call
1010 require_complete_types_for_parms here.
1011 (grok_ctor_properties): Don't treat templates as copy
1012 constructors.
1013 (grop_op_properties): Or as assignment operators.
1014 (start_function): Document. Adjust for new name-lookup scheme.
1015 (finish_function): Likewise.
1016 * decl2.c (do_local_using_decl): Use push_local_binding.
1017 * lex.c (begin_definition_of_inclass_inline): New function, split
1018 out from ...
1019 (do_pending_inlines): Here, and ...
1020 (process_next_inline): Here.
1021 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
1022 (init_filename_times): Likewise.
1023 (extract_interface_info): Likewise.
1024 (ste_typedecl_interface_info): Likewise.
1025 (check_newline): Likewise.
1026 (dump_time_statistics): Likewise.
1027 (handle_cp_pragma): Likewise.
1028 (do_identifier): Adjust for new name-lookup scheme.
1029 * parse.y (function_try_block): Return ctor_initializer_opt value.
1030 (fndef): Use it.
1031 (fn.defpen): Pass appropriate values to start_function.
1032 (pending_inline): Use functor_try_block value, and pass
1033 appropriate values to finish_function.
1034 * pt.c (is_member_template): Update documentation; remove handling
1035 of FUNCTION_DECLs. As per name, this function should deal only in
1036 TEMPLATE_DECLs.
1037 (decl_template_parm_p): Change name of olddecl parameter to decl.
1038 (check_template_shadow): Adjust for new name-lookup scheme.
1039 (lookup_template_class): Likewise.
1040 (tsubst_decl): Tweak so as not to confuse member templates with
1041 copy constructors and assignment operators.
1042 (unify): Handle UNION_TYPEs.
1043 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
1044 (lang_print_xnode): Adjust for new name-lookup scheme.
1045 * typeck.c (mark_addressable): Likewise.
1046 (c_expand_return): Likewise.
1047
1048 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
1049
1050 * decl.c (grokdeclarator): Allow field with same name as class
1051 in extern "C".
1052
1053 * decl.c (lookup_name_real): Don't limit field lookup to types.
1054 * class.c (check_member_decl_is_same_in_complete_scope): No error
1055 if icv and x are the same.
1056 * lex.c (do_identifier): Tweak error message.
1057
1058 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1059
1060 * decl.c (start_enum): Use push_obstacks, not
1061 end_temporary_allocation.
1062 (finish_enum): Call pop_obstacks.
1063
1064 1998-12-10 Mark Mitchell <mark@markmitchell.com>
1065
1066 * class.c (instantiate_type): Return error_mark_node rather than
1067 junk.
1068
1069 1998-12-09 Mark Mitchell <mark@markmitchell.com>
1070
1071 * cp-tree.h (most_specialized_instantiation): New function.
1072 (print_candidates): Likewise.
1073 * class.c (validate_lhs): Remove.
1074 (resolve_address_of_overloaded_function): New function, split out
1075 and then substantially reworked, from ...
1076 (instantiate_type): Use it. Simplify.
1077 * cvt.c (convert_to_reference): Complain when caller has indicated
1078 that's the right thing to do. Don't crash if instantiate_type
1079 fails.
1080 * pt.c: Substitute `parameters' for `paramters' throughout.
1081 (print_candidates): Don't make it static.
1082 (most_specialized_instantiation): Split out from ...
1083 (most_specialized): Here.
1084
1085 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
1086
1087 * lex.c (lang_init_options): Initialize cpplib.
1088 * decl2.c (parse_options,cpp_initialized): Removed.
1089 (lang_decode_option): Move initialization of cpplib to
1090 lang_init_options.
1091
1092 1998-12-09 Mark Mitchell <mark@markmitchell.com>
1093
1094 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
1095 well as the TYPE_DECL, when a typedef name is assigned to a
1096 previously anonymous type.
1097
1098 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
1099
1100 * cp/except.c (call_eh_info): use __start_cp_handler instead of
1101 __cp_eh_info for getting the eh info pointer. Add table_index to
1102 field list.
1103 (push_eh_cleanup): Don't increment 'handlers' data field.
1104 (process_start_catch_block): Don't set the 'caught' field.
1105
1106 * cp/exception.cc (CP_EH_INFO): New macro for getting the
1107 exception info pointer within library routines.
1108 (__cp_eh_info): Use CP_EH_INFO.
1109 (__start_cp_handler): Get exception info pointer, set caught field,
1110 and increment the handlers field. Avoids this being done by handlers.
1111 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
1112 (uncaught_exception): Use CP_EH_INFO macro.
1113
1114 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
1115
1116 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
1117
1118 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
1119
1120 * lex.c (check_newline): Add support for \ as `natural'
1121 characters in file names in #line to be consistent with #include
1122 handling. We support escape prcessing in the # 1 "..." version of
1123 the command. See also support in cp/lex.c.
1124
1125 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
1126
1127 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
1128 structure.
1129
1130 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
1131
1132 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
1133
1134 * error.c (dump_simple_decl): Also print namespace context.
1135 (dump_function_decl): Likewise.
1136
1137 * decl2.c (ambiguous_decl): Don't print old value if it's
1138 error_mark_node.
1139
1140 * decl.c (lookup_name_real): Fix handling of local types shadowed
1141 by a non-type decl. Remove obsolete code.
1142 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
1143
1144 * lang-options.h: Add -fpermissive.
1145 * decl2.c: Likewise.
1146 * cp-tree.h: Add flag_permissive.
1147 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
1148 were specified, set flag_pedantic_errors.
1149 * call.c (build_over_call): Turn dropped qualifier messages
1150 back into pedwarns.
1151 * cvt.c (convert_to_reference): Likewise.
1152 * typeck.c (convert_for_assignment): Likewise.
1153
1154 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
1155
1156 * decl2.c (coerce_new_type): Use same_type_p.
1157 (coerce_delete_type): Likewise.
1158
1159 * call.c (check_dtor_name): Return 1, not error_mark_node.
1160
1161 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
1162
1163 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
1164 if MULTIPLE_SYMBOL_SPACES.
1165
1166 * pt.c (check_template_shadow): New fn.
1167 * decl2.c (grokfield): Use it.
1168 * decl.c (pushdecl): Likewise.
1169 (pushdecl_class_level): Likewise.
1170 (start_method): Likewise.
1171 (xref_tag): Don't try to use 't' if we're defining.
1172
1173 * call.c (check_dtor_name): Just return an error_mark_node.
1174 * pt.c (lookup_template_class): Complain about using non-template here.
1175 * parse.y (apparent_template_type): Not here.
1176
1177 * pt.c (check_explicit_specialization): Complain about specialization
1178 with C linkage.
1179
1180 * lang-options.h: Add -f{no-,}implicit-inline-templates.
1181
1182 * pt.c (convert_nontype_argument): Don't assume that any integer
1183 argument is intended to be a constant-expression.
1184
1185 1998-12-03 Mark Mitchell <mark@markmitchell.com>
1186
1187 * class.c (handle_using_decl): Fix comment. Don't lookup
1188 constructors in base classes.
1189 (validate_lhs): Fix typo in comment.
1190 * search.c (lookup_field_1): Don't return a USING_DECL.
1191
1192 * cp-tree.h (DECL_ACCESS): Improve documentation.
1193
1194 * decl.c (expand_static_init): Don't set the initialization-done
1195 flag until the initialization is done.
1196
1197 1998-12-02 Mark Mitchell <mark@markmitchell.com>
1198
1199 * decl2.c (validate_nonmember_using_decl): Complain about using
1200 declarations for class members.
1201
1202 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
1203
1204 * typeck2.c (process_init_constructor): Use same_type_p.
1205
1206 * decl.c (check_tag_decl): Don't warn about null decl inside a
1207 class.
1208
1209 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
1210 UNIFY_ALLOW_NONE.
1211 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
1212 (resolve_overloaded_unification): Strip baselinks.
1213
1214 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1215
1216 * g++spec.c: Don't prototype xmalloc.
1217
1218 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
1219
1220 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
1221
1222 * decl.c (check_tag_decl): Do complain about null friend decl at
1223 file scope.
1224
1225 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1226
1227 * lex.c (make_lang_type): Clear the whole struct lang_type, not
1228 only the first multiple of sizeof (int).
1229
1230 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
1231
1232 * decl.c (start_decl): An explicit specialization of a static data
1233 member is only a definition if it has an initializer.
1234
1235 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
1236 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
1237 cp_finish_decl.
1238 * init.c (expand_default_init): Check for DIRECT_BIND instead of
1239 DECL_ARTIFICIAL.
1240
1241 * call.c (build_over_call): Use build_decl.
1242
1243 * except.c (expand_throw): Just use convert, not
1244 build_reinterpret_cast.
1245
1246 * lex.c (handle_generic_pragma): Use token_buffer.
1247
1248 * decl.c (check_tag_decl): Don't complain about null friend decl.
1249
1250 1998-11-24 Dave Pitts <dpitts@cozx.com>
1251
1252 * Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the
1253 first position.
1254 * lex.c (check_newline): Use ISALPHA.
1255 (readescape): Use ISGRAPH.
1256 (yyerror): Use ISGRAPH.
1257
1258 1998-11-24 Nathan Sidwell <nathan@acm.org>
1259
1260 * search.c (get_abstract_virtuals): Do not use initial
1261 CLASSTYPE_ABSTRACT_VIRTUALS.
1262 * typeck2.c (abstract_virtuals_error): Show location of abstract
1263 declaration.
1264 * call.c (build_new_method_call): Use
1265 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
1266 * class.c (finish_struct_bits): Don't bother working out whether
1267 get_abstract_virtuals will do anything, just do it.
1268
1269 1998-11-24 Graham <grahams@rcp.co.uk>
1270
1271 * typeck.c (build_component_ref): Remove unused statement.
1272
1273 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
1274
1275 * class.c (add_method): Catch invalid overloads.
1276
1277 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
1278 * search.c (lookup_conversions): Handle getting real OVERLOADs.
1279 (add_conversions): Likewise. Revert last change.
1280 * call.c (add_conv_candidate): Pass totype to add_candidate instead
1281 of fn. Don't add a new candidate if the last one was for the same
1282 type.
1283 (print_z_candidates): Handle getting a type as a function.
1284 (joust): If we got two conversion candidates to the same type,
1285 just pick one.
1286 (build_object_call): Lose 'templates'.
1287 (build_user_type_conversion_1): Handle getting real OVERLOADs.
1288
1289 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1290
1291 * typeck2.c (process_init_constructor): If there are elements
1292 that don't have initializers and they need to have constructors
1293 run, supply them with initializers.
1294
1295 * class.c (finish_struct_1): A class with a 0-width bitfield is
1296 still empty.
1297
1298 1998-11-23 Mark Mitchell <mark@markmitchell.com>
1299
1300 * pt.c (instantiate_class_template): Don't try to figure out what
1301 specialization to use for a partial instantiation. Correct
1302 typos in a couple of comments. Avoid calling uses_template_parms
1303 multiple times.
1304
1305 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
1306
1307 * method.c (process_overload_item): Add call to
1308 build_mangled_C9x_name for intTI_type_nodes.
1309 (build_mangled_C9x_name): Add prototype, define.
1310 * decl.c (init_decl_processing): Add names for
1311 TImode_type_node.
1312
1313 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
1314
1315 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
1316
1317 * class.c (finish_struct_1): Set things up for 0-width bitfields
1318 like we do for others.
1319
1320 * decl.c (check_tag_decl): New fn.
1321 (shadow_tag): Split out from here.
1322 * decl2.c (grok_x_components): Call it.
1323
1324 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
1325
1326 * decl.c: Lose warn_about_return_type.
1327 (grokdeclarator): Always complain about implicit int, except for
1328 `main () { ... }'.
1329
1330 * decl.c (tag_name): New fn.
1331 (xref_tag): Complain about using typedef-name after class-key.
1332
1333 * init.c (expand_vec_init): Also keep going if from_array.
1334
1335 * tree.c (is_overloaded_fn): Also handle the output of
1336 build_offset_ref.
1337
1338 * decl.c (grokdeclarator): Use constructor_name when comparing
1339 field name against enclosing class.
1340 * class.c (finish_struct_anon): Likewise.
1341
1342 1998-11-22 Mark Mitchell <mark@markmitchell.com>
1343
1344 * decl.c (poplevel): Remove code to handle KEEP == 2.
1345 (finish_function): Don't confuse BLOCK-order when
1346 processing a destructor.
1347
1348 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1349
1350 * decl.c (require_complete_types_for_parms): Call layout_decl
1351 after we've completed the type.
1352
1353 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
1354
1355 * decl2.c (validate_nonmember_using_decl): Allow using templates
1356 from the global namespace.
1357
1358 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
1359
1360 Handle specifying template args to member function templates.
1361 * tree.c (build_overload): Always create an OVERLOAD for a template.
1362 * search.c (add_conversions): Handle finding an OVERLOAD.
1363 * decl2.c (check_classfn): Likewise.
1364 * lex.c (identifier_type): See through a baselink.
1365 * parse.y (do_id): Don't call do_identifier if we got a baselink.
1366 * class.c (instantiate_type, case TREE_LIST): Recurse.
1367
1368 * decl.c (grokdeclarator): Allow a boolean constant for array
1369 bounds, odd as that sounds.
1370
1371 * pt.c (unify): Be more strict about non-type parms, except for
1372 array bounds.
1373 (UNIFY_ALLOW_INTEGER): New macro.
1374
1375 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
1376
1377 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
1378
1379 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
1380
1381 * semantics.c (begin_class_definition): Call
1382 maybe_process_partial_specialization before push_template_decl.
1383 Don't call push_template_decl for a specialization.
1384 * search.c (lookup_field): Do return a member template class.
1385 * decl2.c (handle_class_head): Handle member template classes.
1386
1387 * decl.c (grokdeclarator): A parm type need not be complete.
1388
1389 * pt.c (convert_nontype_argument): Fix thinko.
1390
1391 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1392
1393 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
1394 (global_delete_fndecl): New variable.
1395 * decl.c (global_delete_fndecl): Define it.
1396 (init_decl_processing): Set it.
1397 * init.c (build_builtin_delete_call): Use it.
1398 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
1399 nodes.
1400
1401 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1402
1403 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
1404 type.
1405
1406 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
1407 * call.c (build_object_call): Also support references to functions.
1408 * typeck.c (convert_for_initialization): Don't decay a function
1409 if the target is a reference to function.
1410
1411 * search.c (add_conversions): Get all the overloads from a class.
1412
1413 * decl.c (grok_ctor_properties): Complain about any constructor
1414 that will take a single arg of the class type by value.
1415
1416 * typeck2.c (build_functional_cast): Can't create objects of
1417 abstract classes this way.
1418 * cvt.c (ocp_convert): Likewise.
1419
1420 * decl.c (grokfndecl): Member functions of local classes are not
1421 public.
1422
1423 1998-11-18 Mark Mitchell <mark@markmitchell.com>
1424
1425 * Make-lang.in (cc1plus): Add dependency on hash.o.
1426
1427 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
1428
1429 * search.c (get_abstract_virtuals): Complain about virtuals with
1430 no final overrider.
1431 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
1432 with no final overrider.
1433 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
1434 on virtuals with no final overrider.
1435
1436 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
1437
1438 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
1439 after layout_type.
1440
1441 * friend.c (do_friend): Don't set_mangled_name_for_decl.
1442
1443 * class.c (finish_struct_anon): Complain about non-fields.
1444 * decl2.c (build_anon_union_vars): Likewise.
1445
1446 * decl.c (grokdeclarator): Normal data members can't have the same
1447 name as the class, either.
1448 * class.c (finish_struct_anon): Neither can members of an
1449 anonymous union.
1450
1451 1998-11-17 Mark Mitchell <mark@markmitchell.com>
1452
1453 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
1454 (TYPE_BINFO): Likewise.
1455 (IS_AGGR_TYPE): Tweak.
1456 (SET_IS_AGGR_TYPE): New macro.
1457 (CLASS_TYPE_P): Tweak.
1458 (lang_type): Group mark bitfields together. Remove linenum.
1459 (CLASSTYPE_SOURCE_LINE): Remove macro.
1460 (CLASSTYPE_MARKED_N): New macro.
1461 (SET_CLASSTYPE_MARKED_N): Likewise.
1462 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
1463 (CLASS_TYPE_MARKED_*): Use them.
1464 (SET_CLASSTYPE_MARKED_*): Likewise.
1465 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
1466 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1467 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
1468 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
1469 * class.c (class_cache_obstack): New variable.
1470 (class_cache_firstobj): Likewise.
1471 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
1472 (pushclass): Free the cache, when appropriate.
1473 (popclass): Tidy.
1474 (maybe_push_cache_obstack): Use class_cache_obstack.
1475 * decl.c (include hash.h).
1476 (typename_hash): New function.
1477 (typename_compare): Likewise.
1478 (build_typename_type): Check the hash table to avoid creating
1479 duplicates.
1480 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
1481 (grokdeclarator): Use CLASS_TYPE_P.
1482 (xref_basetypes): Likewise.
1483 (start_function): Likewise. Don't put current_class_ref on the
1484 permanent obstack.
1485 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
1486 and TYPE_TI_ARGS.
1487 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
1488 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
1489 fields for types other than class types. Do clear TYPE_ALIAS_SET
1490 for types other than class types, though.
1491 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
1492 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1493 * pt.c (process_template_parm): Don't set
1494 CLASSTYPE_GOT_SEMICOLON.
1495 (lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1496 Coerce arguments on the momentary obstack.
1497 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1498 (instantiate_class_template): Calculate template arguments on the
1499 momentary obstack. Tidy.
1500 (tsubst_template_arg_vector): Use make_temp_vec.
1501 (tsubst_aggr_type): Put template arguments on the momentary
1502 obstack.
1503 (tsubst_decl): Likewise.
1504 (tsubst): Copy the array bounds index to the permanent obstack
1505 before building index types. Use new macros.
1506 (unify): Use new macros.
1507 (do_type_instantiation): Likewise.
1508 * search.c (lookup_fnfields_1): Use new macros.
1509 (dfs_pushdecls): Build envelopes on the cache obstack.
1510 (dfs_compress_decls): Use new macros.
1511 (push_class_decls): Build on the cache obstack.
1512 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
1513 * sign.c (build_signature_pointer_or_reference_type): Use
1514 SET_IS_AGGR_TYPE.
1515 * tree.c (make_binfo): Check CLASS_TYPE_P.
1516 (copy_template_template_parm): Adjust.
1517 (make_temp_vec): Use push_expresion_obstack.
1518 * typeck.c (complete_type): Use new macros.
1519 (comptypes): Likewise.
1520
1521 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
1522
1523 * pt.c (tsubst): Add diagnostics for invalid array, reference
1524 and pointer to member types.
1525
1526 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
1527
1528 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
1529
1530 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
1531 Simplify.
1532
1533 * parse.y (structsp): Fix cut-and-paste error.
1534
1535 * init.c (build_new): Complain about non-integral size.
1536
1537 * parse.y (unary_expr): Complain about defining types in sizeof.
1538
1539 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
1540
1541 * rtti.c (build_x_typeid): Complain about typeid without
1542 including <typeinfo>.
1543 (get_typeid): Likewise. Complain about typeid of incomplete type.
1544 (get_tinfo_fn_dynamic): Likewise.
1545 (get_typeid_1): Not static anymore.
1546 * except.c (build_eh_type_type): Use get_typeid_1.
1547
1548 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
1549 ambiguous or private bases. Fix warning for reference cast.
1550
1551 1998-11-16 Mark Mitchell <mark@markmitchell.com>
1552
1553 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
1554 * decl.c (duplicate_decls): Remove special-case code to deal with
1555 template friends, and just do the obvious thing.
1556 * pt.c (register_specialization): Tweak for clarity, and also to
1557 clear DECL_INITIAL for an instantiation before it is merged with a
1558 specialization.
1559 (check_explicit_specialization): Fix indentation.
1560 (tsubst_friend_function): Handle both definitions in friend
1561 declaration and outside friend declarations.
1562 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
1563 (regenerate_decl_from_template): Tweak accordingly.
1564 (instantiate_decl): Likewise.
1565
1566 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
1567
1568 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
1569 member function reference to error.
1570 * cvt.c (ocp_convert): Complain about converting an overloaded
1571 function to void.
1572
1573 * init.c (build_offset_ref): Just return a lone static member
1574 function.
1575
1576 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
1577 not internal ones.
1578
1579 * typeck.c (build_binary_op_nodefault): Improve error handling.
1580
1581 * decl.c (grokfndecl): Complain about making 'main' a template.
1582
1583 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
1584
1585 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
1586 TYPE_DECL in a template.
1587
1588 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
1589
1590 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
1591
1592 * decl.c (struct cp_function): Add named_label_uses.
1593 (push_cp_function_context): Save it.
1594 (pop_cp_function_context): Restore it.
1595 (define_label): Also complain about jumping into the scope of
1596 non-POD objects that don't have constructors.
1597 * tree.c (pod_type_p): New fn.
1598
1599 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
1600 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
1601 (get_tinfo_fn): Not here.
1602 * repo.c (repo_get_id): Abort if we get called for an incomplete
1603 type.
1604
1605 1998-11-13 Mark Mitchell <mark@markmitchell.com>
1606
1607 * except.c (expand_throw): Make sure first argument to
1608 __cp_push_exception is of type `void*' to avoid spurious error
1609 messages.
1610
1611 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
1612
1613 * pt.c (try_one_overload): Take orig_targs again. Only check for
1614 mismatches against them; we don't care what a previous call found.
1615 (resolve_overloaded_unification): Adjust.
1616
1617 * search.c (lookup_field): Don't return anything for a non-type
1618 field from a dependent type.
1619 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
1620 in an array declarator.
1621 (start_decl): Push into the class before looking for the field.
1622
1623 1998-11-08 Mark Mitchell <mark@markmitchell.com>
1624
1625 * method.c (build_overload_value): Handle REFERENCE_TYPE.
1626
1627 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
1628
1629 * decl.c (grokdeclarator): Allow namespace-scoped members if they
1630 are friends.
1631
1632 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
1633
1634 * pt.c (tsubst_decl): Don't mess with the global value of an
1635 un-mangled DECL_ASSEMBLER_NAME.
1636
1637 1998-11-03 Christopher Faylor <cgf@cygnus.com>
1638
1639 * decl.c (init_decl_processing): Remove CYGWIN conditional
1640 since CYGWIN is now able to deal with trapping signals.
1641
1642 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1643
1644 * cp-tree.h: Don't include gansidecl.h.
1645 * exception.cc: Include gansidecl.h (since we don't include config.h)
1646 * g++spec.c: Don't include gansidecl.h.
1647
1648 1998-11-06 Mark Mitchell <mark@markmitchell.com>
1649
1650 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
1651 size of dummy.
1652 (DECL_DEFINED_IN_CLASS_P): New macro.
1653 (TEMPLATE_PARMS_FOR_INLINE): Document.
1654 (check_static_variable_definition): New function.
1655 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
1656 appropriate.
1657 (check_static_variable_definition): Split out from ...
1658 (grokdeclarator): Here.
1659 * pt.c (check_default_tmpl_args): New function, split out from ...
1660 (push_template_decl_real): Here.
1661 (instantiate_template): Fix comment.
1662
1663 1998-11-04 Mark Mitchell <mark@markmitchell.com>
1664
1665 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
1666 (CP_TYPE_VOLATILE_P): Likewise.
1667 (CP_TYPE_RESTRICT_P): Likewise.
1668
1669 1998-11-03 Mark Mitchell <mark@markmitchell.com>
1670
1671 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
1672
1673 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
1674
1675 * class.c (instantiate_type): Be more helpful.
1676
1677 * decl2.c (import_export_decl): Call import_export_class.
1678
1679 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
1680 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
1681 * pt.c (tsubst_copy): Likewise.
1682
1683 1998-11-02 Mark Mitchell <mark@markmitchell.com>
1684
1685 * init.c (expand_vec_init): Fix off-by-one error.
1686
1687 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
1688
1689 * parse.y (apparent_template_type): new type
1690 (named_complex_class_head_sans_basetype): use it
1691 * Makefile.in (CONFLICTS): one new conflict
1692 * parse.c: Regenerated
1693
1694 1998-11-01 Mark Mitchell <mark@markmitchell.com>
1695
1696 * cp-tree.h (COMPARE_STRICT): New macro.
1697 (COMPARE_BASE): Likewise.
1698 (COMPARE_RELAXED): Likewise.
1699 (COMPARE_REDECLARATION): Likewise.
1700 (same_type_p): Likewise.
1701 (same_or_base_type_p): Likewise.
1702 * call.c (standard_conversion): Use them, in place of comptypes
1703 with numeric arguments.
1704 (reference_binding): Likewise.
1705 (convert_like): Likewise.
1706 (build_over_call): Likewise.
1707 (is_subseq): Likewise.
1708 (is_properly_derived_from): Likewise.
1709 (compare_ics): Likewise.
1710 (joust): Likewise.
1711 * class.c (delete_duplicate_fields_1): Likewise.
1712 (resolves_to_fixed_type_p): Likewise.
1713 (instantiate_type): Likewise. Remove #if 0'd code.
1714 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
1715 (pushdecl): Likewise.
1716 (lookup_name_real): Likewise.
1717 (grokdeclarator): Likewise. Check for illegal array declarations.
1718 (grokparms): Likewise.
1719 (grok_op_properties): Likewise.
1720 * decl2.c (check_classfn): Likewise.
1721 * friend.c (is_friend): Likewise.
1722 (make_friend_class): Likewise.
1723 * init.c (expand_aggr_init): Likewise.
1724 (expand_vec_init): Likewise.
1725 * pt.c (is_member_template_class): Remove declaration.
1726 (is_specialization_of): Use COMPARE_* and new macros.
1727 (comp_template_parms): Likewise.
1728 (convert_nontype_argument): Likewise.
1729 (coerce_template_template_parms): Likewise.
1730 (template_args_equal): Likewise.
1731 (lookup_template_class): Likewise.
1732 (type_unification_real): Likewise.
1733 (unify): Likewise.
1734 (get_bindings_real): Likewise.
1735 * search.c (covariant_return_p): Likewise.
1736 (get_matching_virtual): Likewise.
1737 * sig.c (match_method_types): Likewise.
1738 * tree.c (vec_binfo_member): Likewise.
1739 (cp_tree_equal): Likewise.
1740 * typeck.c (common_type): Likewise.
1741 (comp_array_types): Likewise. Get issues involving unknown array
1742 bounds right.
1743 (comptypes): Update comments. Use new flags.
1744 (comp_target_types): Use new macros.
1745 (compparms): Likewise.
1746 (comp_target_parms): Likewise.
1747 (string_conv_p): Likewise.
1748 (build_component_ref): Likewise.
1749 (build_indirect_ref): Likewise.
1750 (build_conditional_expr): Likewise.
1751 (build_static_cast): Likewise.
1752 (build_reinterpret_cast): Likewise.
1753 (build_const_cast): Likewise.
1754 (build_modify_expr): Likewise.
1755 (convert_for_assignment): Likewise.
1756 (comp_ptr_ttypes_real): Likewise.
1757 (ptr_reasonably_similar): Likewise.
1758 (comp_ptr_ttypes_const): Likewise.
1759
1760 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
1761
1762 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
1763
1764 1998-10-30 Mark Mitchell <mark@markmitchell.com>
1765
1766 * decl2.c (delete_sanity): Pass integer_zero_node, not
1767 integer_two_node, to build_vec_delete.
1768 * init.c (build_array_eh_cleanup): Remove.
1769 (expand_vec_init_try_block): New function.
1770 (expand_vec_init_catch_clause): Likewise.
1771 (build_vec_delete_1): Don't deal with case that auto_delete_vec
1772 might be integer_two_node anymore.
1773 (expand_vec_init): Rework for initialization-correctness and
1774 exception-correctness.
1775 * typeck2.c (process_init_constructor): Make mutual exclusivity
1776 of cases more obvious.
1777
1778 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
1779
1780 * decl.c (lookup_name_real): OK, only warn if not lexing.
1781 Simplify suggested fix.
1782
1783 * cp-tree.h (IDENTIFIER_MARKED): New macro.
1784 * search.c (lookup_conversions): Use breadth_first_search.
1785 (add_conversions): Avoid adding two conversions to the same type.
1786 (breadth_first_search): Work with base binfos, rather
1787 than binfos and base indices.
1788 (get_virtual_destructor): Adjust.
1789 (tree_has_any_destructor_p): Adjust.
1790 (get_matching_virtual): Adjust.
1791
1792 * pt.c (push_template_decl_real): Generalize check for incorrect
1793 number of template parms.
1794 (is_member_template_class): #if 0.
1795
1796 1998-10-29 Richard Henderson <rth@cygnus.com>
1797
1798 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
1799 last.
1800
1801 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
1802
1803 * lex.c: Call check_newline from lang_init always. After
1804 calling cpp_start_read, set yy_cur and yy_lim to read from the
1805 cpplib token buffer.
1806
1807 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
1808
1809 * class.c (instantiate_type): Don't consider templates for a normal
1810 match.
1811
1812 * class.c (finish_struct_1): Don't complain about non-copy
1813 assignment ops in union members.
1814
1815 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
1816 (prepare_fresh_vtable): Likewise.
1817 (finish_struct_1): Don't call import_export_class.
1818 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
1819 (finish_prevtable_vardecl): Lose.
1820 (finish_file): Don't call it.
1821 * pt.c (instantiate_class_template): Likewise.
1822 * cp-tree.h: Remove it.
1823
1824 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
1825 * decl.c (finish_function): Not here.
1826 (start_function): Do set DECL_INITIAL.
1827
1828 * pt.c (push_template_decl_real): Complain about default template
1829 args for enclosing classes.
1830
1831 * call.c (add_function_candidate): Treat conversion functions
1832 as coming from the argument's class.
1833 * cp-tree.h (DECL_CONV_FN_P): New fn.
1834 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
1835 * class.c (add_method): Use DECL_CONV_FN_P.
1836 * decl2.c (check_classfn): Likewise.
1837 * error.c (dump_function_name): Likewise.
1838 (dump_function_decl): Likewise.
1839 * pt.c (fn_type_unification): Likewise.
1840 * search.c (add_conversions): Likewise.
1841
1842 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
1843
1844 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
1845 * method.c (hack_identifier): Also check for using RESULT_DECL
1846 from outer context.
1847
1848 1998-10-27 Mark Mitchell <mark@markmitchell.com>
1849
1850 * decl.c (grokdeclarator): Use type_quals, rather than constp,
1851 consistently.
1852
1853 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
1854
1855 * call.c (standard_conversion): instantiate_type here.
1856 (reference_binding): And here.
1857 (implicit_conversion): Not here.
1858 (build_op_delete_call): No need to cons up an OVERLOAD.
1859 * cvt.c (cp_convert_to_pointer): instantiate_type here.
1860 (convert_to_reference): And here.
1861 * decl.c (grok_reference_init): Not here.
1862 (grokparms): Or here.
1863 * typeck2.c (digest_init): Or here.
1864 * typeck.c (decay_conversion): Take the address of overloaded
1865 functions, too.
1866 (require_instantiated_type): Lose.
1867 (convert_arguments): Don't handle unknown types here.
1868 (build_c_cast): Likewise.
1869 (build_binary_op): Gut.
1870 (build_conditional_expr): Don't require_instantiated_type.
1871 (build_modify_expr): Likewise.
1872 (build_static_cast): Don't instantiate_type.
1873 (build_reinterpret_cast): Likewise.
1874 (build_const_cast): Likewise.
1875 (convert_for_initialization): Likewise.
1876 (build_ptrmemfunc): Use type_unknown_p.
1877 (convert_for_assignment): Also do default_conversion on overloaded
1878 functions. Hand them off to ocp_convert.
1879
1880 1998-10-26 Mark Mitchell <mark@markmitchell.com>
1881
1882 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
1883 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
1884
1885 * class.c (finish_struct_1): Use build_cplus_array_type to build
1886 array types.
1887 * decl.c (init_decl_processing): Likewise.
1888 * except.c (expand_end_eh_spec): Likewise.
1889 * search.c (expand_upcast_fixups): Simplify very slightly.
1890
1891 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1892
1893 * decl.c (grokdeclarator): Complain about a variable using
1894 constructor syntax coming back null from start_decl.
1895
1896 * friend.c (make_friend_class): Complain about trying to make
1897 a non-class type a friend.
1898
1899 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
1900 (start_function): Not here.
1901
1902 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
1903
1904 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1905
1906 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1907
1908 * typeck2.c (process_init_constructor): Only skip anonymous fields
1909 if they are bitfields.
1910
1911 * cp-tree.def (TYPEOF_TYPE): New code.
1912 * error.c (dump_type_real): Handle it.
1913 * pt.c (tsubst): Likewise.
1914 * tree.c (search_tree): Likewise.
1915 * semantics.c (finish_typeof): New fn.
1916 * parse.y (typespec): Use it.
1917 * cp-tree.h: Declare it.
1918
1919 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
1920
1921 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
1922
1923 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1924
1925 * typeck.c (convert_arguments): Don't handle pmf references
1926 specially.
1927
1928 * init.c (build_member_call): Don't try to convert to the base type
1929 if it's ambiguous or pedantic.
1930
1931 * typeck2.c (check_for_new_type): Only depend on pedantic for
1932 C-style casts.
1933
1934 1998-10-25 Mark Mitchell <mark@markmitchell.com>
1935
1936 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
1937 non-converting constructors.
1938
1939 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
1940
1941 * gxxint.texi: Correct documentation for n, N, Q, and B.
1942
1943 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
1944
1945 * parse.y (condition): Convert VAR_DECL from reference to indirect
1946 reference.
1947
1948 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
1949
1950 * exception.cc (__cp_pop_exception): Free the original exception
1951 value, not the potentially coerced one.
1952
1953 1998-10-23 Mark Mitchell <mark@markmitchell.com>
1954
1955 * Makefile.in (hash.h): Run gperf when necessary.
1956
1957 * cp-tree.h (CP_TYPE_READONLY): Remove.
1958 (CP_TYPE_VOLATILE): Likewise.
1959 (CP_TYPE_QUALS): New macro.
1960 (CP_TYPE_CONST_P): Likewise.
1961 (CP_TYPE_VOLATILE_P): Likewise.
1962 (CP_TYPE_RESTRICT_P): Likewise.
1963 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
1964 (cp_build_type_variant): Rename to ...
1965 (cp_build_qualified_type): New function.
1966 (c_apply_type_quals_to_decl): Declare.
1967 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
1968 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
1969 (cp_type_qual_from_rid): New function.
1970 (compparms): Remove unused parameter. All callers changed.
1971 (cp_type_quals): New function.
1972 (at_least_as_qualified_p): Likewise.
1973 (more_qualified_p): Likewise.
1974
1975 * call.c (standard_conversion): Replace calls to
1976 cp_build_type_variant with cp_build_qualified_type. Use
1977 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
1978 compare them. Use CP_TYPE_* macros to check qualifiers.
1979 (reference_binding): Likewise.
1980 (implicit_conversion): Likewise.
1981 (add_builtin_candidates): Likewise.
1982 (build_over_call): Likewise.
1983 * class.c (overrides): Compare all qualifiers, not just `const',
1984 on method declarations.
1985 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
1986 (convert_pointer_to_real): Likewise.
1987 (type_promotes_to): Likewise.
1988 * decl.c (check_for_uninitialized_const_var): New function.
1989 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
1990 (cp_finish_decl): Use check_for_uninitialized_const_var.
1991 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
1992 handle `restrict'.
1993 (grok_ctor_properties): Likewise.
1994 (grok_op_properties): Likewise.
1995 (start_function): Likewise.
1996 (rever_static_member_fn): Likewise.
1997 * decl2.c (grok_method_quals): Likewise.
1998 (grokfield): Likewise.
1999 * error.c (dump_readonly_or_volatile): Rename to ...
2000 (dump_qualifiers): New function. Handle `restrict'.
2001 (dump_type_real): Use it.
2002 (dump_aggr_type): Likewise.
2003 (dump_type_prefix): Likewise.
2004 (dump_type_suffix): Likewise.
2005 (dump_function_decl): Likewise.
2006 (cv_as_string): Likewise.
2007 * gxx.gperf: Add __restrict and __restrict__.
2008 * gxxint.texi: Document `u' as used for `__restrict', and a few
2009 other previously undocumented codes.
2010 * hash.h: Regenerated.
2011 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
2012 (build_member_call): Likewise.
2013 (build_new_1): Likewise.
2014 * lex.c (init_parse): Add entry for RID_RESTRICT.
2015 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
2016 (cp_type_qual_from_rid): Define.
2017 * lex.h (enum rid): Add RID_RESTRICT.
2018 * method.c (process_modifiers): Deal with `restrict'.
2019 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
2020 * parse.c: Regenerated.
2021 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
2022 (tsubst_aggr_type): Likewise.
2023 (tsubst): Likewise.
2024 (check_cv_quals_for_unify): Likewise.
2025 (unify): Likewise.
2026 * rtti.c (init_rtti_processing): Likewise.
2027 (build_headof): Likewise.
2028 (get_tinfo_var): Likewise.
2029 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
2030 (expand_class_desc): Likewise.
2031 (expand_attr_desc): Likewise.
2032 (synthesize_tinfo_fn): Likewise.
2033 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
2034 (get_matching_virtual): Likewise.
2035 (expand_upcast_fixups): Likewise.
2036 * sig.c (build_signature_pointer_or_reference_name): Take
2037 type_quals, not constp and volatilep.
2038 (build_signature_pointer_or_reference_type): Likewise.
2039 (match_method_types): More CP_TYPE_QUALS conversion, etc.
2040 (build_signature_pointer_constructor): Likewise.
2041 (build_signature_method_call): Likewise.
2042 * tree.c (build_cplus_array_type): Likewise.
2043 (cp_build_type_variant): Rename to ...
2044 (cp_build_qualified_type): New function. Deal with `__restrict'.
2045 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
2046 (build_exception_variant): Likewise.
2047 (mapcar): Likewise.
2048 * typeck.c (qualif_type): Likewise.
2049 (common_type): Likewise.
2050 (comptypes): Likewise.
2051 (comp_cv_target_types): Likewise.
2052 (at_least_as_qualified_p): Define.
2053 (more_qualified_p): Likewise.
2054 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
2055 (compparms): Likewise.
2056 (inline_conversion): Likewise.
2057 (string_conv_p): Likewise.
2058 (build_component_ref): Likewise.
2059 (build_indirect_ref): Likewise.
2060 (build_array_ref): Likewise.
2061 (build_unary_op): Likewise.
2062 (build_conditional_expr): Likewise.
2063 (build_static_cast): Likewise.
2064 (build_c_cast): Likewise.
2065 (build_modify_expr): Likewise.
2066 (convert_For_assignment): Likewise.
2067 (comp_ptr_ttypes_real): Likewise.
2068 (cp_type_quals): New function.
2069
2070 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
2071
2072 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
2073 (CP_TYPE_VOLATILE): Likewise.
2074 * decl.c (grokdeclarator): Use them.
2075 * tree.c (canonical_type_variant): Likewise.
2076
2077 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
2078
2079 * parse.y (named_class_head): Push into class while parsing the
2080 base class list.
2081 * decl2.c (push_scope, pop_scope): New functions.
2082 * cp-tree.h: Declare them.
2083 * init.c (build_new_1): Delay cleanup until end of full expression.
2084
2085 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
2086
2087 * typeck.c (build_component_ref): Use of a type here is an error.
2088
2089 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
2090
2091 Revamp references to member functions.
2092 * method.c (hack_identifier): Call build_component_ref for a
2093 reference to a member function.
2094 * typeck.c (build_component_ref): Only return a single function
2095 if it's static. Otherwise, return a COMPONENT_REF.
2096 (build_x_function_call): Handle a COMPONENT_REF.
2097 (build_unary_op): Handle all unknown-type things.
2098 * decl2.c (arg_assoc): Handle COMPONENT_REF.
2099 * class.c (instantiate_type): Complain if the function we get is a
2100 nonstatic member function. Remove code for finding "compatible"
2101 functions.
2102 * pt.c (tsubst_copy): Handle NOP_EXPR.
2103 * tree.c (build_dummy_object): New fn.
2104 (maybe_dummy_object): New fn.
2105 (is_dummy_object): New fn.
2106 * cp-tree.h: Declare them.
2107 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
2108 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
2109 * init.c (build_member_call): Use maybe_dummy_object and
2110 is_dummy_object.
2111 (build_offset_ref): Use maybe_dummy_object.
2112 (resolve_offset_ref): Use is_dummy_object.
2113 * typeck.c (build_x_function_call): Call build_dummy_object.
2114 (unary_complex_lvalue): Call is_dummy_object.
2115
2116 * typeck.c (build_component_addr): Make sure field is a field.
2117
2118 * call.c (build_new_op): Delete obsolete code.
2119
2120 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
2121
2122 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
2123
2124 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
2125 std if std is ignored.
2126
2127 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
2128
2129 * decl.c (grokvardecl): Fix thinko.
2130
2131 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2132 not the left.
2133
2134 * parse.y (fn.def2): Fix 'attrs' format.
2135
2136 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
2137
2138 * Makefile.in (CONFLICTS): Update.
2139 * parse.y (expr_or_declarator_intern): New rule.
2140 (expr_or_declarator, direct_notype_declarator, primary,
2141 functional_cast): Use it.
2142 (notype_declarator_intern): New rule.
2143 (notype_declarator, complex_notype_declarator): Use it.
2144
2145 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
2146
2147 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
2148 (grokvardecl): Likewise.
2149
2150 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2151
2152 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
2153 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
2154
2155 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
2156
2157 * pt.c (process_partial_specialization): Cast 1st argument of
2158 `bzero' to (PTR).
2159
2160 * tree.c (build_base_fields): Cast `base_align' to (int) when
2161 comparing against one.
2162
2163 1998-10-16 Mark Mitchell <mark@markmitchell.com>
2164
2165 * decl.c (lookup_name_real): Handle template parameters for member
2166 templates where said parameters have the same name as the
2167 surrounding class.
2168
2169 * decl.c (expand_static_init): Build cleanups before entering the
2170 anonymous function used to do them to avoid access-checking
2171 confusion.
2172
2173 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
2174 accidentally removed by previous change, and make DECL_RTL here.
2175 * class.c (add_method): Don't make DECL_RTL here.
2176
2177 * pt.c (for_each_template_parm): Don't examine uninstantiated
2178 default arguments.
2179
2180 1998-10-16 Dave Brolley <brolley@cygnus.com>
2181
2182 * lex.c (real_yylex): Fix unaligned access of wchar_t.
2183
2184 1998-10-16 Mark Mitchell <mark@markmitchell.com>
2185
2186 * class.c (add_method): Fix documentation to reflect previous
2187 changes. Check for duplicate method declarations here.
2188 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
2189 correctly; such things never match.
2190 (grokfndecl): Don't look for duplicate methods here.
2191 * decl2.c (check_classfn): Don't assume names are mangled.
2192 Don't add bogus member function declarations to a class before the
2193 class type is complete.
2194 (grokfield): Reformat error message.
2195 * method.c (set_mangled_name_for_decl): Don't mangle names while
2196 procesing_template_decl.
2197
2198 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
2199
2200 * typeck.c (build_indirect_ref): Complain about a pointer to data
2201 member, too.
2202 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
2203 data member.
2204 * init.c (resolve_offset_ref): Don't undo the above.
2205
2206 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
2207 (struct lang_decl_flags): Add `bitfield'.
2208 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
2209 DECL_BIT_FIELD.
2210 * decl2.c (grokbitfield, grok_alignof): Likewise.
2211 * init.c (build_offset_ref): Likewise.
2212 * typeck.c (build_component_addr, expr_sizeof): Likewise.
2213 * cvt.c (build_up_reference): Don't crash if taking the address
2214 returns error_mark_node.
2215
2216 * decl.c (grokfndecl): Also check ctype when checking for ::main().
2217
2218 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
2219
2220 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
2221 Do mangling here.
2222 (grokdeclarator): Instead of here.
2223 * friend.c (do_friend): Lose special handling of ::main and
2224 __builtin_*.
2225 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
2226
2227 * spew.c (yylex): Clear looking_for_typename if we got
2228 'enum { ... };'.
2229
2230 1998-10-15 Mark Mitchell <mark@markmitchell.com>
2231
2232 * class.c (maybe_warn_about_overly_private_class): Improve error
2233 messages for class with only private constructors.
2234
2235 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
2236 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
2237 (build_typename_type): New function.
2238 * decl.c (build_typename_type): Broken out from ...
2239 (make_typename_type): Use it.
2240 * search.c (lookup_field): Likewise.
2241
2242 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2243
2244 * pt.c (convert_nontype_argument): Check against type_referred_to.
2245 * decl.c (grokvardecl): Check for declarator name before building
2246 DECL_ASSEMBLER_NAME.
2247
2248 1998-10-14 Mark Mitchell <mark@markmitchell.com>
2249
2250 * pt.c (lookup_template_class): Add comment.
2251 (instantiate_class_template): Don't mark the _TYPE node for
2252 member class templates as an instantiation.
2253
2254 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
2255
2256 * decl.c (grokfndecl): Fix my thinko.
2257
2258 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
2259
2260 * tinfo2.cc (fast_compare): Remove.
2261 (before): Just use strcmp.
2262 * tinfo.cc (operator==): Just use strcmp.
2263
2264 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
2265
2266 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
2267 declarations.
2268
2269 1998-10-13 Mark Mitchell <mark@markmitchell.com>
2270
2271 * cp-tree.h (specializations_of_same_template_p): Remove.
2272 * search.c (get_template_base): Don't use it.
2273 (get_template_base_recursive): Likewise.
2274 * pt.c (specializations_of_same_template_p): Remove.
2275 (unify): Don't use it.
2276 (lookup_template_class): Find the correct parent when setting
2277 CLASSTYPE_TI_TEMPLATE.
2278
2279 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2280
2281 * tinfo.cc (operator==): Always compare names.
2282
2283 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2284
2285 * decl.c (start_function): Fix cut-and-paste error.
2286
2287 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
2288
2289 * inc/typeinfo: Add #pragma interface.
2290 (operator!=): Just call operator==.
2291 * tinfo.cc: Add #pragma implementation.
2292 (operator==): Move from inc/typeinfo and tinfo2.cc.
2293 Check __COMMON_UNRELIABLE instead of _WIN32.
2294
2295 * typeck2.c (my_friendly_abort): Add URL.
2296
2297 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
2298
2299 * decl.c (start_method): Added extra parameter for attributes.
2300 * cp-tree.h (start_method): Update prototype.
2301 * parse.y (fn.def2): Update start_method parameter list.
2302
2303 1998-10-11 Mark Mitchell <mark@markmitchell.com>
2304
2305 * cp-tree.h (specializations_of_same_template_p): Declare.
2306 * pt.c (specializations_of_same_template_p): New function.
2307 (unify): Use it.
2308 * search.c (get_template_base): Use it.
2309 (get_template_base_recursive): Likewise.
2310
2311 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
2312
2313 * decl2.c (start_objects): Add new variable `joiner' and
2314 initialize it properly.
2315
2316 1998-10-09 Mark Mitchell <mark@markmitchell.com>
2317
2318 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
2319 change to vtable types.
2320
2321 * cvt.c (ocp_convert): Avoid infinite recursion caused by
2322 1998-10-03 change.
2323
2324 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
2325
2326 * pt.c (resolve_overloaded_unification): New fn.
2327 (try_one_overload): Likewise.
2328 (unify): Don't fail on unknown type.
2329 (type_unification_real): Likewise. Use resolve_overloaded_unification
2330 to handle an overloaded argument.
2331 (template_args_equal): Split out...
2332 (comp_template_args): From here.
2333 (determine_specialization): Also allow a template with more
2334 parms than were explicitly specified.
2335 * cp-tree.h: Add template_args_equal.
2336 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
2337
2338 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
2339
2340 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
2341 change.
2342
2343 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
2344
2345 * typeck.c (unsigned_type): Only return TItype nodes when
2346 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2347 (signed_type): Similarly.
2348 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
2349 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2350 (init_decl_processing): Only create TItype nodes when
2351 HOST_BITS_PER_WIDE_INT is >= 64 bits.
2352 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
2353 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
2354
2355 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2356
2357 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
2358 (gxx.gperf): Update comments describing invocation flags.
2359 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
2360
2361 1998-10-07 Mark Mitchell <mark@markmitchell.com>
2362
2363 * class.c (finish_struct_1): Add commentary on prevous change.
2364
2365 * cp-tree.h (vtbl_ptr_type_node): New variable.
2366 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
2367 already of the right type.
2368 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
2369 Simplify code to grow vtable.
2370 * decl.c (vtbl_ptr_type_node): Define.
2371 (init_decl_processing): Initialize it.
2372
2373 1998-10-06 Mark Mitchell <mark@markmitchell.com>
2374
2375 * cp-tree.def (PTRMEM_CST): New tree node.
2376 * cp-tree.h (ptrmem_cst): New type.
2377 (lang_type): Remove local_typedecls.
2378 (dummy): Increase to 12 bits from 11.
2379 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
2380 (PTRMEM_CST_CLASS): New macro.
2381 (PTRMEM_CST_MEMBER): Likewise.
2382 (current_access_specifier): New variable.
2383 (current_class_type): Remove duplicate declaration.
2384 (finish_struct): Change prototype.
2385 (unreverse_member_declarations): New function.
2386 (pushdecl_class_level): Change prototype.
2387 (grok_enum_decls): Remove.
2388 (fixup_anonymous_union): New function.
2389 (grok_x_components): Change prototype.
2390 (tsubst_chain): Remove.
2391 (finish_member_template_decl): Likewise.
2392 (check_explicit_specialization): Fix indentation.
2393 (finish_class_definition): Change prototype.
2394 (finish_member_class_template): Likewise.
2395 (finish_member_declaration): New function.
2396 (check_multiple_declarators): Likewise.
2397 * class.c (class_stack_node_t): New type.
2398 (current_class_base): Remove.
2399 (current_class_stack): Change type.
2400 (current_access_specifier): New variable.
2401 (grow_method): Remove.
2402 (check_member_decl_is_same_in_complete_scope): Break out from
2403 finish_struct.
2404 (make_method_vec): New function.
2405 (free_method_vec): Likewise.
2406 (add_implicitly_declared_members): Break out from finish_struct_1.
2407 (free_method_vecs): New variable.
2408 (add_method): Rework for direct use from parser.
2409 (handle_using_decl): Watch for NULL_TREE while iterating through
2410 CLASSTYPE_METHOD_VEC.
2411 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
2412 just do some error-checking.
2413 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
2414 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
2415 (finish_struct): Change prototype. Simplify; fields and methods
2416 are already set up at this point.
2417 (init_class_processing): Set up current_class_stack.
2418 (pushclass): Save current_access_specifier.
2419 (popclass): Restore it.
2420 (currently_open_class): Simplify.
2421 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
2422 * decl.c (saved_scope): Add access_specifier.
2423 (maybe_push_to_top_level): Save it.
2424 (pop_from_top_level): Restore it.
2425 (maybe_process_template_type_declaration): Use
2426 finish_member_declaration.
2427 (pushtag): Likewise.
2428 (pushdecl_class_level): Don't return a value.
2429 (fixup_anonymous_union): Break out from grok_x_components.
2430 (shadow_tag): Use it.
2431 (xref_tag): Complain about using an elaborated type specifier to
2432 reference a template type parameter or typedef name.
2433 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2434 (current_local_enum): Remove.
2435 (build_enumerator): Call finish_member_declaration.
2436 (grok_enum_decls): Remove.
2437 * decl2.c (grok_x_components): Simplify.
2438 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
2439 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
2440 (merge_functions): Add to comment.
2441 (arg_assoc_type): Prototype.
2442 (arg_assoc): Pass as many arguments as there are parameters.
2443 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
2444 OFFSET_REF.
2445 * expr.c (cpls_expand_expr): Remove dead code. Handle
2446 PTRMEM_CST.
2447 * friend.c (do_friend): Lookup friends when in nested classes.
2448 Change comments.
2449 * init.c (build_offset_ref): Do lookup even for classes that are
2450 only partially defined.
2451 (decl_constant_value): Remove dead code.
2452 * method.c (build_overload_value): Remove hack where by TYPE was
2453 not a TYPE. Handle PTRMEM_CST.
2454 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
2455 should go.
2456 * parse.y (components, notype_components, component_decl,
2457 component_decl_1, component_declarator, component_declarator0):
2458 Now all are itype rather than ttype. Rework to add members to
2459 classes on the fly.
2460 (typesqpecqual_reserved): Use check_multiple_declarators.
2461 (structsp): Update class to finish_class_definition.
2462 (do_xref_defn): Unsplit into named_class_head.
2463 (access_specifier): Set current_access_specifier.
2464 * pt.c (set_current_access_from_decl): New function.
2465 (finish_member_template_decl): Don't take the parameters.
2466 (comp_template_args): Make more robust.
2467 (lookup_template_class): Don't use current_local_enum.
2468 (for_each_template_parm): Handle PTRMEM_CST.
2469 (instantiate_class_template): Use set_current_access_from_decl,
2470 finish_member_declaration and unreverse_member_declarations. Set
2471 lineno/input_filename before generating implicit member functions.
2472 (type_unification_real): Don't assume back-unification happens
2473 only for the last argument.
2474 (regenerate_decl_from_template): Call pushclass a bit earlier.
2475 (tsubst_chain): Remove.
2476 (tsubst_enum): Use set_current_access_from_decl.
2477 (set_mangled_name_for_template_decl): Fix indentation.
2478 * search.c (lookup_fnfields_1): Change iteration through
2479 CLASSTYPE_METHOD_VEC.
2480 (dfs_pushdecls): Likewise.
2481 (dfs_compress_decls): Likewise.
2482 (add_conversions): Likewise.
2483 * semantics.c (finish_class_definition): Don't take components.
2484 Change call to finish_struct.
2485 (finish_member_declaration): New function.
2486 (finish_member_class_template): Don't take template parameters.
2487 Change call to grok_x_components. Call finish_member_template_decl.
2488 (check_multiple_declarators): New function.
2489 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
2490 a passed in fieldlist.
2491 * tree.c (search_tree): Handle PTRMEM_CST.
2492 (mapcar): Likewise.
2493 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
2494 INTEGER_CSTs, for pointer-to-data members.
2495
2496 * call.c (resolve_args): Resolve template specializations, if
2497 possible.
2498
2499 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2500
2501 * Makefile.in (spew.o): Depend on toplev.h.
2502
2503 * call.c (compare_ics): Initialize variables `deref_from_type2',
2504 `deref_to_type1' and `deref_to_type2'.
2505
2506 * except.c (get_eh_type): Hide prototype and definition.
2507 (process_start_catch_block_old): Remove unused static prototype.
2508
2509 * pt.c (tsubst_decl): Initialize variable `argvec'.
2510
2511 * spew.c: Include toplev.h.
2512
2513 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
2514
2515 * pt.c (instantiate_decl): Do save and restore file position.
2516
2517 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
2518
2519 * method.c (build_decl_overload_real): Clear
2520 numeric_output_need_bar after __.
2521
2522 1998-10-05 Nathan Sidwell <nathan@acm.org>
2523
2524 * call.c (build_new_method_call): Issue 'incomplete type' error,
2525 if class is not defined.
2526
2527 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2528
2529 * call.c (build_object_call): Move declaration of variable
2530 `fn' into the scope where it is used. Don't access variable
2531 `fn' when it is uninitialized, instead use `fns'.
2532
2533 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2534
2535 * errfn.c (cp_thing): Print buf as a string not as a printf format
2536 to avoid problems with the operator%. Consequently, `%%' sequences
2537 in format are copied as `%' in buf.
2538
2539 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
2540
2541 * pt.c (pop_tinst_level): Call extract_interface_info.
2542 (instantiate_decl): Don't save and restore file position.
2543
2544 * decl.c (cp_finish_decl): Make statics in extern inlines and
2545 templates common, if possible and the target doesn't support weak
2546 symbols.
2547
2548 * decl.c (grokdeclarator): Remove redundant calls to
2549 build_type_variant and some duplicated code.
2550 * sig.c (build_signature_reference_type): Only take the type parm.
2551 (build_signature_pointer_type): Likewise.
2552 * tree.c (build_cplus_method_type): Adjust.
2553 * cp-tree.h: Update.
2554
2555 1998-10-04 Mark Mitchell <mark@markmitchell.com>
2556
2557 * call.c (build_over_call): Make pedwarns about dropped qualifiers
2558 into full-fledged errors.
2559 * cvt.c (convert_to_reference): Likewise.
2560 * typeck.c (convert_for_assignment): Likewise.
2561
2562 * search.c (expand_upcast_vtables): In addition to unsetting
2563 TREE_READONLY, remove top-level const type qualifier.
2564
2565 1998-10-03 Mark Mitchell <mark@markmitchell.com>
2566
2567 * class.c (current_class_ptr, current_class_ref): Clarify
2568 documentation.
2569 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
2570 NOP type conversions.
2571 * decl.c (decls_match): Use comptypes directly; ignore
2572 qualifiers on the DECL.
2573 (duplicate_decls): Remove qualifier checks on DECL.
2574 (grokdeclarator): Make the type built up include top-level
2575 qualifiers.
2576 * decl2.c (do_dtors): Fix spelling error.
2577 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
2578 when printing type information.
2579 * init.c (build_new_1): Add documentation. Deal with the fact
2580 that type of allocated memory now contains qualifiers.
2581 * lex.c (is_global): Improve error-recovery.
2582 * sig.c (build_member_function_pointer): Don't cast away const
2583 on fields of sigtable_entry_type.
2584 * tree.c (lvalue_type): Don't look at top-level qualifiers on
2585 expressions.
2586 * typeck.c (decay_conversion): Likewise.
2587 (build_component_ref): Make sure the type of the COMPONENT_REF
2588 contains top-level qualifiers, as appropriate. Improve
2589 error-handling.
2590 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
2591 (build_array_ref): Likewise.
2592 (build_unary_op): Improve error-recovery.
2593 (unary_complex_lvalue): Make taking the address a bound member
2594 function an error, not a sorry.
2595 (build_conditional_expr): Look at the type qualifiers, not the
2596 qualifiers on the expression itself.
2597
2598 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
2599
2600 * decl2.c (merge_functions): Remove duplicates.
2601
2602 * decl2.c: Add -f{no-,}implicit-inline-templates.
2603 (import_export_decl): Check it.
2604
2605 * decl.c (lookup_name_real): Template parms also take precedence
2606 over implicit typename. Only warn if yylex.
2607
2608 * typeck.c (build_conditional_expr): Only fold if ifexp is an
2609 INTEGER_CST.
2610
2611 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
2612 instead of linkage.
2613
2614 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
2615
2616 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
2617 * class.c (build_vbase_pointer): Use it.
2618 * rtti.c (expand_class_desc): Likewise.
2619 * tree.c (build_vbase_pointer_fields): Likewise.
2620
2621 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
2622
2623 * decl.c (start_decl): Add invocation of
2624 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
2625 (start_function): Add invocation of
2626 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
2627
2628 * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with
2629 HANDLE_GENERIC_PRAGMAS.
2630
2631 1998-09-28 Anthony Green <green@cygnus.com>
2632
2633 * semantics.c (finish_asm_stmt): Always permit volatile asms.
2634
2635 1998-09-28 Mark Mitchell <mark@markmitchell.com>
2636
2637 * decl.c (grokdeclarator): Tighten checks for invalid
2638 destructors. Improve error-messages and error-recovery.
2639 * decl2.c (check_classfn): Don't assume that mangled destructor
2640 names contain type information.
2641
2642 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
2643
2644 * search.c (get_base_distance): Remove assert.
2645
2646 * decl2.c (build_anon_union_vars): Don't process a field with no
2647 name.
2648 (finish_anon_union): Also complain about local anon unions with no
2649 members.
2650
2651 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
2652
2653 * decl.c (lookup_namespace_name): If the name is a namespace,
2654 return it immediately.
2655
2656 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2657
2658 * cp-tree.h (define_case_label): Remove unused parameter.
2659 (check_java_method): Likewise.
2660 (grokclassfn): Likewise.
2661 (expand_aggr_init): Likewise.
2662 (build_x_delete): Likewise.
2663 (maybe_end_member_template_processing): Likewise.
2664 (unshare_base_binfos): Add prototype.
2665 (string_conv_p): Likewise.
2666 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
2667
2668 * cvt.c (build_up_reference): Remove unused parameter
2669 `checkconst', all callers changed.
2670 (build_type_conversion): Mark parameter `code' with
2671 ATTRIBUTE_UNUSED.
2672 (build_expr_type_conversion): Initialize variable `conv'.
2673
2674 * decl.c (push_namespace): Initialize variable `d'.
2675 (define_case_label): Remove unused parameter `decl', all callers
2676 changed.
2677
2678 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
2679 `argc' with ATTRIBUTE_UNUSED.
2680 (grokclassfn): Remove unused parameter `cname', all callers
2681 changed.
2682 (check_java_method): Likewise for parameter `ctype'.
2683 (copy_assignment_arg_p): Mark parameter `virtualp' with
2684 ATTRIBUTE_UNUSED.
2685 (finish_prevtable_vardecl): Likewise for parameter `prev'.
2686
2687 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
2688
2689 * init.c (expand_aggr_init_1): Remove unused parameter
2690 `alias_this', all callers changed.
2691 (expand_aggr_init): Likewise.
2692 (expand_default_init): Likewise.
2693 (build_new_1): Initialize variable `susp'.
2694 (build_x_delete): Remove unused parameter `type', all callers
2695 changed.
2696
2697 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
2698 ATTRIBUTE_UNUSED.
2699 (readescape): Use (unsigned) value in shift.
2700 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
2701 comparing to a signed quantity.
2702
2703 * pt.c (maybe_end_member_template_processing): Remove unused
2704 parameter `decl', all callers changed.
2705 (check_explicit_specialization): Add braces around empty body in
2706 an else-statement.
2707 (current_template_args): Initialize variable `args'.
2708 (lookup_template_class): Likewise for variable `prev_local_enum'.
2709 (tsubst_decl): Likewise for variable `r'.
2710 (set_mangled_name_for_template_decl): Initialize variable
2711 `context'.
2712
2713 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
2714 Likewise for variable `i'.
2715 (yylex): Initialize variable `trrr'.
2716
2717 * typeck.c (compparms): Mark variable `strict' with
2718 ATTRIBUTE_UNUSED.
2719
2720 * xref.c (simplify_type): Cast argument of ctype function to
2721 `unsigned char'.
2722
2723 1998-09-24 Mark Mitchell <mark@markmitchell.com>
2724
2725 * cp-tree.h (language_lvalue_valid): Remove.
2726 * decl.c (grokdeclarator): Don't disallow references to functions.
2727 * tree.c (lvalue_p_1): New function, combining duplicated
2728 code from ...
2729 (lvalue_p): Use it.
2730 (real_lvalue_p): Likewise.
2731 * typeck.c (language_lvalue_valid): Remove.
2732 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
2733 they don't have TREE_READONLY set.
2734 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
2735
2736 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
2737
2738 * spew.c (yylex): Give diagnostic.
2739 * hash.h (is_reserved_word): Add export.
2740 * gxx.gperf: Ditto.
2741 * lex.h (rid): Add RID_EXPORT.
2742 * lex.c (init_parse): Ditto.
2743
2744 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2745
2746 * friend.c (do_friend): Make warning a full sentence.
2747
2748 1998-09-22 Mark Mitchell <mark@markmitchell.com>
2749
2750 * parse.y (component_decl_list): Improve error-recovery.
2751
2752 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
2753
2754 * decl.c (make_typename_type): Move error to point where name
2755 variable can be used by dump_type.
2756
2757 1998-09-22 Mark Mitchell <mark@markmitchell.com>
2758
2759 * decl.c (grokfndecl): Improve error-recovery.
2760 * decl2.c (grokfield): Likewise.
2761 * pt.c (finish_member_template_decl): Likewise.
2762
2763 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
2764
2765 * method.c (hack_identifier): Finding multiple members is always
2766 an error.
2767
2768 1998-09-21 Per Bothner <bothner@cygnus.com>
2769
2770 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
2771
2772 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
2773
2774 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
2775
2776 1998-09-20 Mark Mitchell <mark@markmitchell.com>
2777
2778 * class.c (maybe_warn_about_overly_private_class): Reformat.
2779
2780 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
2781
2782 * exception.cc (__cplus_type_matcher): realign some code.
2783
2784 1998-09-16 Mark Mitchell <mark@markmitchell.com>
2785
2786 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
2787 (tinfo2.o): Likewise.
2788 (exception.o): Likewise.
2789 (new.o): Likewise.
2790 (opnew.o): Likewise.
2791 (opnewnt.o): Likewise.
2792 (opvnew.o): Likewise.
2793 (opvnewnt.o): Likewise.
2794 (opdel.o): Likewise.
2795 (opdelnt.o): Likewise.
2796 (opvdel.o): Likewise.
2797 (opvdelnt.o): Likewise.
2798
2799 1998-09-16 Richard Henderson <rth@cygnus.com>
2800
2801 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
2802
2803 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
2804
2805 * call.c (build_field_call): handle static data members too
2806
2807 * typeck.c (comptypes): when comparing pointer types, check
2808 whether referred types match even in strictest modes
2809
2810 1998-09-15 Mark Mitchell <mark@markmitchell.com>
2811
2812 * cp-tree.h: Revert previous change.
2813 (finish_struct_methods): Remove declaration.
2814 * class.c: Revert previous change.
2815 (maybe_warn_about_overly_private_class): New function.
2816 (finish_struct_methods): Declare here, and make static. Remove
2817 unnecessary parameters. Tidy slightly. Use
2818 maybe_warn_about_overly_private_class.
2819 (finish_struct_1): Adjust. Remove check for private constructors,
2820 now done elsewhere.
2821 (finish_struct): Adjust.
2822
2823 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
2824
2825 * except.c (expand_start_catch_block): No need to check for new
2826 exception model.
2827 (process_start_catch_block_old): Deleted.
2828 (process_start_catch_block): Add call to start_decl_1().
2829 (expand_end_catch_block): Add call to end_catch_handler().
2830 * exception.cc (__cplus_type_matcher): Only check the exception
2831 language if there is an exception table.
2832
2833 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
2834
2835 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
2836 as used to prevent conflicts with virtual function tables.
2837
2838 1998-09-14 Mark Mitchell <mark@markmitchell.com>
2839
2840 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
2841 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
2842 * class.c (maybe_class_too_private_p): New function.
2843 (finish_struct_methods): Use it.
2844 (finish_struct_1): Likewise.
2845 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
2846 appropriate.
2847
2848 * pt.c (check_specialization_scope): Fix spelling error.
2849 (check_explicit_specialization): Remove code to handle explicit
2850 specializations in class scope; they are now correctly diagnosed
2851 as errors.
2852
2853 1998-09-10 Mark Mitchell <mark@markmitchell.com>
2854
2855 * decl.c (pushdecl): Don't copy types if the
2856 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
2857 type.
2858
2859 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2860
2861 * class.c (get_enclosing_class): New function.
2862 (is_base_of_enclosing_class): Likewise.
2863 * cp-tree.h (get_enclosing_class): Declare.
2864 (is_base_of_enclosing_class): Likewise.
2865 * pt.c (coerce_template_parms): Use them.
2866
2867 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
2868
2869 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
2870 null to decide whether to use it.
2871
2872 * error.c (dump_type_real): Handle NAMESPACE_DECL.
2873 * parse.y (base_class.1): Avoid crash on error.
2874
2875 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
2876
2877 * decl.c (make_typename_type): If context is a namespace, the code
2878 is in error.
2879
2880 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
2881
2882 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
2883
2884 1998-09-08 Mark Mitchell <mark@markmitchell.com>
2885
2886 * cp-tree.h (anonymous_namespace_name): Declare.
2887 * decl.c: Define it.
2888 (push_namespace): Use anonymous_namespace_name, rather than local
2889 static anon_name.
2890 * error.c (dump_decl): If a namespace is named
2891 anonymous_namespace_name, call it {anonymous}.
2892
2893 * decl.c (grokparms): Distinguish between references and pointers
2894 in error message.
2895
2896 1998-09-08 Richard Henderson <rth@cygnus.com>
2897 Mark Mitchell <mark@markmitchell.com>
2898
2899 * pt.c (process_partial_specialization): Consistantly allocate
2900 and zero tpd.parms based on ntparms. Use tpd2.parms, not
2901 tpd.parms, where appropriate.
2902
2903 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
2904
2905 * Makefile.in (INCLUDES): Update after recent toplevel gcc
2906 reorganizations.
2907
2908 1998-09-05 Mark Mitchell <mark@markmitchell.com>
2909
2910 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
2911 * class.c (finish_struct): Remove hackery to deal with explicit
2912 specializations in class scope.
2913 * decl.c (grokfndecl): Improve error-recovery.
2914 * decl2.c (grokfield): Likewise.
2915 * pt.c (check_specialization_scope): New function.
2916 (begin_specialization): Call it.
2917 (process_partial_specialization): New function, split out from
2918 push_template_decl. Check partial specializations more
2919 stringently.
2920 (push_template_decl): Call it.
2921 (check_explicit_specialization): Don't attempt to handle explicit
2922 specializations in class scope.
2923 (template_parm_data): Document. Add current_arg and
2924 arg_uses_template_parms.
2925 (mark_template_parm): Set it.
2926 (tsubst_arg_types): Remove unused variable.
2927 * semantics.c (begin_class_definition): Tweak.
2928
2929 1998-09-04 Mark Mitchell <mark@markmitchell.com>
2930
2931 * inc/typeinfo (type_info::type_info(const char*)): Make
2932 `explicit'.
2933
2934 * cp-tree.h (hash_tree_cons_simple): New macro.
2935 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
2936 (coerce_template_parms): Use make_temp_vec, instead of
2937 make_tree_vec. Document this behavior.
2938 (lookup_template_class): Likewise.
2939 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
2940 Remove dead code (and add ssertion to check its deadness). Fix
2941 bug w.r.t. exception specifications.
2942
2943 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
2944
2945 * decl2.c (import_export_vtable): Always make artificials comdat.
2946 (import_export_decl): Likewise.
2947 * pt.c (mark_decl_instantiated): Likewise.
2948
2949 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2950
2951 * cp-tree.h (finish_globally_qualified_member_call_expr):
2952 Rename to ...
2953 (finish_qualified_call_expr).
2954 * semantics.c: Likewise.
2955 * parse.y (primary): Use it.
2956 * method.c (hack_identifier): Remove redundant code.
2957
2958 * init.c (resolve_offset_ref): Call convert_from_reference to
2959 handle members of reference type. Improve error recovery.
2960
2961 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
2962
2963 * cp-tree.h: Declare warn_nontemplate_friend.
2964 * decl2.c (lang_decode_option): Set.
2965 * lang-options.h: Add -Wnon-template-friend.
2966 * friend.c (do_friend): Use to toggle non-template function warning.
2967
2968 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2969
2970 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
2971 corresponding INTEGER_CSTs when processing_template_decl.
2972 * pt.c (tsubst_enum): Tweak accordingly.
2973
2974 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2975
2976 * decl.c (pushdecl_class_level): Add warning here.
2977 (pushdecl): Tweak.
2978
2979 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
2980
2981 * cvt.c (convert_pointer_to_real): Tidy.
2982 * search.c (get_base_distance_recursive): Simplify.
2983 (get_base_distance): Likewise.
2984
2985 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
2986 parms.
2987
2988 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
2989
2990 * lex.c (check_newline): Call HANDLE_PRAGMA before
2991 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
2992 if unknown pragmas are encountered.
2993 (handle_sysv_pragma): Interpret return code from
2994 handle_pragma_token (). Return success/failure indication rather
2995 than next unprocessed character.
2996 (pragma_getc): New function: retrieves characters from the
2997 input stream. Defined when HANDLE_PRAGMA is defined.
2998 (pragma_ungetc): New function: replaces characters back into the
2999 input stream. Defined when HANDLE_PRAGMA is defined.
3000
3001 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3002
3003 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
3004 * class.c (build_vtable_entry_ref): Likewise.
3005
3006 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3007
3008 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
3009 * decl2.c (import_export_decl): Likewise.
3010 * pt.c (instantiate_decl): Use it.
3011
3012 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
3013
3014 * decl.c (lookup_name_real): Also do implicit typename thing for
3015 artificial TYPE_DECLs.
3016 * search.c (lookup_field): Likewise.
3017 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
3018 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
3019 (enter_scope_of): Extract type from implicit typename.
3020 (begin_class_definition): Likewise.
3021 * lex.c (identifier_type): Handle implicit typename when checking
3022 for SELFNAME.
3023
3024 * cp-tree.h: Declare flag_strict_prototype.
3025 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
3026 -fstrict-prototype.
3027 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
3028 specified, set it to the value of pedantic.
3029
3030 1998-09-01 Mark Mitchell <mark@markmitchell.com>
3031
3032 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
3033
3034 1998-08-31 Mark Mitchell <mark@markmitchell.com>
3035
3036 * decl.c (finish_enum): Handle member enums of classes declared in
3037 template functions.
3038
3039 * decl2.c (grok_x_components): Strip attributres before calling
3040 groktypename.
3041
3042 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
3043
3044 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
3045 -fenum-int-equivalence and -fno-nonnull-objects.
3046 * class.c (check_for_override): Remove support for -fall-virtual.
3047 (finish_struct_1): Likewise.
3048 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
3049 * typeck.c (build_binary_op_nodefault): Likewise.
3050 * cvt.c (ocp_convert): Likewise.
3051 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
3052 * class.c (build_vbase_path): Likewise.
3053
3054 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
3055
3056 * Makefile.in (INTERFACE): New, set to 1.
3057
3058 1998-08-30 Mark Mitchell <mark@markmitchell.com>
3059
3060 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
3061 comparing with global_namespace.
3062 (dump_aggr_type): Likewise.
3063
3064 * decl.c (grokfndecl): Issue error on declaration of friend
3065 templates with explicit template arguments.
3066
3067 * pt.c (convert_template_argument): New function, split out
3068 from...
3069 (coerce_template_parms): Here.
3070 (tsubst): Attempt better error-recovery.
3071
3072 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
3073
3074 * pt.c (decl_template_parm_p): Add checks for
3075 TEMPLATE_TEMPLATE_PARM.
3076
3077 1998-08-28 Mark Mitchell <mark@markmitchell.com>
3078
3079 * lex.c (do_identifier): Fix thinko in previous change.
3080
3081 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
3082
3083 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
3084 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
3085
3086 1998-08-28 Richard Henderson <rth@cygnus.com>
3087
3088 Add support for discarding unused virtual functions.
3089 * lang-options.h: Add -fvtable-gc.
3090 * cp-tree.h: Add flag_vtable_gc.
3091 * decl2.c (output_vtable_inherit): New fn.
3092 (finish_vtable_vardecl): Call it.
3093 * class.c (build_vtable_entry_ref): New fn.
3094 (build_vtbl_ref): Call it.
3095
3096 1998-08-28 Mark Mitchell <mark@markmitchell.com>
3097
3098 * cp-tree.h (build_enumerator): Take the enumeration type as a
3099 paramter.
3100 * decl.c (finish_enum): Don't set the TREE_TYPE for the
3101 enumeration constant values if we're processing_template_decls.
3102 Don't set the type for the CONST_DECLs either; that's done in
3103 build_enumerator.
3104 (build_enumerator): Take the enumeration type as a
3105 parameter.
3106 * lex.c (do_identifier): Don't resolve enumeration constants while
3107 processing template declarations, even if they happen to be
3108 TEMPLATE_PARM_INDEXs.
3109
3110 * parse.y (current_enum_type): New variable.
3111 (primary): Don't allow statement-expression in local classes just
3112 as we don't in global classes.
3113 (structsp): Use current_enum_type.
3114 (enum_list): Likewise.
3115 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
3116 finish_enum; they no longer occur.
3117
3118 * cp-tree.h (finish_base_specifier): New function.
3119 * parse.y (base_class): Use it.
3120 * semantics.c (finish_base_specifier): Define it.
3121
3122 * parse.y (structsp): Warn on use of typename outside of template
3123 declarations.
3124
3125 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
3126
3127 * lex.c (handle_cp_pragma): Remove #pragma vtable.
3128 * lang-options.h: Remove +e options.
3129 * decl2.c (lang_decode_option): Likewise.
3130 (import_export_vtable): Don't check write_virtuals.
3131 (finish_vtable_vardecl, finish_file): Likewise.
3132 * search.c (dfs_debug_mark): Likewise.
3133 * semantics.c (begin_class_definition): Likewise.
3134 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
3135
3136 * call.c (build_over_call): Check flag_elide_constructors.
3137 * decl2.c: flag_elide_constructors defaults to 1.
3138 * typeck.c (convert_arguments): Remove return_loc parm.
3139 (build_function_call_real): Adjust.
3140
3141 * search.c: Tear out all mi_matrix and memoize code.
3142 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
3143 * lang-options.h: Remove documentation for -fhandle-exceptions,
3144 -fmemoize-lookups and -fsave-memoized.
3145 * cp-tree.h: Lose mi_matrix and memoize support.
3146 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
3147 * class.c: Lose struct class_level.
3148 (pushclass, popclass): Lose memoize support.
3149 * init.c (build_offset_ref): Likewise.
3150
3151 Never change BINFO_INHERITANCE_CHAIN.
3152 * init.c (emit_base_init): Change modification of
3153 BINFO_INHERITANCE_CHAIN to an assert.
3154 * search.c (get_base_distance_recursive): Likewise.
3155 (get_base_distance): Likewise.
3156 (lookup_member): Likewise.
3157 (convert_pointer_to_single_level): Likewise.
3158 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
3159 (lookup_fnfields): Likewise.
3160 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
3161 (unshare_base_binfos): Don't call propagate_binfo_offsets.
3162 (layout_basetypes): Call propagate_binfo_offsets instead of
3163 unshare_base_binfos.
3164 * decl.c (xref_basetypes): Call unshare_base_binfos.
3165 * pt.c (instantiate_class_template): Likewise.
3166 * tree.c (reverse_path): Remove 'copy' parm; always make a
3167 temporary copy.
3168 * class.c (build_vbase_path): Just call it.
3169 * search.c (compute_access): Likewise. Don't re-reverse.
3170
3171 1998-08-27 Mark Mitchell <mark@markmitchell.com>
3172
3173 * class.c (build_vbase_path): Use reverse_path.
3174 (finish_base_struct): Move warnings for inaccessible bases to
3175 layout_basetypes.
3176 (modify_one_vtable): Remove check of TREE_USED (binfo).
3177 (fixup_vtable_deltas1): Likewise.
3178 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
3179 (xref_tag): Remove binfos parameter.
3180 (make_binfo): Remove chain parameter.
3181 (reverse_path): Add copy parameter.
3182 * decl.c (init_decl_processing): Change calls to xref_tag.
3183 (xref_tag): Remove binfos parameter.
3184 (xref_basetypes): Change calls to make_binfo.
3185 * decl2.c (grok_x_components): Change calls to xref_tag.
3186 (handle_class_head): Likewise.
3187 * friend.c (do_friend): Likewise.
3188 * lex.c (make_lang_type): Change calls to make_binfo.
3189 * parse.y (structsp): Change calls to xref_tag.
3190 (named_complex_class_head_sans_basetype): Likewise.
3191 (named_class_head): Likewise.
3192 * rtti.c (init_rtti_processing): Likewise.
3193 * search.c (compute_access): Change calls to reverse_path.
3194 (dfs_get_vbase_types): Change calls to make_binfo.
3195 (get_vbase_types): Remove dead code.
3196 * tree.c (unshare_base_binfos): Change calls to make_binfo.
3197 (layout_basetypes): Warn here about inaccessible bases.
3198 (make_binfo): Remove chain parameter.
3199 (reverse_path): Add copy parameter.
3200
3201 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
3202
3203 * class.c: #if 0 complete_type_p.
3204 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
3205 * method.c (process_overload_item): Likewise.
3206 * typeck.c (comp_target_types): Likewise.
3207
3208 Stop sharing binfos for indirect virtual bases.
3209 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
3210 (layout_basetypes): Likewise.
3211 (unshare_base_binfos): Copy vbases, too.
3212 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
3213 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
3214 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
3215 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
3216 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
3217 reference to BINFO_VIA_PUBLIC.
3218 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
3219 (push_class_decls): Use them.
3220 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
3221 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
3222
3223 1998-08-27 Mark Mitchell <mark@markmitchell.com>
3224
3225 * decl.c (build_enumerator): Set DECL_CONTEXT for the
3226 CONST_DECLs.
3227
3228 1998-08-26 Mark Mitchell <mark@markmitchell.com>
3229
3230 * cp-tree.h (finish_enum): Change prototype.
3231 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
3232 VALUES parameter. Don't try to compute mins/maxs if
3233 processing_template_decl.
3234 * parse.y (structsp): Use new calling sequence for finish_enum.
3235 * pt.c (tsubst_enum): Likewise. Take the new type as input.
3236 (lookup_template_class): Remove unused variables. Tweak.
3237 Register enums on instantiation list before substituting
3238 enumeration constants.
3239 (tsubst_decl): Remove unused variables.
3240 (regenerate_decl_from_template): Likewise.
3241
3242 * decl.c (duplicate_decls): Don't obliterate the
3243 DECL_TEMPLATE_INFO for a template if we're not replacing it with
3244 anything.
3245
3246 * lex.c (do_identifier): Fix typo in comment.
3247
3248 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3249
3250 * errfn.c: Remove stdarg.h/varargs.h.
3251 * tree.c: Likewise.
3252
3253 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
3254
3255 * pt.c (tsubst_copy): Only do typename overloading on an
3256 IDENTIFIER_NODE that happens to look like a typename if it actually
3257 has a type for us to use.
3258
3259 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
3260
3261 * typeck.c (comp_cv_target_types): Split out...
3262 (comp_target_types): From here. Don't allow cv-qual changes under
3263 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
3264 (build_ptrmemfunc): Pass 1 to nptrs.
3265 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
3266
3267 1998-08-25 Mark Mitchell <mark@markmitchell.com>
3268
3269 * search.c (dependent_base_p): Don't compare a binfo to
3270 current_class_type; use the TREE_TYPE of the binfo instead.
3271
3272 * cp-tree.h (CLASS_TYPE_P): Revise definition.
3273
3274 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
3275
3276 * decl.c (duplicate_decls): Don't complain about different
3277 exceptions from an internal decl even if pedantic.
3278
3279 * typeck.c (convert_for_assignment): Converting from pm of vbase
3280 to derived is an error, not a sorry.
3281
3282 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
3283 * class.c (fixed_type_or_null): Rename from
3284 resolves_to_fixed_type_p. Return the dynamic type of the
3285 expression, if fixed, or null.
3286 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
3287 does not match the static type.
3288 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
3289 resolves_to_fixed_type_p again.
3290
3291 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3292
3293 * pt.c (tsubst_decl): Move special case code for dealing with
3294 tricky friend templates here from ...
3295 (regenerate_decl_from_template): Here.
3296
3297 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3298
3299 * decl.c (start_decl): Remove redundant linkage check.
3300
3301 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
3302
3303 * typeck.c (c_expand_return): Handle the case that valtype
3304 is wider than the functions return type.
3305
3306 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3307
3308 * cp-tree.h (CLASS_TYPE_P): New macro.
3309 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
3310 * pt.c (process_template_parm): Undo previous change.
3311
3312 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
3313
3314 * cp-tree.h: Declare.
3315 * pt.c (decl_template_parm_p): New function.
3316 * decl.c (pushdecl): Check decls for redeclaring template parms.
3317 (xref_tag): Make redeclaration an error, print decl.
3318 * decl2.c (grokfield): Check field_decls for redeclaration as well.
3319
3320 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3321
3322 * parse.y (primary): Fix up the type of string constants.
3323
3324 1998-08-24 Mark Mitchell <mark@markmitchell.com>
3325
3326 * typeck.c (convert_for_initialization): Move check for odd uses
3327 of NULL to avoid duplicate warnings.
3328
3329 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
3330
3331 * tree.c (lvalue_type): Fix for arrays.
3332 * typeck.c (string_conv_p): New fn.
3333 (convert_for_assignment): Use it.
3334 (build_unary_op): Use lvalue_type.
3335 * call.c (standard_conversion, convert_like): Use string_conv_p.
3336 (add_function_candidate): Use lvalue_type.
3337 * cvt.c (convert_to_reference): Likewise.
3338 * decl2.c (lang_decode_option): Ignore -traditional.
3339 * decl.c (init_decl_processing): flag_writable_strings inhibits
3340 flag_const_strings.
3341
3342 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
3343
3344 * lang-options.h (lang_options): Add fconst-strings to the list
3345 of valid options.
3346 * decl2.c (lang_f_options, lang_decode_option): Likewise.
3347
3348 1998-08-24 Nathan Sidwell <nathan@acm.org>
3349
3350 * lex.c (real_yylex): Don't warn about long long constants if
3351 we're allowing long long.
3352
3353 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3354
3355 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
3356 accessing bindings directly.
3357
3358 * search.c (my_tree_cons): Reimplement.
3359
3360 * lang-specs.h: Remove __HONOR_STD.
3361 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
3362
3363 1998-08-23 Mark Mitchell <mark@markmitchell.com>
3364
3365 * decl.c (grokdeclarator): Complain about in-class initialization
3366 of aggregates and/or references.
3367 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
3368 TEMPLATE_TYPE_PARMs.
3369
3370 * decl2.c (grok_array_decl): Add comment.
3371 (mark_used): Don't instantiate an explicit instantiation.
3372 * friend.c (make_friend_class): Remove bogus comment. Fix check
3373 for partial specializations.
3374 * pt.c (check_explicit_specialization): Don't
3375 SET_DECL_EXPLICIT_INSTANTIATION here.
3376 (mark_decl_instantiated): Or here.
3377 (do_decl_instantiation): Do it here, instead. Add checks for
3378 duplicate explicit instantiations, etc. Tidy.
3379 (do_type_instantiation): Likewise.
3380 (instantiate_decl): Improve comments. Complain about explicit
3381 instantiations where no definition is available.
3382
3383 * cp-tree.h (ansi_null_node): Remove.
3384 * call.c (build_over_call): Warn about converting NULL to an
3385 arithmetic type.
3386 * cvt.c (build_expr_type_conversion): Likewise. Use
3387 null_ptr_cst_p instead of expanding it inline.
3388 * decl.c (ansi_null_node): Remove.
3389 (init_decl_processing): Make null_node always have integral type.
3390 * except.c (build_throw): Warn about converting NULL to an
3391 arithmetic type.
3392 * lex.c (init_parse): Remove handling of ansi_null_node.
3393 * pt.c (type_unification_real): Don't convert NULL to void* type.
3394 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
3395 (convert_for_assignment): Warn about converting NULL to an
3396 arithmetic type.
3397 (convert_for_initialization): Likewise.
3398
3399 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3400
3401 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
3402 * pt.c (coerce_template_parms): Use no_linkage_check.
3403 * decl.c (grokvardecl): Likewise.
3404 (grokfndecl): Likewise. Members of anonymous types have no linkage.
3405
3406 * method.c (process_overload_item): Remove useless code.
3407
3408 1998-08-20 Per Bothner <bothner@cygnus.com>
3409
3410 Handle new'ing of Java classes.
3411 * init.c (build_class_classref): New function.
3412 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
3413 constructor does not return this; don't need to exception-protect.
3414
3415 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
3416 * decl2.c (acceptable_java_type): Handle template-derived types.
3417
3418 1998-08-20 Per Bothner <bothner@cygnus.com>
3419
3420 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
3421
3422 1998-08-20 Mark Mitchell <mark@markmitchell.com>
3423
3424 * decl.c (duplicate_decls): Always merge the old and new patterns
3425 for templates, regardless of whether or not the new one has
3426 DECL_INITIAL. Don't throw away specializations. Merge
3427 DECL_SAVED_TREE.
3428 * pt.c (tsubst_decl): Use the right pattern when calculating the
3429 complete args for a new template instance.
3430 (do_decl_instantiation): Fix typo in comment.
3431 (regenerate_decl_from_template): Deal with tricky friend template
3432 case.
3433 (instantiate_decl): Likewise.
3434
3435 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
3436
3437 * init.c (build_builtin_delete_call): Add missing assemble_external
3438 call.
3439
3440 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
3441
3442 * parse.y (notype_unqualified_id): Also accept ~A<int>.
3443
3444 1998-08-19 Mark Mitchell <mark@markmitchell.com>
3445
3446 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
3447 arithmetic.
3448 * except.c (build_throw): Warn when NULL is thrown, even with
3449 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
3450 thrown expression.
3451
3452 * cp-tree.h (ansi_null_node): New variable.
3453 * decl.c (ansi_null_node): New variable.
3454 (init_decl_processing): Initialize its type.
3455 * lex.c (init_parse): Initialize its value. Use ansi_null_node
3456 for null_node in non-ANSI mode.
3457 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
3458 place of null_node to avoid spurious errors.
3459
3460 1998-08-17 Mark Mitchell <mark@markmitchell.com>
3461
3462 * cp-tree.h (enter_scope_of): New function.
3463 * parse.y (complex_direct_notype_declarator): Use it.
3464 * semantics.c (enter_scope_of): New function.
3465
3466 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
3467
3468 * decl.c (grokparms): No, here.
3469
3470 * decl.c (grokdeclarator): Catch parm with pointer to array of
3471 unknown bound here...
3472 * method.c (process_overload_item): ...not here.
3473
3474 * gxxint.texi: Remove obsolete documentation of overloading code.
3475
3476 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
3477 * class.c (finish_struct_bits): Likewise.
3478
3479 * tree.c (lvalue_type): Fix for arrays.
3480 * typeck.c (build_unary_op): Use lvalue_type.
3481 * call.c (add_function_candidate): Likewise.
3482 * cvt.c (convert_to_reference): Likewise.
3483
3484 * decl2.c (lang_decode_option): Ignore -traditional.
3485
3486 * init.c (build_offset_ref): Don't mess with error_mark_node.
3487 * lex.c (do_scoped_id): Use cp_error.
3488
3489 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
3490
3491 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
3492
3493 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
3494
3495 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
3496
3497 * cp-tree.h (set_identifier_local_value): Provide prototype.
3498
3499 * decl2.c (do_namespace_alias): Remove unused variables `binding'
3500 and `old'.
3501
3502 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
3503
3504 * Makefile.in: Rename BBISON to BISON so that it can be properly
3505 inherited from the parent makefile.
3506
3507 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
3508
3509 * lang-options.h: Add -finit-priority.
3510 * decl2.c: Likewise. Check flag_init_priority instead of
3511 USE_INIT_PRIORITY.
3512
3513 * decl2.c (setup_initp): New fn.
3514 (start_objects, finish_objects, do_ctors): Handle init_priority.
3515 (do_dtors, finish_file): Likewise.
3516
3517 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
3518
3519 * pt.c (tsubst_copy): Hush warning.
3520
3521 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
3522
3523 1998-08-12 Mark Mitchell <mark@markmitchell.com>
3524
3525 * pt.c (print_template_context): Don't abort when instantiating a
3526 synthesized method.
3527
3528 * decl.c (grokdeclarator): Issue errors on namespace qualified
3529 declarators in parameter lists or in class scope.
3530
3531 1998-08-09 Mark Mitchell <mark@markmitchell.com>
3532
3533 * pt.c (check_explicit_specialization): Don't abort on bogus
3534 explicit instantiations.
3535
3536 1998-08-07 Mark Mitchell <mark@markmitchell.com>
3537
3538 * typeck.c (require_complete_type): Use complete_type_or_else.
3539 (complete_type_or_else): Always return NULL_TREE on failure, as
3540 documented.
3541
3542 * pt.c (tsubst_aggr_type): Prototype.
3543 (tsubst_decl): New function, split out from tsubst. Set
3544 input_filename and lineno as appropriate.
3545 (pop_tinst_level): Restore the file and line number saved in
3546 push_tinst_level.
3547 (instantiate_class_template): Set input_filename and lineno as
3548 appropriate.
3549 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
3550 context for a TYPENAME_TYPE is complete.
3551
3552 * decl2.c (grokbitfield): Issue errors on bitfields declared with
3553 function type.
3554 (do_dtors): As in do_ctors, pretend to be a member of the same
3555 class as a static data member while generating a call to its
3556 destructor.
3557
3558 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
3559 conversions, even in complex virtual base class hierarchies.
3560
3561 1998-08-06 Mark Mitchell <mark@markmitchell.com>
3562
3563 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
3564 (TYPE_TEMPLATE_INFO): Likewise.
3565 (SET_TYPE_TEMPLATE_INFO): Likewise.
3566 (ENUM_TI_TEMPLATE): Likewise.
3567 (ENUM_TI_ARGS): Likewise.
3568 (lookup_nested_type_by_name): Remove.
3569 * decl.c (maybe_process_template_type_declaration): Handle enums.
3570 (start_enum): Don't check for primary-template enum declarations
3571 here.
3572 (finish_enum): Clean up, document. Make sure template enum
3573 constants get the correct type.
3574 (build_enumerator): Copy initializers for template enumerations,
3575 too.
3576 (grok_enum_decls): Document.
3577 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
3578 better. Build LOOKUP_EXPRs for local variables, even if they are
3579 TREE_PERMANENT.
3580 * pt.c (tsubst_enum): Remove field_chain parameter.
3581 (template_class_depth): Include the depth of surrounding function
3582 contexts.
3583 (push_template_decl): Check for primary-template enum declarations
3584 here. Deal with enumeration templates.
3585 (lookup_template_class): Likewise.
3586 (for_each_template_parm): Likewise.
3587 (instantiate_class_template): Don't call tsubst_enum directly,
3588 call tsubst instead, to instantiate enums. Deal with all
3589 field_chain issues here, not in tsubst_enum.
3590 (lookup_nested_type_by_name): Remove.
3591 (tsubst_aggr_type): Revise handling of enumeration types.
3592 (tsubst): Likewise.
3593 (tsubst_copy): Likewise.
3594 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
3595
3596 1998-08-04 Mark Mitchell <mark@markmitchell.com>
3597
3598 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
3599 uses template parameters.
3600 * method.c (build_template_parm_names): Use the full set of
3601 template arguments for tsubst'ing.
3602 (build_overload_identifier): Pass the full set of template
3603 arguments to build_template_parm_names, not just the
3604 innermost_args.
3605 * pt.c (TMPL_ARGS_DEPTH): Define using
3606 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
3607 (NUM_TMPL_ARGS): New macro.
3608 (add_outermost_template_args): Deal with the case where the outer
3609 args will be completely discarded.
3610 (coerce_template_parms): Use the full set of template arguments
3611 for tsubst'ing. Simplify. Add some asserts. Improve
3612 error messages.
3613 (lookup_template_class): Pass the full set of template arguments
3614 to coerce_template_parms.
3615 (tsubst): Add assertion.
3616 (do_type_instantiation): Don't instantiate member template
3617 classes.
3618
3619 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
3620 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
3621
3622 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
3623
3624 * method.c (set_mangled_name_for_decl): Change return type to void.
3625
3626 * decl.c (lookup_name_real): A namespace-level decl takes priority
3627 over implicit typename. Avoid doing the same lookup twice.
3628
3629 * search.c (dependent_base_p): New fn.
3630 (dfs_pushdecls, dfs_compress_decls): Use it.
3631
3632 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
3633 virtual functions if the type doesn't have any.
3634
3635 1998-08-03 Mark Mitchell <mark@markmitchell.com>
3636
3637 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
3638 uses template parameters.
3639
3640 1998-08-02 Mark Mitchell <mark@markmitchell.com>
3641
3642 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
3643 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
3644 * lex.c (do_identifier): Don't use a second argument, or a type,
3645 when building LOOKUP_EXPRs.
3646 (do_identifier): Likewise.
3647 (do_scoped_id): Likewise.
3648 * method.c (hack_identifier): Improve error message.
3649 * pt.c (lookup_template_function): Don't needlessly call
3650 copy_to_permanent or build_min.
3651 (tsubst_copy): Remove #if 0'd code. Tsubst into LOOKUP_EXPRs if
3652 necessary.
3653 (do_decl_instantiation): Improve error message.
3654 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
3655 (build_min): Copy the type to the permanent obstack, too.
3656
3657 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
3658
3659 * init.c (init_init_processing): Remove BI* handling.
3660 (build_builtin_call): Remove.
3661 (build_builtin_delete_call): New fn.
3662 (build_delete): Use it.
3663
3664 1998-07-31 Mark Mitchell <mark@markmitchell.com>
3665
3666 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
3667 (maybe_check_template_type): New function.
3668 * decl.c (maybe_process_template_type_declaration): New function,
3669 split out from pushtag Call maybe_check_template_type.
3670 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
3671 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
3672 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
3673 * pt.c (template_class_depth_real): Generalization of ...
3674 (template_class_depth): Use it.
3675 (register_specialization): Use duplicate_decls for duplicate
3676 declarations of specializations.
3677 (maybe_check_template_type): New function.
3678 (push_template_decl_real): Fix comment.
3679 (convert_nontype_argument): Likewise.
3680 (lookup_template_class): Likewise. Avoid an infinite loop on
3681 erroneous code.
3682 (tsubst_friend_function): Fix comment.
3683 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
3684 an IDENTIFIER_NODE.
3685 * semantics.c (begin_function_definition): Use
3686 reset_specialization to note that template headers don't apply
3687 directly to declarations after the opening curly for a function.
3688
3689 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
3690
3691 * decl.c (push_overloaded_decl): Use current_namespace instead of
3692 DECL_CONTEXT (decl) to determine where we go.
3693
3694 * decl.c (lookup_name_real): Fix typo.
3695
3696 1998-07-28 Mark Mitchell <mark@markmitchell.com>
3697
3698 * friend.c (is_friend): Be lenient with member functions to deal
3699 with nested friends.
3700
3701 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
3702
3703 * class.c (finish_struct_1): Convert integer_zero_node to
3704 ssizetype before passing it to set_rtti_entry.
3705 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
3706 of any size to a pointer.
3707
3708 1998-07-27 Mark Mitchell <mark@markmitchell.com>
3709
3710 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
3711 (build_template_decl_overload): Remove.
3712 (set_mangled_name_for_decl): New function.
3713 (innermost_args): Remove is_spec parameter.
3714 (most_specialized, most_specialized_class): Remove declarations.
3715 (lookup_template_class): Add entering_scope parameter.
3716 (maybe_process_partial_specialization): New function.
3717 (finish_template_decl): Likewise.
3718 (finish_template_type): Likewise.
3719 * class.c (finish_struct): Clean up processing of member template
3720 specializations.
3721 * decl.c (pushtag): Fix formatting.
3722 (lookup_tag): Improve handling of pseudo-global levels.
3723 (make_typename_type): Adjust call to lookup_template_class.
3724 (shadow_tag): Use maybe_process_partial_specialization.
3725 (xref_tag): Improve handling of member friends.
3726 (start_function): Call push_nested_class before
3727 push_template_decl. Don't call push_template_decl for
3728 specializations.
3729 * decl2.c (grok_x_components): Don't call xref_tag for
3730 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
3731 (grokclassfn): Use set_mangled_name_for_decl.
3732 (arg_assoc_class): Adjust call to innermost_args.
3733 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
3734 * error.c (dump_function_name): Improve printing of template
3735 function names.
3736 * friend.c (is_friend): Don't compare types of decls to determine
3737 friendship, unless flag_guiding_decls.
3738 (make_friend_class): Partial specializations cannot be friends.
3739 (do_friend): Use set_mangled_name_for_decl. Call
3740 push_template_decl_real instead of push_template_decl.
3741 * method.c (build_decl_overload_real): Remove prototype. Give it
3742 external linkage.
3743 (build_overload_identififer): Adjust call to innermost_args.
3744 (build_template_decl_overload): Remove.
3745 (set_mangled_name_for_decl): New function.
3746 * parse.y (.finish_template_type): New non-terminal.
3747 (template_def): Use finish_template_decl. Use template_extdef
3748 instead of extdef.
3749 (template_extdef, template_datadef): New non-terminals, containing
3750 only those rules for things which can be templates.
3751 (datadef): Tidy.
3752 (template_type, self_template_type): Use .finish_template_type.
3753 (named_class_head): Use maybe_process_partial_specialization.
3754 * pt.c (mangle_class_name_for_template): Remove context parameter.
3755 (get_class_bindings): Remove outer_args parameter.
3756 (complete_template_args): Remove.
3757 (add_outermost_template_args): New function.
3758 (register_specialization): Return the specialization.
3759 (unregister_specialization): New function.
3760 (tsubst_template_parms): Likewise.
3761 (most_specialized, most_specialized_class): Prototype here as
3762 static.
3763 (original_template): Rename to most_general_template.
3764 (tsubst_template_parms): New function.
3765 (set_mangled_name_for_template_decl): Likewise.
3766 (TMPL_ARGS_DEPTH): New macro.
3767 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
3768 (TMPL_ARGS_LEVEL): New macro.
3769 (SET_TMPL_ARGS_LEVEL): Likewise.
3770 (TMPL_ARG): Likewise.
3771 (SET_TMPL_ARG): Likewise.
3772 (TMPL_ARGS_DEPTH): Likewise.
3773 (finish_member_template_decl): Use finish_template_decl.
3774 (maybe_process_partial_specialization): New function, split out
3775 from tsubst.
3776 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
3777 (maybe_begin_member_template_processing): Use new macros.
3778 (is_member_template): Likewise.
3779 (is_member_template_class): Likewise.
3780 (add_to_template_args): Likewise. Deal with multiple levels of
3781 args.
3782 (maybe_process_partial_specialization): New function.
3783 (retrieve_specialization): Add consistency check.
3784 (determine_specialization): Return full argument list.
3785 (check_explicit_specialization): Tweak friend handling. Use full
3786 argument lists. Simplify.
3787 (current_template_args): Use new macros.
3788 (push_template_decl_real): Change ill-named mainargs to specargs.
3789 Check that a partial specialization actually specializes at least
3790 one parameter. Improve friend handling. Modify for full
3791 template arguments.
3792 (classtype_mangled_name): Don't mangle the names of
3793 specializations.
3794 (lookup_template_class): Add entering_scope parameter. Use it to
3795 avoid finding a template type when an instantiation is required.
3796 Simplify. Use full template arguments.
3797 (tsubst_friend_function): Use unregister_specialization. Use new
3798 macros. Use full template arguments.
3799 (tsubst_friend_class): Substitute, using tsubst_template_parms,
3800 into the template parameters before passing them to
3801 redeclare_class_template.
3802 (instantiate_class_template): Simplify. Use full template
3803 arguments. Adjust calls to get_class_bindings. Use
3804 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
3805 (innermost_args): Use new macros.
3806 (tsubst_aggr_type): New function, split out from tsubst.
3807 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
3808 conventions for lookup_tmeplate_class. Refine handling of partial
3809 instantiations. Remove calls to complete_template_args.
3810 Simplify. Add consistency checks. Use set_mangled_name_for_decl
3811 and set_mangled_name_for_template_decl.
3812 (tsubst_copy): Use tsubst_aggr_type.
3813 (instantiate_template): Use full template arguments.
3814 (more_specialized): Improve formatting.
3815 (more_specialized_class): Adjust calls to get_class_bindings.
3816 (get_bindings_real): Don't call complete_template_args.
3817 (most_specialized): Don't overwrite input; create a new list.
3818 (most_specialized_class): Use most_general_template.
3819 (regenerate_decl_from_template): Use unregister_specialization.
3820 Use full template arguments.
3821 (instantiate_decl): Use full template arguments.
3822 (set_mangled_name_for_template_decl): New function.
3823 * semantics.c (begin_class_definition): Use
3824 maybe_process_partial_specialization.
3825 (finish_member_class_template): New function.
3826 (finish_template_decl): Likewise.
3827 (finish_template_type): Likewise.
3828 (typeck.c): Don't crash after issuing a compiler_error.
3829 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
3830
3831 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
3832
3833 * typeck2.c (build_functional_cast): Handle default-initialization.
3834
3835 * call.c (build_over_call): Pass 1 to popclass.
3836
3837 * parse.y (direct_notype_declarator): Add precedence declaration
3838 to notype_unqualified_id case.
3839 * Makefile.in (EXPECT): Adjust.
3840
3841 * tree.c (ovl_member): Fix for single function in OVL.
3842
3843 1998-07-27 Dave Brolley <brolley@cygnus.com>
3844
3845 * c-lex.c (yylex): Fix boundary conditions in character literal and
3846 string literal loops.
3847
3848 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
3849
3850 * decl.c (lookup_name_real): OK, do return the from_obj value
3851 unless got_object depends on template parms.
3852
3853 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
3854
3855 * pt.c (coerce_template_parms): Also complain about local enums.
3856
3857 * cp-tree.h: Add prototype for set_identifier_local_value.
3858 * decl.c (set_identifier_local_value_with_scope): Make static,
3859 prototype.
3860 * search.c (covariant_return_p): Likewise.
3861 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
3862
3863 * call.c (build_method_call): Only pull out the type of a destructor
3864 if it's a template type parm.
3865 * decl.c (lookup_name_real): Never return the from_obj value.
3866
3867 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
3868
3869 * except.c (process_start_catch_block_old): Call start_decl_1 for
3870 catch parm.
3871 * decl.c (start_decl_1): Avoid duplicate error.
3872
3873 * init.c (expand_default_init): Only perform the initialization if
3874 it will do something.
3875
3876 1998-07-23 H.J. Lu (hjl@gnu.org)
3877
3878 * parse.y (base_class): Check for invalid base class.
3879
3880 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
3881
3882 * decl2.c (import_export_template): Fold in...
3883 (import_export_class): ...to here. Handle dllimport/export.
3884
3885 * class.c (build_vtable): Pass at_eof to import_export_vtable.
3886 (prepare_fresh_vtable): Likewise.
3887 * decl2.c (import_export_class): Split out...
3888 (finish_prevtable_vardecl): From here.
3889 * class.c (finish_struct_1): Call import_export_class if at_eof.
3890
3891 * decl.c (start_function): #if 0 mysterious code I wrote and have
3892 forgotten why.
3893 * rtti.c (get_tinfo_fn): If this is for a class type, set
3894 DECL_CONTEXT.
3895
3896 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
3897
3898 * inc/exception: Change terminate and unexpected to ().
3899
3900 * parse.y (named_class_head_sans_basetype_defn): A
3901 named_class_head_sans_basetype followed by '{' or ':' is a defn.
3902
3903 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
3904
3905 * tree.c (canonical_type_variant): New fn to handle arrays.
3906 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
3907 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
3908 * method.c (process_overload_item): Use build_overload_value for
3909 arrays.
3910
3911 1998-07-20 Dave Brolley <brolley@cygnus.com>
3912
3913 * lex.c (mbchar.h): #include it.
3914 (GET_ENVIRONMENT): New macro.
3915 (init_parse): Set character set based on LANG environment variable.
3916 (real_yylex): Handle multibyte characters in character literals.
3917 (real_yylex): Handle multibyte characters in string literals.
3918
3919 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
3920
3921 * lex.c (do_identifier): Look for class value even if we don't
3922 have a global value. Do implicit declaration if parsing is 2.
3923 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
3924 lookup.
3925
3926 1998-07-19 Mark Mitchell <mark@markmitchell.com>
3927
3928 * decl.c (pushtag): Revert previous change.
3929 * pt.c (lookup_template_class): Don't put out debugging
3930 information for types that use template parameters.
3931
3932 * decl.c (pushtag): Don't put out debugging information for
3933 compiler-generated typedefs.
3934
3935 * error.c (dump_type_real): Don't crash when presented with
3936 intQI_type_node or the like.
3937
3938 * semantics.c (finish_translation_unit): Fix spelling error in
3939 comment.
3940
3941 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
3942
3943 * decl.c (lookup_name_real): Pull out single function here.
3944 (select_decl): Not here.
3945 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
3946
3947 * decl.c (qualify_lookup): Tweak again.
3948
3949 * pt.c (lookup_template_class): Don't mess with the context of the
3950 instantiation.
3951 * decl2.c (current_decl_namespace): Remove special handling for
3952 templates.
3953
3954 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
3955 a member template specialization.
3956
3957 * tree.c (ovl_member): Use decls_match to compare functions.
3958 * decl.c (decls_match): Check the context of a function.
3959
3960 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
3961 in Koenig lookup support rules.
3962 * semantics.c (finish_call_expr): Handle the new cases.
3963
3964 * typeck.c (build_x_function_call): Handle overloaded methods.
3965
3966 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
3967
3968 1998-07-16 Mark Mitchell <mark@markmitchell.com>
3969
3970 * semantics.c (finish_object_call_expr): Revert previous change.
3971 * call.c (build_new_method_call): Likewise. Instead, convert
3972 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
3973
3974 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
3975
3976 * decl.c (qualify_lookup): Handle templates.
3977
3978 * decl2.c (do_using_directive): Don't pass ancestor.
3979 * decl.c (push_using_directive): Calculate ancestor.
3980
3981 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
3982 * decl.c (pushdecl): Move type shadowing handling from here...
3983 (duplicate_decls): ...to here.
3984 * decl.c (set_identifier_local_value_with_scope): New fn.
3985 (pushdecl): Use it.
3986 (set_identifier_local_value, lookup_type_current_level): New fns.
3987 * decl2.c (do_local_using_decl): Handle types and binding level
3988 stuff properly.
3989
3990 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
3991 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
3992 (lookup_namespace_name): Likewise.
3993 * typeck.c (build_unary_op): Not here anymore.
3994
3995 * decl2.c (do_class_using_decl): Make sure we get an identifier.
3996 * class.c (handle_using_decl): Ignore TYPE_DECLs.
3997
3998 * decl.c (qualify_lookup): New fn.
3999 (lookup_name_real): Use it.
4000
4001 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4002
4003 * decl2.c (add_using_namespace): When directly using a namespace
4004 that was indirect before, promote it.
4005
4006 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
4007 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
4008 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
4009 * decl.c (select_decl): Replace two flag parameters by one.
4010 (unqualified_namespace_lookup): Likewise, pass flag.
4011 (lookup_flags): New function.
4012 (lookup_name_real): Compute flags, pass them.
4013 (lookup_namespace_name): Call with zero-flag.
4014 * decl2.c (ambiguous_decl): Add flag parameter, complain only
4015 according to flags.
4016 (lookup_using_namespace, qualified_lookup_using_namespace):
4017 Add flag parameter, pass them through.
4018 * lex.c (do_scoped_id): Call with zero-flag.
4019
4020 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
4021
4022 * typeck.c (convert_for_assignment): Use comptypes.
4023
4024 1998-07-16 Mark Mitchell <mark@markmitchell.com>
4025
4026 * semantics.c (finish_object_call_expr): Move test for the
4027 function called being a TYPE_DECL to ...
4028 * call.c (build_new_method_call): Here.
4029
4030 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4031
4032 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
4033 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
4034
4035 * lex.c (looking_for_typename): Don't initialize.
4036
4037 * decl2.c (ambiguous_decl): Clarify error message.
4038
4039 * decl.c (push_using_directive): Iterate over namespaces used
4040 indirectly.
4041
4042 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4043
4044 * decl2.c (add_using_namespace): Iterate over namespaces used
4045 indirectly.
4046
4047 * decl.c (lookup_name_real): Accept namespace aliases as locals.
4048 (cat_namespace_levels): Ignore aliases.
4049 (duplicate_decls): Ignore duplicate aliases.
4050 * decl2.c (do_namespace_alias): Process block level namespace
4051 aliases. Store alias with pushdecl. Remove odr errors.
4052 * parse.y (namespace_alias): New non-terminal.
4053 (extdef): Use it.
4054
4055 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
4056
4057 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
4058 Handle TEMPLATE_TYPE_PARM.
4059 (arg_assoc): Rewrite.
4060
4061 * pt.c (complete_template_args): Don't look at the context unless
4062 we have to.
4063
4064 * method.c (build_decl_overload_real): Fix namespace handling.
4065
4066 * typeck.c (build_unary_op): Extract a lone function from an
4067 OVERLOAD.
4068
4069 * call.c (build_scoped_method_call): Handle getting a namespace
4070 for basetype in a destructor call.
4071 (check_dtor_name): Handle enums.
4072
4073 * parse.y (using_directive): New nonterminal.
4074 (extdef, simple_stmt): Use it.
4075
4076 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4077
4078 * decl2.c (add_function): Move error message ...
4079 (arg_assoc_namespace): ... from here.
4080
4081 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
4082
4083 * parse.y (namespace_qualifier): Fix multiple level handling.
4084 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
4085 (arg_assoc): Don't skip the first argument of a function.
4086
4087 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
4088
4089 * search.c (my_tree_cons): Clean up.
4090
4091 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
4092
4093 * call.c (joust): Don't warn about "confusing" conversions to the
4094 same type.
4095
4096 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4097
4098 * class.c (push_nested_class): Complain about namespaces.
4099 * decl.c (start_decl): Enter the object's namespace.
4100 (cp_finish_decl): Leave it.
4101 (grokdeclarator): Likewise.
4102 * decl2.c (check_decl_namespace): New function.
4103 (finish_file): Call it.
4104 * parse.y (complex_direct_notype_declarator): Set complexity
4105 of namespace-qualified ids to -1, enter the namespace.
4106
4107 * method.c (build_template_decl_overload): Expect _DECL as first
4108 parameter. Put context temporarily into current_namespace.
4109 * pt.c (check_explicit_specialization): Change caller.
4110 (tsubst): Likewise.
4111
4112 * init.c (build_offset_ref): Call mark_used and
4113 convert_from_reference for namespace members.
4114
4115 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
4116
4117 * search.c (my_tree_cons): The bitfield is at index 2.
4118
4119 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
4120
4121 * lang-options.h: Format changed to work with new --help support
4122 in gcc/toplev.c
4123
4124 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
4125
4126 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
4127 Do Koenig lookup in CALL_EXPR.
4128 (arg_assoc): Handle error_mark.
4129 * lex.c (is_global): New function.
4130 (do_identifier): Expect arguments for Koenig lookup.
4131 * parse.y (primary): Add rules for calls of unqualified function calls.
4132 (do_id): Change call of do_identifier.
4133 * pt.c (finish_stmt_expr): Likewise.
4134 * semantics.c (finish_id_expr): Likewise.
4135 (finish_call_expr): Add integer parameter to indicate
4136 argument-dependent lookup.
4137
4138 * decl.c (struct binding_level): New field using_directives.
4139 (push_using_decl): Not sorry anymore.
4140 (push_using_directive): New function.
4141 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
4142 (unqualified_namespace_lookup): New function, code from ...
4143 (lookup_name_real): ... here.
4144 * decl2.c (lookup_using_namespace): Pass using list instead of
4145 initial scope.
4146 (validate_nonmember_using_decl): New function.
4147 (do_nonmember_using_decl): New function.
4148 (do_toplevel_using_decl): Use them.
4149 (do_local_using_decl): New function.
4150 (do_using_directive): Support block-level directives.
4151 * parse.y (simple_stmt): Support using declarations and
4152 directives.
4153 (namespace_qualifier, namespace_using_decl): New non-terminals.
4154
4155 * xref.c (classname): New function.
4156 (GNU_xref_hier): Change class and base parameters to tree.
4157 * decl.c (xref_baseypes): Change caller.
4158 * friend.c (make_friend_class): Likewise.
4159
4160 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4161
4162 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
4163 comparison.
4164
4165 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
4166 template template parameter, record its use.
4167 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
4168 its template arguments if exists.
4169
4170 * pt.c (coerce_template_template_parms): New function equivalent
4171 to coerce_template_parms when IS_TMPL_PARM is true.
4172 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
4173 all callers changed.
4174
4175 (coerce_template_parms): Access ARGLIST properly when creating a
4176 new vector. Only accept implicit TYPE_DECL as valid argument for
4177 a template template parameter when it is a base class of
4178 current_class_type. Don't display error message when COMPLAIN is
4179 false.
4180
4181 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
4182
4183 * repo.c (get_base_filename): Use file_name_nondirectory.
4184 (open_repo_file): Ditto.
4185 * cp-tree.h (file_name_nondirectory): Add prototype.
4186
4187 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
4188
4189 * friend.c (do_friend): Pull the identifier out of declarator.
4190 Use cp_error and friends.
4191 * decl2.c (qualified_lookup_using_namespace): Fix call to
4192 purpose_member.
4193 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
4194 (grokvardecl): Use DECL_CLASS_SCOPE_P.
4195 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
4196 * class.c (warn_hidden): Fix for OVERLOAD.
4197 From grahams@rcp.co.uk:
4198 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
4199 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
4200
4201 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
4202
4203 * g++.1 (-traditional): Remove duplicated documentation.
4204
4205 1998-07-11 Mark Mitchell <mark@markmitchell.com>
4206
4207 * method.c (flush_repeats): Add nrepeats parameter.
4208 (issue_nrepeats): Likewise.
4209 (is_back_referenceable_type): New function. Don't back-reference
4210 TEMPLATE_TYPE_PARMs as well as simple types like integers.
4211 (build_mangled_name_for_type): Likewise.
4212 (build_mangled_name_for_type_with_Gcode): Likewise.
4213 (lasttype): Remove.
4214 (nrepeats): Likewise.
4215 (Nrepeats): Likewise.
4216 (start_squangling): Don't clear the variables removed above.
4217 (end_squangling): Likewise.
4218 (flush_repeats): Tidy. Use nrepeats parameter rather than
4219 Nrepeats global.
4220 (issue_nrepeats): Likewise, but with nrepeats global. Use
4221 is_backreferenceable_type.
4222 (build_overload_nested_name): Tidy. Add comment. Use
4223 build_mangled_name_for_type.
4224 (build_underscore_int): Comment.
4225 (build_overload_scope_ref): Use build_mangled_name_for_type.
4226 (build_overload_int): Likewise.
4227 (build_template_template_parm_names): Tidy.
4228 (build_template_parm_names): Use build_mangled_name_for_type.
4229 (build_overload_identifier): Add comments.
4230 (build_mangled_name_for_type_with_Gcode): Split out from
4231 build_mangled_name.
4232 (build_mangled_name_for_type): Use it.
4233 (build_mangled_name): Rework to use build_mangled_name_for_type
4234 and to not use global nrepeats/Nrepeats. Tidy.
4235 (process_modifiers): Tidy.
4236 (check_btype): Use is_backreferenceable_type. Add comment.
4237 Rename `node' to `type'.
4238 (process_overload_item): Set numeric_output_need_bar here.
4239 Use build_mangled_name_for_type. Tidy.
4240 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
4241 build_mangled_name_for_type.
4242
4243 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
4244 for TYPE_DECLs.
4245
4246 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
4247
4248 * cp-tree.h (warn_long_long): Define.
4249 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
4250 warning "ANSI C++ does not support `long long'".
4251 * decl2.c (warn_long_long): Define.
4252 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
4253
4254 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
4255
4256 * decl.c (xref_tag): Handle attributes between 'class' and name.
4257 * parse.y (aggr): Likewise.
4258 * semantics.c (finish_class_definition): Likewise.
4259 * Makefile.in (EXPECTED): Adjust.
4260
4261 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
4262 * decl2.c: Define them.
4263 (lang_decode_option): Handle them.
4264 * lang-options.h: Add -foptional-diags.
4265 * class.c (finish_struct): Don't complain about multiple meanings of
4266 name if -fno-optional-diags.
4267 * decl.c (pushdecl_class_level): Likewise.
4268 * lex.c (real_yylex): Check warn_multichar.
4269
4270 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
4271
4272 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
4273
4274 * tree.c (make_binfo): Fix length.
4275
4276 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
4277
4278 * decl2.c (lang_decode_option): Remove warn_template_debugging.
4279 * lang-options.h: Ditto.
4280
4281 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4282
4283 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
4284 (process_start_catch_block): Likewise for variables
4285 `false_label_rtx', `call_rtx' and `return_value_rtx'.
4286
4287 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
4288
4289 * tree.c (build_srcloc): Make sure we allocate this node on the
4290 permanent obstack.
4291
4292 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
4293
4294 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
4295 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
4296 (lang_specific_driver): Only add -lm automatically if need_math is
4297 nonzero.
4298
4299 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
4300
4301 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
4302
4303 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4304
4305 * Makefile.in (EXPR_H): New dependency variable.
4306 (decl2.o): Depend on $(EXPR_H).
4307 (typeck.o): Likewise.
4308 (init.o): Likewise.
4309 (expr.o): Likewise.
4310
4311 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
4312
4313 * decl.c (start_enum): Put local enums on permanent_obstack.
4314
4315 1998-06-25 Mark Mitchell <mark@markmitchell.com>
4316
4317 * cp-tree.h (c_get_alias_set): Declare.
4318 * decl.c (init_decl_processing): Set lang_get_alias_set.
4319
4320 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
4321
4322 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
4323 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
4324 flag for all function decls which are in the exception table.
4325 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
4326 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
4327 code is emitted for any referenced rtti function.
4328
4329 1998-06-25 Dave Brolley <brolley@cygnus.com>
4330
4331 * lang-specs.h: Use new | syntax to eliminate
4332 string concatenation.
4333
4334 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
4335
4336 * cp-tree.h (CP_DECL_CONTEXT): New macro.
4337 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
4338 * method.c (build_overload_nested_name): Likewise.
4339 * sig.c (build_signature_pointer_or_reference_type): Don't set
4340 DECL_CONTEXT.
4341
4342 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4343
4344 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
4345 * cp-tree.h (FROB_CONTEXT): New macro.
4346 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
4347 * decl.c (namespace_binding): Replace NULL_TREE with
4348 global_namespace.
4349 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
4350 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
4351 Likewise.
4352 * decl.c (pushtag): Use FROB_CONTEXT.
4353 (pushdecl, make_typename_type, define_function, grokdeclarator):
4354 Likewise.
4355 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
4356 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
4357 Likewise.
4358 * decl2.c (decl_namespace): Return global_namespace if no context.
4359 * method.c (build_overload_nested_name): Expect null as context.
4360 * pt.c (mangle_class_name_for_template): Do nothing for null
4361 contexts.
4362 (lookup_template_class): Allow for null id_context.
4363
4364 1998-06-25 Richard Henderson <rth@cygnus.com>
4365
4366 * method.c (emit_thunk): Set current_function_is_thunk for the
4367 ASM_OUTPUT_MI_THUNK case as well.
4368
4369 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4370
4371 * exception.cc (__cplus_type_matcher): Get a match_info pointer
4372 instead of an exception table entry as a parameter.
4373
4374 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
4375
4376 * parse.y (function_try_block): Don't call start_catch_handler.
4377 * except.c (call_eh_info): Remove coerced field from declaration.
4378 (build_eh_type_type_ref): New function to create an address of a
4379 rtti function for the new style exception tables.
4380 (expand_start_catch_block): Split function, this contains the
4381 common part.
4382 (process_start_catch_block_old): New function to perform the rest
4383 of expand_start_catch_block under old style exceptions.
4384 (process_start_catch_block_old): New function to perform the rest
4385 of expand_start_catch_block under new style exceptions.
4386 (expand_end_catch_block): Only pop the false label off the stack under
4387 the old style of exceptions.
4388 * semantics.c (finish_try_block): Don't call start_catch_handler.
4389 * exception.cc (struct cp_eh_info): Add original_value field.
4390 (__cplus_type_matcher): Perform type matching on the original exception
4391 value, and if we have a match, set the current value.
4392 (__cp_push_exception): Set the original expcetion value.
4393
4394 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
4395
4396 * call.c (joust): Fix confusing conversion warning.
4397
4398 * call.c (build_op_delete_call): Add placement parm. Check
4399 LOOKUP_SPECULATIVELY.
4400 * cp-tree.h, decl2.c, init.c: Adjust.
4401 * decl.c (finish_function): Use it.
4402
4403 * pt.c (tsubst): Diagnose creating void fields or variables.
4404
4405 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4406
4407 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
4408
4409 * cp-tree.h (check_dtor_name): Add prototype.
4410
4411 * init.c (expand_member_init): Remove unused variables
4412 `ptr_type_node', `parm' and `rval'.
4413
4414 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
4415 in call to fprintf.
4416 (lang_print_xnode): Likewise.
4417
4418 * typeck2.c (enum_name_string): Cast argument to sprintf to long
4419 and use %ld specifier.
4420
4421 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
4422 specifier in call to fprintf.
4423 (GNU_xref_member): Cast argument to sprintf to int.
4424
4425 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
4426
4427 * typeck2.c (pop_init_level): Warn about implicit zero initialization
4428 of struct members.
4429
4430 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4431
4432 * cp-tree.h: Prototype function `check_java_method'.
4433
4434 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4435
4436 * class.c (finish_struct): Make conflicting use of id a pedwarn.
4437 * decl.c (pushdecl_class_level): Likewise.
4438
4439 1998-06-17 Mark Mitchell <mark@markmitchell.com>
4440
4441 * pt.c (convert_nontype_argument): Issue an error when presented
4442 with an integer (real) constant that cannot be simplified to an
4443 INT_CST (REAL_CST).
4444
4445 * cp-tree.h (c_get_alias_set): Remove declaration added in
4446 1998-06-13 change that should never have been checked in.
4447
4448 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4449
4450 * typeck.c (build_binary_op_nodefault): Change % in format strings
4451 to %%.
4452
4453 * decl.c (grokvardecl): Don't build_static_name for decls that
4454 aren't at namespace scope.
4455
4456 * init.c (perform_member_init): Catch default-initialization of
4457 references.
4458
4459 1998-06-17 Mark Mitchell <mark@markmitchell.com>
4460
4461 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
4462
4463 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
4464
4465 * method.c (hack_identifier): Complain about getting a namespace
4466 or class template.
4467 * typeck.c (decay_conversion): Remove check for namespaces.
4468 * typeck2.c (incomplete_type_error): Likewise.
4469 * parse.y (template_arg): Add PTYPENAME expansion.
4470
4471 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
4472
4473 * decl.c (grokvardecl): Don't build external assembler names for
4474 TYPENAMEs in other namespaces as there is no declarator.
4475 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
4476 info from DECL_CONTEXT if it is NULL.
4477
4478 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
4479
4480 * call.c (check_dtor_name): Split out.
4481 (build_scoped_method_call): Use it.
4482 (build_method_call): Use it.
4483 * init.c (build_offset_ref): Use it.
4484
4485 * typeck.c (build_static_cast): Fix handling of pointers to members.
4486
4487 * decl.c (finish_function): Just return nothing from a constructor.
4488 * typeck.c (c_expand_return): Complain about returning a void
4489 expression from a destructor.
4490
4491 1998-06-13 Mark Mitchell <mark@markmitchell.com>
4492
4493 * class.c (alter_access): Accept a BINFO explaining how to get
4494 from the entity whose accessed is being altered to the type doing
4495 the altering.
4496 (handle_using_decl): New function containing code split out from ...
4497 (finish_struct_1): Here.
4498
4499 * cp-tree.h (complete_type_or_else): Declare.
4500 * init.c (build_new_1, build_delete): Use it.
4501 * typeck.c (require_complete_type): Use complete_type, rather than
4502 expanding it inline.
4503 (complete_type_or_else): New function.
4504 (build_component_ref): Use it.
4505 (pointer_int_sum): Make sure the type pointed to is complete.
4506 (pointer_diff): Likewise.
4507
4508 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
4509 types.
4510
4511 * search.c (get_matching_virtual): Note that member templates
4512 cannot override virtual functions.
4513
4514 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
4515
4516 * pt.c (check_explicit_specialization): If DECLARATOR turned into
4517 an error_mark_node from lookup_template_function, return the same.
4518 (determine_specialization): Also make sure TEMPLATE_ID isn't an
4519 error_mark_node, before we try to read its operands.
4520 * decl.c (grokdeclarator): If we got an error_mark_node from
4521 check_explicit_specialization, just return it right back.
4522
4523 1998-06-12 Mark Mitchell <mark@markmitchell.com>
4524
4525 * class.c (instantiate_type): Don't treat template-ids that don't
4526 specify any template arguments as equivalent to ordinary
4527 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
4528 pointer-to-members for member templates. Tidy slightly.
4529 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
4530 * init.c (build_offset_ref): Handle template-ids like ordinary
4531 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
4532 offset part of the OFFSET_REF.
4533 * typeck.c (build_unary_op): Change check for unknown types to
4534 look for OFFSET_REFs, not SCOPE_REFs.
4535
4536 1998-06-11 Mark Mitchell <mark@markmitchell.com>
4537
4538 * pt.c (is_member_template_class): New function.
4539 (push_template_decl_real): Use it.
4540
4541 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
4542
4543 * friend.c (do_friend): Add support for nested classes using
4544 member functions of the enclosing class as friends.
4545
4546 1998-06-10 Mark Mitchell <mark@markmitchell.com>
4547
4548 * call.c (convert_default_arg): Make global, not static.
4549 (convert_arg_for_ellipsis): Split out from ...
4550 (build_over_call): Here.
4551 * cp-tree.h (convert_default_arg); Declare.
4552 (convert_arg_to_ellipsis): Likewise.
4553 (do_member_init): Remove.
4554 * init.c (do_member_init): Remove; this code is dead.
4555 (expand_member_init): Remove much of this code; it is dead.
4556 * typeck.c (convert_arguments): Use convert_default_arg and
4557 convert_arg_for_ellipsis, rather than duplicating here.
4558
4559 * call.c (convert_like): Don't fail silently if
4560 build_user_type_conversion fails. Always return error_mark_node
4561 for failure.
4562
4563 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4564
4565 * search.c (covariant_return_p): Complain about ambiguous base.
4566
4567 * typeck.c (build_component_ref): Diagnose ref to nested type.
4568
4569 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
4570
4571 * decl.c (grokparms): Check that INIT isn't an error_mark_node
4572 before giving error about invalid type for default arg.
4573
4574 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4575
4576 * call.c (build_method_call): Fix thinko.
4577
4578 1998-06-10 Dave Brolley <brolley@cygnus.com>
4579
4580 * decl2.c (lang_decode_option): New argc/argv interface.
4581 * cp-tree.h (lang_decode_option): New argc/argv interface.
4582 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
4583 specified for cpplib-enabled compilers.
4584 * lex.c (lang_init): Don't check_newline for cpplib.
4585 (init_parse): Don't initialize cpplib here.
4586
4587 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
4588
4589 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
4590 piece before checking DECL_MUTABLE_P.
4591
4592 1998-06-10 John Carr <jfc@mit.edu>
4593
4594 * tree.c (debug_binfo): Make printf format match arguments.
4595
4596 * error.c (OB_PUTI): Make printf format match arguments.
4597
4598 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
4599
4600 * init.c (perform_member_init): Handle default-initialization.
4601
4602 * except.c (build_throw): Handle throwing NULL.
4603
4604 * typeck.c (build_x_function_call): Use resolve_offset_ref.
4605
4606 * search.c (compute_access): Only strip an anonymous union
4607 for a FIELD_DECL.
4608
4609 * call.c (add_builtin_candidates): Tweak.
4610
4611 * cvt.c (build_expr_type_conversion): Restore code for conversion
4612 from class types.
4613 * decl2.c (delete_sanity): Use it. Clean up.
4614
4615 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
4616
4617 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
4618
4619 * typeck.c (c_expand_return): Don't warn about void expressions on
4620 return statements in functions returning void.
4621
4622 1998-06-09 Mark Mitchell <mark@markmitchell.com>
4623
4624 * pt.c (fn_type_unification): Revise documentation. Tidy.
4625 (type_unification): Likewise.
4626
4627 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
4628
4629 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
4630 expand_end_catch.
4631 * parse.y (function_try_block): Rename expand_start_catch, and delete
4632 expand_end_catch.
4633 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
4634 expand_end_catch.
4635
4636 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
4637
4638 * search.c (lookup_member): New fn.
4639 * class.c (finish_struct_1): Use it.
4640 * decl.c (lookup_name_real): Use it.
4641
4642 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4643
4644 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
4645
4646 * cp-tree.h: Add prototype for `maybe_print_template_context' and
4647 `maybe_make_one_only'.
4648
4649 * decl.c (auto_function): Remove unused variable `decl'.
4650
4651 * decl2.c: Include dwarf2out.h and dwarfout.h.
4652
4653 * lex.c: Remove redundant declarations of `set_float_handler' and
4654 `asm_out_file'.
4655
4656 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
4657
4658 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
4659 time flag. Call __cp_eh_info instead of __cp_exception_info.
4660 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
4661 (__cp_exception_info): Return offset into cp_eh_info structure to
4662 match what use to be the start of this structure.
4663 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
4664 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
4665 compile time flag.
4666 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
4667 __cp_eh_info instead of __cp_exception_info.
4668
4669 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
4670
4671 * decl.c (cp_finish_decl): Disable inlining of extern inlines
4672 with static variables.
4673
4674 1998-06-08 Mark Mitchell <mark@markmitchell.com>
4675
4676 * init.c (build_offset_ref): Correct previous change to use build,
4677 not build_min.
4678
4679 1998-06-07 Mark Mitchell <mark@markmitchell.com>
4680
4681 * class.c (instantiate_type): Handle pointer-to-members where the
4682 member is a template.
4683 * init.c (build_offset_ref): Likewise.
4684 * typeck.c (build_unary_op): Likewise.
4685
4686 1998-06-07 Richard Henderson <rth@cygnus.com>
4687
4688 * lex.c (lang_init_options): New function.
4689 (lang_init): Remove flag_exceptions == 2 hack.
4690
4691 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
4692
4693 * search.c (envelope_add_decl): Tweak for implicit typename.
4694
4695 * call.c (joust): Also warn about confusing conversion op/constructor
4696 overload resolution.
4697
4698 * spew.c (yylex): Also return the TYPE_DECL if got_object.
4699 Don't clear got_object after '~'.
4700 * call.c (build_scoped_method_call): Tweak destructor handling.
4701 (build_method_call): Likewise.
4702 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
4703 TYPE_MAIN_VARIANT for destructors.
4704 * semantics.c (finish_object_call_expr): Complain about calling a
4705 TYPE_DECL.
4706
4707 1998-06-05 Per Bothner <bothner@cygnus.com>
4708
4709 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
4710 Define - update needed by gcc.c change.
4711
4712 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
4713
4714 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
4715
4716 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4717
4718 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
4719 * decl.c (lookup_name_real): Add namespaces_only parameter.
4720 If set, return only NAMESPACE_DECLs.
4721 (select_decl): Likewise.
4722 (identifier_type_value): Give additional parameter.
4723 (lookup_name_nonclass): Likewise.
4724 (lookup_name): Likewise.
4725 (find_binding): Skip namespace aliases.
4726 (binding_for_name): Likewise.
4727 (push_namespace): Check for namespace aliases.
4728 (lookup_name_namespace_only): New function.
4729 (begin_only_namespace_names, end_only_namespace_names): New functions.
4730 * decl2.c (set_decl_namespace): Skip namespace aliases.
4731 (do_using_directive): Likewise.
4732 (do_namespace_alias): Produce namespace aliases, fix alias
4733 redeclaration.
4734 * error.c (dump_decl): Support SCOPE_REF.
4735 * parse.y (extdef): Wrap lookup with namespace_only for namespace
4736 aliases and using declarations.
4737
4738 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
4739
4740 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
4741
4742 * error.c (dump_expr): Clean up NEW_EXPR case.
4743
4744 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
4745
4746 Suggested by Brendan Kehoe
4747 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
4748 treat it as using ::decl.
4749
4750 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
4751
4752 * tree.c (mapcar): Support NEW_EXPR.
4753
4754 * error.c (dump_expr): Support NEW_EXPR.
4755
4756 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
4757
4758 * method.c (make_thunk): Use overload machinery to make name.
4759 * search.c (covariant_return_p): New fn.
4760 (get_matching_virtual): Use it.
4761
4762 * init.c (build_new_1): Fix check for void.
4763
4764 1998-06-01 Per Bothner <bothner@cygnus.com>
4765
4766 * cp-tree.h (TYPE_FOR_JAVA): New macro.
4767 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
4768 java_int_type_node, java_long_type_node, java_float_type_node,
4769 java_double_type_node, java_char_type_node, java_boolean_type_node):
4770 New "primitive" types, with predefined names __java_byte etc.
4771 (record_builtin_java_type): New function.
4772 (init_decl_processing): Make Java types with record_builtin_java_type.
4773 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
4774 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
4775 (grokfndecl): Call check_java_method for Java classes.
4776 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
4777 (process_overload_item): Match types against specific
4778 java_XX_type_node types, rather than using is_java_type.
4779 * class.c (finish_struct_1): Don't add default copy constructor
4780 or operator= if TYPE_FOR_JAVA.
4781 (pop_lang_conext): Restore strict_prototyp proper if Java.
4782 * decl2.c (acceptable_java_type, check_java_method): New functions.
4783 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
4784 (tsubst): Move common statement after if statement.
4785 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
4786
4787 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
4788
4789 * pt.c (for_each_template_parm): Use first_rtl_op.
4790
4791 * tree.c (build_cplus_array_type_1): Also check index_type for
4792 template parms.
4793
4794 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
4795
4796 * pt.c (tsubst): Always copy BINFO_BASETYPES.
4797
4798 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
4799
4800 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
4801 TYPE_SIZE_UNIT too.
4802
4803 1998-05-29 Mark Mitchell <mark@markmitchell.com>
4804
4805 * decl.c (grokdeclarator): Don't complain about in-class
4806 initialization of static consts if we don't really know the type
4807 of the variable.
4808
4809 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
4810
4811 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
4812 * method.c (build_destructor_name): New fn.
4813 * decl2.c (maybe_retrofit_in_chrg): Split out...
4814 (grokclassfn): From here. Reorganize.
4815 * decl.c (grok_ctor_properties): Make sure ctors for types with
4816 vbases have the in_chrg parm.
4817 * pt.c (instantiate_class_template): Update
4818 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
4819 grok_*_properties.
4820 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
4821
4822 1998-05-28 Mark Mitchell <mark@markmitchell.com>
4823
4824 * pt.c (instantiate_decl): Make test for whether or not static
4825 variables should be instantiated early match its comment.
4826
4827 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
4828
4829 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
4830 a member.
4831 (start_function): Call check_default_args.
4832 * decl2.c (grokfield): Don't call check_default_args.
4833 (check_default_args): Use cp_error_at.
4834 * lex.c (do_pending_defargs): Call check_default_args.
4835
4836 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
4837
4838 * call.c (build_method_call): Make sure get_type_value returns
4839 something before we try to use its TYPE_MAIN_VARIANT.
4840 (build_scoped_method_call): Likewise.
4841
4842 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
4843
4844 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
4845 initialize an array.
4846
4847 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
4848 DECL_VIRTUAL_P.
4849
4850 * friend.c (do_friend): Clarify template warning.
4851
4852 1998-05-27 Mark Mitchell <mark@markmitchell.com>
4853
4854 * decl.c (shadow_label): Don't treat decls as identifiers.
4855 (maybe_push_to_top_level): Clear shadowed_labels.
4856
4857 * pt.c (instantiate_decl): Reset lineno and filename after calling
4858 regenerate_decl_from_template.
4859
4860 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
4861 error_mark_node.
4862
4863 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
4864
4865 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
4866
4867 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4868
4869 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
4870 (convert_nontype_argument): Handle cases when nontype template
4871 parameters become classes after substitution.
4872
4873 1998-05-26 Mark Mitchell <mark@markmitchell.com>
4874
4875 * friend.c (is_friend): Use comptypes, rather than == to compare
4876 types. Modify for new representation of template friends.
4877 (make_friend_class): Likewise.
4878 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
4879 (instantiate_class_template): Deal with template friends.
4880
4881 * decl.c (store_parm_decls): Remove redundant call to
4882 expand_main_function.
4883
4884 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
4885
4886 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
4887 DECL_USE_TEMPLATE.
4888
4889 1998-05-26 Per Bothner <bothner@cygnus.com>
4890
4891 * language_as_string: Handle lang_java.
4892
4893 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
4894
4895 * decl.c (pushdecl): Don't copy the type_decl.
4896
4897 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4898
4899 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
4900 current_class_type.
4901 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
4902
4903 * parse.y (complex_direct_notype_declarator): Use $1 to access
4904 scope of notype_qualified_id.
4905
4906 1998-05-26 Dave Brolley <brolley@cygnus.com>
4907
4908 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
4909 (init_parse): Initialize cpplib interface.
4910
4911 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
4912 empty continuation.
4913
4914 1998-05-26 Mark Mitchell <mark@markmitchell.com>
4915
4916 * decl.c (pushtag): Avoid crashing on erroneous input.
4917
4918 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4919
4920 * decl.c (push_namespace): Only produce one unique name for
4921 anonymous namespaces.
4922 (get_unique_name): Remove.
4923
4924 1998-05-25 Mark Mitchell <mark@markmitchell.com>
4925
4926 * call.c (tourney): Don't do any extra comparisons.
4927
4928 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
4929
4930 * cp-tree.h (processing_template_parmlist): Declare.
4931 * decl.c (pushtag): Don't call push_template_decl when we
4932 shouldn't.
4933 * pt.c (processing_template_parmlist): New variable.
4934 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
4935 (complete_template_args): Use it.
4936 (add_to_template_args): Likewise.
4937 (innermost_args): Likewise.
4938 (tsubst): Likewise.
4939 (begin_template_parm_list): Use processing_template_parmlist.
4940 (end_template_parm_list): Likewise.
4941
4942 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4943 * decl.c (grokdeclarator): Use it.
4944 * decl2.c (grok_x_components): Likewise.
4945 * init.c (initializing_context): Likewise.
4946 * method.c (do_build_copy_constructor): Likewise.
4947 (do_build_assign_ref): Likewise.
4948 * search.c (compute_access): Likewise.
4949 * typeck.c (build_component_ref): Likewise.
4950
4951 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
4952 unnamed type a typedef name "for linkage purposes".
4953
4954 * pt.c (lookup_template_class): Don't look at
4955 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
4956
4957 * method.c (build_overload_int): Handle error cases gracefully.
4958
4959 * pt.c (instantiate_decl): Handle static member variables
4960 correctly.
4961
4962 * pt.c (tsubst): Use the tsubst'd type when producing new
4963 TEMPLATE_PARM_INDEX nodes.
4964
4965 1998-05-24 Mark Mitchell <mark@markmitchell.com>
4966
4967 * tree.c (cp_tree_equal): Handle pointers to member functions.
4968
4969 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
4970 sure the type of the REF_BIND is a reference type.
4971 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
4972 target_type for clarity.
4973
4974 * parse.y (xcond): Move call to condition_conversion ...
4975 * semantics.c (finish_for_cond): Here.
4976 * parse.c: Regenerated.
4977
4978 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
4979
4980 * decl.c (push_namespace): Namespaces have type void.
4981 * typeck2.c (incomplete_type_error): Complain about namespace
4982 used as expression.
4983 * typeck.c (decay_conversion): Likewise.
4984
4985 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4986
4987 * error.c (dump_expr): Support namespaces.
4988
4989 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
4990
4991 * cp-tree.def: Add SRCLOC.
4992 * cp-tree.h: Add struct tree_srcloc and accessor macros.
4993 * tree.c (build_srcloc, build_srcloc_here): New fns.
4994 * pt.c (add_pending_template): Use build_srcloc_here.
4995 (push_tinst_level): Update last_template_error_tick before erroring.
4996 (instantiate_decl): Restore lineno and input_filename before
4997 calling add_pending_template.
4998 * decl2.c (finish_file): Set up lineno and input_filename for
4999 pending templates.
5000
5001 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5002
5003 * decl.c (lang_print_error_function): New fn.
5004 (init_decl_processing): Set print_error_function to use it.
5005 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
5006
5007 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
5008 ICS_BAD_FLAG.
5009
5010 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
5011 copy-initialization.
5012
5013 * class.c (build_vtable_entry): Use int_fits_type_p.
5014 (build_vtable): Pass a signed offset to build_vtable_entry.
5015 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
5016 set_rtti_entry): Likewise.
5017
5018 1998-05-22 Per Bothner <bothner@cygnus.com>
5019
5020 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
5021 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
5022
5023 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
5024
5025 * pt.c (print_template_context): Use fprintf instead of cp_error.
5026
5027 * pt.c (determine_specialization): Just return an error_mark_node.
5028 Also print the decl we want in error messages. If we complain,
5029 return error_mark_node.
5030 (tsubst_friend_function): Set lineno and input_filename so
5031 error messages will be useful.
5032 (instantiate_template): Just return an error_mark_node.
5033 (check_explicit_specialization): Don't mess with a returned
5034 error_mark_node.
5035
5036 * pt.c (print_template_context): Add new argument.
5037 (maybe_print_template_context): New fn.
5038 (push_tinst_level): Increment tinst_level_tick.
5039 (pop_tinst_level): Likewise.
5040 * errfn.c (cp_thing): Call maybe_print_template_context. Use
5041 xrealloc instead of xmalloc.
5042
5043 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
5044
5045 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5046
5047 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
5048 if the template we looked up is the same as the one we already
5049 have.
5050
5051 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
5052
5053 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
5054 (cpp_reader,parse_in): Add for cpplib.
5055 (check_newline): Call handle_sysv_pragma with new interface.
5056 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
5057
5058 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
5059 (sub_getch): Call GETC for cpplib.
5060
5061 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
5062 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
5063
5064 * Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
5065
5066 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
5067
5068 * decl2.c (maybe_make_one_only): New fn.
5069 (import_export_vtable): Use it.
5070 (import_export_decl): Likewise.
5071 * pt.c (mark_decl_instantiated): Likewise.
5072
5073 1998-05-21 Mark Mitchell <mmitchell@usa.net>
5074
5075 * decl2.c (find_representative_member): Rename to ...
5076 (build_anon_union_vars): New function.
5077 (finish_anon_union): Fix stupidity of previous change.
5078
5079 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
5080
5081 * decl.c (grokfndecl): Handle definition of specialization in
5082 friend declaration.
5083
5084 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
5085
5086 1998-05-20 Mark Mitchell <mmitchell@usa.net>
5087
5088 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
5089 to look for type declarations.
5090 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
5091 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
5092 (finish_member_class_template): Declare.
5093 * decl.c (pushtag): Put member class templates on the
5094 CLASSTYPE_TAGS list, just as for ordinary member classes.
5095 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
5096 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
5097 IDENTIFIER_NAMESPACE_VALUEs.
5098 * parse.y (component_decl): Move code to ...
5099 * semantics.c (finish_member_class_template): New function.
5100 Don't put member class templates on the list of components for a
5101 class.
5102 * parse.c: Regenerated.
5103 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
5104 In fact, don't use DECL_CONTEXT at all here.
5105
5106 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
5107
5108 * decl.c (record_unknown_type): New function.
5109 (init_decl_processing): Call it for the unknown and global type
5110 nodes.
5111
5112 1998-05-20 Mark Mitchell <mmitchell@usa.net>
5113
5114 * decl2.c (find_representative_member): New function.
5115 (finish_anon_union): Use it.
5116
5117 * cp-tree.h (MAIN_NAME_P): New macro.
5118 (DECL_MAIN_P): Likwise.
5119 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
5120 (grokfndecl): Use the new macros.
5121 (grokdeclarator): Likewise.
5122 (start_function): Likewise.
5123 (store_parm_decls): Likewise.
5124 (finsh_function): Likewise.
5125 * friend.c (do_friend): Likewise.
5126 * typeck.c (build_function_call_real): Likewise.
5127 (build_unary_op): Likewise.
5128
5129 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
5130
5131 * decl2.c (start_objects, finish_objects, do_dtors,
5132 do_ctors): Split out from...
5133 (finish_file): ...here.
5134
5135 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
5136
5137 * tree.c (is_overloaded_fn): Don't abort on placeholders from
5138 push_class_decls.
5139
5140 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
5141
5142 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
5143
5144 * error.c (dump_expr): Handle an ARROW_EXPR.
5145
5146 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
5147
5148 * decl.c (saveable_obstack): Declare.
5149 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
5150 declare, if necessary.
5151
5152 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
5153
5154 * call.c (compare_qual): Remove.
5155 (is_subseq): Tweak.
5156 (is_properly_derived_from): New function.
5157 (maybe_handle_ref_bind): Likewise.
5158 (maybe_handle_implicit_object): Likewise.
5159 (compare_ics): Modify substantially to bring into conformance with
5160 the standard.
5161 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
5162 (comp_cv_qualification): Declare.
5163 (comp_cv_qual_signature): Likewise.
5164 * typeck.c (comp_cv_qualification): Likewise.
5165 (comp_cv_qual_signature): Likewise.
5166
5167 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5168
5169 * Makefile.in (parse.o): Depend on toplev.h.
5170
5171 * class.c (typecode_p): Remove prototype and definition.
5172
5173 * cp-tree.h (currently_open_class, is_empty_class, member_p):
5174 Add prototype.
5175
5176 * decl.c (push_overloaded_decl_top_level): Remove prototype and
5177 definition.
5178
5179 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
5180 in call to `cp_thing'.
5181 (cp_warning): Likewise for function pointer `warning'.
5182
5183 * except.c (do_function_call): Remove prototype and definition.
5184 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
5185
5186 * method.c (is_java_type): Add prototype and make it static.
5187
5188 * parse.y: Include toplev.h.
5189
5190 * pt.c (type_unification): Remove unused variable `arg'.
5191 (instantiate_decl): likewise for `save_ti'.
5192
5193 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
5194
5195 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
5196
5197 * init.c (build_member_call): Handle template_ids.
5198 * parse.y (primary): Add global_scope template_id.
5199
5200 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
5201
5202 * decl2.c (get_sentry): Use end_temporary_allocation.
5203 Don't declare permanent_obstack.
5204
5205 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
5206
5207 * parse.y (.finish_new_placement): New non-terminal.
5208 (unary_expr, new_type_id): Use it.
5209 * parse.c: Regenerated.
5210
5211 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
5212
5213 * pt.c (redeclare_class_template): Say where the original definition
5214 of the template-parameter's default argument appeared.
5215
5216 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
5217
5218 * call.c (build_over_call): Tweak empty class handling.
5219
5220 * decl.c (make_typename_type): Use currently_open_class.
5221
5222 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
5223
5224 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5225
5226 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
5227 for a type unless it is one.
5228
5229 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
5230
5231 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
5232
5233 * Makefile.in (program_transform_name, objdir): Define.
5234
5235 * Makefile.in (BISON): Use bison from the build tree if it exists.
5236 (FLEX): Similarly.
5237
5238 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
5239
5240 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
5241
5242 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
5243
5244 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
5245
5246 * call.c (build_scoped_method_call): Likewise.
5247
5248 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
5249
5250 * init.c (build_new_1): Call suspend_momentary around the creation
5251 of values that must be saved for exception handling.
5252 * parse.y (.build_new_placement): New non-terminal.
5253 (unary_expr, new_placement): Use it.
5254 * parse.c: Regenerated.
5255
5256 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
5257
5258 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
5259 old and new types.
5260
5261 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
5262 canonical type.
5263
5264 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
5265
5266 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
5267
5268 * decl.c (start_decl): Revert problem change.
5269
5270 * Makefile.in (CONFLICTS): Fix.
5271
5272 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5273
5274 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
5275
5276 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
5277
5278 * class.c (finish_struct_1): Use BINFO_SIZE.
5279
5280 * decl.c (start_decl): Use 'tem'.
5281
5282 Thu May 14 16:30:47 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5283
5284 * exception.cc: Include eh-common.h.
5285 (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
5286 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
5287 (__cp_push_exception): Initialize eh_info struct as well.
5288 * except.c: Remove local structs and include eh-common.h.
5289 (init_exception_processing): Set language and version codes.
5290 (call_eh_info): add presence of eh_info to runtime description of
5291 struct cp_eh_info.
5292 (expand_end_eh_spec): call start_catch_block() and end_catch_block().
5293 * semantics.c (finish_try_block): call start_catch_block() and
5294 end_catch_block().
5295 * parse.y (function_try_block): call start_catch_block() and
5296 end_catch_block().
5297
5298 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
5299
5300 * typeck.c (original_type): New function.
5301 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
5302 to see if they're actually the same.
5303 * cp-tree.h (original_type): Declare.
5304
5305 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5306
5307 * Makefile.in (lex.o): Depend on output.h.
5308
5309 * call.c (add_function_candidate): Remove unused variable `cand'.
5310 (add_conv_candidate): Likewise.
5311 (build_builtin_candidate): Likewise.
5312
5313 * cp-tree.h: Add prototype for `types_overlap_p'.
5314
5315 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
5316
5317 * decl2.c (merge_functions): Remove unused variables `tmp' and
5318 `tempn'.
5319
5320 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
5321 (code_as_string): Likewise.
5322 (language_as_string): Likewise.
5323 (parm_as_string): Likewise.
5324 (op_as_string): Likewise.
5325 (assop_as_string): Likewise.
5326 (cv_as_string): Likewise.
5327
5328 * lex.c: Include output.h.
5329
5330 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
5331
5332 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
5333 ATTRIBUTE_UNUSED.
5334
5335 * tinfo.cc (__class_type_info::dcast): Change the type of variable
5336 `i' from int to size_t.
5337
5338 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
5339 ATTRIBUTE_UNUSED.
5340
5341 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
5342
5343 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
5344 DECL_NAMESPACE_SCOPE_P.
5345 (lang_decl_name): Likewise.
5346 * pt.c (tsubst_friend_function, tsubst): Likewise.
5347 * decl.c (pushdecl, redeclaration_error_message, start_decl,
5348 cp_finish_decl, start_function): Likewise.
5349 * class.c (finish_struct_1): Likewise.
5350 * call.c (build_over_call): Likewise.
5351 (compare_ics): Use DERIVED_FROM_P.
5352
5353 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
5354
5355 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
5356 * method.c (build_mangled_name): Use it.
5357 (build_decl_overload_real): Likewise.
5358
5359 * error.c (dump_simple_decl): New function, broken out from ...
5360 (dump_decl): Use it.
5361
5362 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
5363
5364 * ptree.c (lang_print_xnode): Add missing `break'.
5365
5366 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
5367
5368 * call.c (add_template_candidate): Adjust for changes to
5369 fn_type_unification.
5370 (add_template_candidate_real): Likewise.
5371 (add_template_conv_candidate): Likewise.
5372 (build_user_type_conversion_1): Likewise.
5373 (build_new_function_call): Likewise.
5374 (build_object_call): Likewise.
5375 (build_new_op): Likewise.
5376 (build_new_method_call): Likewise.
5377 * class.c (instantiate_type): Likewise.
5378 * cp-tree.h (unification_kind_t): New type.
5379 (fn_type_unification): Adjust prototype.
5380 (type_unificaiton): Likewise.
5381 * pt.c (UNIFY_ALLOW_NONE): New macro.
5382 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
5383 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
5384 (UNIFY_ALLOW_DERIVED): Likewise.
5385 (unify): Change prototype.
5386 (maybe_adjust_types_for_deduction): New function.
5387 (check_cv_quals_for_unify): Likewise.
5388 (determine_specialization): Adjust.
5389 (fn_type_unification): Likewise.
5390 (type_unification): Likewise.
5391 (type_unification_real): Likewise. Use
5392 maybe_adjust_types_for_deduction. Fix mishandling of
5393 back-unification of template functions passed as arguments. Pass
5394 appropriate combination of UNIFY_ALLOW_* to unify.
5395 (unify): Remove unused NTPARMS parameter. Use
5396 check_cv_quals_for_unify. Remove bogus code that allowed
5397 too-generous unification in order to adhere more closely to standard.
5398 (get_bindings_real): Adjust.
5399 (get_class_bindings): Likewise.
5400
5401 * method.c (build_overload_identifier): Only use the innermost
5402 template arguments when mangling.
5403 * pt.c (tsubst_template_argument_vector): New function.
5404 (complete_template_args): Deal with the situation where the
5405 extra_args contain more than one level of arguments.
5406 (lookup_template_class): Deal with member template classes, which
5407 may have more than one level of arguments.
5408 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
5409 Improve handling of member template classes. Use
5410 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
5411 tsubst_template_argument_vector where appropriate.
5412 (regenerate_decl_from_template): Break out from ...
5413 (instantiate_decl): Here.
5414
5415 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
5416 * parse.h: Regenerated.
5417 * parse.c: Really regenerated.
5418
5419 * cp-tree.h (finish_unary_op_expr): New function.
5420 (finish_id_expr): Likewise.
5421 (begin_new_placement): Likewise.
5422 (finish_new_placement): Likewise.
5423 (finish_declarator): Likewise.
5424 (finish_translation_unit): Likewise.
5425 (finish_parmlist): Likewise.
5426 (begin_class_definition): Likewise.
5427 (finish_class_definition): Likewise.
5428 (finish_default_args): Likewise.
5429 (finish_inline_definitions): Likewise.
5430 * parse.y (GCC_ASM_KEYWORD): Remove.
5431 (TYPENAME_ELLIPSIS): Likewise.
5432 * parse.c: Regenerated.
5433 Use new functions in semantics.c in the actions for many rules.
5434 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
5435 * hash.h: Regenerated.
5436 * semantics.c (finish_expr_stmt): Allow NULL expr.
5437 (finish_unary_op_expr): New function, containing
5438 code previously in parse.y.
5439 (finish_id_expr): Likewise.
5440 (begin_new_placement): Likewise.
5441 (finish_new_placement): Likewise.
5442 (finish_declarator): Likewise.
5443 (finish_translation_unit): Likewise.
5444 (finish_parmlist): Likewise.
5445 (begin_class_definition): Likewise.
5446 (finish_class_definition): Likewise.
5447 (finish_default_args): Likewise.
5448 (finish_inline_definitions): Likewise.
5449
5450 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
5451
5452 * typeck.c (build_c_cast): Don't decay arrays and functions to
5453 pointer type when converting to a class type.
5454
5455 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
5456
5457 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
5458 (DECL_CLASS_SCOPE_P): Likewise.
5459
5460 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
5461
5462 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
5463 * decl2.c (constructor_name_full): Likewise.
5464
5465 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
5466
5467 * tree.c (mapcar): Add OVERLOAD support.
5468
5469 * init.c (resolve_offset_ref): We must use basetype_path before we
5470 destroy it with a call to convert_pointer_to.
5471
5472 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
5473
5474 * class.c (currently_open_class): New fn.
5475 * decl.c (lookup_name_real): Use it.
5476 * search.c (lookup_field): Likewise.
5477
5478 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
5479
5480 * cp-tree.def (OVERLOAD): New node.
5481 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
5482 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
5483 (NAMESPACE_BINDING): Remove.
5484 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
5485 namespace_binding.
5486 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
5487 Define.
5488 (tree_overload): New struct.
5489 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
5490 (REAL_IDENTIFIER_TYPE_VALUE): Define.
5491 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
5492 (lang_decl_flags): Remove in_namespace.
5493 (lang_decl): Remove chain.
5494 (DECL_CHAIN, DECL_NAMESPACE): Remove.
5495 (flag_honor_std): Declare extern.
5496 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
5497 namespace_binding, set_namespace_binding,
5498 lookup_function_nonclass, cat_namespace_levels,
5499 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
5500 scratch_ovl_cons, ovl_member, build_overload): Declare.
5501 (decl_list_length, get_namespace_id, current_namespace_id,
5502 overloaded_globals_p): Remove.
5503 (lookup_using_namespace, qualified_lookup_using_namespace): Change
5504 return type.
5505 (push_scratch_obstack): New macro.
5506 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
5507 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
5508 convs, fns.
5509 (build_new_function_call): Iterate using OVL_CHAIN.
5510 Print DECL_NAME in when reporting ambiguities.
5511 (build_object_call): Iterate using OVL_NEXT for fns, convs.
5512 (build_new_op): Call lookup_function_nonclass.
5513 Iterate using OVL_NEXT.
5514 (build_op_delete_call): Change detection of members.
5515 Do not wrap TREE_LIST around fields and single global functions.
5516 (build_over_call): Don't push a class level if the context is a
5517 namespace.
5518 (build_new_method_call): Iterate using OVL_NEXT.
5519 * class.c (add_method): Chain overloaded members using
5520 build_overload. Remove copying of method.
5521 (grow_method): When iterating through the obstack, expect OVERLOAD
5522 nodes. Chain overload members.
5523 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
5524 nodes in call to get_baselinks.
5525 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
5526 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
5527 fdecls that are OVERLOAD nodes.
5528 (validate_lhs): New function.
5529 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
5530 code. Use DECL_NAME in error messages. Split code between global
5531 and member function processing.
5532 * decl.c (global_type_node): New static variable.
5533 (in_std): New global.
5534 (struct binding_level): New field usings.
5535 (resume_binding_level): Assert that we are not in a class.
5536 (toplevel_bindings_p): Just check for namespace_p or
5537 pseudo_global.
5538 (resume_level): Remove.
5539 (find_binding): New function.
5540 (binding_for_name): Call it.
5541 (namespace_binding, set_namespace_binding): New functions.
5542 (push_namespace): Associate binding level with new namespace,
5543 resume_binding_level for existing namespace. Remove old code.
5544 Fake std by counting.
5545 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
5546 (maybe_push_to_top_level): Save current namespace.
5547 (pop_from_top_level): Restore saved namespace.
5548 (pop_namespace): Call suspend_binding_level. Remove old code.
5549 (cat_namespace_levels): New function.
5550 (set_identifier_type_value_with_scope): For namespace bindings,
5551 set BINDING_TYPE, and use global_type_node.
5552 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
5553 (identifier_type_value): New function.
5554 (pushtag): If no context, use current_namespace.
5555 (duplicate_decls): Don't process DECL_CHAIN.
5556 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
5557 already set. Never reset it to NULL_TREE. Lookup global variables
5558 in their namespace. Push overloaded templates if they are on
5559 namespace level.
5560 (pushdecl_namespace_level): New function.
5561 (pushdecl_top_level): Implement using pushdecl_namespace_level.
5562 (pushdecl_using_decl): New function.
5563 (overloaded_globals_p): Remove.
5564 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
5565 them. Use namespace_binding and set_namespace_value.
5566 (redeclaration_error_message): Complain if the declarations come
5567 from different namespaces.
5568 (lookup_tag): On namespace level, look in the BINDING_TYPE.
5569 (lookup_namespace_name): Pass tree_bindings from stack. Remove
5570 old code.
5571 (select_decl): New function.
5572 (lookup_name_real): Call it for qualified and unqualified lookup.
5573 Pass tree_bindings from the stack.
5574 If prefer_type is 1, also accept namespaces.
5575 (lookup_function_nonclass): New function.
5576 (init_decl_processing): Set the binding level of the global
5577 namespace to global_binding_level.
5578 Build a proper type list for __builtin_apply.
5579 Initialize std_node to "fake std" if flag_honor_std is set.
5580 Initialize global_type_node.
5581 Allocated bad_alloc in namespace std if flag_honor_std.
5582 (define_function): Set the DECL_CONTEXT to the current_namespace.
5583 (start_decl): A namespace is not considered as a context here. If
5584 the DECL_CONTEXT is a namespace, push the decl.
5585 (cp_finish_decl): Check for namespaces used as initializers.
5586 (grokfndecl): Add namespace parameter. Remove processing of
5587 DECL_CHAIN.
5588 (grokvardecl): Add namespace parameter.
5589 (grokdeclarator): Process SCOPEs that are namespaces. For
5590 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
5591 (start_function): Check for contexts that are namespaces.
5592 Set context for declarations that have not been pushed.
5593 (store_parm_decls): Check for ::main only.
5594 (finish_function): Likewise.
5595 (start_method): Check for contexts that are namespaces.
5596 (start_method): Remove DECL_CHAIN processing.
5597 * decl2.c (flag_honor_std): Declare.
5598 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
5599 (decl_namespace_list): New static global.
5600 (grok_x_components): Ignore namespaces as type contexts.
5601 (check_classfn): Expect OVERLOAD nodes.
5602 (grokfield): Remove DECL_CHAIN processing.
5603 (finish_file): Call cat_namespace_levels.
5604 (merge_functions): New function.
5605 (ambiguous_decl): Rewrite.
5606 (lookup_using_namespace): Produce tree_bindings.
5607 (qualified_lookup_using_namespace): Likewise.
5608 (set_decl_namespace, decl_namespace, current_decl_namespace,
5609 push_decl_namespace, pop_decl_namespace): New functions.
5610 (arg_lookup): New struct.
5611 (add_function, arg_assoc_namespace, arg_assoc_class,
5612 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
5613 New functions.
5614 (get_namespace_id, current_namespace_id): Remove.
5615 (do_toplevel_using_decl): Rewrite.
5616 (do_class_using_decl): Complain about namespace qualifiers.
5617 (do_using_directive): Sorry if not on namespace level. Complain
5618 about unknown namespaces.
5619 * error.c (dump_aggr_type): Check for namespace contexts.
5620 * except.c (init_exception_processing): Push terminate into std.
5621 * friend.c (is_friend): A namespace is not a context, here.
5622 * init.c (expand_member_init): Remove DECL_CHAIN processing.
5623 (build_offset_ref): Process OVERLOAD nodes.
5624 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
5625 * lex.c (identifier_type): Loop using OVL_CHAIN.
5626 (see_typename): Set looking_for_typename to 2.
5627 (real_yylex): Likewise.
5628 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
5629 (do_scoped_id): Expect OVERLOAD nodes.
5630 Change calling convention for qualified_lookup_using_namespace.
5631 (build_lang_decl): Don't set in_namespace anymore.
5632 * method.c (typevec_size): New global.
5633 (build_overload_nested_name): Return if global_namespace.
5634 Otherwise, always expect a declaration context.
5635 (build_qualified_name): Likewise.
5636 Make sure we don't write beyond typevec_size.
5637 (build_decl_overload_real): Likewise.
5638 Allocate one extra slot for the namespace.
5639 (hack_identifier): Mark code dead.
5640 Process OVERLOAD and NAMESPACE_DECL nodes.
5641 * parse.y (program): Pop namespaces until in global namespace.
5642 (extdef): In a using-declaration, don't discard the identifier if
5643 there is no declaration.
5644 (left_curly): Ignore type contexts which are namespaces.
5645 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
5646 used as scope.
5647 * pt.c (template_class_depth): Expect types to be namespaces.
5648 (determine_specialization): Simplify by expecting OVERLOAD nodes.
5649 (push_template_decl): Push into namespace level.
5650 Reset ctx if it is a namespace.
5651 Set DECL_CONTEXT to current_namespace if not set already.
5652 Ignore real contexts that are namespaces.
5653 (mangle_class_name_for_template): Skip global_namespace.
5654 Mangle other namepaces as declarations.
5655 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
5656 (lookup_template_class): Push into namespace of context.
5657 If the context is a namespace, set it to global_namespace.
5658 Use id_context for mangling.
5659 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
5660 (tsubst_friend_function): Ignore namespace contexts.
5661 Push into namespace level.
5662 (tsubst): Handle NAMESPACE_DECL nodes.
5663 Remove DECL_CHAIN processing.
5664 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
5665 * ptree.c (print_lang_identifier): Print bindings.
5666 (lang_print_xnode): Print OVERLOAD nodes.
5667 * rtti.c (init_rtti_processing): Push type_info into std.
5668 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
5669 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
5670 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
5671 lookup_fnfields_here): Likewise.
5672 Process all nodes, instead of going through TREE_CHAIN.
5673 * sig.c (build_signature_pointer_or_reference_type): Set context
5674 to global_namespace.
5675 (build_signature_table_constructor): Expect OVERLOAD nodes.
5676 * spew.c (yylex): Save old setting of looking_for_typename.
5677 * tree.c (decl_list_length): Remove.
5678 (binding_init): New function.
5679 (count_functions): Rewrite.
5680 (is_overloaded_fn): Expect OVERLOAD nodes.
5681 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
5682 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
5683 ovl_member): New functions.
5684 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
5685 (type_unknown_p): Likewise.
5686 (require_instantiated_type): Likewise.
5687 (build_component_ref): Declare code dead.
5688 (build_x_function_call): Create and expect OVERLOAD nodes.
5689 (build_function_call_real): Check for ::main only.
5690 (build_unary_op): Likewise. Expect OVERLOAD nodes.
5691 (convert_for_assignment): Check for TREE_LIST before accessing
5692 TREE_VALUE.
5693 * decl.c (duplicate_decls): Check for namespace bindings instead
5694 of global bindings.
5695 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
5696 lookup_name_current_level, start_decl, xref_tag,
5697 finish_enum): Likewise.
5698 * init.c (build_offset_ref): Likewise.
5699 * search.c (lookup_field): Likewise.
5700 (lookup_fnfields): Likewise.
5701 (dfs_debug_mark): Likewise.
5702 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
5703 (poplevel_class, pop_from_top_level): Likewise.
5704 * decl2.c (finish_method): Likewise.
5705 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
5706 * decl.c (record_builtin_type): Likewise.
5707 (init_decl_processing, grokfndecl): Likewise.
5708 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
5709 (make_lang_type): Likewise.
5710 * parse.y (make_thunk): Likewise.
5711 * pt.c (tsubst): Likewise.
5712 * tree.c (debug_binfo): Likewise.
5713 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
5714 tinfo2.cc, inc/new.h: Add std qualifications.
5715 * inc/new: Wrap with namespace std if __HONOR_STD.
5716 * inc/typeinfo: Likewise.
5717
5718 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
5719
5720 * call.c (build_user_type_conversion_1): Handle second_conv
5721 properly for templates.
5722
5723 Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5724
5725 * method.c (build_decl_overload_real): Set TREE_USED flag to
5726 zero for build_type_variants nodes as well.
5727
5728 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
5729
5730 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
5731
5732 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
5733
5734 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
5735 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
5736 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
5737 xref.o): Add toplev.h dependencies.
5738
5739 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
5740
5741 * errfn.c (cp_error, cp_warning): Remove declarations for
5742 error and warning respectively.
5743
5744 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5745
5746 * error.c: Convert to using ctype macros defined in system.h.
5747 * method.c: Likewise.
5748 * xref.c: Likewise.
5749 * lex.c: Likewise. Also remove redundant system header stuff.
5750
5751 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
5752
5753 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
5754 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
5755 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
5756 xref.c: Add include of toplev.h.
5757
5758 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
5759
5760 * tree.c (perm_manip): Also regenerate the RTL of an extern.
5761 (copy_to_permanent): Use end_temporary_allocation.
5762
5763 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
5764
5765 * init.c (expand_vec_init): The initialization of each array
5766 element is a full-expression.
5767
5768 Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5769
5770 * method.c (build_mangled_name): Add a call to build_type_variant
5771 to get the right type.
5772
5773 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
5774
5775 * Makefile.in: Add .SUFFIXES.
5776
5777 * cp-tree.def: Remove NAMESPACE_DECL.
5778
5779 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
5780
5781 * call.c (build_over_call): Do evaluate arg even if it has empty
5782 class type.
5783 * decl.c (start_function): Don't push a member function.
5784
5785 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
5786
5787 * Makefile.in (g++FAQ.info): Put -o option before input file.
5788
5789 Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
5790
5791 * gxxint.texi: Add info for squangling codes K and B.
5792
5793 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
5794
5795 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
5796 the expression in templates.
5797 (finish_stmt_expr): Likewise.
5798
5799 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
5800
5801 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
5802
5803 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
5804
5805 * decl.c (maybe_push_to_top_level): Always clear
5806 current_template_parms and processing_template_decl.
5807 (pushtag): Remove check of current_class_type and some comments,
5808 since maybe_push_to_top_level no longer creates confusion.
5809
5810 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
5811
5812 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
5813 (DECL_CLASS_TEMPLATE_P): Likewise.
5814 (DECL_PRIMARY_TEMPLATE): Likewise.
5815 (PRIMARY_TEMPLATE_P): Use it.
5816 (push_template_decl_real): New function.
5817 (redeclare_class_template): Take new template parameters as
5818 input.
5819 (is_specialization_of): New function.
5820 (comp_template_args): Declare.
5821 * decl.c (pushtag): Handle friend template classes.
5822 (xref_tag): Likewise. Use new calling convention for
5823 redeclare_class_template.
5824 * decl2.c (grok_x_components): Handle friend templates.
5825 * friend.c (is_friend): Use is_specialization_of where
5826 appropriate. Deal with friend class templates.
5827 (make_friend_class): Let a class template be friends with itself.
5828 * pt.c (comp_template_args): Remove declaration.
5829 (tsubst_friend_class): New function.
5830 (push_template_decl_real): New function.
5831 (push_template_decl): Use it.
5832 (redeclare_class_template): Adjust for new calling convention.
5833 (comp_template_args): Give it external linkage.
5834 (instantiate_class_type): Use tsubst_friend_class to deal
5835 with friend templates.
5836 * typeck.c (comptypes): Use comp_template_args, rather than
5837 expanding it inline.
5838 * parse.y (component_decl): Handle a nested template type
5839 like other component type declarations.
5840
5841 * pt.c (check_explicit_specialization): Handle overloaded
5842 constructors correctly.
5843
5844 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
5845 (lookup_template_class): Use it.
5846
5847 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
5848
5849 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
5850 * cp-tree.h: Add WRAPPER support.
5851 * call.c (add_candidate): Split out from add_*_candidate fns.
5852 (build_over_call): Take the candidate instead of function and args.
5853 Enforce access control here. Emit overload warnings here.
5854 (add_warning): New fn.
5855 (joust): Add WARN parm. If not set, call add_warning instead of
5856 printing a warning. Reenable some warnings.
5857 (tourney): Pass it.
5858 (convert_like): Adjust.
5859 (build_new_op): Adjust.
5860 (build_new_function_call): Adjust.
5861 (build_user_type_conversion_1): Adjust.
5862 (USER_CONV_FN): Adjust.
5863 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
5864 build_int_wrapper): New fns.
5865
5866 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
5867
5868 * pt.c (unify): Fix typo in previous change.
5869
5870 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
5871
5872 * error.c (dump_type_real): Declare canonical_name.
5873
5874 * typeck.c (comp_target_types): Fix PMFs.
5875
5876 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
5877
5878 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
5879 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
5880 TEMPLATE_DECL.
5881
5882 * pt.c (tsubst): Decrease the template-level of
5883 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
5884 TEMPLATE_PARM_INDEX.
5885 (template_decl_level): New function.
5886 (unify): Make sure to record unifications for template
5887 parameters, even when the parameters exactly match the arguments.
5888 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
5889 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
5890 aren't from the level we're currently working on.
5891
5892 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
5893
5894 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
5895
5896 * decl2.c (check_member_template): Set DECL_IGNORED for member
5897 class templates, too.
5898
5899 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
5900
5901 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5902
5903 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
5904
5905 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
5906
5907 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
5908 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
5909 (init_decl_processing): Handle TI types.
5910 * typeck.c (unsigned_type, signed_type): Handle TI types.
5911
5912 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
5913
5914 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
5915 New local added_libraries. Increment count when add library to
5916 arglist.
5917
5918 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
5919
5920 * cp-tree.h (type_as_string_real): New function.
5921 * pt.c (mangle_class_name_for_template): Use it.
5922 * error.c (dump_aggr_type): Change prototype.
5923 (dump_type_prefix): Likewise.
5924 (dump_type_suffix): Likewise.
5925 (dump_type_real): Convert from dump_type. If desired, the
5926 "canonica" name of a typedef, i.e., the name of the underlying
5927 type, can be printed.
5928 (dump_type): Call dump_type_real.
5929
5930 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
5931
5932 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
5933
5934 * typeck.c (comp_target_types): Tweak pedantic case.
5935 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
5936 Return -1 or 1 instead of 1 or 2.
5937 (compparms): Remove STRICT handling.
5938 (convert_for_assignment): Fix handling of pmfs.
5939
5940 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
5941
5942 * typeck.c (comp_target_types): Handle references like pointers.
5943 (comp_target_parms): Note that return code from comp_target_types
5944 can be negative to indicate failure.
5945
5946 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5947
5948 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
5949 which requires a working target compiler to build.
5950
5951 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
5952
5953 * tree.c (avoid_overlap): Add prototype.
5954
5955 * spew.c (num_tokens): Add prototype.
5956 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
5957
5958 * search.c (dfs_check_overlap): Add prototype.
5959 (dfs_no_overlap_yet): Likewise.
5960
5961 * pt.c (original_template): Add prototype.
5962 (inline_needs_template_parms): Likewise.
5963 (push_inline_template_parms_recursive): Likewise.
5964 (retrieve_specialization, register_specialization): Likewise.
5965 (print_candidates, reduce_template_parm_level): Likewise.
5966 (build_template_decl, mark_template_parm): Likewise.
5967 (tsubst_friend_function, get_bindings_real): Likewise.
5968
5969 * method.c (start_squangling): Add prototype.
5970 (end_squangling, check_ktype, issue_ktype): Likewise.
5971 (build_overloaded_scope_ref, check_btype): Likewise.
5972 (build_mangled_template_parm_index): Likewise.
5973
5974 * lex.c (init_cpp_parse): Add prototype.
5975 (handle_cp_pragma, handle_sysv_pragma): Likewise.
5976 (reduce_cmp, token_cmp): Likewise.
5977
5978 * except.c (call_eh_info): Add prototype.
5979 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
5980 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
5981
5982 * decl2.c (is_namespace_ancestor): Add prototype.
5983 (namespace_ancestor, add_using_namespace): Likewise.
5984 (ambiguous_decl): Likewise.
5985
5986 * decl.c (indent): Add prototype.
5987
5988 * call.c (add_template_candidate_real): Add prototype.
5989
5990 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
5991
5992 * decl2.c (build_expr_from_tree): Just return a PMF.
5993
5994 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
5995
5996 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
5997 when doing initializations.
5998
5999 * pt.c (unify): Use comptypes to compare type args.
6000
6001 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
6002
6003 * decl.c (duplicate_decls): Fix check for when it's safe to free
6004 the new decl.
6005
6006 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
6007 to type_as_string.
6008
6009 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
6010
6011 * pt.c (build_template_parm_index): Add prototype.
6012
6013 * search.c (my_tree_cons): Don't clear words outside the
6014 newly allocated node.
6015
6016 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
6017
6018 * lex.c (init_parse): Now returns char* containing the filename.
6019
6020 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
6021 Jeff Law <law@cygnus.com>
6022
6023 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
6024 than a pointer.
6025
6026 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6027
6028 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
6029
6030 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6031
6032 * decl.c (duplicate_decls): Don't warn for redundant decls if
6033 friend: let add_friend take care of it.
6034
6035 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6036
6037 * sig.c (build_signature_pointer_constructor): Don't set
6038 TREE_HAS_CONSTRUCTOR for a signature pointer.
6039 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
6040 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
6041 here, too.
6042 * typeck.c (build_unary_op): Only allow taking the address of a
6043 real constructor.
6044 * typeck2.c (digest_init): Simplify.
6045 (store_init_value): Don't pedwarn about using { } for pmfs.
6046
6047 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
6048
6049 * cp-tree.h (start_decl): Update prototype.
6050 * decl.c (start_decl): Like the C version, new parameters
6051 for the attributes. Call cplus_decl_attributes here,
6052 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
6053 (grokdeclarator): Pass NULL for new start_decl arguments.
6054 * pt.c (tsubst_expr): Likewise.
6055 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
6056 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
6057 * lex.c (build_lang_decl): Add lang_name_java.
6058 * class.c (push_lang_context): Add lang_name_java.
6059 * method.c (build_mangled_name): Check for is_java_type.
6060
6061 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
6062
6063 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
6064 * call.c (build_scoped_method_call): Check for TREE_CODE for
6065 VOID_TYPE instead of type == void_type_node.
6066 (build_method_call): Ditto.
6067 * decl.c (lookup_name_real): Ditto.
6068 (grokdeclarator): Ditto.
6069 (start_decl): Ditto.
6070 (grokparms): Ditto.
6071 (start_function): Ditto.
6072 (finish_function): Ditto.
6073 (start_method): Ditto.
6074
6075 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
6076
6077 * lex.c (finput): New variable.
6078 (init_cpp_parse): Renamed from init_parse.
6079 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
6080 (finish_parse): New function.
6081 * cp-tree.h (init_lex, init_parse): Remove declarations.
6082
6083 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
6084
6085 * call.c (build_call): Still evaluate the actual argument.
6086 * class.c (is_empty_class): Update for -fnew-abi.
6087
6088 * decl2.c: -fnew-abi implies -fsquangle.
6089
6090 * method.c (do_build_assign_ref): Don't do anything to copy
6091 an empty class.
6092 (do_build_copy_constructor): Likewise.
6093 * call.c (build_over_call): Likewise.
6094
6095 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6096
6097 * tree.c (avoid_overlap): Return a value.
6098
6099 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
6100
6101 * method.c (check_btype): Add missing argument to xrealloc.
6102 (check_ktype): Likewise.
6103
6104 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6105
6106 Implement empty base optimization.
6107 * class.c (finish_struct_1): Add vbase fields earlier. Set
6108 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
6109 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
6110 (types_overlap_p): New fn.
6111 * tree.c (avoid_overlap): New fn.
6112 (build_base_fields): Use it to avoid overlapping empty bases.
6113 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
6114
6115 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
6116
6117 Re-implement allocation of base class subobjects.
6118 * tree.c (unshare_base_binfos): New fn.
6119 (layout_basetypes): Use it. Now handles offsets of both virtual and
6120 non-virtual bases, after layout_type.
6121 (layout_vbasetypes): Remove.
6122 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
6123 (build_vbase_pointer_fields): Split out from old layout_basetypes.
6124 * class.c (finish_base_struct): Lose offset handling code.
6125 Move nonvdtor warning here. Don't mess with t_binfo anymore.
6126 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
6127 * cp-tree.h: Adjust.
6128
6129 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
6130
6131 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
6132 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
6133 * class.c (duplicate_tag_error): Likewise.
6134 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
6135 * tree.c (layout_vbasetypes): Update from layout_record, remove
6136 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
6137 (layout_basetypes): Likewise.
6138
6139 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
6140
6141 * class.c, Make sure system.h is included just after config.h.
6142 Delete lingering stdio and errno references too.
6143 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
6144
6145 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
6146
6147 * friend.c (is_friend): Fix access control for local classes.
6148
6149 * class.c (is_empty_class): New fn.
6150 * call.c (build_call): Don't pass empty class objects to a function.
6151
6152 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
6153
6154 * call.c (build_over_call): Do name resolution for default
6155 arguments of function templates in the scope of the templates.
6156
6157 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
6158
6159 * call.c: Include system.h. Remove includes, declarations and
6160 defines provided by system.h.
6161 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
6162 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
6163 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
6164 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
6165 * typeck2.c, xref.c: Likewise.
6166 * Makefile.in: Dependencies updated as appropriate.
6167 * Make-lang.in: Likewise.
6168
6169 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
6170
6171 * pt.c (fn_type_unification): Allow incomplete unification without
6172 an immediate error message.
6173
6174 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6175
6176 * tree.c (member_p): New fn.
6177 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
6178 initializing class members.
6179
6180 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
6181 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
6182
6183 * call.c (build_method_call): Handle non-scoped destructors, too.
6184 * pt.c (tsubst_copy): Likewise.
6185
6186 * pt.c (print_template_context): Split out...
6187 (push_tinst_level): ...from here.
6188
6189 * friend.c (is_friend): Don't pass a type to decl_function_context.
6190
6191 * typeck.c (convert_for_initialization): Always hand off
6192 conversions to class type.
6193
6194 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6195
6196 * friend.c (is_friend): Local classes have the same access as the
6197 enclosing function.
6198
6199 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
6200
6201 * typeck.c (expand_target_expr): Delete dead function.
6202
6203 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
6204
6205 * repo.c (save_string): Delete dead function.
6206
6207 * method.c (thunk_printable_name): Delete dead function.
6208
6209 * lex.c (yynextch): Delete dead function.
6210
6211 * expr.c (tree_extract_aggr_init): #if 0 out.
6212
6213 * except.c (do_unwind): Delete dead function.
6214 (easy_expand_asm): Likewise.
6215
6216 * cvt.c (build_conversion_type_1): Delete dead function.
6217
6218 * cp-tree.h (push_expression_obstack): Declare.
6219
6220 * call.c (source_type): #if 0 out.
6221
6222 * class.c (alter_access): Remove unused label. Add braces
6223 around empty else clause.
6224
6225 * lex.c (yyprint): Fix argument to printf.
6226
6227 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
6228
6229 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
6230
6231 * pt.c (instantiate_class_template): Make sure template
6232 arguments are permanent.
6233 * init.c (resolve_offset_ref): Don't go looking around in
6234 template types.
6235
6236 * semantics.c: Add routines to handle expressions, and some
6237 declaration processing.
6238 * parse.y: Use them.
6239 (current_class_depth): Move declaration to cp-tree.h.
6240 * parse.c: Regenerated.
6241 * cp-tree.h: Use them.
6242 (current_class_depth): Declare.
6243 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
6244
6245 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
6246
6247 * error.c (dump_decl): Be a bit more explicit with template
6248 type arguments, when verbose.
6249
6250 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
6251
6252 * inc/exception: Reorder closing braces.
6253
6254 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
6255
6256 * pt.c (redeclare_class_template): New function.
6257 * cp_tree.h (redeclare_class_template): Declare it.
6258 * decl.c (xref_tag): Use it.
6259
6260 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
6261
6262 * call.c (build_over_call): Check IS_AGGR_TYPE, not
6263 TYPE_LANG_SPECIFIC.
6264 * typeck.c (convert_arguments): Likewise.
6265
6266 * decl.c (grokdeclarator): Remove const and volatile from type after
6267 setting constp and volatilep.
6268
6269 * class.c (finish_struct_1): Don't warn about bool bitfield larger
6270 than one bit.
6271
6272 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
6273
6274 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
6275
6276 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
6277
6278 * call.c (build_object_call): Complain about ambiguous operator(),
6279 rather that crashing.
6280 (build_new_op): Likewise.
6281 (build_op_delete_call): Likewise.
6282
6283 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
6284
6285 * cvt.c (perform_qualification_conversions): Use comp_target_types
6286 instead of comp_ptr_ttypes.
6287
6288 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
6289
6290 * cp-tree.h (enforce_access): Declare.
6291 * call.c (enforce_access): Make it extern, not static.
6292 * class.c (alter_access): Use enforce_access; modify code for ISO
6293 compliance, rather than ARM rules.
6294
6295 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6296
6297 * cp-tree.h: Fix typo.
6298
6299 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
6300
6301 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
6302 if (aggregate_value_p (type)).
6303
6304 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
6305
6306 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
6307
6308 * tree.c (mapcar): When dealing with a DECL, use it's constant
6309 value, if any.
6310 * pt.c (lookup_template_class): Don't mangle the names of template
6311 classes whose arguments are unknown.
6312
6313 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
6314
6315 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
6316
6317 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
6318
6319 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
6320
6321 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
6322 boolean_type_node to 1.
6323
6324 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
6325
6326 * error.c (dump_expr): Remove unused variable `l'.
6327
6328 * pt.c (for_each_template_parm): New function, created by
6329 converting uses_template_parms.
6330 (tree_fn_t): New typedef.
6331 (uses_template_parms): Use it.
6332 (mark_template_parm): New function.
6333 (push_template_decl): Check that the argument list of a partial
6334 specialization uses all the template parameters.
6335
6336 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
6337 with it; we might want it for debugging.
6338 * cp-tree.h (type_unification): Change interface.
6339 * class.c (finish_struct_1): Skip nested template types, just like
6340 ordinary nested types.
6341 (instantiate_type): Use new interface to type_unification.
6342 * lex.c (init_lex): Add __sz as opname for sizeof.
6343 * method.c (build_overload_scope_ref): New function.
6344 (build_overload_int): Handle complex expressions. Set
6345 numeric_output_need_bar if necessary.
6346 (build_overload_value): Handle non-PARM_DECL nodes; this
6347 routine is now used by build_overload_int. Remove some
6348 assignments to numeric_output_need_bar. Use
6349 build_overload_scope_ref.
6350 (build_qualified_name): Note that some template mangled names end
6351 with digits, and set numeric_output_need_bar appropriately. Use
6352 build_underscore_int.
6353 * pt.c (unify): Change interface.
6354 (type_unification_real): Likewise.
6355 (determine_specialization): Use new interfaces.
6356 (tsubst): Deal gracefully with situations in which the argument
6357 vector is not fully filled.
6358 (fn_type_unification): Use new interfaces.
6359 (type_unification): Likewise. Remove NOP_EXPR hack.
6360 (type_unification_real): Likewise.
6361 (unify): Likewise. Deal with unification of complex expresions.
6362
6363 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6364
6365 * pt.c (complete_template_args): Initialize skip properly.
6366
6367 * decl.c (make_typename_type): Revert.
6368 (make_implicit_typename): Remove.
6369 (lookup_name_real): Don't call it. Call lookup_field if we see a
6370 TYPE_DECL from a template base.
6371 * search.c (lookup_field): Do implicit typename stuff.
6372
6373 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
6374 Geoff Noer <noer@cygnus.com>
6375
6376 * Makefile.in: Various fixes for building cygwin32 native toolchains.
6377 * Make-lang.in: Likewise.
6378
6379 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6380
6381 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
6382
6383 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
6384
6385 * decl.c (make_implicit_typename): Rewrite removed code.
6386 (make_typename_type): Call it if the type we look up comes from
6387 a base that uses template parms.
6388
6389 * pt.c (complete_template_args): Rewrite.
6390 (tsubst, FUNCTION_DECL): Use it.
6391
6392 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
6393
6394 * semantics.c (finish_asm_stmt): Fix combine strings. Call
6395 c_expand_asm_operands () if output_operands, input_operands or
6396 clobbers is not NULL_TREE.
6397
6398 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6399
6400 * pt.c (complete_template_args): New function.
6401 (get_bindings): Deal with specializations of function templates
6402 with return type containing parameters from outer class
6403 templates.
6404 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
6405 substitute arguments and compose a new type.
6406
6407 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
6408
6409 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
6410 FUNCTION_DECLs.
6411
6412 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
6413
6414 * decl.c (make_implicit_typename): Lose useless code.
6415
6416 * call.c (standard_conversion): Handle A* -> const A* properly.
6417
6418 * pt.c (get_bindings_real): Rename from get_bindings. Add
6419 check_rettype parm.
6420 (get_bindings): Pass 1.
6421 (get_bindings_overload): Pass 0.
6422
6423 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
6424
6425 * pt.c (check_explicit_specialization): When reverting a static
6426 member function, also remove the `this' parameter from
6427 last_function_parms.
6428
6429 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6430
6431 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
6432 a function context.
6433
6434 * decl.c (store_bindings): Use free_binding_vecs.
6435 (pop_from_top_level): Likewise.
6436
6437 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
6438
6439 * decl.c (make_implicit_typename): Only change the type of a
6440 TYPENAME_TYPE.
6441
6442 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
6443
6444 * semantics.c: New file, containing routines to perform the
6445 semantic phase of parsing.
6446 * parse.y: Use it.
6447 * pt.c (tsubst_expr): Likewise.
6448 * cp-tree.h: Declare the various functions in semantics.c.
6449 Provide macros to access _STMT tree nodes.
6450 * cp-tree.def: Add ASM_STMT tree node.
6451 * Makefile.in, Make-lang.in: Add dependencies on and for
6452 semantics.c.
6453
6454 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
6455
6456 * pt.c (push_template_decl): Only check primary templates.
6457
6458 * pt.c (check_explicit_specialization): Complain about default args
6459 in explicit specialization.
6460
6461 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
6462 constructor_declarator.
6463
6464 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
6465
6466 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
6467 has no overloaded operator ->.
6468
6469 * call.c (build_field_call): Don't crash when presented with a
6470 field that is actually a nested type.
6471
6472 * decl.c (pushtag): Deal with friend class injection in local
6473 classes.
6474
6475 * call.c (build_object_call): Don't crash if OBJ is a
6476 pointer-to-member-function.
6477
6478 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
6479
6480 * pt.c (push_template_decl): Complain about template with C linkage,
6481 anonymous template class.
6482
6483 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
6484
6485 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
6486 * search.c: Likewise.
6487
6488 * lex.c (do_pending_defargs): Only call
6489 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
6490
6491 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
6492
6493 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
6494
6495 * parse.y: Deal with CONSTRUCTORS in new_initializers.
6496
6497 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
6498
6499 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
6500 closely mimics the behavior in parse.y.
6501 (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
6502 into a compound statement.
6503
6504 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
6505
6506 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
6507 * pt.c (inline_needs_template_parms): New fn.
6508 (original_template): New fn.
6509 (push_inline_template_parms_recursive): New fn.
6510 (maybe_begin_member_template_processing): Use them.
6511 (maybe_end_member_template_processing): Likewise.
6512 (is_member_or_friend_template): Rename to is_member_template.
6513 Member functions of local classes are never member templates.
6514
6515 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6516
6517 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
6518 added in the class scope to catch redefinition error.
6519
6520 * pt.c (reduce_template_parm_level): Also copy
6521 the DECL_TEMPLATE_PARMS field.
6522
6523 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
6524
6525 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
6526 reduced-level template type parameter.
6527
6528 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
6529
6530 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
6531 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
6532 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
6533 * decl.c (duplicate_decls): Propagate it.
6534 * typeck2.c (abstract_virtuals_error): Use two loops to emit
6535 abstract virtual functions and virtual functions which need a
6536 final overrider separately.
6537
6538 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
6539
6540 * lang-specs.h: Properly put brackets around array elements in
6541 initializer.
6542
6543 * typeck.c (build_binary_op_nodefault): Correctly place parens around
6544 && and || in expression.
6545
6546 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
6547
6548 * call.c (default_parm_conversions): Remove prototype definition.
6549 (build_method_call): Remove unused variable result.
6550
6551 * cvt.c (ocp_convert): Remove unused variable conversion.
6552
6553 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
6554
6555 * except.c (do_unwind): #if 0 definition of unused variables fcall
6556 and next_pc.
6557
6558 * expr.c (extract_scalar_init): #if 0 prototype and function
6559 definition.
6560
6561 * init.c (expand_aggr_init_1): Remove unused variable init_type.
6562 (build_new_1): Remove unused variable t.
6563
6564 * pt.c (instantiate_class_template): Remove unused variable newtag;
6565 cast called function return value to void.
6566 (do_decl_instantiation): Remove unused variables name and fn.
6567
6568 * tree.c (get_type_decl): Add default return to shut up compiler from
6569 complaining control reaches end of non-void function.
6570
6571 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
6572
6573 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
6574
6575 * call.c (default_parm_conversions): Remove prototype definition.
6576 (build_method_call): Remove unused variable result.
6577 (build_over_call): Add default case in enumeration switch.
6578
6579 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
6580
6581 * decl2.c (lang_decode_option): Change j's type to size_t.
6582
6583 * tree.c (layout_vbasetypes): record_align and desired_align are of
6584 type unsigned int; const_size and nonvirtual_const_size likewise.
6585
6586 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
6587
6588 * parse.y (new_initializer): Make sure all initializers are
6589 lists.
6590
6591 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
6592
6593 * decl2.c (import_export_decl): Mark tinfo functions for
6594 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
6595
6596 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
6597
6598 * method.c: Fix typo.
6599
6600 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6601
6602 * method.c: Include "system.h" to get stdlib.h, stdio.h,
6603 ctype.h, string.h, etc.
6604 (issue_nrepeats): Add default case in enumeration switch.
6605 (check_btype): Likewise.
6606 (process_overload_item): Likewise.
6607
6608 * Makefile.in (method.o): Depend on system.h.
6609
6610 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6611
6612 * lex.c (do_scoped_id): Fix parenthesizing.
6613
6614 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
6615
6616 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
6617 FLAG_RTTI is unset, initialize type info machinery and continue
6618 with FLAG_RTTI enabled.
6619 (get_typeid): Ditto.
6620
6621 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
6622
6623 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
6624 from B.
6625
6626 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
6627
6628 * pt.c (finish_member_template_decl): Deal more gracefully with
6629 invalid declarations.
6630
6631 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
6632
6633 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
6634 cp-tree.h: Clean up more old overloading code, old RTTI code, and
6635 some formatting quirks.
6636
6637 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
6638 method.c, pt.c, ptree.c, typeck.c: Remove support for
6639 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
6640 * class.h: Remove.
6641 * Makefile.in: Adjust.
6642
6643 * pt.c (unify): Don't allow reduced cv-quals when strict.
6644
6645 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
6646 *type_unification* and unify.
6647
6648 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
6649
6650 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
6651 (nested_name_specifier): And add it before this use.
6652 (typename_sub0): And this use. Also add use without the keyword.
6653 (typename_sub1): Likewise.
6654 * pt.c (instantiate_class_template): Don't actually instantiate
6655 anything if our type uses template parms.
6656
6657 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
6658
6659 * decl.c (start_function): Don't call temporary_allocation for a
6660 nested function.
6661
6662 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6663
6664 * pt.c (instantiate_class_template): Don't mess with friends if
6665 our type uses template parms.
6666
6667 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
6668
6669 * parse.y (nested_name_specifier): Use explicit_template_type.
6670 (typename_sub): Allow a template_type, an explicit_template_type,
6671 or an implicit template type at the end.
6672 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
6673 * decl.c (make_typename_type): Handle template-id where the name
6674 is a TEMPLATE_DECL.
6675 * call.c (build_scoped_method_call): Handle member template
6676 destructor call.
6677 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
6678 destructor is represented by the type.
6679
6680 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
6681 * parse.y (nested_name_specifier): Add 'template' case.
6682 (explicit_template_type): New rule.
6683 (typename_sub): Use it.
6684 * decl.c (make_typename_type): Handle getting a template-id for NAME.
6685 * pt.c (tsubst): Likewise.
6686
6687 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
6688
6689 * pt.c (add_to_template_args): Fix thinko.
6690 (instantiate_class_template): Call it later.
6691
6692 * pt.c (get_class_bindings): Add outer_args parm.
6693 (most_specialized_class): Likewise.
6694 (instantiate_class_template): Pass it.
6695 (more_specialized_class): Likewise.
6696 (lookup_template_class): Get context from template if none
6697 was specified.
6698 (finish_member_template_decl): Don't do anything with a
6699 partial specialization.
6700 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
6701 AGGREGATE_TYPE_P.
6702 * class.c (finish_struct): Member class templates have already been
6703 checked for name clashes.
6704 * decl.c (pushdecl_with_scope): Handle pushing at class level.
6705
6706 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
6707
6708 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
6709 (tsubst, *_PARM): Support multiple levels of template classes.
6710 (instantiate_class_template): Look up the pattern from the
6711 original template.
6712 (lookup_template_class): Handle getting a template for d1.
6713 (push_template_decl): Correct setting of 'primary'.
6714 (reduce_template_parm_level): Add 'levels' parm.
6715 (finish_member_template_decl): Support member class templates.
6716 (template_class_depth): Handle multiple levels.
6717 * parse.y (component_decl_1, fn.def2): Remove member template case.
6718 (component_decl): Add member template cases.
6719 * decl2.c (check_member_template): We now handle member template
6720 classes.
6721 * decl.c (pushtag): Handle member templates.
6722 * method.c (do_inline_function_hair): Don't touch
6723 IDENTIFIER_GLOBAL_VALUE.
6724 * init.c (build_offset_ref): If name isn't an identifier, just
6725 return it.
6726 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
6727
6728 * typeck.c (get_delta_difference): Do adjust for conversions to
6729 and from virtual base.
6730
6731 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
6732
6733 * typeck.c (get_delta_difference): Give hard error for conversion
6734 from virtual base.
6735
6736 * cp-tree.h: Tweak formatting.
6737
6738 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
6739
6740 * decl.c (push_namespace): Handle redeclaration error.
6741
6742 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
6743 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
6744 (NAMESPACE_BINDING): New macro.
6745 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
6746 * *.c: Use them.
6747
6748 * pt.c (push_template_decl): Use innermost_args.
6749
6750 * decl.c (get_unique_name): Tweak from earlier in the name.
6751
6752 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
6753
6754 * cp-tree.def: Add CPLUS_BINDING node.
6755 * cp-tree.h (tree_binding): new struct
6756 (BINDING_SCOPE, BINDING_VALUE): new macros
6757 (current_namespace, global_namespace): declare extern
6758 (struct lang_decl_flags): new field in_namespace
6759 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
6760 (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
6761 (TREE_INDIRECT_USING): new macro
6762 * decl2.c (current_namespace, global_namespace): Declare. The
6763 value is a NAMESPACE_DECL now, not a TREE_LIST.
6764 (is_namespace_ancestor, namespace_ancestor):new static functions.
6765 (add_using_namespace, ambiguous_decl): likewise.
6766 (lookup_using_namespace): new support function for lookup_name.
6767 (qualified_lookup_using_namespace): new support function for
6768 do_scoped_id and lookup_namespace_name
6769 (get_namespace_id): mark as obsolete.
6770 (current_namespace_id): Likewise.
6771 (do_namespace_alias): Implement.
6772 (do_using_directive): Implement as call to add_using_namespace.
6773 * decl.c (binding_for_name): new function.
6774 (push_namespace, pop_namespace): implement.
6775 (push_decl): don't install a FUNCTION_DECL in the global branch.
6776 (lookup_namespace_name): implement using qualified lookup.
6777 (lookup_name_real): For global scoping, lookup in
6778 global_namespace. For namespace scoping, lookup in given
6779 namespace. For unscoped lookup, iterate over namespace,
6780 considering using directives.
6781 (init_decl_processing): initialize global_namespace.
6782 (grokvardecl): Build assembler name as static name for globals.
6783 (grokdeclarator): Remove old namespace mangling.
6784 (xref_tag): When installing a global binding for the
6785 tag, make sure we have an identifier.
6786 * method.c (build_overload_nested_name): mangle namespaces.
6787 (build_qualified_name): Likewise.
6788 (build_decl_overload_real): Likewise.
6789 * lex.c (build_lang_decl): set namespace for new declaration to
6790 current_namespace.
6791 (do_scoped_id): find global names in global or current
6792 namespace, or using qualified namespace lookup, depending on
6793 context.
6794 * init.c (build_member_call): When scope is namespace, use
6795 build_x_function_call instead.
6796 (build_offset_ref): When scope is namespace, collapse processing
6797 to lookup_namespace_name instead.
6798 * error.c (dump_decl): Support NAMESPACE_DECL.
6799 * decl.c (pushdecl): Bind globals to current namespace.
6800 (push_overloaded_decl): Likewise.
6801 (lookup_tag): Likewise.
6802 (lookup_name_current_level): Likewise.
6803 (xref_tag): Likewise.
6804 (start_function): Likewise.
6805 * lex.c (do_identifier): Likewise.
6806 (identifier_typedecl_value): Likewise.
6807 (real_yylex): Likewise.
6808 * method.c (do_inline_function_hair): Likewise.
6809 * parse.y (unscoped): Likewise.
6810 * pt.c (check_explicit_specialization): Likewise.
6811 (lookup_template_class): Likewise.
6812 * rtti.c (call_void_fn): Likewise.
6813 * sig.c (build_sigtable): Likewise.
6814 * ptree.c (lang_print_xnode): New function.
6815
6816 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
6817
6818 * pt.c (instantiate_class_template): Don't instantiate if pedantic
6819 and the args use template parms.
6820
6821 * pt.c (push_tinst_level): If the instantiaton uses template parms,
6822 fail silently.
6823 * decl.c (xref_basetypes): Do call complete_type for basetypes
6824 that involve template parameters.
6825
6826 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
6827
6828 * typeck2.c (process_init_constructor): Fix labeled init check.
6829
6830 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
6831
6832 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
6833 argument to tsubst and friends.
6834
6835 * pt.c (tsubst, FUNCTION_DECL): Tidy.
6836
6837 * typeck.c (build_x_function_call): Handle static member function
6838 templates like non-templates. Handle friend templates like normal
6839 function templates.
6840 * pt.c (tsubst, *_PARM): Don't use orig_level.
6841 (get_bindings): Don't call add_to_template_args.
6842 (instantiate_template): Likewise.
6843 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
6844 * ptree.c (print_lang_type): Print index/level for template parms.
6845
6846 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
6847
6848 * Make-lang.in (cc1plus): Note that cc1plus depends on
6849 cp/cp-tree.h and cp/cp-tree.def.
6850
6851 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
6852 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
6853 position in a template parameter list.
6854 * cp-tree.h (template_parm_index): New structure, used as the tree
6855 structure for a TEMPLATE_PARM_INDEX.
6856 (TEMPLATE_PARM_IDX): New macro.
6857 (TEMPLATE_PARM_LEVEL): Likewise.
6858 (TEMPLATE_PARM_DESCENDANTS): Likewise.
6859 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
6860 (TEMPLATE_PARM_DECL): Likewise.
6861 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6862 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
6863 (TEMPLATE_TYPE_DECL): Likewise.
6864 (TEMPLATE_CONST_IDX): Remove.
6865 (TEMPLATE_CONST_LEVEL): Likewise.
6866 (TEMPLATE_CONST_SET_INFO): Likewise.
6867 (TEMPLATE_TYPE_SET_INFO): Likewise.
6868 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
6869 node.
6870 (TEMPLATE_TYPE_LEVEL): Likewise.
6871 * decl.c (decls_match): Call comp_template_parms, rather than
6872 expanding it inline.
6873 (duplicate_decls): If two template declarations are being merged,
6874 then their TEMPLATE_INFOs should be merged as well.
6875 (grokfndecl): Save template-id information when declaring a friend
6876 with explicit template arguments. Pass arguments to
6877 check_explicit_specialization via correct convention; at some
6878 point check_explicit_specialization changed, but these call-sites
6879 did not.
6880 (grokdeclarator): Tidy up slightly.
6881 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
6882 two template functions with the same DECL_ASSEMBLER_NAME the same,
6883 since the names are not yet mangled.
6884 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
6885 TEMPLATE_CONST_PARM.
6886 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
6887 decl for a non-type parameter, rather than printing `<tparm ...>'.
6888 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
6889 (do_friend): Deal with template friends.
6890 * lex.c (do_pending_inlines): Call
6891 maybe_begin_member_template_processing, rather than
6892 conditionally calling begin_member_template_processing.
6893 (process_next_inline): Likewise. Call
6894 maybe_end_member_template_processing, rather than
6895 conditionally calling end_member_template_processing.
6896 (do_pending_defargs): Likewise.
6897 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
6898 TEMPLATE_CONST_PARM.
6899 * method.c (build_mangled_template_parm_index): New function.
6900 (build_overload_value): Use it.
6901 (build_overload_name): Likewise.
6902 * pt.c (finish_member_template_decl): Allow friend declarations.
6903 (template_class_depth): New function.
6904 (is_member_template): Rename, and modify, to become...
6905 (is_member_or_friend_template): New function.
6906 (end_member_template_processing): Rename, and modify, to become...
6907 (maybe_end_member_template_processing).
6908 (build_template_parm_index): New function.
6909 (reduce_template_parm_level): New function.
6910 (process_template_parm): Modify to use build_template_parm_index.
6911 (push_template_decl): Deal with friend templates.
6912 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
6913 TEMPLATE_CONST_PARM.
6914 (tsubst_friend_function): New function.
6915 (instantiate_class_template): Generate the DECL_FRIENDLIST
6916 for a new instantiation by using tsubst_friend_function rather
6917 than just tsubst.
6918 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
6919 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
6920 appropriate new macros. Use reduce_template_parm_level to
6921 generate lower-level template parameters. Handle tsubst'ing into
6922 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
6923 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
6924 templates. Similarly for the template parameters for a new
6925 template.
6926 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
6927 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
6928 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
6929 (get_bindings): Call add_to_template_args if necessary.
6930 (instantiate_decl): Handle instantiations of friend templates.
6931 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
6932 TEMPLATE_TYPE_PARM as a list of fields; it's not!
6933 * spew.c (yylex): Do a little manual constant propogation to
6934 clarify the code.
6935
6936 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
6937
6938 * error.c: Include sys/types.h.
6939
6940 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
6941
6942 * method.c (build_mangled_name): Start CPP directives in column zero.
6943
6944 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6945
6946 * typeck2.c (process_init_constructor): Sorry about non-trivial
6947 labeled initializers.
6948 * parse.y (initlist): Reenable labeled initializers.
6949
6950 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6951
6952 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
6953 all callers changed. Rely on the new parameter instead of arg
6954 being a TREE_LIST when determine whether we are working inside
6955 template template parameter. Clean up is_type test.
6956
6957 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
6958
6959 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
6960 * typeck2.c (initializer_constant_valid_p): Allow conversions
6961 between pointers and refrerences.
6962
6963 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
6964
6965 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
6966 if pedantic || warn_pointer_arith.
6967
6968 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6969
6970 * pt.c (unify): Handle TEMPLATE_DECL.
6971
6972 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
6973
6974 * cp-tree.h (strip_attrs): Remove decl.
6975
6976 1998-02-18 Doug Evans <devans@cygnus.com>
6977
6978 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
6979 Update olddecl's attributes too.
6980 (strip_attrs): Remove function.
6981 * typeck.c (common_type): Call merge_machine_type_attributes.
6982
6983 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
6984
6985 * parse.y (initdcl0_innards): New grammar symbol.
6986 (nomods_initdecls, nomods_initdcl0): Change type from itype to
6987 none, since the resulting value is never used.
6988 (parse_decl): New function.
6989 (datadef): Remove redundant actions.
6990 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
6991 * parse.c: Regenerated.
6992
6993 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
6994
6995 * parse.y (simple_stmt): Use getdecls() to check for decl.
6996
6997 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
6998
6999 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
7000 macros.
7001 (c++.install-common): Install c++filt properly as native or as cross
7002 variant.
7003 (c++.uninstall): Add c++filt.
7004
7005 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
7006
7007 * call.c (standard_conversion): Fix multi-level ptr conversions.
7008
7009 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
7010
7011 * init.c (build_new): Propagate error_mark_node up.
7012
7013 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
7014
7015 * parse.y (simple_stmt): If the condition isn't a declaration,
7016 start the controlled block after the test.
7017
7018 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7019
7020 * call.c (build_over_call): Convert builtin abs, labs and fabs to
7021 tree-codes.
7022 * decl.c (init_decl_processing): Reenable abs, labs and fabs as
7023 builtins.
7024
7025 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7026
7027 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
7028
7029 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
7030
7031 * cp-tree.h: Add access_protected_virtual_node.
7032 * class.c (init_class_processing): Initialize it.
7033 * decl.c (xref_basetypes): Use it.
7034 * parse.y (base_class_access_list): Likewise.
7035
7036 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
7037 (c++.install-common): Install c++filt.
7038
7039 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7040
7041 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
7042
7043 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
7044
7045 * call.c (reference_binding): Use comptypes when comparing
7046 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
7047
7048 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
7049
7050 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
7051 (really_overloaded_fn): Move check here from is_overloaded_fn.
7052 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
7053
7054 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
7055
7056 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
7057 conversions.
7058
7059 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
7060
7061 * cp-tree.h (push_template_decl): Return the decl passed in, or an
7062 equivalent duplicate.
7063 * decl.c (pushtag): Use the return value from push_template_decl.
7064 (duplicate_decls): When duplicating a template declaration, merge
7065 the DECL_TEMPLATE_RESULTs as well.
7066 (make_implicit_typename): Don't try to dive into typename types to
7067 find a context for making a new implicit typename.
7068 (start_decl): Use the return value from push_template_decl.
7069 (grokdeclarator): Complain about declarations list `const operator
7070 int'. Since we don't correctly handle in-class initializations of
7071 non-static data members, complain about this (now illegal)
7072 practice. Issue an error for initializations of non-const statics
7073 since that is illegal as well, and since we don't handle that case
7074 correctly either.
7075 (start_function): Use the return value from push_template_decl.
7076 (start_method): Likewise.
7077 * decl2.c (grokfield): Likewise. Since the change to
7078 grokdeclarator ensures that all initialized fields are in fact
7079 static, remove a redundant test for TREE_PUBLIC.
7080 * parse.y (initlist): Disable labeled initializers since they do
7081 not work as per the documentation, and since they do not use the
7082 same syntax as the C front end.
7083 * pt.c (push_template_decl): Return the decl passed in, or an
7084 equivalent duplicate.
7085 (lookup_template_class): When searching in a nested context,
7086 use the right arguments.
7087 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
7088 * typeck.c (build_component_ref): Assign the correct type to the
7089 result of build_vfn_ref.
7090
7091 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
7092
7093 * pt.c (convert_nontype_argument): Fix typo.
7094 (check_explicit_specialization): Allow old-style specialization
7095 of class template members.
7096
7097 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
7098 Manfred Hollstein <manfred@s-direktnet.de>
7099
7100 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
7101 when deciding to override DECL_ASSEMBLER_NAME.
7102
7103 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
7104
7105 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
7106 * cp-tree.h (flag_do_squangling): Add declaration.
7107 * lang-options.h: Add -fsquangle and -fno-squangle.
7108 * method.c: Add macros and static variables for squangling.
7109 (build_overload_name): Rename to build_mangled_name, add logic for B
7110 compression, and split into process_modifiers and
7111 process_overload_item.
7112 (process_modifiers): New function, to handle constant, reference,
7113 and pointer types.
7114 (process_overload_item): New function, handles issue of type codes.
7115 (build_overload_name): New function, start squangling and call
7116 build_mangled_name.
7117 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
7118 (start_squangling): New function to initialize squangling structs.
7119 (end_squangling): New function to destroy squangling structs.
7120 (nrepeats): Rename variable to Nrepeats.
7121 (issue_nrepeats): New function for issuing 'n' type repeats.
7122 (check_ktype): New function to check for type K name compression.
7123 (build_overload_nested_name): Add a check for K name compression.
7124 (build_qualified_name): Add a check for K name compression and don't
7125 use DECL_ASSEMBLER_NAME when squangling is on.
7126 (check_btype): New function, checks for B type compression.
7127 (build_static_name, build_decl_overload_real): Initiate squangling.
7128 (build_typename_overload, build_overload_with_type): Initiate
7129 squangling
7130
7131 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
7132
7133 * method.c (make_thunk): Avoid name buffer overflow.
7134
7135 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
7136
7137 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
7138 don't define them yet.
7139
7140 * parse.y (nomods_initdcl0): Add constructor_declarator case.
7141
7142 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7143
7144 * config-lang.in (diff_excludes): Use basename only.
7145
7146 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
7147
7148 * tinfo2.cc: Add tinfo for signed char.
7149
7150 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
7151
7152 * search.c (compute_access): Handle protected constructors in derived
7153 classes as accessible.
7154
7155 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
7156
7157 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
7158 Call convert_from_reference sooner.
7159
7160 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
7161
7162 * cvt.c (ocp_convert): Obtain the constant values from constant
7163 decls even if the destination type is the same as the type of the
7164 decl.
7165
7166 * decl2.c (finish_file): Make sure that static inlines with
7167 definitions are not marked DECL_EXTERNAL before returning.
7168
7169 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
7170
7171 * decl.c: Lose arg_looking_for_template.
7172 (lookup_name_real): Likewise.
7173 * parse.y: Lose processing_template_arg, template_arg1
7174 (primary): Likewise.
7175 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
7176
7177 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7178
7179 * error.c (dump_decl): Fix type of default arguments for template
7180 template parameters and nontype template parameters.
7181 * parse.y (template_parm): Handle invalid default template
7182 template arguments here.
7183
7184 * parse.y (template_parm): Use template_arg instead of PTYPENAME
7185 for default template template argument.
7186 * pt.c (coerce_template_parms): Merge default template argument
7187 codes. Can treat RECORD_TYPE as template name if it is implicitly
7188 created. Fix argument index in error message.
7189 * typeck.c (comptypes): Merge template argument comparison codes in
7190 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
7191
7192 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
7193
7194 * lex.c (file_name_nondirectory): Also check for '/'.
7195
7196 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
7197
7198 * parse.y (primary): Deal with statement-expressions in
7199 templates.
7200 * pt.c (tsubst_copy): Handle BIND_EXPR.
7201 * tree.c (mapcar): Likewise.
7202
7203 * call.c (add_template_candidate_real): Pass extra parameter to
7204 fn_type_unification.
7205 * cp-tree.h (fn_type_unification): Add parameter.
7206 * pt.c (fn_type_unification): Add additional parameter to deal with
7207 static member functions.
7208 (get_bindings): Deal with static member functions.
7209
7210 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
7211 (revert_static_member_fn): Declare.
7212 * decl.c (revert_static_member_fn): Remove declaration. Change
7213 linkage from internal to external.
7214 (cp_finish_decl): Deal with virtual functions in classes local to
7215 template functions.
7216 * decl2.c (finish_file): Don't forget to emit increment/decrement
7217 expressions in initializers for file-scope variables.
7218 * parse.y (typename_sub2): If the typename doesn't names a
7219 template, rather than a type, issue an error message.
7220 * pt.c (check_explicit_specialization): Handle specializations of
7221 static member functions.
7222 (coerce_template_parms): Handle offset references to lists of
7223 member functions.
7224 * search.c (note_debug_info_needed): Don't crash when handed a
7225 type which is being defined.
7226 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
7227 that can happen with some illegal code.
7228
7229 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7230
7231 * call.c (user_harshness): Initialize `code' to 0.
7232 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
7233 (null_ptr_cst_p): Add parentheses around && within ||.
7234 (standard_conversion): Likewise.
7235 (z_candidate): Likewise.
7236 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
7237 (build_object_call): Likewise for `mem_args'.
7238 (build_new_op): Likewise for `mem_arglist'. Add `return' from
7239 default case in enumeration switch.
7240
7241 * class.c (build_vtable_entry): Add explicit braces to avoid
7242 ambiguous `else'.
7243 (build_class_init_list): Likewise.
7244 (finish_struct_1): Initialize `width' to 0.
7245 (instantiate_type): Initialize `name' to NULL_TREE. Add
7246 explicit braces to avoid ambiguous `else'.
7247
7248 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
7249 `else'.
7250
7251 * decl.c (grok_reference_init): Eliminate unused parameter, all
7252 callers changed.
7253 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
7254 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
7255 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
7256 (grokdeclarator): Add parentheses around && within ||. Add
7257 explicit braces to avoid ambiguous `else'.
7258 (grokparms): Initialize `type' to NULL_TREE.
7259 (xref_tag): Remove unused label `just_return'.
7260 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
7261 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
7262 (hack_incomplete_structures): Add parentheses around assignment
7263 used as truth value.
7264
7265 * decl2.c (coerce_delete_type): Hide definition of `e3'.
7266
7267 * error.c: Include <stdlib.h>.
7268 (dump_expr): Change the type of `i' to size_t. Remove unused
7269 label `error'.
7270
7271 * except.c (init_exception_processing): Remove unused variable `d'.
7272 (expand_throw): Likewise for `label'.
7273
7274 * friend.c (add_friends): Add explicit braces to avoid ambiguous
7275 `else'.
7276
7277 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
7278 (sort_base_init): Likewise for `binfo'.
7279 (expand_member_init): Likewise for `rval'.
7280 (build_member_call): Add parentheses around assignment used as
7281 truth value.
7282 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
7283 (build_new): Initialize `nelts' to NULL_TREE. Initialize
7284 `old_immediate_size_expand' to 0.
7285 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
7286 (build_vec_delete_1): Remove unused variable `block'.
7287 (expand_vec_init): Initialize `itype' to NULL_TREE.
7288
7289 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
7290 declaration of `index' and `rindex' with autoconf macros.
7291 (reinit_parse_for_expr): Remove unused variables
7292 `look_for_semicolon' and `look_for_lbrac'.
7293 (cons_up_default_function): Initialize `args' to NULL_TREE.
7294 (readescape): Initialize `firstdig' to 0.
7295 (real_yylex): Add parentheses around assignment used as truth value.
7296
7297 * method.c: Include <strings.h> if we don't have <string.h>.
7298 Protect declaration of `index' with autoconf macro.
7299
7300 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
7301 Initialize `type' to NULL_TREE.
7302 (structsp): Remove unused variable `id'.
7303
7304 * pt.c (coerce_template_parms): Add explicit braces to avoid
7305 ambiguous `else'.
7306 (lookup_template_class): Initialize `template' to NULL_TREE.
7307 (instantiate_class_template): Remove unused variable `name' and `e'.
7308 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
7309 (do_poplevel): Initialize `saved_warn_unused' to 0.
7310 (type_unification): Remove unused varable `parm'.
7311 (unify): Likewise for `j'.
7312
7313 * repo.c (init_repo): Add parentheses around assignment used as
7314 truth value.
7315 (finish_repo): Remove unused varable `p'.
7316
7317 * search.c (get_binfo): Initiize `type' to NULL_TREE.
7318 (get_base_distance): Likewise.
7319 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
7320 and `new_v' to NULL_TREE.
7321 (lookup_fnfields): Likewise for `rval_binfo_h'.
7322 (breadth_first_search): Add parentheses around assignment used as
7323 truth value.
7324 (get_template_base): Initialize `type' to NULL_TREE.
7325
7326 * sig.c (append_signature_fields): Initialize `last_mfptr' to
7327 NULL_TREE.
7328 (build_signature_table_constructor): Likewise for
7329 `last_rhs_field', `pfn' and `vt_off'.
7330 (build_sigtable): Likewise for `init'.
7331
7332 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
7333 (propagate_binfo_offsets): Likewise for `delta'.
7334 (hash_tree_cons): Initialize hashcode to 0.
7335 (can_free): Likewise for `size'.
7336 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
7337
7338 * typeck.c (convert_sequence): Hide prototype.
7339 (common_type): Add explicit braces to avoid ambiguous `else'.
7340 (comp_target_types): Likewise.
7341 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
7342 (build_function_call_real): Add explicit braces to avoid ambiguous
7343 `else'.
7344 (convert_arguments): Initialize `called_thing' to 0.
7345 (convert_for_initialization): Initialize `savew' and `savee' to 0.
7346
7347 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
7348 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
7349 (build_x_arrow): Likewise for `last_rval'.
7350
7351 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
7352
7353 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
7354
7355 * decl.c (init_decl_processing): Use set_sizetype.
7356 * decl2.c (sizetype): Don't declare.
7357 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
7358 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
7359 (build_component_addr, unary_complex_lvalue): Likewise.
7360 * rtti.c (expand_class_desc): Likewise.
7361 * class.c (get_vfield_offset): Likewise.
7362
7363 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
7364
7365 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
7366 early to avoid bogus error. Handle overloaded function
7367 names provided as template arguments correctly.
7368 (coerce_template_parms): Don't mishandle overloaded functions when
7369 dealing with template template parameters.
7370 (lookup_template_class): Issue an error message, rather than
7371 crashing, when the TYPE_DECL provided is not a template type.
7372
7373 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
7374
7375 * class.c (instantiate_type): Don't just return a known type if
7376 it's wrong.
7377
7378 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
7379
7380 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
7381 since that code could never be reached.
7382
7383 * error.c (dump_decl): Avoid aborting in the midst of printing an
7384 error message about an illegal template declaration.
7385
7386 * parse.y (structsp): Print an error message, rather than crashing,
7387 when a class-head does not name a class.
7388
7389 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
7390 template arguments as a g++ extension.
7391
7392 * cp-tree.def (ALIGNOF_EXPR): New tree code.
7393 * decl2.c (grok_alignof): If processing_template_decl, just store
7394 the expression.
7395 * typeck.c (c_alignof): Likewise.
7396 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
7397 * error.c (dump_expr): Likewise.
7398 * pt.c (tsubst_copy): Likewise.
7399 * tree.c (cp_tree_equal): Likewise.
7400 * pt.c (uses_template_parms): Correctly determine whether or not a
7401 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
7402 folding can be done.
7403
7404 * cp-tree.h (grok_enum_decls): Remove type parameter.
7405 * decl.c (grok_enum_decls): Likewise.
7406 * decl2.c (grok_x_components): Call grok_enum_decls
7407 unconditionally, since it will do nothing if there is no
7408 current_local_enum. Use the new calling sequence.
7409 * pt.c (tsubst_enum): Use the new calling sequence for
7410 grok_enum_decls.
7411
7412 * decl.c (start_function): Make member functions of local classes
7413 in extern inline functions have comdat linkage here...
7414 (grokdeclarator): Rather than here.
7415
7416 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
7417
7418 * pt.c (convert_nontype_argument): Use decl_constant_value.
7419
7420 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
7421
7422 * call.c (add_template_candidate_real): New function.
7423 (add_template_candidate): Use it.
7424 (add_template_conv_candidate): Likewise.
7425 (joust): Pass extra argument to more_specialized.
7426 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
7427 (is_local_class): Remove.
7428 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
7429 * cp-tree.h (is_local_class): Remove.
7430 (perform_array_to_pointer_conversion): Likewise.
7431 (finish_member_template_decl): Add.
7432 (check_explicit_specialization): Return a tree, not an int.
7433 (more_specialized): Take additional argument.
7434 (get_bindings): Likewise.
7435 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
7436 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7437 (perform_array_to_pointer_conversion): Remove.
7438 * decl.c (saved_scope): Add processing_specialization,
7439 processing_explicit_instantiation fields.
7440 (maybe_push_to_top_level): Save them.
7441 (pop_from_top_level): Restore them.
7442 (grokfndecl): Use new return value from
7443 check_explicit_specialization.
7444 (start_decl): Don't check flag_guiding_decls before pushing
7445 decls.
7446 (cp_finish_decl): Remove previous (bogus) change.
7447 (grok_declarator): Use decl_function_context rather than
7448 is_local_class.
7449 * decl2.c (finish_file): Pass extra argument to get_bindings.
7450 (build_expr_from_tree): Let build_x_component_ref check
7451 validity of arguments rather than doing it here.
7452 * lex.c (cons_up_default_function): Remove code fooling with
7453 processing_specialization, processing_explicit_instantiation
7454 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
7455 * method.c (build_overload_identifier): Mangle local classes in
7456 template functions correctly.
7457 * parse.y (finish_member_template_decl): Move to pt.c.
7458 * pt.c (finish_member_template_decl): Moved here from parse.y.
7459 (print_candidates): New function.
7460 (determine_specialization): Change interface. Properly look for
7461 most specialized versions of template candidates.
7462 (check_explicit_specialization): Fully process explicit
7463 instantiations.
7464 (push_template_decl): Avoid looking at CLASSTYPE fields in
7465 FUNCTION_DECLS.
7466 (determine_overloaded_function): Remove.
7467 (convert_nontype_argument): Change name from
7468 convert_nontype_parameter. Use determine_overloaded_function
7469 instead of instantiate_type.
7470 (mangle_class_name_for_template): Handle type contexts as well as
7471 function contexts.
7472 (classtype_mangled_name): Likewise.
7473 (lookup_template_class): Likewise.
7474 (tsubst): Likewise.
7475 (more_specialized): Take explict template arguments as a
7476 parameter.
7477 (most_specialized): Likewise.
7478 (get_bindings): Likewise. Check that return types match before
7479 proclaiming a function a match.
7480 (do_decl_instantiation): Remove code searching for function to
7481 instantiate; that is now done in check_explicit_specialization.
7482 (add_maybe_template): Pass extra argument to get_bindings.
7483 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
7484 implementation.
7485 * typeck.c (build_component_ref): Check for invalid arguments.
7486
7487 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
7488
7489 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
7490 return_target and call_target are equivalent.
7491
7492 * pt.c (type_unification_real): Just accept function parms that
7493 don't use any template parms.
7494
7495 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
7496
7497 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
7498 unset DECL_NOT_REALLY_EXTERN.
7499
7500 * parse.y (typename_sub*): Fix std::.
7501
7502 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
7503
7504 * error.c (dump_decl): Fix type default template args.
7505 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
7506
7507 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
7508
7509 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
7510 (file_name_nondirectory): Use.
7511
7512 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7513
7514 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
7515 that are not really present. Substitute default arguments in
7516 template template arguments. Correctly convert TEMPLATE_DECL to
7517 TEMPLATE_TEMPLATE_PARM.
7518 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
7519 are no longer treated specially here.
7520 * parse.y (template_template_parm): Fix copy error.
7521 * decl.c (grokdeclarator): Warn about missing `typename' for nested
7522 type created from template template parameters.
7523 * parse.y (bad_parm): Likewise
7524
7525 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
7526 (push_nested_class): Likewise.
7527 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
7528 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
7529 (copy_template_template_parm): Declare.
7530 * decl.c (arg_looking_for_template): New variable.
7531 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
7532 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
7533 node if arg_looking_for_template is nonzero.
7534 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
7535 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
7536 (grokdeclarator): Handle TEMPLATE_DECL.
7537 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
7538 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
7539 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
7540 (dump_decl): Handle unnamed template type parameters.
7541 Handle template template parameters.
7542 (dump_function_name): Handle template template parameters.
7543 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
7544 Handle TEMPLATE_TEMPLATE_PARM.
7545 * method.c (build_template_template_parm_names): New function.
7546 (build_template_parm_names): Handle TEMPLATE_DECL.
7547 (build_overload_nested_name, build_overload_name):
7548 Handle TEMPLATE_TEMPLATE_PARM.
7549 * parse.y (maybe_identifier): New nonterminal.
7550 (template_type_parm): Use it.
7551 (template_template_parm, template_arg1): New nonterminal.
7552 (template_parm): Add template_template_parm rules.
7553 (template_arg): Set processing_template_arg.
7554 (template_arg1): Rules moved from template_arg.
7555 (primary, nonnested_type): Set arg_looking_for_template if we are
7556 processing template arguments.
7557 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
7558 (process_template_parm): Handle template template parameters.
7559 (coerce_template_parms, comp_template_args): Likewise.
7560 (mangle_class_name_for_template, lookup_template_class): Likewise.
7561 (uses_template_parms): Handle TEMPLATE_DECL and
7562 TEMPLATE_TEMPLATE_PARM.
7563 (current_template_args): Handle TEMPLATE_DECL.
7564 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
7565 * search.c (dfs_walk, dfs_record_inheritance):
7566 Handle TEMPLATE_TEMPLATE_PARM.
7567 * tree.c (copy_template_template_parm): New function.
7568 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
7569 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
7570
7571 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
7572
7573 * decl.c (start_decl): Don't allow duplicate definitions of static
7574 data members.
7575
7576 * call.c (build_user_type_conversion_1): Handle user-defined
7577 template conversion operators correctly.
7578
7579 * decl2.c (build_expr_from_tree): Issue an error message if the
7580 object in a COMPONENT_REF is a TEMPLATE_DECL.
7581
7582 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
7583
7584 * class.c (is_local_class): New function.
7585 * cp-tree.h (is_local_class): Declare it.
7586 (last_tree): Likewise.
7587 (begin_tree): Likewise.
7588 (end_tree): Likewise.
7589 (lookup_template_class): Change prototype.
7590 * decl.c (cp_finish_decl): Check for NULL where necesary.
7591 Consider FUNCTION_DECLS to declare objects with top-level binding,
7592 when calling make_decl_rtl.
7593 (grokdeclarator): Give members of local classes internal linkage.
7594 (start_function): Remove declaration of last_tree.
7595 (finish_function): Set flag_keep_inline_functions around call to
7596 rest_of_compilation if we are processing a member function in a
7597 local class.
7598 (start_method): Call push_template_decl for member functions of
7599 local classes in template functions.
7600 * decl2.c (import_export_decl): Don't give external linkage to
7601 instantiations of templates with internal linkage.
7602 * parse.y (last_tree): Remove declaration.
7603 (template_type): Pass extra parameter to lookup_template_class.
7604 (self_template_type): Likewise.
7605 (structsp): Move call to reset_specialization into left_curly.
7606 (left_curly): Call reset_specialization, and begin_tree.
7607 * pt.c (saved_trees): New variable.
7608 (mangle_class_name_for_template): Change prototype. Use
7609 additional function context to name local classes in templates
7610 correctly.
7611 (classtype_mangled_name): Pass the context.
7612 (push_template_decl): Handle local classes and templates, and
7613 member functions for such classes.
7614 (convert_nontype_parameter): Fix handling of pointer-to-member
7615 constants.
7616 (lookup_template_class): Handle local classes in templates.
7617 (tsubst): Likewise. Don't assume that template instantiations
7618 have external linkage; pay attention to the template declaration.
7619 (mark_decl_instantiated): Likewise.
7620 (begin_tree): New function.
7621 (end_tree): Likewise.
7622
7623 * decl.c (xref_basetypes): Don't call complete_type for basetypes
7624 that involve template parameters; that can lead to infinite
7625 recursion unnecessarily.
7626
7627 * pt.c (register_specialization): Do not register specializations
7628 that aren't ready to be registered yet.
7629 (check_explicit_specialization): Handle explicit specialization of
7630 constructors and destructors.
7631 (build_template_decl): New function.
7632 (push_template_delc): Handle out-of-class specializations of
7633 member templates.
7634
7635 * pt.c (check_explicit_specialization): Set up the template
7636 information before registering the specialization.
7637 (coerce_template_parms): Fix thinko.
7638 (tsubst): Handle specializations of member templates correctly.
7639
7640 * class.c (finish_struct_methods): Remove calls to
7641 check_explicit_specialization from here.
7642 (finish_struct): And insert them here.
7643 * cp-tree.h (perform_qualification_conversions): New function.
7644 (perform_array_to_pointer_conversion): Likewise.
7645 (begin_explicit_instantiation): Likewise.
7646 (end_explicit_instantiation): Likewise.
7647 (determine_specialization): Renamed from
7648 determine_explicit_specialization.
7649 (comp_template_parms): New function.
7650 (processing_explicit_instantiation): New variable.
7651 * cvt.c (perform_qualification_conversions): New function.
7652 (perform_array_to_pointer_conversion): Likewise.
7653 * decl.c (duplicate_decls): Don't consider template functions
7654 alike unless they have the same parameters. Refine handling of
7655 instantiation/specialization mismatches.
7656 (start_decl): Don't call pushdecl for template specializations,
7657 since they don't affect overloading.
7658 (start_function): Likewise
7659 (grokfndecl): Call check_explicit_specialization a little later.
7660 Don't call duplicate_decls for memberm template specializations.
7661 (grokdeclarator): Don't update template_count for classes that are
7662 themselves specializations. Remove use of `2' as parameter to
7663 grokfndecl since that value isn't used.
7664 * lex.c (cons_up_default_function): Save and restore
7665 processing_explicit_instantiation around calls to grokfield.
7666 * parse.y (finish_member_template_decl): New function.
7667 (component_decl_1): Use it.
7668 (fn.def2): Likewise.
7669 (template_arg_list_opt): New nonterminal.
7670 (template_type): Use it.
7671 (self_template_type): Likewise.
7672 (template_id): Likewise.
7673 (object_template_id): Likewise.
7674 (notype_template_declarator): Likwise.
7675 (begin_explicit_instantiation): Likewise.
7676 (end_explicit_instantiation): Likewise.
7677 (explicit_instantiation): Use them.
7678 * pt.c (coerce_template_parms): Add parameters.
7679 (processing_explicit_instantiation): New variable.
7680 (convert_nontype_parameter): New function.
7681 (determine_overloaded_function): Likewise.
7682 (begin_explicit_instantiation): Likewise.
7683 (end_explicit_instantiation): Likewise.
7684 (retrieve_specialization): Likewise.
7685 (register_specialization): Likewise.
7686 (processing_explicit_specialization): Removed.
7687 (determine_specialization): Handle specializations of member
7688 functions of template class instantiations.
7689 (check_explicit_specialization): Refine to conform to standard.
7690 (comp_template_parms): New function.
7691 (coerce_template_parms): Call convert_nontype_parameter.
7692 (tsubst): Refine handling of member templates. Use
7693 register_specialization.
7694 (instantiate_template): Use retrieve_specialization.
7695 (do_decl_instantiation): Likewise.
7696 (instantiate_decl): Likewise.
7697 (type_unification): Improve handling of explict template
7698 arguments.
7699 * tree.c (mapcar): Return error_mark_node, rather than aborting,
7700 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
7701 * typeck.c (build_unary_op): Call determine_specialization, rather
7702 than determine_explicit_specialization.
7703
7704 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
7705
7706 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
7707
7708 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7709
7710 * error.c (dump_decl): For enum tags, output the tag, not its value.
7711
7712 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
7713
7714 * decl.c (init_decl_processing): Only call init_rtti_processing
7715 FLAG_RTTI is set.
7716
7717 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
7718
7719 * init.c (build_new_1): Split out from build_new.
7720 (build_new): Just return a NEW_EXPR.
7721 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
7722
7723 * decl2.c (get_temp_regvar): Tweak.
7724
7725 * cp-tree.h (TREE_CALLS_NEW): Comment out.
7726 * class.c (resolves_to_fixed_type_p): Remove use.
7727 * method.c (build_opfncall): Likewise.
7728 * call.c (build_new_op): Likewise.
7729
7730 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
7731
7732 * exception.cc (__eh_alloc, __eh_free): New fns.
7733 (__cp_push_exception, __cp_pop_exception): Use them.
7734 (__uncatch_exception): Call terminate here if no exception.
7735 * except.c (build_terminate_handler): New fn.
7736 (expand_start_catch_block): Use it.
7737 (expand_exception_blocks): Likewise.
7738 (alloc_eh_object): New fn.
7739 (expand_throw): Use it. Protect exception init with terminate.
7740 * typeck.c (build_modify_expr): Remove code that ignores trivial
7741 methods.
7742
7743 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7744
7745 * call.c (add_builtin_candidate): Add default case in enumeration
7746 switch.
7747 (build_new_op): Likewise.
7748 (convert_like): Likewise.
7749 * cvt.c (build_expr_type_conversion): Likewise.
7750 * tree.c (real_lvalue_p): Likewise.
7751 (lvalue_p): Likewise.
7752 (cp_tree_equal): Likewise.
7753 * typeck.c (comptypes): Likewise.
7754 (build_component_ref): Likewise.
7755 (build_function_call_real): Likewise.
7756 (build_binary_op_nodefault): Likewise.
7757 (build_unary_op): Likewise.
7758 (build_modify_expr): Likewise.
7759 * typeck2.c (initializer_constant_valid_p): Likewise.
7760
7761 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
7762
7763 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
7764
7765 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
7766
7767 * pt.c (coerce_template_parms): Make sure to digest_init if
7768 possible.
7769
7770 * decl.c (duplicate_decls): Make the newdecl virtual if the
7771 olddecl was, just as is done with other attributes of olddecl.
7772
7773 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
7774
7775 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
7776 address of an OFFSET_REF.
7777
7778 * cp-tree.def: Add AGGR_INIT_EXPR.
7779 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
7780 AGGR_INIT_EXPR where appropriate.
7781 * expr.c (cplus_expand_expr): Likewise. Simplify.
7782
7783 * decl2.c (finish_file): Remove call to register_exception_table.
7784
7785 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7786
7787 * pt.c (instantiate_class_template): Don't do injection when
7788 processing_template_decl is true, as pollutes current_binding_level
7789 for base classes.
7790
7791 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
7792
7793 * pt.c (maybe_fold_nontype_arg): Add prototype.
7794
7795 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7796
7797 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
7798 * error.c (dump_expr): Likewise.
7799
7800 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
7801
7802 * typeck.c (build_function_call_real): Remove "inline called before
7803 definition" pedwarn.
7804
7805 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
7806
7807 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7808
7809 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
7810
7811 * pt.c (type_unification_real): Change __null to type void* with
7812 a warning.
7813
7814 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
7815
7816 * call.c (implicit_conversion): Don't call
7817 build_user_type_conversion_1 with a NULL expr, since it will
7818 crash.
7819
7820 * pt.c (unify): Don't try to unify array bounds if either array is
7821 unbounded.
7822
7823 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7824
7825 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
7826 Replace extern decls with casts.
7827
7828 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
7829 Update last_parm_cleanup_insn.
7830 (store_after_parms): Remove.
7831 * cp-tree.h: Adjust.
7832
7833 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
7834
7835 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
7836 (finish_file): Check DECL_COMDAT instead of weak|one_only.
7837 (import_export_vtable): Use make_decl_one_only instead of
7838 comdat_linkage for win32 tweak.
7839 (import_export_decl): Likewise.
7840 * pt.c (mark_decl_instantiated): Likewise.
7841
7842 * decl2.c (finish_file): Lose handling of templates in pending_statics.
7843
7844 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
7845
7846 * decl2.c (finish_file): Lose call to expand_builtin_throw.
7847 * except.c (expand_builtin_throw): Remove.
7848 * cp-tree.h: Remove ptr_ptr_type_node.
7849 * decl.c: Likewise.
7850
7851 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
7852
7853 * decl.c (ptr_ptr_type_node): Define.
7854 (init_decl_processing): Initialize it.
7855 * cp-tree.h: Declare it.
7856 * exception.cc (__cp_exception_info): Use __get_eh_info.
7857 (__cp_push_exception): Ditto.
7858 (__cp_pop_exception): Ditto.
7859
7860 From Scott Snyder <snyder@d0sgif.fnal.gov>:
7861 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
7862 saved_pc.
7863 (init_exception_processing): Removed saved_pc initialization.
7864
7865 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
7866
7867 * pt.c (instantiate_decl): Defer all templates but inline functions.
7868
7869 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
7870
7871 * init.c (expand_vec_init): Don't fold a list of parameters.
7872
7873 * decl.c (copy_args_p): Handle copy elision for types with virtual
7874 bases.
7875 * call.c (build_over_call): Likewise.
7876
7877 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
7878
7879 * pt.c (lookup_template_function): Copy the template arguments,
7880 not just the list containing them, to the permanent obstack.
7881
7882 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
7883
7884 * except.c (expand_start_catch_block): suspend_momentary for the
7885 terminate handler.
7886
7887 * error.c (dump_decl): Handle LOOKUP_EXPR.
7888
7889 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
7890
7891 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
7892 permanent obstack if we are processing a template decl.
7893 * typeck.c (build_static_cast): Likewise.
7894 (build_const_cast): Likewise.
7895 (build_reinterpret_cast): Likewise.
7896
7897 * pt.c (coerce_template_parms): Coerce some expressions, even
7898 when processing_template_decl.
7899
7900 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7901
7902 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
7903 handling of pointer difference expressions.
7904
7905 * typeck.c (comp_target_types): Comparison of function/method types
7906 is independent of nptrs.
7907
7908 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
7909
7910 * pt.c (tsubst): Avoid creating pointer to reference and
7911 reference to reference types.
7912
7913 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
7914
7915 * parse.y (do_id): New nonterminal.
7916 (template_id): Use it.
7917
7918 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
7919
7920 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
7921 * spew.c (yylex): Don't do_identifier here.
7922 * decl2.c (build_expr_from_tree): Revert last change.
7923
7924 * decl2.c (build_expr_from_tree): Expand the name for a method call.
7925 * parse.y (object_template_id): Don't try to take the DECL_NAME.
7926
7927 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
7928
7929 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
7930 alloc_expr.
7931 * call.c (build_op_delete_call): Adjust.
7932
7933 * except.c (expand_end_catch_block): Lose rethrow region.
7934 (expand_start_catch_block): Likewise.
7935 (expand_end_catch_block): Don't expand_leftover_cleanups.
7936
7937 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7938
7939 * pt.c (tsubst): Remove tree_cons call (places redundant info into
7940 DECL_TEMPLATE_INSTANTIATION).
7941
7942 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
7943
7944 * tree.c (is_overloaded_fn): Handle getting a fn template.
7945 (really_overloaded_fn): Likewise.
7946 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
7947 * pt.c (check_explicit_specialization): Tweak.
7948 (determine_explicit_specialization): Tweak.
7949
7950 * tree.c, cp-tree.h (get_target_expr): New fn.
7951
7952 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
7953
7954 * pt.c (check_explicit_specialization): Fix misspelling in
7955 diagnostic: `preceeded'.
7956 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
7957 `conversiona'.
7958
7959 1997-12-02 Mark Mitchell <mmitchell@usa.net>
7960
7961 * pt.c (determine_explicit_specialization): Avoid an internal
7962 error for bad specializations.
7963
7964 * method.c (build_overload_value): Handle SCOPE_REF.
7965
7966 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
7967
7968 * class.c (prepare_fresh_vtable): Enable even more complex MI
7969 vtable names.
7970
7971 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
7972
7973 * exception.cc (__check_eh_spec): Optimize a bit.
7974
7975 * exception.cc (__cp_pop_exception): Lose handler arg.
7976 * except.c (do_pop_exception): Likewise.
7977 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
7978 (expand_end_catch_block): Likewise.
7979
7980 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7981
7982 * pt.c (check_explicit_specialization): Complain about using a
7983 template-id for a non-specialization.
7984
7985 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
7986
7987 * repo.c: Prototype rindex only if needed.
7988 * xref.c: Likewise.
7989
7990 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7991
7992 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
7993
7994 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
7995
7996 * typeck.c (build_const_cast): Handle references here instead of
7997 handing off to convert_to_reference.
7998
7999 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
8000 TerminateFunctionCall.
8001 (init_exception_processing): Likewise. Terminate et al are now
8002 the fns, not ADDR_EXPRs.
8003 (various): Lose redundant assemble_external calls.
8004 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
8005
8006 * cp-tree.h (struct lang_decl_flags): Add comdat.
8007 (DECL_COMDAT): New macro.
8008 * decl.c (duplicate_decls): Propagate it.
8009 (cp_finish_decl): Handle it.
8010 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
8011
8012 * class.c: Remove static pending_hard_virtuals.
8013 (add_virtual_function): Take pointers to pending_virtuals
8014 and pending_hard_virtuals.
8015 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
8016
8017 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
8018
8019 * decl2.c (import_export_vtable): If we support one_only but not
8020 weak symbols, mark instantiated template vtables one_only.
8021 (import_export_decl): Likewise for tinfo functions.
8022 (finish_vtable_vardecl): Also write out vtables from explicitly
8023 instantiated template classes.
8024 * pt.c (mark_class_instantiated): Revert last change.
8025
8026 * except.c (expand_throw): Call mark_used on the destructor.
8027
8028 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
8029
8030 * lex.c (lang_init): Enable flag_exceptions by default if no
8031 command line switch was specified.
8032
8033 1997-11-26 Mark Mitchell <mmitchell@usa.net>
8034
8035 * pt.c (unify): Handle `void' template parameters in
8036 specializations.
8037
8038 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
8039
8040 * rtti.c (build_dynamic_cast): Handle template case here.
8041 (build_dynamic_cast_1): Not here.
8042
8043 * typeck2.c (digest_init): Make copies where appropriate.
8044
8045 * decl2.c (delete_sanity): resolve_offset_ref.
8046
8047 * except.c: Call terminate without caching so many bits.
8048
8049 * except.c (expand_start_catch_block): Fix catching a reference
8050 to pointer.
8051
8052 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8053
8054 * init.c (build_new): Copy size to the saveable obstack.
8055
8056 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
8057 TRY_CATCH_EXPR for now.
8058
8059 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8060
8061 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
8062 has DECL_LANG_SPECIFIC.
8063
8064 * exception.cc (struct cp_eh_info): Add handlers field.
8065 (__cp_push_exception): Initialize it.
8066 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
8067 (__throw_bad_exception): Remove.
8068 * except.c (call_eh_info): Add handlers field.
8069 (get_eh_handlers): New fn.
8070 (push_eh_cleanup): Increment handlers.
8071
8072 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
8073
8074 * except.c (expand_start_eh_spec): Use the try/catch code.
8075 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
8076 doing everything inline.
8077 (init_exception_processing): throw_type_match now takes
8078 const void pointers.
8079 * exception.cc (__check_eh_spec): New fn.
8080 * inc/exception: Neither terminate nor unexpected return.
8081 * decl.c: Make const_ptr_type_node public.
8082 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
8083
8084 * except.c (expand_start_catch_block): We only need the rethrow
8085 region for non-sjlj exceptions.
8086 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
8087
8088 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
8089
8090 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
8091 (various.o): Likewise.
8092 * inc/new: Add placement deletes. Add throw specs for default new.
8093 * new.cc (set_new_handler): Move here from libgcc2.
8094 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
8095 (new): Move from libgcc2. Throw bad_alloc.
8096 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
8097 * decl.c (init_decl_processing): Update exception specs on new and
8098 delete.
8099
8100 * method.c (build_decl_overload_real): Don't mess with global
8101 placement delete.
8102
8103 * init.c (build_new): Check for null throw spec, not nothrow_t.
8104
8105 * decl.c (duplicate_decls): Don't complain about different exceptions
8106 from an internal declaration.
8107
8108 * call.c (build_op_delete_call): Fix check for member fns again.
8109
8110 * decl2.c (import_export_decl): Interface hackery affects
8111 virtual synthesized methods.
8112
8113 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8114
8115 * decl.c (start_decl): Don't just complain about a mismatched
8116 scope, fix it.
8117
8118 * decl.c (make_implicit_typename): Handle case where t is not
8119 actually from context.
8120 * tree.c (get_type_decl): Lose identifier case.
8121 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
8122 * parse.y (nonnested_type): Just use lookup_name.
8123 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
8124
8125 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
8126
8127 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
8128 T was built in C language context (for example, by
8129 output_func_start_profiler).
8130
8131 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
8132
8133 * decl.c (make_implicit_typename): New fn.
8134 (lookup_name_real): Use it. Use current_class_type as the context.
8135
8136 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
8137
8138 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
8139
8140 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8141
8142 * friend.c (do_friend): Warn about non-template friends in templates.
8143
8144 * call.c (build_op_delete_call): Fix handling of inherited delete.
8145
8146 * search.c (dfs_record_inheritance): Ignore template type parms.
8147
8148 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
8149
8150 * call.c (build_new_op): Fix copy error.
8151 (build_op_new_call): New fn.
8152 (build_op_delete_call): New fn.
8153 * cp-tree.h: Declare them.
8154 * init.c (build_new): Use them. Support placement delete.
8155 (build_x_delete): Use build_op_delete_call.
8156 (build_delete): Likewise.
8157 * decl2.c (delete_sanity): Likewise.
8158 (coerce_delete_type): Don't complain about placement delete.
8159
8160 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8161
8162 * call.c (build_new_function_call): Remove unused 'obj' parm.
8163 * cp-tree.h, typeck.c: Adjust.
8164
8165 * init.c (build_new): Make the cleanup last longer.
8166 (expand_vec_init): Call do_pending_stack_adjust.
8167
8168 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
8169
8170 * pt.c (do_type_instantiation): Fix typo.
8171 (mark_class_instantiated): If we support one_only but not weak
8172 symbols, don't mark this as known.
8173
8174 * init.c (build_new): Handle vec delete in EH cleanup.
8175
8176 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8177
8178 * call.c (build_method_call): Call complete_type before checking
8179 for destructor.
8180
8181 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
8182
8183 * decl.c (add_block_current_level): Delete.
8184 * init.c (build_vec_delete_1): Delete build_block and
8185 add_block_current_level calls.
8186
8187 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
8188
8189 * init.c (build_new): Handle freeing allocated memory when the
8190 constructor throws.
8191
8192 * call.c (build_new_method_call): Fix flags arg.
8193
8194 * pt.c (do_type_instantiation): Don't try to instantiate
8195 member templates.
8196 (mark_decl_instantiated): If we support one_only but not
8197 weak symbols, mark this one_only.
8198 * decl2.c (import_export_vtable): Don't defer handling of vtables
8199 if MULTIPLE_SYMBOL_SPACES.
8200
8201 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8202
8203 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
8204
8205 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
8206
8207 * except.c (do_pop_exception): Return a value.
8208
8209 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
8210
8211 * call.c (build_new_method_call): Handle getting a
8212 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
8213 if we got template parms.
8214 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
8215 not just the args.
8216 * decl2.c (build_expr_from_tree): Tweak last change.
8217 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
8218 (maybe_fold_nontype_arg): Split out from tsubst_copy.
8219 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
8220
8221 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8222
8223 * pt.c (tsubst_copy): Handle explicit template arguments in
8224 function calls.
8225 * typeck.c (build_x_function_call): Likewise.
8226 * decl2.c (build_expr_from_tree): Lookup function name if it
8227 hasn't been done.
8228
8229 * pt.c (tsubst): Instantiate template functions properly when
8230 template parameter does not appear in function arguments and return
8231 type.
8232 (comp_template_args): Handle member templates required by tsubst.
8233
8234 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8235
8236 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
8237 previous change.
8238
8239 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8240
8241 * pt.c (coerce_template_parms): Tweak error message.
8242
8243 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
8244 return type defaults to `int', even if there are storage-class
8245 specifiers.
8246
8247 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8248
8249 Complete nested exception support.
8250 * except.c (do_pop_exception): Split out...
8251 (push_eh_cleanup): From here. Handle the EH region by hand.
8252 (expand_start_catch_block): Add a new level for the catch parm.
8253 Move the rethrow region outside the two cleanup regions.
8254 Protect the initializer for the catch parm with terminate.
8255 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
8256 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
8257 popping off the middle of the stack.
8258 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
8259 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
8260 (build_cplus_new): Only wrap CALL_EXPRs.
8261 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
8262 the constructor call.
8263
8264 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8265
8266 * Make-lang.in (c++.distdir): Make inc subdirectory.
8267
8268 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8269
8270 * decl2.c (finish_file): Put back some code.
8271
8272 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8273
8274 * decl2.c (finish_file): Remove redundant code.
8275 * method.c (emit_thunk): Don't let the backend defer generic thunks.
8276
8277 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
8278
8279 * except.c (call_eh_info): Split out...
8280 (push_eh_info): From here.
8281 (expand_builtin_throw): Use it.
8282 (expand_start_catch_block): Move region start back.
8283
8284 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
8285
8286 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
8287 (real_yylex): Record wide strings using target endianness, not host.
8288
8289 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
8290
8291 * repo.c (rindex): Add decl unconditionally.
8292 (get_base_filename, open_repo_file): Don't cast rindex.
8293 * xref.c (rindex): Add decl unconditionally.
8294 (index): Remove unused decl.
8295 (open_xref_file): Don't cast rindex.
8296
8297 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8298
8299 * class.c (build_vbase_path): Propagate the result type properly.
8300
8301 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
8302
8303 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
8304 remaining use of saved_throw_type with a call to get_eh_type.
8305
8306 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
8307
8308 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
8309 (file_name_nondirectory): New function, doing the same as the macro.
8310 (set_typedecl_interface_info): Use it instead of the macro.
8311 (check_newline): Likewise.
8312 (handle_cp_pragma): Likewise.
8313
8314 * repo.c (get_base_filename): Cast result of rindex to char*.
8315 (open_repo_file): Likewise.
8316 * xref.c (open_xref_file): Likewise.
8317 * error.c (dump_char): Make its arg int, not char.
8318
8319 * except.c (push_eh_info): Pass the number of fields - 1 down, not
8320 the exact number of fields.
8321
8322 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8323
8324 Support for nested exceptions.
8325 * tinfo2.cc (__is_pointer): New fn.
8326 * exception.cc (struct cp_eh_info): Define.
8327 (__cp_exception_info, __uncatch_exception): New fns.
8328 (__cp_push_exception, __cp_pop_exception): New fns.
8329 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
8330 Lose empty_fndecl.
8331 (init_exception_processing): Likewise. __eh_pc is now external.
8332 (push_eh_info): New fn.
8333 (get_eh_{info,value,type,caught}): New fns.
8334 (push_eh_cleanup): Just call __cp_pop_exception.
8335 (expand_start_catch_block): Use push_eh_info. Start the eh region
8336 sooner.
8337 (expand_end_eh_spec): Use push_eh_info.
8338 (expand_throw): Call __cp_push_exception to set up the exception info.
8339 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
8340 when we rethrow.
8341 (expand_builtin_throw): Don't refer to empty_fndecl.
8342
8343 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
8344
8345 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
8346
8347 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
8348
8349 * method.c (build_template_parm_names, build_decl_overload_real):
8350 Add static to definitions.
8351 * pt.c (add_to_template_args, note_template_header,
8352 processing_explicit_specialization, type_unification_real): Likewise.
8353 ({determine,check}_explicit_specialization): Use a single string for
8354 error messages.
8355
8356 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
8357
8358 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
8359 (expand_end_catch_block): Likewise.
8360 (expand_end_eh_spec): Likewise.
8361
8362 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
8363
8364 * decl.c (duplicate_decls): Handle template specializations
8365 correctly.
8366 * error.c (dump_function_name): Fix printing of specializations of
8367 member functions that are not member templates.
8368 * cp-tree.h (processing_specialization): Make global.
8369 * pt.c (processing_specialization): Likewise.
8370 * lex.c (cons_up_default_function): Save and restore
8371 processing_specialization to avoid confusion.
8372
8373 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8374
8375 * decl.c (init_decl_processing): Give null_node unknown* type.
8376 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
8377 (common_type): Likewise.
8378 * error.c (args_as_string): Recognize null_node.
8379
8380 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8381
8382 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
8383 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
8384
8385 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
8386
8387 * Make-lang.in (g++): Include prefix.o.
8388
8389 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
8390
8391 * pt.c (determine_explicit_specialization): Initialize "dummy"
8392 to keep Purify quiet.
8393
8394 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8395
8396 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
8397 (build_overload_int): Not here.
8398
8399 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
8400
8401 * class.c (build_type_pathname): Remove.
8402 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
8403
8404 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
8405
8406 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
8407 &&label GNU extension.
8408
8409 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
8410
8411 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
8412 so as to avoid incorrect manglings.
8413 * method.c (build_decl_overload_real): Don't mangle return types
8414 for constructors.
8415
8416 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
8417
8418 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
8419 scratch_tree_cons): Define as macros for now.
8420 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
8421 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
8422 typeck2.c: Use them and the expression_obstack variants.
8423
8424 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8425
8426 * decl.c (store_return_init): Allow classes with explicit ctors to
8427 be used with the named return values extension.
8428
8429 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
8430
8431 * pt.c (instantiate_decl): Fix previous change.
8432
8433 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
8434
8435 * pt.c (tsubst): Fix thinko.
8436 (instantiate_decl): Really use the original template.
8437
8438 * call.c (build_new_method_call): Use simple constructor_name for
8439 error messages.
8440
8441 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
8442
8443 * method.c (build_underscore_int): Don't use ANSI specific
8444 features.
8445
8446 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8447
8448 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
8449 for our key method; it might have been inlined by -O3.
8450
8451 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
8452
8453 * decl.c (make_typename_type): Do not try to call lookup_field for
8454 non-aggregate types.
8455
8456 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
8457
8458 * typeck.c (build_reinterpret_cast): Tweak.
8459
8460 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
8461
8462 * typeck.c (build_reinterpret_cast): converting a void pointer
8463 to function pointer with a reinterpret_cast produces a warning
8464 if -pedantic is issued
8465
8466 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8467
8468 * typeck.c (c_expand_return): Don't warn about returning a
8469 reference-type variable as a reference.
8470
8471 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8472
8473 * method.c (build_static_name): Fix typo.
8474
8475 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
8476
8477 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
8478 OLDDECL before we try to do DECL_USE_TEMPLATE.
8479
8480 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8481
8482 * decl.c (duplicate_decls): Don't warn about template instances.
8483
8484 * typeck.c (mark_addressable): Lose ancient code that unsets
8485 DECL_EXTERNAL.
8486
8487 * pt.c (do_decl_instantiation): Lose support for instantiating
8488 non-templates.
8489
8490 * call.c (build_new_function_call): Fix handling of null explicit
8491 template args.
8492 (build_new_method_call): Likewise.
8493
8494 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
8495
8496 * method.c (build_underscore_int): Fix typo.
8497
8498 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
8499
8500 * tree.c (print_lang_statistics): #if 0 call to
8501 print_inline_obstack_statistics until its definition is checked in.
8502
8503 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8504
8505 * decl2.c (finish_file): Move dump_tree_statistics to end.
8506
8507 * pt.c (instantiate_decl): Look for the original template.
8508 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
8509 of member templates.
8510
8511 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8512
8513 * Makefile.in (g++FAQ.*): New rules.
8514 (CONFLICTS): Update.
8515 * g++FAQ.texi: Moved from libg++.
8516
8517 * parse.y (PFUNCNAME): Only specify the type once.
8518
8519 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
8520
8521 * lex.c (real_yylex): Clean up the code to fully behave the way
8522 the c-lex.c parser does for complex and real numbers.
8523
8524 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8525
8526 * method.c (build_decl_overload_real): Reformat.
8527
8528 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
8529
8530 * method.c (synthesize_method): If at_eof, determine our linkage.
8531
8532 1997-09-29 Paul Eggert <eggert@twinsun.com>
8533
8534 * lex.c (real_yylex): Treat `$' just like `_', except issue a
8535 diagnostic if !dollars_in_ident or if pedantic.
8536
8537 * lang-specs.h (@c++): -ansi no longer implies -$.
8538
8539 * decl2.c (lang_decode_option):
8540 -traditional and -ansi now do not mess with
8541 dollars_in_ident.
8542
8543 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8544
8545 * Makefile.in (parse.o, decl.o): Also depend on
8546 $(srcdir)/../except.h $(srcdir)/../output.h.
8547 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
8548 $(srcdir)/../except.h $(srcdir)/../output.h.
8549 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
8550 ../insn-codes.h.
8551
8552 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
8553
8554 * expr.c (cplus_expand_expr): Make it static.
8555
8556 * decl2.c, init.c, typeck.c: Include "expr.h".
8557 (expand_expr): Use proper values when calling the function.
8558
8559 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
8560
8561 * lang-options.h: new -Wold-style-cast flag.
8562 * cp-tree.h (warn_old_style_cast): new variable.
8563 * decl2.c (warn_old_style_cast): ditto.
8564 (lang_decode_option): support -Wold-style-cast.
8565 (reparse_absdcl_as_casts): produce old-style-cast warning.
8566
8567 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8568
8569 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
8570 TREE_USED, reset value based on already_used.
8571
8572 * init.c (expand_member_init): Revert change.
8573
8574 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
8575
8576 * cp-tree.h, decl.c, decl2.c, pt.c:
8577 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
8578
8579 * decl2.c (lang_decode_option): Add missing ;.
8580
8581 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8582
8583 * friend.c (do_friend): Disable injection for all template-derived
8584 decls.
8585 * decl2.c (lang_decode_option): Handle -fguiding-decls.
8586 * parse.y (notype_template_declarator): New nonterminal.
8587 (direct_notype_declarator): Use it.
8588 (complex_direct_notype_declarator): Likewise.
8589 (object_template_id): Accept any kind of identifier after TEMPLATE.
8590 (notype_qualified_id): Don't add template declarators here.
8591
8592 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
8593
8594 * call.c (add_template_candidate): Add explicit_targs parameter.
8595 (build_scoped_method_call): Use it.
8596 (build_overload_call_real): Likewise.
8597 (build_user_type_conversion_1): Likewise.
8598 (build_new_function_call): Likewise.
8599 (build_object_call): Likewise.
8600 (build_new_op): Likewise.
8601 (build_new_method_call): Likewise.
8602 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
8603 (build_new_method_call): Likewise.
8604
8605 * class.c (finish_struct_methods): Add specialization pass to
8606 determine which methods were specializing which other methods.
8607 (instantiate_type): Handle TEMPLATE_ID_EXPR.
8608
8609 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
8610
8611 * cp-tree.h (name_mangling_version): New variable.
8612 (flag_guiding_decls): Likewise.
8613 (build_template_decl_overload): New function.
8614 (begin_specialization): Likewise.
8615 (reset_specialization): Likewise.
8616 (end_specialization): Likewise.
8617 (determine_explicit_specialization): Likewise.
8618 (check_explicit_specialization): Likewise.
8619 (lookup_template_function): Likewise.
8620 (fn_type_unification): Add explicit_targs parameter.
8621 (type_unification): Likewise.
8622
8623 * decl.c (duplicate_decls): Add smarts for explicit
8624 specializations.
8625 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
8626 specializations.
8627 (grokfndecl): Call check_explicit_specialization.
8628
8629 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
8630 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
8631 (check_classfn): Handle specializations.
8632
8633 * error.c (dump_function_name): Print specialization arguments.
8634
8635 * friend.c (do_friend): Don't call pushdecl for template
8636 instantiations.
8637
8638 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
8639
8640 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
8641 and -fno-guiding-decls.
8642
8643 * lex.c (identifier_type): Return PFUNCNAME for template function
8644 names.
8645
8646 * method.c (build_decl_overload_real): New function.
8647 (build_template_parm_names): New function.
8648 (build_overload_identifier): Use it.
8649 (build_underscore_int): New function.
8650 (build_overload_int): Use it. Add levels for template
8651 parameters.
8652 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
8653 (build_overload_nested_names): Handle template type parameters.
8654 (build_template_decl_overload): New function.
8655
8656 * parse.y (YYSTYPE): New ntype member.
8657 (nested_name_specifier): Use it.
8658 (nested_name_specifier_1): Likewise.
8659 (PFUNCNAME): New token.
8660 (template_id, object_template_id): New non-terminals.
8661 (template_parm_list): Note specializations.
8662 (template_def): Likewise.
8663 (structsp): Likewise.
8664 (fn.def2): Handle member template specializations.
8665 (component_decl_1): Likewise.
8666 (direct_notype_declarator): Handle template-ids.
8667 (component_decl_1): Likewise.
8668 (direct_notype_declarator): Handle template-ids.
8669 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
8670
8671 * pt.c (processing_specializations): New variable.
8672 (template_header_count): Likewise.
8673 (type_unification_real): New function.
8674 (processing_explicit_specialization): Likewise.
8675 (note_template_header): Likewise.
8676 (is_member_template): Handle specializations.
8677 (end_template_decl): Call reset_specialization.
8678 (push_template_decl): Handle member template specializations.
8679 (tsubst): Likewise.
8680 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
8681 (instantiate_template): Handle specializations.
8682 (instantiate_decl): Likewise.
8683 (fn_type_unification): Handle explicit_targs.
8684 (type_unification): Likewise. Allow incomplete unification
8685 without an error message, if allow_incomplete.
8686 (get_bindings): Use new calling sequence for fn_type_unification.
8687
8688 * spew.c (yylex): Handle PFUNCNAME.
8689
8690 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
8691 (really_overloaded_fn): Likewise.
8692 (get_first_fn): Handle function templates.
8693
8694 * typeck.c (build_x_function_call): Use really_overloaded_fn.
8695 Handle TEMPLATE_ID_EXPR.
8696 (build_x_unary_op): Likewise.
8697 (build_unary_op): Likewise.
8698 (mark_addressable): Templates whose address is taken are marked
8699 as used.
8700
8701 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8702
8703 * decl.c (init_decl_processing): Declare __builtin_constant_p as
8704 accepting any kind of type, not only int.
8705
8706 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
8707
8708 * search.c (get_matching_virtual): Notice virtual bases when sorrying
8709 about covariant returns.
8710
8711 * parse.y (member_init): Also imply typename here. Remove ancient
8712 extension for initializing base members.
8713
8714 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8715
8716 Handle multi-level typenames and implicit typename in base list.
8717 * parse.y (typename_sub{,[0-2]}): New rules.
8718 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
8719 (nonnested_type): New rule.
8720 (complete_type_name): Use it.
8721 (base_class.1): Use typename_sub and nonnested_type.
8722 (nested_name_specifier): Don't elide std:: here.
8723 * decl.c (make_typename_type): Handle getting a type for NAME.
8724 (lookup_name_real): Turn std:: into :: here.
8725
8726 Rvalue conversions were removed in London.
8727 * call.c (is_subseq): Don't consider lvalue transformations.
8728 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
8729 (joust): Reenable ?: kludge.
8730
8731 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
8732
8733 * decl.c (start_function): Up warning of no return type to be a
8734 pedwarn.
8735
8736 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8737
8738 * init.c (expand_member_init): Don't set TREE_USED.
8739 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
8740 set,don't clear TREE_USED wholesale.
8741
8742 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
8743
8744 * call.c (build_over_call): Do require_complete_type before
8745 build_cplus_new.
8746
8747 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
8748
8749 * search.c (lookup_field): Call complete_type in all cases.
8750
8751 * decl.c (finish_function): Just warn about flowing off the end.
8752
8753 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8754
8755 * decl.c (grokparms): Don't bash a permanent list node if we're
8756 in a function.
8757
8758 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
8759
8760 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
8761
8762 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
8763
8764 * call.c (build_new_op): Give better error for syntactically
8765 correct, but semantically invalid, use of undeclared template.
8766
8767 * call.c (compare_qual): Handle pmfs.
8768
8769 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
8770 after the exception spec.
8771
8772 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8773
8774 * call.c (null_ptr_cst_p): Integer type, not integral type.
8775
8776 * call.c (joust): Disable warnings until they can be moved to the
8777 right place.
8778
8779 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
8780
8781 * Makefile.in, config-lang.in: Convert to autoconf.
8782
8783 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8784
8785 * decl.c (lookup_name_real): Add implicit 'typename' to types from
8786 base classes.
8787
8788 * pt.c (most_specialized_class): Fix typo.
8789 (tsubst): Move constant folding to TREE_VEC case.
8790
8791 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
8792
8793 * pt.c (do_poplevel): Don't warn about unused local variables
8794 while processing_template_decl since we don't always know whether
8795 or not they will need constructing/destructing.
8796
8797 * pt.c (uses_template_parms): Check the values of an enumeration
8798 type to make sure they don't depend on template parms.
8799
8800 * decl.c (make_typename_type): Don't lookup the field if the
8801 context uses template parms, even if we're not
8802 processing_template_decl at the moment.
8803
8804 * pt.c (coerce_template_parms): Avoid looking at the
8805 TYPE_LANG_DECL portion of a typename type, since there won't be
8806 one.
8807 (tsubst): Do constant folding as necessary to make sure that
8808 arguments passed to lookup_template_class really are constants.
8809
8810 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
8811
8812 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
8813 * decl2.c (finish_file): Only register exception tables if we
8814 need to.
8815
8816 * decl.c (init_decl_processing): Add __builtin_[fs]p.
8817
8818 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8819
8820 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
8821
8822 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
8823
8824 * error.c (dump_decl): Avoid crashing when presented with a
8825 uninitialized constant, as can occur with a template parameter.
8826 (dump_expr): Make sure that there are enough levels of
8827 current_template_parms before we start diving through them.
8828
8829 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
8830
8831 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
8832 c-typeck.c.
8833
8834 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8835
8836 * except.c (expand_throw): Call build_delete for all
8837 exception types, not just objects with destructors.
8838
8839 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
8840
8841 * decl.c (current_local_enum): Remove static.
8842 * pt.c (tsubst_enum): Save and restore value of current_local_enum
8843 in case template is expanded in enum decl.
8844 (instantiate_class_template) : Use new tsubst_enum signature.
8845 (tsubst_expr): Likewise.
8846
8847 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
8848
8849 * pt.c (begin_member_template_processing): Take a function as
8850 argument, not a set of template arguments. Use the template
8851 parameters, rather than the arguments. Handle non-type parameters
8852 correctly. Push a binding level for the parameters so that multiple
8853 member templates using the same parameter names can be declared.
8854 (end_member_template_processing): Pop the binding level.
8855 (push_template_decl): Mark member templates as static when
8856 appropriate.
8857
8858 * lex.c (do_pending_inlines): Pass the function, not its template
8859 arguments, to begin_member_template_processing.
8860 (process_next_inline): Likewise.
8861 (do_pending_defargs): Likewise.
8862
8863 * error.c (dump_expr): Obtain the correct declaration for a
8864 TEMPLATE_CONST_PARM.
8865
8866 * call.c (add_template_conv_candidate): New function.
8867 (build_object_call): Handle member templates, as done in the other
8868 build_ functions.
8869
8870 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
8871
8872 * decl.c (replace_defag): Undo previous change.
8873 * lex.c (do_pending_defargs): Deal with member templates.
8874
8875 * pt.c (is_member_template): Avoid crashing when passed a
8876 non-function argument.
8877
8878 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
8879
8880 * class.c (grow_method): Remove check for redeclaration.
8881
8882 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
8883
8884 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
8885 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
8886 (PRIMARY_TEMPLATE_P): Use it.
8887 * call.c (build_overload_call_real): Use it.
8888 * class.c (instantiate_type): Likewise.
8889 * decl.c (decls_match): Likewise.
8890 * method.c (build_overload_identifier): Likewise.
8891 * pt.c (push_template_decl): Likewise.
8892 (classtype_mangled_name): Likewise.
8893 (lookup_template_class): Likewise.
8894
8895 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
8896 DECL_NTPARMS to conform to usage elsewhere.
8897 * call.c (add_template_candidate): Likewise.
8898 * class.c (instantiate_type): Likewise.
8899 * pt.c (instantiate_template): Likewise.
8900 (get_bindings): Likewise.
8901
8902 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
8903 is_member_template.
8904
8905 * pt.c (unify): Undo changes to allow multiple levels of template
8906 parameters.
8907 (type_unification): Likewise.
8908 (fn_type_unification): Likewise.
8909 (get_class_bindings): Likewise.
8910 * cp-tree.h (Likewise).
8911
8912 * decl.c (replace_defarg): Check that the type of the default
8913 parameter does not invlove a template type before complaining
8914 about the initialization.
8915
8916 * error.c (dump_expr): Deal with template constant parameters in
8917 member templates correctly.
8918
8919 * pt.c (is_member_template): Deal with class specializations
8920 correctly.
8921 (tsubst): Handle "partial instantiation" of member templates
8922 correctly.
8923
8924 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
8925
8926 * pt.c (type_unification): Change calling squence to allow for
8927 multiple levels of template parameters.
8928 (tsubst_expr): Likewise.
8929 (tsubst): Likewise.
8930 (tsubst_copy): Likewise.
8931 (instantiate_template): Likewise.
8932 (unify): Likewise.
8933 * call.c (build_overload_call_real): Use it.
8934 (add_builtin_candidate): Use it.
8935 (build_new_method_call): Use it.
8936 * class.c (instantiate_type): Use it.
8937 * decl.c (grokdeclarator): Use it.
8938 * decl2.c (finish_file): Use it.
8939 * method.c (build_overload_identifier): Use it.
8940
8941 * call.c (add_template_candidate): Add additional parameter for
8942 the function return type. Call fn_type_unification istead of
8943 type_unification.
8944 (build_user_type_conversion_1): Handle member templates.
8945 (build_new_function_call): Likewise.
8946 (build_new_op): Likewise.
8947 (build_new_method_call): Likewise.
8948
8949 * class.c (grow_method): Don't give an error message indicating
8950 that two member templates with the same name are ambiguous.
8951 (finish_struct): Treat member template functions just like member
8952 functions.
8953
8954 * cp-tree.h (check_member_template): Add declaration.
8955 (begin_member_template_processing): Likewise.
8956 (end_member_template_processing): Likewise.
8957 (fn_type_unification): Likewise.
8958 (is_member_template): Likewise.
8959 (tsubst): Change prototype.
8960 (tsubst_expr): Likewise.
8961 (tsubst_copy): Likewise.
8962 (instantiate_template): Likewise.
8963 (get_bindings): Likewise.
8964
8965 * decl.c (decls_match): Handle multiple levels of template
8966 parameters.
8967 (pushdecl): Handle template type params just like other type
8968 declarations.
8969 (push_class_level_binding): Return immediately if the
8970 class_binding_level is NULL.
8971 (grokfndecl): If check_classfn() returns a member_template, use
8972 the result of the template, not the template itself.
8973
8974 * decl2.c (check_member_template): New function. Check to see
8975 that the entity declared to be a member template can be one.
8976 (check_classfn): Allow redeclaration of member template functions
8977 with different types; the new functions can be specializations or
8978 explicit instantiations.
8979
8980 * error.c (dump_decl): Handle multiple levels of template
8981 parameters.
8982 (dump_function_decl): Update to handle function templates.
8983
8984 * lex.c (do_pending_inlines): Set up template parameter context
8985 for member templates.
8986 (process_next_inline): Likewise.
8987
8988 * method. (build_overload_identifier): Adjust for multiple levels
8989 of template parameters.
8990
8991 * parse.y (fn.def2): Add member templates.
8992 (component_decl_1): Likewise.
8993
8994 * pt.c (begin_member_template_processing): New function.
8995 (end_member_template_processing): Likewise.
8996 (is_member_template): Likewise.
8997 (fn_type_unification): Likewise.
8998 (current_template_parms): Return a vector of all the template
8999 parms, not just the innermost level of parms.
9000 (push_template_decl): Deal with the possibility of member
9001 templates.
9002 (lookup_template_class): Likewise.
9003 (uses_template_parms): Likewise.
9004 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
9005 TEMPLATE_CONST_PARM to deal with multiple levels of template
9006 arguments. Add processing of TEMPLATE_DECL to produce new
9007 TEMPLATE_DECLs from old ones.
9008 (do_decl_instantiation): Handle member templates.
9009
9010 * search.c (lookup_fnfields_1): Handle member template conversion
9011 operators.
9012
9013 * tree.c (cp_tree_equal): Check the levels, as well as the
9014 indices, of TEMPLATE_CONST_PARMs.
9015
9016 * typeck.c (comptypes): Check the levels, as well as the indices,
9017 fo TEMPLATE_TYPE_PARMs.
9018 (build_x_function_call): Treat member templates like member
9019 functions.
9020
9021 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9022
9023 * typeck.c (c_expand_return): Always convert_for_initialization
9024 before checking for returning a pointer to local.
9025
9026 * pt.c (type_unification): If strict and the function parm doesn't
9027 use template parms, just compare types.
9028
9029 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
9030
9031 * method.c (build_overloaded_value): Replace direct call
9032 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
9033
9034 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9035
9036 * typeck.c (convert_arguments): Don't arbitrarily choose the first
9037 of a set of overloaded functions.
9038
9039 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
9040
9041 * lex.c (real_yylex): Don't elide __FUNCTION__.
9042
9043 * method.c (build_overload_value): Add in_template parm.
9044 (build_overload_int): Likewise.
9045 (build_overload_identifier): Pass it.
9046
9047 * decl.c (duplicate_decls): Don't bash a previous template
9048 definition with a redeclaration.
9049
9050 * pt.c (unify): float doesn't match double.
9051
9052 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
9053 TYPE_DECL. Handle getting non-template types.
9054 * parse.y (explicit_instantiation): Use typespec instead of
9055 aggr template_type.
9056
9057 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
9058
9059 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
9060
9061 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
9062
9063 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
9064 (compare_ics): Likewise.
9065
9066 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9067
9068 * call.c (joust): Warn about choosing one conversion op over
9069 another because of 'this' argument when the other return type is
9070 better.
9071 (source_type): New fn.
9072
9073 * call.c (build_new_op): Strip leading REF_BIND from first operand
9074 to builtin operator.
9075
9076 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
9077 use its RTL.
9078
9079 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9080
9081 * call.c (null_ptr_cst_p): Remove support for (void*)0.
9082
9083 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
9084
9085 * typeck.c (expand_target_expr): Make definition match declaration.
9086
9087 * class.c (get_basefndecls): Make definition match declaration.
9088
9089 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
9090
9091 * input.c (sub_getch): Eventually give up and release the input file.
9092
9093 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
9094 right place.
9095
9096 * call.c (joust): Tweak message.
9097
9098 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
9099
9100 * error.c (type_as_string): Put const/volatile on template type
9101 parameters where appropriate.
9102
9103 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
9104
9105 * call.c (strictly_better): Make arguments unsigned ints.
9106
9107 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
9108
9109 * lex.c (real_yylex): Refer to __complex instead of complex.
9110
9111 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
9112
9113 * lex.c (real_yylex): Don't use getc directly.
9114
9115 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9116
9117 * call.c (is_subseq): Don't try to be clever.
9118
9119 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
9120
9121 * parse.y, pt.c: Include "except.h".
9122 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
9123 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
9124 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
9125 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
9126 prototyping.
9127
9128 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9129
9130 * decl2.c (mark_vtable_entries): Instead of replacing pure
9131 virtuals with a reference to __pure_virtual, copy the decl and
9132 change the RTL.
9133
9134 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9135
9136 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
9137
9138 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
9139
9140 * pt.c (instantiate_class_template): Call repo_template_used
9141 before finish_prevtable_vardecl.
9142
9143 * call.c (is_subseq): New fn.
9144 (compare_ics): Use it.
9145
9146 * repo.c (finish_repo): Don't crash on no args.
9147
9148 * parse.y (named_complex_class_head_sans_basetype): Handle
9149 explicit global scope.
9150 * decl2.c (handle_class_head): New fn.
9151
9152 * pt.c (unify): Add CONST_DECL case.
9153
9154 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9155
9156 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
9157
9158 * cp-tree.h (report_type_mismatch): Add prototype.
9159 * call.c (build_overload_call_real): Remove erroneous fourth
9160 argument to report_type_mismatch.
9161 (build_user_type_conversion_1): Remove erroneous second arg to
9162 tourney.
9163 (build_new_function_call): Likewise.
9164 (build_object_call): Likewise.
9165 (build_new_op): Likewise.
9166 (build_new_method_call): Likewise.
9167
9168 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9169
9170 * error.c (dump_decl): Don't bother processing a function with no
9171 DECL_LANG_SPECIFIC.
9172
9173 * method.c (emit_thunk): Call init_function_start in the macro case.
9174
9175 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
9176
9177 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
9178 defined and used to set flag_vtable_thunks.
9179
9180 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9181
9182 * parse.y: Don't clear the inlines from their obstack until they've
9183 all been processed.
9184
9185 * decl.c (duplicate_decls): Don't complain about exception
9186 specification mismatch if flag_exceptions is off.
9187
9188 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
9189
9190 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
9191
9192 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
9193
9194 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
9195 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
9196 Include <stdio.h> before include files that formerly used STDIO_PROTO.
9197
9198 * decl.c, g++spec.c, lex.c, method.c, repo.c:
9199 Include "config.h" first, as per autoconf manual.
9200
9201 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9202
9203 * decl.c (duplicate_decls): Tweak wording.
9204 * lex.c (do_pending_defargs): Don't die if we see a default arg
9205 that isn't a DEFAULT_ARG.
9206 * error.c (dump_expr): Handle DEFAULT_ARG.
9207
9208 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
9209 * lang-options.h: Add -fhandle-exceptions.
9210
9211 * class.c (build_vtable): vtables are artificial.
9212 (prepare_fresh_vtable): Likewise.
9213
9214 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9215
9216 * cvt.c (ocp_convert): After converting to the target type, set
9217 LOOKUP_NO_CONVERSION.
9218
9219 * call.c (joust): Warn about potentially confusing promotion rules
9220 with -Wsign-promo.
9221 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
9222
9223 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
9224
9225 * exception.cc: Declare __terminate_func with noreturn attribute.
9226
9227 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
9228
9229 * parse.y: Break out eat_saved_input, handle errors.
9230 (function_try_block): Use compstmt instead of compstmt_or_error.
9231
9232 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
9233
9234 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
9235
9236 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9237
9238 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
9239 existence of cc1plus check whether $(LANGUAGES) contains C++.
9240
9241 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9242
9243 * method.c (do_build_copy_constructor): When copying an anonymous
9244 union member loop around to handle nested anonymous unions. Use
9245 the offset of the member relative to the outer structure, not the
9246 union.
9247
9248 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9249
9250 * call.c (resolve_args): New fn.
9251 (build_new_function_call): Use it.
9252 (build_object_call): Likewise.
9253 (build_new_method_call): Likewise.
9254
9255 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
9256
9257 * call.c (build_over_call): tsubst all default parms from templates.
9258
9259 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
9260
9261 * decl.c (struct cp_function): Add static_labelno.
9262 (push_cp_function_context): Save it.
9263 (pop_cp_function_context): Restore it.
9264
9265 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9266
9267 * typeck.c (build_component_ref_1): Convert from reference.
9268
9269 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9270
9271 * parse.y (current_declspecs, prefix_attributes): Initialize to
9272 NULL_TREE.
9273
9274 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
9275 before we try to force it to be a TREE_LIST.
9276 (decl): Make sure $1.t is non-nil.
9277
9278 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
9279
9280 * pt.c (uses_template_parms): Handle template first-parse codes.
9281
9282 * decl.c (cp_finish_decl): Only warn about user-defined statics.
9283
9284 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9285
9286 * pt.c (unify): Handle BOOLEAN_TYPE.
9287
9288 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
9289 * pt.c (tsubst): Don't set it.
9290 * call.c (build_over_call): Use uses_template_parms.
9291
9292 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9293
9294 * method.c (build_overload_nested_name): Use static_labelno
9295 instead of var_labelno.
9296 (build_qualified_name): New fn.
9297 (build_overload_name): Split out from here.
9298 (build_static_name): Use build_qualified_name.
9299 * decl.c (cp_finish_decl): Statics in extern inline functions
9300 have comdat linkage.
9301 (start_function): Initialize static_labelno.
9302
9303 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9304
9305 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
9306 before "all member functions in class [] are private"
9307
9308 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
9309
9310 * lex.c (do_scoped_id): convert_from_reference.
9311 * init.c (build_offset_ref): Likewise.
9312
9313 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9314
9315 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
9316
9317 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9318
9319 * typeck.c (get_member_function_from_ptrfunc): Promote index
9320 before saving it.
9321
9322 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
9323
9324 * tree.c (layout_basetypes): Move non-virtual destructor warning.
9325 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
9326
9327 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9328
9329 * decl.c (grokdeclarator): Call add_defarg_fn for the function
9330 type, too.
9331 * lex.c (add_defarg_fn): Adjust.
9332 (do_pending_defargs): Adjust. Don't skip the first parm.
9333
9334 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9335
9336 * decl.c (build_enumerator): Global enumerators are also readonly.
9337
9338 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
9339 (build_dynamic_cast): Call it and convert_from_reference.
9340
9341 * lex.c (add_defarg_fn): New fn.
9342 (snarf_defarg): Don't add to defarg_types.
9343 (do_pending_defargs): Lose defarg_types. All fns we process now
9344 have defargs.
9345 * decl.c (grokfndecl): Call add_defarg_fn.
9346
9347 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
9348 * cp-tree.def: Add DEFAULT_ARG.
9349 * spew.c (yylex): Call snarf_defarg as appropriate.
9350 * parse.y: New tokens DEFARG and DEFARG_MARKER.
9351 (defarg_again, pending_defargs, defarg, defarg1): New rules.
9352 (structsp): Use pending_defargs.
9353 (parms, full_parm): Use defarg.
9354 * lex.c (init_lex): Initialize inline_text_firstobj.
9355 (do_pending_inlines): Never pass the obstack to feed_input.
9356 (process_next_inline): Call end_input instead of restore_pending_input.
9357 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
9358 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
9359 * input.c (end_input): New fn.
9360 (sub_getch): At the end of some fed input, just keep returning EOF
9361 until someone calls end_input.
9362 Remove 'obstack' field from struct input_source.
9363 * decl.c (grokparms): Handle DEFAULT_ARG.
9364 (replace_defarg): New fn.
9365 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
9366
9367 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9368
9369 * call.c (implicit_conversion): If nothing else works, try binding
9370 an rvalue to a reference.
9371
9372 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
9373
9374 * decl.c (init_decl_processing): fix Jun 30 patch -- move
9375 ifndef for Cygwin32 to include SIGSEGV.
9376
9377 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9378
9379 * class.c (finish_struct_1): Only complain about pointers without
9380 copy stuff if there are any constructors.
9381
9382 * rtti.c (build_dynamic_cast): Call complete_type on the types.
9383
9384 * decl.c (grokfndecl): If the function we chose doesn't actually
9385 match, die.
9386
9387 * decl2.c (grokclassfn): Don't specify 'const int' for the
9388 artificial destructor parm.
9389
9390 * pt.c (type_unification): If we are called recursively, nothing
9391 decays.
9392
9393 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
9394
9395 * decl.c (init_decl_processing): Stop trying to catch signals
9396 other than SIGABRT since the Cygwin32 library doesn't support
9397 them correctly yet. This fixes a situation in which g++ causes
9398 a hang on SIGSEGVs and other such signals in our Win32-hosted
9399 tools.
9400
9401 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
9402
9403 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
9404
9405 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
9406
9407 * typeck2.c (store_init_value): Always return the value if our
9408 type needs constructing.
9409
9410 * method.c (hack_identifier): Convert class statics from
9411 reference, too.
9412
9413 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
9414
9415 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
9416
9417 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
9418
9419 * typeck.c (c_expand_return): Make sure we clean up temporaries at
9420 the end of return x;
9421
9422 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9423
9424 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
9425
9426 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
9427
9428 * except.c (expand_builtin_throw): Add support
9429 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
9430
9431 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9432
9433 * repo.c (extract_string): Null-terminate.
9434
9435 * cp-tree.h (TI_SPEC_INFO): New macro.
9436 (CLASSTYPE_TI_SPEC_INFO): New macro.
9437 * pt.c (push_template_decl): Correctly determine # of template parms
9438 for partial specs.
9439
9440 * call.c (compare_ics): Really fix 'this' conversions.
9441
9442 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
9443 non-template fn.
9444
9445 * pt.c (push_template_decl): Complain about mismatch in # of
9446 template parms between a class template and a member template.
9447
9448 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9449
9450 * method.c (synthesize_method): You can't call
9451 function_cannot_inline_p after finish_function.
9452 * decl.c (finish_function): Turn on flag_inline_functions and turn
9453 off DECL_INLINE before handing a synthesized method to the
9454 backend.
9455
9456 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9457
9458 * method.c (synthesize_method): Remove July 30 change to never set
9459 DECL_INLINE if at_eof.
9460
9461 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
9462
9463 * xref.c (GNU_xref_member): Ensure that the node has a
9464 decl_lang_specific part before checking DECL_FRIEND_P.
9465
9466 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9467
9468 * pt.c (instantiate_class_template): Diagnose non-class types used
9469 as bases.
9470
9471 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9472
9473 * typeck.c (build_conditional_expr): Use convert_for_initialization
9474 instead of convert_and_check.
9475
9476 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9477
9478 * parse.y (typespec): Don't pedwarn for typeof.
9479
9480 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
9481
9482 * repo.c (finish_repo): Only check changes if we would write a
9483 repo file.
9484
9485 * call.c (compare_ics): Fix handling of 'this' conversions.
9486
9487 * pt.c (do_decl_instantiation): Support static data too. Rename
9488 from do_function_instantiation.
9489 * cp-tree.h: Adjust.
9490 * parse.y: Adjust.
9491
9492 * repo.c (extract_string): New fn.
9493 (get_base_filename): Use it.
9494 (init_repo): Compare old args with current args.
9495
9496 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
9497
9498 * Makefile.in, Make-lang.in: Protect C-ls with a comment
9499 character, idea from Paul Eggert <eggert@twinsun.com>.
9500
9501 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
9502
9503 * typeck.c (c_expand_return): Be more persistent in looking for
9504 returned temps.
9505
9506 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
9507 pointer to reference.
9508
9509 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
9510
9511 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9512
9513 * init.c (build_member_call, build_offset_ref):
9514 Use do_scoped_id instead of do_identifier.
9515
9516 * cvt.c (convert): Remove bogosity.
9517
9518 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9519
9520 * cvt.c (build_up_reference): Do checks of ARGTYPE and
9521 TARGET_TYPE before trying to use get_binfo.
9522
9523 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
9524
9525 * cvt.c (build_up_reference): Call get_binfo to get access control.
9526
9527 * decl2.c (import_export_decl): If we don't support weaks, leave
9528 statics undefined.
9529
9530 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
9531
9532 * except.c (expand_builtin_throw): Add support for machines that
9533 cannot access globals after throw's epilogue when
9534 -fno-sjlj-exceptions is used.
9535
9536 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
9537
9538 * parse.y: 'std::' becomes '::'.
9539 * lex.c (real_yylex): Remove 'namespace' warning.
9540 * init.c (build_member_call): Ignore 'std::'.
9541 (build_offset_ref): Likewise.
9542 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
9543 (do_toplevel_using_decl): Ignore 'using std::whatever'.
9544 * decl.c (push_namespace): Just sorry.
9545 (pop_namespace): Nop.
9546 (init_decl_processing): Declare std namespace.
9547
9548 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9549
9550 * search.c (push_class_decls): A name which ambiguously refers to
9551 several instantiations of the same template just refers to the
9552 template.
9553
9554 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
9555
9556 * decl.c (build_enumerator): fix problem with unsigned long
9557 enumerated values being smashed to ints, causing overflow
9558 when computing next enumerated value. (for enum values around
9559 MAX_VAL).
9560
9561 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
9562
9563 * typeck.c (build_component_ref): Only call mark_used on a decl.
9564
9565 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9566
9567 * typeck.c (build_c_cast): Make the check for a ptr to function
9568 more specific before possible default_conversion call.
9569
9570 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
9571
9572 * except.c (expand_exception_blocks): Simplify and fix and make
9573 sure we don't end a region in a sequence, as expand_end_bindings
9574 doesn't like it.
9575
9576 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
9577
9578 * except.c (init_exception_processing): Mark terminate as not
9579 returning so that the optimizer can optimize better.
9580
9581 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
9582
9583 * cvt.c (convert): Don't do any extra work, if we can avoid it
9584 easily.
9585
9586 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
9587
9588 * *.[chy]: Change cp_convert to ocp_convert, change convert to
9589 cp_convert. convert is now reserved for the backend, and doesn't
9590 have the semantics a frontend person should ever want.
9591
9592 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9593
9594 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
9595 Lose -traditional support.
9596
9597 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9598
9599 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
9600
9601 * parse.y (self_reference): Do it for templates, too.
9602 * class.c (pushclass): Don't overload_template_name; the alias
9603 generated by build_self_reference serves the same purpose.
9604
9605 * tree.c (list_hash): Make static, take more args.
9606 (list_hash_lookup): Likewise.
9607 (list_hash_add): Make static.
9608 (list_hash_canon): Lose.
9609 (hash_tree_cons): Only build a new node if one isn't already in the
9610 hashtable.
9611 (hash_tree_chain): Use hash_tree_cons.
9612 * cp-tree.h: Adjust.
9613 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
9614 of calling lookup_name.
9615
9616 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
9617
9618 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
9619 doesn't refer to the CONST_DECLs.
9620
9621 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
9622
9623 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
9624 is bigger.
9625 (expand_class_desc): Convert the last argument to a sizetype.
9626
9627 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9628
9629 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
9630 __real__): Add reswords.
9631 * hash.h: Regenerate.
9632 * lex.h (rid): Add RID_COMPLEX.
9633 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
9634 * lex.c (init_lex): Add building of RID_COMPLEX.
9635 (real_yylex): General cleanup in line with what c-lex.c also has,
9636 sans the cruft for traditional; add handling of SPEC_IMAG, complex
9637 types, and imaginary numeric constants.
9638 * parse.y (REALPART, IMAGPART): Add tokens.
9639 (unary_expr): Add REALPART and IMAGPART rules.
9640 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
9641 * decl.c (complex_{integer,float,double,long}_type_node): Define
9642 types.
9643 (init_decl_processing): Set up the types.
9644 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
9645 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
9646 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
9647 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
9648 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
9649 COMPLEX_TYPE case.
9650 * method.c (build_overload_name): Add handling of the different
9651 COMPLEX_TYPEs, prefixing them with `J'.
9652 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
9653 as a template parm.
9654 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
9655 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
9656 (mapcar): Handle COMPLEX_CST.
9657 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
9658 (common_type): Add code for complex types.
9659 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
9660 (convert_for_assignment): Likewise.
9661 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
9662
9663 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9664
9665 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
9666 tsubst_expr, as it might try to do overload resolution.
9667
9668 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
9669
9670 * pt.c (instantiate_class_template): Oops.
9671
9672 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9673
9674 * cp-tree.def: Add TAG_DEFN.
9675 * pt.c (tsubst_enum): New fn.
9676 (instantiate_class_template): Use it.
9677 (tsubst_expr): Support TAG_DEFN.
9678 (tsubst): Support local enums.
9679 (tsubst_copy): Likewise.
9680 * decl.c (finish_enum): Likewise.
9681 (start_enum): If this is a local enum, switch to permanent_obstack.
9682
9683 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
9684
9685 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
9686 (finish_function): Put the base init code for constructors just
9687 after the parm cleanup insns.
9688 (struct cp_function): Add last_parm_cleanup_insn.
9689 (push_cp_function_context): Likewise.
9690 (pop_cp_function_context): Likewise.
9691
9692 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
9693
9694 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
9695
9696 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9697
9698 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
9699 for THUNK_FNDECL before we switch to temporary allocation.
9700
9701 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
9702
9703 * call.c (build_new_op): Handle null arg2 for ?:.
9704
9705 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
9706
9707 * except.c (expand_exception_blocks): Ensure that we flow through
9708 the end of the exception region for the exception specification.
9709 Move exception region for the exception specification in, so that
9710 it doesn't protect the parm cleanup. Remove some obsolete code.
9711 * decl.c (store_parm_decls): Likewise.
9712 (finish_function): Likewise.
9713
9714 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
9715
9716 * init.c (build_new): Fix nothrow handling.
9717
9718 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9719
9720 * init.c (emit_base_init): Don't warn about the initialization
9721 list for an artificial member.
9722
9723 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9724
9725 * expr.c (do_case): Handle !START case for the error msg.
9726
9727 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
9728
9729 * decl2.c, lang-options.h: New option -Weffc++.
9730 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
9731 to -Weffc++.
9732
9733 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
9734 to MULTIPLE_SYMBOL_SPACES.
9735
9736 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
9737
9738 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
9739
9740 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
9741
9742 * typeck.c (c_expand_return): Don't complain about returning void
9743 to void in an artificial function.
9744 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
9745 don't set DECL_RESULT, set DECL_ARTIFICIAL.
9746 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
9747
9748 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
9749
9750 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
9751 exception handling.
9752 * except.c (init_exception_processing): Likewise.
9753 (expand_end_catch_block): Likewise.
9754 (expand_exception_blocks): Likewise.
9755 (expand_throw): Likewise.
9756 * exception.cc (__default_terminate): Likewise.
9757
9758 * init.c (perform_member_init): Use new method of expr level
9759 cleanups, instead of cleanups_this_call and friends.
9760 (emit_base_init): Likewise.
9761 (expand_aggr_vbase_init_1): Likewise.
9762 (expand_vec_init): Likewise.
9763 * decl.c (cp_finish_decl): Likewise.
9764 (expand_static_init): Likewise.
9765 (store_parm_decls): Likewise.
9766 (cplus_expand_expr_stmt): Likewise.
9767 * decl2.c (finish_file): Likewise.
9768
9769 * Make-lang.in (exception.o): Ok to compile with -O now.
9770
9771 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
9772 we know it will be done later by the backend.
9773
9774 * decl2.c (lang_f_options): Remove support for short temps.
9775 * lang-options.h: Likewise.
9776
9777 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9778
9779 * tree.c (varargs_function_p): New fn.
9780 * method.c (emit_thunk): Replace broken generic code with code to
9781 generate a heavyweight thunk function.
9782
9783 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
9784
9785 * pt.c (process_template_parm): pedwarn about floating-point parms.
9786
9787 * decl.c (grokdeclarator): inline no longer implies static.
9788
9789 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
9790
9791 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
9792
9793 * class.c (check_for_override): The signature of an overriding
9794 function is not changed.
9795
9796 * call.c (build_over_call): Move setting of conv into the loop.
9797 Note: this change, along with the related changes of the 18th thru
9798 the 20th of April, fix an infinite loop problem in conversions.
9799
9800 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
9801
9802 * call.c (build_user_type_conversion_1): Really ignore rvalue
9803 conversions when looking for a REFERENCE_TYPE.
9804
9805 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
9806 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
9807 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
9808 (build_unary_op): Likewise.
9809 * call.c (build_over_call): See through a CONVERT_EXPR around the
9810 ADDR_EXPR for on a temporary.
9811 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
9812 the ADDR_EXPR for a local variable.
9813
9814 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
9815
9816 * call.c (build_user_type_conversion_1): If we're trying to
9817 convert to a REFERENCE_TYPE, only consider lvalue conversions.
9818 (build_new_function_call): Print candidates.
9819 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
9820 (reference_binding): Binding a temporary of a reference-related type
9821 is BAD.
9822
9823 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9824
9825 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
9826 * tinfo2.cc (type_info::before): Likewise.
9827
9828 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
9829
9830 * call.c (implicit_conversion): Oops.
9831
9832 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
9833
9834 * call.c (implicit_conversion): Try to find a reference conversion
9835 before binding a const reference to a temporary.
9836
9837 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
9838
9839 * exception.cc (__default_unexpected): Call terminate by default,
9840 so that if the user overrides terminate, the correct function will
9841 be called.
9842
9843 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
9844
9845 * parse.y (left_curly): Avoid trying to use any fields of
9846 error_mark_node, as there aren't any.
9847
9848 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
9849
9850 * lex.c (do_identifier): Avoid breaking on overloaded methods
9851 as default arguments.
9852
9853 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
9854
9855 * call.c (add_template_candidate): Initialize the variable "dummy".
9856
9857 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
9858
9859 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
9860 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
9861
9862 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9863
9864 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
9865 (debug_binfo): Delete decl, not needed.
9866
9867 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
9868 promotes_to_aggr_type): Delete fns.
9869 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
9870 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
9871 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
9872
9873 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
9874
9875 * friend.c (is_friend_type): Delete fn.
9876 * cp-tree.h (is_friend_type): Delete decl.
9877
9878 * decl.c (original_result_rtx, double_ftype_double,
9879 double_ftype_double_double, int_ftype_int, long_ftype_long,
9880 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
9881 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
9882
9883 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
9884 fwd decls.
9885 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
9886
9887 * decl.c (pushdecl_nonclass_level): #if 0, unused.
9888 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
9889
9890 * lex.c (reinit_lang_specific): #if 0, unused.
9891 * cp-tree.h (reinit_lang_specific): #if 0 decl.
9892
9893 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
9894 * cp-tree.h (revert_static_member_fn): Delete decl.
9895
9896 * class.c (root_lang_context_p): Delete fn.
9897 * cp-tree.h (root_lang_context_p): Delete decl.
9898
9899 * decl.c (set_current_level_tags_transparency): #if 0, unused.
9900 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
9901
9902 * lex.c (set_vardecl_interface_info): Make static.
9903 * cp-tree.h (set_vardecl_interface_info): Delete decl.
9904
9905 * call.c (find_scoped_type): Make static.
9906 * cp-tree.h (find_scoped_type): Delete decl.
9907
9908 * search.c (convert_pointer_to_vbase): Make static.
9909 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
9910
9911 * decl.c (const_ptr_type_node): Likewise.
9912 * cp-tree.h (const_ptr_type_node): Delete decl.
9913
9914 * typeck.c (common_base_type): Make static.
9915 * cp-tree.h (common_base_types): Delete erroneous decl.
9916
9917 * pt.c (classtype_mangled_name): Make static.
9918 * cp-tree.h (classtype_mangled_name): Delete decl.
9919
9920 * lex.c (check_newline): Make static.
9921 * cp-tree.h (check_newline): Delete decl.
9922
9923 * typeck.c (build_x_array_ref): Delete fn, same idea as
9924 grok_array_decl.
9925 * cp-tree.h (build_x_array_ref): Delete decl.
9926
9927 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
9928 copy_lang_decl.
9929 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
9930
9931 * class.c (build_vtable_entry): Make static.
9932 * cp-tree.h (build_vtable_entry): Delete decl.
9933
9934 * class.c (build_vbase_pointer): Make static.
9935 * cp-tree.h (build_vbase_pointer): Delete decl.
9936
9937 * sig.c (build_sptr_ref): Add forward decl and make static.
9938 * cp-tree.h (build_sptr_ref): Delete decl.
9939
9940 * call.c (build_new_method_call): Add forward decl and make static.
9941 * cp-tree.h (build_new_method_call): Delete decl.
9942
9943 * call.c (build_object_call): Make static.
9944 * class.c (check_for_override, complete_type_p, mark_overriders):
9945 Likewise.
9946 * decl.c (cp_function_chain): Likewise.
9947 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
9948 Likewise.
9949 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
9950 Likewise.
9951 * tree.c (build_cplus_array_type_1): Likewise.
9952 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
9953 (comp_target_parms): Likewise.
9954
9955 * init.c (build_builtin_call): Make static.
9956 * cp-tree.h (build_builtin_call): Delete decl.
9957
9958 * typeck.c (binary_op_error): Delete decl.
9959 * cp-tree.h (binary_op_error): Likewise.
9960
9961 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9962
9963 * call.c (build_method_call): Compare against error_mark_node
9964 directly, rather than the ERROR_MARK tree code.
9965 * cvt.c (cp_convert): Likewise.
9966 * decl.c (print_binding_level): Likewise.
9967 (duplicate_decls): Likewise.
9968 (grokdeclarator): Likewise.
9969 (grokdeclarator): Likewise.
9970 * init.c (expand_aggr_init_1): Likewise.
9971 (decl_constant_value): Likewise.
9972 * method.c (build_opfncall): Likewise.
9973 (hack_identifier): Likewise.
9974 * typeck.c (build_modify_expr): Likewise.
9975
9976 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
9977
9978 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9979
9980 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
9981
9982 * pt.c (coerce_template_parms): Add new error message.
9983
9984 * method.c (build_overload_value): Implement name mangling for
9985 floating-point template arguments.
9986
9987 * method.c (build_overload_int, icat, dicat): Fix mangling of template
9988 arguments whose absolute value doesn't fit in a signed word.
9989
9990 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9991
9992 * friend.c: New file; put all of the friend stuff in here.
9993 * init.c: Instead of here.
9994 * Makefile.in (CXX_OBJS): Add friend.o.
9995 (friend.o): Add dependencies.
9996 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
9997
9998 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
9999
10000 * call.c (build_scoped_method_call): Complain if the scope isn't a
10001 base.
10002
10003 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10004
10005 * parse.y (left_curly): Don't crash on erroneous type.
10006
10007 * init.c (build_delete): Fix type of ref.
10008
10009 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
10010
10011 * search.c (get_vbase_1): Renamed from get_vbase.
10012 (get_vbase): Wrapper, now non-static.
10013 (convert_pointer_to_vbase): Now static.
10014
10015 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
10016 * init.c (build_delete): Pass one.
10017 (build_partial_cleanup_for): Use build_scoped_method_call.
10018 * decl.c (finish_function): Pass a binfo.
10019
10020 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10021
10022 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
10023
10024 * typeck.c (build_c_cast): Lose other reference to flag.
10025
10026 * call.c (build_field_call): Don't look for [cd]tor_identifier.
10027 * decl2.c (delete_sanity): Remove meaningless use of
10028 LOOKUP_HAS_IN_CHARGE.
10029 * decl.c (finish_function): Use build_scoped_method_call instead
10030 of build_delete for running vbase dtors.
10031 * init.c (build_delete): Call overload resolution code instead of
10032 duplicating it badly.
10033
10034 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
10035
10036 * call.c (build_over_call): Call mark_used before trying to elide
10037 the call.
10038
10039 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
10040
10041 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10042
10043 * typeck.c (build_modify_expr): Always pedwarn for a cast to
10044 non-reference used as an lvalue.
10045
10046 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10047
10048 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
10049
10050 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
10051
10052 * parse.y (handler): Fix template typo.
10053
10054 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10055
10056 * error.c (lang_decl_name): New fn.
10057 * tree.c (lang_printable_name): Use it.
10058
10059 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
10060
10061 * g++spec.c: Include config.h so that we can catch bzero #defines
10062 from the config file.
10063
10064 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
10065
10066 * new1.cc: Include a declaration for malloc, to avoid warning, and
10067 avoid lossing on systems that require one (ones that define malloc
10068 in xm.h).
10069
10070 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10071
10072 * decl2.c (max_tinst_depth): New variable.
10073 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
10074 option.
10075 * pt.c (max_tinst_depth): Variable moved.
10076 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
10077 as legal.
10078
10079 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
10080
10081 * decl.c (xref_basetypes): Allow a base class that depends on
10082 template parms to be incomplete.
10083
10084 * decl2.c (build_expr_from_tree): Support typeid(type).
10085 * rtti.c (get_typeid): Support templates.
10086 (expand_si_desc, expand_class_desc): Fix string length.
10087 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
10088
10089 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
10090
10091 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
10092
10093 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
10094
10095 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
10096
10097 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
10098 smashes together template and non-template decls of the same
10099 signature.
10100
10101 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
10102
10103 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
10104
10105 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10106
10107 * decl.c (duplicate_decls): Next route, pedwarn about different
10108 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
10109
10110 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10111
10112 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
10113 (struct lang_type): Delete has_default_implementation member.
10114 Increase dummy to 21.
10115 * decl.c (start_method): Delete usage.
10116
10117 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
10118 store_after_parms, start_decl_1, auto_function): Add decls.
10119 (get_arglist_len_in_bytes, declare_implicit_exception,
10120 have_exceptions_p, make_type_decl, typedecl_for_tag,
10121 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
10122 build_component_type_expr, cplus_exception_name,
10123 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
10124 * call.c (build_this): Make static.
10125 (is_complete): Likewise.
10126 (implicit_conversion): Likewise.
10127 (reference_binding): Likewise.
10128 (standard_conversion): Likewise.
10129 (strip_top_quals): Likewise.
10130 (non_reference): Likewise.
10131 (build_conv): Likewise.
10132 (user_harshness): Likewise.
10133 (rank_for_ideal): Likewise.
10134 * decl.c (start_decl_1): Delete forward decl.
10135 (push_decl_level): Make static.
10136 (resume_binding_level): Make static.
10137 (namespace_bindings_p): Make static.
10138 (declare_namespace_level): Make static.
10139 (lookup_name_real): Make static.
10140 (duplicate_decls): Make static. Take register off NEWDECL and
10141 OLDDECL parm decls.
10142 * decl2.c (get_sentry): Make static.
10143 (temp_name_p): Delete fn.
10144 * except.c (auto_function): Delete decl.
10145 * lex.c (handle_{cp,sysv}_pragma): Make static.
10146 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
10147 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
10148 * pt.c (tsubst_expr_values): Make static.
10149 * rtti.c (combine_strings): Delete decl.
10150
10151 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
10152
10153 * pt.c (push_template_decl): Handle getting a typedef.
10154
10155 * call.c (build_new_function_call): Complain about void arg.
10156
10157 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10158
10159 * decl.c (duplicate_decls): Give pedwarn of different exceptions
10160 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
10161
10162 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
10163
10164 * except.c (expand_throw): Don't expand the cleanup tree here,
10165 since we are not going to write the rtl out. Fixes problem with
10166 -g -O on SPARC.
10167
10168 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
10169
10170 * Make-lang.in: Add $(exeext) as necessary.
10171
10172 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
10173
10174 * parse.y (handler_seq): Must have at least one catch clause.
10175
10176 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
10177
10178 * call.c (add_builtin_candidate): Restore ?: hack.
10179
10180 * decl.c (grok_op_properties): More warnings.
10181
10182 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10183
10184 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
10185 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
10186
10187 * decl.c (duplicate_decls): Scale back to a warning, and only do
10188 'em if -pedantic.
10189
10190 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
10191
10192 * decl.c (duplicate_decls): pedwarn mismatched exception
10193 specifications.
10194
10195 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
10196
10197 * call.c (build_new_method_call): Don't display the invisible
10198 argument for controlling virtual bases.
10199
10200 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
10201
10202 * new: Add nothrow new and delete, bad_alloc and throw specifications
10203 for delete.
10204 * decl.c (init_decl_processing): Add throw specification for delete.
10205 * new.cc (nothrow): Define.
10206 * lex.c (real_yylex): Removing warning that throw and friends are
10207 keywords.
10208 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
10209 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
10210 * Make-lang.in: Add new{1,2}.{cc,o}.
10211
10212 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10213
10214 * lex.c (cons_up_default_function): Fix return type of synth op=.
10215
10216 * init.c (emit_base_init): Add warnings for uninitialized members
10217 and bases.
10218
10219 * decl.c (xref_basetypes): Add warning for non-polymorphic type
10220 with destructor used as base type.
10221
10222 * decl.c (grok_op_properties): Add warning for op= returning void.
10223 * typeck.c (c_expand_return): Add warning for op= returning anything
10224 other than *this.
10225
10226 * class.c (finish_struct_1): Add warning for class with pointers
10227 but not copy ctor or copy op=.
10228
10229 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
10230 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
10231 (instantiate_template): If -fexternal-templates, add this
10232 instantiation to pending_templates.
10233
10234 * decl2.c (copy_assignment_arg_p): Disable old hack to support
10235 Booch components.
10236
10237 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
10238
10239 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
10240
10241 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
10242
10243 * call.c (standard_conversion): Handle getting references. Tack
10244 on RVALUE_CONV here. Do it for non-class types, too.
10245 (reference_binding): Pass references to standard_conversion.
10246 (implicit_conversion): Likewise.
10247 (add_builtin_candidate): Disable one ?: kludge.
10248 (convert_like): Handle RVALUE_CONVs for non-class types.
10249 (joust): Disable the other ?: kludge.
10250
10251 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10252
10253 * decl.c (init_decl_processing): Add code to build up common
10254 function types beforehand, to avoid creation then removal of
10255 things already in the hash table.
10256
10257 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10258
10259 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
10260 the arguments.
10261
10262 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
10263 current_template_parms.
10264
10265 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
10266
10267 * search.c (lookup_field): Don't return a function, check want_type.
10268
10269 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10270
10271 * init.c (build_new): Make sure PLACEMENT has a type.
10272
10273 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
10274
10275 * init.c (build_new): Support new (nothrow).
10276
10277 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10278
10279 * pt.c (instantiate_decl): Also do push_to_top_level before setting
10280 up DECL_INITIAL.
10281
10282 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
10283 * pt.c (tsubst): Defer instantiation of default args.
10284 * call.c (build_over_call): Until here.
10285
10286 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10287
10288 * search.c (lookup_field): Make sure we have an
10289 IDENTIFIER_CLASS_VALUE before we try to return it.
10290
10291 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
10292
10293 * call.c (build_method_call): Delete unused var PARM.
10294 (build_overload_call_real): Likewise.
10295 (build_object_call): Delete unused var P.
10296 (build_new_op): Likewise.
10297 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
10298 var definitions, which are never used.
10299 (shadow_tag): Delete unused var FN.
10300 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
10301 * init.c (build_new): Delete unused var ALLOC_TEMP.
10302 * method.c (hack_identifier): Delete unused var CONTEXT.
10303 (do_build_copy_constructor): Delete unused var NAME.
10304 (synthesize_method): Delete unused var BASE.
10305 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
10306 * rtti.c (build_headof): Delete unused var VPTR.
10307 (get_typeid): Delete unused var T.
10308 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
10309 and ORIG_OP2.
10310 (build_ptrmemfunc): Delete unused vars U and NINDEX.
10311 * typeck2.c (build_functional_cast): Delete unused var BINFO.
10312
10313 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
10314
10315 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
10316 things in a type being defined.
10317 * decl.c (finish_enum): Reverse the values so that they are in
10318 the correct order.
10319
10320 * pt.c (instantiate_class_template): Don't initialize
10321 BINFO_BASETYPES until the vector is filled out.
10322 (unify): Don't abort on conflicting bindings, just fail.
10323 (instantiate_decl): Do push_tinst_level before any tsubsting.
10324
10325 * method.c (build_overload_value): Handle getting a
10326 TEMPLATE_CONST_PARM for a pointer.
10327
10328 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
10329
10330 * init.c (expand_member_init): Don't give 'not a base' error for
10331 templates.
10332
10333 * pt.c (instantiate_decl): Call import_export_decl later.
10334
10335 * pt.c (instantiate_class_template): Return a value.
10336
10337 * parse.y (extension): New rule for __extension__.
10338 (extdef, unary_expr, decl, component_decl): Use it.
10339
10340 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
10341
10342 * class.c (base_binfo): Remove unused base_has_virtual member.
10343 (finish_base_struct): Likewise.
10344 (finish_struct_1): Likewise.
10345
10346 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
10347
10348 * search.c (expand_upcast_fixups): Fix bogus code generation
10349 problem where the generated code uses the wrong index into the
10350 runtime built vtable on the stack. Old code could clobber random
10351 stack values.
10352
10353 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
10354
10355 * init.c (perform_member_init): Make sure the partial EH cleanups
10356 live on the function_obstack.
10357
10358 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
10359
10360 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
10361 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
10362
10363 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
10364
10365 * decl.c (grokvardecl): Avoid ANSI style initialization.
10366
10367 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
10368
10369 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
10370
10371 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
10372
10373 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
10374
10375 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10376
10377 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
10378 arguments we compare against. Start the count of I at 1, not 0,
10379 since argv[0] is still the command.
10380
10381 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
10382
10383 * lang-specs.h: Accept .cp as an C++ extension.
10384
10385 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10386
10387 * cp-tree.h (ptr_reasonably_similar): Add decl.
10388
10389 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10390
10391 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
10392 pointer. New local SPECBITS with the parm's value.
10393 (grokdeclarator): Pass &specbits down.
10394
10395 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
10396 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
10397
10398 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
10399 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
10400
10401 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
10402 not an error_mark_node.
10403
10404 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10405
10406 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
10407 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
10408
10409 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
10410
10411 * decl.c (grokdeclarator): When giving an anonymous struct a name,
10412 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
10413 not affected).
10414
10415 * typeck2.c (build_m_component_ref): If component is a pointer
10416 to data member, resolve the OFFSET_REF now.
10417
10418 * call.c (convert_like): Don't go into infinite recursion.
10419
10420 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
10421
10422 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
10423 * tree.c (layout_basetypes): And on the vbase ptr.
10424
10425 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10426
10427 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
10428 CHAR_TYPE_SIZE so bool is always the same size as another type.
10429
10430 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
10431
10432 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
10433
10434 * decl2.c (grok_x_components): Remove synthesized methods from
10435 TYPE_METHODS of an anonymous union, complain about member
10436 functions.
10437 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
10438 anonymous unions.
10439 (finish_function): Just clear the DECL_RTL of our arguments.
10440
10441 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10442
10443 * decl2.c (finish_file): Emit DWARF debugging info for static data
10444 members.
10445
10446 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
10447
10448 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
10449
10450 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
10451 IDENTIFIER_NODE.
10452
10453 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10454
10455 * Make-lang.in (g++-cross$(exeext)): Fix typo.
10456
10457 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10458
10459 Make the g++ driver now be a standalone program, rather than one
10460 that tries to run the gcc driver after munging up the options.
10461 * Make-lang.in (g++.c, g++spec.o): New rules.
10462 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
10463 added.
10464 (g++$(exeext)): New rule, based on xgcc rule.
10465 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
10466 * g++spec.c: New file.
10467 * g++.c: Removed file.
10468
10469 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
10470
10471 * cvt.c (build_up_reference): Arrange for any temporary values
10472 that have been keep in registers until now to be put into memory.
10473
10474 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10475
10476 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
10477 that make -j3 bootstrap works better.
10478
10479 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
10480
10481 * decl.c (pushtag): Do pushdecl for anon tags.
10482
10483 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
10484
10485 * typeck.c (c_expand_return): Fix logic.
10486 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
10487
10488 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
10489
10490 * g++.c (main): Make sure arglist has a final NULL entry. Add
10491 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
10492 stdin/stdout of the invoked program are redirected to
10493 nowheresville.
10494
10495 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10496
10497 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
10498
10499 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
10500
10501 * init.c (resolve_offset_ref): Handle obj.vfn better.
10502 * typeck.c (build_component_ref): Set TREE_TYPE on result from
10503 build_vfn_ref.
10504
10505 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
10506
10507 * typeck.c (convert_for_assignment): Also handle anachronistic
10508 implicit conversions from (::*)() to cv void*.
10509 * cvt.c (cp_convert_to_pointer): Likewise.
10510
10511 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
10512
10513 * lex.c (handle_cp_pragma): Fix bogus warning.
10514
10515 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
10516
10517 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
10518 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
10519
10520 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10521
10522 * class.c (finish_struct_1): Support DWARF2_DEBUG.
10523 * search.c (dfs_debug_mark): Likewise.
10524 * decl2.c (finish_vtable_vardecl): Likewise.
10525 * decl.c (pushtag, finish_enum): Likewise.
10526 * lex.c (check_newline): Use debug_* instead of calling *out
10527 functions directly.
10528
10529 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10530
10531 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
10532 on some picky hosts.
10533
10534 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10535
10536 * class.c (finish_struct_1): A class has a non-trivial copy
10537 constructor if it has virtual functions.
10538
10539 * cvt.c (cp_convert): Always call a constructor.
10540
10541 * call.c (reference_binding): Still tack on a REF_BIND
10542 for bad conversions.
10543 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
10544
10545 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
10546 (c_expand_return): Likewise.
10547 * typeck2.c (digest_init): Likewise for { }.
10548 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
10549 * cvt.c (cp_convert): Handle failure better.
10550
10551 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10552
10553 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
10554 of GCC be path-relative.
10555
10556 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10557
10558 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
10559 it does need choose-temp.o and pexecute.o.
10560
10561 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10562
10563 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
10564 that we still use it.
10565 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
10566
10567 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
10568
10569 * init.c (expand_default_init): Avoid calling constructors to
10570 initialize reference temps.
10571
10572 * cvt.c (convert_to_reference): Fix.
10573
10574 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10575
10576 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
10577 (convert_to_reference): Likewise.
10578 * typeck.c (convert_for_initialization): Likewise.
10579 * init.c (expand_default_init): Likewise.
10580 (expand_aggr_init_1): Likewise.
10581 * cp-tree.h (CONV_NONCONVERTING): Lose.
10582 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
10583 * *.c: Adjust.
10584 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
10585
10586 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
10587
10588 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
10589
10590 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10591
10592 * init.c (expand_aggr_init_1): Don't crash on non-constructor
10593 TARGET_EXPR.
10594
10595 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10596
10597 * g++.c: Include gansidecl.h.
10598 (VPROTO, PVPROTO, VA_START): Delete.
10599 (choose_temp_base_try, choose_temp_base, perror_exec,
10600 run_dos) [__MSDOS__]: Delete fns.
10601 (pfatal_with_name): Delete fn.
10602 (temp_filename): Declare like in gcc.c.
10603 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
10604 (error_count, signal_count): Define.
10605 (error): Delete both definitions.
10606 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
10607 (pfatal_pexecute): Add fn from gcc.c.
10608 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
10609 code to use the pexecute stuff also used by gcc.c.
10610 (MIN_FATAL_STATUS): Define.
10611 * Make-lang.in (g++): Add dependency on and linking with
10612 choose-temp.o and pexecute.o.
10613
10614 * cp-tree.h: Include gansidecl.h.
10615 (STDIO_PROTO): Delete #undef/#define.
10616 * cvt.c (NULL): Delete #undef/#define.
10617 * expr.c (NULL): Likewise.
10618 * init.c (NULL): Likewise.
10619 * rtti.c (NULL): Likewise.
10620 * xref.c (NULL): Likewise.
10621
10622 * cp-tree.h (build_user_type_conversion): Add prototype.
10623 * call.c (build_user_type_conversion): Delete prototype. Correct
10624 decl of FLAGS arg to be an int.
10625 * cvt.c (build_user_type_conversion): Likewise.
10626
10627 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
10628
10629 * cp-tree.def: Add TRY_BLOCK and HANDLER.
10630 * except.c (expand_start_catch_block): Support templates.
10631 * parse.y (try_block, handler_seq): Likewise.
10632 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
10633
10634 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
10635
10636 * pt.c (current_template_args): New fn.
10637 (push_template_decl): Use it.
10638 * decl.c (grokdeclarator): Use it.
10639
10640 * decl2.c (build_expr_from_tree): Dereference ref vars.
10641
10642 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
10643 the decl-specifier-seq.
10644
10645 * decl.c (grok_op_properties): Don't force the type of a conversion
10646 op to be complete. Don't warn about converting to the same type
10647 for template instantiations.
10648
10649 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
10650 methods.
10651
10652 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
10653
10654 * typeck.c (get_delta_difference): Remove previous bogusness.
10655 Don't give errors if force is set.
10656
10657 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10658
10659 * decl2.c (finish_file): Don't emit debug info.
10660 * decl.c (pushdecl): Lose obsolete code.
10661 (grokdeclarator): Still do the long long thing after complaining.
10662 * search.c (note_debug_info_needed): Don't do anything if we're in a
10663 template.
10664 * method.c (synthesize_method): For non-local classes,
10665 push_to_top_level first.
10666
10667 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
10668
10669 * typeck.c (get_delta_difference): Add no_error parameter.
10670 (build_ptrmemfunc): Call get_delta_difference with no_error set;
10671 we don't want error messages when converting unrelated
10672 pointer-to-member functions.
10673
10674 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
10675
10676 * error.c (dump_expr): Improve the wording on error messages that
10677 involve pointer to member functions.
10678
10679 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
10680
10681 * cvt.c (cp_convert_to_pointer): Move code for conversions from
10682 (::*)() to void* or (*)() up a bit, so that we can convert from
10683 METHOD_TYPEs as well.
10684
10685 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10686
10687 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
10688 There are no 'member' types.
10689 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
10690 (build_x_typeid): Handle errors.
10691
10692 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
10693
10694 * typeck.c (convert_for_assignment): Handle anachronistic implicit
10695 conversions from (::*)() to void* or (*)().
10696 * cvt.c (cp_convert_to_pointer): Likewise.
10697 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
10698 conversions from here.
10699 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
10700 * lang-options.h: Likewise.
10701 * decl2.c (warn_pmf2ptr): Define.
10702 * cp-tree.h: Declare it.
10703 * typeck2.c (digest_init): Allow pmfs down into
10704 convert_for_initialization.
10705
10706 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
10707
10708 * typeck.c (c_expand_return): Fix for returning overloaded fn.
10709
10710 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
10711
10712 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
10713 * decl.c (grok_reference_init): Pass DIRECT_BIND.
10714 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
10715 DIRECT_BIND.
10716 * call.c (convert_like): Don't pass INDIRECT_BIND.
10717 * typeck.c (convert_arguments): Likewise.
10718 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
10719
10720 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
10721
10722 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
10723 similar code in build_up_ref.
10724 * cvt.c (build_up_reference): Drastically simplify.
10725
10726 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
10727
10728 * typeck.c (signed_or_unsigned_type): If the given type already
10729 as the correct signedness, then just return it.
10730
10731 * typeck.c ({un,}signed_type): If can't do anything, call
10732 signed_or_unsigned_type.
10733
10734 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
10735
10736 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
10737 current_class_type is NULL.
10738
10739 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
10740
10741 * class.c (finish_struct_1): Avoid empty structs by adding a field
10742 so layout_type gets the mode right.
10743
10744 * typeck.c (c_expand_return): Drastically simplify.
10745
10746 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
10747
10748 * typeck.c (decay_conversion): Handle overloaded methods.
10749
10750 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
10751
10752 * call.c (build_over_call): A TARGET_EXPR has side-effects.
10753
10754 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
10755
10756 * cvt.c (convert_to_pointer_force): Add code to support pointer to
10757 member function to pointer to function conversions.
10758 * init.c (resolve_offset_ref): Add code to allow faked up objects,
10759 ignoring them if they are not used, and giving an error, if they
10760 are needed.
10761 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
10762 code, and so that we can give an error, if we needed an object,
10763 and one was not provided.
10764 (build_c_cast): Don't call default_conversion when we want to
10765 convert to pointer to function from a METHOD_TYPE.
10766
10767 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
10768
10769 * Make-lang.in (cplib2.ready): Fix logic.
10770
10771 * decl.c (shadow_tag): Only complain about non-artificial function
10772 members.
10773
10774 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
10775
10776 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
10777
10778 * expr.c (cplus_expand_expr): Pre-tweak call_target like
10779 expand_inline_function would.
10780
10781 * pt.c (mark_decl_instantiated): If extern_p, call
10782 mark_inline_for_output.
10783
10784 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
10785
10786 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
10787 pmd conversions.
10788
10789 * typeck.c (get_delta_difference): Fix wording, as we can be used
10790 for pointer to data members.
10791
10792 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
10793
10794 * pt.c (tsubst): If the function decl isn't a member of this
10795 template, return a copy of the decl (including copying the
10796 lang-specific part) so we don't hose ourselves later.
10797
10798 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10799
10800 * class.c (finish_struct): Remove DWARF-specific tag handling.
10801 * decl.c (pushtag): Likewise.
10802 (finish_function): Always clear DECL_ARGUMENTS on function decls with
10803 no saved RTX.
10804 * decl2.c (finish_file): Emit DWARF debugging info for static data
10805 members.
10806
10807 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
10808
10809 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
10810 isn't the same as the new one before we whack it.
10811
10812 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
10813
10814 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
10815 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
10816 warn_traditional and warn_strict_prototypes; remove ancient
10817 'overload' code; remove references to flag_traditional.
10818
10819 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
10820
10821 * input.c (sub_getch): Handle 8-bit characters in string literals.
10822
10823 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
10824
10825 * tree.c (mapcar): Handle CONSTRUCTORs.
10826 (copy_to_permanent): Handle expression_obstack properly.
10827
10828 * Make-lang.in (cplib2.txt): Also depend on the headers.
10829
10830 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
10831 INT_TYPE_SIZE.
10832 (expand_class_desc): Use USItype for offset field.
10833 * tinfo.h (struct __class_type_info): Likewise.
10834
10835 * method.c (build_overload_int): TYPE_PRECISION should be applied
10836 to types.
10837
10838 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
10839
10840 * call.c (build_new_op): A COND_EXPR involving void must be a
10841 builtin.
10842
10843 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10844
10845 * typeck.c (build_x_component_ref): New fn.
10846 (build_object_ref): Use it.
10847 * parse.y (primary): Use it.
10848 * decl2.c (build_expr_from_tree): Use it.
10849 * cp-tree.h: Declare it.
10850
10851 * decl.c (start_decl): variable-sized arrays cannot be initialized.
10852 * error.c (dump_type_suffix): Handle variable arrays.
10853
10854 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10855
10856 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
10857
10858 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
10859
10860 * decl.c (lookup_name_real): Don't try to look up anything in a
10861 TYPENAME_TYPE.
10862
10863 * tinfo2.cc (__throw_type_match_rtti): Oops.
10864
10865 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10866
10867 * Make-lang.in (exception.o): Use -fno-PIC for now.
10868
10869 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
10870
10871 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
10872 calling them.
10873 (get_tinfo_fn_dynamic): Extracted from build_typeid.
10874 * tinfo2.cc (__dynamic_cast): Adjust.
10875
10876 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
10877 (build_x_typeid): Likewise.
10878
10879 * parse.y: Call build_x_typeid instead of build_typeid.
10880 * cp-tree.def: Add TYPEID_EXPR.
10881 * pt.c (tsubst_copy): Handle typeid.
10882 * decl2.c (build_expr_from_tree): Likewise.
10883 * rtti.c (build_x_typeid): Throw bad_typeid from here.
10884 (build_typeid): Not here.
10885 * cp-tree.h: Declare build_x_typeid.
10886
10887 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
10888
10889 * call.c (convert_like): Pull out constant values.
10890
10891 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
10892
10893 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10894
10895 * decl.c (init_decl_processing): Create short int types before
10896 creating size_t in case a machine description needs to use
10897 unsigned short for size_t.
10898
10899 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10900
10901 * Make-lang.in (exception.o): Turn off pic.
10902
10903 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
10904 type, multi-level ptr conversions.
10905
10906 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
10907 (throw_bad_cast): Use it.
10908 (throw_bad_typeid): New fn.
10909 (build_typeid): Throw bad_typeid as needed.
10910 Use build_call.
10911 (synthesize_tinfo_fn): Handle functions and arrays before checking
10912 for cv-quals.
10913
10914 * Remove .h from standard C++ headers, add new.h, move into inc
10915 subdirectory.
10916
10917 * exception*: Remove pointer from object, constructors. Add
10918 default exception::what that uses type_info::name. Add
10919 __throw_bad_typeid.
10920
10921 * init.c (build_new): Don't add a cookie to new (void *) T[2].
10922
10923 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
10924
10925 * Make-lang.in: Building C++ code depends on cc1plus.
10926
10927 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10928
10929 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
10930 a HOST_WIDE_INT, not a tree.
10931
10932 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
10933
10934 * exception.cc: Don't include <stdlib.h>.
10935
10936 * Make-lang.in (c++.clean): Remove cplib2.*.
10937
10938 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
10939
10940 * parse.y (component_decl_1, component_costructor_declarator case):
10941 Pass attributes/prefix_attributes in tree list.
10942
10943 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
10944
10945 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
10946
10947 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10948
10949 * lex.c (do_identifier): Don't do deferred lookup in a template
10950 header.
10951
10952 * typeck2.c (store_init_value): Oops.
10953
10954 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
10955 New files for C++ lang-support library.
10956 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
10957 (CXX_LIB2FUNCS): Define.
10958 And rules for building the C++ lang-support code.
10959 * config-lang.in (headers): Define.
10960 (lib2funcs): Define.
10961
10962 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10963
10964 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
10965 digest_init.
10966 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
10967 * typeck2.c (store_init_value): Check for initializing pmf with { }
10968 here.
10969 (process_init_constructor): Not here.
10970
10971 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10972
10973 * pt.c (begin_template_parm_list): Increment
10974 processing_template_decl here.
10975 (end_template_parm_list): Not here.
10976 (process_template_parm): No need to add 1 to it now.
10977 * *.c: Use processing_template_decl instead of current_template_parms
10978 to check for being in a template.
10979
10980 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
10981 (tsubst_copy): Handle CONSTRUCTOR.
10982 (instantiate_decl): Set up context properly for variables.
10983 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
10984 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
10985
10986 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10987
10988 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
10989
10990 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10991
10992 * method.c (make_thunk): Call comdat_linkage before setting the
10993 TREE_CODE.
10994
10995 * decl2.c (comdat_linkage): Use make_decl_one_only.
10996 (import_export_decl): Likewise.
10997 * decl.c (init_decl_processing): Check supports_one_only instead of
10998 SUPPORTS_WEAK.
10999
11000 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11001
11002 * decl2.c (grokfield): Tighten checking for access decls.
11003
11004 * decl.c (make_typename_type): Resolve references to
11005 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
11006 (lookup_name_real): Types that depend on a template parameter get
11007 an implicit 'typename' unless they're in the current scope.
11008 (start_decl_1): We don't care about incomplete types that depend
11009 on a template parm.
11010 (grokdeclarator): Resolve 'typename's in the type specifier that
11011 refer to members of the current scope.
11012
11013 * call.c (build_over_call): Remove 'inline called before
11014 definition' diagnostic.
11015 (build_method_call): Likewise.
11016 * decl.c (duplicate_decls): Downgrade 'used before declared
11017 inline' to a warning, only with -Winline.
11018
11019 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
11020
11021 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
11022
11023 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11024
11025 * call.c (build_method_call): When calling a signature
11026 default implementation, as in other cases, let instance_ptr simply
11027 be instance.
11028
11029 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
11030
11031 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
11032
11033 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
11034
11035 * except.c (expand_start_catch_block): Add a pushlevel so that -g
11036 works on hppa and SPARC.
11037
11038 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11039
11040 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
11041
11042 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11043
11044 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
11045 before testing whether it's a signature.
11046
11047 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
11048
11049 * call.c (build_new_method_call): Don't complain about signature
11050 pointers and references not being an aggr type.
11051 (build_this): If a signature pointer or reference was passed in,
11052 just return it.
11053 (build_new_method_call): If instance is a signature pointer, set
11054 basetype to the signature type of instance.
11055 * sig.c (build_signature_method_call): Deleted basetype and
11056 instance parameters, they can be found as the DECL_CONTEXT of
11057 function and as the first argument passed in.
11058 * cp-tree.h: Changed declaration of build_signature_method_call.
11059 * call.c (build_method_call): Deleted first two arguments in call
11060 of build_signature_method_call.
11061 (build_over_call): Added call to build_signature_method_call.
11062
11063 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11064
11065 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
11066 target_expr.
11067
11068 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11069
11070 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
11071
11072 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
11073
11074 * except.c (expand_start_try_stmts): Move to except.c in the backend.
11075 (expand_end_try_stmts): Remove.
11076
11077 * init.c (perform_member_init): Use add_partial_entry () instead
11078 of directly manipulating lists.
11079 (emit_base_init): Ditto.
11080
11081 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
11082
11083 * except.c (expand_exception_blocks): Always make sure USE and
11084 CLOBBER insns that came at the end still do, the backend relies
11085 upon this.
11086
11087 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
11088
11089 * call.c (build_over_call): We can only use a TARGET_EXPR of the
11090 right type.
11091
11092 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
11093
11094 * cvt.c (convert_to_reference): Revert last change, don't complain
11095 about temp without target decl.
11096
11097 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
11098
11099 * decl.c (grokdeclarator): Don't core dump when void() is given.
11100
11101 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
11102
11103 * decl.c (copy_args_p): Don't crash.
11104
11105 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
11106
11107 * pt.c (tsubst): And support template args inside the exception
11108 specification.
11109
11110 * pt.c (tsubst): Add support for exception specifications in
11111 template functions.
11112
11113 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
11114
11115 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
11116 fields now.
11117 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
11118 (start_function): Likewise.
11119 (start_method): Likewise.
11120 (grokfield): Likewise.
11121 (make_call_declarator): Add throw spec parameter.
11122 (set_quals_and_spec): Add routine.
11123 * lex.c (set_quals_and_spec): Likewise.
11124 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
11125 * decl.c (shadow_tag): Eliminate the throw spec parameter to
11126 grokdeclarator.
11127 (groktypename): Likewise.
11128 (start_decl): Eliminate the throw spec parameter. Eliminate the
11129 throw spec parameter to grokdeclarator. Eliminate the throw spec
11130 field in DECL_STMT.
11131 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
11132 (grokfndecl): Remove useless set of raises.
11133 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
11134 the throw spec parameter to start_decl. Pull the throw spec out
11135 of the call declarator.
11136 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
11137 (start_function): Eliminate the throw spec parameter. Eliminate
11138 the throw spec parameter to grokdeclarator.
11139 (start_method): Likewise.
11140 * decl2.c (grokfield): Likewise.
11141 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
11142 (grokoptypename): Likewise.
11143 (finish_file): Eliminate the throw spec parameter to
11144 start_function. Add throw spec to make_call_declarator.
11145 * except.c (init_exception_processing): Add throw spec to
11146 make_call_declarator. Eliminate the throw spec parameter to
11147 start_decl.
11148 (expand_start_catch_block): Eliminate the throw spec parameter to
11149 grokdeclarator.
11150 (expand_builtin_throw): Add throw spec to make_call_declarator.
11151 Eliminate the throw spec parameter to start_function.
11152 (start_anon_func): Likewise.
11153 * lex.c (make_call_declarator): Add throw spec parameter.
11154 (set_quals_and_spec): New routine.
11155 (cons_up_default_function): Add throw spec to make_call_declarator.
11156 Eliminate the throw spec parameter to grokfield.
11157 * method.c (synthesize_method): Eliminate the throw spec parameter
11158 to start_function.
11159 * pt.c (process_template_parm): Eliminate the throw spec parameter
11160 to grokdeclarator.
11161 (tsubst): Add throw spec to make_call_declarator.
11162 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
11163 (do_function_instantiation): Eliminate the throw spec parameter to
11164 grokdeclarator. Eliminate the throw spec parameter to
11165 start_function.
11166 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
11167 to start_function.
11168 * parse.y (datadef): Remove non-winning optimization.
11169 (decl): Likewise.
11170 (fndef): Remove ambiguous error productions uncovered by grammer
11171 fixing.
11172 (constructor_declarator): Add exception_specification_opt here.
11173 (component_constructor_declarator): Likewise.
11174 (direct_after_type_declarator): Likewise.
11175 (complex_direct_notype_declarator): Likewise.
11176 (direct_abstract_declarator): Likewise.
11177 (fn.def1): Remove exception_specification_opt.
11178 (fn.def2): Likewise.
11179 (condition): Likewise.
11180 (initdcl0): Likewise.
11181 (initdcl): Likewise.
11182 (notype_initdcl0): Likewise.
11183 (nomods_initdcl0): Likewise.
11184 (component_decl_1): Likewise.
11185 (component_declarator): Likewise.
11186 (after_type_component_declarator0): Likewise.
11187 (after_type_component_declarator): Likewise.
11188 (notype_component_declarator): Likewise.
11189
11190 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11191
11192 * call.c (build_over_call): Also use an INIT_EXPR when
11193 initializing anything from an rvalue.
11194
11195 * call.c (build_over_call): Call stabilize_reference when building
11196 an INIT_EXPR instead of calling the copy ctor.
11197
11198 * call.c (joust): Extend the previous change to all comparisons.
11199
11200 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
11201 NO_LINKAGE_HEURISTICS.
11202
11203 * decl2.c (finish_file): Emit any statics that weren't already.
11204
11205 * typeck.c (build_static_cast): Implement.
11206 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
11207 * decl.c (grokparms): Use can_convert_arg instead of
11208 implicit_conversion directly.
11209 (copy_args_p): New fn.
11210 * cvt.c (convert_to_reference): Don't complain about temp with
11211 static_cast.
11212 (build_up_reference): Handle TARGET_EXPRs.
11213 * call.c (build_over_call): Elide unnecessary temps.
11214 (can_convert*): Use new overloading code.
11215
11216 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
11217
11218 * call.c: Move TYPE_PTR*_MACROS ...
11219 * cp-tree.h: To here.
11220 * typeck.c (build_reinterpret_cast): Implement.
11221
11222 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
11223 ptr_complete_ob.
11224 (joust): If we're comparing a function to a builtin and the worst
11225 conversion for the builtin is worse than the worst conversion for the
11226 function, take the function.
11227
11228 * typeck.c (build_const_cast): Implement.
11229 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
11230 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
11231
11232 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
11233
11234 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
11235 too early. Make sure we explode if exprtype turns out to be a
11236 NULL_TREE when it shouldn't be.
11237
11238 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
11239
11240 * cp-tree.h: New routine make_call_declarator.
11241 * lex.c (make_call_declarator): Define it.
11242 * except.c (init_exception_processing): Use it.
11243 (expand_builtin_throw): Likewise.
11244 (start_anon_func): Likewise.
11245 * decl2.c (finish_file): Likewise.
11246 * lex.c (cons_up_default_function): Likewise.
11247 * parse.y: Likewise.
11248 * pt.c (tsubst): Likewise.
11249
11250 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
11251
11252 * decl2.c (groktypefield): Remove unused code.
11253
11254 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
11255
11256 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
11257 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
11258 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
11259 nonempty_cv_qualifiers.
11260 * hash.h: Rebuild.
11261
11262 * lex.c (make_pointer_declarator): Change type_quals into
11263 cv_qualifiers.
11264 (make_reference_declarator): Likewise.
11265
11266 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11267
11268 * decl.c (start_function): Only check interface_* for templates
11269 with flag_alt_external_templates.
11270
11271 * call.c (build_new_op): Check for comparison of different enum types.
11272 (build_over_call): Fix arg # output.
11273
11274 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
11275
11276 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
11277
11278 * call.c (build_new_op): Check for erroneous args.
11279
11280 * call.c (build_new_method_call): Add missing args to cp_error.
11281
11282 * tree.c (error_type): Dont print reference-to-array.
11283
11284 * typeck.c (convert_for_assignment): Don't say contravariance for
11285 removing const.
11286
11287 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
11288
11289 * call.c (build_over_call): Diagnose bad convs for `this'.
11290
11291 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
11292 on _ctor_arg.
11293
11294 * call.c (convert_like): Handle bad convs.
11295 (build_over_call): Handle bad convs better.
11296
11297 * decl2.c: -fansi-overloading is now the default.
11298
11299 * call.c (build_new_method_call): Check for erroneous args.
11300
11301 * pt.c (instantiate_class_template): Propagate
11302 TYPE_USES_MULTIPLE_INHERITANCE.
11303
11304 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
11305
11306 * call.c (enforce_access): Add static to routine.
11307
11308 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11309
11310 * call.c (build_user_type_conversion_1): Fix bad handling.
11311 (compare_ics): Likewise.
11312
11313 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11314
11315 * call.c (standard_conversion): Oops.
11316
11317 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
11318
11319 * g++.c: Update test for win32 (&& ! cygwin32).
11320
11321 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11322
11323 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
11324 (ptr_reasonably_similar): New fn.
11325 * call.c (BAD_RANK): New rank.
11326 (ICS_BAD_FLAG): New macro.
11327 (standard_conversion): Handle almost-right pointer conversions.
11328 (reference_binding): Handle bad rvalue bindings.
11329 (add_*_candidate): Stuff.
11330 (build_over_call): Pass bad conversions to convert_for_initialization.
11331 (compare_ics): Handle bad convs.
11332 (joust): Likewise.
11333
11334 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
11335
11336 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
11337 integer_type_node when computing pointer offsets.
11338
11339 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
11340
11341 * tree.c (lvalue_type): New fn.
11342 (error_type): New fn.
11343 * call.c (op_error): Use error_type.
11344 (add_conv_candidate): Use lvalue_type.
11345 (add_builtin_candidates): Likewise.
11346 * error.c (args_as_string): Use error_type.
11347
11348 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11349
11350 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
11351 (tsubst): Not here.
11352
11353 * decl.c (init_decl_processing): With -ansi, __null's type is the
11354 signed integral type with the same number of bits as a pointer.
11355 Introduce a new variable null_node for it.
11356 * cp-tree.h: Adjust.
11357 * call.c (null_ptr_cst_p): Adjust.
11358
11359 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
11360
11361 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
11362 optimize.
11363
11364 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
11365
11366 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
11367 fns of classes without virtual functions.
11368
11369 * call.c (add_function_candidate): Handle `this' specially.
11370 (compare_ics): Likewise.
11371
11372 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
11373
11374 * typeck.c (build_conditional_expr): Fix handling of __null.
11375
11376 * decl2.c (comdat_linkage): New fn.
11377 (import_export_vtable): Use it.
11378 (import_export_decl): Use it.
11379 * method.c (make_thunk): Use it.
11380
11381 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
11382
11383 * pt.c (end_template_decl): If we don't actually have parms, return.
11384 * parse.y (template_header): Accept 'template <>'.
11385
11386 * errfn.c: Allow 5 args.
11387
11388 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11389
11390 * tree.c (make_temp_vec): New fn.
11391 * pt.c (push_template_decl): Handle partial specs.
11392 (instantiate_class_template): Likewise.
11393 (more_specialized): Use get_bindings.
11394 (more_specialized_class): New fn.
11395 (get_class_bindings): New fn.
11396 (most_specialized_class): New fn.
11397 (do_function_instantiation): List candidates for ambiguous case.
11398 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
11399 (shadow_tag): Call push_template_decl for partial specializations.
11400 * parse.y: Likewise.
11401 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
11402 DECL_TEMPLATE_MEMBERS.
11403 * call.c (print_z_candidates): Reduce duplication.
11404
11405 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11406
11407 * decl2.c (lang_decode_option): Allow -fansi-overloading.
11408
11409 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
11410
11411 * pt.c (get_bindings): New fn.
11412 (most_specialized): Likewise.
11413 (do_function_instantiation): Use them.
11414 (add_maybe_template): New fn.
11415 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
11416 * call.c (build_new_op): Handle guiding decls.
11417 (build_new_function_call): Likewise.
11418 * decl2.c (finish_file): Likewise.
11419
11420 * decl2.c (mark_used): Do synthesis here.
11421 * call.c (build_method_call): Not here.
11422 (build_over_call): Or here.
11423 * typeck.c (build_function_call_real): Or here.
11424 * tree.c (bot_manip): Call mark_used on functions used in default
11425 args.
11426
11427 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
11428
11429 * decl2.c (import_export_vtable): Delete code that disabled vtable
11430 heuristic on systems with ASM_OUTPUT_EXTERNAL.
11431
11432 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11433
11434 * typeck.c (build_x_function_call): Handle static call context
11435 better.
11436
11437 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
11438 the function, not its outer block.
11439
11440 * call.c (build_field_call): Pass fields on to build_opfncall
11441 regardless of TYPE_OVERLOADS_CALL_EXPR.
11442 (build_method_call): Pass on to build_new_method_call sooner.
11443
11444 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
11445 gives us.
11446 * class.c (instantiate_type): Don't put a POINTER_TYPE to
11447 METHOD_TYPE on an expression. Also make a copy of rhs instead of
11448 modifying it.
11449
11450 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11451
11452 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
11453 (add_builtin_candidate): Don't take enums for ++.
11454 (build_new_method_call): Handle non-aggregates and field calls.
11455 Move new overloading code from...
11456 * cvt.c: Here.
11457
11458 * decl.c (grokparms): Don't check default args in templates.
11459
11460 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
11461
11462 * cvt.c (build_new_op): Fix args to build_unary_op.
11463 (add_builtin_candidates): Don't call type_promotes_to on float.
11464
11465 * decl.c (grokparms): Check the type of the default arg.
11466
11467 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
11468 returning NULL_TREE.
11469
11470 * typeck.c (build_x_binary_op): Avoid doing extra work.
11471 (build_x_unary_op): Likewise.
11472 (build_x_conditional_expr): Likewise.
11473 * cvt.c (build_over_call): Return.
11474 (add_builtin_candidate): Fix MEMBER_REF.
11475 (build_new_op): Likewise.
11476
11477 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
11478
11479 * method.c (build_overload_name): Put bug fix into code but leave
11480 disabled for now so we can be bug compatible with older releases
11481 that do repeats incorrectly. In the future, we can enable it.
11482
11483 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
11484
11485 * cvt.c (convert_like): Don't call build_cplus_new twice.
11486
11487 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
11488 Control new overloading code with -fansi-overloading.
11489
11490 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
11491
11492 * cvt.c (build_over_call): Call build_cplus_new.
11493 * call.c (build_method_call): Likewise.
11494 * typeck.c (build_function_call_real): Likewise.
11495 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
11496 the COND_EXPR in a TARGET_EXPR so they use the same slot.
11497
11498 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
11499 recursive calls.
11500 * typeck.c (complete_type): Propagate
11501 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
11502
11503 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
11504
11505 * cvt.c (joust): More ?: kludging. Sigh.
11506 (build_over_call): Don't try to synthesize global fns.
11507
11508 * search.c (lookup_conversions): Use binfo marking.
11509
11510 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
11511
11512 * search.c (build_mi_matrix): Use the correct value of cid
11513 when determining the new mi_size.
11514
11515 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11516
11517 * cvt.c (add_builtin_candidates): Do consider type conversion ops
11518 for the first parms of += et al.
11519 (strip_top_quals): New fn.
11520 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
11521 (implicit_conversion): Likewise.
11522 (add_builtin_candidates): Be careful about arrays.
11523 (build_new_method_call): Handle vtable optimization.
11524
11525 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
11526
11527 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
11528 * cvt.c (reference_binding): Use it.
11529 (implicit_conversion): Use it.
11530 (add_builtin_candidate, COND_EXPR): Use it.
11531
11532 * cvt.c (build_new_function_call): Check for error args.
11533
11534 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
11535
11536 * gxx.gperf: Add __null.
11537 * hash.h: Regenerate.
11538 * lex.h: Add RID_NULL.
11539 * lex.c (init_lex): Create null_pointer_node here, stick it in
11540 RID_NULL.
11541 * decl.c (init_decl_processing): Still set its type here.
11542 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
11543 (convert_to_pointer_force): Likewise.
11544 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
11545 if (! pedantic).
11546 * call.c (convert_harshness): Use null_ptr_cst_p.
11547 * typeck.c (convert_for_assignment): Likewise. Don't produce
11548 null_pointer_node.
11549
11550 * error.c (args_as_string): Handle lists of actual args, too.
11551 * cvt.c (null_ptr_cst): Support (void*)0 for now.
11552 (build_user_type_conversion_1): Improve diagnostics.
11553 (build_new_function_call): Likewise.
11554 (build_object_call): Likewise.
11555 (build_new_method_call): Likewise. Move call before def diagnostic...
11556 (build_over_call): Here.
11557
11558 * cvt.c (build_new_method_call): Don't complain about no match if
11559 LOOKUP_SPECULATIVELY.
11560 (build_over_call): Fix 'this' for virtual fn.
11561 (build_new_method_call): Add diagnostic.
11562
11563 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11564
11565 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
11566 constructors to be passed in.
11567 (build_over_call): Likewise.
11568 (build_user_type_conversion_1): Pass them in.
11569 (convert_like): Likewise.
11570 (build_object_call): Handle overloaded conversions.
11571 (build_over_call): Pass the right args to build_vfn_ref.
11572 (standard_conversion): Fix pmf convs.
11573 (joust): Handle comparing statics and non-statics.
11574 (build_new_method_call): New fn.
11575 * call.c (build_method_call): Call it if NEW_OVER.
11576
11577 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
11578
11579 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
11580 %D instead.
11581
11582 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
11583
11584 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
11585 instead of just maybe_build_cleanup so that we deallocate the
11586 thrown object.
11587
11588 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11589
11590 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
11591 * cp-tree.h (finish_prevtable_vardecl): Add decl.
11592
11593 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
11594
11595 * pt.c (instantiate_class_template): Call complete_type. Also, if
11596 we're at the end of the file and we just instantiated a template
11597 class with a vtable, call finish_prevtable_vardecl.
11598
11599 * error.c (dump_decl): Don't explode (or explode more gracefully
11600 as appropriate) if the object being dumped has a null type.
11601 (dump_expr): Likewise.
11602
11603 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
11604 by counting the number of nodes that we'll need before allocating
11605 the array.
11606 (lookup_fnfields): Fix comment.
11607 (breadth_first_search): Fix comment.
11608
11609 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
11610
11611 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
11612 TYPE_ALIGN.
11613 * class.c (finish_struct): Call cplus_decl_attributes here.
11614 (finish_struct_1): Not here.
11615 * cp-tree.h: Adjust.
11616
11617 * pt.c (type_unification): New parameter STRICT.
11618 (unify): If STRICT, don't allow cv addition or base deduction.
11619 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
11620
11621 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11622
11623 * search.c (get_template_base{_recursive}): New fns.
11624 * pt.c (more_specialized): New fn.
11625 (do_function_instantiation): Use it.
11626 (unify): Handle base deduction.
11627 * cvt.c (joust): Use more_specialized.
11628 Don't arbitrarily choose between non-builtin candidates.
11629 (build_over_call): Call require_complete_type.
11630
11631 * decl.c (start_function): Statics are static even in a #pragma
11632 interface file.
11633
11634 * decl2.c (import_export_vtable): Disable vtable heuristic on
11635 systems with ASM_OUTPUT_EXTERNAL.
11636
11637 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
11638 (standard_conversion): No std conv to enum type.
11639
11640 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
11641 for ptm's.
11642
11643 * cvt.c (reference_binding): Bind directly to a base subobject of
11644 a class rvalue.
11645
11646 * cvt.c (build_new_op): Enforce access control.
11647
11648 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
11649
11650 * typeck2.c (process_init_constructor): When scanning the
11651 union for a named field, skip things that aren't FIELD_DECLs.
11652
11653 * method.c (synthesize_method): Don't scan fndecl's rtl if
11654 we're at the end of the file; just assume the function can't
11655 be inlined.
11656
11657 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11658
11659 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
11660 it failed.
11661
11662 * cvt.c (build_user_type_conversion_1): Handle overloaded
11663 conversion ops.
11664
11665 * cvt.c (add_builtin_candidates): Don't consider type conversion
11666 operators for the first parameter of operator=.
11667
11668 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
11669
11670 * typeck.c (complete_type): Only call layout_type if we're not
11671 expanding a template.
11672
11673 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
11674
11675 * cvt.c (compare_ics): Oops.
11676
11677 * cvt.c (op_error): Oops.
11678
11679 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
11680 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
11681 (build_conv): Use them.
11682 (implicit_conversion): Use them.
11683 (convert_like): Handle them.
11684 (build_new_op): Handle builtin COND_EXPR again.
11685 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
11686 in lists of types for COND_EXPR.
11687 (add_builtin_candidate): Add enum candidates for COND_EXPR.
11688
11689 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
11690
11691 * typeck.c (build_modify_expr): Always attempt to build a call to
11692 the assignment operator, even if we're using a default one.
11693 (convert_for_initialization): Call complete_type.
11694
11695 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11696
11697 * cvt.c (reference_binding): A REF_BIND gets the reference type.
11698 (implicit_conversion): Likewise.
11699 (convert_like): Likewise.
11700 (compare_ics): Likewise.
11701 (compare_qual): Likewise.
11702 (print_z_candidates): Handle no candidates.
11703 (build_new_op): Don't handle builtin COND_EXPR for now.
11704
11705 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
11706
11707 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
11708
11709 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11710
11711 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
11712
11713 * cvt.c (build_builtin_candidate): Oops.
11714 (build_new_op): Oops.
11715
11716 * method.c (build_opfncall): Pass COND_EXPR on.
11717 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
11718 (add_builtin_candidate{,s}): Likewise.
11719 (add_builtin_candidates): Likewise.
11720 (print_z_candidates, op_error, build_new_op): Likewise.
11721 (type_decays_to): New fn.
11722 * lex.c (init_lex): Just say ?: for COND_EXPR.
11723
11724 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
11725
11726 * typeck.c (complete_type): Call layout_type rather than building
11727 a new array type.
11728
11729 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
11730 only use ptrdiff_t.
11731
11732 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11733
11734 * cvt.c: Always compile the new overloading code (but don't use it).
11735 (implicit_conversion): Add a BASE_CONV when converting to
11736 the same class type.
11737 (convert_like): Handle BASE_CONV.
11738
11739 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11740
11741 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
11742 (add_builtin_candidate): Likewise.
11743
11744 NEW_OVER changes:
11745 * typeck.c (build_x_function_call): Try an operator function
11746 whenever we call an object of class type.
11747 * method.c (build_opfncall): Pass CALL_EXPRs through.
11748 * cvt.c (implicit_conversion): Do const-ref case first.
11749 (add_conv_candidate, build_object_call, op_error): New fns.
11750 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
11751 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
11752 builtin candidates.
11753 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
11754 Fall back on preincrement handling. Use op_error.
11755 Handle warn_synth.
11756 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
11757 an error_mark_node.
11758 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
11759 properly.
11760
11761 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
11762
11763 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
11764
11765 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
11766
11767 * typeck.c (build_component_ref_1): Use build_component_ref
11768 instead of open coding it here.
11769
11770 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11771
11772 * g++.c (main): Don't link with -lg++.
11773
11774 NEW_OVER changes:
11775 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
11776 result of build_type_conversion.
11777 (cp_convert): Only call build_method_call for ctors if
11778 build_type_conversion failed.
11779 (ptr_complete_ob): New function.
11780 (TYPE_PTR{,OB,MEM}_P): New macros.
11781 ({add,build}_builtin_candidate{,s}): New functions.
11782 (print_z_candidates): Handle builtins.
11783 (build_user_type_conversion_1): Don't use conversion fns for
11784 converting to a base type.
11785 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
11786 (build_user_type_conversion): Use convert_from_reference.
11787 (build_new_op): New function.
11788 (build_over_call): Fix handling of methods.
11789 (compare_ics): Handle AMBIG_CONV properly.
11790 * typeck2.c: Increment abort count.
11791 * method.c (build_opfncall): Forward most requests to build_new_op.
11792 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
11793
11794 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11795
11796 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
11797 invalid second argument to dump_expr_list.
11798
11799 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
11800
11801 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
11802
11803 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
11804
11805 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
11806 ASSEMBLE_EXTERNAL.
11807
11808 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
11809
11810 * typeck2.c (process_init_constructor): New pedwarn for using { }
11811 to initialize a pointer to member function.
11812 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
11813 we can avoid the new error.
11814
11815 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
11816
11817 * typeck.c (build_ptrmemfunc1): New function to hide details of
11818 pointer to member functions better.
11819
11820 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
11821
11822 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
11823 methods into the actual method, as we know the implied object is
11824 not used.
11825
11826 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11827
11828 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
11829 inside a system header.
11830
11831 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
11832
11833 * call.c (build_method_call): Call complete_type on the
11834 instance type.
11835
11836 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
11837
11838 * typeck.c (build_component_ref): Always build up an OFFSET_REF
11839 for obj_ptr->func so that we can know which object to use in a
11840 method call.
11841
11842 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
11843
11844 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
11845 around things. Also improve maintainability.
11846
11847 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
11848
11849 * decl.c (grokdeclarator): Check for overflow when evaluating an
11850 array dimension.
11851
11852 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
11853
11854 * cvt.c (cp_convert): Don't check for ambiguity with constructor
11855 if NEW_OVER.
11856
11857 * typeck.c (build_x_function_call): Pass function overload
11858 questions to new overloading code if NEW_OVER.
11859 * init.c (expand_aggr_init_1): Only check for type conversion ops
11860 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
11861 Don't check for ambiguity with constructor if NEW_OVER.
11862 * cvt.c (convert_to_reference): Dereference the result of a type
11863 conversion operator.
11864 (build_conv): Propagate ICS_USER_FLAG.
11865 (implicit_conversion): Call instantiate_type.
11866 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
11867 (add_function_candidate): Fix cv-quals on argtype.
11868 (print_z_candidates): New function.
11869 (build_new_function_call): Call it.
11870 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
11871 consider non-converting constructors.
11872 Call print_z_candidates.
11873 Return an AMBIG_CONV for an ambiguous conversion.
11874 (build_user_type_conversion): Handle AMBIG_CONV.
11875 (convert_like): Fix test for building TARGET_EXPR.
11876 Call instantiate_type.
11877 Handle AMBIG_CONV and LVALUE_CONV.
11878 (build_over_call): Handle 0 args and ellipsis.
11879 * cp-tree.def: Add AMBIG_CONV.
11880
11881 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
11882
11883 * decl.c (lookup_name_real): If we find mem in obj when parsing
11884 `obj->mem', make sure we return the right value.
11885
11886 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
11887
11888 * search.c (get_base_distance): Call complete_type.
11889
11890 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
11891
11892 * decl.c (store_bindings): Make static.
11893
11894 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11895
11896 * init.c (expand_aggr_init_1): Don't check type conversions if
11897 NEW_OVER.
11898
11899 * cvt.c (z_candidate): Put back template field.
11900 (add_function_candidate): Set it.
11901 (add_template_candidate): Likewise.
11902 (joust): Use it.
11903 (compare_qual): Handle references and pointers to members.
11904 (compare_ics): Handle reference bindings.
11905
11906 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
11907
11908 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
11909
11910 * call.c (compute_conversion_costs): Call complete_type.
11911
11912 * tree.c (vec_binfo_member): Use comptypes instead of comparing
11913 pointers, so we can handle template parameters.
11914
11915 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
11916
11917 * cvt.c (cp_convert_to_pointer): We have to call complete_type
11918 here; let's make it explicit instead of a side effect of an
11919 error check.
11920
11921 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11922
11923 * cvt.c (z_candidate): Remove template field.
11924 (reference_binding): Handle binding to temporary.
11925 (implicit_conversion): Likewise.
11926 (add_function_candidate): Handle artificial constructor parms.
11927 Handle functions with too few parms.
11928 (add_template_candidate): New function.
11929 (build_user_type_conversion_1): Handle constructors.
11930 (convert_like): Likewise.
11931 (build_over_call): Likewise.
11932 (build_new_function_call): Support templates.
11933 (compare_ics): Fix reference, inheritance handling.
11934
11935 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
11936
11937 * decl.c: Add signed_size_zero_node.
11938 (init_decl_processing): Build it.
11939 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
11940 when we're trying to make a negative delta.
11941
11942 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11943
11944 Stop doing this damn index==strchr variable name confusion.
11945 * class.c (add_virtual_function): Change local var INDEX to be
11946 named IDX.
11947 (add_method): Likewise.
11948 * lex.c (print_parse_statistics): Likewise.
11949 * search.c (make_memoized_table_entry): Likewise.
11950 (lookup_fnfields_here): Likewise.
11951 (lookup_field): Likewise.
11952 (lookup_fnfields): Likewise.
11953 (get_baselinks): Likewise.
11954 * sig.c (build_signature_table_constructor): Likewise.
11955 (build_signature_method_call): Likewise.
11956 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
11957 (get_member_function_from_ptrfunc): Likewise.
11958 (build_ptrmemfunc): Change local var INDEX to be IDX.
11959 (c_expand_start_case): Likewise.
11960
11961 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11962
11963 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
11964 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
11965 (convert_to_reference): Use build_type_conversion to convert to
11966 the reference type directly.
11967 (standard_conversion): Fix void* case, non-conversions.
11968 (reference_binding): Fix expr == 0 case, non-conversions.
11969 (convert_like): Support REF_BIND.
11970 (compare_qual): Split out from compare_ics.
11971 (compare_ics): Use it, handle icses with only a qual_conv.
11972
11973 * init.c (expand_vec_init): Don't crash if decl is NULL.
11974
11975 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
11976
11977 * mpw-config.in: New file, configury for Mac MPW.
11978 * mpw-make.sed: New file, makefile editing for MPW.
11979
11980 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11981
11982 * pt.c (instantiate_class_template): Call repo_template_used.
11983
11984 * search.c (lookup_conversions): Only lookup conversions in
11985 complete types.
11986
11987 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11988
11989 * cp-tree.def: Renamed from tree.def, to avoid confusion with
11990 gcc's tree.def.
11991 * cp-tree.h, lex.c: Include cp-tree.def.
11992 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
11993
11994 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
11995
11996 * init.c (build_vec_delete_1): Call complete_type.
11997
11998 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
11999
12000 * except.c (start_anon_func): Make sure anonymous functions are
12001 never external.
12002
12003 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12004
12005 * decl.c (finish_function): If function_depth > 1, set nested.
12006
12007 * decl2.c (grokbitfield): Revert Bob's change.
12008 * class.c (finish_struct_1): Fix handling of named bitfield widths.
12009
12010 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
12011
12012 * pt.c (add_pending_template): Handle types.
12013 (lookup_template_class): With -fexternal-templates, just add the class
12014 to pending_templates instead of instantiating it now.
12015 * decl2.c (finish_file): Handle types in pending_templates.
12016
12017 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
12018
12019 * decl2.c (grokbitfield): Handle constant decls appropriately.
12020 Give an appropriate error message now instead of spewing core
12021 later.
12022
12023 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12024
12025 * decl2.c: Don't turn on thunks by default for now.
12026
12027 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
12028
12029 * typeck.c (complete_type): Handle error_mark_node.
12030 (common_type, OFFSET_TYPE): Handle template_type_parms.
12031
12032 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12033
12034 * pt.c (instantiate_decl): If at_eof, call import_export_decl
12035 regardless of DECL_INLINE.
12036
12037 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
12038
12039 * class.c (finish_struct_bits): Copy TYPE_SIZE.
12040
12041 * rtti.c (build_dynamic_cast): Support templates.
12042 * tree.def: Support DYNAMIC_CAST_EXPR.
12043 * pt.c (tsubst_copy): Likewise.
12044 * decl2.c (build_expr_from_tree): Likewise.
12045
12046 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12047
12048 * typeck.c (build_static_cast): Support templates.
12049 (build_const_cast): Likewise.
12050 * tree.def: Support CONST/STATIC_CAST_EXPR.
12051 * pt.c (tsubst_copy): Likewise.
12052 * decl2.c (build_expr_from_tree): Likewise.
12053
12054 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12055
12056 * decl2.c (finish_vtable_vardecl): Don't trust
12057 TREE_SYMBOL_REFERENCED for vtables of local classes.
12058
12059 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12060
12061 * pt.c (tsubst_copy): Handle operator T.
12062
12063 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12064
12065 * init.c (build_delete): Move creation of PARMS inside test of
12066 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
12067
12068 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
12069
12070 * typeck.c (build_conditional_expr): Don't assume that
12071 the arguments to ?: are always pointers or records.
12072
12073 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12074
12075 * decl2.c (import_export_decl): Still emit static/weak/comdat
12076 copies of inline template functions with -fno-implicit-templates.
12077
12078 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
12079
12080 * init.c (build_delete): Determine the complete basetype
12081 path to the destructor we're calling.
12082
12083 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
12084
12085 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
12086 initialize the enum, because we really and truly don't know where
12087 it came from.
12088 (start_enum): Don't copy integer_zero_node because
12089 build_enumerator will do it.
12090
12091 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12092
12093 * decl.c (finish_function): Do access control on base destructors.
12094
12095 * pt.c (tsubst, case FUNCTION_DECL): Set up
12096 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
12097 hose us.
12098
12099 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
12100
12101 * cvt.c (build_up_reference): If we have already extended the
12102 lifetime of the temporary, don't try it again.
12103 * typeck.c (c_expand_return): Don't try and convert the return
12104 value twice when we want a reference, once is enough.
12105
12106 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
12107
12108 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
12109 LOOKUP_ONLYCONVERTING at all for now.
12110
12111 * search.c (add_conversions): Put the conversion function in
12112 TREE_VALUE, the basetype in TREE_PURPOSE.
12113 * cvt.c (build_type_conversion): Adjust.
12114 * cvt.c (build_expr_type_conversion): Adjust.
12115 * call.c (user_harshness): Adjust.
12116
12117 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
12118
12119 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
12120 backend's benefit.
12121
12122 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
12123
12124 * except.c (expand_start_catch_block): Add a dummy region, if we
12125 get an error, so that we can avoid core dumping later.
12126
12127 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
12128
12129 * cp-tree.h (OFFSET_REF): Remove.
12130 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
12131 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
12132 * init.c (expand_aggr_init_1): Likewise.
12133 (build_new): Likewise.
12134 * typeck.c (expand_target_expr): Likewise.
12135
12136 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12137
12138 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
12139 TARGET_EXPR.
12140
12141 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
12142
12143 * cvt.c (build_up_reference): Redo how and when temporaries are
12144 created.
12145 * decl.c (grok_reference_init): Don't try and be smart about
12146 running cleanups.
12147
12148 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
12149
12150 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
12151 (TARGET_EXPR...), now that it has 4 arguments.
12152 * tree.c (build_cplus_new): Likewise.
12153
12154 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12155
12156 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
12157
12158 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
12159 * decl.c (struct saved_scope): Remove named_labels,
12160 {base,member}_init_list.
12161 (maybe_push_to_top_level): Don't set them. Call
12162 push_cp_function_context if appropriate.
12163 (pop_from_top_level): Likewise.
12164
12165 * method.c (do_build_assign_ref): Remove obsolete check of
12166 TYPE_HAS_ASSIGN_REF (basetype).
12167
12168 * decl.c (grokfndecl): Diagnose user definition of
12169 implicitly-declared methods.
12170
12171 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
12172
12173 * method.c (do_build_copy_constructor): Add code to give
12174 meaningful error messages instead of crashing.
12175 (do_build_assign_ref): Don't synthesize assignment operators for
12176 classes containing reference or const members.
12177
12178 * class.c (struct base_info): Remove cant_synth_copy_ctor
12179 and cant_synth_asn_ref.
12180 (finish_base_struct): Remove the code that tries to conditionalize
12181 synthesis of copy constructors & assignment operators based on
12182 access permissions. Instead, let it fail when it tries to
12183 synthesize the copy constructor. This will give meaningful error
12184 messages instead of silently generating code to perform a bitcopy.
12185
12186 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
12187
12188 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
12189 determining types for constant values.
12190
12191 * decl.c (struct named_label_list): Use instead of stuffing
12192 random items into a TREE_LIST node.
12193 (named_label_uses): Use the new struct.
12194 (poplevel): Likewise.
12195 (lookup_label): Likewise.
12196 (define_label): Add an error message to tell the user the line
12197 where the goto is located in addition to the destination of the
12198 goto.
12199 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
12200 named_label_uses.
12201 (finish_function): Likewise.
12202
12203 (start_decl): Complain about defining a static data member
12204 in a different type from which it was declared.
12205
12206 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12207
12208 * cvt.c (build_expr_type_conversion): Adjust.
12209
12210 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12211
12212 * call.c (build_method_call): Always convert 'this' to the
12213 appropriate type.
12214
12215 * search.c (add_conversions): Put the conversion function in
12216 TREE_VALUE, the type in TREE_PURPOSE.
12217 * cvt.c (build_type_conversion): Adjust.
12218 * call.c (user_harshness): Adjust.
12219
12220 * method.c (emit_thunk): Call temporary_allocation and
12221 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
12222
12223 * tree.c (build_cplus_array_type): Handle tweaking of
12224 TYPE_MAIN_VARIANT here.
12225 * typeck.c (common_type): Not here.
12226
12227 * typeck.c (complete_type): Only try to complete an array type if
12228 it has a domain.
12229
12230 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
12231
12232 * decl.c (grokvardecl): Call complete_type.
12233 (grokdeclarator): Call complete_type for PARM_DECLs.
12234
12235 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12236
12237 * pt.c (instantiate_class_template): Re-set
12238 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
12239
12240 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
12241
12242 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
12243 smart enough to do it right.
12244 * tree.c (cp_expand_decl_cleanup): Likewise.
12245 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
12246 cp_expand_decl_cleanup.
12247 (store_parm_decls): Likewise.
12248 (hack_incomplete_structures): Likewise.
12249 * except.c (push_eh_cleanup): Likewise.
12250
12251 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
12252
12253 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
12254 frontend to the backend where it belongs.
12255 * tree.c (unsave_expr): Likewise.
12256 (unsave_expr_now): Likewise.
12257 * tree.def (UNSAVE_EXPR): Likewise.
12258 * cp-tree.h (unsave_expr): Likewise.
12259 (unsave_expr_now): Likewise.
12260
12261 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
12262
12263 * init.c (emit_base_init): Make sure the partial EH cleanups live
12264 on the function_obstack.
12265
12266 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
12267
12268 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
12269 when checking for pointer types.
12270
12271 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12272
12273 * pt.c (instantiate_class_template): Remove obsolete check for
12274 access declarations.
12275
12276 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
12277
12278 * call.c (build_overload_call): Simplify calls to
12279 build_overload_call by removing last parameter.
12280 (build_method_call): Likewise.
12281 * cp-tree.h: Likewise.
12282 * method.c (build_opfncall): Likewise.
12283 * typeck.c (build_x_function_call): Likewise.
12284
12285 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
12286
12287 * call.c (default_parm_conversions): Factor out common code.
12288 (build_method_call): Use it.
12289 (build_overload_call_real): Use it.
12290
12291 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
12292
12293 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
12294 but pedwarn as the code is bogus.
12295 * typeck.c (decay_conversion): Likewise.
12296 (build_function_call_real): Use build_addr_func instead of
12297 default_conversion. Don't allow pointer-to-method functions down
12298 here.
12299 (build_unary_op): Use real pointer-to-member functions instead of
12300 fake ones.
12301 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
12302 (convert_for_assignment): Removed some obsolete code.
12303 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
12304 build_x_function_call instead of current_class_ptr. Only call
12305 digest_init once on an initializer, we do this just checking
12306 TREE_TYPE.
12307 (build_expr_from_tree): Pass current_class_ref to
12308 build_x_function_call instead of current_class_ptr.
12309 * init.c (build_member_call): Likewise.
12310 * pase.y: Likewise.
12311 * error.c (dump_expr): Handle OFFSET_REFs better.
12312 * pt.c (unify): Handle pointer-to-member functions better.
12313 * decl.c (finish_function): Clear out current_class_ref just like
12314 we do for current_class_ptr.
12315
12316 * typeck.c (get_delta_difference): Handle virtual bases better.
12317
12318 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
12319
12320 * sig.c (build_signature_table_constructor): Use the delta for
12321 the original basetype for this virtual function with thunks.
12322 (build_signature_method_call): We still need to adjust 'this'
12323 with thunks.
12324
12325 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
12326
12327 * call.c (build_addr_func): New routine. Used to get the `real'
12328 address of a function or a method. Needed to avoid getting a
12329 pointer-to-member function.
12330 (build_call): New routine to build CALL_EXPRs.
12331 (build_method_call): Use it.
12332 * cvt.c (convert_to_aggr): Likewise.
12333 * typeck.c (build_function_call_real): Likewise.
12334 * sig.c (build_signature_table_constructor): Use build_addr_func.
12335 * cp-tree.h (build_call, build_addr_func): Declare them.
12336
12337 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
12338
12339 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
12340 * parse.y: Remove uses of LOOKUP_AGGR.
12341
12342 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
12343
12344 * *.[chy]: Rename current_class_decl to current_class_ptr, and
12345 C_C_D to current_class_ref.
12346
12347 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12348
12349 * call.c (convert_harshness): Tighten up pointer conversions.
12350
12351 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
12352
12353 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
12354 (finish_file): Likewise.
12355
12356 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12357
12358 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
12359
12360 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
12361 code.
12362
12363 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12364
12365 * decl2.c: Turn on thunks by default where supported.
12366
12367 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
12368
12369 * cp-tree.h (build_overload_call_maybe): Removed.
12370 * call.c (build_overload_call_real): Invert meaning of last arg to
12371 be require_complete.
12372 (build_overload_call): Likewise.
12373 * typeck.c (build_x_function_call): Use build_overload_call_real
12374 instead of build_overload_call_maybe.
12375
12376 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12377
12378 * decl2.c (finish_file): Don't try to emit functions that haven't
12379 been compiled.
12380
12381 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12382
12383 * decl2.c (finish_vtable_vardecl): Oops.
12384
12385 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
12386 Also store the bindings from previous_class_values.
12387 (pop_from_top_level): Restore them.
12388
12389 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12390
12391 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
12392 symbol has been referenced.
12393 (finish_file): Re-join synthesis/vtable loop with inline emission
12394 loop, disable inlining when an inline is output.
12395
12396 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
12397
12398 * except.c (init_exception_processing): Setup saved_in_catch.
12399 (push_eh_cleanup): Reset __eh_in_catch.
12400 (expand_start_catch_block): Set __eh_in_catch.
12401
12402 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
12403
12404 * except.c (push_eh_cleanup): Add tracking for whether or not we
12405 have an active exception object.
12406 (expand_builtin_throw): Use it to make sure a rethrow without an
12407 exception object is caught.
12408
12409 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
12410
12411 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
12412 cache.
12413
12414 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
12415
12416 * decl2.c (finish_file): Also use sentries for vars with
12417 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
12418 created).
12419
12420 * lex.c (handle_cp_pragma): Disable #pragma
12421 interface/implementation if SUPPORTS_ONE_ONLY > 1.
12422
12423 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
12424
12425 * method.c (emit_thunk): Wrap default case in
12426 temporary/permanent_allocation.
12427
12428 * method.c (make_thunk): Use DECL_ONE_ONLY.
12429 (emit_thunk): Call assemble_end_function.
12430
12431 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12432
12433 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
12434 (import_export_decl): Likewise.
12435 (finish_prevtable_vardecl): Disable vtable hack if
12436 SUPPORTS_ONE_ONLY > 1.
12437
12438 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
12439
12440 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
12441 PREDECREMENT_EXPRs take two arguments, not one.
12442
12443 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
12444
12445 * class.c (build_vtable_entry): Don't build thunks for abstract
12446 virtuals.
12447
12448 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
12449 frontend.
12450
12451 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
12452
12453 * class.c (set_rtti_entry): Use size_zero_node.
12454 (build_vtable): Likewise.
12455
12456 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
12457
12458 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
12459 (prepare_fresh_vtable): Likewise.
12460
12461 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
12462
12463 * method.c (emit_thunk): Call mark_used on the target function.
12464
12465 * call.c (build_method_call): Don't warn about pending templates.
12466
12467 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12468
12469 * decl2.c (finish_file): Fix list walking logic.
12470
12471 * typeck2.c (check_for_new_type): Only warn if -pedantic.
12472
12473 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
12474
12475 * class.c (finish_struct_1): Remove old code for
12476 dont_allow_type_definitions.
12477 * cp-tree.h: Likewise.
12478 * spew.c: Make sure cp-tree.h is included before parse.h, so the
12479 definition of flagged_type_tree is found before it is used.
12480 * lex.c: Likewise.
12481 * parse.y: Added the ftype member to the type union, and changed a
12482 number of rules to use it instead of ttype. Added calls to
12483 check_for_new_type() as appropriate.
12484 * typeck2.c (check_for_new_type): New function for checking
12485 if a newly defined type appears in the specified tree.
12486 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
12487 for check_for_new_type().
12488
12489 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
12490
12491 * decl2.c (finish_file): Only use a sentry if the decl is public.
12492
12493 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
12494 don't pass LOOKUP_ONLYCONVERTING.
12495
12496 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
12497
12498 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
12499 properly keeps track of const and volatile type modifiers.
12500
12501 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
12502
12503 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
12504 * pt.c (comp_template_args): Use it.
12505
12506 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
12507 assemble_external for artificial function decls.
12508
12509 * decl.c (cp_finish_decl): Oops.
12510
12511 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
12512
12513 * decl2.c (import_export_decl): Put static data member templates
12514 into common storage, or make them weak, depending on whether they
12515 are dynamically or statically initialized.
12516 (get_sentry): New function.
12517 (finish_file): Do import_export_decl for static data members before
12518 building the init/fini functions. Don't init/fini a variable that's
12519 EXTERNAL. Use a sentry for variables in common. Fix mismatching
12520 push/pop_temp_slots.
12521 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
12522 expand_static_init thang.
12523 * method.c (get_id_2): New function.
12524
12525 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
12526
12527 * parse.y (empty_parms): Make sure we use C++-style prototypes
12528 when we're declaring member functions.
12529
12530 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12531
12532 * Makefile.in (CONFLICTS): 16 s/r conflicts.
12533 * parse.y (self_template_type): New nonterminal.
12534
12535 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12536
12537 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
12538 name.
12539 * parse.y (base_class.1): Allow 'typename foo::bar'.
12540
12541 * lex.c (check_newline): Remove #pragma code that plays with the
12542 input stream, since we now deal with tokens. Clear nextchar when
12543 we're done.
12544 (handle_cp_pragma): Use real_yylex.
12545 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
12546 in one place.
12547
12548 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
12549
12550 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
12551
12552 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12553
12554 * parse.y: New token SELFNAME for potential constructor.
12555 * spew.c (yylex): Handle it.
12556 * lex.c (identifier_type): Produce it.
12557
12558 * parse.y (complete_type_name): In :: case, don't push class binding.
12559 (complex_type_name): Likewise.
12560
12561 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
12562
12563 * typeck.c (build_reinterpret_cast): Handle pointer to member
12564 functions.
12565
12566 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12567
12568 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
12569 pragmas.
12570 (check_newline): Put the vtable/unit/implementation/interface pragma
12571 code into handle_cp_pragma, replacing it with a call.
12572 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
12573 args. Get the next token after handling the pragma token.
12574
12575 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
12576
12577 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
12578 (convert_to_pointer_force): Likewise.
12579
12580 * init.c (build_new): Fix array new without -fcheck-new.
12581
12582 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
12583
12584 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
12585 tree.c: Lose TYPE_NESTED_NAME.
12586
12587 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
12588 as identifiers.
12589
12590 * tree.def: Add VEC_INIT_EXPR.
12591 * expr.c (cplus_expand_expr): Handle it.
12592 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
12593 the extra file-scope symbol nastiness.
12594
12595 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12596
12597 * method.c (make_thunk): Thunks are static.
12598 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
12599
12600 * decl2.c (mark_vtable_entries): Emit thunks as needed.
12601 (finish_file): Don't emit them here.
12602
12603 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
12604
12605 * rtti.c (build_dynamic_cast): Handle null pointers.
12606 (ifnonnull): New function.
12607
12608 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
12609
12610 * call.c (build_method_call): Remember the original basetype we
12611 were called with. Give an error message instead of trying
12612 (incorrectly) to call a non-static member function through a
12613 non-inherited class.
12614
12615 * search.c (expand_upcast_fixups): Mark the new fixup as
12616 DECL_ARTIFICIAL.
12617
12618 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12619
12620 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
12621
12622 * class.c (set_rtti_entry): Fix for thunks.
12623
12624 * decl2.c (import_export_decl): Still emit typeinfo fns for
12625 cv-variants of builtin types.
12626
12627 * rtti.c (expand_class_desc): Set up base_info_type_node here.
12628 (init_rtti_processing): Instead of here.
12629
12630 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
12631
12632 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
12633 (build_typeid): Only complain about taking dynamic typeid without
12634 -frtti.
12635
12636 * decl2.c: flag_rtti defaults to 1.
12637
12638 * rtti.c (get_tinfo_var): The general class case is now smaller.
12639 (init_rtti_processing): Pack the latter three fields of base_info
12640 into 32 bits.
12641
12642 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
12643
12644 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
12645
12646 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
12647
12648 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
12649 (push_memoized_context): Split out code to undefer pop_type_level to
12650 (clear_memoized_cache): here.
12651 (pop_memoized_context): We can only handle one layer of deferral of
12652 pop_type_level so clear the cache, if there was a previous level.
12653
12654 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12655
12656 * rtti.c (init_rtti_processing): Build up base_info_type_node.
12657 (expand_class_desc): Use one pointer to an array of base_info
12658 structs, passed using a CONSTRUCTOR.
12659
12660 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
12661
12662 * class.c (build_vbase_path): Remove block extern for
12663 flag_assume_nonnull_objects here.
12664 (build_vfn_ref): Split out functionality into build_vtbl_ref.
12665 (build_vtbl_ref): New routine.
12666 (build_vtable): Set up rtti info here.
12667 (add_virtual_function): Note in CLASSTYPE_RTTI the best
12668 place where we can get the rtti pointers from to avoid having to
12669 search around for a place.
12670 (finish_base_struct): Likewise.
12671 (finish_struct_1): Likewise. Never create totally new vtables
12672 with totally new vtable pointers for rtti. Disable code to layout
12673 vtable pointers better until we want to break binary
12674 compatibility.
12675 * rtti.c (build_headof_sub): New routine to convert down to a
12676 sub-object that has an rtti pointer in the vtable.
12677 (build_headof): Use it. Also, use build_vtbl_ref now to be more
12678 maintainable.
12679 (build_dynamic_cast): Make sure we have saved it, if we need to.
12680 * search.c (dfs_init_vbase_pointers): Disable code that deals with
12681 a more efficient vtable layout, enable later.
12682 * call.c (flag_assume_nonnull_objects): Moved declaration to
12683 * cp-tree.h: here. Declare build_vtbl_ref.
12684 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
12685 function calls that want a tree.
12686
12687 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12688
12689 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
12690 other X subobjects in the most derived type. Ack.
12691
12692 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
12693 get_typeid will do it for us.
12694 (get_typeid_1): Break out call-building for expand_*_desc to use.
12695 (get_typeid): Call it.
12696 (expand_*_desc): Likewise.
12697 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
12698 and void *.
12699 (init_decl_processing): Lose builtin_type_tdescs lossage.
12700 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
12701
12702 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
12703
12704 * pt.c (tsubst): When calling set_nested_typename, use
12705 TYPE_NESTED_NAME (current_class_type) instead of
12706 current_class_name.
12707
12708 * decl.c (pushdecl): Likewise.
12709 (pushdecl_class_level): Likewise.
12710 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
12711 set_nested_typename.
12712
12713 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
12714
12715 * rtti.c (synthesize_tinfo_fn): Handle arrays.
12716
12717 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
12718
12719 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
12720
12721 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
12722 (init_rtti_processing): Lose bad_cast_type.
12723 (build_dynamic_cast): Use throw_bad_cast.
12724
12725 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
12726
12727 * decl2.c (finish_file): Don't synthesize artificial functions
12728 that are external and not inline.
12729
12730 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
12731
12732 * decl2.c (finish_file): Handle having new inlines added to
12733 saved_inlines by synthesis.
12734
12735 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
12736
12737 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12738
12739 RTTI rewrite to initialize nodes as needed, not require that
12740 users #include <typeinfo>, complete functionality and reduce wasted
12741 space.
12742 * rtti.c (init_rtti_processing): New fn.
12743 (build_typeid): The vtable entry is now a function.
12744 (get_tinfo_var): New fn.
12745 (get_tinfo_fn): Likewise.
12746 (get_typeid): Use it.
12747 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
12748 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
12749 points __rtti_*.
12750 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
12751 (synthesize_tinfo_fn): New fn.
12752 * method.c (build_t_desc_overload): Lose.
12753 (build_overload_with_type): More generic.
12754 * decl.c (init_decl_processing): Call init_rtti_processing.
12755 * class.c (set_rtti_entry): Use get_tinfo_fn.
12756 * decl2.c (mark_vtable_entries): Mark the rtti function.
12757 (finish_prevtable_vardecl): Don't build_t_desc.
12758 (import_export_decl): Handle tinfo functions.
12759 (finish_file): Likewise.
12760 * typeck.c (inline_conversion): New fn.
12761 (build_function_call_real): Use it.
12762 * cp-tree.h: Add decls.
12763
12764 * method.c (hack_identifier): Also convert component_refs from
12765 references.
12766
12767 * lex.c (cons_up_default_function): Use the type, not the name, in
12768 declspecs.
12769
12770 * decl2.c (import_export_vtable): Fix weak vtables.
12771
12772 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
12773
12774 * search.c (get_base_distance_recursive): Fix access checks for
12775 protected bases.
12776
12777 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12778
12779 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
12780 cp-tree.h.
12781 (convert_harshness): Add prototypes wrapped by PROTO.
12782 * decl2.c (grok_function_init): Likewise.
12783 (do_toplevel_using_decl): Change to void return type.
12784 * class.c (build_vtable_entry): Remove decl of make_thunk.
12785 (merge_overrides): Fix order of arg definitions.
12786 (finish_vtbls): Likewise.
12787 (fixup_vtable_deltas): Likewise.
12788 (modify_all_direct_vtables): Likewise.
12789 (modify_all_indirect_vtables): Likewise.
12790 * search.c (get_base_distance_recursive): Likewise.
12791 (get_abstract_virtuals_1): Likewise.
12792 (fixup_virtual_upcast_offsets): Likewise.
12793 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
12794 * init.c (perform_member_init): Fix order of arg definitions.
12795 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
12796 * cp-tree.h (make_thunk): Add decl.
12797 (overload_template_name, push_template_decl): Add decls.
12798 (do_toplevel_using_decl): Change to void return type.
12799 (vec_binfo_member): Add decl.
12800
12801 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12802
12803 * typeck.c (mark_addressable, convert_for_assignment,
12804 convert_for_initialization, pointer_int_sum, pointer_diff,
12805 unary_complex_lvalue): Add prototypes wrapped by PROTO.
12806 (convert_sequence): #if 0 fn decl, since definition also is.
12807
12808 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
12809
12810 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
12811 cast to pointer types for type searching.
12812
12813 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12814
12815 * typeck.c (get_delta_difference): Use cp_error, not error, in the
12816 case where BINFO == 0.
12817
12818 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
12819
12820 * call.c (build_method_call): Fix wording of error messages so
12821 constructors come out right.
12822
12823 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
12824
12825 * decl.c (push_overloaded_decl): Don't warn about hidden
12826 constructors when both the type and the function are declared
12827 in a system header file.
12828
12829 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
12830
12831 * class.c (finish_struct_1): Propagate the TYPE_PACKED
12832 flag for the type to the type's fields.
12833
12834 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12835
12836 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
12837
12838 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
12839
12840 * class.c (base_info, finish_base_struct): Replace
12841 needs_virtual_dtor with base_has_virtual.
12842
12843 (finish_struct_1): Remove the old code that tried to make default
12844 destructors virtual. Use base_has_virtual when checking if we need
12845 to add a vtable entry for the rtti code.
12846
12847 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12848
12849 * pt.c (push_template_decl): Complain about template decl with
12850 inappropriate declaration.
12851
12852 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
12853
12854 * typeck.c (build_x_unary_op): Remove bogus check for taking
12855 the address of a member function.
12856
12857 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12858
12859 * parse.y (constructor_declarator): Only push the class if
12860 we are not already in the class.
12861
12862 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
12863
12864 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
12865 Add additional argument to INIT_CUMULATIVE_ARGS.
12866
12867 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
12868
12869 * decl.c (shadow_tag): Fix error about anon union with methods.
12870
12871 * parse.y (self_reference): Only generate a self-reference if this
12872 is a non-template class.
12873 (opt.component_decl_list): Only use it if it was generated.
12874
12875 * parse.y (component_decl_1): Use constructor_declarator.
12876 (fn.def2): Likewise.
12877 (notype_component_declarator0): Likewise.
12878
12879 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
12880
12881 * typeck.c (build_x_unary_op): Add checks for taking the address
12882 of a TARGET_EXPR or of a member function, and give appropriate
12883 warnings.
12884
12885 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
12886
12887 * pt.c (process_template_parm): Allow template type parms to be
12888 used as types for template const parms.
12889
12890 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
12891
12892 * init.c (expand_vec_init): Ensure the eh cleanups are on the
12893 function_obstack.
12894
12895 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12896
12897 * decl.c (lookup_name_real): Be even more picky about the
12898 ambiguous lookup warning.
12899 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
12900 * parse.y (constructor_declarator): Rather than here.
12901
12902 * parse.y (constructor_declarator): New nonterminal.
12903 (fn.def1): Use it.
12904 (explicit_instantiation): Likewise.
12905
12906 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12907
12908 Add implicit declaration of class name at class scope.
12909 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
12910 * parse.y (self_reference): New nonterminal.
12911 (opt.component_decl_list): Use it.
12912 (fn.def1): Add nested_name_specifier type_name cases.
12913 * class.c (build_self_reference): New function.
12914 (finish_struct): Handle access_default later, move self-reference
12915 decl to the end.
12916 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
12917 * cp-tree.h: Adjust.
12918
12919 * pt.c (do_function_instantiation): Separate handling of member
12920 functions and non-member functions properly.
12921
12922 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12923
12924 * pt.c (process_template_parm): Improve error for 'volatile class K'.
12925
12926 * class.c (finish_struct_1): Check the right slot for destructors.
12927
12928 * decl.c (start_enum): Complain about enum templates.
12929
12930 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
12931
12932 * init.c (resolve_offset_ref): Offset pointers to member data by one.
12933 * typeck.c (unary_complex_lvalue): Likewise.
12934
12935 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
12936
12937 * typeck.c (c_expand_return): Check for a returned local
12938 array name, similar to the check for an ADDR_EXPR.
12939
12940 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12941
12942 * decl.c (cp_finish_decl): Don't build cleanups for static
12943 variables here.
12944
12945 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
12946
12947 * typeck.c (build_modify_expr): Fix error messages to be more
12948 accurate.
12949 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
12950 assignment operators.
12951 * error.c (assop_as_string): Likewise. Add support for `%Q' for
12952 assignment operators.
12953
12954 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12955
12956 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
12957 give an error if initialized. Pedwarn about nested type with the
12958 same name as its enclosing class.
12959
12960 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
12961
12962 * typeck.c (require_complete_type): Be sure to instantiate the
12963 MAIN_VARIANT of the type.
12964
12965 * decl2.c (finish_file): Instantiate pending templates before
12966 processing static constructors and destructors.
12967
12968 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
12969 unless at_eof.
12970
12971 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
12972
12973 * decl2.c (delete_sanity): If error_mark_node is passed
12974 in as an expression, quit while we're ahead.
12975
12976 * decl.c (grokdeclarator): Give an error message if `friend'
12977 is combined with any storage class specifiers.
12978
12979 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
12980
12981 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
12982 definition of nonexistent nested type.
12983
12984 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
12985 not to say 'typedef'.
12986
12987 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12988
12989 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
12990 * search.c (dfs_walk, dfs_init_vbase_pointers,
12991 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
12992 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
12993
12994 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
12995
12996 * except.c (build_throw): Support minimal parse.
12997 * pt.c (tsubst_copy): Support THROW_EXPR.
12998 * decl2.c (build_expr_from_tree): Likewise.
12999
13000 * pt.c (mangle_class_name_for_template): Always allocate
13001 scratch_firstobj.
13002
13003 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
13004
13005 * cvt.c (cp_convert_to_pointer): Give an appropriate error
13006 when trying to cast from an incomplete type.
13007
13008 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13009
13010 * pt.c (instantiate_class_template): Don't bother setting up
13011 CLASSTYPE_TAGS explicitly, as the nested types will add
13012 themselves.
13013
13014 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
13015
13016 * decl.c (shadow_tag): Remove old error check for usage of
13017 an enum without a previous declaration.
13018 (xref_tag): Add error message about usage of enums without a
13019 previous declaration.
13020
13021 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13022
13023 * lex.c (do_identifier): Only do name consistency check if we're
13024 parsing.
13025
13026 * pt.c (push_template_decl): Don't crash if we get a member defn
13027 that doesn't match.
13028
13029 * decl.c (xref_tag_from_type): New function to do an xref without
13030 always having to figure out code_type_node.
13031 * cp-tree.h: Declare it.
13032 * pt.c (instantiate_class_template): Use it for friend classes.
13033 (lookup_template_class): Use it.
13034
13035 * typeck2.c (build_functional_cast): Pull out a single parm before
13036 passing it to build_c_cast.
13037
13038 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
13039
13040 * expr.c (do_case): Give an error message if a pointer is
13041 given as a case value.
13042
13043 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
13044
13045 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
13046 an overload list.
13047
13048 * lex.c (cons_up_default_function): Really, now, interface hackery
13049 does not apply to synthesized methods.
13050
13051 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
13052
13053 * call.c (build_method_call): Ctors and dtors now have special names
13054 with respect to lookups.
13055 * class.c (add_method): Likewise.
13056 (grow_method): Likewise.
13057 (finish_struct_methods): Likewise.
13058 (warn_hidden): Likewise.
13059 (finish_struct_1): Likewise.
13060 * cvt.c (convert_to_reference): Likewise.
13061 (convert_to_aggr): Likewise.
13062 (cp_convert): Likewise.
13063 * decl2.c (check_classfn): Likewise.
13064 * init.c (expand_member_init): Likewise.
13065 (expand_default_init): Likewise.
13066 (expand_aggr_init_1): Likewise.
13067 (build_offset_ref): Likewise.
13068 (build_new): Likewise.
13069 (build_delete): Likewise.
13070 * lex.c (do_inline_function_hair): Likewise.
13071 * search.c (lookup_field_1): Likewise.
13072 (lookup_fnfields_here): Likewise.
13073 (lookup_field): Likewise.
13074 (lookup_fnfields): Likewise.
13075 (get_virtual_destructor): Likewise.
13076 (dfs_debug_mark): Likewise.
13077 (dfs_pushdecls): Likewise.
13078 (dfs_compress_decls): Likewise.
13079 * tree.c (layout_basetypes): Likewise.
13080 * typeck.c (build_component_ref): Likewise.
13081 (build_x_function_call): Likewise.
13082 (build_modify_expr): Likewise.
13083 (convert_for_initialization): Likewise.
13084 (build_functional_cast): Likewise.
13085 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
13086 (CTOR_NAME): New.
13087 (DTOR_NAME): New.
13088 * decl.c (ctor_identifier): New.
13089 (dtor_identifier): New.
13090 (init_decl_processing): Set them.
13091
13092 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
13093
13094 * typeck.c (build_component_ref): Don't get confused by fields whose
13095 context has no type name, like pointer to member functions.
13096
13097 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
13098
13099 * decl.c (grokdeclarator): Handle typedef without declarator.
13100
13101 * pt.c (tsubst): Handle SCOPE_REF in declarator.
13102
13103 * parse.y (bad_parm): Catch another case of missing `typename'.
13104
13105 * lex.c (yyprint): Handle TYPE_DECLs.
13106
13107 * decl.c (start_function): Don't try to be clever.
13108
13109 * lex.c: Lose compiler_error_with_decl.
13110 * typeck2.c: Lose error_with_aggr_type.
13111 (incomplete_type_error): Use cp_* instead of old functions.
13112 (readonly_error): Likewise.
13113 * typeck.c (convert_arguments): Likewise.
13114 * search.c (lookup_nested_field): Likewise.
13115 * method.c (make_thunk): Likewise.
13116 * decl.c (grokparms): Likewise.
13117 * cp-tree.h: Update.
13118
13119 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
13120 and value.
13121
13122 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
13123
13124 * method.c (build_opfncall): When deleting a pointer to an
13125 array, build a new pointer to the tree past any ARRAY_TYPE
13126 nodes.
13127
13128 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13129
13130 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
13131
13132 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
13133
13134 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
13135 and ! DECL_INLINE.
13136
13137 * decl.c (finish_function): Don't set nested based on
13138 hack_decl_function_context.
13139 * parse.y (function_try_block): Check for nested function.
13140 (pending_inlines): Likewise.
13141
13142 * decl2.c (build_expr_from_tree): If a unary op already has a
13143 type, just return it.
13144
13145 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
13146
13147 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
13148 (finish_file): Check the return value of walk_vtables.
13149 (finish_prevtable_vardecl): Return int.
13150 (finish_vtable_vardecl): Likewise.
13151 (prune_vtable_vardecl): Likewise.
13152 * lex.c (set_vardecl_interface_info): Likewise.
13153 * cp-tree.h: Adjust return types.
13154
13155 * class.c (delete_duplicate_fields_1): Don't complain about
13156 duplicate nested types if they're the same type.
13157 (finish_struct): Remove check for duplicate.
13158 * decl2.c (grokfield): Don't check for typedef of anonymous type.
13159
13160 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13161
13162 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
13163
13164 * decl.c (grokdeclarator): Lose special handling of class-level
13165 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
13166 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
13167
13168 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
13169
13170 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
13171
13172 * search.c (compute_access): Fix handling of anonymous union
13173 members.
13174 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
13175 from anonymous unions to their members.
13176
13177 * typeck.c (build_x_function_call): For static member functions,
13178 hand off to build_member_call.
13179
13180 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
13181
13182 * typeck.c (build_component_ref): Handle OFFSET_REFs.
13183
13184 * init.c (expand_vec_init): Fix init == 0 case.
13185
13186 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13187
13188 * init.c (build_new): Pedwarn about init and array new.
13189 (expand_vec_init): Handle lists, use convert_for_initialization.
13190
13191 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
13192 when converting to an aggregate type.
13193 * cvt.c (cp_convert): Pass it through.
13194
13195 * typeck.c (build_conditional_expr): Handle user-defined
13196 conversions to slightly different types.
13197
13198 * decl.c (grokdeclarator): Force an array type in a parm to be
13199 permanent.
13200
13201 * decl2.c (do_using_directive): Sorry.
13202 (do_namespace_alias): Likewise.
13203 * lex.c (real_yylex): Warn about using the `namespace' keyword.
13204
13205 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13206
13207 * parse.y (datadef): Move call to note_list_got_semicolon up.
13208
13209 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
13210
13211 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
13212
13213 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
13214
13215 * decl.c (cp_finish_decl): The exception regions have to be
13216 nested, not overlapping. We start the exception region for a
13217 decl, after it has been fully built, and all temporaries for it
13218 have been cleaned up.
13219
13220 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
13221
13222 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
13223
13224 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13225
13226 * tree.def: Add RETURN_INIT.
13227 * pt.c (instantiate_decl): Handle RETURN_INIT.
13228 * decl.c (store_return_init): Handle minimal_parse_mode.
13229
13230 * tree.c (cp_build_type_variant): Just return an error_mark_node.
13231 * decl.c (make_typename_type): Don't try to get the file and line
13232 of an identifier.
13233 * typeck.c (comptypes): Handle TYPENAME_TYPE.
13234
13235 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
13236
13237 * decl.c (poplevel): Make sure we clear out and restore old local
13238 non-VAR_DECL values by default when they go out of scope.
13239
13240 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
13241
13242 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
13243 referring to addresses of variables and functions.
13244
13245 * error.c (dump_expr): Support SIZEOF_EXPR.
13246
13247 * init.c (do_friend): Use the return value of check_classfn.
13248
13249 * typeck.c (convert_arguments): Call complete_type.
13250
13251 * method.c (hack_identifier): After giving an error, set value to
13252 error_mark_node.
13253
13254 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
13255
13256 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
13257 lossage for local classes.
13258 * cp-tree.h: Declare it.
13259 * decl.c (lookup_name_real): Evil, painful hack for local classes.
13260 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
13261 Use hack_decl_function_context.
13262 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
13263 (start_function): Use hack_decl_function_context.
13264 (finish_function): Likewise.
13265 * method.c (synthesize_method): Likewise.
13266 * lex.c (process_next_inline): Likewise.
13267 (do_pending_inlines): Likewise.
13268 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
13269 done with it.
13270
13271 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
13272
13273 * sig.c (build_signature_pointer_or_reference_type): Align
13274 signature pointers/references on 8-byte boundaries so they can be
13275 grabbed 2 words at a time on a Sparc.
13276
13277 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
13278
13279 * method.c (hack_identifier): Requiring a static chain is now a
13280 hard error.
13281 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
13282 functions.
13283
13284 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13285
13286 * init.c (build_offset_ref): Call complete_type.
13287
13288 * decl.c (pop_from_top_level): Always pop previous_class_type.
13289
13290 * parse.y: Handle multiple decls in a for-init-statement.
13291 * pt.c (tsubst_expr): Likewise.
13292
13293 * pt.c (tsubst): Use tsubst_expr for the second operand of an
13294 ARRAY_REF.
13295
13296 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
13297 (poplevel_class): Set it here.
13298 (pop_from_top_level): Pop it here if we're returning to class scope.
13299 * class.c (pushclass): Don't set it here.
13300
13301 * decl.c (maybe_push_to_top_level): Save current_template_parms,
13302 and clear it if !pseudo.
13303 (pop_from_top_level): Restore it.
13304
13305 * decl2.c (finish_file): Push the dummy each time we walk the list
13306 of vtables.
13307
13308 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
13309 something for CAST_EXPR.
13310
13311 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13312
13313 * cvt.c (cp_convert): Warn about implicit conversion of the
13314 address of a function to bool, as it is always true.
13315
13316 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13317
13318 * typeck.c (c_expand_return): Fix warning for local externs returned.
13319
13320 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
13321
13322 * tree.c (mapcar): Propagate const and volatile properly.
13323
13324 * typeck.c (complete_type): Be sure to instantiate the
13325 MAIN_VARIANT of the type.
13326
13327 * method.c (synthesize_method): Class interface hackery does not
13328 apply to synthesized methods.
13329
13330 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
13331
13332 * pt.c (comp_template_args): Use comptypes rather than just
13333 checking for TEMPLATE_TYPE_PARM equivalence.
13334
13335 * typeck.c (build_x_function_call): Call complete_type before
13336 checking TYPE_OVERLOADS_CALL_EXPR.
13337
13338 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
13339
13340 * g++.c (main): Check also for new define ALT_LIBM.
13341
13342 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13343
13344 * pt.c (instantiate_class_template): If we don't have a pattern
13345 yet, that's OK.
13346 (coerce_template_parms): If we see a local class, bail.
13347
13348 * decl.c (grok_reference_init): Make sure there's a type before
13349 checking its code.
13350
13351 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
13352 (push_template_decl): Likewise.
13353
13354 * parse.y (named_class_head): Set
13355 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
13356
13357 * decl.c (xref_tag): Diagnose redeclaration of template
13358 type-parameter name.
13359
13360 * error.c (dump_type): Handle anonymous template type parms.
13361
13362 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
13363 TYPE_STUB_DECL.
13364 (coerce_template_parms): Likewise.
13365
13366 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
13367
13368 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
13369 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
13370
13371 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13372
13373 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
13374 before trying to get its STUB_DECL.
13375 (coerce_template_parms): Likewise.
13376
13377 * parse.y (template_type_parm): If they didn't use 'class',
13378 pretend they did after giving an error.
13379
13380 * pt.c (coerce_template_parms): Diagnose use of local class.
13381
13382 * decl.c (grok_reference_init): Use instantiate_type.
13383
13384 * error.c (dump_expr): Handle TEMPLATE_DECLs.
13385
13386 * parse.y (named_class_head): Diagnose mismatching types and tags.
13387
13388 * decl.c (pushdecl): Type decls and class templates clash with
13389 artificial type decls, not hide them.
13390
13391 * decl.c (redeclaration_error_message): Diagnose redefinition of
13392 templates properly.
13393 (duplicate_decls): Diagnose disallowed overloads for template
13394 functions, too.
13395
13396 * decl.c (start_decl): Call complete_type before checking for a
13397 destructor.
13398
13399 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
13400
13401 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
13402
13403 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13404
13405 * decl.c (grok_op_properties): Don't check for operator++(int) in
13406 a template.
13407
13408 * tree.c (perm_manip): Return a copy of variable and function
13409 decls with external linkage.
13410
13411 * tree.def: Change some of the min tree codes to type "1".
13412 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
13413 * method.c (build_overload_int): Emit something arbitrary for
13414 anything but an INTEGER_CST if we're in a template.
13415
13416 * decl.c (cp_finish_decl): Call complete_type before deciding
13417 whether or not to lay out the decl.
13418
13419 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
13420
13421 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13422
13423 * typeck2.c (build_x_arrow): Call complete_type.
13424
13425 * pt.c (add_pending_template): Broken out.
13426 (lookup_template_class): If -fexternal-templates, call it for all
13427 the methods of implemented types.
13428 (instantiate_class_template): Instead of instantiating them here.
13429 (instantiate_decl): Handle -fexternal-templates earlier.
13430
13431 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13432
13433 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
13434 memoized lookup stuff inside GATHER_STATISTICS.
13435
13436 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13437
13438 * decl.c (start_decl): Complain about array of incomplete type
13439 here.
13440 (grokdeclarator): Not here.
13441
13442 * parse.y (template_parm): Expand full_parm inline so we can set
13443 the rule's precedence.
13444
13445 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
13446 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
13447 * decl2.c (grokbitfield): Don't check for integer constant here.
13448 * class.c (finish_struct_1): Check here.
13449
13450 * decl.c (define_label): Make the min decl go on permanent_obstack.
13451
13452 * pt.c (unify): Don't handle CONST_DECLs.
13453 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
13454 (tsubst_copy): Likewise.
13455
13456 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
13457 CONST_DECL for a template parm.
13458
13459 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
13460
13461 * decl.c (grokdeclarator): Complain about array of incomplete type
13462 here.
13463 (start_decl_1): Not here.
13464
13465 * pt.c (tsubst): Handle pointer-to-function declarators.
13466
13467 * method.c (hack_identifier): If pedantic, diagnose local class
13468 methods that require a static chain.
13469
13470 * decl.c (grok_op_properties): No longer static.
13471 * cp-tree.h: Declare it.
13472 * pt.c (tsubst): Call it for operators.
13473 Use tsubst_copy for TREE_VECs.
13474
13475 * parse.y (template_arg): The expr has precedence like '>'.
13476
13477 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
13478
13479 * pt.c (coerce_template_parms): Don't coerce an expression using
13480 template parms.
13481 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
13482 (tsubst): Don't use build_index_2_type if the max_value uses template
13483 parms.
13484 * method.c (build_overload_int): Emit something arbitrary for an
13485 expression using template parms.
13486
13487 * parse.y (template_close_bracket): New non-terminal to catch use
13488 of '>>' instead of '> >' in template class names.
13489 (template_type): Use it.
13490 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
13491
13492 * tree.def: Add CAST_EXPR.
13493 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
13494 CONVERT_EXPR for minimal_parse_mode.
13495 * typeck.c (build_c_cast): Likewise.
13496 * pt.c (tsubst_copy): Likewise.
13497 * decl2.c (build_expr_from_tree): Likewise.
13498 * error.c (dump_expr): Likewise.
13499
13500 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13501
13502 * except.c (SetTerminate, SetUnexpected): Put back global vars.
13503 (init_exception_processing): Put back decl/init of
13504 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
13505 fns from libstdc++.
13506
13507 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
13508 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
13509 Delete unused fns.
13510 * cp-tree.h (declare_uninstantiated_type_level,
13511 uninstantiated_type_level_p): Delete prototypes.
13512
13513 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
13514
13515 * pt.c (tsubst_expr): Add default return.
13516
13517 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13518
13519 * error.c (fndecl_as_string): Delete unused arg CNAME.
13520 * sig.c (build_signature_table_constructor,
13521 build_signature_method_call): Fix calls.
13522
13523 * class.c (the_null_vtable_entry): Delete var definition.
13524 (init_class_processing): Delete tree the_null_vtable_entry init.
13525 * decl.c (no_print_{functions, builtins}): Declare as static.
13526 (__tp_desc_type_node): #if 0 var definition.
13527 (init_type_desc): #if 0 init of __tp_desc_type_node.
13528 (vb_off_identifier): Move var decl into init_decl_processing.
13529 (current_function_assigns_this): Declare as static.
13530 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
13531 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
13532 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
13533 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
13534 * init.c (BI_header_type, BI_header_size): Declare as static.
13535 * pt.c (template_classes): Delete unused var.
13536 (add_pending_template): Delete decl for non-existent fn.
13537 (lookup_template_class): Delete vars CODE and TAG_CODE.
13538 (instantiate_template): Delete unused var TARGS.
13539 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
13540 Delete decls.
13541 (__tp_desc_type_node): #if 0 var decl.
13542 (fndecl_as_string): Fix prototype.
13543
13544 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
13545
13546 * tree.def: Add GOTO_STMT.
13547 * pt.c (tsubst_expr): Support goto and labels.
13548 * decl.c (define_label): Support minimal parsing.
13549 * parse.y (simple_stmt): Likewise.
13550
13551 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13552
13553 * xref.c (GNU_xref_member): Only define/set var I if
13554 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
13555 used.
13556 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
13557 (GNU_xref_end): Fix call.
13558 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
13559 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
13560
13561 * tree.c (build_exception_variant): Delete unused vars I, A, T,
13562 T2, and CNAME.
13563 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
13564 (mapcar): Delete unused var CODE.
13565 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
13566 (break_out_cleanups): Fix call.
13567 (bot_manip): Likewise.
13568 * call.c (build_method_call): Likewise.
13569 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
13570 Likewise.
13571 * typeck.c (unary_complex_lvalue, build_modify_expr,
13572 convert_for_initialization): Likewise.
13573 * typeck2.c (build_functional_cast): Likewise.
13574 * cp-tree.h (build_cplus_new): Fix prototype.
13575
13576 * repo.c (open_repo_file): Delete unused var Q.
13577 (repo_compile_flags, repo_template_declared,
13578 repo_template_defined, repo_class_defined, repo_inline_used,
13579 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
13580 (repo_get_id, repo_vtable_used): Declare as static.
13581 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
13582 prototypes.
13583
13584 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
13585
13586 * parse.y (pending_inlines): Add function_try_block case.
13587
13588 * pt.c (unify): Fix for template const parms.
13589
13590 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13591
13592 * lex.c (extract_interface_info): Delete forward decl.
13593 (default_copy_constructor_body, default_assign_ref_body): Delete
13594 decls for non-existent functions.
13595 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
13596 (init_lex): Delete setting them.
13597 (cons_up_default_function): Delete unused vars FUNC_BUF,
13598 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
13599 #if 0'd synth code.
13600 (toplevel, expression_obstack): Delete unused extern decls.
13601 (tree_node_kind): Delete unused enum.
13602 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
13603 GATHER_STATISTICS.
13604 (tree_node_kind_names): Delete unused extern decl.
13605 (synth_obstack): Delete unused var.
13606 (init_lex): Don't set it.
13607 (init_parse): Add decl before use.
13608 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
13609 (current_unit_{name, language}): Delete unused vars.
13610 (check_newline): Don't bother setting them, just accept the #pragma.
13611 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
13612 (current_unit_{name, language}): Delete decls.
13613
13614 * search.c: Wrap all of the memoized functions, macros, and
13615 variables inside #ifdef GATHER_STATISTICS.
13616 (lookup_field, lookup_fnfields): Likewise.
13617 (init_search_processing): Likewise.
13618 (reinit_search_statistics): Wrap whole function.
13619 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
13620
13621 * decl.c (finish_function): Only call pop_memoized_context if
13622 GATHER_STATISTICS is defined.
13623 (start_function): Likewise for push_memoized_context.
13624 * class.c (pushclass, popclass): Likewise.
13625
13626 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
13627 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
13628
13629 * cvt.c (cp_convert): Delete unused local var FORM.
13630 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
13631 prototypes.
13632
13633 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13634
13635 * pt.c (do_poplevel): Oops; really return what we get from
13636 poplevel this time.
13637
13638 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13639
13640 * cp-tree.h (is_aggr_type): Add prototype.
13641
13642 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
13643 * method.c ({push,pop}_cp_function_context): Delete decls.
13644 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
13645 (SetUnexpected, SetTerminate): Delete unused vars.
13646 (init_exception_processing): Don't set SetUnexpected or
13647 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
13648 (output_exception_table_entry): Delete unused array LABEL.
13649 (expand_internal_throw): Delete unused var PARAMS.
13650 (expand_start_catch_block): Delete unused var CLEANUP.
13651 (emit_exception_table): Delete unused var EH_NODE_DECL.
13652 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
13653 GOTO_UNWIND_AND_THROW. Don't set them.
13654 (end_eh_unwinder): Add top decl.
13655 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
13656 (exception_section, push_rtl_perm, do_function_call,
13657 lang_interim_eh, push_eh_cleanup, eh_outer_context,
13658 expand_end_eh_spec, end_eh_unwinder): Declare as static.
13659 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
13660 throw_used): Likewise.
13661 * cp-tree.h (expand_end_eh_spec): Delete prototype.
13662
13663 * search.c (dfs_mark, dfs_mark_vtable_path,
13664 dfs_unmark_vtable_path, dfs_mark_new_vtable,
13665 dfs_unmark_new_vtable, dfs_clear_search_slot,
13666 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
13667 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
13668 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
13669 functions.
13670 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
13671 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
13672 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
13673 Only define #ifdef GATHER_STATISTICS.
13674 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
13675 is defined.
13676 (vbase_decl): Delete var definition.
13677 (init_search): Delete old decl.
13678 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
13679 never actually used.
13680 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
13681 (get_base_distance_recursive): Delete unused fourth arg
13682 BASETYPE_PATH. Fix call .
13683 (get_base_distance): Fix call.
13684 (push_class_decls): Delete unused var ID.
13685 (make_memoized_table_entry): Declare as static.
13686 (breadth_first_search): Declare as static.
13687 (tree_has_any_destructor_p): Declare as static.
13688 (pop_class_decls): Delete unused arg pop_class_decls.
13689 * class.c (popclass): Fix call to pop_class_decls.
13690 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
13691 tree_has_any_destructor_p): Delete prototypes.
13692
13693 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
13694 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
13695 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
13696 (build_user_desc): Delete unused var T.
13697 (build_class_desc): Delete unused vars T and OFF.
13698 (build_t_desc): Delete unused var NAME_STRING.
13699 (build_headof): Make static.
13700 (get_bad_cast_node): Likewise.
13701 (get_def_to_follow): Likewise.
13702 * cp-tree.h (init_type_desc): Add prototype.
13703 (build_headof): Remove prototype.
13704
13705 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13706
13707 * pt.c (tsubst): Only look for matching decls at file scope for
13708 non-member functions.
13709
13710 * call.c (build_scoped_method_call): Handle scoped destructor
13711 calls in templates.
13712
13713 * decl.c (*_top_level): Also save previous_class_values.
13714
13715 * pt.c (tsubst_expr): Support do {} while loops.
13716 * parse.y (simple_stmt): Likewise.
13717 * tree.def: Likewise.
13718
13719 * method.c (build_overload_identifier): For a class nested in a
13720 template class, don't mangle in the template parms from our
13721 context.
13722
13723 * lex.c, cp-tree.h: Remove support for template instantiations in
13724 the pending_inlines code.
13725 * pt.c: Remove dead functions and unused arguments.
13726 (uses_template_parms): TYPENAME_TYPEs always use template parms.
13727 * parse.y: Stop passing anything to end_template_decl.
13728 * tree.c (print_lang_statistics): Only print tinst info #ifdef
13729 GATHER_STATISTICS.
13730
13731 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13732
13733 * init.c (expand_recursive_init{,_1}): Delete decls.
13734 (sort_member_init): Delete unused var INIT.
13735 (emit_base_init): Delete unused var X.
13736 (build_offset_ref): Delete unused var CNAME.
13737 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
13738 (emit_base_init): Delete unused local var BASE. Delete extern
13739 decl of IN_CHARGE_IDENTIFIER.
13740 (build_delete): Delete unused local var VIRTUAL_SIZE.
13741
13742 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
13743 (build_delete): Fix call.
13744 * decl2.c (delete_sanity): Likewise.
13745 * cp-tree.h (build_vec_delete): Update prototype.
13746
13747 * typeck.c (common_base_type): Delete unused var TMP.
13748 (build_binary_op): Delete local var ARGS_SAVE.
13749 (build_array_ref): Delete unused var ITYPE.
13750 (c_expand_return): Delete unused var USE_TEMP.
13751
13752 * typeck.c (compexcepttypes): Delete unused arg STRICT.
13753 (comptypes): Fix calls.
13754 * decl.c (duplicate_decls): Likewise.
13755 * cp-tree.h (compexcepttypes): Delete extra arg.
13756
13757 * decl2.c (check_classfn): Delete unused second arg CNAME.
13758 * decl.c (start_decl, grokfndecl): Fix calls.
13759 * init.c (do_friend): Likewise.
13760 * cp-tree.h (check_classfn): Update prototype.
13761
13762 * cp-tree.h (signature_error, import_export_vtable,
13763 append_signature_fields, id_in_current_class, mark_used,
13764 copy_assignment_arg_p): Add decls.
13765 * decl2.c (mark_used): Delete decl.
13766
13767 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
13768
13769 * class.c (get_vtable_entry): Diable unused function.
13770 (doing_hard_virtuals): Delete unused static global var.
13771 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
13772 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
13773 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
13774 (modify_one_vtable): Delete unused var OLD_RTTI.
13775 (finish_struct_anon): Delete unused vars OFFSET and X.
13776 (finish_struct_bits): Delete unused var METHOD_VEC.
13777 (get_basefndecls): Delete unused var PURPOSE. Delete unused
13778 for-scope local variable METHODS.
13779
13780 * call.c (user_harshness): Delete unused/unneeded arg PARM.
13781 (ideal_candidate): Delete unused args BASETYPE and PARMS.
13782 (build_method_call): Delete unused args passed into ideal_candidate.
13783 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
13784 * cp-tree.h (synthesize_method): Add decl.
13785
13786 * decl.c (note_level_for_for): Give void return type.
13787 (pushdecl_nonclass_level): Likewise.
13788 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
13789 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
13790 (suspend_binding_level): Delete unused var LEVEL.
13791 (duplicate_decls): Delete unused var CTYPE.
13792 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
13793 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
13794 PTR_ENDLINK.
13795 (grokdeclarator): Delete unused var C.
13796 (grokdeclarator): Delete unused var SIZE_VARIES.
13797 (grokparms): Delete unused var SAW_VOID.
13798 (start_function): Delete unused var OLDDECL.
13799 (cplus_expand_expr_stmt): Delete unused var
13800 REMOVE_IMPLICIT_IMMEDIATELY.
13801
13802 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
13803
13804 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
13805
13806 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13807
13808 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
13809 (build_min_nt): Likewise.
13810 * pt.c (do_pushlevel): Emit line note.
13811 (do_poplevel): Return what we get from poplevel.
13812 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
13813 * parse.y: Use do_pushlevel and do_poplevel.
13814 * cp-tree.h: Declare do_poplevel.
13815
13816 * cp-tree.h: Declare at_eof.
13817 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
13818 * decl2.c (import_export_decl): Renamed from import_export_inline.
13819 (finish_file): Call it to do interface handling for statics.
13820 * pt.c (tsubst_copy): Call mark_used on variables and functions
13821 used here.
13822
13823 * decl2.c (finish_file): Don't emit statics we can't generate.
13824 * pt.c (instantiate_decl): Don't set interface on instantiations
13825 we can't generate.
13826
13827 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
13828 * tree.c (print_lang_statistics): Print max template depth.
13829 * pt.c (push_tinst_level): Dump entire instantiation context.
13830 (instantiate_class_template): Use it and pop_tinst_level.
13831 (instantiate_decl): Likewise.
13832
13833 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
13834 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
13835
13836 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13837
13838 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
13839 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
13840 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
13841 the new template implementation.
13842
13843 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13844
13845 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
13846
13847 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
13848
13849 * decl.c (cp_finish_decl): Delay emitting the debug information for
13850 a typedef that has been installed as the canonical typedef, if the
13851 type has not yet been defined.
13852
13853 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
13854
13855 * decl2.c (grokfield): Still call pop_nested_class for access decls.
13856
13857 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13858
13859 * decl.c (lookup_label): Call label_rtx.
13860
13861 * decl.c (make_binding_level): New function.
13862 (pushlevel, pushlevel_class): Call it instead of explicit
13863 duplicate calls to xmalloc.
13864
13865 * decl.c (init_decl_processing): Delete useless build_pointer_type
13866 call.
13867
13868 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
13869 (sizet_ftype_string): Delete variable.
13870 (init_decl_processing): Add built-in functions fabsf, fabsl,
13871 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
13872 variable strlen_ftype, used for strlen.
13873
13874 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13875
13876 * decl.c (push_to_top_level): Start from current_binding_level
13877 again for now; the stl hacks depend on g++ being broken in this
13878 way, and it'll be fixed in the template rewrite.
13879
13880 * tree.def: Add USING_DECL.
13881 * decl2.c (do_class_using_decl): Implement.
13882 (grokfield): Pass access decls off to do_class_using_decl instead of
13883 grokdeclarator.
13884 * error.c (dump_decl): Handle USING_DECLs.
13885 * decl.c (grokdeclarator): Remove code for handling access decls.
13886 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
13887 as access decls for now.
13888 (finish_struct): Don't check USING_DECLs for other uses of the name.
13889
13890 * search.c (get_matching_virtual): Use cp_error_at.
13891
13892 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13893
13894 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
13895 match c-typeck.c.
13896 (self_promoting_args_p): Move the check that TYPE is non-nil
13897 before trying to look at its main variant.
13898 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
13899
13900 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
13901 Delete macros.
13902 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
13903 (do_friend): Delete call to xref_friend.
13904 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
13905
13906 * typeck.c (convert_sequence): #if 0 unused function.
13907
13908 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
13909 be in decl_in_memory_p.
13910 (decl_in_memory_p): Delete decl.
13911 * expr.c (decl_in_memory_p): Delete fn.
13912 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
13913
13914 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
13915
13916 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
13917
13918 * class.c (finish_struct_1): Check for a pure-specifier on a
13919 non-virtual function here.
13920
13921 * decl2.c (grok_function_init): Don't check whether the function
13922 is virtual here.
13923 (grokfield): Don't call check_for_override here.
13924
13925 * decl.c (push_to_top_level): Start from inner_binding_level,
13926 check class_shadowed in class levels.
13927
13928 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
13929
13930 * decl.c (resume_level): Ignore things that don't have names, instead
13931 of core dumping.
13932
13933 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13934
13935 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
13936
13937 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
13938
13939 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
13940 synthesized dtor.
13941
13942 * parse.y (complete_type_name): Bind global_scope earlier.
13943 (complex_type_name): Likewise.
13944 (qualified_type_name): Remove.
13945
13946 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
13947
13948 * decl.c (grokfndecl): Move code that looks for virtuals in base
13949 classes...
13950 * class.c (check_for_override): ... to a new function.
13951 (finish_struct_1): Call it.
13952
13953 * cp-tree.h: Declare warn_sign_compare.
13954
13955 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
13956 rather than extra_warnings to decide whether to warn about
13957 comparison of signed and unsigned.
13958
13959 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
13960 implies -Wsign-compare. -Wall doesn't imply -W.
13961
13962 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
13963
13964 * typeck.c (build_component_ref): Fix to handle anon unions in base
13965 classes as well.
13966
13967 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13968
13969 * class.c (resolves_to_fixed_type_p): Delete code dealing with
13970 a WITH_CLEANUP_EXPR, since we don't generate them any more.
13971 * cvt.c (build_up_reference): Likewise.
13972 * decl.c (grok_reference_init): Likewise.
13973 (cp_finish_decl): Likewise.
13974 * error.c (dump_expr): Likewise.
13975 * tree.c (real_lvalue_p): Likewise.
13976 (lvalue_p): Likewise.
13977 (build_cplus_new): Likewise.
13978 (unsave_expr_now): Likewise.
13979 * typeck.c (unary_complex_lvalue, build_modify_expr,
13980 c_expand_return): Likewise.
13981
13982 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13983
13984 Make the C++ front-end pay attention to attributes for structures.
13985 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
13986 finish_struct_1.
13987 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
13988 Take out old round_up_size use and setting the DECL_ALIGN possibly
13989 using it. Take out setting of TYPE_ALIGN to round_up_size, which
13990 can override what the attribute set.
13991 * cp-tree.h (finish_struct): Update prototype.
13992 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
13993 attributes to finish_struct.
13994 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
13995 value down into finish_struct.
13996 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
13997
13998 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
13999
14000 * decl.c (poplevel): Re-word dead for local handling.
14001 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
14002 (cp_finish_decl): If is_for_scope, check for duplicates so
14003 we can disable is_for_scope. Otherwise, preserve_temp_slots.
14004
14005 * lex.c (do_identifier): Use global binding in preference of
14006 dead for local variable.
14007
14008 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
14009
14010 * init.c (initializing_context): Handle anon union changes, the
14011 context where fields of anon unions can be initialized now has to be
14012 found by walking up the TYPE_CONTEXT chain.
14013
14014 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
14015
14016 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
14017 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
14018 (obscure_complex_init): If bss is supported, always set
14019 DECL_INITIAL to error_mark_node.
14020
14021 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14022
14023 * init.c (is_friend): Make sure there's a context before we see if
14024 it's an aggr type.
14025
14026 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
14027
14028 * init.c (is_friend): Classes are not friendly with nested classes.
14029
14030 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
14031
14032 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
14033 and record its result.
14034
14035 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
14036
14037 * class.c (finish_struct_anon): Switch around code to not move anon
14038 union elements around, nor mess up their contexts, nor offsets,
14039 instead we now build up the right number of COMPONENT_REFs for all
14040 the anon unions that may be present at build_component_ref time.
14041 * typeck.c (lookup_anon_field): New routine to handle field lookup
14042 on fields without names. We find them, based upon their unique type
14043 instead.
14044 * typeck.c (build_component_ref): Allow FIELD_DECL components.
14045 Handle finding components in anonymous unions, and ensure that a
14046 COMPONENT_REF is built for each level as necessary.
14047
14048 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
14049
14050 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
14051 code that ensures that copy ctors are used if appropriate.
14052
14053 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14054
14055 * init.c (build_vec_delete): Only give an error if base isn't an
14056 error_mark_node.
14057
14058 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
14059
14060 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
14061 (yylex): If we see `new', keep slurping.
14062
14063 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
14064
14065 * class.c (finish_struct_1): Move code for handling anon unions...
14066 (finish_struct_anon): to here. Fixup so that we do the offset
14067 calculations right, and so that the fields are physically moved to
14068 the containers's chain.
14069
14070 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14071
14072 * decl.c (grokdeclarator): Avoid trying to get an operand off an
14073 identifier node.
14074
14075 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
14076
14077 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
14078 POINTER_SIZE to agree with expr.c.
14079
14080 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
14081
14082 * search.c (lookup_field): Don't report ambiguities if protect is 0,
14083 instead return NULL_TREE.
14084
14085 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
14086
14087 * class.c (finish_struct_1): Call warn_hidden if we want warnings
14088 about overloaded virtual functions.
14089 (warn_hidden): New routine to warn of virtual functions that are
14090 hidden by other virtual functions, that are not overridden.
14091 (get_basefndecls): New routine, used by warn_hidden.
14092 (mark_overriders): New routine, used by warn_hidden.
14093 * search.c (get_matching_virtual): Remove old warning that just
14094 isn't very useful.
14095
14096 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14097
14098 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
14099
14100 * typeck.c (null_ptr_cst_p): Delete unused fn.
14101 (build_function_call_maybe): Delete unused fn.
14102
14103 * expr.c (extract_init): #if 0 the code after unconditional return 0
14104 for now.
14105
14106 Delete old cadillac code.
14107 * edsel.c: Remove file.
14108 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
14109 * Makefile.in (CXX_OBJS): Delete edsel.o.
14110 (edsel.o): Delete rule.
14111 * cp-tree.h (flag_cadillac): Delete var decl.
14112 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
14113 * decl2.c (flag_cadillac): Delete var definition.
14114 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
14115 (grokfield): Delete code depending on flag_cadillac.
14116 (finish_anon_union): Likewise.
14117 * class.c (finish_struct_1): Likewise.
14118 (pushclass): Likewise.
14119 (popclass): Likewise.
14120 (push_lang_context): Likewise.
14121 (pop_lang_context): Likewise.
14122 * decl.c (init_decl_processing): Likewise.
14123 (start_decl): Likewise.
14124 (cp_finish_decl): Likewise.
14125 (xref_tag): Likewise.
14126 (finish_enum): Likewise.
14127 (start_function): Likewise.
14128 (finish_function): Likewise.
14129 (finish_stmt): Likewise.
14130 * lex.c (lang_init): Likewise.
14131 (check_newline): Likewise.
14132
14133 * lex.c (do_pending_inlines): Delete synthesized method kludge.
14134
14135 Delete defunct, ancient garbage collection implementation.
14136 * rtti.c: New file with the RTTI stuff from gc.c.
14137 * gc.c: Removed file (moved the remaining stuff into rtti.c).
14138 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
14139 (rtti.o): New rule, replacing gc.o.
14140 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
14141 * cp-tree.h: Delete gc-related fn decls.
14142 (DECL_GC_OFFSET): Delete macro.
14143 (flag_gc): Delete extern decl.
14144 * decl.c (current_function_obstack_index): Delete var decl.
14145 (current_function_obstack_usage): Delete var decl.
14146 (start_function): Delete clearing of current_function_obstack_index
14147 and current_function_obstack_usage.
14148 (init_decl_processing): Delete code relying on -fgc.
14149 Delete call to init_gc_processing.
14150 (cp_finish_decl): Delete calls to build_static_gc_entry and
14151 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
14152 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
14153 and to expand_expr of a __gc_main call.
14154 (maybe_gc_cleanup): Delete var decl.
14155 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
14156 * decl2.c (flag_gc): Delete var decl.
14157 (lang_f_options): Delete offering of -fgc.
14158 (lang_decode_option): Delete -fgc and -fno-gc handling.
14159 (get_temp_regvar): Delete gc code.
14160 * init.c (build_new): Delete gc code.
14161 * lex.c (init_lex): Delete checking of flag_gc.
14162
14163 * typeck.c (convert_arguments): Delete gc code.
14164 (build_component_addr): Delete -fgc warning.
14165 (build_modify_expr): Delete gc code.
14166
14167 * decl2.c (build_push_scope): Delete fn.
14168 * cp-tree.h (build_push_scope): Delete decl.
14169
14170 * search.c (clear_search_slots): Delete fn.
14171 * cp-tree.h (clear_search_slots): Delete decl.
14172
14173 * search.c (tree_needs_constructor_p): Delete fn.
14174 * cp-tree.h (tree_needs_constructor_p): Delete decl.
14175
14176 * tree.c (id_cmp): Delete fn.
14177
14178 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
14179 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
14180
14181 * tree.c (decl_value_member): Delete fn.
14182 * cp-tree.h (decl_value_member): Delete decl.
14183
14184 * tree.c (list_hash_lookup_or_cons): Delete fn.
14185 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
14186
14187 * method.c (cplus_exception_name): Delete fn.
14188 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
14189
14190 * spew.c (shift_tokens): Delete fn.
14191
14192 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14193
14194 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
14195 to cp_finish_decl.
14196 * parse.y: Likewise.
14197
14198 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14199
14200 * tree.c (build_cplus_staticfn_type): Delete function definition;
14201 never used.
14202 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
14203
14204 * tree.c (virtual_member): Delete function definition; never used.
14205 * cp-tree.h (virtual_member): Delete decl.
14206
14207 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
14208
14209 * typeck.c (build_component_ref): Handle getting vbase pointers
14210 out of complex multiple inheritance better.
14211
14212 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
14213
14214 * typeck.c (build_object_ref): Make sure we use the real type, not
14215 any reference type.
14216
14217 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
14218
14219 * tree.c (build_exception_variant): Don't create new types if we
14220 don't have to, also build new types on the right obstack.
14221
14222 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14223
14224 * decl.c (store_bindings): Split out from push_to_top_level.
14225 (push_to_top_level): Call it for b->type_shadowed on class binding
14226 levels.
14227
14228 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
14229
14230 * search.c (expand_upcast_fixups): Fix so that offsets stored in
14231 vbase_offsets are always right. Fixes a problem where virtual base
14232 upcasting and downcasting could be wrong during conversions on this
14233 during virtual function dispatch at ctor/dtor time when dynamic
14234 vtable fixups for deltas are needed. This only sounds easier than
14235 it is. :-)
14236 (fixup_virtual_upcast_offsets): Change to reflect new calling
14237 convention for expand_upcast_fixups.
14238
14239 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14240
14241 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
14242 check that it's usable as the bitfield width.
14243
14244 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14245
14246 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
14247 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
14248 only ever used for functions in it.
14249
14250 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14251
14252 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
14253 (nested_type): Likewise.
14254 (nested_name_specifier): Use lastiddecl.
14255
14256 * decl.c (grokdeclarator): Adjust accordingly.
14257 * init.c (expand_member_init): Likewise.
14258 * parse.y (base_class): Likewise.
14259 * typeck2.c (build_functional_cast): Likewise.
14260
14261 * typeck2.c (build_functional_cast): Fill in name after we've
14262 checked for non-aggr type.
14263
14264 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
14265
14266 * decl2.c (warn_pointer_arith): Default to on.
14267
14268 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14269
14270 * lex.c (is_rid): New function.
14271 * decl.c (grokdeclarator): Diagnose reserved words used as
14272 declarator-ids.
14273
14274 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14275
14276 * tree.c (get_decl_list): Don't lose cv-quals.
14277
14278 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
14279 typespecs used as declarator-ids.
14280
14281 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
14282
14283 * decl.c (poplevel): When poping a level, don't give a warning for
14284 any subblocks that already exist.
14285
14286 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14287
14288 * typeck.c (build_object_ref): Finish what I started.
14289
14290 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
14291
14292 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
14293
14294 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
14295 scope.
14296
14297 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14298
14299 * decl.c (xref_tag): Handle passing a type in directly.
14300
14301 * parse.y (qualified_type_name): Pull out the type.
14302 (nested_type): Likewise.
14303 Take types directly instead of as identifiers.
14304 * call.c (build_scoped_method_call): Take types directly instead of
14305 as identifiers.
14306 * decl.c (xref_basetypes): Likewise.
14307 * init.c (expand_member_init): Likewise.
14308 (build_member_call): Likewise.
14309 (build_offset_ref): Likewise.
14310 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
14311 * method.c (do_build_assign_ref): Likewise.
14312 * decl.c (grokdeclarator): Handle a type appearing as the
14313 declarator-id for constructors.
14314 * method.c (do_build_copy_constructor): current_base_init_list now
14315 uses the types directly, not their names.
14316 * init.c (sort_base_init): Likewise.
14317 (expand_member_init): Likewise.
14318 * init.c (is_aggr_type): New function, like is_aggr_typedef.
14319
14320 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
14321
14322 * tree.c (layout_basetypes): Call build_lang_field_decl instead
14323 of build_lang_decl if first arg is a FIELD_DECL.
14324
14325 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14326
14327 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
14328 non-empty.
14329 * except.c (expand_start_catch_block): Set TREE_USED to avoid
14330 warnings about the catch handler.
14331
14332 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
14333
14334 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
14335 expand_target_expr.
14336
14337 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14338
14339 Fix access control to use trees rather than integers.
14340 * class.c (access_{default, public, protected, private,
14341 default_virtual, public_virtual, private_virtual}_node): Add
14342 definitions.
14343 (init_class_processing): Do creation of those nodes.
14344 * cp-tree.h (access_type): Delete enum decl.
14345 (access_{default, public, protected, private, default_virtual,
14346 public_virtual, private_virtual}_node): Add decls.
14347 (compute_access): Change return type.
14348 * search.c (compute_access): Have tree return type, instead of enum.
14349 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
14350 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
14351 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
14352 * parse.y (VISSPEC): Make ttype rather than itype.
14353 (base_class_access_list): Likewise.
14354 * *.[cy]: Change all refs of `access_public' to `access_public_node',
14355 etc.
14356 * call.c (build_method_call): Make ACCESS be a tree.
14357 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
14358 * cvt.c (convert_to_aggr): Likewise.
14359 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
14360 Likewise.
14361 * method.c (hack_identifier): Likewise.
14362 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
14363
14364 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
14365
14366 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
14367 frontend, and make it more consistent with respect to
14368 warn_pointer_arith.
14369
14370 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
14371
14372 * decl.c (pushdecl): Check for duplicate parameter names.
14373
14374 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
14375
14376 * decl.c (expand_static_init): Call assemble_external for atexit.
14377
14378 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
14379
14380 * except.c (do_unwind): Remove some generated dead code.
14381 (eh_outer_context): New routine, factor out some common code from
14382 expand_builtin_throw and end_eh_unwinder. Add code to do return
14383 address masking for the PA.
14384 (expand_builtin_throw): Use eh_outer_context instead of open coding
14385 it here.
14386 (end_eh_unwinder): Likewise.
14387
14388 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
14389
14390 * except.c (expand_throw): Call assemble_external for __empty, if we
14391 use it.
14392
14393 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
14394
14395 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
14396 NORMAL_RETURN_ADDR_OFFSET.
14397 (end_eh_unwinder): Likewise.
14398
14399 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
14400
14401 * gc.c (build_dynamic_cast): Make sure we don't cast away const
14402 when dealing with references, and make sure we handle dynamic
14403 casting to a cv qualified reference.
14404
14405 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
14406
14407 * except.c (struct eh_context): New structure top hold eh context
14408 information.
14409 (push_eh_context): New routine.
14410 (pop_eh_context): Likewise.
14411 * decl.c (push_cp_function_context): Use them.
14412 (pop_cp_function_context): Likewise.
14413
14414 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
14415
14416 * decl2.c (finish_file): Also prune uninteresting functions in the
14417 inline emission loop.
14418
14419 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
14420
14421 * sig.c (build_signature_table_constructor): Mark functions
14422 in the signature as referenced.
14423
14424 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
14425
14426 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
14427 the inline emission stuff.
14428
14429 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
14430
14431 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
14432 weak symbols.
14433 * lang-options.h: Add -f{no-,}weak.
14434 * decl.c (init_decl_processing): If the target does not support weak
14435 symbols, don't use them.
14436 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
14437
14438 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
14439
14440 * init.c (expand_member_init): warning for base init after members.
14441
14442 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
14443
14444 * cvt.c (build_expr_type_conversion): Don't convert to a reference
14445 type.
14446
14447 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
14448
14449 * method.c (report_type_mismatch): Improve wording for volatile
14450 mismatches.
14451
14452 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
14453
14454 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
14455 expand_assignment, as the later doesn't handle things that have
14456 copy constructors well. The compiler would do bitwise copying,
14457 instead of ctor calling in some cases.
14458
14459 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
14460
14461 * g++.c (my_strerror): Return "cannot access" if errno is 0.
14462 (pfatal_with_name, perror_exec): Don't assume that
14463 the returned value from my_strerror contains no '%'s.
14464 (concat): Remove.
14465 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
14466
14467 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
14468
14469 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
14470 TYPE_METHODS/TREE_CHAIN mean what they used to.
14471 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
14472 instead of TYPE_METHODS.
14473 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
14474 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
14475 * cp-tree.h (CLASSTYPE_METHODS): Lose.
14476 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
14477 TYPE_METHODS.
14478 (struct lang_decl): Lose next_method field.
14479 (DECL_NEXT_METHOD): Lose.
14480 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
14481 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
14482 anymore.
14483 (finish_struct_methods): Don't mess with the TREE_CHAINs in
14484 fn_fields.
14485
14486 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
14487 vector.
14488
14489 * call.c (build_method_call): Synthesize here even when not inlining.
14490 * typeck.c (build_function_call_real): Likewise.
14491
14492 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
14493
14494 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
14495 == DBX_DEBUG, call dbxout_start_new_source_file and
14496 dbxout_resume_previous_source_file when appropriate.
14497
14498 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
14499
14500 * except.c (start_anon_func): Push to the top level.
14501 (end_anon_func): Pop from the top level.
14502
14503 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
14504
14505 * cp-tree.h (build_cleanup): New routine to build cleanups.
14506 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
14507 call at ctor time and use atexit to run it later.
14508 * decl2.c (build_cleanup): New routine, taken from finish_file.
14509 (finish_file): Use build_cleanup instead, and don't put function
14510 local statics in global dtor list.
14511
14512 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
14513
14514 * except.c (expand_throw): Ensure that we have cleanups, if we try
14515 and expand cleanups.
14516
14517 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
14518
14519 * except.c (expand_throw): Add logic to manage dynamic cleanups for
14520 the EH object.
14521 (expand_end_catch_block): Use the magic of expand_goto, instead of
14522 emit_jump so that we get the cleanup for any catch clause parameter
14523 and the cleanup for the exception object. Update to reflect label
14524 changes.
14525 (push_eh_cleanup): New routine to register a cleanup for an
14526 exception object.
14527 (empty_fndecl): Used to default cleanup actions to
14528 nothing.
14529 (init_exception_processing): Setup empty_fndecl. Setup
14530 saved_cleanup.
14531 (expand_start_catch_block): Update to reflect label changes. Call
14532 push_eh_object to register the cleanup for the EH object.
14533 (start_anon_func): New routine to start building lambda expressions
14534 from trees.
14535 (end_anon_func): New routine to end them.
14536 (struct labelNode): Change so that we can use tree labels, or rtx
14537 labels.
14538 (saved_cleanup): Object to check for dynamic cleanups for the
14539 exception handling object.
14540 (push_label_entry): Change so that we can use tree labels, or rtx
14541 labels.
14542 (pop_label_entry): Likewise.
14543 (top_label_entry): Likewise.
14544 (expand_start_all_catch): Use tree label instead of rtx label, so
14545 that we can get the magic of expand_goto.
14546 (expand_end_all_catch): Update to reflect label changes.
14547
14548 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
14549 use UNSAVE_EXPRs.
14550 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
14551 building_cleanup logic, as we now use UNSAVE_EXPRs.
14552 * cp-tree.h (unsave_expr): Declare it.
14553 * decl.c (building_cleanup): Remove.
14554 (maybe_build_cleanup): Remove building_cleanup logic, and use
14555 UNSAVE_EXPR instead.
14556
14557 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
14558
14559 * gc.c (build_t_desc): Update error message to say <typeinfo>.
14560
14561 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14562
14563 * decl.c (pushdecl): Only warn about shadowing a local variable if
14564 warn_shadow is true.
14565
14566 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
14567
14568 * typeck.c (build_binary_op_nodefault): Added warning about
14569 comparisons between different enum types with -Wall, unless
14570 -fenum-int-equiv set.
14571
14572 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
14573
14574 * class.c (finish_struct_1): Skip down to the inner type in
14575 multidimensional arrays. Ensures ctors will be made for types that
14576 need constructing.
14577
14578 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
14579
14580 * decl.c (last_dtor_insn): New to track the last compiler generated
14581 insn in a dtor.
14582 (store_parm_decls): Set it.
14583 (finish_function): Use it to see if the dtor is empty. Avoid doing
14584 vtable setup all the time, if we can.
14585 (struct cp_function): Add last_dtor_insn.
14586 (push_cp_function_context): Save it.
14587 (pop_cp_function_context): Restore it.
14588
14589 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
14590
14591 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
14592 warnings.
14593
14594 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
14595
14596 * typeck.c (expand_target_expr): Make sure targets get put into the
14597 current temp_slot_level, so that the free_temp_slots call will reuse
14598 them.
14599
14600 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
14601
14602 * class.c (finish_struct_1): Delay delta fixups for virtual bases
14603 until after we have done the hard virtuals, to avoid a bogus `every
14604 virtual function must have a unique final overrider' for virtual
14605 functions that are only overridden by hard virtuals.
14606
14607 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
14608
14609 * pt.c (do_function_instantiation): Don't try to find a file-scope
14610 template for a member function.
14611
14612 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
14613
14614 * g++.c (main): Add handling of -nodefaultlibs.
14615
14616 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
14617
14618 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
14619 distinguish between direct bindings of reference variables, and
14620 indirect bindings of reference variables.
14621 * cvt.c (build_up_reference): Use it.
14622 * typeck.c (convert_arguments): Use it to indicate this is an
14623 indirect binding.
14624 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
14625 as they are unused.
14626 (expand_static_init): Likewise.
14627 (cplus_expand_expr_stmt): Likewise.
14628 * decl2.c (finish_file): Likewise.
14629 * init.c (perform_member_init): Likewise.
14630 (emit_base_init): Likewise.
14631 (expand_aggr_vbase_init_1): Likewise.
14632
14633 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14634
14635 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
14636 get a DECL_LANG_SPECIFIC node.
14637 * cp-tree.h (lang_decl_flags): Add new member `level'.
14638 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
14639 decl_flags level member.
14640
14641 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14642
14643 * call.c (build_method_call): Make sure instance has a
14644 TYPE_LANG_SPECIFIC node before we dive into it.
14645
14646 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
14647
14648 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
14649
14650 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
14651
14652 * decl.c (duplicate_decls): When smashing decls, smash staticness in
14653 the usual way.
14654
14655 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
14656
14657 * decl.c (poplevel): Handle the merging of subblocks of cleanups
14658 when finishing blocks that have already been created (usually due to
14659 the fixup goto code). Fixes bad debugging information.
14660
14661 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
14662
14663 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
14664 that's not a list of overloaded functions.
14665
14666 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14667
14668 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
14669 before trying to use DECL_ABSTRACT_VIRTUAL_P.
14670
14671 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
14672
14673 * decl2.c (mark_used): New function for hooking into setting of
14674 TREE_USED on decls.
14675 * call.c (build_method_call): Use it.
14676 * class.c (instantiate_type): Likewise.
14677 * init.c (build_offset_ref): Likewise. Don't call assemble_external
14678 for all like-named functions.
14679 * method.c (hack_identifier): Likewise.
14680 (emit_thunk): Don't call assemble_external.
14681 (make_thunk): Create thunk as a FUNCTION_DECL so that it
14682 gets the right mode and ENCODE_SECTION_INFO works.
14683
14684 * parse.y: Use mark_used. Pass operator names to do_identifier.
14685 * lex.c (do_identifier): Handle operator names.
14686
14687 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
14688
14689 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14690
14691 * errfn.c: Include stdio.h.
14692 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
14693
14694 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
14695
14696 * typeck2.c (digest_init): Always convert initializers to the
14697 right type.
14698
14699 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
14700
14701 * init.c (member_init_ok_or_else): Don't allow member initializers
14702 for indirect members, as it is invalid.
14703
14704 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14705
14706 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
14707
14708 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
14709
14710 * parse.y (for.init.statement): Catch compound statements inside for
14711 initializations, if we're being pedantic.
14712
14713 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
14714
14715 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
14716 looking for.
14717
14718 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
14719
14720 * error.c (dump_expr): Don't core dump when a boolean expression is
14721 used as a default argument.
14722
14723 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
14724
14725 * class.c (finish_struct_bits): Check aggregate_value_p instead of
14726 RETURN_IN_MEMORY.
14727
14728 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
14729
14730 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
14731 BLKmode type that would otherwise be returned in registers.
14732
14733 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14734
14735 * g++.c (WITHLIBC): New macro.
14736 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
14737 saw_libc and pass it at the end if it was set.
14738
14739 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
14740
14741 * parse.y (fn.def1): Call split_specs_attrs in
14742 declmods notype_declarator case.
This page took 0.659332 seconds and 6 git commands to generate.