dc46c74f1a4fbd4bd88cad5d9b7299a01a61487f
[gcc.git] / gcc / cp / ChangeLog
1 1999-09-29 Mark Mitchell <mark@codesourcery.com>
2
3 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
4 * ir.texi: Document DECL_EXTERNAL.
5
6 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
7 * ir.texi: Document THUNK_DECLs.
8
9 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
10 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
11 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
12 * error.c (dump_template_bindings): Remove unused parameter.
13 Handle multiple levels of template parameters.
14 (dump_template_decl): Use `parms', not `args', for template
15 parameters. Fix thinko.
16 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
17 flags to dump_template_bindings.
18 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
19 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
20 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
21 (tsubst_copy): Clarify variable name.
22 (most_general_template): Robustify.
23
24 1999-09-29 Nathan Sidwell <nathan@acm.org>
25
26 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
27 to change primary template rendering.
28
29 1999-09-29 Mark Mitchell <mark@codesourcery.com>
30
31 * cp-tree.h (UPT_TEMPLATE): Remove.
32 (UPT_PARMS): Likewise.
33 (DECL_NEEDED_P): New macro.
34 * decl2.c (finish_vtable_vardecl): Use it.
35 (finish_objects): Don't crash with -fsyntax-only.
36 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
37 -fsyntax-only.
38 * pt.c (tsubst_friend_function): Remove FIXME that talks about
39 obstacks.
40 (tsubst_expr): Correct handling of function try-blocks.
41 * semantics.c: Include flags.h.
42 (expand_body): Don't do RTL generation if -fsyntax-only.
43 * Makefile.in (semantics.o): Depends on flags.h.
44
45 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
46
47 * pt.c (most_general_template): Adjust declaration.
48
49 * cp-tree.h: (most_general_template): Declare.
50
51 * error.c (dump_template_value): Rename to ...
52 (dump_template_argument): This.
53 (dump_template_argument_list): New function.
54 (dump_type): Use it.
55 (dump_template_parameter): New function.
56 (dump_template_decl): Use it.
57 (dump_template_bindings): New function.
58 (dump_function_decl): Use it. Pretty print function template
59 instantiations.
60
61 1999-09-28 Nathan Sidwell <nathan@acm.org>
62
63 * decl.c (grokdeclarator): Distinguish parameter context for
64 diagnostics. Tidy up missing type diagnostic.
65 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
66
67 1999-09-28 Mark Mitchell <mark@codesourcery.com>
68
69 * ir.texi: Improve documentation for TARGET_EXPR.
70
71 1999-09-27 Nathan Sidwell <nathan@acm.org>
72
73 Augment stringification of trees.
74 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
75 (fndecl_as_string, type_as_string_real, args_as_string,
76 code_as_string, language_as_string, parm_as_string,
77 op_as_string, assop_as_string, cv_as_string): Remove.
78 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
79 (context_as_string): Declare new function.
80 * error.c (cp_printers): Move definition.
81 (OB_UNPUT): Remove.
82 (OB_END_TEMPLATE_ID): Adjust.
83 (interesting_scope_p): Remove.
84 (dump_scope): New static function.
85 (dump_qualifiers): Adjust prototype, reimplement.
86 (dump_template_value): Use tree_string_flags.
87 (dump_type_real): Move back to dump_type.
88 (dump_type): Adjust prototype. Use tree_string_flags.
89 (dump_aggr_type): Likewise. Use dump_template_parms.
90 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
91 Return pad flag.
92 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
93 (dump_simple_decl): Likewise.
94 (dump_decl): Likewise. Use dump_template_decl.
95 (dump_template_decl): New static function broken out of dump_decl.
96 (dump_function_decl): Adjust prototype. Use tree_string_flags.
97 (dump_parameters): Likewise. Prefix space.
98 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
99 (dump_function_name): Likewise. Use dump_template_parms.
100 (dump_template_parms): New static function broken out of
101 dump_function_name.
102 (dump_expr_list): Adjust prototype. Use tree_string_flags.
103 (dump_expr): Likewise.
104 (fndecl_as_string): Removed
105 (type_as_string_real): Removed
106 (dump_binary_op): Adjust prototype. Use tree_string_flags.
107 (dump_unary_op): Likewise.
108 (type_as_string): Likewise.
109 (expr_as_string): Likewise.
110 (decl_as_string): Likewise.
111 (context_as_string): New function.
112 (lang_decl_name): Adjust.
113 (decl_to_string): New static print callback.
114 (expr_to_string): Likewise.
115 (fndecl_to_string): Likewise.
116 (code_as_string): Renamed to ...
117 (code_to_string): ... here. Adjust.
118 (language_as_string): Renamed to ...
119 (language_to_string): ... here. Adjust.
120 (parm_as_string): Renamed to ...
121 (parm_to_string): ... here.
122 (op_as_string): Renamed to ...
123 (op_to_string): ... here.
124 (assop_as_string): Renamed to ...
125 (assop_to_string): ... here.
126 (type_to_string): New static print callback.
127 (args_as_string): Renamed to ...
128 (args_to_string): ... here. Adjust.
129 (cv_as_string): Renamed to ...
130 (cv_to_string): ... here. Adjust.
131 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
132 (print_template_context): Likewise.
133
134 1999-09-26 Mark Mitchell <mark@codesourcery.com>
135
136 * cp-tree.h (expand_throw): Remove prototype.
137 * except.c (expand_throw): Make it static. Use tree-generation
138 functions, rather than RTL-generation functions.
139 (build_throw): Use it.
140 * expr.c: Include except.h.
141 (cplus_expand_expr): Don't call expand_throw here.
142 * Makefile.in (expr.o): Depend on except.h.
143 * ir.texi: Update documentation for THROW_EXPR.
144
145 * decl.c (start_function): Set x_dont_save_pending_sizes rather
146 than calling get_pending_sizes.
147 * init.c (build_new): Don't save and restore
148 immediate_size_expand; instead, assert that it has the expected
149 value already.
150
151 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
152
153 * lex.c (compiler_error): Add missing call to va_end().
154
155 1999-09-25 Mark Mitchell <mark@codesourcery.com>
156
157 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
158 * ir.texi: Document RESULT_DECL and DECL_RESULT.
159
160 * cp-tree.h (check_return_expr): New function.
161 * decl.c (finish_constructor_body): New function.
162 (pushdecl): Put global friend functions in namespace binding
163 level, not the class binding level.
164 (finish_destructor_body): Make sure the dtor_label is always
165 defined. Fix typo in comment.
166 (finish_function): Move generation of constructor-termination code
167 to semantic-analysis time. Move generation of implicit `main'
168 return value to semantic-analysis time.
169 * semantics.c (finish_return_stmt): Generate goto's to
170 ctor_label/dtor_label here. Use check_return_expr to do semantic
171 analysis on the returned expression.
172 * typeck.c (maybe_warn_about_returning_address_of_local): New
173 function split out from c_expand_return.
174 (check_return_expr): Likewise.
175 (c_expand_return): Just generate the RTL for the return.
176
177 1999-09-24 Mark Mitchell <mark@codesourcery.com>
178
179 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
180 (cleanup_type): Likewise.
181 (search_tree): Change prototype.
182 * decl.c (local_variable_p): Adjust for new interface to
183 search_tree.
184 (check_default_argument): Likewise.
185 * error.c (dump_expr): Handle INIT_EXPR.
186 * except.c (expand_throw): Don't make cleanup_type a local static.
187 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
188 * init.c (build_new): Call build_new_1 directly, rather than
189 building a NEW_EXPR.
190 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
191 processing file-scope initializers.
192 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
193 * tree.c: Include splay-tree.h
194 (no_linkage_helper): Adjust for new interface to search_tree.
195 (search_tree): Pass around pointers to tree nodes, rather than the
196 nodes themselves. Handle VEC_INIT_EXPR.
197 (no_linkage_check): Adjust for new interface to search_tree.
198 (mapcar): Handle VEC_INIT_EXPR.
199 (target_remap): New variable.
200 (bot_manip): Use it.
201 (bot_replace): New function.
202 (break_out_target_exprs): Use it to remap all variables used in a
203 default argument expression.
204 * typeck.c (build_modify_expr): Don't crash when outside a
205 function and presented with an INIT_EXPR assignment
206 * Makefile.in (tree.o): Depend on splay-tree.h.
207
208 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
209
210 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
211 DECL_BUILT_IN.
212 (builtin_function): New arg CLASS. Arg CODE now of type int. All
213 callers changed.
214 Set the builtin's DECL_BUILT_IN_CLASS.
215
216 1999-09-24 Mark Mitchell <mark@codesourcery.com>
217
218 * decl.c (pushdecl): Don't make local declarations of extern
219 variables give the variable a DECL_CONTEXT for the function.
220 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
221 Don't accidentally make RTL for local declarations.
222 (emit_local_var): Handle declarations with asm-specifiers here.
223
224 1999-09-23 Mark Mitchell <mark@codesourcery.com>
225
226 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
227 STMT_IS_FULL_EXPR_P.
228
229 * cp-tree.h (language_function): Add cannot_inline.
230 * decl.c (start_function): Restore current_function_cannot_inline
231 from the saved value.
232 (save_function_data): Save current_function_cannot_inline.
233 * decl2.c (start_objects): Change prototype. Build the function
234 in function-at-a-time mode.
235 (finish_objects): Likewise.
236 (generate_ctor_or_dtor_function): Adjust accordingly.
237
238 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
239 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
240 Don't call expand_anon_union_decl here
241 * semantics.c (exapnd_stmt): Call it here, instead.
242 * typeck.c (mark_addressable): Addressed variables are implicitly
243 used.
244
245 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
246
247 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
248 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
249 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
250 * cp-tree.h: Add tree checking macros to various tree access
251 macros.
252 * ptree.c (print_lang_decl): Test for function or variable
253 before accessing template info.
254
255 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
256
257 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
258 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
259 * decl2.c (lang_f_options): Add -fshort-wchar.
260 * cp-tree.h: Declare flag_short_wchar.
261 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
262 int' for wchar_t.
263
264 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
265
266 * ir.texi: Fix formatting errors and typos.
267
268 1999-09-22 Mark Mitchell <mark@codesourcery.com>
269
270 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
271
272 * decl.c (pushdecl): Do create a binding for extern "C" functions,
273 but not for their DECL_ASSEMBLER_NAMEs.
274 (lookup_name_current_level): Fix formatting.
275 (xref_tag): Likewise.
276 * decl2.c (start_objects): Mark static constructors and
277 destructors as used.
278
279 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
280
281 * decl.c (define_case_label): Don't crash if we're not in a switch.
282
283 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
284 * lang-options.h: Restore -fthis-is-variable. Remove help strings
285 for unsupported flags.
286
287 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
288
289 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
290 Accept and warn about -fthis-is-variable.
291
292 1999-09-21 Mark Mitchell <mark@codesourcery.com>
293
294 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
295 CLEANUP_STMT, and SCOPE_STMT.
296
297 * decl2.c (lang_decode_option): Adjust, in the wake of recent
298 changes to option processing.
299
300 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
301
302 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
303 function pointer from pmfs with no object given.
304 (convert_for_assignment): Do not return error when converting
305 pmfs.
306
307 1999-09-21 Alex Samuel <samuel@codesourcery.com>
308
309 * lex.c (internal_filename): New variable.
310 (INTERNAL_FILENAME): New macro.
311 (init_parse): Allocate internal_filename and mark as root. Use it
312 instead of a string constant.
313
314 1999-09-21 Nathan Sidwell <nathan@acm.org>
315
316 Reimplement dynamic cast and catch matching.
317 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
318 * search.c (dynamic_cast_base_recurse): New function.
319 (get_dynamic_cast_base_type): New function for dynamic cast.
320 * rtti.c (build_dynamic_cast_1): Determine source and target
321 class relationship. Call __dynamic_cast_2.
322 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
323 (__user_type_info::dyncast): New dynamic cast dispatcher.
324 (__user_type_info::sub_kind): New nested enumeration.
325 (__user_type_info::contained_p): sub_kind predicate.
326 (__user_type_info::contained_public_p): Likewise.
327 (__user_type_info::contained_nonpublic_p): Likewise.
328 (__user_type_info::contained_nonvirtual_p: Likewise.
329 (__user_type_info::upcast_result): New nested struct.
330 (__user_type_info::dyncast_result): New nested struct.
331 (*::do_upcast): New catch function.
332 (*::do_dyncast): New dynamic cast function.
333 (__user_type_info::find_public_subobj): New dynamic cast
334 helper dispatcher.
335 (*::do_find_public_subobj): New dynamic cast helper function.
336 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
337 (__user_type_info::dyncast): Define dynamic cast dispatcher.
338 (*::do_upcast): Define catch function.
339 (*::do_dyncast): Define dynamic cast function.
340 (*::do_find_public_subobj): Define dynamic cast helper function.
341 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
342 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
343 (__dynamic_cast_2): New dynamic cast runtime.
344
345 1999-09-20 Mark Mitchell <mark@codesourcery.com>
346
347 * cp-tree.h (finish_stmt_expr): Change prototype.
348 * expr.c (cplus_expand_expr): Adjust call accordingly.
349 * init.c (finish_init_stmts): Likewise.
350 * parse.y (primary): Likewise.
351 * pt.c (tsubst_copy): Likewise.
352 * semantics.c (finish_stmt_expr): Don't take two parameters.
353 Don't remove generated BLOCKs from the block-tree.
354
355 Remove support for assigning to `this'.
356 * NEWS: Note that fact.
357 * class.c (build_vbase_path): Don't check flag_this_is_variable.
358 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
359 (language_function): Remove assigns_this, just_assigned_this, and
360 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
361 (base_init_expr): Remove.
362 (current_vcalls_possible_p): New macro.
363 (vtbls_set_up_p): Likewise.
364 (emit_base_init): Change prototype.
365 * decl.c (finish_destructor_body): New function, split out from
366 finish_function.
367 (current_function_assigns_this): Remove.
368 (current_function_just_assigned_this): Likewise.
369 (start_function): Don't set them.
370 (finish_function): Don't check them. Don't emit
371 base-initialization code here. Generate code for destructors when
372 doing semantic analysis.
373 (finish_stmt): Don't check current_function_just_assigned_this.
374 * decl2.c (lang_f_options): Remove this-is-variable.
375 (lang_decode_option): Likewise.
376 (grokclassfn): Don't check flag_this_is_variable.
377 * init.c (emit_base_init): Return the expression generated.
378 (construct_virtual_bases): Don't push/pop obstacks. Fix
379 typo.
380 (build_new_1): Don't check flag_this_is_variable.
381 (get_temp_regvar): Don't set DECL_REGISTER.
382 (build_vec_init): Don't call use_variable.
383 * lang-options.h: Remove "-fthis-is-variable" and
384 "-fno-this-is-variable".
385 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
386 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
387 expand_expr_stmt.
388 * semantics.c (finish_expr_stmt_real): Rename to ...
389 (finish_expr_stmt): This. Remove assigned_this parameter.
390 (begin_if_stmt): Call do_pushlevel before starting the statement.
391 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
392 blocks.
393 (setup_vtbl_ptr): Emit initialization code for bases and members
394 at semantic-analysis time. Emit code to initialize vtables in
395 destructors here.
396 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
397 Don't handle CTOR_INITIALIZER any more.
398 * typeck.c (build_modify_expr): Don't check for assignments to
399 this.
400 (c_expand_return): Don't suggest assigning to `this'.
401
402 * Makefile.in (decl.o): Depend on RTL_H.
403 (decl2.o): Likewise.
404 (class.o): Likewise.
405 (call.o): Likewise.
406 (method.o): Likewise.
407 (search.o): Likewise.
408 (tree.o): Likewise.
409 (pt.o): Likewise.
410
411 * decl.c (duplicate_decls): When a builtin function is redeclared
412 as static, make sure it is mangled correctly.
413
414 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
415 detail about the statement-tree.
416
417 1999-09-20 Nathan Sidwell <nathan@acm.org>
418
419 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
420
421 1999-09-20 Nick Clifton <nickc@cygnus.com>
422
423 * decl2.c (lang_decode_option): Extend comment.
424
425 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
426
427 * typeck.c: Include "tm_p.h".
428
429 1999-09-19 Mark Mitchell <mark@codesourcery.com>
430
431 * ir.texi: New file.
432
433 1999-09-19 Paul Burchard <burchard@pobox.com>
434
435 * semantics.c (expand_stmt): Initialize return value.
436
437 1999-09-18 Paul Burchard <burchard@pobox.com>
438
439 * gxxint.texi: G++ now implements namespaces.
440
441 1999-09-18 Mark Mitchell <mark@codesourcery.com>
442
443 * decl.c (pop_label): Don't warn about unused labels more than
444 once.
445 * semantics.c (finish_goto_stmt): Always marked used labels as
446 used.
447
448 * decl.c (layout_var_decl): Change prototype. Call layout_decl
449 even when the declaration is external.
450 (cp_finish_decl): Adjust call to layout_var_decl.
451 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
452
453 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
454
455 * typeck.c (get_member_function_from_ptrfunc): Always consider
456 virtuality inside member pointer.
457
458 1999-09-17 Mark Mitchell <mark@codesourcery.com>
459
460 Turn on function-at-a-time processing.
461 * cp-tree.h (doing_semantic_analysis_p): New macro.
462 (SF_DEFAULT): Define to zero, not SF_EXPAND.
463 (start_handler_parms): Change prototype.
464 (expand_start_catch_block): Likewise.
465 (expand_end_catch_block): Likewise.
466 (expand_start_eh_spec): Likewise.
467 (expand_end_eh_spec): Declare.
468 (finish_handler_parms): Change prototype.
469 (begin_catch_block): Declare.
470 (finish_handler): Change prototype.
471 (do_pushlevel): Declare.
472 (do_poplevel): Likewise.
473 * decl.c (pushlevel): Don't create
474 binding levels when not doing semantic analysis.
475 (poplevel): Don't pop them.
476 (pushdecl): Assert that we are never called when not doing
477 semantic analysis.
478 (pushdecl_top_level): Use push_to_top_level.
479 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
480 label when expanding.
481 (cp_finish_decl): Only inject for-scope variables when doing
482 semantic analysis. Add comments.
483 (start_handler_parms): Return the handler parm.
484 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
485 already set. Reinitialize from saved function data if available.
486 Don't pushlevel when not doing semantic analysis.
487 (store_parm_decls): Only generate RTL when expanding. Only
488 pushdecl when doing semantic analysis. Set
489 current_eh_spec_try_block if appropriate.
490 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
491 Combine common code. Don't poplevel when not doing semantic
492 analysis.
493 (push_cp_function_context): Don't expand functions without an
494 explicit call to expand_body.
495 (mark_lang_function): Make eh_spec_try_block and
496 x_scope_stmt_stack.
497 * except.c (expand_end_eh_spec): Don't
498 declare.
499 (process_start_catch_block): Likewise.
500 (push_eh_cleanup): Use finish_decl_cleanup.
501 (initialize_handler_parm): New function.
502 (expand_start_catch_block): Use it.
503 (expand_end_catch_block): Use tree-generation functions, not
504 RTL-generation functions.
505 (expand_start_eh_spec): Likewise.
506 (expand_end_eh_spec): Likewise.
507 (expand_exception_blocks): Simplify.
508 (start_anon_func): Use do_pushlevel.
509 (end_anon_func): Use do_poplvel. Call expand_body for the
510 function.
511 * expr.c (do_case): Don't call define_case_label.
512 * init.c (create_temporary_var): Set DECL_CONTEXT for local
513 variables.
514 * method.c (emit_thunk): Call expand_body for the
515 thunk.
516 (sythesize_method): Likewise.
517 * parse.y (handler_args): Give it ttype.
518 (eat_saved_input): Call expand_body.
519 (base_init): Use do_pushlevel.
520 (pending_inline): Call expand_body.
521 (handler): Adjust calls to finish_handler_parms and
522 finish_handler.
523 (handler_args): Don't call expand_start_catch_block. Return the
524 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
525 * parse.c: Regenerated.
526 * rtti.c (synthesize_tinfo_fn): Call finish_function.
527 * semantics.c (do_pushlevel): Give it external linkage. Build
528 SCOPE_STMTs.
529 (do_poplevel): Likewise.
530 (finish_case_label): Call define_case_label when doing semantic
531 analysis.
532 (finish_goto_stmt): Create RTL for labels.
533 (finish_function_try_block): Set in_function_try_handler
534 unconditionally.
535 (finish_function_handler_sequence): Unset it.
536 (finish_handler_parms): Use expand_start_catch_block even when
537 building a statement-tree.
538 (begin_catch_block): New function.
539 (finish_handler): Move a little RTL-generation logic here.
540 (finish_decl_cleanup): Allow cleanups for empty declarations.
541 (finish_named_return_value): Don't pushdecl when not doing
542 semantic analysis.
543 (expand_stmt): Don't do semantic analysis for variable
544 declarations. Handle START_CATCH_STMT. Call expand_label
545 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
546 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
547 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
548 RETURN_INIT and function try blocks.
549
550 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
551 x_scope_stmt_stack. Add x_in_charge_parm.
552 (current_eh_spec_try_block): New macro.
553 (current_scope_stmt_stack): Likewise.
554 (current_in_charge_parm): Likewise.
555 * decl.c (start_function): Initialize current_in_charge_parm.
556 (finish_function): Use current_in_charge_parm rather than looking
557 up __in_chrg.
558 * search.c (expand_indirect_vtbls_init): Likewise.
559
560 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
561 (TRY_BLOCK): Likewise.
562 (HANDLER): Likewise.
563 (START_CATCH_STMT): New tree node.
564 (SCOPE_STMT): Likewise.
565 * cp-tree.h (SCOPE_BEGIN_P): New macro.
566 (SCOPE_NULLIFIED_P): Likewise.
567 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
568 (struct lang_decl): Add saved_language_function.
569 (DECL_PENDING_INLINE_INFO): Adjust documentation.
570 (DECL_PENDING_INLINE_P): New macro.
571 (TYPE_TI_ARGS): Fix typo in comment.
572 (DECL_SAVED_TREE): Add to documentation.
573 (DECL_SAVED_FUNCTION_DATA): New macro.
574 (START_CATCH_TYPE): Likewise.
575 (SCOPE_END_P): New macro.
576 (declare_parm_level): Don't declare.
577 * decl.c (mark_lang_function): New function, split out from
578 mark_cp_function_context.
579 (save_function_data): New function.
580 (declare_parm_level): Remove.
581 (finish_function): Use save_function_data to squirrel away
582 important stuff for later use.
583 (mark_cp_function_context): Use mark_function_data.
584 (lang_mark_tree): Likewise.
585 * lex.c (begin_definition_of_inclass_inline): Set
586 DECL_PENDING_INLINE_P.
587 (store_pending_inline): Clear it.
588 * pt.c (tsubst_decl): Likewise.
589
590 1999-09-17 Nathan Sidwell <nathan@acm.org>
591
592 * call.c (perform_implicit_conversion): Deal with error_mark_node.
593
594 1999-09-17 Mark Mitchell <mark@codesourcery.com>
595
596 * decl.c (warn_extern_redeclared_static): Don't get confused by
597 static member functions.
598 (duplicate_decls): Merge DECL_THIS_STATIC.
599
600 * decl.c (expand_static_init): Make sure assignments to local
601 statics actually occur.
602
603 1999-09-17 Mark Mitchell <mark@codesourcery.com>
604
605 * cp-tree.h (poplevel_class): Declare.
606 * class.c (popclass): Use poplevel_class, not poplevel.
607 * decl.c (poplevel_class): Don't make it static. Don't return a
608 value.
609 (poplevel): Don't call poplevel_class; abort in a class
610 binding level is seen.
611 * semantics.c (finish_translation_unit): Use pop_everything.
612 * parse.y (member_init): Allow errors.
613 (pending_inline): Call finish_function.
614 * parse.c: Regenerated.
615 * Makefile.in (CONFLICTS): Adjust.
616
617 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
618
619 * error.c: Reduce code duplication.
620 (dump_template_value): New function.
621 (dump_type_real): Use it.
622 (dump_decl): Likewise.
623 (dump_function_name): Likewise.
624 (dump_function_decl): Don't be too talkative about function return
625 type variety.
626
627 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
628
629 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
630
631 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
632
633 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
634
635 * decl2.c (finish_file): Also call check_global_declarations for
636 the pending_statics list.
637
638 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
639
640 * lex.c (cp_pragma_implementation): Allow #pragma implementation
641 in header files.
642
643 1999-09-15 Richard Henderson <rth@cygnus.com>
644
645 * lex.c (mark_impl_file_chain): Follow the next chain.
646
647 1999-09-15 Mark Mitchell <mark@codesourcery.com>
648
649 * decl.c (warn_extern_redeclared_static): Simplify. Catch
650 problems with extern "C" functions redeclared as static.
651 (duplicate_decls): When a builtin is redeclared static, make the
652 new function have internal linkage.
653
654 1999-09-15 Mark Mitchell <mark@codesourcery.com>
655
656 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
657 * pt.c (tsubst_copy): Likewise.
658 * tree.c (search_tree): Likewise.
659 (mapcar): Likewise.
660
661 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
662
663 * typeck2.c (ack): Don't declare progname.
664
665 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
666
667 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
668 filenames with ggc_alloc_string.
669
670 1999-09-14 Mark Mitchell <mark@codesourcery.com>
671
672 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
673 TARGET_EXPR.
674 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
675 the TARGET_EXPR.
676 * cvt.c (build_up_reference): Likewise.
677 * tree.c (build_cplus_new): Likewise.
678 (get_target_expr): Likewise.
679
680 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
681
682 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
683
684 1999-09-13 Mark Mitchell <mark@codesourcery.com>
685
686 * cp-tree.h (build_target_expr): New function.
687 * call.c (build_conditional_expr): Use build_target_expr.
688 (convert_like): Likewise.
689 (build_over_call): Likewise.
690 * cvt.c (build_up_reference): Likewise.
691 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
692 (destroy_local_var): Here.
693 (build_target_expr): New function.
694 * tree.c (build_cplus_new): Use it.
695 (get_target_expr): Likewise.
696
697 1999-09-13 Nathan Sidwell <nathan@acm.org>
698
699 * typeck.c (expr_sizeof): Don't decay arrays and functions.
700 Remove misleading comment.
701 (build_compound_expr): Don't decay arrays.
702
703 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
704
705 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
706 class rvalues again.
707
708 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
709
710 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
711
712 * g++spec.c: Include gcc.h.
713 (lang_specific_driver): Constify a char*. Call xcalloc, not
714 xmalloc/bzero. All calls to the function pointer parameter now
715 explicitly call `fatal'.
716
717 1999-09-12 Mark Mitchell <mark@codesourcery.com>
718
719 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
720 * cvt.c (ocp_convert): Complete the from and destination types.
721 Adjust warning about functions always being `true' in conditionals.
722 * decl.c (duplicate_decls): Don't play funny games with abort.
723 * error.c (dump_expr): Handle OVERLOADs.
724 * spew.c (probe_obstack): Remove.
725 * typeck.c (condition_conversion): Use perform_implicit_conversion.
726
727 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
728
729 * cp-tree.h (auto_function, define_function): Adjust prototypes.
730 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
731 changed.
732 (auto_function): Likewise, for CODE arg.
733 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
734 (builtin_function): ... here.
735
736 1999-09-11 Mark Mitchell <mark@codesourcery.com>
737
738 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
739 (init_decl_processing): Don't set TREE_PERMANENT for the
740 error_mark_node.
741 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
742 (grokdeclarator): Likewise.
743 (grokparms): Don't check TREE_PERMANENT when building up lists.
744 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
745 (mark_inline_for_output): Likewise.
746 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
747 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
748 * lex.c (check_newline): Don't check ggc_p; it is always one.
749 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
750 * spew.c (yylex): Don't copy_node or probe_obstacks for
751 non-permanent CONSTANTs and STRINGs.
752 * tree.c (build_cplus_array_type_1): Don't fuss with
753 TREE_PERMANENT on ARRAY_TYPEs.
754
755 * cp-tree.def (CLEANUP_STMT): New node.
756 * cp-tree.h (language_function): Add name_declared.
757 (current_function_name_declared): New macro.
758 (CLEANUP_DECL): New macro.
759 (CLEANUP_EXPR): Likewise.
760 (emit_local_var): Likewise.
761 (finish_decl_cleanup): New function.
762 * cvt.c (build_up_reference): Simplify.
763 (ocp_convert): Remove dead code.
764 * decl.c (start_decl): Remove call to add_decl_stmt.
765 (grok_reference_init): Adjust, to handle bindings temporaries to
766 references. Remove dead code.
767 (initialize_local_var): Don't generate RTL for
768 declarations here, or build cleanups here. Don't fuss with
769 obstacks. Replace expand_start_target_temps calls with explicit
770 setting of stms_are_full_exprs_p.
771 (destroy_local_var): New function.
772 (emit_local_var): Likewise.
773 (cp_finish_decl): Use them, as appropriate.
774 (start_function): Announce template functions.
775 (store_parm_decls): Don't call declare_function_name here.
776 (finish_stmt): Don't start emit base-initialization code when just
777 building the statement-tree.
778 * init.c (create_temporary_var): Move add_decl_stmt call ...
779 (get_temp_regvar): Here.
780 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
781 cp_finish_decl would expect. Don't call add_decl_stmt.
782 * semantics.c (begin_compound_stmt): Call declare_function_name,
783 if appropriate.
784 (finish_decl_cleanup): New function.
785 (expand_stmt): Use emit_local_var to output variables.
786 (expand_body): Set current_funtion_name_declared.
787
788 1999-09-10 Mark Mitchell <mark@codesourcery.com>
789
790 * cp-tree.h (finish_cleanup_try_block): New function.
791 * semantics.c (finish_cleanup_try_block): Add comment.
792
793 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
794
795 * cp-tree.h: Delete declarations for all tree nodes now moved to
796 global_trees.
797 * decl.c: Delete their definitions.
798 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
799 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
800 provide defaults.
801 (init_decl_processing): Call build_common_tree_nodes and
802 build_common_tree_nodes_2 instead of building their nodes here.
803 Don't add gc roots for them.
804
805 1999-09-10 Mark Mitchell <mark@codesourcery.com>
806
807 * cp-tree.h (language_function): Rename expanding_p to
808 x_expanding_p. Rename named_label_uses to x_named_label_uses.
809 (expanding_p): Adjust accordingly.
810 (TREE_VIA_PRIVATE): Fix typo in comment.
811 (DECL_REFERENCE_SLOT): Remove.
812 (SET_DECL_REFERENCE_SLOT): Likewise.
813 * decl.c (named_label_uses): Adjust. Remove chicken comment.
814 (push_overloaded_decl): Don't truncate the chain of bindings when
815 adding an overloaded function.
816 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
817 (initialize_local_var): Fix typo in comment.
818 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
819 * decl2.c (start_objects): Make the fact that we are expanding
820 the generated function right away explicit.
821 (start_static_storage_duration_function): Likewise.
822 (finish_file): Fix typo in comment.
823 * init.c (build_vec_init): Correct bugs in handling cleanups.
824 * semantics.c (maybe_convert_cond): New function.
825 (FINISH_COND): Always store the condition, even if there's
826 a declaration.
827 (finish_if_stmt_cond): Use maybe_convert_cond.
828 (finish_while_stmt_cond): Likewise.
829 (finish_do_stmt): Likewise.
830 (finish_for_cond): Likewise.
831 (expand_cond): Adjust.
832
833 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
834 * init.c (perform_member_init): Remove obstack machinations.
835 (expand_cleanup_for_base): Likewise.
836 (finish_init_stmts): Mark the statement-expression as used.
837 * method.c (emit_thunk): Use tree-generating functions, not
838 RTL.
839 (do_build_copy_constructor): Likewise.
840 (do_build_assign_ref): Likewise.
841 (synthesize_method): Likewise. Keep track of line numbers.
842 * pt.c (tsubst_expr): Handle various kinds of try blocks.
843 * semantics.c (expand_stmts): Remove.
844 (begin_function_try_block): Set FN_TRY_BLOCK_P.
845 (finish_function_try_block): Be careful rechaining
846 function try blocks.
847 (expand_stmt): Loop through all the statements at a given level.
848 (exapnd_body): Be careful with line-numbers here too. Prepare for
849 being called directly from the parser.
850
851 * cp-tree.h (finish_function): Adjust prototype.
852 * decl.c (finish_function): Return the function compiled.
853 * pt.c (instantiate_decl): Don't play games with obstacks.
854 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
855 (search_tree): Likewise.
856 * typeck.c: Fix typo in comment.
857 * typeck2.c (store_init_value): Add comment.
858
859 * cp-tree.h (CPTI_ATEXIT): New macro.
860 (atexit_node): Likewise.
861 * decl.c (destroy_local_static): New function, broken out from ...
862 (expand_static_init): Here.
863
864 * rtti.c (get_tinfo_var): These should always be global
865 (expand_si_desc): Use tree, not RTL, functions to generate code.
866 (expand_class_desc): Likewise.
867 (expand_ptr_desc): Likewise.
868 (expand_attr_desc): Likewise.
869 (expand_generic_desc): Likewise.
870 (synthesize_tinfo_fn): Likewise.
871
872 1999-09-09 Mark Mitchell <mark@codesourcery.com>
873
874 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
875 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
876 RECHAIN_STMTS.
877 (RECHAIN_STMST_FROM_CHAIN): Likewise.
878
879 * parse.y (simple_stmt): Fix typo in last change.
880
881 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
882 (STMT_IS_FULL_EXPR_P): Likewise.
883 (STMT_LINENO_FOR_FN_P): Likewise.
884 (prep_stmt): New function.
885 (building_stmt_tree): Tweak for safety.
886 * pt.c (tsubst_expr): Use prep_stmt throughout.
887 (add_tree): Move it to semantics.c
888 * semantics.c (add_tree): Move it here.
889 (finish_expr_stmt_real): New function.
890 (finish_expr_stmt): Use it.
891 (finish_if_stmt_cond): Use FINISH_COND.
892 (finish_while_stmt_cond): Likewise.
893 (finish_for_cond): Likewise.
894 (finish_stmt_tree): Tweak line-number handling.
895 (prep_stmt): New function.
896 (expand_stmt): Use it.
897
898 * cp-tree.h (begin_switch_stmt): Adjust prototype.
899 (finish_switch_cond): Likewise.
900 * parse.y (simple_stmt): Adjust accordingly.
901 * parse.c: Regenerated.
902 * pt.c (tsubst_expr): Adjust accordingly.
903 * semantics.c (expand_cond): New function.
904 (FINISH_COND): New macro.
905 (begin_switch_stmt): Build the SWITCH_STMT here.
906 (finish_switch_stmt_cond): Not here.
907 (expand_stmt): Adjust calls to begin_switch_stmt and
908 finish_switch_cond. Use expand_cond throughout.
909
910 * dump.c (dequeue_and_dump): Dump types for constants.
911 Describe DECL_ARG_TYPE more intuitively.
912 Handle ARRAY_REF.
913
914 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
915 (lang_cleanup_tree): Remove.
916 * lex.c (make_lang_type): Use ggc_alloc to allocate
917 TYPE_LANG_SPECIFIC.
918
919 Reorganize per-function data.
920 * cp-tree.h (saved_scope): Add function_decl, bindings.
921 (language_function): Rename binding_level to bindings.
922 (cp_function_chain): Use the current_function, not the
923 outer_function_chain.
924 (current_class_ptr): Make it work, even when there's no
925 current function.
926 (current_class_ref): Likewise.
927 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
928 macros.
929 (clear_temp_name): Remove.
930 * decl.c (check_function_type): New function, broken out from
931 start_function.
932 (current_binding_level): Adjust definition.
933 (pushlevel): Simplify.
934 (poplevel): Don't use named_label_uses when we're outside
935 a function scope.
936 (mark_saved_scope): Mark function_decl and bindings.
937 (maybe_push_to_top_level): Don't unconditionally push a new
938 function context. Save bindings and the current_function_decl.
939 Don't clear named_labels.
940 (pop_from_top_level): Pop function context if appropriate.
941 (init_decl_processing): Set init_lang_status and free_lang_status,
942 rather than save_lang_status and restore_lang_status.
943 (start_function): Take SF_* flags. Don't clear per-function data.
944 Reorder and simplify to use new per-function data code. Add
945 asserts.
946 (store_parm_decls): Don't call init_function_start here.
947 (finish_function): Adjust for new handling of per-function data.
948 (push_cp_function_context): Simplify.
949 (mark_cp_function_context): Change binding_level to bindings.
950 * decl2.c (clear_temp_name): Remove.
951 (start_objects): Use SF flags to start_function.
952 (start_static_storage_duration_function): Likewise.
953 * except.c (start_anon_func): Remove redundant calls to
954 push_function_context_to. Use SF flags to start function.
955 (end_anon_func): Remove redundant call to pop_function_context
956 from.
957 * lex.c (reinit_parse_for_function): Don't initialize per-function
958 data.
959 * method.c (emit_thunk): Clear current_function after calling
960 assemble_end_function. Use SF flags for start_function.
961 (synthesize_method): Use SF flags for start_function.
962 * parse.c: Regenerated.
963 * parse.y (fn.defpen): Likewise.
964 (pending_inline): Clear current_function, even if something goes
965 wrong.
966 * pt.c (instantiate_decl): Use SF flags to start_function.
967 Don't save and restore expanding_p.
968 (add_tree): Handle the case where we are outside any function.
969 (end_tree): Likewise.
970 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
971 * semantics.c (begin_function_definition): Likewise.
972 (expand_body): Likewise.
973
974 1999-09-09 Nathan Sidwell <nathan@acm.org>
975
976 * cp-tree.h (convert_to_void): Prototype new function.
977 (require_complete_type_in_void): Remove prototype.
978 * cvt.c (convert_to_void): New function.
979 (ocp_convert): Use convert_to_void.
980 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
981 expressions.
982 * typeck.c (require_complete_type_in_void): Remove function.
983 (build_compound_expr): Use convert_to_void.
984 (build_static_cast): Likewise.
985 (build_c_cast): Likewise.
986 * semantics.c (finish_expr_stmt): Do not decay full expressions.
987
988 * typeck.c (build_x_compound_expr): Add FIXME.
989
990 1999-09-08 Mark Mitchell <mark@codesourcery.com>
991
992 * cp-tree.h (scratch_tree_cons): Remove.
993 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
994 and perm_tree_cons with plain tree_cons.
995 * class.c: Likewise.
996 * decl.c: Likewise.
997 * decl2.c: Likewise.
998 * except.c: Likewise.
999 * expr.c: Likewise.
1000 * init.c: Likewise.
1001 * lex.c: Likewise.
1002 * method.c: Likewise.
1003 * parse.y: Likewise.
1004 * pt.c: Likewise.
1005 * repo.c: Likewise.
1006 * rtti.c: Likewise.
1007 * search.c: Likewise.
1008 * typeck.c: Likewise.
1009 * parse.c: Regenerated.
1010 * tree.c (build_srcloc): Simplify.
1011
1012 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1013
1014 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1015 Remove next.
1016 (LANG_DECL_PERMANENT): Remove.
1017 * decl.c (duplicate_decls): Don't mess about with obstacks trying
1018 to free memory.
1019 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1020 * lex.c (free_lang_decl_chain): Remove.
1021 (build_lang_decl): Don't use obstacks.
1022 (retrofit_lang_decl): Likewise.
1023 (copy_lang_decl): Likewise.
1024
1025 * cp-tree.h (saved_scope): Remove old_binding_level and
1026 function_decl. Tidy up.
1027 * decl.c (mark_saved_scope): Don't set them.
1028 (maybe_push_to_top_level): Clear memory.
1029
1030 * decl.c (layout_var_decl): Change prototype. Don't complete
1031 types for external objects.
1032 (check_initializer): Likewise. Tidy.
1033 (initialize_local_var): Complete types here.
1034 (cp_finish_decl): Not here. Reorganize a little.
1035 (grokvardecl): Don't complete types here.
1036
1037 * decl.c (start_function): Clear last_dtor_insn and
1038 last_parm_cleanup_insn.
1039 (push_cp_function_context): Just copy over a little of
1040 the old context, not all of it.
1041
1042 * cp-tree.h (copy_to_permanent): Remove.
1043 (permanent_p): Likewise.
1044 * decl.c (building_typename_type): Don't use copy_to_permanent.
1045 (start_decl): Likewise.
1046 (grok_reference_init): Likewise.
1047 (cp_finish_decl): Likewise.
1048 * init.c (build_new_1): Don't use mapcar.
1049 (build_vec_delete_1): Don't use copy_to_permanent.
1050 (build_vec_init): Likewise.
1051 * parse.y (primary): Likewise.
1052 * parse.c: Regenerated.
1053 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1054 (lookup_template_class): Likewise.
1055 (tsubst_friend_function): Likewise.
1056 (instantiate_class_template): Likewise.
1057 (tsubst_decl): Likewise.
1058 (tsubst): Likewise.
1059 (instantiate_template): Likewise.
1060 (unify): Likewise.
1061 * rtti.c (get_tinfo_fn): Likewise.
1062 (build_dynamic_cast): Likewise.
1063 * semantics.c (finish_if_stmt_cond): Likewise.
1064 (finish_while_stmt_cond): Likewise.
1065 (finish_do_stmt): Likewise.
1066 (finish_for_cond): Likewise.
1067 (finish_for_expr): Likewise.
1068 (finish_cleanup): Likewise.
1069 (add_decl_stmt): Likewise.
1070 (finish_named_return_value): Likewise.
1071 (finish_qualified_call_expr): Likewise.
1072 * tree.c (perm_manip): Remove.
1073 (build_exception_variant): Don't use copy_to_permanent.
1074 (permanent_p): Remove.
1075 (copy_to_permament): Remove.
1076 (build_min_nt): Don't use copy_to_permanent.
1077 (build_min): Likewise.
1078 (min_tree_cons): Likewise.
1079 * typeckc.c (build_static_cast): Likewise.
1080 (build_reinterpret_cast): Likewise.
1081 (build_const_cast): Likewise.
1082
1083 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1084
1085 * decl.c (ggc_p): Set it to 1.
1086 (mark_saved_scope): Add prototype.
1087
1088 1999-09-07 Richard Henderson <rth@cygnus.com>
1089
1090 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1091 * typeck.c (self_promoting_args_p): Delete.
1092
1093 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
1094
1095 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1096 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1097
1098 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1099
1100 * Makefile.in (tree.o): Depend on ggc.h.
1101 * class.c (make_method_vec): Remove.
1102 (free_method_vec): Likewise.
1103 (free_method_vecs): Remove.
1104 (add_method): Don't use them.
1105 * cp-tree.def (PTRMEM_CST): Make it longer.
1106 (TEMPLATE_PARM_INDEX): Make it shorter.
1107 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1108 (template_parm_index): Remove RTL field.
1109 (ptrmem_cst): Add RTL field.
1110 (finish_function): Removed parameter.
1111 (process_next_inline): Change prototype.
1112 (init_cplus_unsave): Rename to init_tree.
1113 (binding_init): Remove.
1114 * decl.c (free_binding_nodes): Remove.
1115 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
1116 (pop_binding): Don't use free_binding_nodes.
1117 (free_binding_vecs): Remove.
1118 (store_bindings): Don't use them.
1119 (pop_from_top_level): Likewise.
1120 (lookup_namespace_name): Simplify.
1121 (build_typename_type): Don't use obstack_free.
1122 (unqualified_namespace_lookup): Simplify.
1123 (lookup_name_real): Simplify.
1124 (start_function): Remove comment about leaks.
1125 (finish_function): Removed nested parameter. Call
1126 expand_end_bindings even when building_stmt_tree.
1127 Call ggc_push_context and ggc_pop_context around
1128 rest_of_compilation, if necessary.
1129 (mark_cp_function_context): Handle a NULL language-context.
1130 (lang_mark_false_label_stack): Fix typo.
1131 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1132 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
1133 pointer to method types.
1134 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1135 * decl2.c (finish_objects): Adjust call to finish_function.
1136 (finish_static_store_duration_function): Likewise.
1137 (do_nonmember_using_decl): Remove call to binding_init.
1138 * except.c (end_anon_func): Adjust call to finish_function.
1139 * lex.c (mark_impl_file_chain): New function.
1140 (init_parse): Call init_tree, not init_cplus_unsave.
1141 Add GC roots.
1142 (cp_pramga_interface): Use xmalloc, not permalloc.
1143 (cp_pragma_implementation): Likewise.
1144 (begin_definition_of_inclass_inline): Simplify.
1145 (process_next_inline): Adjust prototype.
1146 (do_scoped_id): Don't call binding_init.
1147 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1148 * method.c (emit_thunk): Adjust call to finish_function.
1149 (synthesize_method): Likewise.
1150 * parse.y (%union): Add a new `pi' variant.
1151 (PRE_PARSED_FUNCTION_DECL): Use it.
1152 (fn.defpen): Likewise.
1153 (fndef): Adjust call to finish_function.
1154 * pt.c (instantiate_decl): Likewise.
1155 * rtti.c (syntheisze_tinfo_fn): Likewise.
1156 * semantics.c (expand_body): Likewise.
1157 * tree.c: Include ggc.h.
1158 (mark_list_hash): New function.
1159 (binding_init): Remove.
1160 (init_cplus_unsave): Rename to ...
1161 (init_tree): This. Add GC roots.
1162
1163 1999-09-05 Mark Mitchell <mark@codesourcery.com>
1164
1165 Get ready for garbage collection.
1166 * Makefile.in (CXX_TREE_H): Add varray.h
1167 (lex.o): Depend on ggc.h.
1168 (decl.o): Likewise.
1169 (decl2.o): Likewise.
1170 (method.o): Likewise.
1171 (search.o): Likewise.
1172 (pt.o): Likewise.
1173 (repo.o): Likewise.
1174 * class.c: Include ggc.h.
1175 (current_class_name): Remove.
1176 (current_class_type): Likewise.
1177 (current_access_specifier): Likewise.
1178 (previous_class_type): Likewise.
1179 (previous_class_values): Likewise.
1180 (class_cache_firstobj): Likewise.
1181 (current_lang_base): Likewise.
1182 (current_lang_stack): Likewise.
1183 (current_lang_stacksize): Likewise.
1184 (lang_name_c): Likewise.
1185 (lang_name_cplusplus): Likewise.
1186 (lang_name_java): Likewise.
1187 (current_lang_name): Likewise.
1188 (base_layout_decl): Likewise.
1189 (access_default_node): Likewise.
1190 (access_public_node): Likewise.
1191 (access_protected_node): Likewise.
1192 (access_private_node): Likewise.
1193 (access_default_virtual_node): Likewise.
1194 (access_public_virtual_node): Likewise.
1195 (access_protected_virtual_node): Likewise.
1196 (access_private_virtual_node): Likewise.
1197 (signed_zero_node): Likewise.
1198 (init_class_processing): Don't build base_layout_decl.
1199 (push_lang_context): Adjust now that current_lang_base is a varray.
1200 (pop_lang_context): Likewise.
1201 * cp-tree.h: Include varray.h.
1202 (cp_global_trees): Add access_default, access_public,
1203 access_protected, access_private, access_default_virtual,
1204 access_public_virtual, access_protected_virtual,
1205 access_private_virtual, ctor_identifier, delta2_identifier,
1206 delta_identifier, dtor_identifier, in_charge_identifier,
1207 index_identifier, nelts_identifier, this_identifier,
1208 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1209 lang_name_c, lang_name_cplusplus, lang_name_java,
1210 empty_except_spec, null, jclass, minus_one, terminate.
1211 (saved_scope): Move here from decl.c. Define globals in terms of
1212 saved_scope: current_namespace, current_class_name,
1213 current_class_type, current_access_specifier, current_lang_stack,
1214 current_lang_base, current_lang_name, current_function_parms,
1215 current_template_parms, processing_template_decl,
1216 processing_specialization, processing_explicit_instantiation,
1217 previous_class_type, previous_class_values, class_cache_firstobj.
1218 (scope_chain): New variable.
1219 (init_pt): New function.
1220 * decl.c (current_namespace): Remove.
1221 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1222 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1223 (delta_identifier, delta2_identifier): Likewise.
1224 (pfn_or_delta2_identifier, tag_identifier): Likewise
1225 (vt_off_identifier, empty_except_spec, null_node): Likewise.
1226 (current_function_parms, current_lang_base): Remove.
1227 (current_lang_stack, previous_class_values): Remove.
1228 (class_binding_level): Macroize.
1229 (saved_scope): Remove.
1230 (current_saved_scope): Rename to scope_chain.
1231 (mark_saved_scope): Adjust for new scope structure.
1232 (maybe_push_to_top_level): Likewise.
1233 (pop_from_top_level): Likewise.
1234 (duplicate_decls): Adjust now that current_lang_base is a varray.
1235 (build_typename_type): Call ggc_add_tree_hash_table_root.
1236 (init_decl_processing): Call init_pt. Call push_to_top_level to
1237 set up globals. Add GC roots.
1238 (xref_basetypes): Adjust now that current_lang_base is a varray.
1239 * decl.h (this_identifier): Remove.
1240 (in_charge_identifier): Likewise.
1241 * decl2.c: Don't include varray.h.
1242 (current_namespace): Remove.
1243 (init_decl2): Add GC roots.
1244 * except.c (Terminate): Remove.
1245 (init_exception_processing): Use terminate_node instead.
1246 (build_terminate_handler): Likewise.
1247 * init.c (nc_nelts_field_id): Remove.
1248 (minus_one): Likewise.
1249 (init_init_processing): Use minus_one_node and nelts_identifier
1250 instead. Add GC roots.
1251 (jclass_node): Remove.
1252 (build_new_1): Use nelts_identifier.
1253 (build_vec_init): Likewise.
1254 (build_vec_delete): Likewise.
1255 * lex.c: Include ggc.h.
1256 (defarg_fn): Move declaration early.
1257 (defarg_parms): Likewise.
1258 (init_parse): Add GC roots.
1259 (handle_cp_pragma): Remove redundant declaration of
1260 pending_vtables.
1261 * method.c: Include ggc.h.
1262 (btypelist): Make it a varray. All uses changed.
1263 (ktypelist): Likewise.
1264 (init_method): Add GC roots.
1265 * pt.c: Don't include varray.h. Include ggc.h.
1266 (current_template_parms): Remove.
1267 (processing_template_decl): Likewise.
1268 (processing_specialization): Likewise.
1269 (processing_explicit_instantiation): Likewise.
1270 (init_pt): New function.
1271 * repo.c: Include ggc.h.
1272 (init_repo): Add GC roots.
1273 * search.c: Don't include varray.h.
1274 (_vptr_name): Remove.
1275 (lookup_field_1): Use vtpr_identifier instead.
1276 (expand_indirect_vtbls_init): Remove redundant declaration of
1277 in_charge_identifier.
1278 (init_search_processing): Use vptr_identifier.
1279
1280 1999-09-05 Richard Henderson <rth@cygnus.com>
1281 Bernd Schmidt <bernds@cygnus.co.uk>
1282 Mark Mitchell <mark@codesourcery.com>
1283
1284 * Makefile.in (parse.o): Depend on ggc.h.
1285 (decl2.o): Depend on ggc.h.
1286 (init.o): Depend on ggc.h.
1287 * cp-tree.h (init_decl2): Declare.
1288 (cp_parse_init): Likewise.
1289 * decl.c (ggc_p): Define to zero.
1290 (mark_saved_scope): New function.
1291 (init_decl_processing): Call cp_parse_init, and cp_decl2.
1292 Register GC roots.
1293 (expand_static_init): Add GC roots.
1294 * decl2.c: Include ggc.h.
1295 (init_decl2): New function.
1296 * init.c: Include ggc.h.
1297 (init_init_processing): Add GC roots.
1298 * parse.y: Include ggc.h.
1299 (cp_parse_init): New function.
1300
1301 1999-09-04 Mark Mitchell <mark@codesourcery.com>
1302
1303 * decl.c (init_decl_processing): Set mark_lang_status.
1304 (lang_mark_false_label_stack): Adjust prototype.
1305 * decl2.c (grok_function_init): Remove extraneous declaration of
1306 abort_fndecl.
1307
1308 * Make-lang.in (cc1plus): Remove dependency on GGC.
1309 * Makefile.in (OBJS): Don't mention ggc-simple.o.
1310 (OBJDEPS): Don't mention ggc-simple.o.
1311
1312 * Make-lang.in (cc1plus): Depend on $(GGC).
1313 * Makefile.in (OBJS): Add ggc-simple.o.
1314 (OBJDEPS): Likewise.
1315 * cp-tree.h (language_function): Rename members to `x_' versions;
1316 we now have x_named_labels, x_ctor_label, x_dtor_label,
1317 x_base_init_list, x_member_init_list, x_base_init_expr,
1318 x_current_class_ptr, x_current_class_ref, x_last_tree,
1319 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1320 x_result_rtx.
1321 (dtor_label, ctor_label, current_base_init_list,
1322 current_member_init_list, base_init_expr, current_class_ptr,
1323 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1324 * decl.c: Include ggc.h.
1325 (last_dtor_insn): Adjust to use x_ names.
1326 (last_parm_cleanup_insn): Likewise.
1327 (original_result_rtx): Likewise.
1328 (named_labels): Likewise.
1329 (mark_binding_level): New function.
1330 (mark_cp_function_context): Likewise.
1331 (mark_false_label_stack): Likewise.
1332 (lang_mark_tree): Likewise.
1333 (lang_cleanup_tree): Likewise.
1334
1335 1999-09-03 Mark Mitchell <mark@codesourcery.com>
1336
1337 * Makefile.in (CXX_TREE_H): Include function.h.
1338 (decl.o): Don't depend on function.h.
1339 (decl2.o): Likewise.
1340 (typeck.o): Likewise.
1341 (init.o): Likewise.
1342 (method.o): Likewise.
1343 * cp-tree.h: Include function.h.
1344 (cp_function): Rename to language_function. Remove next.
1345 (cp_function_chain): Make it a macro, not a variable.
1346 (push_cp_function_context): Don't declare.
1347 (pop_cp_function_context): Likewise.
1348 * decl.c: Don't include function.h.
1349 (push_cp_function_context): Make it static. Make it suitable for
1350 a save_lang_status callback.
1351 (pop_cp_function_context): Likewise.
1352 (maybe_push_to_top_level): Call push_function_context_to, not
1353 push_cp_function_context.
1354 (pop_from_top_level): Call pop_function_context_from, not
1355 pop_cp_function_context.
1356 (init_decl_processing): Set save_lang_status and
1357 restore_lang_status. Call push_function_context_to, not
1358 push_cp_function_context.
1359 (cp_function_chain): Remove.
1360 * decl2.c: Don't include function.h.
1361 * except.c: Don't include function.h.
1362 (start_anon_func): Call push_function_context_to, not
1363 push_cp_function_context.
1364 (end_anon_func): Call pop_function_context_from, not
1365 pop_cp_function_context.
1366 * init.c: Don't include function.h.
1367 * lex.c (begin_definition_of_inclass_inline): Call
1368 push_function_context_to, not push_cp_function_context.
1369 (process_next_inline): Call pop_function_context_from, not
1370 pop_cp_function_context.
1371 * method.c: Don't include function.h.
1372 (synthesize_method): Call push_function_context_to, not
1373 push_cp_function_context. Call pop_function_context_from, not
1374 pop_cp_function_context.
1375 * typeck.c: Don't include function.h.
1376
1377 * decl.c (expand_static_init): Tweak handling of static
1378 initializations for objects without constructors.
1379
1380 1999-09-03 Nathan Sidwell <nathan@acm.org>
1381
1382 * typeck.c (build_indirect_ref): Reject dereference of pointer to
1383 void.
1384
1385 1999-09-02 Mark Mitchell <mark@codesourcery.com>
1386
1387 * cp-tree.h (cp_function): Move here, from decl.c.
1388 (cp_function_chain): Declare.
1389 (dtor_label): New macro, instead of variable.
1390 (ctor_label): Likewise.
1391 (current_base_init_list): Likewise.
1392 (current_member_init_list): Likewise.
1393 (base_init_expr): Likewise.
1394 (current_class_ptr): Likewise.
1395 (current_class_ref): Likewise.
1396 (last_tree): Likewise.
1397 (last_expr_type): Likewise.
1398 (current_function_returns_value): Likewise.
1399 (current_function_returns_null): Likewise.
1400 (current_function_just_assigned_this): Likewise.
1401 (current_function_parms_stored): Likewise.
1402 (temp_name_counter): Likewise.
1403 (static_labelno): Likewise.
1404 (expanding_p): Likewise.
1405 (stmts_are_full_exprs_p): Likewise.
1406 (in_function_try_handler): Likewise.
1407 (lang_type): Remove nested type_flags. All uses changed.
1408 * call.c (ctor_label): Remove.
1409 (dtor_label): Likewise.
1410 * class.c (current_class_ptr): Remove.
1411 (current_class_ref): Likewise.
1412 * decl.c (static_labelno): Remove.
1413 (dtor_label): Likewise.
1414 (last_dtor_insn): New macro, instead of variable.
1415 (last_parm_cleanup_insn): Likewise.
1416 (original_result_rtx): Likewise.
1417 (in_function_try_handler): Remove.
1418 (named_label_uses): New macro, instead of variable.
1419 (named_labels): Likewise.
1420 (current_function_returns_value): Remove.
1421 (current_function_returns_null): Likewise.
1422 (current_function_assigns_this): New macro, instead of variable.
1423 (current_function_just_assigned_this): Likewise.
1424 (current_binding_level): Likewise.
1425 (init_decl_processing): Call push_cp_function_context.
1426 (cp_function): Move to cp-tree.h
1427 (cp_function_chain): Make it global.
1428 (temp_name_counter): Remove.
1429 (push_cp_function_context): Simplify.
1430 (pop_cp_function_context): Likewise.
1431 * decl2.c (temp_name_counter): Remove.
1432 * init_c (current_base_init_list): Likewise.
1433 (current_member_init_list): Likewise.
1434 (base_init_expr): Likewise.
1435 * method.c (static_labelno): Likewise.
1436 * pt.c (last_tree): Likewise.
1437 * semantics.c (expanding_p): Likewise.
1438 (stmts_are_full_exprs_p): Likewise.
1439 (last_expr_type): Likewise.
1440 * typeck.c (dtor_label): Likewise.
1441 (ctor_label): Likewise.
1442
1443 1999-09-01 Alex Samuel <samuel@codesourcery.com>
1444
1445 * decl2.c (arg_assoc_template_arg): New prototype. New function.
1446 (arg_assoc_class): Use arg_assoc_template_arg for template
1447 arguments.
1448 (arg_assoc): Likewise.
1449 * pt.c (mangle_class_name_for_template): Allow member template
1450 template arguments.
1451
1452 1999-09-02 Nathan Sidwell <nathan@acm.org>
1453
1454 * call.c (build_conditional_expr): Warn on enum mismatches.
1455 (convert_arg_to_ellipsis): Move non-pod check to after
1456 conversion.
1457
1458 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1459
1460 * gxx.gperf (hash, is_reserved_word): Add prototypes.
1461
1462 * init.c (build_vec_init): Initialize variable `try_block'.
1463
1464 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1465 Likewise for bzero/memset.
1466 (token_getch, token_put_back): Add static prototypes. Remove
1467 `inline' from the definitions.
1468 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1469
1470 1999-09-01 Mark Mitchell <mark@codesourcery.com>
1471
1472 * cp-tree.h (lang_type): Move align into type_flags.
1473 (CLASSTYPE_ALIGN): Adjust accordingly.
1474 * call.c (direct_reference_binding): Remove misleading comment.
1475
1476 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1477
1478 * parse.y (language_string): Constify.
1479
1480 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1481
1482 * repo.c (getpwd): Don't prototype.
1483 * xref.c (getpwd): Likewise
1484
1485 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1486
1487 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1488 Remove hacks for stuff which now comes from libiberty.
1489
1490 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
1491
1492 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1493
1494 1999-08-30 Mark Mitchell <mark@codesourcery.com>
1495
1496 * cp-tree.h (begin_init_stmts): Declare.
1497 (finish_init_stmts): Likewise.
1498 * cvt.c (build_up_reference): Wrap the declaration of a temporary
1499 in a statement-expression so that we will see it when expanding
1500 tree structure later.
1501 * init.c (begin_init_stmts): Don't make it static.
1502 (finish_init_stmts): Likewise.
1503
1504 * cp-tree.h (start_handler_parms): New function.
1505 (expand_start_catch_block): Take only one parameter.
1506 (start_handler_parms): New function.
1507 * decl.c (start_handler_parms): Define it.
1508 * except.c (process_start_catch_block): Take only one parameter.
1509 Don't call grokdeclarator here.
1510 (expand_start_catch_block): Don't call grokdeclarator here,
1511 either.
1512 * parse.y (handler_args): Adjust call to
1513 expand_start_catch_block. Use start_handler_parms.
1514 * pt.c (push_template_decl_real): Make permanent lists have
1515 permanent elements.
1516 (tsubst_expr): Adjust calls to expand_start_catch_block
1517 appropriately.
1518 * semantics.c (expand_stmt): Likewise.
1519
1520 1999-08-29 Alex Samuel <samuel@codesourcery.com>
1521
1522 * pt.c (push_template_decl_real): Use template declaration from
1523 class type if it exists.
1524
1525 1999-08-29 Mark Mitchell <mark@codesourcery.com>
1526
1527 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1528 (maybe_inject_for_scope_var): Declare it.
1529 (initialize_local_var): Likewise.
1530 * decl.c (maybe_inject_for_scope_var): Make it global.
1531 (initialize_local_var): Likewise. Move cleanup handling here,
1532 from cp_finish_decl.
1533 (make_rtl_for_nonlocal_decl): Use
1534 push_obstacks_nochange/pop_obstacks, rather than
1535 end_temporary_allocation/resume_temporary_allocation.
1536 (cp_finish_decl): Try to complete the type of a variable when it
1537 is declared. Move cleanup-handling to initialize_local_var.
1538 (expand_static_init): Use tree-building code, rather than
1539 RTL-building code.
1540 * decl2.c (get_temp_name): Assert non-initializedness of
1541 temporaries.
1542 * init.c (create_temporary_var): Move RTL-assigning code to ...
1543 (get_temp_regvar): Here.
1544 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
1545 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
1546 call initialize_local_var to generate initialization code.
1547
1548 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1549
1550 * cp-tree.h (fndecl_as_string, type_as_string,
1551 type_as_string_real, args_as_string, decl_as_string,
1552 expr_as_string, code_as_string, language_as_string,
1553 parm_as_string, op_as_string, assop_as_string, cv_as_string,
1554 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1555
1556 * errfn.c (cp_printer): Likewise.
1557
1558 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1559 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1560 cp_file_of, code_as_string, language_as_string, parm_as_string,
1561 op_as_string, assop_as_string, args_as_string, cv_as_string):
1562 Likewise.
1563
1564 * tree.c (lang_printable_name): Likewise.
1565
1566 1999-08-28 Richard Henderson <rth@cygnus.com>
1567
1568 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1569
1570 1999-08-28 Mark Mitchell <mark@codesourcery.com>
1571
1572 * cp-tree.h (strip_array_types): New function.
1573 * decl.c (maybe_deduce_size_from_array_init): New function, split
1574 out from cp_finish_decl.
1575 (layout_var_decl): Likewise.
1576 (maybe_commonize_var): Likewise.
1577 (maybe_inject_for_scope_var): Likewise.
1578 (initialize_local_var): Likewise.
1579 (build_cleanup_on_safe_obstack): Likewise.
1580 (check_initializer): Likewise.
1581 (make_rtl_for_nonlocal_decl): Likewise.
1582 (cp_finish_decl): Use them.
1583 * typeck.c (strip_array_types): New function.
1584
1585 * cp-tree.def (LABEL_STMT): New tree node.
1586 * cp-tree.h (LABEL_STMT_LABEL): New macro.
1587 (shadow_label): Remove.
1588 (declare_local_label): New function.
1589 (finish_label_decl): Likewise.
1590 * decl.c (make_label_decl): New function, split out from
1591 lookup_label.
1592 (shadowed_labels): Remove.
1593 (binding_level): Add shadowed_labels.
1594 (clear_binding_level): Remove.
1595 (push_binding_level): Just bzero the new binding level.
1596 (pushlevel): Fix indentation.
1597 (pop_label): New function.
1598 (pop_labels): Likewise, split out from poplevel.
1599 (poplevel): Pop local labels. Use pop_labels.
1600 (maybe_push_to_top_level): Don't clear shadowed_labels.
1601 (lookup_label): Use make_label_decl.
1602 (shadow_label): Remove.
1603 (declare_local_label): New function.
1604 (define_label): Simplify.
1605 (start_function): Don't clear shadowed_labels.
1606 (cp_function): Remove shadowed_labels.
1607 (push_cp_function_context): Don't save shadowed_labels.
1608 (pop_cp_function_context): Don't restore it.
1609 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1610 * parse.y (label_decl): Use finish_label_decl.
1611 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1612 declarations.
1613 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1614 building_stmt_tree.
1615 (finish_label_decl): New function.
1616 (expand_stmt): Handle LABEL_STMTs and local label declarations.
1617
1618 1999-08-26 Mark Mitchell <mark@codesourcery.com>
1619
1620 * decl.c (lookup_label): Build labels on the permanent obstack
1621 when building statement trees. Don't build RTL for labels when
1622 building statement trees.
1623 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1624 building statement trees.
1625 (finish_label_stmt): Likewise.
1626 (expand_stmt): Adjust accordingly.
1627 * pt.c (tsubst_expr); Likewise.
1628 (do_decl_instantiation): Robustify.
1629
1630 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1631 * tree.c (build_cplus_new): Set it.
1632 * expr.c (cplus_expand_expr): Use it.
1633 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1634
1635 * decl.c (store_parm_decls): Reset immediate_size_expand.
1636 (finish_function): Likewise.
1637
1638 * tree.c (cplus_unsave_expr_now): Don't return a value.
1639
1640 * semantics.c (do_poplevel): Always initialize the return value.
1641
1642 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
1643
1644 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1645 * tree.h (cplus_unsave_expr_now) : Same.
1646
1647 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1648
1649 * decl.c (grokdeclarator): Amend comment.
1650 * except.c (expand_start_catch_block): Call push_template_decl for
1651 catch-block parameters.
1652 * method.c (synthesize_method): Build an empty compound statement
1653 for the body of a constructor.
1654
1655 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
1656
1657 * tree.c (cp_build_qualified_type_real): If we're asking for the
1658 same quals we already have, just return.
1659
1660 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1661
1662 * cp-tree.def (SUBOBJECT): New tree node.
1663 * cp-tree.h (CLEANUP_P): New macro.
1664 (SUBOBJECT_CLEANUP): Likewise.
1665 (keep_next_level): Add parameter.
1666 (get_temp_regvar): Don't declare.
1667 (emit_base_init): Remove parameter.
1668 (expand_aggr_init): Rename to build_aggr_init.
1669 (expand_vec_init): Rename to build_vec_init.
1670 (do_pushlevel): Remove.
1671 (do_poplevel): Likewise.
1672 (finish_cleanup): New function.
1673 (finish_subobject): Likewise.
1674 (stmts_are_full_exprs_p): New variable.
1675 * decl.c (keep_next_level): Add parameter.
1676 (cp_finish_decl): Use build_aggr_init, not
1677 expand_aggr_init. Use finish_expr_stmt to expand the code.
1678 (expand_static_init): Use tree-generating, not RTL-generating,
1679 functions to handle the initialization.
1680 (start_function): Remove dead code. Always have a momentary
1681 obstack inside the function, even before hitting the first curly
1682 brace.
1683 (cplus_expand_expr_stmt): Move calls to
1684 expand_{start,end}_target_temps into semantics.c.
1685 (cp_function): Add stmts_are_full_exprs_p.
1686 (push_cp_function_context): Save it.
1687 (pop_cp_function_context): Restore it.
1688 * decl2.c (get_temp_regvar): Move to init.c.
1689 (do_static_initialization): Use build_{aggr,vec}_init.
1690 (do_static_destruction): Fix typo in comment.
1691 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1692 * except.c (expand_throw): Use create_temporary_var.
1693 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1694 * init.c (expand_vec_init_try_block): Remove.
1695 (expand_vec_init_catch_clause): Likewise.
1696 (get_temp_regvar): New function.
1697 (begin_init_stmts): Likewise.
1698 (finish_init_stmts): Likewise.
1699 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1700 structure here.
1701 (emit_base_init): Likewise. Remove unused parameter.
1702 (expand_virtual_init): Likewise.
1703 (expand_cleanup_for_base): Use finish_subobject.
1704 (expand_aggr_vbase_init_1): Simplify.
1705 (construct_virtual_bases): Use tree-generating functions to build
1706 up initialization.
1707 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1708 (expand_default_init): Likewise.
1709 (expand_aggr_init_1): Likewise.
1710 (expand_vec_init): Rename to build_vec_init.
1711 * method.c (do_build_copy_constructor): Use tree-generating
1712 functions. Don't call clear_last_expr.
1713 (do_build_assign_ref): Likewise.
1714 (synthesize_method): Call clear_last_expr here.
1715 * parse.y (base_init): Don't call clear_last_expr here.
1716 (nodecls): Likewise.
1717 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1718 * semantics.c (do_pushlevel): Move to here.
1719 (do_poplevel): Likewise.
1720 (stmts_are_full_exprs_p): New variable.
1721 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1722 (finish_for_stmt): Use finish_expr_stmt.
1723 (finish_cleanup): New function.
1724 (finish_function_try_block): Fix indentation.
1725 (finish_subobject): New function.
1726 (setup_vtbl_ptr): Call keep_next_level here.
1727 (finish_stmt_expr): Handle a block with no scope inside the
1728 statement-expression.
1729 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1730 SUBOBJECT.
1731 * tree.c (search_tree): Handle INIT_EXPR.
1732 (mapcar): Likewise.
1733 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1734 * typeck2.c (store_init_value): Change expand_aggr_init to
1735 build_aggr_init in comment.
1736
1737 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1738
1739 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1740
1741 1999-08-25 Nathan Sidwell <nathan@acm.org>
1742
1743 * decl2.c (handle_class_head): Be graceful about additional
1744 scope qualifiers. Adjust comments to reflect reality.
1745
1746 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1747
1748 * call.c (build_conditional_expr): Fix typo.
1749 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1750 lvalue before trying to mess with the sides.
1751
1752 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1753
1754 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1755
1756 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1757
1758 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1759
1760 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1761 Return arbitrary pointer or NULL.
1762 (check_eh_spec): Call __throw_type_match_rtti_2.
1763 * tinfo.h (*::dcast): Return int. Add valp parm.
1764 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1765 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1766 (__throw_type_match_rtti): Now just a wrapper.
1767
1768 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1769 (init_exception_processing): Don't initialize them.
1770
1771 1999-08-23 Paul Burchard <burchard@pobox.com>
1772
1773 * decl.c (check_default_argument): Fix typo.
1774
1775 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1776
1777 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1778
1779 * dump.c (dump_next_stmt): New function.
1780 (dequeue_and_dump): Use it.
1781
1782 * pt.c (tsubst_copy): Make sure to initialize return value for a
1783 STMT_EXPR, even when processing_template_decl.
1784 * semantics.c (finish_stmt_expr): A statement-expression whose
1785 last statement is not an expression-statement has type `void'.
1786
1787 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1788
1789 * semantics.c (finish_stmt_expr): Fix typo in comment.
1790 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1791 (mapcar): Likewise.
1792 * init.c (build_vec_delete_1): Make the children of a permanent
1793 BIND_EXPR permanent.
1794 * pt.c (register_specialization): Don't register a specialization
1795 more than once.
1796
1797 1999-08-18 Andrew Haley <aph@cygnus.com>
1798
1799 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1800 for all integer parameter types larger than long long.
1801
1802 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1803
1804 * pt.c (redeclare_class_template): Merge default template
1805 arguments in both directions.
1806
1807 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1808 compiler_error message.
1809
1810 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1811
1812 * cp-tree.h: Declare flag_use_repository.
1813 * pt.c (do_decl_instantiation): Don't complain about duplicate
1814 instantiation with -frepo.
1815 (do_type_instantiation): Likewise.
1816
1817 * pt.c (push_template_decl_real): Complain about everything
1818 that isn't a valid template.
1819
1820 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1821 affect inlines.
1822
1823 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1824
1825 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1826 * decl2.c (build_expr_from_tree): Handle it.
1827 * error.c (dump_expr): Likewise.
1828 * pt.c (for_each_template_parm): Likewise.
1829 (tsubst_copy): Likewise.
1830 * tree.c (search_tree): Likewise.
1831 * semantics.c (finish_pseudo_destructor_call): Create it.
1832
1833 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1834
1835 * search.c (setup_class_bindings): Robustify.
1836 * typeck.c (common_type): Use same_type_p, not pointer equality,
1837 to compare types.
1838
1839 * cp-tree.h (build_lang_field_decl): Remove.
1840 * class.c (build_vtable): Replace calls to build_lang_field_decl
1841 with build_lang_decl.
1842 (prepare_fresh_vtable): Likewise.
1843 (finish_struct_1): Likewise.
1844 (init_class_processing): Likewise.
1845 * decl.c (push_using_decl): Likewise.
1846 (init_decl_processsing): Likewise.
1847 (grokvardecl): Likewise.
1848 (build_ptrmemfunc_type): Likewise.
1849 (grokdeclarator): Likewise.
1850 (build_enumerator): Likewise.
1851 * decl2.c (grok_x_components): Likewise.
1852 (do_class_using_decl): Likewise.
1853 * except.c (call_eh_info): Likewise.
1854 * init.c (init_init_processing): Likewise.
1855 * rtti.c (expand_class_decl): Likewise.
1856 * tree.c (build_base_fields): Likewise.
1857 (build_vbase_pointer_fields): Likewise.
1858 * lex.c (build_lang_decl): Build declarations on the permanent
1859 obstack if we're building statmeent trees.
1860 (retrofit_lang_decl): Handle both the full lang_decl and also the
1861 smaller lang_decl_flags here.
1862 (build_lang_field_decl): Remove.
1863 * pt.c (push_template_decl_real): Issue errors for variable
1864 declarations that are not static members.
1865
1866 1999-08-18 Richard Henderson <rth@cygnus.com>
1867
1868 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1869 (mapcar): Likewise.
1870
1871 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1872
1873 * cp-tree.h (back_end_hook): New variable.
1874 * decl2.c (back_end_hook): Define it.
1875 (finish_file): If it's non-NULL, call it.
1876
1877 * decl.c (add_decl_to_level): New function.
1878 (push_local_binding): Use it.
1879 (find_binding): Fix typo in comment.
1880 (pushdecl): Use add_decl_to_level. Put templates on the
1881 corresponding namespace-scope binding levels.
1882 * dump.c (dequeue_and_dump): Print the specializations of a
1883 template.
1884 * pt.c (push_template_decl_real): Don't push a template multiple
1885 times.
1886
1887 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1888
1889 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1890 (CALL_DECLARATOR_QUALS): Likewise.
1891 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1892 * decl.c (grokdeclarator): Adjust to use them.
1893 * decl2.c (grokfield): Likewise.
1894 (reparse_absdcl_as_casts): Likewise.
1895 * lex.c (make_call_declarator): Likewise.
1896 (set_quals_and_spec): Likewise.
1897 * pt.c (tsubst): Likewise.
1898 * tree.c (mapcar): Remove special hack to handle third operand of
1899 a CALL_EXPR.
1900
1901 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1902
1903 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1904 * class.c (build_vtable): Use build_lang_field_decl to build the
1905 VAR_DECLs for vtables.
1906 (prepare_fresh_vtable): Likewise.
1907 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1908 CAN_HAVE_FULL_LANG_DECL_P.
1909 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1910 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1911 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1912 (build_lang_field_decl): Likewise.
1913 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1914 to copy.
1915
1916 * cp-tree.def (STMT_EXPR): New tree node.
1917 * cp-tree.h (STMT_EXPR_STMT): New macro.
1918 (store_return_init): Change prototype.
1919 (finish_named_return_value): New function.
1920 (expand_stmt): Likewise.
1921 (expand_body): Likewise.
1922 (begin_stmt_tree): Likewise.
1923 (finish_stmt_tree): Likewise.
1924 (expanding_p): New variable.
1925 (last_expr_type): Likewise.
1926 (building_stmt_tree): New macro.
1927 * decl.c (start_function): Use building_stmt_tree, not
1928 processing_template_decl, where appropriate.
1929 (store_parm_decls): Likewise.
1930 (store_return_init): Move most of the body to semantics.c.
1931 (finish_function): Use building_stmt_tree.
1932 (finish_stmt): Clear last_expr_type here.
1933 (cp_function): Add expanding_p, last_tree, last_expr_type.
1934 (push_cp_function_context): Save them.
1935 (pop_cp_function_context): Restore them.
1936 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1937 * error.c (dump_expr): Handle STMT_EXPR.
1938 * except.c (expand_start_catch_block): Use building_stmt_tree.
1939 Use add_decl_stmt.
1940 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1941 (do_case): Move add_tree call to semantics.c.
1942 * parse.y (return_init): Use finish_named_return_value.
1943 (for.init.statement): Use finish_expr_stmt.
1944 * parse.c: Regenerated.
1945 * pt.c (do_pushlevel): Move to semantics.c.
1946 (do_poplevel): Likewise.
1947 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1948 (tsubst_expr): Don't expand all the way to RTL here. Handle
1949 RETURN_INIT and CTOR_INITIALIZER.
1950 (instantiate_decl): Call expand_body after tsubst'ing into
1951 DECL_SAVED_TREE.
1952 * semantics.c (expand_stmts): New function.
1953 (expanding_p): New variable.
1954 (last_expr_type): Likewise.
1955 (finish_expr_stmt): Use building_stmt_tree.
1956 (begin_if_stmt): Likewise.
1957 (finish_if_stmt_cond): Likewise.
1958 (finish_then_clause): Likewise.
1959 (begin_else_clause): Likewise.
1960 (finish_else_clause): Likewise.
1961 (begin_while_stmt): Likewise.
1962 (finish_while_stmt_cond): Likewise.
1963 (finish_while_stmt): Likewise.
1964 (finish_do_body): Likewise.
1965 (finish_do_stmt): Likewise.
1966 (finish_return_stmt): Likewise.
1967 (begin_for_stmt): Likewise.
1968 (fnish_for_init_stmt): Likewise.
1969 (finish_for_cond): Likewise.
1970 (finish_for_expr): Likewise.
1971 (finish_for_stmt): Likewise.
1972 (finish_break_stmt): Likewise.
1973 (finish_continue_stmt): Likewise.
1974 (finish_switch_cond): Likewise.
1975 (finish_switch_stmt): Likewise.
1976 (finish_case_label): Call add_tree here if necessary.
1977 (finish_goto_statement): Use building_stmt_tree.
1978 (begin_try_block): Likewise.
1979 (begin_function_try_block): Likewise.
1980 (finish_try_block): Likewise.
1981 (finish_function_try_block): Likewise.
1982 (finish_handler_sequence): Likewise.
1983 (finish_function_handler_sequence): Likewise.
1984 (begin_handler): Likewise.
1985 (finish_handler_parms): Likewise.
1986 (finish_handler): Likewise.
1987 (begin_compound_stmt): Likewise.
1988 (finish_compound_stmt): Likewise.
1989 (finish_asm_stmt): Likewise.
1990 (finish_label_stmt): Likewise.
1991 (finish_named_return_value): New function.
1992 (setup_vtbl_ptr): Moved here from decl2.c.
1993 (do_pushlevel): Moved here from pt.c.
1994 (do_poplevel): Likewise.
1995 (begin_stmt_expr): Use building_stmt_tree.
1996 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
1997 when building_stmt_tree.
1998 (begin_stmt_tree): New function.
1999 (finish_stmt_tree): Likewise.
2000 (expand_stmt): Likewise.
2001 (expand_body): Likewise.
2002 * tree.c (build_cplus_method_type): Make sure the argument types
2003 end up on the same obstack as the METHOD_TYPE.
2004 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2005 THROW_EXPR, STMT_EXPR.
2006 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
2007 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
2008 sorry, if an unsupported node is encountered.
2009 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2010 (c_expand_return): Don't call add_tree here.
2011
2012 1999-08-15 Mark Mitchell <mark@codesourcery.com>
2013
2014 * pt.c (check_default_tmpl_args): Don't check in local scopes.
2015 (tsubst_decl): Make sure the declaration is on a saveable
2016 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2017 variable.
2018 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2019
2020 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
2021
2022 Speed up Koenig lookup.
2023 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
2024 to return namespaces we've looked at.
2025 * decl2.c (lookup_using_namespace): Likewise.
2026 (add_function): Don't call ovl_member.
2027 (lookup_arg_dependent): Initialize k.namespaces to the list of
2028 namespaces seen in unqualified lookup.
2029 * call.c (equal_functions): Move here from tree.c.
2030 (joust): Use it to handle duplicate candidates.
2031 * tree.c (ovl_member): Use ==.
2032
2033 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2034
2035 * cp-tree.def (DECL_STMT): Make it smaller.
2036 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2037 (lang_decl): ... here. Add next.
2038 (DECL_SAVED_TREE): Adjust accordingly.
2039 (DECL_IMPLICIT_TYPEDEF_P): New macro.
2040 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2041 (DECL_STMT_DECL): Likewise.
2042 (create_implicit_typedef): New function.
2043 (maybe_push_decl): Likewise.
2044 (tsubst_default_argument): New function.
2045 (at_function_scope_p): Likewise.
2046 (add_decl_stmt): Likewise.
2047 (push_permanent_obstack): Likewise.
2048 * call.c (convert_default_arg): Use tsubst_default_argument.
2049 * class.c (add_method): Use push_permanent_obstack.
2050 (build_self_reference): Create a TEMPLATE_DECL for the
2051 self-reference, if necessary.
2052 * decl.c (pseudo_global_level_p): Only look at the current binding
2053 level.
2054 (push_binding): Use push_permanent_obstack.
2055 (create_implicit_typedef): New function.
2056 (pushtag): Use it.
2057 (duplicate_decls): Use push_permanent_obstack.
2058 (maybe_push_decl): New function.
2059 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
2060 (start_decl_1): Remove dead code.
2061 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
2062 pseudo_global_level_p.
2063 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2064 template.
2065 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
2066 pseudo_global_level_p.
2067 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2068 a template.
2069 (get_sentry): Use push_permanent_obstack.
2070 * dump.c (dequeue_and_dump): Enable DECL_STMT.
2071 * except.c (call_eh_info): Use push_permanent_obstack.
2072 (build_eh_type_ref): Likewise.
2073 (do_pop_exception): Likewise.
2074 (expand_eh_spec): Likewise.
2075 (alloc_eh_object): Likewise.
2076 (expand_throw): Likewise.
2077 * init.c (build_java_class_ref): Likewise.
2078 * lex.c (get_time_identifier): Likewise.
2079 (free_lang_decl_chain): Correct type.
2080 (retrofit_lang_decl): Adjust accordingly.
2081 (build_lang_field_decl): Likewise.
2082 * lex.h (free_lang_decl_chain): Likewise.
2083 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2084 * parse.c: Regenerated.
2085 * pt.c (tsubst_default_arguments): New function.
2086 (retrieve_local_specialization): Likewise.
2087 (register_local_specialization): Likewise.
2088 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
2089 pseudo_global_level_p to determine whether or not a template is
2090 primary.
2091 (lookup_template_class): Likewise. Use create_implicit_typedef.
2092 (instantiate_class_template): Call tsubst_default_arguments for
2093 member functions, if appropriate.
2094 (tsubst_default_argument): New function.
2095 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
2096 * search.c (at_function_scope_p): New function.
2097 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2098 (finish_label_stmt): Likewise.
2099 (add_decl_stmt): New function.
2100 (begin_class_definition): Likewise.
2101 (finish_typeof): Likewise.
2102 * tree.c (copy_template_template_parm): Likewise.
2103 (copy_to_permanent): Likewise.
2104 (push_permanent_obstack): Define.
2105 (mark_addressable): Use it.
2106 * typeck.c (mark_addressable): Likewise.
2107
2108 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
2109
2110 * cp-tree.h (init_cplus_unsave): New.
2111 (cplus_unsave_expr_now): New.
2112 * lex.c (init_parse): Call init_cplus_unsave.
2113 * tree.c (init_cplus_unsave): New.
2114 (cplus_unsave_expr_now): New.
2115
2116 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2117
2118 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
2119 decl_constant_value to simplify array bounds.
2120
2121 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
2122
2123 * lang-options.h: Add -fms-extensions.
2124 * cp-tree.h: Declare flag_ms_extensions.
2125 * decl2.c: Define it.
2126 * class.c (instantiate_type): Don't complain about taking the address
2127 of a bound member function if -fms-extensions.
2128 * typeck.c (build_unary_op): Likewise.
2129 * decl.c (grokdeclarator): Or about implicit int.
2130 * init.c (resolve_offset_ref): Or about implicit '&'.
2131
2132 1999-08-11 Mark Mitchell <mark@codesourcery.com>
2133
2134 * cp-tree.h (minimal_parse_mode): Remove.
2135 (finish_label_stmt): New function.
2136 * decl.c (saved_scope): Remove minimal parse mode.
2137 (maybe_push_to_top_level): Don't save it.
2138 (pop_from_top_level): Don't restore it.
2139 (define_label): Split out template-handling code to semantics.c.
2140 (start_decl): Don't use minimal_parse_mode.
2141 (cp_finish_decl): Likewise.
2142 (start_function): Don't increment it.
2143 (store_return_init): Don't use it.
2144 (finish_function): Don't decrement it.
2145 * parse.y (label_colon): Use finish_label_stmt throughout.
2146 * parse.c: Regenerated.
2147 * pt.c (minimal_parse_mode): Don't define it.
2148 (tsubst_expr): Use finish_label_stmt.
2149 * semantics.c (finish_label_stmt): New function.
2150
2151 * dump.c (queue): Be careful when computing bitmasks.
2152 (dequeue_and_dump): Describe binfos as binfos, not as
2153 vectors.
2154
2155 * parse.y (pedantic): Give it itype. Adjust usage accordingly
2156 throughout.
2157 * parse.c: Regenerated.
2158
2159 * Make-lang.in (CXX_SRCS): Remove sig.c.
2160 * Makefile.in (CXX_OBJS): Remove sig.o.
2161 (sig.o): Remove.
2162 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2163 (CPTI_SIGNATURE_TYPE): Likewise.
2164 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2165 (opaque_type_node): Likewise.
2166 (signature_type_node): Likewise.
2167 (sigtable_entry_type): Likewise.
2168 (flag_handle_signatures): Likewise.
2169 (lang_type): Remove is_signature, is_signature_pointer,
2170 is_signature_reference, has_opaque_typedecls,
2171 sigtables_has_been_generated. Adjust dummy. Remove signature,
2172 signature_pointer_to, signature_reference_to.
2173 (IS_SIGNATURE): Remove.
2174 (SET_SIGNATURE): Remove.
2175 (CLEAR_SIGNATURE): Remove.
2176 (IS_SIGNATURE_POINTER): Remove.
2177 (IS_SIGNATURE_REFERENCE): Remove.
2178 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2179 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2180 (CLASSTYPE_SIGNATURE): Remove.
2181 (SIGNATURE_TYPE): Remove.
2182 (SIGNATURE_METHOD_VEC): Remove.
2183 (SIGNATURE_POINTER_TO): Remove.
2184 (SIGNATURE_REFERENCE_TO): Remove.
2185 (lang_decl_flags): Remove is_default_implementation. Rename
2186 memfunc_pointer_to to saved_tree.
2187 (IS_DEFAULT_IMPLEMENTATION): Remove.
2188 (DECL_MEMFUNC_POINTER_TO): Remove.
2189 (DECL_MEMFUNC_POINTING_TO): Remove.
2190 (DECL_SAVED_TREE): Adjust definition.
2191 (tag_types): Remove signature_type_node.
2192 (SIGNATURE_FIELD_NAME): Remove.
2193 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2194 (SIGNATURE_OPTR_NAME): Likewise.
2195 (SIGNATURE_SPTR_NAME): Likewise.
2196 (SIGNATURE_POINTER_NAME): Likewise.
2197 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2198 (SIGNATURE_REFERENCE_NAME): Likewise.
2199 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2200 (SIGTABLE_PTR_TYPE): Likewise.
2201 (SIGTABLE_NAME_FORMAT): Likewise.
2202 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2203 (SIGTABLE_TAG_NAME): Likewise.
2204 (SIGTABLE_VB_OFF_NAME): Likewise.
2205 (SIGTABLE_VT_OFF_NAME): Likewise.
2206 (finish_base_specifiers): Change prototype.
2207 (build_signature_pointer_type): Remove.
2208 (build_signature_reference_type): Remove.
2209 (build_signature_pointer_constructor): Remove.
2210 (build_signature_method_call): Remove.
2211 (build_optr_ref): Likewise.
2212 (append_signature_fields): Likewise.
2213 (signature_error): Likewise.
2214 * call.c (build_this): Remove signature support.
2215 (build_over_call): Likewise.
2216 (build_new_method_call): Likewise.
2217 * class.c (add_implicitly_declared_members): Likewise.
2218 (finish_struct_1): Likewise.
2219 (finish_struct): Likewise.
2220 * cvt.c (cp_convert_to_pointer): Likewise.
2221 (convert_to_pointer_force): Likewise.
2222 (ocp_convert): Likewise.
2223 * decl.c (sigtable_decl_p): Remove.
2224 (init_decl_processing): Remove support for signatures.
2225 (cp_finish_decl): Likewise.
2226 (grokdeclarator): Likewise.
2227 (grokparms): Likewise.
2228 (xref_tag): Likewise.
2229 (start_function): Likewise.
2230 (start_method): Likewise.
2231 * decl2.c (finish_sigtable_vardecl): Remove.
2232 (flag_handle_signatures): Remove.
2233 (lang_f_options): Remove handle-signatures.
2234 (grokfield): Remove support for signatures.
2235 (grokbitfield): Likewise.
2236 (finish_file): Likewise.
2237 (reparse_absdcl_as_casts): Likewise.
2238 * error.c (dump_type_real): Likewise.
2239 (dump_function_decl): Likewise.
2240 * friend.c (make_friend_class): Likewise.
2241 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2242 * hash.h: Regenerated.
2243 * init.c (build_new_1): Remove support for signatures.
2244 * lang-options.h: Remove -fhandle-signatures,
2245 -fno-handle-signatures.
2246 * lex.c (init_parse): Remove support for signatures.
2247 (yyprint): Likewise.
2248 * lex.h (rid): Remove RID_SIGNATURE.
2249 * method.c (build_decl_overload_real): Remove support for
2250 signatures.
2251 (hack_identifier): Likewise.
2252 * parse.y (base_class): Likewise.
2253 (base_class.1): Likewise.
2254 (access_specifier): Likewise.
2255 * search.c (lookup_member): Likewise.
2256 * semantics.c (finish_qualified_object_call_expr): Likewise.
2257 (finish_template_type_parm): Likewise.
2258 (begin_class_definition): Likewise.
2259 (finish_base_specifier): Likewise.
2260 * sig.c: Remove.
2261 * tree.c (build_cplus_method_type): Remove support for signatures.
2262 * typeck.c (require_complete_type): Likewise.
2263 (c_sizeof): Likewise.
2264 (c_alignof): Likewise.
2265 (build_object_ref): Likewise.
2266 (build_component_ref): Likewise.
2267 (build_indirect_ref): Likewise.
2268 (build_c_cast): Likewise.
2269 (build_modify_expr): Likewise.
2270 (convert_for_initialization): Likewise.
2271 * typeck2.c (signature_error): Remove.
2272 (store_init_value): Remove support for signatures.
2273 (digest_init): Likewise.
2274 (build_x_arrow): Likewise.
2275 (build_functional_cast): Likewise.
2276 * xref.c (GNU_xref_decl): Likewise.
2277
2278 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2279
2280 * lex.c (do_identifier): Remove unnecessary lookup of class field.
2281
2282 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2283
2284 * decl2.c (set_decl_namespace): Do not complain about non-matching
2285 decls if processing a template.
2286
2287 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2288
2289 * decl.c (build_ptrmemfunc_type): Handle qualified
2290 pointer-to-member types here.
2291 * tree.c (cp_build_qualified_type_real): Simplify handling here.
2292
2293 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2294
2295 * lex.c (lang_identify): Likewise.
2296
2297 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
2298
2299 * Makefile.in: Update dependencies.
2300 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2301 NULL_RTX.
2302 * decl.c: Include "function.h"
2303 (cleanup_label, return_label): Delete declarations.
2304 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2305 (finish_function): Rename last_parm_insn variable to
2306 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
2307 * decl2.c: Include "function.h".
2308 (rtl_expr_chain): Delete declaration.
2309 * method.c: Include "function.h"
2310 * tree.c (build_vbase_pointer_fields): Don't initialize
2311 DECL_SAVED_INSNS with NULL_RTX.
2312 * typeck.c: Include "function.h"
2313
2314 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
2315
2316 * semantics.c (begin_function_try_block, finish_function_try_block,
2317 finish_function_handler_sequence): New fns.
2318 * parse.y (function_try_block): Use them.
2319 * pt.c (instantiate_decl): Likewise.
2320
2321 * cp-tree.h: Declare in_function_try_handler.
2322 * decl.c: Define it.
2323 (start_function): Clear it.
2324 (struct cp_function, push_cp_function_context): Save it.
2325 (pop_cp_function_context): Restore it.
2326 * parse.y (function_try_block): Set and clear it.
2327 * except.c (expand_end_catch_block): Rethrow if we reach the end
2328 of a function-try-block handler in a ctor or dtor.
2329 * typeck.c (c_expand_return): Complain about returning from a
2330 function-try-block handler of a ctor.
2331
2332 * parse.y (function_try_block): Call end_protect_partials
2333 before expand_start_all_catch.
2334
2335 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
2336
2337 * decl.c (struct binding_level): Add eh_region field.
2338 (push_binding_level): Set it.
2339 (define_label): Complain about jumping into an EH block.
2340
2341 * ptree.c (print_lang_type): Print the real type of a PMF.
2342 Print what exceptions a fn type throws.
2343
2344 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2345
2346 * class.c (count_fields, add_fields_to_vec): Add static prototype.
2347
2348 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2349 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2350 char*.
2351
2352 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2353 Constify a char*.
2354
2355 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2356 char*.
2357
2358 * dump.c (queue_and_dump_index, dump_int, dump_string,
2359 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2360 a char*.
2361 (dump_stmt): Add static prototype.
2362
2363 * errfn.c (cp_thing): Constify a char*.
2364
2365 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2366 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2367 dump_expr): Constify a char*.
2368
2369 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2370 read_line_number): Add static prototype.
2371 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2372 (real_yylex): Move label `letter' into the scope where it is used.
2373
2374 * method.c (build_mangled_template_parm_index, build_overload_int,
2375 build_decl_overload_real, get_id_2): Constify a char*.
2376
2377 * search.c (check_final_overrider): Make static.
2378
2379 * typeck.c (composite_pointer_type): Constify a char*.
2380
2381 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2382
2383 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2384 we're looking at a class.
2385
2386 * decl.c (lookup_name_real): Set the complain flag if we're
2387 looking for a namespace member.
2388
2389 * lex.c (real_yylex): We can have a number with no digits.
2390
2391 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2392
2393 * search.c (binfo_from_vbase): New fn.
2394 * cp-tree.h: Declare it.
2395 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2396 from pointer to member of virtual base.
2397 * typeck.c (get_delta_difference): Likewise.
2398
2399 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
2400
2401 * pt.c (tsubst): Use build_index_type to build in-template array
2402 index type. Fixes g++.oliva/dwarf1.C.
2403 * decl.c (grokdeclarator): Likewise, just for consistency, as it
2404 doesn't seem to trigger the bug without it.
2405
2406 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2407
2408 * typeck2.c (add_exception_specifier): Use complete_type.
2409
2410 1999-08-06 Mark Mitchell <mark@codesourcery.com>
2411
2412 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2413 (dump_binary_op): Bulletproof.
2414 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2415 * tree.c (search_tree): Don't enumerate all the nodes of classes
2416 `1', `2', and `<'; handle them generically. Don't be sorry about
2417 "unrecognized tree codes"; just abort.
2418 (no_linkage_check): Don't do linkage checks for templates.
2419
2420 * tree.c (cp_build_qualified_type_real): Handle
2421 pointer-to-member-function types correctly.
2422
2423 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
2424
2425 * decl.c (pushdecl): Only give an error for shadowing a parm
2426 from *this* function.
2427
2428 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
2429
2430 * typeck2.c: Update URLs and mail addresses.
2431
2432 1999-08-04 Nathan Sidwell <nathan@acm.org>
2433
2434 * cp-tree.h (empty_except_spec): New global var.
2435 (compexcepttypes): Remove prototype.
2436 (comp_except_specs): Prototype new global function.
2437 (add_exception_specifier): Prototype new global function.
2438 * decl.c (empty_except_spec): Define new global var.
2439 (duplicate_decls): Use comp_except_specs, reword error message.
2440 (init_decl_processing): Initialize empty_except_spec.
2441 Adjust build_exception_variant calls.
2442 * parse.y (exception_specification_opt): Use empty_except_spec.
2443 (ansi_raise_identifier): Call check_for_new_type.
2444 (ansi_raise_identifiers): Use add_exception_specifier.
2445 * pt.c (tsubst): Use add_exception_specifier to build exception
2446 specifier.
2447 * search.c (check_final_overrider): New static function, broken
2448 out of get_matching_virtual. Check throw specifiers, reword
2449 diagnostics.
2450 (get_matching_virtual): Use check_final_overrider.
2451 * tree.c (build_exception_variant): Use comp_except_specs.
2452 * typeck.c (compexcepttypes): Remove.
2453 (comp_except_types): New static function, helper for
2454 comp_except_specs. Compare two types as exception specifiers.
2455 (comp_except_specs): New global function, compare two exception
2456 specifiers.
2457 (comptypes): Adjust for comp_except_specs.
2458 * typeck2.c (add_exception_specifier): New global function.
2459
2460 * class.c (check_for_override): Reword error message.
2461
2462 1999-08-03 Nathan Sidwell <nathan@acm.org>
2463
2464 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2465 * cp-tree.h (struct lang_type): Added non_pod_class flag.
2466 (CLASSTYPE_NON_POD_P): New macro to access it.
2467 * class.c (finish_struct_1): Determine non-PODness.
2468 Check for arrays of pointers (-Weffc++).
2469 Remove array inspection duplicated code.
2470 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2471 Use CLASSTYPE_NON_POD_P.
2472
2473 1999-08-03 Nathan Sidwell <nathan@acm.org>
2474
2475 * class.c (duplicate_tag_error): Preserve template information.
2476
2477 1999-08-03 Nathan Sidwell <nathan@acm.org>
2478
2479 * decl.c (start_enum): Show location of previous definition.
2480 * parse.y (enumlist_opt): New reduction.
2481 (structsp): Simplify enum rules to use enumlist_opt.
2482
2483 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
2484
2485 * lex.c (yyprint): Handle PFUNCNAME.
2486
2487 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2488 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2489
2490 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
2491
2492 * decl.c (start_decl): Set attributes before duplicate_decls call.
2493
2494 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2495
2496 * Make-lang.in (CXX_SRCS): Add dump.c.
2497 * Makefile.in (CXX_OBJS): Add dump.o.
2498 (dump.o): New target.
2499 * cp-tree.h (DECL_CONV_FN_P): Document.
2500 (DECL_OVERLOADED_OPERATOR_P): New function.
2501 (TYPE_PTRMEM_CLASS_TYPE): New macro.
2502 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2503 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2504 (ASM_VOLATILE_P): New macro.
2505 (STMT_LINENO): Likewise.
2506 (cp_namespace_decls): New function.
2507 (dump_node_to_file): New function.
2508 * decl.c (cp_namespace_decls): New function.
2509 (walk_namespaces_r): Use it.
2510 (wrapup_globals_for_namespace): Likewise.
2511 * decl2.c (flag_dump_translation_unit): New variable.
2512 (lang_decode_option): Handle -fdump-translation-unit.
2513 (finish_file): If flag_dump_translation_unit is set, dump the
2514 translation unit.
2515 * dump.c: New file.
2516 * lang-options.h: Add -fdump-translation-unit.
2517 * pt.c (tsubst_template_parms): Robustify.
2518 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2519 (tsubst_expr): Use STMT_LINENO.
2520 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
2521 for invalid cv-qualifiers even while building templates.
2522
2523 1999-08-02 Richard Henderson <rth@cygnus.com>
2524
2525 * call.c: Include defaults.h instead of expr.h.
2526 * decl.c: Likewise.
2527 * pt.c: Likewise.
2528 * typeck.c: Include defaults.h.
2529
2530 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2531
2532 * lex.c (errorcount, sorrycount): Don't declare.
2533 * repo.c (errorcount, sorrycount): Likewise.
2534 * typeck2.c (errorcount, sorrycount): Likewise.
2535
2536 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2537
2538 * call.c (convert_default_arg, build_over_call): Change all uses of
2539 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2540 Ensure expr.h is included.
2541 * decl.c (grokparams): Ditto.
2542 * pt.c (tsubst_decl): Ditto.
2543 * typeck.c (convert_arguments): Ditto.
2544
2545 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
2546
2547 * class.c (mark_overriders): Fix order of args to overrides.
2548 (warn_hidden): Likewise. Fix for having virtual and non-virtual
2549 functions with the same name.
2550
2551 1999-08-02 Richard Henderson <rth@cygnus.com>
2552
2553 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2554
2555 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2556
2557 * call.c (build_conditional_expr): Fix typo in comment.
2558
2559 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
2560
2561 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2562 case_stack; use in_control_zone_p.
2563 * typeck.c (c_expand_return): Likewise.
2564
2565 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
2566
2567 * except.c (catch_clauses): Delete declaration.
2568
2569 1999-07-30 Mark Mitchell <mark@codesourcery.com>
2570
2571 * call.c (build_conditional_expr): Call convert_from_reference to
2572 avoid reference/non-reference type confusion. Fix typo.
2573
2574 1999-07-30 Richard Henderson <rth@cygnus.com>
2575
2576 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2577 * cp-tree.h (initializer_constant_valid_p): Remove.
2578
2579 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2580
2581 * call.c (conditional_conversion): Don't build BASE_CONVs for
2582 conversions between things that have the same type.
2583 (build_conditional_expr): Tweak.
2584 (convert_like): Some BASE_CONVs really do require the generation
2585 of code.
2586
2587 * init.c (perform_member_init): Don't go through build_modify_expr
2588 for simple initializations.
2589
2590 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
2591
2592 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2593 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2594 virtual functions and MI. Simplify.
2595
2596 * method.c: Remove prototype for largest_union_member.
2597 * pt.c (determine_specialization): Fix uninitialized warning.
2598 * lex.c (real_yylex): Likewise.
2599
2600 1999-07-27 Mark Mitchell <mark@codesourcery.com>
2601
2602 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2603 here too.
2604
2605 * cp-tree.h (BINFO_VIRTUALS): Document new format.
2606 * class.c (modify_one_vtable): Change prototype accordingly.
2607 (modify_all_vtables): Likewise.
2608 (modify_all_direct_vtables): Likewise.
2609 (modify_all_indirect_vtables): Likewise.
2610 (build_vtable_entry_for_fn): New function.
2611 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2612 (modify_vtable_entry): Likewise.
2613 (add_virtual_function): Likewise.
2614 (build_vtbl_initializer): New function.
2615 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2616 (fixup_vtable_deltas1): Likewise.
2617 (fixup_vtable_deltas): Likewise.
2618 (override_one_vtable): Likewise.
2619 (finish_struct_1): Likewise.
2620
2621 * error.c (dump_expr): Likewise.
2622 * search.c (get_abstract_virtuals_1): Likewise.
2623 (get_abstract_virtuals): Likewise.
2624 (expand_upcast_fixups): Likewise.
2625 * tree.c (debug_binfo): Likewise.
2626 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2627 __pure_virtual here.
2628
2629 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2630
2631 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2632 as per 1999-07-26 change.
2633
2634 * typeck.c (c_sizeof): Don't allow non-static data members.
2635 (expr_sizeof): Likewise.
2636
2637 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
2638
2639 * input.c (feed_input): Only touch lineno and input_filename
2640 if !USE_CPPLIB. Save the old values before setting the new ones.
2641
2642 * input.c (feed_input): Add file, line parms.
2643 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2644 (real_yylex): Check linemode before input_redirected().
2645
2646 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2647 from op new to warning.
2648
2649 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2650
2651 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2652 * call.c: All uses changed.
2653 * typeck.c: Likewise.
2654
2655 1999-07-26 Nathan Sidwell <nathan@acm.org>
2656
2657 * exception.cc (__cplus_type_matcher): Match __eh_matcher
2658 prototype.
2659
2660 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2661
2662 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2663 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2664 (strip_top_quals): Declare.
2665 (ncp_convert): Likewise.
2666 (type_after_usual_arithmetic_converions): Likewise.
2667 (composite_pointer_type): Likewise.
2668 * call.c (strip_top_quals): Don't make it static.
2669 (promoted_arithmetic_type_p): New function.
2670 (conditional_conversion): Likewise.
2671 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2672 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
2673 for converting a type to itself.
2674 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2675 (implicit_conversion): Make sure the from and to types are
2676 complete.
2677 (add_builtin_candidate): Correct handling of ?: operator.
2678 (add_builtin_candidates): Improve documentation.
2679 (build_conditional_expr): New function.
2680 (can_convert): Implement in terms of can_convert_arg.
2681 (ncp_convert): New function.
2682 * typeck.c (type_after_usual_arithmetic_conversions): New
2683 function, split out from common_type.
2684 (composite_pointer_type): New function, split out from
2685 build_conditional_expr.
2686 (common_type): Use type_after_usual_arithmetic_conversions.
2687 Remove redundant attribute merging.
2688 (comptypes): Tidy. Handle COMPLEX_TYPE.
2689 (build_binary_op_nodefault): Use null_ptr_cst_p.
2690 (build_conditional_expr): Remove.
2691 (convert_for_assignment): Use new conversion functions.
2692
2693 * cp-tree.h (abstract_virtuals_error): Change declaration.
2694 * typeck2.c (abstract_virtuals_error): Check to see if an error
2695 ocurred, and return a boolean value accordingly.
2696 (build_functional_cast): Adjust accordingly.
2697 * class.c (finish_struct_1): Likewise.
2698 * cvt.c (ocp_convert): Likewise.
2699 * decl.c (cp_finish_decl): Likewise.
2700 (grokparams): Likewise.
2701 (grok_op_properties): Likewise.
2702 (start_function): Likewise.
2703 * init.c (build_new_1): Likewise.
2704
2705 * pt.c (unify): Don't get confused by pointers-to-member functions.
2706
2707 * search.c (build_cplus_new): Robustify.
2708
2709 1999-07-24 Richard Henderson <rth@cygnus.com>
2710
2711 * gxx.gperf (__builtin_va_arg): New.
2712 * parse.y (VA_ARG): New token.
2713 (unary_expr): Recognize it.
2714
2715 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2716
2717 * g++FAQ.texi: Deleted per Joe Buck's request.
2718 * Makefile.in: Corresponding changes.
2719
2720 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2721
2722 * lex.c: Sync with C frontend.
2723 (whitespace_cr): New fn.
2724 (skip_white_space): Use it.
2725 (init_parse): Reorder.
2726 (yyprint): Support CONSTANT.
2727 (pragma_getc, pragma_ungetc): Bring back.
2728 (read_line_number): Change in_system_header directly.
2729 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2730 (parse_float): Update to C version.
2731 (yylex): Handle '$' under the letter case.
2732 Remove looking_for_typename handling.
2733 Support hex floating point constants.
2734 Follow C's lead for choosing type of integer constants.
2735 Rearrange stuff to match C frontend.
2736 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2737 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2738
2739 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2740
2741 * call.c (reference_binding): Tweak.
2742 (mayble_handle_implicit_object): Use direct_reference_binding to
2743 create the right implicit conversion sequence.
2744
2745 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2746
2747 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2748 if we're converting to a reference type.
2749
2750 * call.c (NEED_TEMPORARY_P): New macro.
2751 (standard_conversion): Set it, for derived-to-base conversions.
2752 (reference_related_p): New function.
2753 (reference_compatible_p): Likewise.
2754 (convert_class_to_reference): Likewise.
2755 (direct_reference_binding): Likewise.
2756 (reference_binding): Rework for standards-compliance.
2757 (convert_like): Adjust accordingly.
2758 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2759 are now built up in reference_binding.
2760 (initialize_reference): New function.
2761 * cp-tree.h (ICS_USER_FLAG): Document.
2762 (ICS_THIS_FLAG): Likewise.
2763 (ICS_BAD_FLAG): Likewise.
2764 (NEED_TEMPORARY_P): Likewise.
2765 (cp_lvalue_kind): New type.
2766 (real_lvalue_p): Return it.
2767 * error.c (dump_expr): Provide more accurate representation for
2768 AGGR_INIT_EXPRs.
2769 * init.c (expand_default_init): Do not try to perform implicit
2770 conversions for a brace-enclosed initializer.
2771 * search.c (lookup_conversions): Document.
2772 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2773 appropriately.
2774 (real_lvalue_p): Adjust accordingly.
2775 (lvalue_p): Likewise.
2776 (build_cplus_new): Don't allow the creation of an abstract class.
2777 * typeck.c (convert_for_initialization): Use initialize_reference.
2778
2779 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2780
2781 * lex.c (real_yylex) : Correct the test for overflow when lexing
2782 integer literals.
2783
2784 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2785
2786 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2787 not DECL_BUILT_IN, to determine if a function is internally declared.
2788 (duplicate_decls): Likewise. Improve handling of builtins.
2789 (push_overloaded_decl): Remove special handling of builtins.
2790
2791 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2792
2793 * decl.c (grokdeclarator): Pull out decl_constant_value in
2794 templates, too.
2795
2796 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2797 * cp-tree.h, pt.c, semantics.c: Adjust.
2798 * method.c (largest_union_member): Remove.
2799
2800 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2801
2802 * lex.c (token_getch, token_put_back): New fns.
2803 (real_yylex): Use them.
2804
2805 * lex.c (lang_init): Generalize.
2806 (lang_init_options): Tell cpplib this is C++.
2807 (nextchar): Remove. Replace uses with put_back.
2808 (skip_white_space): Handle linemode here. Optimize for cpplib.
2809 (extend_token_buffer_to): New fn.
2810 (extend_token_buffer): Use it.
2811 (read_line_number, check_newline): Just deal with tokens.
2812 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2813 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2814 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2815 * parse.y (PAREN_STAR_PAREN): Remove.
2816 * input.c: Don't use the putback machinery with cpplib.
2817 (sub_getch): Fold back into getch.
2818 (getch): Don't handle linemode here.
2819 (feed_input): Unget any text in the token buffer.
2820
2821 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2822 nextyychar, nextyylval): Remove.
2823
2824 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2825 Jason Merrill <jason@yorick.cygnus.com>
2826
2827 * lex.c (indent_level): New variable.
2828 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2829 (consume_string): Make this smart about USE_CPPLIB.
2830 (yyungetc): Use put_back function.
2831 (pragma_getc, pragma_ungetc): Functions deleted.
2832 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2833 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2834 pragma_ungetc.
2835 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2836 Also, clean up cases where we redundantly set token_buffer[0].
2837 (read_line_number): New fn.
2838 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2839 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2840 (sub_getch): Conditionalize out code that's not appropriate if
2841 USE_CPPLIB.
2842 (put_back): Rewrite in case USE_CPPLIB is defined.
2843 (input_redirected): Ditto.
2844
2845 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2846
2847 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2848 c_global_trees and accessor macros defined in c-common.h.
2849 (cp_tree_index): New enumeration.
2850 (cp_global_trees): Declare new array. Add accessor macros for it, and
2851 delete declarations of tree nodes replaced by it.
2852 (builtin_function): Delete macro, add declaration for new function.
2853 Include c-common.h.
2854 * decl.c: Delete definitions for tree nodes that were replaced by
2855 cp_global_trees and c_global_trees.
2856 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2857 to generate the common builtins here.
2858 (builtin_function): New function.
2859 * decl2.c (abort_fndecl): Delete declaration.
2860 * except.c (expand_builtin_return_address): Delete declaration.
2861 (builtin_return_address_fndecl): Delete variable.
2862 (const_ptr_type_node): Delete declaration.
2863 * lex.c (cons_up_default_function): Delete declaration of
2864 void_list_node.
2865 * parse.y (void_list_node): Delete declaration.
2866 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2867 Delete variables.
2868 (const_string_type_node): Delete declaration.
2869 * search.c (abort_fndecl): Delete declaration.
2870 * Makefile.in: Update dependencies.
2871
2872 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2873
2874 * pt.c (check_default_tmpl_args): Move test for missing default
2875 arguments here, from ...
2876 (end_template_parm_list): Here.
2877
2878 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2879
2880 * decl.c (lookup_nested_type): Remove.
2881 (pushtag): Don't call it.
2882
2883 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2884
2885 * Makefile.in (INTERFACE): Bump to 2.
2886
2887 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2888
2889 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2890 instructions to gcc.gnu.org. Removed e-mail address.
2891
2892 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2893
2894 * pt.c (determine_specialization): Tighten error-checking.
2895 (end_template_parm_list): Likewise.
2896
2897 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2898
2899 * pt.c (check_default_tmpl_args): Handle friends defined in the
2900 class just like member functions defined in the class.
2901
2902 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2903 Jason Merrill <jason@yorick.cygnus.com>
2904
2905 * cp-tree.h (struct lang_decl): Added field for storing sorted
2906 FIELD_DECLs (used in TYPE_DECLs).
2907 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2908 (DECL_SORTED_FIELDS): New macro.
2909 * class.c (method_name_cmp): New function.
2910 (finish_struct_methods): Modified to support sorting and searching
2911 methods.
2912 (finish_struct_anon): Changed code in inner loop to use ELT rather
2913 than UELT (which required an extra indirection for every reference).
2914 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2915 (finish_struct_1): Sort fields.
2916 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2917 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2918 Also, switch to using array indexing rather than a changing pointer.
2919 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2920 DECL_SORTED_FIELDS.
2921
2922 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2923
2924 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2925 casts in system headers or extern "C" blocks.
2926
2927 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2928 errors to pedwarn.
2929
2930 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2931
2932 * decl2.c (write_virtuals): Deleted declaration.
2933 * cp-tree.h (write_virtuals): Deleted extern declaration.
2934 * class.c (finish_struct_1): Removed #if 0'd code that mentions
2935 write_virtuals.
2936 * semantics.c (begin_class_definition): Rewrite code to not depend
2937 on write_virtuals.
2938
2939 * lex.c (cp_pragma_interface): New function.
2940 (cp_pragma_implementation): Likewise.
2941 (handle_cp_pragma): Call them.
2942
2943 * typeck.c (comptypes): Simplify C code in look_hard.
2944
2945 * xref.c (PALLOC): Use xcalloc, not calloc.
2946 (SALLOC): Use xmalloc, not malloc.
2947
2948 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2949
2950 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2951 is NO_DEBUG.
2952
2953 * decl.c (duplicate_decls): If a redeclaration doesn't match the
2954 initial declaration, then don't save the inline info and by all
2955 means don't mark the function as a builtin function.
2956
2957 * decl.c (lookup_name_real): Set NONCLASS to 1 if
2958 CURRENT_CLASS_TYPE is 0.
2959
2960 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2961 NULL_TREE.
2962
2963 * ptree.c (print_lang_type): Added vtable-needs-writing.
2964
2965 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
2966
2967 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2968
2969 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
2970
2971 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2972 Merged into c-common.
2973
2974 1999-07-05 Dave Brolley <brolley@cygnus.com>
2975
2976 * lex.c (errorcount): Declare it.
2977 (finish_parse): Update errorcount for when using CPPLIB.
2978
2979 1999-07-05 Mark Mitchell <mark@codesourcery.com>
2980
2981 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2982 parameters.
2983 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2984 * decl.c (push_class_binding): Use it.
2985 (lookup_name_real): Likewise.
2986
2987 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
2988
2989 * cp-tree.h (widest_integer_literal_type_node,
2990 widest_unsigned_literal_type) : New.
2991 * decl.c (widest_integer_literal_type_node,
2992 widest_unsigned_literal_type) : New.
2993 (init_decl_processing): Handle/use the two new types.
2994 * lex.c (real_yylex): Same.
2995 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2996 Same.
2997
2998 1999-07-01 Mark Mitchell <mark@codesourcery.com>
2999
3000 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3001 to anonymous cv-qualified types.
3002
3003 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
3004
3005 * lex.c (real_yylex) : Change integer literal overflow handling to
3006 be like c-lex.c.
3007
3008 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3009
3010 1999-06-28 Richard Henderson <rth@cygnus.com>
3011
3012 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3013
3014 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
3015
3016 * error.c (dump_type_real): Handle TREE_LIST again.
3017
3018 * typeck.c (comp_target_parms): Don't complain about
3019 converting from () to (...) if !flag_strict_prototype.
3020
3021 * decl.c (grokdeclarator): Update the names of all variants when
3022 de-anonymizing.
3023
3024 1999-06-21 Mark Mitchell <mark@codesourcery.com>
3025
3026 * init.c (expand_aggr_vbase_init): Rename to
3027 construct_virtual_bases. Conditionalize construction here,
3028 rather than ...
3029 (emit_base_init): Here.
3030
3031 1999-06-19 Mark Mitchell <mark@codesourcery.com>
3032
3033 * semantics.c (finish_asm_statement): Apply decay conversions to
3034 input operands.
3035
3036 * decl.c (expand_static_init): When building an anonymous function
3037 for use with atexit, compute its body before and after entering
3038 the function.
3039
3040 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3041 EXIT_EXPR.
3042
3043 1999-06-18 Mark Mitchell <mark@codesourcery.com>
3044
3045 * init.c (expand_aggr_vbase_init): Add flag parameter.
3046 (build_partial_cleanup_for): Remove, inlining into ..
3047 (expand_cleanup_for_base): ... here. Take flag parameter.
3048 (emit_base_init): Pass the in_chrg parameter to
3049 emit_aggr_vbase_init.
3050 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3051
3052 1999-06-16 Mark Mitchell <mark@codesourcery.com>
3053
3054 * decl2.c (import_export_decl): Use same_type_p, rather than
3055 relying on pointer-equality for types.
3056
3057 * method.c (do_build_copy_constructor): Simplify.
3058
3059 * call.c (build_method_call): Remove bogus code for two-argument
3060 delete.
3061 * init.c (build_new_1): Expand on comment, and remove dead code.
3062
3063 * init.c (expand_cleanup_for_base): New function, split out
3064 from ...
3065 (emit_base_init): Here.
3066 (expand_aggr_vbase_init): Use it.
3067
3068 1999-06-15 Mark Mitchell <mark@codesourcery.com>
3069
3070 * cp-tree.h (class_cache_firstobj): Declare.
3071 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3072 * class.c (permanent_obstack): Remove declaration.
3073 (class_cache_firstobj): Make it global.
3074 (add_method): Don't use permanent_obstack directly.
3075 (pushclass): Only free the class_cache_obstack if we know how far
3076 back to free it.
3077 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3078 * decl.c: Remove dead comment.
3079 (saved_scope): Add class_cache_firstobj.
3080 (push_to_top_level): Save it.
3081 (pop_from_top_level): Restore it.
3082 (push_class_level_binding): Use push_cache_obstack, not
3083 maybe_push_cache_obstack.
3084 * search.c (push_class_decls): Likewise.
3085
3086 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3087
3088 * pt.c (tsubst_friend_function): Push into namespace of friend
3089 function before pushdecl'ing it.
3090
3091 1999-06-14 Nathan Sidwell <nathan@acm.org>
3092
3093 * call.c (build_new_op): Remove REF_BIND from all operands.
3094
3095 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
3096
3097 * init.c (build_new_1): Look up operator delete even if there was
3098 no explicit new placement.
3099
3100 1999-06-08 Nathan Sidwell <nathan@acm.org>
3101
3102 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3103 of ...
3104 (build_throw): ... here. Call it.
3105 (process_start_catch_block): Call it.
3106
3107 1999-06-07 Mark Mitchell <mark@codesourcery.com>
3108
3109 * search.c (convert_pointer_to_single_level): Reimplement without
3110 using get_binfo.
3111
3112 1999-06-06 Mark Mitchell <mark@codesourcery.com>
3113
3114 * method.c (is_back_referenceable_type): Back-reference bools when
3115 not squangling.
3116
3117 1999-06-07 Dave Brolley <brolley@cygnus.com>
3118
3119 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3120 * input.c (putback_buffer): New structure type.
3121 (putback): Replaces putback_char member.
3122 (putback): Replaces putback_char static variable.
3123 (feed_input): Use putback.
3124 (end_input): Use putback.
3125 (sub_getch): Use putback.
3126 (put_back): Use putback.
3127
3128 1999-06-05 Mark Mitchell <mark@codesourcery.com>
3129
3130 * decl.c (grokdeclarator): Fix typo in last change.
3131
3132 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
3133
3134 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3135 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3136
3137 1999-06-04 Nathan Sidwell <nathan@acm.org>
3138
3139 * except.c (build_throw): Check throw expression validity.
3140
3141 1999-06-03 Mark Mitchell <mark@codesourcery.com>
3142
3143 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3144 just because flag_signed_bitfields is false.
3145
3146 1999-06-03 Nathan Sidwell <nathan@acm.org>
3147
3148 * semantics.c (begin_class_definition): Update the struct's
3149 location here ...
3150 * class.c (finish_struct): ... rather than here.
3151
3152 * decl.c (make_typename_type): Don't rely on uninitialized
3153 variable.
3154
3155 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3156
3157 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3158
3159 1999-05-31 Mark Mitchell <mark@codesourcery.com>
3160
3161 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3162 and friends rather than messing with current_obstack directly.
3163 (cp_build_qualified_type_real): Rework ARRAY_TYPE
3164 allocation to match practice throughout the rest of the
3165 compiler.
3166
3167 1999-05-30 Mark Mitchell <mark@codesourcery.com>
3168
3169 * lex.c (make_lang_type): Create TYPE_BINFO for
3170 TEMPLATE_TYPE_PARMs just like for non-template types.
3171
3172 * decl.c (start_decl): Move checks on initialization to ...
3173 (cp_finish_decl): Here. Tidy formatting slightly.
3174
3175 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3176
3177 * decl.c (add_binding): Don't complain about a redeclaration of a
3178 semantically identical typedef in a local scope.
3179
3180 1999-05-28 Nathan Sidwell <nathan@acm.org>
3181
3182 * decl.c (complete_array_type): Allocate off same obstack. Fix
3183 DO_DEFAULT comment to match reality.
3184
3185 * friend.c (make_friend_class): Fix diagnostic typo.
3186
3187 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3188
3189 * decl.c (lookup_namespace_name): Handle getting a
3190 TEMPLATE_ID_EXPR.
3191 (expand_static_init): Don't call pushdecl for implicitly declared
3192 `atexit' used to register destructors.
3193
3194 1999-05-25 Mark Mitchell <mark@codesourcery.com>
3195
3196 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3197 intialize a vtable.
3198
3199 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3200 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
3201 by combining TEMPLATE_INFO and LEVEL into a single union.
3202 (DECL_TEMPLATE_INFO): Reformat.
3203 (DECL_SAVED_TREE): Document.
3204 (DECL_TEMPLATE_INJECT): Remove.
3205 * class.c (finish_struct): Remove code to deal with
3206 DECL_TEMPLATE_INJECT.
3207
3208 * decl.c (maybe_process_template_type_declaration): Handle all new
3209 types in templates uniformly.
3210 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3211 DECL_CONTEXT.
3212 * pt.c (lookup_template_class): Inject template instantiations of
3213 forward-declarations.
3214 (instantiate_class_template): Remove code processing
3215 DECL_TEMPLATE_INJECT.
3216
3217 * pt.c (lookup_template_class): Tweak lookup to find member
3218 templates.
3219
3220 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3221 ASM_CV_QUAL.
3222 * semantics.c (finish_asm_stmt): Make strings permanent if they're
3223 used in a template.
3224
3225 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
3226
3227 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3228 parts of pointer to data member types.
3229
3230 1999-05-24 Mark Mitchell <mark@codesourcery.com>
3231
3232 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3233 and then make it look like `abort'. Just use `abort' instead.
3234
3235 * typeck.c (build_static_cast): Don't allow static_casts that cast
3236 away constness.
3237 (casts_away_constness_r): New function.
3238 (casts_away_constness): Likewise.
3239
3240 * decl.c (lookup_tag): Remove code no longer needed after
3241 name-lookup improvements.
3242 * decl2.c (handle_class_head): Make error-recovery more robust.
3243 * friend.c (make_friend_class): Reject templated typename types.
3244 * lex.c (is_global): A template parameter isn't global.
3245 * parse.y (class_head): Robustify.
3246 * parse.c: Regenerated.
3247
3248 1999-05-22 Mark Mitchell <mark@codesourcery.com>
3249
3250 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3251 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
3252
3253 * cp-tree.h (push_nested_namespace): Declare.
3254 (pop_nested_namespace): Likewise.
3255 * decl.c (push_nested_namespace): New function.
3256 (pop_nested_namespace): Likewise.
3257 * pt.c (instantiate_class_template): Use them.
3258
3259 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3260
3261 * cp-tree.h (cplus_expand_constant): Declare.
3262 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3263 converted from one pointer-to-object type to another.
3264 * expr.c (cplus_expand_constant): Don't make it static.
3265 * typeck.c (build_component_ref): Don't crash when presented with
3266 a component which is a TEMPLATE_DECL.
3267 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
3268 cast from a pointer-to-member constant to its own type does not
3269 result in a valid non-type template argument.
3270
3271 1999-05-21 Mark Mitchell <mark@codesourcery.com>
3272 Nathan Sidwell <nathan@acm.org>
3273
3274 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3275 * cp-tree.h: Fix typo in documentation on pointers-to-members.
3276 (cp_build_qualified_type): Make it a macro.
3277 (cp_build_qualified_type_real): Declare.
3278 * decl.c (grokdeclarator): Remove misleading comment. Avoid
3279 problem with template parameters and restrict-qualification.
3280 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3281 * hash.h: Regenerated.
3282 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3283 the enumeration.
3284 (NORID): Remove definition.
3285 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3286 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
3287 (fn_type_unification): Check that the function type resulting from
3288 the deduction is legal.
3289 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3290 (unify): Use cp_build_qualified_type_real.
3291 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3292 (cp_build_qualified_type): Rename to ...
3293 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3294 and modify appropriately.
3295
3296 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3297 reveal optimization opportunities.
3298
3299 * pt.c (tsubst): Don't issue error messages when we're not
3300 complaining, even if we see a qualified function type.
3301 (check_cv_quals_for_unify): Don't allow a qualified function
3302 type.
3303
3304 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3305
3306 * class.c (instantiate_type): Downgrade errors for object-dependent
3307 memfn refs to pedwarn.
3308
3309 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3310
3311 * decl.c (grokdeclarator): Don't treat [] as indicating a
3312 zero-sized array in a typedef.
3313
3314 * call.c (build_object_call): Don't look at DECL_NAME for a type.
3315 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3316 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3317
3318 * pt.c (for_each_template_parm): Rework to match documentation.
3319 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3320
3321 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3322
3323 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3324
3325 * class.c (finish_base_struct): Allow non-COM bases for COM classes
3326 except at the leftmost position.
3327 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3328 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3329 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3330
3331 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3332 (build_cplus_new): Make sure that what we return is of the right type.
3333
3334 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3335
3336 * cp-tree.h (make_ptrmem_cst): New function.
3337 * expr.c (cplus_expand_constant): Split out from ...
3338 (cplus_expand_expr): Here. Use cplus_expand_constant.
3339 (init_cplus_expand): Set lang_expand_constant.
3340 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3341
3342 * tree.c (make_ptrmem_cst): Define.
3343 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3344 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3345
3346 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3347
3348 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3349
3350 * decl2.c (start_static_storage_duration_function): Fix comment.
3351 (finish_file): Create static storage duration functions lazily.
3352
3353 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3354
3355 Implement anonymous structs.
3356 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3357 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3358 * class.c (finish_struct_1): Remove redundant check for anon struct.
3359 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3360 (check_tag_decl): Check for anonymous struct here.
3361 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3362 * init.c (sort_member_init, emit_base_init): Handle getting fields
3363 as well as names in current_member_init_list.
3364 (perform_member_init): Handle getting an anon aggr.
3365 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3366 (do_build_copy_constructor): Likewise.
3367
3368 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3369
3370 * tree.c (cp_build_qualified_type): Don't allow qualified function
3371 types.
3372
3373 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
3374
3375 * gxxint.texi: Fix typo.
3376
3377 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3378
3379 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3380 * class.c (finish_struct_1): Use CLASS_TYPE_P.
3381 * ptree.c (print_lang_type): Likewise.
3382 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3383 IS_AGGR_TYPE_CODE.
3384 * typeck2.c (digest_init): Likewise.
3385
3386 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
3387
3388 * call.c (joust): Compare the types of the conv ops, not the
3389 target types of the conversions.
3390
3391 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
3392
3393 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3394 was not given.
3395
3396 1999-05-17 Mark Mitchell <mark@codesourcery.com>
3397
3398 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3399 * decl.c (grokfndecl): Don't allow inline declarations of friend
3400 template specializations, or friend template specializations with
3401 default arguments.
3402 * pt.c (tsubst): Handle substitution into array types that does
3403 not yield a fixed upper bound, even when not processing a
3404 template.
3405 (tsubst_copy): Deal with the fact that the second operand to a
3406 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3407 * search.c (marked_pushdecls_p): Don't descend into
3408 TEMPLATE_TYPE_PARMs and the like.
3409 (unmarked_pushdecls_p): Likewise.
3410
3411 * call.c (build_over_call): Don't throw away
3412 initializations/copies of empty classes; use MODIFY_EXPR and
3413 INIT_EXPR as for non-empty classes.
3414 * class.c (finish_struct_1): Put the padding byte for an empty
3415 class on the TYPE_NONCOPIED_PARTS list for the class.
3416
3417 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3418
3419 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3420 indicate a reference to a field that is a qualified name.
3421
3422 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
3423
3424 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3425 ASM_OUTPUT_CONSTRUCTOR.
3426
3427 * friend.c (do_friend): Add attrlist arg. Remove support for
3428 getting a non-decl as 'decl'.
3429 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
3430 rtl.
3431 (grokdeclarator): Adjust.
3432 * cp-tree.h: Adjust.
3433
3434 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3435
3436 * cp-tree.h (permanent_p): New function.
3437 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3438 possibly complex tree node.
3439 * tree.c (mapcar): Adjust comments, and follow coding standards in
3440 conditional.
3441 (permanent_p): New function.
3442
3443 1999-05-13 Per Bothner <bothner@cygnus.com>
3444
3445 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
3446 primitive Java types, if we actually see `extern "Java"'.
3447
3448 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3449
3450 * lang-specs.h: Pass -$ to the preprocessor.
3451
3452 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
3453
3454 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3455 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3456 (resolve_offset_ref): Don't handle a raw baselink.
3457 * cvt.c (build_expr_type_conversion): Likewise.
3458 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3459 convert_for_initialization): Likewise.
3460 * class.c (instantiate_type): Handle seeing a baselink under an
3461 OFFSET_REF.
3462 * error.c (dump_expr): Likewise.
3463 * pt.c (for_each_template_parm): Likewise.
3464 (resolve_overloaded_unification): Likewise.
3465 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3466 * typeck.c (expr_sizeof): Also complain about other permutations
3467 of overloaded functions.
3468
3469 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
3470
3471 * init.c (resolve_offset_ref): Don't return a raw method.
3472 Use BASELINK_P.
3473 * typeck.c (decay_conversion): Don't handle a raw method.
3474 Resolve all OFFSET_REFs.
3475 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3476 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
3477 same_type_p for pmf bits. Don't use build_binary_op to compare
3478 raw pointers to methods.
3479 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3480 to decide when to call resolve_offset_ref.
3481 (build_c_cast, convert_for_initialization): Likewise.
3482 * cvt.c (build_expr_type_conversion): Likewise.
3483
3484 1999-05-06 Nathan Sidwell <nathan@acm.org>
3485
3486 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3487
3488 1999-05-05 Mark Mitchell <mark@codesourcery.com>
3489
3490 * decl2.c (start_objects): Don't let static constructors and
3491 destructors get inlined.
3492
3493 * parse.y (nested_name_specifier): Make sure ordinary types are
3494 complete, just like template types.
3495 * parse.c: Regenerated.
3496
3497 * pt.c (check_explicit_specialization): Improve error messages.
3498
3499 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
3500
3501 * typeck.c (string_conv_p): Use same_type_p to check whether we
3502 try to convert between char and wchar_t.
3503
3504 1999-05-03 Mark Mitchell <mark@codesourcery.com>
3505
3506 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3507 lookup to error_mark_node here.
3508 (lookup_member): Revise documentation. Add comments. Don't set
3509 the TREE_TYPE to error_mark_node here, and don't build up an extra
3510 TREE_LIST for ambiguous lookups.
3511 (setup_class_bindings): Adjust accordingly.
3512 (push_class_decls): Revise out-of-date comments.
3513
3514 * typeck.c (build_const_cast): Tighten checks for legality.
3515
3516 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3517
3518 * init.c (build_member_call): Lookup names coming from
3519 namespace-scoped LOOKUP_EXPR.
3520
3521 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
3522
3523 * gxxint.texi: Add documentation for 'I'.
3524
3525 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3526
3527 * tinfo.cc (operator==): Qualify type_info with std::.
3528
3529 1999-05-02 Mark Mitchell <mark@codesourcery.com>
3530
3531 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
3532 (DECL_COMDAT): Remove definition.
3533
3534 1999-05-01 Mark Mitchell <mark@codesourcery.com>
3535
3536 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3537 change.
3538
3539 1999-04-30 Mark Mitchell <mark@codesourcery.com>
3540
3541 * class.c (build_vtable): Use build_lang_decl when building
3542 vtables, not just build_decl.
3543 (prepare_fresh_vtable): Likewise.
3544 * decl.c (wrapup_globals_for_namespace): Mark vtables as
3545 DECL_EXTERNAL when calling wrapup_global_declarations.
3546 * decl2.c (priority_info_s): Add initializations_p and
3547 destructions_p members.
3548 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3549 when deciding what vtables to write out.
3550 (ssdf_decls): New variable.
3551 (ssdf_decls_used): Likewise.
3552 (start_static_storage_duration_function): Deal with being called
3553 multiple times. Avoid inlining this function.
3554 (generate_inits_for_priority): Deal with reuse of priority map.
3555 (get_priority_info): Clear initializations_p and destructions_p.
3556 (do_static_initialization): Tweak comment.
3557 (do_static_destruction): Likewise. Fix condition on sentries for
3558 destruction.
3559 (generate_ctor_or_dtor_function): Call all of the static storage
3560 duration functions.
3561 (generate_ctor_or_dtor_function_for_priority): Check
3562 initializations_p and destructions_p to see what priorities need
3563 initialization functions.
3564 (finish_file): Rework to generate multiple static storage duration
3565 functions, rather than just one.
3566
3567 * typeck.c (build_const_cast): Tweak last change to handle
3568 templates correctly.
3569
3570 * typeck.c (build_const_cast): Disallow use of const_cast to
3571 anything but a pointer or reference type.
3572
3573 1999-04-30 Nathan Sidwell <nathan@acm.org>
3574
3575 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3576 signature type.
3577
3578 1999-04-29 Mark Mitchell <mark@codesourcery.com>
3579
3580 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3581 (finish_file): Indent comments properly.
3582
3583 1999-04-29 Richard Henderson <rth@cygnus.com>
3584
3585 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3586 (do_static_destruction): Likewise.
3587
3588 1999-04-29 Nathan Sidwell <nathan@acm.org>
3589
3590 * cp-tree.h (TYPE_NOTHROW_P): New macro.
3591 * decl2.c (delete_sanity): Warn on deleting void *.
3592 * init.c (build_new_1): Use TYPE_NOTHROW_P.
3593 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3594 throwing operator new.
3595
3596 1999-04-28 Nathan Sidwell <nathan@acm.org>
3597
3598 * cp-tree.h (build_component_addr): Remove prototype.
3599 * typeck.c (build_component_addr): Make static. Remove MSG
3600 argument.
3601 (build_component_addr): Remove MSG parameter, clean up
3602 comment.
3603 (build_x_function_call): Use cp_error.
3604 (build_unary_op): Adjust call of build_component_addr.
3605
3606 1999-04-28 Mark Mitchell <mark@codesourcery.com>
3607
3608 * pt.c (tsubst_friend_class): Check for NULL.
3609
3610 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3611
3612 * search.c (binfo_for_vtable): Initialize bfvi.var.
3613
3614 1999-04-27 Nathan Sidwell <nathan@acm.org>
3615
3616 * rtti.c (build_x_typeid): Check rtti is enabled.
3617
3618 1999-04-26 Mark Mitchell <mark@codesourcery.com>
3619
3620 * search.c (is_subobject_of_p): Make sure we're looking at the
3621 right baseclasses.
3622
3623 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
3624
3625 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3626
3627 1999-04-23 Mark Mitchell <mark@codesourcery.com>
3628
3629 * decl2.c (finish_file): Tweak handling of extern inlines so that
3630 they are not unnecessarily put out.
3631
3632 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3633 such as base classes.
3634
3635 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
3636
3637 * tree.c (build_exception_variant): Fix typo: use the chain of U,
3638 not trying V, while cycling through U.
3639
3640 1999-04-22 Mark Mitchell <mark@codesourcery.com>
3641
3642 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3643 preserves_first_arg. Enlarge dummy accordingly.
3644 (DECL_TINFO_FN_P): New macro.
3645 (SET_DECL_TINFO_FN_P): Likeiwse.
3646 (DECL_RETURNS_FIRST_ARG): Remove.
3647 (DECL_PRESERVES_THIS): Likewise.
3648 (DECL_INIT_PRIORITY): New macro.
3649 (finish_struct_1): Change prototype.
3650 (cat_namespace_levels): Remove prototype.
3651 (vtable_decl_p): New prototype.
3652 (vtype_decl_p): Likewise.
3653 (sigtable_decl_p): Likewise.
3654 (walk_globals_pred): New typedef.
3655 (walk_globals_fn): Likewise.
3656 (walk_globals): New prototype.
3657 (walk_namespaces_fn): New typedef.
3658 (walk_namespaces): New prototype.
3659 (wrapup_globals_for_namespace): Likewise.
3660 (walk_vtables): Remove prototype.
3661 (walk_sigtables): Likewise.
3662 (instantiate_pending_templates): New prototype.
3663 * class.c (finish_struct_1): Don't return a value.
3664 * decl.h (pending_statics): Remove declaration.
3665 * decl.c (walk_namespaces_r): New function.
3666 (walk_globals_r): Likewise.
3667 (vtable_decl_p): Likewise.
3668 (vtype_decl_p): Likewise.
3669 (sigtable_decl_p): Likewise.
3670 (walk_namespaces): Likewise.
3671 (walk_globals_data): New type.
3672 (walk_globals): New function.
3673 (wrapup_globals_for_namespace): Likewise.
3674 (expand_static_init): Remove assertion. Remove redundancy in
3675 conditional. Don't put static data members in static_aggregates
3676 Tidy.
3677 (finish_function): Remove redundancy in conditional. Don't set
3678 DECL_RETURNS_FIRST_ARG.
3679 (cat_namespace_levels): Remove.
3680 * decl2.c: Include splay-tree.h and varray.h.
3681 (priority_info_s): New structure.
3682 (finish_vtable_vardecl): Change prototype. Adjust for new calling
3683 conventions.
3684 (prune_vtable_vardecl): Likewise.
3685 (finish_sigtable_vardecl): Likewise.
3686 (setup_initp): Remove.
3687 (do_dtors): Remove.
3688 (do_ctors): Remove.
3689 (start_static_storage_duration_function): New function.
3690 (generate_inits_for_priority): Likewise.
3691 (finish_static_storage_duration_function): Likewise.
3692 (get_priority_info): Likewise.
3693 (do_static_initialization): Likewise.
3694 (do_static_destruction): Likewise.
3695 (do_static_initialization_and_destruction): Likewise.
3696 (generate_ctor_or_dtor_function): Likewise.
3697 (generate_ctor_and_dtor_functions_for_priority): Likewise.
3698 (pending_statics): Make it a varray.
3699 (pending_statics_used): New variable.
3700 (saved_inlines): Make it a varray.
3701 (saved_inlines_used): New variable.
3702 (finish_static_data_member): Change method of updating
3703 pending_statics.
3704 (mark_inline_for_output): Remove #if 0'd code. Change method of
3705 updating saved_inlines.
3706 (walk_vtables): Remove.
3707 (walk_sigtables): Likewise.
3708 (import_export_decl): Use DECL_TINFO_FN_P.
3709 (pending_templates): Remove declaration.
3710 (maybe_templates): Likewise.
3711 (static_aggregates_initp): Likewise.
3712 (setup_initp): Likewise.
3713 (finish_objects): Simplify.
3714 (INITIALIZE_P_IDENTIFIER): New macro.
3715 (PRIORITY_IDENTIFIER): New macro.
3716 (SSDF_IDENTIFIER): New macro.
3717 (initialize_p_decl): New variable.
3718 (priority_decl): Likewise.
3719 (ssdf_decl): Likewise.
3720 (priority_info_map): Likewise.
3721 (finish_file): Recode output of static intializers and other
3722 file-scope finalization tasks.
3723 * error.c (OB_END_TEMPLATE_ID): New macro.
3724 (dump_type_real): Use it.
3725 (dump_decl): Likewise.
3726 (dump_function_name): Likewise.
3727 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3728 interface.
3729 (check_newline): Use walk_globals, not walk_vtables.
3730 * pt.c (pending_tempalte_expansions): Remove.
3731 (set_vardecl_interface_info): Likewise.
3732 (pending_templates): Make static.
3733 (maybe_templates): Likewise.
3734 (instantiate_class_template): Adjust call to finish_struct_1.
3735 (instantiate_pending_templates): New function.
3736 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3737 * tree.c (static_aggregates_initp): Remove.
3738 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3739 instead.
3740 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3741
3742 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3743 with the RTL code RETURN.
3744 * hash.h: Regenerated.
3745 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3746 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3747 * parse.c: Regenerated.
3748 * pt.c: Include varray.h. Include rtl.h since varray.h requires
3749 it.
3750 (inline_parm_levels): New variable.
3751 (inline_parm_levels_used): Likewise.
3752 (maybe_begin_member_template_processing): Update them.
3753 (maybe_end_member_template_processing): Use them, rather than
3754 guessing how many levels to pop.
3755
3756 * decl.c (make_typename_type): Tighten error-checking.
3757
3758 1999-04-20 Mark Mitchell <mark@codesourcery.com>
3759
3760 * cp-tree.h (build_binary_op): Remove unneeded parameter.
3761 * class.c (build_vrable_entry_ref): Adjust call to
3762 build_binary_op.
3763 * decl.c (expand_static_init): Likewise.
3764 (grokdeclarator): Likewise.
3765 (finish_function): Likewise.
3766 * decl2.c (delete_sanity): Likewise.
3767 (do_dtors): Likewise.
3768 (do_ctors): Likewise.
3769 * error.c (dump_type_suffix): Likewise.
3770 * expr.c (cplus_expand_expr): Likewise.
3771 * init.c (resolve_offset_ref): Likewise.
3772 (build_new): Likewise.
3773 (build_new_1): Likewise.
3774 (build_vec_delete_1): Likewise.
3775 (expand_vec_init_catch_clause): Likewise.
3776 (build_delete): Likewise.
3777 * pt.c (tsubst): Likewise.
3778 * rtti.c (synthesize_tinfo_fn): Likewise.
3779 * search.c (expand_upcast_fixups): Likewise.
3780 (expand_direct_vtbls_init): Likewise.
3781 * typeck.c (get_member_function_from_ptrfunc): Likewise.
3782 (build_binary_op_nodefault): Likewise.
3783 (point_int_sum): Likewise.
3784 (pointer_diff): Likewise.
3785 (build_unary_op): Likewise.
3786 (build_modify_expr): Likewise.
3787 (get_delta_difference): Likewise.
3788 (build_ptrmemfunc): Likewise.
3789 (expand_ptrmemfunc_cst): Likewise.
3790
3791 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
3792
3793 * decl.c (grokfndecl): Always call cplus_decl_attributes.
3794 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3795
3796 1999-04-19 Mark Mitchell <mark@codesourcery.com>
3797
3798 * cp-tree.h (finish_static_data_member_decl): New function.
3799 * decl2.c (finish_static_data_member_decl): Split out from ...
3800 (grokfield): Here.
3801 * pt.c (instantiate_class_template): Use it here instead of
3802 trying to fake it.
3803 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3804 finish_static_data_member_decl will do that. Explicit set
3805 DECL_EXTERNAL to match non-template processing.
3806
3807 1999-04-18 Mark Mitchell <mark@codesourcery.com>
3808
3809 * cp-tree.h (finish_class_definition): Add parameter.
3810 * parse.y (structsp): Use it. Don't call pop_scope here.
3811 * parse.c: Regenerated.
3812 * semantics.c (finish_class_definition): Pop it here.
3813
3814 1999-04-17 Mark Mitchell <mark@codesourcery.com>
3815
3816 * decl.c (xref_tag): Revise handling of nested template
3817 declarations.
3818 * pt.c (check_explicit_specialization): Tweak handling of friend
3819 templates in template classes.
3820 (tsubst_friend_class): Handle friend declarations for nested
3821 member template classes.
3822
3823 1999-04-16 Mark Mitchell <mark@codesourcery.com>
3824
3825 * class.c (finish_struct): Remove unused variable.
3826 (pushclass): Likewise.
3827 (invalidate_class_lookup_cache): Likewise.
3828 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3829 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3830 doesn't get obliterated.
3831 (make_typename_type): Handle template classes correctly.
3832
3833 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3834 (storetags): Declare.
3835 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3836 (pushclass): Likewise. Use storetags to install tag declarations,
3837 not pushtag.
3838 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3839 * decl.c (storetags): Make it global.
3840 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3841 implicit typename declaration.
3842 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
3843 * method.c (hack_identifier): Likewise.
3844 * search.c (lookup_member): Likewise.
3845
3846 * decl.c (warn_about_implicit_typename_lookup): New function.
3847 (lookup_name_real): Use it. Rework handling of implicit typename
3848 extension.
3849
3850 1999-04-15 Mark Mitchell <mark@codesourcery.com>
3851
3852 * cp-tree.h (lookup_nested_field): Remove.
3853 * class.c (push_nested_class): Handle UNION_TYPEs.
3854 (pop_nested_class): Likewise.
3855 * decl.c (lookup_name_real): Don't call lookup_nested_field.
3856 (start_decl): Use push_nested_class, not just pushclass.
3857 (cp_finish_decl): Use pop_nested_class, not just popclass.
3858 * search.c (lookup_nested_field): Remove.
3859
3860 * cp-tree.h (lang_type): Add documentation.
3861 * decl2.c (handle_class_head): Create template declarations here,
3862 as appropriate.
3863 * parse.y (class_head): Return whether or not we entered a new
3864 scope, as well as the type named.
3865 (named_class_head): Likewise.
3866 (named_complex_class_head_sans_basetype): Likewise.
3867 (structsp): Adjust accordingly. Pop scope when required.
3868 * parse.c: Regenerated.
3869 * pt.c (check_default_tmpl_args): Robustify.
3870 (redeclare_class_template): Likewise.
3871 (instantiate_class_template): An instantiation of an
3872 anonymous union is itself an anonymous union.
3873 * semantics.c (begin_class_definition): Don't create template
3874 declarations here.
3875
3876 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
3877
3878 * parse.y (after_type_declarator_intern): New nonterminal.
3879 (after_type_declarator): Use it.
3880 (direct_after_type_declarator): Likewise. Move above
3881 nonnested_type to fix reduce/reduce conflict resolution.
3882 (declmods): Reducing from just 'attributes' has EMPTY precedence.
3883 * Makefile.in (CONFLICTS): Update.
3884
3885 * decl.c (define_label): Downgrade error for jumping over a
3886 non-POD decl to pedwarn.
3887
3888 1999-04-14 Mark Mitchell <mark@codesourcery.com>
3889
3890 * cp-tree.h (popclass): Change declaration.
3891 (pop_nested_class): Likewise.
3892 (poplevel_class): Remove declaration.
3893 * call.c (convert_default_argument): Pass no arguments to
3894 popclass.
3895 * class.c (finish_struct_1): Likewise.
3896 (finish_struct): Likewise.
3897 (popclass): Remove argument. Simplify code accordingly.
3898 (pop_nested_class): Likewise.
3899 * decl.c (poplevel_class): Declare it here, and make it static.
3900 (poplevel): Handle class scopes.
3901 (poplevel_class): Don't take an rgument. Simplify.
3902 (pop_everything): Pass no arguments to pop_nested_class.
3903 (cp_finish_decl): Pass no arguments to popclass.
3904 (grokdeclarator): Pass no arguments to pop_nested_class.
3905 (finish_function): Likewise.
3906 * decl2.c (grokfield): Likewise.
3907 (pop_scope): Pass no arguments to popclass.
3908 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3909 * pt.c (instantiate_class_template): Move call to pushclass, and
3910 document. Pass no arguments to popclass.
3911 (regenerate_decl_from_template): Likewise.
3912
3913 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
3914
3915 * typeck.c (build_unary_op): Handle taking the address of a unique
3916 bound non-static member function.
3917
3918 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
3919
3920 * lang-options.h (-Wdeprecated): New flag.
3921 * decl2.c (warn_deprecated): New flag.
3922 (lang_decode_option): Deprecated this-is-variable,
3923 external-templates, alt-external-templates.
3924 Support -Wdeprecated.
3925 * errfn.c (cp_deprecated): New function.
3926
3927 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3928
3929 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3930 of the decls themselves.
3931
3932 * pt.c (tsubst_function_type): Copy attributes over.
3933
3934 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
3935 and com_interface.
3936 * cp-tree.h: Add prototype.
3937 * decl.c (init_decl_processing): Set valid_lang_attribute.
3938
3939 1999-04-13 Mark Mitchell <mark@codesourcery.com>
3940
3941 * class.c (finish_struct_1): Look at the const-ness of the field's
3942 type, not the TREE_READONLY-ness of the declaration.
3943 * method.c (synthesize_method): Likewise.
3944 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3945 creating new declarations.
3946
3947 1999-04-13 Mike Stump <mrs@wrs.com>
3948
3949 * decl2.c (import_export_decl): Because vtables always reference
3950 virtual functions, even if they are inlined, don't allow
3951 -fno-implement-inlines to not emit them, instead, emit them with
3952 the vtable.
3953 * decl.c (start_function): Likewise.
3954
3955 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
3956
3957 * cp-tree.h (struct lang_type): Add com_interface.
3958 (CLASSTYPE_COM_INTERFACE): New macro.
3959 * class.c (set_rtti_entry): COM interface classes have no RTTI
3960 entries in their vtables; adjust.
3961 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3962 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3963 finish_struct_1): Likewise.
3964 * decl2.c (mark_vtable_entries): Likewise.
3965 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3966 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3967 expand_upcast_fixups): Likewise.
3968 * tree.c (debug_binfo): Likewise.
3969
3970 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3971 * typeck.c (comptypes): If we get it, ignore attributes.
3972 * class.c (instantiate_type): Use BASELINK_P. Change complain
3973 parameter to flags; 2 means ignore attributes.
3974 * call.c (build_op_delete_call): Pass it.
3975
3976 * decl.c (xref_tag): Only complain once about using a typedef-name
3977 with 'struct'. Downgrade to pedwarn.
3978
3979 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3980
3981 * parse.y (absdcl_intern): New nonterminal.
3982 (absdcl, direct_abstract_declarator): Use it.
3983
3984 * pt.c (lookup_template_class): Look through implict typename.
3985
3986 1999-04-11 Mark Mitchell <mark@codesourcery.com>
3987
3988 * friend.c (add_friend): Deal gracefully with error_mark_node.
3989 * method.c (build_overload_value): Handle pointers-to-members as
3990 template parameters.
3991
3992 * decl.c (push_binding): Fix typo in comment.
3993
3994 1999-04-10 Mark Mitchell <mark@codesourcery.com>
3995
3996 * error.c (dump_type_real): If a typename is a template-id, put
3997 out the template arguments.
3998 (dump_expr): Handle TEMPLATE_ID_EXPR.
3999 * pt.c (lookup_template_class): Now that full arguments are
4000 available everywhere, remove code that tried to guess them.
4001
4002 1999-04-09 Mark Mitchell <mark@codesourcery.com>
4003
4004 * decl.c (make_typename_type): Complain if we don't find a type
4005 when trying to make a typename type for a non-template type.
4006
4007 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
4008
4009 * decl.c (start_decl): Pass attributes to grokdeclarator.
4010 (grokdeclarator): Handle attributes on constructor-syntax
4011 initializers.
4012
4013 1999-04-08 Mark Mitchell <mark@codesourcery.com>
4014
4015 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4016 don't have types.
4017
4018 * search.c (template_self_reference_p): Tweak.
4019
4020 1999-04-07 Mark Mitchell <mark@codesourcery.com>
4021
4022 * init.c (build_offset_ref): Don't build yet another weird data
4023 structure to describe overloaded functions.
4024
4025 1999-04-06 Mark Mitchell <mark@codesourcery.com>
4026
4027 * cp-tree.h (BASELINK_P): New macro.
4028 (SET_BASELINK_P): Likewise.
4029 * init.c (build_member_call): Remove needless assignment in if
4030 statement.
4031 * search.c (lookup_field_r): Fix handling when we are looking
4032 specifically for a type; these are not hidden by functions and
4033 variables.
4034 (lookup_member): Use SET_BASELINK_P.
4035 * tree.c (is_overloaded_fn): Use BASELINK_P.
4036 (really_overloaed_fn): Likewise.
4037 (get_first_fn): Likewise.
4038
4039 1999-04-05 Mark Mitchell <mark@codesourcery.com>
4040
4041 * decl.c (lookup_name_current_level): Tweak, and improve
4042 documentation.
4043
4044 * class.c (maybe_fixup_vptrs): Remove declaration.
4045 (build_class_init_list): Likewise.
4046 * decl.c (pushdecl_class_level): Call check_template_shadow here
4047 ...
4048 (push_class_level_binding): ... not here.
4049 * search.c (dfs_push_type_decls): Only avoid
4050 template-self-reference TYPE_DECLs if they are from base classes.
4051
4052 1999-04-04 Mark Mitchell <mark@codesourcery.com>
4053
4054 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4055 nodes. Tidy.
4056
4057 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
4058
4059 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4060 (finish_struct_1): Don't call build_class_init_list.
4061
4062 1999-04-02 Mark Mitchell <mark@codesourcery.com>
4063
4064 * tinfo.h (__class_type_info): Fix illegal declaration.
4065
4066 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4067 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4068 (IDENTIFIER_CLASS_VALUE): Improve documentation.
4069 (is_properly_derived_from): Declare.
4070 (invalidate_class_lookup_cache): Likewise.
4071 (maybe_maybe_note_name_used_in_class): Likewise.
4072 (note_name_declared_in_class): Likewise.
4073 (push_using_decl): Remove duplicate declaration.
4074 (id_in_current_class): Remove declaration.
4075 (push_class_binding): Change prototype.
4076 (clear_identitifer_class_values): Declare.
4077 * call.c (is_properly_derived_from): Make it global.
4078 (build_new_function_call): Be careful about updating candidates.
4079 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
4080 asked to make illegal calls.
4081 * class.c: Include splay-tree.h.
4082 (class_stack_node): Add names_used slot.
4083 (check_member_decl_is_same_in_complete_scope): Remove.
4084 (add_method): Fix comment. Push the declaration into class
4085 scope.
4086 (finish_struct_1): When popping the class, pop the bindings too.
4087 Remove check for data member/function member conflict.
4088 (finish_struct): Remove calls to
4089 check_member_decl_is_same_in_complete_scope. Change calls to
4090 popclass.
4091 (pushclass): Clear names_used in the class stack entry.
4092 Use invalidate_class_lookup_cache to remove cached entries, rather
4093 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
4094 before entering a new class. Remove dead code. Don't mess with
4095 current_function_decl when pushing declarations.
4096 (invalidate_class_lookup_cache): New function, split out from ...
4097 (popclass): Here. Clean up names_used on our way out.
4098 (instantiate_type): Adjust.
4099 (build_self_reference): Don't push the declaration here.
4100 (maybe_note_name_used_in_class): New function.
4101 (note_name_declared_in_class): Likewise.
4102 * decl.c (add_binding): Change prototype.
4103 (find_class_binding_level): New function.
4104 (innermost_nonclass_level): Likewise.
4105 (current_binding_level): Update documentation.
4106 (inner_binding_level): Remove. Replace with current_binding_level
4107 throughout.
4108 (push_binding_level): Remove special handling of
4109 class_binding_level.
4110 (pop_binding_level): Likewise. Use find_class_binding_level.
4111 (suspend_binding_level): Likewise.
4112 (global_bindings_p): Use innermost_nonclass_level.
4113 (toplevel_bindings_p): Likewise.
4114 (namespace_bindings_p): Likewise.
4115 (pseudo_global_level_p): Likewise.
4116 (push_binding): Clear INHERITED_VALUE_BINDING_P.
4117 (add_binding): Check for illegal multiple declarations. Return a
4118 value indicating whether or not the new binding was legal.
4119 (push_local_binding): Skip over class binding levels. Check
4120 return value from add_binding.
4121 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
4122 note_name_declared_in_class.
4123 (pushlevel_class): Remove "fake out the rest of the compiler"
4124 code.
4125 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4126 (clear_identifier_class_values): New function.
4127 (pop_from_top_level): Use it.
4128 (pop_everything): Tweak.
4129 (maybe_process_template_type_declaration): Don't push the
4130 declaration for the template here.
4131 (pushtag): Don't push tag declarations into class scope here.
4132 (pushdecl): Apply DeMorgan's law for readability.
4133 (pushdecl_class_level): Remove special-case code for
4134 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
4135 (push_class_level_bindng): Deal with inherited bindings.
4136 (lookup_name_real): Remove special-case code for
4137 TYPE_BEING_DEFINED, and some implicit typename magic.
4138 (grokdeclarator): Handle COMPONENT_REF for a template function.
4139 (build_enumerator): Don't call pushdecl_class_level here.
4140 (id_in_current_class): Remove.
4141 * decl2.c (grokfield): Don't call pushdecl_class_level or
4142 check_template_shadow.
4143 * errfn.c (cp_file_of): Don't declare.
4144 (cp_line_of): Likewise.
4145 * error.c (dump_decl): Handle an OVERLOAD.
4146 (cp_file_of): Likewise.
4147 (cp_line_of): Likewise.
4148 * init.c (build_member_call): Handle a COMPONENT_REF.
4149 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4150 pushdecl_class_level.
4151 * method.c (hack_identifier): Build COMPONENT_REFs for references
4152 to member templates as well as member functions. Remove dead
4153 code.
4154 * parse.y (left_curly): Remove.
4155 (nonnested_type): Call maybe_note_name_used_in_class, not
4156 pushdecl_class_level.
4157 * parse.c: Regenerated.
4158 (nested_name_specifier_1): Likewise.
4159 * pt.c (check_explicit_specialization): Adjust, for robustness.
4160 (check_template_shadow): Handle OVERLOADs.
4161 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4162 TEMPLATE_DECL, if appropriate.
4163 * search.c (envelope_add_decl): Remove.
4164 (dfs_pushdecls): Likewise.
4165 (dfs_compress_decls): Likewise.
4166 (dfs_push_decls): New function.
4167 (dfs_push_type_decls): Likewise.
4168 (setup_class_bindings): Likewise.
4169 (template_self_reference_p): Likewise.
4170 (lookup_field_r): Use it.
4171 (looup_member): Remove old comment. Deal with ambiguity.
4172 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4173 and remove envelope processing.
4174 * semantics.c (begin_class_definition): Let pushclass push
4175 declarations for base classes.
4176 (finish_member_declaration): Push declarations into class scope.
4177 * typeck.c (build_component_ref): Just put an OVERLOAD into the
4178 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4179 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
4180 * Makefile.in (class.o): Depend on splay-tree.h.
4181
4182 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
4183
4184 * cvt.c (convert_pointer_to_real): Use same_type_p.
4185 * typeck.c (comp_target_types): Use same_type_p.
4186
4187 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
4188
4189 * semantics.c (begin_inline_definitions,
4190 finish_inline_definitions): Rename from finish_default_args and
4191 begin_inline_definitions, respectively, to something that isn't a
4192 total lie. :)
4193 * parse.y (structsp): Adjust.
4194
4195 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4196 (list_hash_lookup): Likewise.
4197 (hash_tree_chain): Adjust.
4198 * pt.c (tsubst): Adjust.
4199 (tsubst_arg_types): Use plain hash_tree_cons.
4200 * cp-tree.h (hash_tree_cons_simple): Lose.
4201 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4202
4203 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4204
4205 * Makefile.in (hash.h): Generate using gperf language 'C', not
4206 'KR-C', so gperf uses the `const' keyword on strings.
4207
4208 * gxx.gperf (resword): Const-ify a char*.
4209
4210 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
4211
4212 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4213 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4214 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4215 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4216 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4217 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4218 tree.c: Adjust.
4219
4220 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
4221
4222 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4223
4224 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
4225
4226 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4227
4228 1999-03-27 Mark Mitchell <mark@codesourcery.com>
4229
4230 * cp-tree.h (add_friend): Declare.
4231 (add_friends): Likewise.
4232 * friend.c (add_friend): Make it global. Don't add to
4233 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4234 (add_friends): Make it global.
4235 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4236 befriending class is a template.
4237 * parse.y (component_decl_1): Fix typo in comment.
4238 * parse.c: Regenerated.
4239 * pt.c (instantiate_class_template): Use add_friend and
4240 add_friends rather that duplicating some of their functionality
4241 here.
4242
4243 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
4244
4245 * call.c (build_field_call): Unify 'this' and non-'this' cases.
4246
4247 * typeck.c (build_indirect_ref): Check for 'this' sooner.
4248
4249 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4250
4251 * call.c (op_error): Const-ify a char*.
4252 (add_candidate, source_type, add_warning): Add static prototype.
4253 (print_z_candidates): Const-ify a char*.
4254
4255 * class.c (resolve_address_of_overloaded_function,
4256 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4257 (get_vtable_name, finish_struct_1): Const-ify a char*.
4258
4259 * cvt.c (convert_to_reference): Likewise.
4260
4261 * decl.c (redeclaration_error_message, record_builtin_type,
4262 record_unknown_type, member_function_or_else, bad_specifiers):
4263 Likewise.
4264 (find_binding, select_decl, unqualified_namespace_lookup,
4265 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4266 Add static prototype.
4267 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4268 implicitly_declare, record_builtin_java_type, define_function,
4269 grok_op_properties, tag_name): Const-ify a char*.
4270
4271 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4272 (define_function, finish_builtin_type): Const-ify a char*.
4273 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4274 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4275 (file_name_nondirectory): Const-ify a char*.
4276 (init_filename_times): Don't prototype.
4277 (compiler_error): Prototype.
4278 (yyerror, init_repo): Const-ify a char*.
4279 (build_srcloc): Don't prototype.
4280 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4281 Const-ify a char*.
4282 (warn_for_assignment): Don't prototype.
4283 (convert_for_initialization, readonly_error, check_for_new_type,
4284 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4285 Const-ify a char*.
4286
4287 * decl2.c (acceptable_java_type, output_vtable_inherit,
4288 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4289 merge_functions, decl_namespace, validate_nonmember_using_decl,
4290 do_nonmember_using_decl): Add static prototype.
4291 (lang_f_options): Const-ify a char*.
4292 (finish_builtin_type): Likewise.
4293 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4294 prototype.
4295
4296 * errfn.c: Include cp-tree.h.
4297 (cp_thing): Add static prototype.
4298 (compiler_error): Don't protoptype.
4299 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4300 passing it to `cp_thing'.
4301
4302 * error.c (interesting_scope_p): Add static prototype.
4303
4304 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4305 a char*.
4306
4307 * init.c (compiler_error): Don't prototype.
4308 (member_init_ok_or_else): Const-ify a char*.
4309 (build_java_class_ref): Add static prototype.
4310
4311 * lex.c (compiler_error): Don't prototype.
4312 (get_time_identifier, interface_strcmp, extend_token_buffer,
4313 handle_cp_pragma): Const-ify a char*.
4314 (is_global, init_filename_times): Add static prototype.
4315 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4316 (compiler_error): Change from fixed args to variable args.
4317 (yyerror): Const-ify a char*.
4318
4319 * parse.y (cond_stmt_keyword): Const-ify a char*.
4320 (parse_decl): Add static prototype.
4321
4322 * pt.c (template_args_equal, print_template_context): Likewise.
4323 (print_candidates, check_default_tmpl_args): Const-ify a char*.
4324 (instantiate_class_template): Likewise.
4325
4326 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4327
4328 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4329 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4330
4331 * search.c (lookup_field_info, lookup_member): Likewise.
4332 (lookup_member): Cast the first argument of `bzero' to a PTR.
4333
4334 * sig.c (compiler_error): Don't prototype.
4335 (build_signature_pointer_or_reference_nam): Const-ify a char*.
4336 (get_sigtable_name, build_member_function_pointer): Likewise.
4337
4338 * tree.c (compiler_error): Don't prototype.
4339 (no_linkage_helper, build_srcloc): Add static prototype.
4340 (build_vbase_pointer_fields): Const-ify a char*.
4341 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4342
4343 * typeck.c (compiler_error): Don't prototype.
4344 (convert_for_assignment): Const-ify a char*.
4345 (comp_cv_target_types): Add static prototype.
4346 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4347 build_component_addr, build_unary_op, convert_for_initialization):
4348 Const-ify a char*.
4349
4350 * typeck2.c (ack): Add static prototype and change from fixed args
4351 to variable args.
4352 (readonly_error, check_for_new_type): Const-ify a char*.
4353
4354 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4355 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4356 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
4357 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4358 gen_assign, GNU_xref_member): Const-ify a char*.
4359
4360 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4361
4362 * gxxint.texi: Remove old discussion on copying virtual bases.
4363
4364 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
4365
4366 * Make-lang.in: Remove all references to g++.o/g++.c.
4367 Link g++ from gcc.o.
4368
4369 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4370
4371 * decl2.c (comdat_linkage): Treat vtables like functions.
4372
4373 1999-03-25 Mark Mitchell <mark@codesourcery.com>
4374
4375 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4376
4377 1999-03-25 Nathan Sidwell <nathan@acm.org>
4378
4379 * decl.c (init_decl_processing): Add `signed' type as a synonym
4380 for `int'.
4381
4382 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4383
4384 * typeck.c (common_type): Handle cv-qual unification for pointers
4385 to members.
4386
4387 * decl.c (unqualified_namespace_lookup): Return error_mark_node
4388 on error.
4389 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4390 * lex.c (do_identifier): If we got error_mark_node, call
4391 lookup_name again.
4392
4393 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4394
4395 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4396 classes.
4397
4398 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
4399
4400 * decl.c (lookup_name_real): Do nested field lookup regardless of
4401 TYPE_BEING_DEFINED.
4402
4403 1999-03-24 Mark Mitchell <mark@codesourcery.com>
4404
4405 * cp-tree.h (lang_type): Remove has_assignment and
4406 has_real_assignment. Add befriending_classes.
4407 (TYPE_HAS_ASSIGNMENT): Remove.
4408 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4409 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4410 (lang_decl): Document.
4411 (DECL_BEFRIENDING_CLASSES): New macro.
4412 (FRIEND_NAME): Move declaration to more obvious location.
4413 (FRIEND_DECLS): Likewise.
4414 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4415 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4416 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4417 (grok_op_properties): Likewise.
4418 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4419 (add_friend): Likewise. Don't do weird things with assignment
4420 operators. Update DECL_BEFRIENDING_CLASSES.
4421 (add_friends): Don't do weird things with assignment operators.
4422 (make_friend_class): Likewise. Update
4423 CLASSTYPE_BEFRIENDING_CLASSES.
4424 * pt.c (instantiate_class_template): Don't set
4425 TYPE_HAS_ASSIGNMENT.
4426 (tsubst_copy): Substitute the TREE_TYPE for more unary
4427 expressions.
4428 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4429 * search.c (protected_accessible_p): New function.
4430 (friend_accessible_p): Likewise.
4431 (accessible_p): Use them.
4432
4433 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4434
4435 * pt.c (convert_nontype_argument): Don't create things that aren't
4436 PTRMEM_CSTs when applying a qualification conversion to a
4437 PTRMEM_CST.
4438
4439 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4440
4441 * Makefile.in (OBJS): Don't mention hash.o.
4442 (OBJDEPS): Likewise.
4443
4444 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
4445
4446 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4447 * decl.c (expand_static_init): Make sure we don't add any after
4448 then.
4449
4450 * decl.c (cp_finish_decl): Move intelligence about handling
4451 DECL_COMDAT for variables from here...
4452 * decl2.c (comdat_linkage): ...to here.
4453 (maybe_make_one_only): Tweak.
4454 (import_export_decl): Call comdat_linkage for variables, too.
4455 (finish_file): Handle template statics properly.
4456
4457 1999-03-22 Mark Mitchell <mark@codesourcery.com>
4458
4459 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4460 Document internals of pointer-to-member-functions.
4461 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4462 (PFN_FROM_PTRMEMFUNC): Likewise.
4463 (build_type_conversion): Remove unused parameter.
4464 (build_ptrmemfunc1): Declare.
4465 (expand_ptrmemfunc_cst): New function.
4466 (delta2_from_ptrmemfunc): Likewise.
4467 (pfn_from_ptrmemfunc): Likewise.
4468 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4469 build_type_conversion. Use TYPE_PTRMEM_P for readability.
4470 (convert_to_reference): Remove unused parameter to
4471 build_type_conversion.
4472 (ocp_convert): Likewise.
4473 (build_user_type_conversion): Likewise.
4474 * error.c (dump_expr): Handle NULL pointer-to-member functions.
4475 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4476 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4477 open when handling pointer-to-member functions.
4478 * pt.c (convert_nontype_argument): Clean up error messages. Be
4479 more stringent with pointers-to-members.
4480 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
4481 (build_unary_op): Tidy ever-so-slightly.
4482 (build_conditional_expr): Remove extra parameter to
4483 build_type_conversion.
4484 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4485 we're using.
4486 (expand_ptrmemfunc_cst): Define.
4487 (delta2_from_ptrmemfunc): Likewise.
4488 (pfn_from_ptrmemfunc): Likewise.
4489
4490 1999-03-19 Mark Mitchell <mark@codesourcery.com>
4491
4492 * init.c (build_member_call): Handle template-id expressions
4493 correctly.
4494 * typeck.c (build_x_function_call): Likewise.
4495
4496 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
4497
4498 * friend.c (make_friend_class): Avoid core dump when
4499 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4500
4501 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
4502
4503 * decl.c (start_function): Suppress normal linkage heuristics
4504 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4505
4506 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
4507
4508 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4509 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4510
4511 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
4512
4513 * parse.y (named_complex_class_head_sans_basetype):
4514 Do not push a scope for error_mark_node.
4515 (maybe_base_class_list): Likewise.
4516
4517 * decl.c (start_decl): Check for error_mark_node as a type.
4518 Detected by g++.brendan/array-refs.C.
4519 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
4520 (maybe_build_cleanup_1): Likewise. Detected by
4521 g++.jason/incomplete1.C.
4522
4523 * tree.c (build_dummy_object): Use void_zero_node instead of the
4524 error_mark_node.
4525 (is_dummy_object): Check for such a node.
4526 Detected by g++.bob/inherit1.C
4527
4528 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
4529
4530 * method.c (old_backref_index): Split out...
4531 (flush_repeats): From here. Rename back from try_old_backref.
4532 (build_mangled_name): Put back some old-style repeat handling.
4533
4534 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4535
4536 * lex.c: Don't include setjmp.h.
4537 (parse_float): New static function.
4538 (pf_args): New struct.
4539 (real_yylex): Use them in call to `do_float_handler'.
4540
4541 1999-03-15 Mark Mitchell <mark@markmitchell.com>
4542
4543 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4544 * tree.c (layout_basetypes): Not here.
4545 * search.c (dfs_search): Remove; no longer used.
4546
4547 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4548
4549 * decl2.c (validate_nonmember_using_decl): Issue sensible
4550 error-messages on bogus qualifiers.
4551
4552 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
4553
4554 * call.c (add_function_candidate): Fix uninitialized variable.
4555
4556 * Makefile.in (search.o): Add dependency on varray.h.
4557
4558 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
4559
4560 * decl.c (duplicate_decls): Use same_type_p.
4561 * method.c (try_old_backref): Renamed from flush_repeats. Use
4562 same_type_p. Don't try to handle repeats. Return success.
4563 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
4564 calls from old-style code, too.
4565 (check_ktype): Use same_type_p.
4566 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
4567 (build_qualified_name): Simplify logic.
4568 (process_overload_item): Strip typedefs and quals at the top.
4569 (build_mangled_name_for_type_with_Gcode): Remove call to
4570 type_canonical_variant.
4571 (build_mangled_name): Likewise. Remove support for old-style
4572 repeats, which have been disabled since 2.7.2. Don't mess with
4573 TREE_USED.
4574 (build_decl_overload_real): Don't mess with TREE_USED.
4575
4576 1999-03-13 Nathan Sidwell <nathan@acm.org>
4577
4578 * error.c (cp_printers): Add 'F' escape character.
4579 (dump_type_real): Remove TREE_LIST (fnargs) printing.
4580 Functionality moved to dump_parameters.
4581 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4582 (dump_function_decl): Extend meaning of V parameter. Use
4583 dump_parameters and dump_exception_spec.
4584 (dump_parameters): New static function.
4585 (dump_exception_spec): New static function.
4586 (fndecl_as_string): Change argument semantics. Use
4587 dump_function_decl directly.
4588
4589 * sig.c (build_signature_table_constructor): Use cp_error.
4590
4591 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
4592
4593 * semantics.c (finish_switch_cond): Handle error cases gracefully.
4594 Detected by g++.law/enum5.C.
4595
4596 * typeck.c (build_modify_expr): Check for errors after resolving
4597 offsets. Detected by g++.brendan/static1.C.
4598
4599 * decl.c (complete_array_type): Ignore initial_value if it is an
4600 error. Detected by g++.benjamin/17930.C.
4601
4602 * typeck2.c (process_init_constructor): Return error if one argument
4603 is in error. Detected by g++.benjamin/13478.C.
4604
4605 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
4606
4607 * decl.c (select_decl): Allow class templates when we need types.
4608 * decl2.c (ambiguous_decl): Likewise.
4609
4610 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4611
4612 * lex.c (do_identifier): Correct call to enforce_access.
4613 * search.c (accessible_p): Tweak comment.
4614
4615 1999-03-10 Mark Mitchell <mark@markmitchell.com>
4616
4617 * semantics.c (begin_class_definition): Call build_self_reference.
4618 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4619
4620 * search.c (assert_canonical_unmarked): Fix typo in prototype.
4621
4622 * search.c (dfs_canonical_queue): New function.
4623 (dfs_assert_unmarked_p): Likewise.
4624 (assert_canonical_unmarked): Likewise.
4625 (access_in_type): Use it.
4626 (accessible_p): Likewise. Walk the whole tree when umarking.
4627
4628 * sig.c (build_signature_table_constructor): Use accessible_p
4629 instead of compute_access.
4630
4631 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4632
4633 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4634
4635 1999-03-09 Mark Mitchell <mark@markmitchell.com>
4636
4637 * cp-tree.h (flag_access_control): Declare.
4638 (TREE_VIA_PPUBLIC): Document.
4639 (DECL_NONSTATIC_MEMBER_P): New macro.
4640 (enforce_access): Return an indication of whether or not access
4641 was permitted.
4642 (build_self_reference): Change prototype.
4643 (compute_access): Replace with ...
4644 (accessible_p): New function.
4645 (dfs_walk): Change prototype.
4646 (dfs_unmark): Likewise.
4647 (markedp): Likewise.
4648 * call.c (enforce_access): Use accessible_p.
4649 * class.c (build_self_reference): Insert the declaration into the
4650 list of members for this type, and make it public.
4651 * decl.c (xref_basetypes): Avoid ill-timed recursion.
4652 * init.c (build_offset_ref): Use lookup_member, not three separate
4653 name-lookups. Call enforce_access rather than checking for
4654 illegal accesses here.
4655 (resolve_offset_ref): Likewise.
4656 * lex.c (do_identifier): Likewise.
4657 * method.c (hack_identifier): Likewise.
4658 * parse.y (self_reference): Remove.
4659 (opt_component_decl_list): Don't use it.
4660 * parse.c: Regenerated.
4661 * pt.c (print_candidates): Generalize to handle lists of
4662 overloaded functions.
4663 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4664 not set.
4665 (get_template_base): Use new calling convention for dfs_walk.
4666 * search.c: Include varray.h. Add prototypes.
4667 (dfs_walk): Accept a data pointer to pass to the work functions.
4668 All callers changed. All work functions changed.
4669 (breadth_first_search): Rename to bfs_walk, and make consistent
4670 with dfs_walk.
4671 (dfs_walk_real): New function.
4672 (canonical_binfo): New function.
4673 (context_for_name_lookup): Likewise.
4674 (shared_marked_p): Likewise.
4675 (shared_unmarked_p): Likewise.
4676 (lokup_field_queue_p): Likewise.
4677 (lookup_field_r): Generalize to handle both functions and fields.
4678 (lookup_field): Just call lookup_member.
4679 (lookup_fnfields): Likewise.
4680 (lookup_member): Move body of lookup_field here and generalize.
4681 (dfs_accessible_queue_p): Likewise.
4682 (dfs_accessible_p): Likewise.
4683 (dfs_access_in_type): Likewise.
4684 (access_in_type): Likewise.
4685 (compute_access): Remove, and replace with ...
4686 (accessible_p): New function.
4687 (vbase_types): Remove.
4688 (vbase_decl_ptr_intermediate): Likewise.
4689 (vbase_decl_ptr): Likewise.
4690 (vbase_init_result): Likewise.
4691 (closed_envelopes): Likewise.
4692 (bvtable): Likewise.
4693
4694 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4695
4696 * call.c (add_function_candidate): Check for proper number of args
4697 before checking the validity of those args.
4698
4699 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
4700
4701 * cp-tree.h (struct lang_type): Add anon_union field.
4702 (ANON_UNION_TYPE_P): Use it instead of examining type.
4703 (SET_ANON_UNION_TYPE_P): New macro.
4704 * decl.c (check_tag_decl): Use it.
4705
4706 * search.c (compute_access): Handle non-type contexts earlier, and
4707 handle NULL_TREE.
4708
4709 * tree.c (build_exception_variant): Use copy_to_permanent.
4710
4711 * decl2.c (setup_initp): Give statics with no priority the default
4712 priority here.
4713 (do_dtors, do_ctors, finish_file): Remove special handling of
4714 non-prioritized statics.
4715
4716 1999-03-05 Mark Mitchell <mark@markmitchell.com>
4717
4718 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4719 * decl.c (make_typename_type): Don't issue an error if an
4720 immediate lookup fails; it migt be resolved later.
4721 * friend.c (is_friend): Add comment.
4722 * search.c (breadth_first_search): Add POSTFN and DATA
4723 parameters. Tidy. All callers changed.
4724 (lookup_field_queue_p): New function.
4725 (lookup_field_r): Likewise.
4726 (lookup_field_post): Likewise.
4727 (lookup_field): Use them, via breadth_first_search, instead of
4728 duplicating logic.
4729 (compute_access): Robustify.
4730 (lookup_fnfield_info): New structure.
4731
4732 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
4733
4734 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4735
4736 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
4737
4738 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4739 cc happy.
4740
4741 * decl2.c (import_export_class): Also return if
4742 CLASSTYPE_INTERFACE_ONLY is set.
4743
4744 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
4745
4746 * decl.c (push_overloaded_decl): Only overwrite the old binding if
4747 there was one.
4748 * decl2.c (do_local_using_decl): Fix loop termination.
4749
4750 1999-03-02 Mark Mitchell <mark@markmitchell.com>
4751
4752 * cp-tree.h (determine_specialization): Don't declare.
4753 * pt.c (determine_specialization): Make it static. Eliminate
4754 complain parameter. Note that decl is always non-NULL now, and
4755 simplify accordingly.
4756
4757 * decl.c (maybe_push_to_top_level): Always call
4758 push_cp_function_context.
4759 (pop_from_top_level): Always call pop_cp_function_context.
4760
4761 1999-02-26 Nathan Sidwell <nathan@acm.org>
4762
4763 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4764 diagnostics.
4765 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4766 * init.c (build_new_1): Extra arg to complete_type_or_else.
4767 (build_delete): Likewise.
4768 * typeck.c (require_complete_type): Likewise.
4769 (pointer_int_sum): Likewise.
4770 (pointer_diff): Likewise.
4771 (build_component_ref): Likewise.
4772
4773 * typeck2.c (incomplete_type_error): Always use cp_error.
4774 Show declaration of undefined type, if appropriate.
4775 Deal with UNKNOWN_TYPE nodes.
4776
4777 * typeck.c (require_complete_type): Use TYPE_SIZE as
4778 size_zero_node to mean incomplete type.
4779 (require_complete_type_in_void): New function.
4780 (build_compound_expr): Call complete_type_in_void for LHS.
4781 (build_c_cast): Call complete_type_in_void for void cast.
4782 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4783 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4784 require_complete_type_in_void. Call it.
4785 * cp-tree.h (require_complete_type_in_void): Prototype new function.
4786
4787 * typeck.c (convert_arguments): Use alternative format for
4788 function decls. Don't require_complete_type here. Simplify
4789 diagnostic printing.
4790 (convert_for_initialization): Don't require_complete_type on RHS yet.
4791 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4792
4793 * call.c (build_over_call): Cope with qualified void return type.
4794 * semantics.c (finish_call_expr): Likewise.
4795 * typeck.c (build_function_call_real): Likewise.
4796 (c_expand_return): Likewise.
4797 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4798
4799 * call.c (print_z_candidates): Use alternate print format, to be
4800 consistent with (pt.c) print_candidates.
4801 * method.c (hack_identifier): List candidate members.
4802 * search.c (lookup_field): Build ambiguous list, and show it, if
4803 ambiguous.
4804
4805 1999-02-26 Mark Mitchell <mark@markmitchell.com>
4806
4807 * typeck.c (decay_conversion): Don't confuse constant array
4808 variables with their initializers.
4809
4810 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4811 merging decls.
4812 * pt.c (regenerate_decl_from_template): Tweak for clarity.
4813 (instantiate_decl): Mark a decl instantiated before regenerating
4814 it to avoid recursion.
4815 * tree.c (mapcar): Don't call decl_constant_value unless we know
4816 something is TREE_READONLY_DECL_P.
4817
4818 * class.c (check_for_override): Don't stop checking when we find
4819 the first overridden function. Delete #if 0'd code.
4820 * search.c (get_matching_virtual): Likewise.
4821
4822 1999-02-25 Richard Henderson <rth@cygnus.com>
4823
4824 * lang-specs.h: Define __FAST_MATH__ when appropriate.
4825
4826 1999-02-24 Mike Stump <mrs@wrs.com>
4827
4828 * typeck.c (convert_for_assignment): Allow boolean integral constant
4829 expressions to convert to null pointer.
4830
4831 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
4832
4833 * decl.c (lookup_namespace_name): Resolve namespace aliases.
4834
4835 * class.c (push_nested_class): Allow namespaces.
4836
4837 * decl2.c (set_decl_namespace): Add friendp parameter.
4838 * decl.c (grokfndecl): Pass it.
4839 (grokvardecl): Likewise.
4840 * cp-tree.h: Change declaration.
4841
4842 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
4843
4844 * pt.c (tsubst): Allow an array of explicit size zero.
4845
4846 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
4847
4848 * errfn.c: Change varargs code to look like toplev.c.
4849
4850 * method.c (process_modifiers): Don't prepend 'U' for char or
4851 wchar_t.
4852
4853 1999-02-20 Craig Burley <craig@jcb-sc.com>
4854
4855 * Make-lang.in (cplib2.ready): Don't consider updating
4856 cplib2 stuff if the current directory isn't writable, as
4857 it won't work (such as during a `make install').
4858
4859 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
4860
4861 * decl2.c (start_objects): Make file scope constructors and
4862 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4863 ASM_OUTPUT_DESTRUCTOR are defined.
4864
4865 1999-02-19 Mark Mitchell <mark@markmitchell.com>
4866
4867 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4868 (fn_type_unification): Adjust prototype.
4869 (lookup_fnfields_1): Declare.
4870 * call.c (add_template_candidate_real): Adjust call to
4871 fn_type_unification.
4872 * class.c (add_method): Don't allow duplicate declarations of
4873 constructors or destructors.
4874 (resolve_address_of_overloaded_function): Remove unused variable.
4875 Adjust call to fn_type_unification.
4876 * decl.c (grokfndecl): Be more robust in the face of illegal
4877 specializations.
4878 * decl2.c (check_classfn): Remove hokey handling of member
4879 templates.
4880 * pt.c (determine_specialization): Improve comments. Adjust to
4881 handle template argument deduction as per the standard.
4882 (check_explicit_specialization): Fix comment spacing. Handle
4883 type-conversion operators correctly. Improve error-recovery.
4884 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4885 (get_bindings_real): Simplify handling of static members.
4886 * search.c (lookup_fnfields_1): Make it have external linkage.
4887 * typeck.c (compparms): Fix comment.
4888 (build_unary_op): Don't try to figure out which template
4889 specialization is being referred to when when the address-of
4890 operator is used with a template function.
4891
4892 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4893
4894 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4895 keyword to match an analogous change at the top level.
4896
4897 * tree.c (lvalue_or_else): Likewise.
4898
4899 1999-02-17 Mark Mitchell <mark@markmitchell.com>
4900
4901 * decl.c (xref_basetypes): Comment.
4902 * pt.c (instantiate_class_template): Use xref_basetypes.
4903
4904 1999-02-16 Mark Mitchell <mark@markmitchell.com>
4905
4906 * cp-tree.h (tsubst): Change prototype.
4907 (tsubst_expr): Likewise.
4908 (tsubst_copy): Likewise.
4909 (type_unification): Remove prototype.
4910 * call.c (convert_default_arg): Adjust call to tsubst_expr.
4911 * class.c (resolve_address_of_overloaded_function): Just use
4912 fn_type_unification.
4913 * decl.c (grokdeclarator): Adjust call to tsubst.
4914 * method.c (build_template_parm_names): Likewise.
4915 * pt.c (GTB_VIA_VIRTUAL): New macro.
4916 (GTB_IGNORE_TYPE): Likewise.
4917 (resolve_overloaded_unification): Add `complain' parameter.
4918 (try_one_overload): Likewise.
4919 (tsubst_template_arg_vector): Likewise.
4920 (tsubst_template_parms): Likewise.
4921 (tsubst_aggr_type): Likewise.
4922 (tsubst_arg_types): Likewise.
4923 (tsubst_call_declarator_parms): Likewise.
4924 (unify): Remove explicit_mask.
4925 (type_unification_real): Likewise.
4926 (get_template_base_recursive): Likewise.
4927 (coerce_template_template_parms): Provide prototype.
4928 (tsubst_function_type): Likewise.
4929 (try_class_unification): New function.
4930 All callers changed to use new complain parameter.
4931 (get_template_base): Use try_class_unification.
4932 (unify): Adjust handling of classes derived from template types.
4933 (fn_type_unification): Substitute explicit arguments before
4934 unification.
4935
4936 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4937
4938 * decl.c (pushdecl): Remove dead code.
4939
4940 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
4941
4942 * decl2.c (finish_objects): Fix code I missed in previous change.
4943
4944 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
4945
4946 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4947 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4948
4949 * pt.c (maybe_process_partial_specialization): Complain about
4950 'template <>' on non-specialization.
4951
4952 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
4953
4954 * decl.c (grokdeclarator): Catch wierd declarators.
4955 * decl2.c (finish_file): Don't abort because of namespace parsing
4956 failure.
4957 (check_decl_namespace): Remove.
4958
4959 1999-02-09 Mark Mitchell <mark@markmitchell.com>
4960
4961 * cp-tree.h (get_template_base): Don't declare.
4962 (dfs_walk): Declare.
4963 (dfs_unmark): Likewise.
4964 (markedp): Likewise.
4965 * pt.c (unify): Remove duplicate declaration. Pass tparms and
4966 targs to get_template_base.
4967 (get_template_base_recursive): Move here from search.c. Check to
4968 see that the base found can be instantiated to form the desired
4969 type.
4970 (get_template_base): Likewise.
4971 (get_class_bindings): Simplify.
4972 * search.c (get_template_base_recursive): Move to pt.c.
4973 (get_template_base): Likewise.
4974 (markedp): Make it global.
4975 (dfs_walk): Likewise.
4976 (dfs_unmark): Likewise.
4977
4978 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
4979
4980 * pt.c (maybe_process_partial_specialization): Complain about
4981 specialization in wrong namespace.
4982 * tree.c (decl_namespace_context): New fn.
4983
4984 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4985
4986 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4987 * pt.c (coerce_template_template_parms): Handle nested
4988 template template parameters.
4989
4990 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
4991
4992 * typeck2.c: Update email addresses.
4993
4994 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4995
4996 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4997 turned off.
4998
4999 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
5000
5001 * lex.c (retrofit_lang_decl): Split out...
5002 (build_lang_decl): From here.
5003 * decl.c (pushdecl): Call it for functions generated by the middle
5004 end that don't have DECL_LANG_SPECIFIC.
5005 * cp-tree.h: Declare it.
5006
5007 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
5008 (start_objects, finish_objects): Only use special
5009 init_priority code if the user specified a priority.
5010 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5011 objects.
5012
5013 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
5014
5015 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5016 mkstemp.o. Get them from libiberty now.
5017 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5018
5019 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5020
5021 * decl2.c (lang_decode_option): Use read_integral_parameter.
5022
5023 1999-02-01 Mark Mitchell <mark@markmitchell.com>
5024
5025 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5026 before calling complete_type_or_else.
5027
5028 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5029
5030 * input.c (inline): Don't define, its handled by system.h.
5031
5032 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
5033
5034 * decl2.c: Don't define flag_no_ident here. Don't process
5035 -f(no-)ident here.
5036 * cp-tree.h: Don't declare flag_no_ident here.
5037 * lang-specs.h: Map -Qn to -fno-ident.
5038
5039 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
5040
5041 * cp-tree.h (struct tree_binding): Replace scope field with a union.
5042 (BINDING_SCOPE): Adjust.
5043 * decl.c (BINDING_LEVEL): Adjust.
5044
5045 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
5046
5047 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5048 member constants.
5049
5050 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5051 a ctor initializer.
5052
5053 * tree.c (equal_functions): Fix name in prototype.
5054
5055 * decl.c (push_local_binding): Add FLAGS argument.
5056 (pushdecl, push_overloaded_decl): Pass it.
5057 * decl2.c (do_local_using_decl): Likewise.
5058 * cp-tree.h: Adjust prototype.
5059 * decl.c (poplevel): Fix logic.
5060
5061 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5062 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
5063 (cat_namespace_levels): Don't loop forever.
5064
5065 1999-01-25 Richard Henderson <rth@cygnus.com>
5066
5067 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5068
5069 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
5070
5071 * class.c (resolve_address_of_overloaded_function): Mark the
5072 chosen function used.
5073
5074 * call.c (build_call): Make sure that a function coming in has
5075 been marked used already.
5076 * decl.c (expand_static_init): Call mark_used instead of
5077 assemble_external.
5078 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5079 alloc_eh_object, expand_throw): Likewise.
5080 * init.c (build_builtin_delete_call): Likewise.
5081 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5082 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5083 expand_generic_desc): Likewise.
5084
5085 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
5086
5087 * tree.c (equal_functions): New function.
5088 (ovl_member): Call it.
5089
5090 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
5091
5092 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5093
5094 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
5095
5096 * decl.c (decls_match): Return 1 if old and new are identical.
5097 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5098
5099 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
5100
5101 * decl.c (start_function): Make member functions one_only on windows.
5102 * decl2.c (import_export_decl): Likewise.
5103
5104 * decl.c (grokdeclarator): Don't complain about implicit int in
5105 a system header. Change same-name field check to not complain in
5106 a system header instead of within extern "C".
5107
5108 1999-01-21 Mark Mitchell <mark@markmitchell.com>
5109
5110 * cp-tree.h (PUSH_GLOBAL): New macro.
5111 (PUSH_LOCAL): Likewise.
5112 (PUSH_USING): Likewise.
5113 (namespace_bindings_p): Declare.
5114 (push_overloaded_decl): Likewise.
5115 * decl.c (push_overloaded_decl): Don't make it static. Check for
5116 illegal declarations after using declarations here.
5117 (namespace_bindings_p): Likewise.
5118 (duplicate_decls): Don't consider declarations from different
5119 namespaces to be the same.
5120 (pushdecl): Use symbolic PUSH_ constants in calls to
5121 push_overloaded_decl.
5122 (push_overloaded_decl_1): Likewise.
5123 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5124 (do_nonmember_using_decl): Check for illegal using declarations
5125 after ordinary declarations here.
5126 (do_local_using_decl): Call pushdecl to insert declarations.
5127
5128 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
5129
5130 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5131
5132 1999-01-21 Mark Mitchell <mark@markmitchell.com>
5133
5134 * tree.c (build_cplus_array_type_1): Don't call build_array_type
5135 for types involving template parameters.
5136
5137 * cp-tree.h (PARM_DECL_EXPR): Delete.
5138 (convert_default_arg): Change prototype.
5139 (check_default_argument): Declare.
5140 (search_tree): Likewise.
5141 * call.c (convert_default_arg): Take the function to which the
5142 default argument belongs as a parameter, and do any necessary
5143 instantiation here, instead of ...
5144 (build_over_call): Here.
5145 * decl.c (local_variable_p): New function.
5146 (check_default_argument): Likewise, split out and tidied from ...
5147 (grokparms): Here.
5148 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5149 * pt.c (tsubst_call_declarator_parms): New function.
5150 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
5151 with CALL_EXPRs, rather than trying to be clever.
5152 (tsubst): Use tsubst_call_declarator_parms.
5153 * tree.c (search_tree): Don't make it static.
5154 * typeck.c (convert_arguments): Use new interface to
5155 convert_default_arg.
5156
5157 1999-01-20 Mark Mitchell <mark@markmitchell.com>
5158
5159 * error.c (dump_function_decl): Don't print the argument types for
5160 a function when the verbosity level is negative.
5161
5162 * call.c (build_over_call): Check format attributes at call-time.
5163
5164 * pt.c (tsubst_copy): Fix comment.
5165 (unify): Don't allow unification with variable-sized arrays.
5166
5167 * semantics.c (finish_stmt_expr): When processing a template make
5168 the BIND_EXPR long-lived.
5169
5170 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
5171
5172 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5173 (import_export_vtable): Not here.
5174
5175 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
5176
5177 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5178 non-static member function.
5179
5180 1999-01-18 Nathan Sidwell <nathan@acm.org>
5181
5182 * class.c (instantiate_type): Only diagnose illegal address of member
5183 function if complaining.
5184
5185 * decl.c (lookup_name_real): Remove duplicate code.
5186
5187 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
5188
5189 * tree.c (copy_template_template_parm): Use permanent_obstack.
5190
5191 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5192
5193 * pt.c (unify): Remove restrictions on deduction of argument
5194 of template template parameters.
5195
5196 1999-01-18 Nathan Sidwell <nathan@acm.org>
5197
5198 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5199
5200 * class.c (resolve_address_of_overloaded_function): Show list of
5201 all candidates, when none of them match.
5202
5203 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
5204
5205 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5206 definition of 'casting away const' in reinterpret_cast<>.
5207
5208 1999-01-18 Graham <grahams@rcp.co.uk>
5209
5210 * cvt.c: Add include for decl.h, remove extern for
5211 static_aggregates which is now provided by decl.h.
5212
5213 * Makefile.in (cvt.o): Add dependency for decl.h and missing
5214 dependencies for convert.h and flags.h.
5215
5216 1999-01-18 Nathan Sidwell <nathan@acm.org>
5217
5218 * decl2.c (do_dtors): Set current location to that of the
5219 decl, for sensible diagnostics and debugging.
5220 (check_classfn): Issue `incomplete type' error, if
5221 class is not defined.
5222
5223 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
5224
5225 * cp-tree.h: Add prototype for bound_pmf_p.
5226
5227 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
5228 Manfred Hollstein <manfred@s-direktnet.de>
5229
5230 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5231 -Wreturn-type.
5232
5233 1999-01-16 Nathan Sidwell <nathan@acm.org>
5234
5235 * cp-tree.h (struct lang_type): Added has_mutable flag.
5236 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5237 (TYPE_HAS_MUTABLE_P): New macro to read it.
5238 (cp_has_mutable_p): Prototype for new function.
5239 * class.c (finish_struct_1): Set has_mutable from members.
5240 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5241 it contains a mutable.
5242 * typeck.c (cp_has_mutable_p): New function.
5243
5244 1999-01-15 Mark Mitchell <mark@markmitchell.com>
5245
5246 * pt.c (process_template_parm): Ignore top-level qualifiers on
5247 non-type parameters.
5248
5249 * decl.c (start_function): Use current_function_parms in the call
5250 to require_complete_type_for_parms, not the probably empty
5251 DECL_ARGUMENTS.
5252
5253 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
5254
5255 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5256
5257 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5258 that we don't suppress the other copies.
5259 * lex.c (handle_cp_pragma): Likewise.
5260
5261 1999-01-13 Mark Mitchell <mark@markmitchell.com>
5262
5263 * decl.c (grokdeclarator): Undo 1998-12-14 change.
5264 * tree.c (build_cplus_array_type_1): Likewise.
5265 * pt.c (instantiate_class_template): Remove misleading comment.
5266 (tsubst_aggr_type): Substitute if there are template parameters,
5267 regardless of whether or not they use template arguments.
5268 (unify): Likewise, but for unification.
5269
5270 1999-01-12 Richard Henderson <rth@cygnus.com>
5271
5272 * cp-tree.h (flag_permissive): Declare extern.
5273
5274 1999-01-06 Mark Mitchell <mark@markmitchell.com>
5275
5276 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5277 here.
5278 (lang_type): Add is_partial_instantiation. Decrease width of
5279 dummy.
5280 (PARTIAL_INSTANTIATION_P): New macro.
5281 (OPERATOR_TYPENAME_P): Remove.
5282 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5283 OPERATOR_TYPENAME_P.
5284 (grok_op_properties): Likewise.
5285 * friend.c (do_friend): Handle friends that are member functions
5286 correctly.
5287 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5288 * pt.c (instantiate_class_template): Rework for clarity. Avoid
5289 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
5290 any more partial instantiation than is absolutely necessary for
5291 implicit typename. Set PARTIAL_INSTANTIATION_P.
5292 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5293 * semantics.c (begin_class_definition): Handle partial
5294 specializations of a type that was previously partially
5295 instantiated.
5296
5297 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
5298
5299 * g++spec.c (LIBSTDCXX): Provide default definition.
5300 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5301
5302 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5303
5304 * Make-lang.in (g++.o): Depend on prefix.h.
5305
5306 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
5307
5308 * tree.c (bound_pmf_p): New fn.
5309 * typeck.c (build_c_cast): Use it.
5310
5311 * decl.c (grok_op_properties): Use same_type_p.
5312
5313 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5314
5315 * Makefile.in (cvt.o): Depend on toplev.h.
5316
5317 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5318
5319 * cvt.c: Include toplev.h.
5320
5321 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5322 definitions.
5323
5324 * init.c (expand_vec_init): Initialize variable `itype'.
5325
5326 * lex.c (yyerror): Cast the argument passed to a ctype function to
5327 an unsigned char.
5328
5329 * method.c (build_mangled_C9x_name): Wrap prototype and definition
5330 in "HOST_BITS_PER_WIDE_INT >= 64".
5331
5332 * typeck.c (build_binary_op): Mark parameter `convert_p' with
5333 ATTRIBUTE_UNUSED.
5334
5335 1998-12-22 Mark Mitchell <mark@markmitchell.com>
5336
5337 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5338 * tree.c (build_exception_variant): Don't crash on empty throw
5339 specs.
5340
5341 1998-12-18 DJ Delorie <dj@cygnus.com>
5342
5343 * cvt.c (convert_to_reference): Check for both error_mark_node
5344 and NULL_NODE after call to convert_for_initialization.
5345
5346 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
5347
5348 * error.c (interesting_scope_p): New fn.
5349 (dump_simple_decl): Use it.
5350 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5351 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5352
5353 1998-12-16 Mark Mitchell <mark@markmitchell.com>
5354
5355 * class.c (resolve_address_of_overloaded_function): Do conversion
5356 to correct type here, rather than ...
5357 (instantiate_type): Here.
5358
5359 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5360 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5361 (decl_template_parm_p): Remove.
5362 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5363 parameter.
5364 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5365 * pt.c (push_inline_template_parms_recursive): Set it.
5366 (decl_template_parm_p): Remove.
5367 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5368 (process_template_parm): Set it.
5369
5370 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
5371
5372 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5373 if configured with cpplib.
5374
5375 1998-12-15 Mark Mitchell <mark@markmitchell.com>
5376
5377 * decl.c (poplevel): Make sure ns_binding is initialized.
5378
5379 * decl.c (finish_function): Undo inadvertent change in previous
5380 patch.
5381
5382 1998-12-14 Mark Mitchell <mark@markmitchell.com>
5383
5384 * class.c (pushclass): Tweak handling of class-level bindings.
5385 (resolve_address_of_overloaded_function): Update pointer-to-member
5386 handling.
5387 (instantiate_type): Likewise.
5388 * cvt.c (cp_convert_to_pointer): Likewise.
5389 * decl.c (pop_binding): Take the DECL to pop, not just the name.
5390 Deal with `struct stat' hack.
5391 (binding_level): Add to documentation.
5392 (push_binding): Clear BINDING_TYPE.
5393 (add_binding): New function.
5394 (push_local_binding): Use it.
5395 (push_class_binding): Likewise.
5396 (poplevel): Adjust calls to pop_binding.
5397 (poplevel_class): Likewise.
5398 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5399 declarations to current binding level.
5400 (push_class_level_binding): Likewise.
5401 (push_overloaded_decl): Adjust handling of OVERLOADs in local
5402 bindings.
5403 (lookup_namespace_name): Don't crash when confronted with a
5404 TEMPLATE_DECL.
5405 (lookup_name_real): Do `struct stat' hack in local binding
5406 contexts.
5407 (build_ptrmemfunc_type): Adjust documentation.
5408 (grokdeclarator): Don't avoid building real array types when
5409 processing templates unless really necessary.
5410 (finish_method): Adjust calls to pop_binding.
5411 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5412 not reparse_decl_as_expr.
5413 (build_expr_from_tree): Deal with a template-id as the function to
5414 call in a METHOD_CALL_EXPR.
5415 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5416 (maybe_adjust_types_For_deduction): Don't do peculiar things with
5417 METHOD_TYPEs here.
5418 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
5419 pointer-to-member types where necessary.
5420 * tree.c (build_cplus_array_type_1): Don't avoid building real
5421 array types when processing templates unless really necessary.
5422 (build_exception_variant): Compare the exception lists correctly.
5423
5424 1998-12-13 Mark Mitchell <mark@markmitchell.com>
5425
5426 * cp-tree.def (CPLUS_BINDING): Update documentation.
5427 * cp-tree.h (LOCAL_BINDING_P): New macro.
5428 (lang_identifier): Rename local_value to bindings.
5429 (tree_binding): Make `scope' of type `void*', not `tree'.
5430 (BINDING_SCOPE): Update documentation.
5431 (IDENTIFIER_LOCAL_VALUE): Remove.
5432 (IDENTIFIER_CLASS_VALUE): Document.
5433 (IDENTIFIER_BINDING): New macro.
5434 (IDENTIFIER_VALUE): Likewise.
5435 (TIME_IDENTIFIER_TIME): Likewise.
5436 (TIME_IDENTIFIER_FILEINFO): Likewise.
5437 (IMPLICIT_TYPENAME_P): Likewise.
5438 (set_identifier_local_value): Remove.
5439 (push_local_binding): New function.
5440 (push_class_binding): Likewise.
5441 * class.c (pushclass): Update comments; use push_class_binding.
5442 * decl.c (set_identifier_local_value_with_scope): Remove.
5443 (set_identifier_local_value): Likewise.
5444 (push_binding): New function.
5445 (pop_binding): Likewise.
5446 (binding_level): Update documentation. Remove shadowed.
5447 (BINDING_LEVEL): New macro.
5448 (free_binding_nodes): New variable.
5449 (poplevel): Adjust for new name-lookup scheme. Don't mess up
5450 BLOCK_VARs when doing for-scope extension. Remove effectively
5451 dead code.
5452 (pushlevel_class): Tweak formatting.
5453 (poplevel_class): Adjust for new name-lookup scheme.
5454 (print_binding_level): Likewise.
5455 (store_bindings): Likewise.
5456 (pushdecl): Likewise.
5457 (pushdecl_class_level): Likewise.
5458 (push_class_level_binding): Likewise.
5459 (push_overloaded_decl): Update comments. Adjust for new
5460 name-lookup scheme.
5461 (lookup_name_real): Likewise.
5462 (lookup_name_current_level): Likewise.
5463 (cp_finish_decl): Likewise.
5464 (require_complete_types_for_parms): Likewise. Remove misleading
5465 #if 0'd code.
5466 (grok_parms): Likewise. Don't call
5467 require_complete_types_for_parms here.
5468 (grok_ctor_properties): Don't treat templates as copy
5469 constructors.
5470 (grop_op_properties): Or as assignment operators.
5471 (start_function): Document. Adjust for new name-lookup scheme.
5472 (finish_function): Likewise.
5473 * decl2.c (do_local_using_decl): Use push_local_binding.
5474 * lex.c (begin_definition_of_inclass_inline): New function, split
5475 out from ...
5476 (do_pending_inlines): Here, and ...
5477 (process_next_inline): Here.
5478 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5479 (init_filename_times): Likewise.
5480 (extract_interface_info): Likewise.
5481 (ste_typedecl_interface_info): Likewise.
5482 (check_newline): Likewise.
5483 (dump_time_statistics): Likewise.
5484 (handle_cp_pragma): Likewise.
5485 (do_identifier): Adjust for new name-lookup scheme.
5486 * parse.y (function_try_block): Return ctor_initializer_opt value.
5487 (fndef): Use it.
5488 (fn.defpen): Pass appropriate values to start_function.
5489 (pending_inline): Use functor_try_block value, and pass
5490 appropriate values to finish_function.
5491 * pt.c (is_member_template): Update documentation; remove handling
5492 of FUNCTION_DECLs. As per name, this function should deal only in
5493 TEMPLATE_DECLs.
5494 (decl_template_parm_p): Change name of olddecl parameter to decl.
5495 (check_template_shadow): Adjust for new name-lookup scheme.
5496 (lookup_template_class): Likewise.
5497 (tsubst_decl): Tweak so as not to confuse member templates with
5498 copy constructors and assignment operators.
5499 (unify): Handle UNION_TYPEs.
5500 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5501 (lang_print_xnode): Adjust for new name-lookup scheme.
5502 * typeck.c (mark_addressable): Likewise.
5503 (c_expand_return): Likewise.
5504
5505 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
5506
5507 * decl.c (grokdeclarator): Allow field with same name as class
5508 in extern "C".
5509
5510 * decl.c (lookup_name_real): Don't limit field lookup to types.
5511 * class.c (check_member_decl_is_same_in_complete_scope): No error
5512 if icv and x are the same.
5513 * lex.c (do_identifier): Tweak error message.
5514
5515 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5516
5517 * decl.c (start_enum): Use push_obstacks, not
5518 end_temporary_allocation.
5519 (finish_enum): Call pop_obstacks.
5520
5521 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5522
5523 * class.c (instantiate_type): Return error_mark_node rather than
5524 junk.
5525
5526 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5527
5528 * cp-tree.h (most_specialized_instantiation): New function.
5529 (print_candidates): Likewise.
5530 * class.c (validate_lhs): Remove.
5531 (resolve_address_of_overloaded_function): New function, split out
5532 and then substantially reworked, from ...
5533 (instantiate_type): Use it. Simplify.
5534 * cvt.c (convert_to_reference): Complain when caller has indicated
5535 that's the right thing to do. Don't crash if instantiate_type
5536 fails.
5537 * pt.c: Substitute `parameters' for `paramters' throughout.
5538 (print_candidates): Don't make it static.
5539 (most_specialized_instantiation): Split out from ...
5540 (most_specialized): Here.
5541
5542 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
5543
5544 * lex.c (lang_init_options): Initialize cpplib.
5545 * decl2.c (parse_options,cpp_initialized): Removed.
5546 (lang_decode_option): Move initialization of cpplib to
5547 lang_init_options.
5548
5549 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5550
5551 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5552 well as the TYPE_DECL, when a typedef name is assigned to a
5553 previously anonymous type.
5554
5555 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
5556
5557 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5558 __cp_eh_info for getting the eh info pointer. Add table_index to
5559 field list.
5560 (push_eh_cleanup): Don't increment 'handlers' data field.
5561 (process_start_catch_block): Don't set the 'caught' field.
5562
5563 * cp/exception.cc (CP_EH_INFO): New macro for getting the
5564 exception info pointer within library routines.
5565 (__cp_eh_info): Use CP_EH_INFO.
5566 (__start_cp_handler): Get exception info pointer, set caught field,
5567 and increment the handlers field. Avoids this being done by handlers.
5568 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5569 (uncaught_exception): Use CP_EH_INFO macro.
5570
5571 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
5572
5573 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5574
5575 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
5576
5577 * lex.c (check_newline): Add support for \ as `natural'
5578 characters in file names in #line to be consistent with #include
5579 handling. We support escape processing in the # 1 "..." version of
5580 the command. See also support in cp/lex.c.
5581
5582 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
5583
5584 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5585 structure.
5586
5587 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
5588
5589 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5590
5591 * error.c (dump_simple_decl): Also print namespace context.
5592 (dump_function_decl): Likewise.
5593
5594 * decl2.c (ambiguous_decl): Don't print old value if it's
5595 error_mark_node.
5596
5597 * decl.c (lookup_name_real): Fix handling of local types shadowed
5598 by a non-type decl. Remove obsolete code.
5599 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5600
5601 * lang-options.h: Add -fpermissive.
5602 * decl2.c: Likewise.
5603 * cp-tree.h: Add flag_permissive.
5604 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5605 were specified, set flag_pedantic_errors.
5606 * call.c (build_over_call): Turn dropped qualifier messages
5607 back into pedwarns.
5608 * cvt.c (convert_to_reference): Likewise.
5609 * typeck.c (convert_for_assignment): Likewise.
5610
5611 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
5612
5613 * decl2.c (coerce_new_type): Use same_type_p.
5614 (coerce_delete_type): Likewise.
5615
5616 * call.c (check_dtor_name): Return 1, not error_mark_node.
5617
5618 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
5619
5620 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5621 if MULTIPLE_SYMBOL_SPACES.
5622
5623 * pt.c (check_template_shadow): New fn.
5624 * decl2.c (grokfield): Use it.
5625 * decl.c (pushdecl): Likewise.
5626 (pushdecl_class_level): Likewise.
5627 (start_method): Likewise.
5628 (xref_tag): Don't try to use 't' if we're defining.
5629
5630 * call.c (check_dtor_name): Just return an error_mark_node.
5631 * pt.c (lookup_template_class): Complain about using non-template here.
5632 * parse.y (apparent_template_type): Not here.
5633
5634 * pt.c (check_explicit_specialization): Complain about specialization
5635 with C linkage.
5636
5637 * lang-options.h: Add -f{no-,}implicit-inline-templates.
5638
5639 * pt.c (convert_nontype_argument): Don't assume that any integer
5640 argument is intended to be a constant-expression.
5641
5642 1998-12-03 Mark Mitchell <mark@markmitchell.com>
5643
5644 * class.c (handle_using_decl): Fix comment. Don't lookup
5645 constructors in base classes.
5646 (validate_lhs): Fix typo in comment.
5647 * search.c (lookup_field_1): Don't return a USING_DECL.
5648
5649 * cp-tree.h (DECL_ACCESS): Improve documentation.
5650
5651 * decl.c (expand_static_init): Don't set the initialization-done
5652 flag until the initialization is done.
5653
5654 1998-12-02 Mark Mitchell <mark@markmitchell.com>
5655
5656 * decl2.c (validate_nonmember_using_decl): Complain about using
5657 declarations for class members.
5658
5659 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
5660
5661 * typeck2.c (process_init_constructor): Use same_type_p.
5662
5663 * decl.c (check_tag_decl): Don't warn about null decl inside a
5664 class.
5665
5666 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5667 UNIFY_ALLOW_NONE.
5668 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5669 (resolve_overloaded_unification): Strip baselinks.
5670
5671 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5672
5673 * g++spec.c: Don't prototype xmalloc.
5674
5675 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
5676
5677 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5678
5679 * decl.c (check_tag_decl): Do complain about null friend decl at
5680 file scope.
5681
5682 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5683
5684 * lex.c (make_lang_type): Clear the whole struct lang_type, not
5685 only the first multiple of sizeof (int).
5686
5687 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5688
5689 * decl.c (start_decl): An explicit specialization of a static data
5690 member is only a definition if it has an initializer.
5691
5692 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5693 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5694 cp_finish_decl.
5695 * init.c (expand_default_init): Check for DIRECT_BIND instead of
5696 DECL_ARTIFICIAL.
5697
5698 * call.c (build_over_call): Use build_decl.
5699
5700 * except.c (expand_throw): Just use convert, not
5701 build_reinterpret_cast.
5702
5703 * lex.c (handle_generic_pragma): Use token_buffer.
5704
5705 * decl.c (check_tag_decl): Don't complain about null friend decl.
5706
5707 1998-11-24 Dave Pitts <dpitts@cozx.com>
5708
5709 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5710 first position.
5711 * lex.c (check_newline): Use ISALPHA.
5712 (readescape): Use ISGRAPH.
5713 (yyerror): Use ISGRAPH.
5714
5715 1998-11-24 Nathan Sidwell <nathan@acm.org>
5716
5717 * search.c (get_abstract_virtuals): Do not use initial
5718 CLASSTYPE_ABSTRACT_VIRTUALS.
5719 * typeck2.c (abstract_virtuals_error): Show location of abstract
5720 declaration.
5721 * call.c (build_new_method_call): Use
5722 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5723 * class.c (finish_struct_bits): Don't bother working out whether
5724 get_abstract_virtuals will do anything, just do it.
5725
5726 1998-11-24 Graham <grahams@rcp.co.uk>
5727
5728 * typeck.c (build_component_ref): Remove unused statement.
5729
5730 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5731
5732 * class.c (add_method): Catch invalid overloads.
5733
5734 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5735 * search.c (lookup_conversions): Handle getting real OVERLOADs.
5736 (add_conversions): Likewise. Revert last change.
5737 * call.c (add_conv_candidate): Pass totype to add_candidate instead
5738 of fn. Don't add a new candidate if the last one was for the same
5739 type.
5740 (print_z_candidates): Handle getting a type as a function.
5741 (joust): If we got two conversion candidates to the same type,
5742 just pick one.
5743 (build_object_call): Lose 'templates'.
5744 (build_user_type_conversion_1): Handle getting real OVERLOADs.
5745
5746 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5747
5748 * typeck2.c (process_init_constructor): If there are elements
5749 that don't have initializers and they need to have constructors
5750 run, supply them with initializers.
5751
5752 * class.c (finish_struct_1): A class with a 0-width bitfield is
5753 still empty.
5754
5755 1998-11-23 Mark Mitchell <mark@markmitchell.com>
5756
5757 * pt.c (instantiate_class_template): Don't try to figure out what
5758 specialization to use for a partial instantiation. Correct
5759 typos in a couple of comments. Avoid calling uses_template_parms
5760 multiple times.
5761
5762 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
5763
5764 * method.c (process_overload_item): Add call to
5765 build_mangled_C9x_name for intTI_type_nodes.
5766 (build_mangled_C9x_name): Add prototype, define.
5767 * decl.c (init_decl_processing): Add names for
5768 TImode_type_node.
5769
5770 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5771
5772 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5773
5774 * class.c (finish_struct_1): Set things up for 0-width bitfields
5775 like we do for others.
5776
5777 * decl.c (check_tag_decl): New fn.
5778 (shadow_tag): Split out from here.
5779 * decl2.c (grok_x_components): Call it.
5780
5781 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
5782
5783 * decl.c: Lose warn_about_return_type.
5784 (grokdeclarator): Always complain about implicit int, except for
5785 `main () { ... }'.
5786
5787 * decl.c (tag_name): New fn.
5788 (xref_tag): Complain about using typedef-name after class-key.
5789
5790 * init.c (expand_vec_init): Also keep going if from_array.
5791
5792 * tree.c (is_overloaded_fn): Also handle the output of
5793 build_offset_ref.
5794
5795 * decl.c (grokdeclarator): Use constructor_name when comparing
5796 field name against enclosing class.
5797 * class.c (finish_struct_anon): Likewise.
5798
5799 1998-11-22 Mark Mitchell <mark@markmitchell.com>
5800
5801 * decl.c (poplevel): Remove code to handle KEEP == 2.
5802 (finish_function): Don't confuse BLOCK-order when
5803 processing a destructor.
5804
5805 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5806
5807 * decl.c (require_complete_types_for_parms): Call layout_decl
5808 after we've completed the type.
5809
5810 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
5811
5812 * decl2.c (validate_nonmember_using_decl): Allow using templates
5813 from the global namespace.
5814
5815 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5816
5817 Handle specifying template args to member function templates.
5818 * tree.c (build_overload): Always create an OVERLOAD for a template.
5819 * search.c (add_conversions): Handle finding an OVERLOAD.
5820 * decl2.c (check_classfn): Likewise.
5821 * lex.c (identifier_type): See through a baselink.
5822 * parse.y (do_id): Don't call do_identifier if we got a baselink.
5823 * class.c (instantiate_type, case TREE_LIST): Recurse.
5824
5825 * decl.c (grokdeclarator): Allow a boolean constant for array
5826 bounds, odd as that sounds.
5827
5828 * pt.c (unify): Be more strict about non-type parms, except for
5829 array bounds.
5830 (UNIFY_ALLOW_INTEGER): New macro.
5831
5832 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
5833
5834 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5835
5836 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
5837
5838 * semantics.c (begin_class_definition): Call
5839 maybe_process_partial_specialization before push_template_decl.
5840 Don't call push_template_decl for a specialization.
5841 * search.c (lookup_field): Do return a member template class.
5842 * decl2.c (handle_class_head): Handle member template classes.
5843
5844 * decl.c (grokdeclarator): A parm type need not be complete.
5845
5846 * pt.c (convert_nontype_argument): Fix thinko.
5847
5848 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5849
5850 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5851 (global_delete_fndecl): New variable.
5852 * decl.c (global_delete_fndecl): Define it.
5853 (init_decl_processing): Set it.
5854 * init.c (build_builtin_delete_call): Use it.
5855 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5856 nodes.
5857
5858 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5859
5860 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5861 type.
5862
5863 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5864 * call.c (build_object_call): Also support references to functions.
5865 * typeck.c (convert_for_initialization): Don't decay a function
5866 if the target is a reference to function.
5867
5868 * search.c (add_conversions): Get all the overloads from a class.
5869
5870 * decl.c (grok_ctor_properties): Complain about any constructor
5871 that will take a single arg of the class type by value.
5872
5873 * typeck2.c (build_functional_cast): Can't create objects of
5874 abstract classes this way.
5875 * cvt.c (ocp_convert): Likewise.
5876
5877 * decl.c (grokfndecl): Member functions of local classes are not
5878 public.
5879
5880 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5881
5882 * Make-lang.in (cc1plus): Add dependency on hash.o.
5883
5884 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5885
5886 * search.c (get_abstract_virtuals): Complain about virtuals with
5887 no final overrider.
5888 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5889 with no final overrider.
5890 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5891 on virtuals with no final overrider.
5892
5893 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5894
5895 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5896 after layout_type.
5897
5898 * friend.c (do_friend): Don't set_mangled_name_for_decl.
5899
5900 * class.c (finish_struct_anon): Complain about non-fields.
5901 * decl2.c (build_anon_union_vars): Likewise.
5902
5903 * decl.c (grokdeclarator): Normal data members can't have the same
5904 name as the class, either.
5905 * class.c (finish_struct_anon): Neither can members of an
5906 anonymous union.
5907
5908 1998-11-17 Mark Mitchell <mark@markmitchell.com>
5909
5910 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5911 (TYPE_BINFO): Likewise.
5912 (IS_AGGR_TYPE): Tweak.
5913 (SET_IS_AGGR_TYPE): New macro.
5914 (CLASS_TYPE_P): Tweak.
5915 (lang_type): Group mark bitfields together. Remove linenum.
5916 (CLASSTYPE_SOURCE_LINE): Remove macro.
5917 (CLASSTYPE_MARKED_N): New macro.
5918 (SET_CLASSTYPE_MARKED_N): Likewise.
5919 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5920 (CLASS_TYPE_MARKED_*): Use them.
5921 (SET_CLASSTYPE_MARKED_*): Likewise.
5922 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5923 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5924 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5925 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5926 * class.c (class_cache_obstack): New variable.
5927 (class_cache_firstobj): Likewise.
5928 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5929 (pushclass): Free the cache, when appropriate.
5930 (popclass): Tidy.
5931 (maybe_push_cache_obstack): Use class_cache_obstack.
5932 * decl.c (include hash.h).
5933 (typename_hash): New function.
5934 (typename_compare): Likewise.
5935 (build_typename_type): Check the hash table to avoid creating
5936 duplicates.
5937 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5938 (grokdeclarator): Use CLASS_TYPE_P.
5939 (xref_basetypes): Likewise.
5940 (start_function): Likewise. Don't put current_class_ref on the
5941 permanent obstack.
5942 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5943 and TYPE_TI_ARGS.
5944 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5945 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5946 fields for types other than class types. Do clear TYPE_ALIAS_SET
5947 for types other than class types, though.
5948 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5949 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5950 * pt.c (process_template_parm): Don't set
5951 CLASSTYPE_GOT_SEMICOLON.
5952 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5953 Coerce arguments on the momentary obstack.
5954 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5955 (instantiate_class_template): Calculate template arguments on the
5956 momentary obstack. Tidy.
5957 (tsubst_template_arg_vector): Use make_temp_vec.
5958 (tsubst_aggr_type): Put template arguments on the momentary
5959 obstack.
5960 (tsubst_decl): Likewise.
5961 (tsubst): Copy the array bounds index to the permanent obstack
5962 before building index types. Use new macros.
5963 (unify): Use new macros.
5964 (do_type_instantiation): Likewise.
5965 * search.c (lookup_fnfields_1): Use new macros.
5966 (dfs_pushdecls): Build envelopes on the cache obstack.
5967 (dfs_compress_decls): Use new macros.
5968 (push_class_decls): Build on the cache obstack.
5969 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5970 * sign.c (build_signature_pointer_or_reference_type): Use
5971 SET_IS_AGGR_TYPE.
5972 * tree.c (make_binfo): Check CLASS_TYPE_P.
5973 (copy_template_template_parm): Adjust.
5974 (make_temp_vec): Use push_expression_obstack.
5975 * typeck.c (complete_type): Use new macros.
5976 (comptypes): Likewise.
5977
5978 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
5979
5980 * pt.c (tsubst): Add diagnostics for invalid array, reference
5981 and pointer to member types.
5982
5983 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5984
5985 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5986
5987 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5988 Simplify.
5989
5990 * parse.y (structsp): Fix cut-and-paste error.
5991
5992 * init.c (build_new): Complain about non-integral size.
5993
5994 * parse.y (unary_expr): Complain about defining types in sizeof.
5995
5996 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5997
5998 * rtti.c (build_x_typeid): Complain about typeid without
5999 including <typeinfo>.
6000 (get_typeid): Likewise. Complain about typeid of incomplete type.
6001 (get_tinfo_fn_dynamic): Likewise.
6002 (get_typeid_1): Not static anymore.
6003 * except.c (build_eh_type_type): Use get_typeid_1.
6004
6005 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6006 ambiguous or private bases. Fix warning for reference cast.
6007
6008 1998-11-16 Mark Mitchell <mark@markmitchell.com>
6009
6010 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6011 * decl.c (duplicate_decls): Remove special-case code to deal with
6012 template friends, and just do the obvious thing.
6013 * pt.c (register_specialization): Tweak for clarity, and also to
6014 clear DECL_INITIAL for an instantiation before it is merged with a
6015 specialization.
6016 (check_explicit_specialization): Fix indentation.
6017 (tsubst_friend_function): Handle both definitions in friend
6018 declaration and outside friend declarations.
6019 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6020 (regenerate_decl_from_template): Tweak accordingly.
6021 (instantiate_decl): Likewise.
6022
6023 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
6024
6025 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6026 member function reference to error.
6027 * cvt.c (ocp_convert): Complain about converting an overloaded
6028 function to void.
6029
6030 * init.c (build_offset_ref): Just return a lone static member
6031 function.
6032
6033 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6034 not internal ones.
6035
6036 * typeck.c (build_binary_op_nodefault): Improve error handling.
6037
6038 * decl.c (grokfndecl): Complain about making 'main' a template.
6039
6040 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6041
6042 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6043 TYPE_DECL in a template.
6044
6045 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
6046
6047 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6048
6049 * decl.c (struct cp_function): Add named_label_uses.
6050 (push_cp_function_context): Save it.
6051 (pop_cp_function_context): Restore it.
6052 (define_label): Also complain about jumping into the scope of
6053 non-POD objects that don't have constructors.
6054 * tree.c (pod_type_p): New fn.
6055
6056 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6057 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6058 (get_tinfo_fn): Not here.
6059 * repo.c (repo_get_id): Abort if we get called for an incomplete
6060 type.
6061
6062 1998-11-13 Mark Mitchell <mark@markmitchell.com>
6063
6064 * except.c (expand_throw): Make sure first argument to
6065 __cp_push_exception is of type `void*' to avoid spurious error
6066 messages.
6067
6068 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
6069
6070 * pt.c (try_one_overload): Take orig_targs again. Only check for
6071 mismatches against them; we don't care what a previous call found.
6072 (resolve_overloaded_unification): Adjust.
6073
6074 * search.c (lookup_field): Don't return anything for a non-type
6075 field from a dependent type.
6076 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6077 in an array declarator.
6078 (start_decl): Push into the class before looking for the field.
6079
6080 1998-11-08 Mark Mitchell <mark@markmitchell.com>
6081
6082 * method.c (build_overload_value): Handle REFERENCE_TYPE.
6083
6084 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
6085
6086 * decl.c (grokdeclarator): Allow namespace-scoped members if they
6087 are friends.
6088
6089 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
6090
6091 * pt.c (tsubst_decl): Don't mess with the global value of an
6092 un-mangled DECL_ASSEMBLER_NAME.
6093
6094 1998-11-03 Christopher Faylor <cgf@cygnus.com>
6095
6096 * decl.c (init_decl_processing): Remove CYGWIN conditional
6097 since CYGWIN is now able to deal with trapping signals.
6098
6099 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6100
6101 * cp-tree.h: Don't include gansidecl.h.
6102 * exception.cc: Include gansidecl.h (since we don't include config.h)
6103 * g++spec.c: Don't include gansidecl.h.
6104
6105 1998-11-06 Mark Mitchell <mark@markmitchell.com>
6106
6107 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
6108 size of dummy.
6109 (DECL_DEFINED_IN_CLASS_P): New macro.
6110 (TEMPLATE_PARMS_FOR_INLINE): Document.
6111 (check_static_variable_definition): New function.
6112 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6113 appropriate.
6114 (check_static_variable_definition): Split out from ...
6115 (grokdeclarator): Here.
6116 * pt.c (check_default_tmpl_args): New function, split out from ...
6117 (push_template_decl_real): Here.
6118 (instantiate_template): Fix comment.
6119
6120 1998-11-04 Mark Mitchell <mark@markmitchell.com>
6121
6122 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6123 (CP_TYPE_VOLATILE_P): Likewise.
6124 (CP_TYPE_RESTRICT_P): Likewise.
6125
6126 1998-11-03 Mark Mitchell <mark@markmitchell.com>
6127
6128 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6129
6130 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
6131
6132 * class.c (instantiate_type): Be more helpful.
6133
6134 * decl2.c (import_export_decl): Call import_export_class.
6135
6136 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6137 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6138 * pt.c (tsubst_copy): Likewise.
6139
6140 1998-11-02 Mark Mitchell <mark@markmitchell.com>
6141
6142 * init.c (expand_vec_init): Fix off-by-one error.
6143
6144 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
6145
6146 * parse.y (apparent_template_type): New type.
6147 (named_complex_class_head_sans_basetype): Use it.
6148 * Makefile.in (CONFLICTS): One new conflict.
6149 * parse.c: Regenerated.
6150
6151 1998-11-01 Mark Mitchell <mark@markmitchell.com>
6152
6153 * cp-tree.h (COMPARE_STRICT): New macro.
6154 (COMPARE_BASE): Likewise.
6155 (COMPARE_RELAXED): Likewise.
6156 (COMPARE_REDECLARATION): Likewise.
6157 (same_type_p): Likewise.
6158 (same_or_base_type_p): Likewise.
6159 * call.c (standard_conversion): Use them, in place of comptypes
6160 with numeric arguments.
6161 (reference_binding): Likewise.
6162 (convert_like): Likewise.
6163 (build_over_call): Likewise.
6164 (is_subseq): Likewise.
6165 (is_properly_derived_from): Likewise.
6166 (compare_ics): Likewise.
6167 (joust): Likewise.
6168 * class.c (delete_duplicate_fields_1): Likewise.
6169 (resolves_to_fixed_type_p): Likewise.
6170 (instantiate_type): Likewise. Remove #if 0'd code.
6171 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
6172 (pushdecl): Likewise.
6173 (lookup_name_real): Likewise.
6174 (grokdeclarator): Likewise. Check for illegal array declarations.
6175 (grokparms): Likewise.
6176 (grok_op_properties): Likewise.
6177 * decl2.c (check_classfn): Likewise.
6178 * friend.c (is_friend): Likewise.
6179 (make_friend_class): Likewise.
6180 * init.c (expand_aggr_init): Likewise.
6181 (expand_vec_init): Likewise.
6182 * pt.c (is_member_template_class): Remove declaration.
6183 (is_specialization_of): Use COMPARE_* and new macros.
6184 (comp_template_parms): Likewise.
6185 (convert_nontype_argument): Likewise.
6186 (coerce_template_template_parms): Likewise.
6187 (template_args_equal): Likewise.
6188 (lookup_template_class): Likewise.
6189 (type_unification_real): Likewise.
6190 (unify): Likewise.
6191 (get_bindings_real): Likewise.
6192 * search.c (covariant_return_p): Likewise.
6193 (get_matching_virtual): Likewise.
6194 * sig.c (match_method_types): Likewise.
6195 * tree.c (vec_binfo_member): Likewise.
6196 (cp_tree_equal): Likewise.
6197 * typeck.c (common_type): Likewise.
6198 (comp_array_types): Likewise. Get issues involving unknown array
6199 bounds right.
6200 (comptypes): Update comments. Use new flags.
6201 (comp_target_types): Use new macros.
6202 (compparms): Likewise.
6203 (comp_target_parms): Likewise.
6204 (string_conv_p): Likewise.
6205 (build_component_ref): Likewise.
6206 (build_indirect_ref): Likewise.
6207 (build_conditional_expr): Likewise.
6208 (build_static_cast): Likewise.
6209 (build_reinterpret_cast): Likewise.
6210 (build_const_cast): Likewise.
6211 (build_modify_expr): Likewise.
6212 (convert_for_assignment): Likewise.
6213 (comp_ptr_ttypes_real): Likewise.
6214 (ptr_reasonably_similar): Likewise.
6215 (comp_ptr_ttypes_const): Likewise.
6216
6217 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
6218
6219 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6220
6221 1998-10-30 Mark Mitchell <mark@markmitchell.com>
6222
6223 * decl2.c (delete_sanity): Pass integer_zero_node, not
6224 integer_two_node, to build_vec_delete.
6225 * init.c (build_array_eh_cleanup): Remove.
6226 (expand_vec_init_try_block): New function.
6227 (expand_vec_init_catch_clause): Likewise.
6228 (build_vec_delete_1): Don't deal with case that auto_delete_vec
6229 might be integer_two_node anymore.
6230 (expand_vec_init): Rework for initialization-correctness and
6231 exception-correctness.
6232 * typeck2.c (process_init_constructor): Make mutual exclusivity
6233 of cases more obvious.
6234
6235 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
6236
6237 * decl.c (lookup_name_real): OK, only warn if not lexing.
6238 Simplify suggested fix.
6239
6240 * cp-tree.h (IDENTIFIER_MARKED): New macro.
6241 * search.c (lookup_conversions): Use breadth_first_search.
6242 (add_conversions): Avoid adding two conversions to the same type.
6243 (breadth_first_search): Work with base binfos, rather
6244 than binfos and base indices.
6245 (get_virtual_destructor): Adjust.
6246 (tree_has_any_destructor_p): Adjust.
6247 (get_matching_virtual): Adjust.
6248
6249 * pt.c (push_template_decl_real): Generalize check for incorrect
6250 number of template parms.
6251 (is_member_template_class): #if 0.
6252
6253 1998-10-29 Richard Henderson <rth@cygnus.com>
6254
6255 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6256 last.
6257
6258 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
6259
6260 * lex.c: Call check_newline from lang_init always. After
6261 calling cpp_start_read, set yy_cur and yy_lim to read from the
6262 cpplib token buffer.
6263
6264 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
6265
6266 * class.c (instantiate_type): Don't consider templates for a normal
6267 match.
6268
6269 * class.c (finish_struct_1): Don't complain about non-copy
6270 assignment ops in union members.
6271
6272 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6273 (prepare_fresh_vtable): Likewise.
6274 (finish_struct_1): Don't call import_export_class.
6275 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6276 (finish_prevtable_vardecl): Lose.
6277 (finish_file): Don't call it.
6278 * pt.c (instantiate_class_template): Likewise.
6279 * cp-tree.h: Remove it.
6280
6281 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6282 * decl.c (finish_function): Not here.
6283 (start_function): Do set DECL_INITIAL.
6284
6285 * pt.c (push_template_decl_real): Complain about default template
6286 args for enclosing classes.
6287
6288 * call.c (add_function_candidate): Treat conversion functions
6289 as coming from the argument's class.
6290 * cp-tree.h (DECL_CONV_FN_P): New fn.
6291 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6292 * class.c (add_method): Use DECL_CONV_FN_P.
6293 * decl2.c (check_classfn): Likewise.
6294 * error.c (dump_function_name): Likewise.
6295 (dump_function_decl): Likewise.
6296 * pt.c (fn_type_unification): Likewise.
6297 * search.c (add_conversions): Likewise.
6298
6299 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6300
6301 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6302 * method.c (hack_identifier): Also check for using RESULT_DECL
6303 from outer context.
6304
6305 1998-10-27 Mark Mitchell <mark@markmitchell.com>
6306
6307 * decl.c (grokdeclarator): Use type_quals, rather than constp,
6308 consistently.
6309
6310 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6311
6312 * call.c (standard_conversion): instantiate_type here.
6313 (reference_binding): And here.
6314 (implicit_conversion): Not here.
6315 (build_op_delete_call): No need to cons up an OVERLOAD.
6316 * cvt.c (cp_convert_to_pointer): instantiate_type here.
6317 (convert_to_reference): And here.
6318 * decl.c (grok_reference_init): Not here.
6319 (grokparms): Or here.
6320 * typeck2.c (digest_init): Or here.
6321 * typeck.c (decay_conversion): Take the address of overloaded
6322 functions, too.
6323 (require_instantiated_type): Lose.
6324 (convert_arguments): Don't handle unknown types here.
6325 (build_c_cast): Likewise.
6326 (build_binary_op): Gut.
6327 (build_conditional_expr): Don't require_instantiated_type.
6328 (build_modify_expr): Likewise.
6329 (build_static_cast): Don't instantiate_type.
6330 (build_reinterpret_cast): Likewise.
6331 (build_const_cast): Likewise.
6332 (convert_for_initialization): Likewise.
6333 (build_ptrmemfunc): Use type_unknown_p.
6334 (convert_for_assignment): Also do default_conversion on overloaded
6335 functions. Hand them off to ocp_convert.
6336
6337 1998-10-26 Mark Mitchell <mark@markmitchell.com>
6338
6339 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6340 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
6341
6342 * class.c (finish_struct_1): Use build_cplus_array_type to build
6343 array types.
6344 * decl.c (init_decl_processing): Likewise.
6345 * except.c (expand_end_eh_spec): Likewise.
6346 * search.c (expand_upcast_fixups): Simplify very slightly.
6347
6348 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6349
6350 * decl.c (grokdeclarator): Complain about a variable using
6351 constructor syntax coming back null from start_decl.
6352
6353 * friend.c (make_friend_class): Complain about trying to make
6354 a non-class type a friend.
6355
6356 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6357 (start_function): Not here.
6358
6359 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
6360
6361 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6362
6363 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6364
6365 * typeck2.c (process_init_constructor): Only skip anonymous fields
6366 if they are bitfields.
6367
6368 * cp-tree.def (TYPEOF_TYPE): New code.
6369 * error.c (dump_type_real): Handle it.
6370 * pt.c (tsubst): Likewise.
6371 * tree.c (search_tree): Likewise.
6372 * semantics.c (finish_typeof): New fn.
6373 * parse.y (typespec): Use it.
6374 * cp-tree.h: Declare it.
6375
6376 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
6377
6378 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6379
6380 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6381
6382 * typeck.c (convert_arguments): Don't handle pmf references
6383 specially.
6384
6385 * init.c (build_member_call): Don't try to convert to the base type
6386 if it's ambiguous or pedantic.
6387
6388 * typeck2.c (check_for_new_type): Only depend on pedantic for
6389 C-style casts.
6390
6391 1998-10-25 Mark Mitchell <mark@markmitchell.com>
6392
6393 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6394 non-converting constructors.
6395
6396 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6397
6398 * gxxint.texi: Correct documentation for n, N, Q, and B.
6399
6400 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
6401
6402 * parse.y (condition): Convert VAR_DECL from reference to indirect
6403 reference.
6404
6405 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
6406
6407 * exception.cc (__cp_pop_exception): Free the original exception
6408 value, not the potentially coerced one.
6409
6410 1998-10-23 Mark Mitchell <mark@markmitchell.com>
6411
6412 * Makefile.in (hash.h): Run gperf when necessary.
6413
6414 * cp-tree.h (CP_TYPE_READONLY): Remove.
6415 (CP_TYPE_VOLATILE): Likewise.
6416 (CP_TYPE_QUALS): New macro.
6417 (CP_TYPE_CONST_P): Likewise.
6418 (CP_TYPE_VOLATILE_P): Likewise.
6419 (CP_TYPE_RESTRICT_P): Likewise.
6420 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6421 (cp_build_type_variant): Rename to ...
6422 (cp_build_qualified_type): New function.
6423 (c_apply_type_quals_to_decl): Declare.
6424 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6425 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6426 (cp_type_qual_from_rid): New function.
6427 (compparms): Remove unused parameter. All callers changed.
6428 (cp_type_quals): New function.
6429 (at_least_as_qualified_p): Likewise.
6430 (more_qualified_p): Likewise.
6431
6432 * call.c (standard_conversion): Replace calls to
6433 cp_build_type_variant with cp_build_qualified_type. Use
6434 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6435 compare them. Use CP_TYPE_* macros to check qualifiers.
6436 (reference_binding): Likewise.
6437 (implicit_conversion): Likewise.
6438 (add_builtin_candidates): Likewise.
6439 (build_over_call): Likewise.
6440 * class.c (overrides): Compare all qualifiers, not just `const',
6441 on method declarations.
6442 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6443 (convert_pointer_to_real): Likewise.
6444 (type_promotes_to): Likewise.
6445 * decl.c (check_for_uninitialized_const_var): New function.
6446 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6447 (cp_finish_decl): Use check_for_uninitialized_const_var.
6448 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
6449 handle `restrict'.
6450 (grok_ctor_properties): Likewise.
6451 (grok_op_properties): Likewise.
6452 (start_function): Likewise.
6453 (rever_static_member_fn): Likewise.
6454 * decl2.c (grok_method_quals): Likewise.
6455 (grokfield): Likewise.
6456 * error.c (dump_readonly_or_volatile): Rename to ...
6457 (dump_qualifiers): New function. Handle `restrict'.
6458 (dump_type_real): Use it.
6459 (dump_aggr_type): Likewise.
6460 (dump_type_prefix): Likewise.
6461 (dump_type_suffix): Likewise.
6462 (dump_function_decl): Likewise.
6463 (cv_as_string): Likewise.
6464 * gxx.gperf: Add __restrict and __restrict__.
6465 * gxxint.texi: Document `u' as used for `__restrict', and a few
6466 other previously undocumented codes.
6467 * hash.h: Regenerated.
6468 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6469 (build_member_call): Likewise.
6470 (build_new_1): Likewise.
6471 * lex.c (init_parse): Add entry for RID_RESTRICT.
6472 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6473 (cp_type_qual_from_rid): Define.
6474 * lex.h (enum rid): Add RID_RESTRICT.
6475 * method.c (process_modifiers): Deal with `restrict'.
6476 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6477 * parse.c: Regenerated.
6478 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6479 (tsubst_aggr_type): Likewise.
6480 (tsubst): Likewise.
6481 (check_cv_quals_for_unify): Likewise.
6482 (unify): Likewise.
6483 * rtti.c (init_rtti_processing): Likewise.
6484 (build_headof): Likewise.
6485 (get_tinfo_var): Likewise.
6486 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
6487 (expand_class_desc): Likewise.
6488 (expand_attr_desc): Likewise.
6489 (synthesize_tinfo_fn): Likewise.
6490 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
6491 (get_matching_virtual): Likewise.
6492 (expand_upcast_fixups): Likewise.
6493 * sig.c (build_signature_pointer_or_reference_name): Take
6494 type_quals, not constp and volatilep.
6495 (build_signature_pointer_or_reference_type): Likewise.
6496 (match_method_types): More CP_TYPE_QUALS conversion, etc.
6497 (build_signature_pointer_constructor): Likewise.
6498 (build_signature_method_call): Likewise.
6499 * tree.c (build_cplus_array_type): Likewise.
6500 (cp_build_type_variant): Rename to ...
6501 (cp_build_qualified_type): New function. Deal with `__restrict'.
6502 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6503 (build_exception_variant): Likewise.
6504 (mapcar): Likewise.
6505 * typeck.c (qualif_type): Likewise.
6506 (common_type): Likewise.
6507 (comptypes): Likewise.
6508 (comp_cv_target_types): Likewise.
6509 (at_least_as_qualified_p): Define.
6510 (more_qualified_p): Likewise.
6511 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6512 (compparms): Likewise.
6513 (inline_conversion): Likewise.
6514 (string_conv_p): Likewise.
6515 (build_component_ref): Likewise.
6516 (build_indirect_ref): Likewise.
6517 (build_array_ref): Likewise.
6518 (build_unary_op): Likewise.
6519 (build_conditional_expr): Likewise.
6520 (build_static_cast): Likewise.
6521 (build_c_cast): Likewise.
6522 (build_modify_expr): Likewise.
6523 (convert_For_assignment): Likewise.
6524 (comp_ptr_ttypes_real): Likewise.
6525 (cp_type_quals): New function.
6526
6527 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
6528
6529 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6530 (CP_TYPE_VOLATILE): Likewise.
6531 * decl.c (grokdeclarator): Use them.
6532 * tree.c (canonical_type_variant): Likewise.
6533
6534 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
6535
6536 * parse.y (named_class_head): Push into class while parsing the
6537 base class list.
6538 * decl2.c (push_scope, pop_scope): New functions.
6539 * cp-tree.h: Declare them.
6540 * init.c (build_new_1): Delay cleanup until end of full expression.
6541
6542 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
6543
6544 * typeck.c (build_component_ref): Use of a type here is an error.
6545
6546 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
6547
6548 Revamp references to member functions.
6549 * method.c (hack_identifier): Call build_component_ref for a
6550 reference to a member function.
6551 * typeck.c (build_component_ref): Only return a single function
6552 if it's static. Otherwise, return a COMPONENT_REF.
6553 (build_x_function_call): Handle a COMPONENT_REF.
6554 (build_unary_op): Handle all unknown-type things.
6555 * decl2.c (arg_assoc): Handle COMPONENT_REF.
6556 * class.c (instantiate_type): Complain if the function we get is a
6557 nonstatic member function. Remove code for finding "compatible"
6558 functions.
6559 * pt.c (tsubst_copy): Handle NOP_EXPR.
6560 * tree.c (build_dummy_object): New fn.
6561 (maybe_dummy_object): New fn.
6562 (is_dummy_object): New fn.
6563 * cp-tree.h: Declare them.
6564 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6565 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6566 * init.c (build_member_call): Use maybe_dummy_object and
6567 is_dummy_object.
6568 (build_offset_ref): Use maybe_dummy_object.
6569 (resolve_offset_ref): Use is_dummy_object.
6570 * typeck.c (build_x_function_call): Call build_dummy_object.
6571 (unary_complex_lvalue): Call is_dummy_object.
6572
6573 * typeck.c (build_component_addr): Make sure field is a field.
6574
6575 * call.c (build_new_op): Delete obsolete code.
6576
6577 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6578
6579 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
6580
6581 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6582 std if std is ignored.
6583
6584 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
6585
6586 * decl.c (grokvardecl): Fix thinko.
6587
6588 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6589 not the left.
6590
6591 * parse.y (fn.def2): Fix 'attrs' format.
6592
6593 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6594
6595 * Makefile.in (CONFLICTS): Update.
6596 * parse.y (expr_or_declarator_intern): New rule.
6597 (expr_or_declarator, direct_notype_declarator, primary,
6598 functional_cast): Use it.
6599 (notype_declarator_intern): New rule.
6600 (notype_declarator, complex_notype_declarator): Use it.
6601
6602 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
6603
6604 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6605 (grokvardecl): Likewise.
6606
6607 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6608
6609 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6610 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6611
6612 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6613
6614 * pt.c (process_partial_specialization): Cast 1st argument of
6615 `bzero' to (PTR).
6616
6617 * tree.c (build_base_fields): Cast `base_align' to (int) when
6618 comparing against one.
6619
6620 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6621
6622 * decl.c (lookup_name_real): Handle template parameters for member
6623 templates where said parameters have the same name as the
6624 surrounding class.
6625
6626 * decl.c (expand_static_init): Build cleanups before entering the
6627 anonymous function used to do them to avoid access-checking
6628 confusion.
6629
6630 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6631 accidentally removed by previous change, and make DECL_RTL here.
6632 * class.c (add_method): Don't make DECL_RTL here.
6633
6634 * pt.c (for_each_template_parm): Don't examine uninstantiated
6635 default arguments.
6636
6637 1998-10-16 Dave Brolley <brolley@cygnus.com>
6638
6639 * lex.c (real_yylex): Fix unaligned access of wchar_t.
6640
6641 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6642
6643 * class.c (add_method): Fix documentation to reflect previous
6644 changes. Check for duplicate method declarations here.
6645 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6646 correctly; such things never match.
6647 (grokfndecl): Don't look for duplicate methods here.
6648 * decl2.c (check_classfn): Don't assume names are mangled.
6649 Don't add bogus member function declarations to a class before the
6650 class type is complete.
6651 (grokfield): Reformat error message.
6652 * method.c (set_mangled_name_for_decl): Don't mangle names while
6653 processing_template_decl.
6654
6655 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
6656
6657 * typeck.c (build_indirect_ref): Complain about a pointer to data
6658 member, too.
6659 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6660 data member.
6661 * init.c (resolve_offset_ref): Don't undo the above.
6662
6663 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6664 (struct lang_decl_flags): Add `bitfield'.
6665 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6666 DECL_BIT_FIELD.
6667 * decl2.c (grokbitfield, grok_alignof): Likewise.
6668 * init.c (build_offset_ref): Likewise.
6669 * typeck.c (build_component_addr, expr_sizeof): Likewise.
6670 * cvt.c (build_up_reference): Don't crash if taking the address
6671 returns error_mark_node.
6672
6673 * decl.c (grokfndecl): Also check ctype when checking for ::main().
6674
6675 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
6676
6677 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6678 Do mangling here.
6679 (grokdeclarator): Instead of here.
6680 * friend.c (do_friend): Lose special handling of ::main and
6681 __builtin_*.
6682 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6683
6684 * spew.c (yylex): Clear looking_for_typename if we got
6685 'enum { ... };'.
6686
6687 1998-10-15 Mark Mitchell <mark@markmitchell.com>
6688
6689 * class.c (maybe_warn_about_overly_private_class): Improve error
6690 messages for class with only private constructors.
6691
6692 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6693 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6694 (build_typename_type): New function.
6695 * decl.c (build_typename_type): Broken out from ...
6696 (make_typename_type): Use it.
6697 * search.c (lookup_field): Likewise.
6698
6699 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6700
6701 * pt.c (convert_nontype_argument): Check against type_referred_to.
6702 * decl.c (grokvardecl): Check for declarator name before building
6703 DECL_ASSEMBLER_NAME.
6704
6705 1998-10-14 Mark Mitchell <mark@markmitchell.com>
6706
6707 * pt.c (lookup_template_class): Add comment.
6708 (instantiate_class_template): Don't mark the _TYPE node for
6709 member class templates as an instantiation.
6710
6711 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
6712
6713 * decl.c (grokfndecl): Fix my thinko.
6714
6715 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
6716
6717 * tinfo2.cc (fast_compare): Remove.
6718 (before): Just use strcmp.
6719 * tinfo.cc (operator==): Just use strcmp.
6720
6721 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6722
6723 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6724 declarations.
6725
6726 1998-10-13 Mark Mitchell <mark@markmitchell.com>
6727
6728 * cp-tree.h (specializations_of_same_template_p): Remove.
6729 * search.c (get_template_base): Don't use it.
6730 (get_template_base_recursive): Likewise.
6731 * pt.c (specializations_of_same_template_p): Remove.
6732 (unify): Don't use it.
6733 (lookup_template_class): Find the correct parent when setting
6734 CLASSTYPE_TI_TEMPLATE.
6735
6736 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6737
6738 * tinfo.cc (operator==): Always compare names.
6739
6740 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6741
6742 * decl.c (start_function): Fix cut-and-paste error.
6743
6744 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6745
6746 * inc/typeinfo: Add #pragma interface.
6747 (operator!=): Just call operator==.
6748 * tinfo.cc: Add #pragma implementation.
6749 (operator==): Move from inc/typeinfo and tinfo2.cc.
6750 Check __COMMON_UNRELIABLE instead of _WIN32.
6751
6752 * typeck2.c (my_friendly_abort): Add URL.
6753
6754 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6755
6756 * decl.c (start_method): Added extra parameter for attributes.
6757 * cp-tree.h (start_method): Update prototype.
6758 * parse.y (fn.def2): Update start_method parameter list.
6759
6760 1998-10-11 Mark Mitchell <mark@markmitchell.com>
6761
6762 * cp-tree.h (specializations_of_same_template_p): Declare.
6763 * pt.c (specializations_of_same_template_p): New function.
6764 (unify): Use it.
6765 * search.c (get_template_base): Use it.
6766 (get_template_base_recursive): Likewise.
6767
6768 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
6769
6770 * decl2.c (start_objects): Add new variable `joiner' and
6771 initialize it properly.
6772
6773 1998-10-09 Mark Mitchell <mark@markmitchell.com>
6774
6775 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6776 change to vtable types.
6777
6778 * cvt.c (ocp_convert): Avoid infinite recursion caused by
6779 1998-10-03 change.
6780
6781 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
6782
6783 * pt.c (resolve_overloaded_unification): New fn.
6784 (try_one_overload): Likewise.
6785 (unify): Don't fail on unknown type.
6786 (type_unification_real): Likewise. Use resolve_overloaded_unification
6787 to handle an overloaded argument.
6788 (template_args_equal): Split out...
6789 (comp_template_args): From here.
6790 (determine_specialization): Also allow a template with more
6791 parms than were explicitly specified.
6792 * cp-tree.h: Add template_args_equal.
6793 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6794
6795 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
6796
6797 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6798 change.
6799
6800 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
6801
6802 * typeck.c (unsigned_type): Only return TItype nodes when
6803 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6804 (signed_type): Likewise.
6805 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6806 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6807 (init_decl_processing): Only create TItype nodes when
6808 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6809 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6810 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6811
6812 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6813
6814 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6815 (gxx.gperf): Update comments describing invocation flags.
6816 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6817
6818 1998-10-07 Mark Mitchell <mark@markmitchell.com>
6819
6820 * class.c (finish_struct_1): Add commentary on previous change.
6821
6822 * cp-tree.h (vtbl_ptr_type_node): New variable.
6823 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6824 already of the right type.
6825 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6826 Simplify code to grow vtable.
6827 * decl.c (vtbl_ptr_type_node): Define.
6828 (init_decl_processing): Initialize it.
6829
6830 1998-10-06 Mark Mitchell <mark@markmitchell.com>
6831
6832 * cp-tree.def (PTRMEM_CST): New tree node.
6833 * cp-tree.h (ptrmem_cst): New type.
6834 (lang_type): Remove local_typedecls.
6835 (dummy): Increase to 12 bits from 11.
6836 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6837 (PTRMEM_CST_CLASS): New macro.
6838 (PTRMEM_CST_MEMBER): Likewise.
6839 (current_access_specifier): New variable.
6840 (current_class_type): Remove duplicate declaration.
6841 (finish_struct): Change prototype.
6842 (unreverse_member_declarations): New function.
6843 (pushdecl_class_level): Change prototype.
6844 (grok_enum_decls): Remove.
6845 (fixup_anonymous_union): New function.
6846 (grok_x_components): Change prototype.
6847 (tsubst_chain): Remove.
6848 (finish_member_template_decl): Likewise.
6849 (check_explicit_specialization): Fix indentation.
6850 (finish_class_definition): Change prototype.
6851 (finish_member_class_template): Likewise.
6852 (finish_member_declaration): New function.
6853 (check_multiple_declarators): Likewise.
6854 * class.c (class_stack_node_t): New type.
6855 (current_class_base): Remove.
6856 (current_class_stack): Change type.
6857 (current_access_specifier): New variable.
6858 (grow_method): Remove.
6859 (check_member_decl_is_same_in_complete_scope): Break out from
6860 finish_struct.
6861 (make_method_vec): New function.
6862 (free_method_vec): Likewise.
6863 (add_implicitly_declared_members): Break out from finish_struct_1.
6864 (free_method_vecs): New variable.
6865 (add_method): Rework for direct use from parser.
6866 (handle_using_decl): Watch for NULL_TREE while iterating through
6867 CLASSTYPE_METHOD_VEC.
6868 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6869 just do some error-checking.
6870 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6871 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
6872 (finish_struct): Change prototype. Simplify; fields and methods
6873 are already set up at this point.
6874 (init_class_processing): Set up current_class_stack.
6875 (pushclass): Save current_access_specifier.
6876 (popclass): Restore it.
6877 (currently_open_class): Simplify.
6878 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6879 * decl.c (saved_scope): Add access_specifier.
6880 (maybe_push_to_top_level): Save it.
6881 (pop_from_top_level): Restore it.
6882 (maybe_process_template_type_declaration): Use
6883 finish_member_declaration.
6884 (pushtag): Likewise.
6885 (pushdecl_class_level): Don't return a value.
6886 (fixup_anonymous_union): Break out from grok_x_components.
6887 (shadow_tag): Use it.
6888 (xref_tag): Complain about using an elaborated type specifier to
6889 reference a template type parameter or typedef name.
6890 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6891 (current_local_enum): Remove.
6892 (build_enumerator): Call finish_member_declaration.
6893 (grok_enum_decls): Remove.
6894 * decl2.c (grok_x_components): Simplify.
6895 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6896 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6897 (merge_functions): Add to comment.
6898 (arg_assoc_type): Prototype.
6899 (arg_assoc): Pass as many arguments as there are parameters.
6900 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
6901 OFFSET_REF.
6902 * expr.c (cpls_expand_expr): Remove dead code. Handle
6903 PTRMEM_CST.
6904 * friend.c (do_friend): Lookup friends when in nested classes.
6905 Change comments.
6906 * init.c (build_offset_ref): Do lookup even for classes that are
6907 only partially defined.
6908 (decl_constant_value): Remove dead code.
6909 * method.c (build_overload_value): Remove hack where by TYPE was
6910 not a TYPE. Handle PTRMEM_CST.
6911 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6912 should go.
6913 * parse.y (components, notype_components, component_decl,
6914 component_decl_1, component_declarator, component_declarator0):
6915 Now all are itype rather than ttype. Rework to add members to
6916 classes on the fly.
6917 (typesqpecqual_reserved): Use check_multiple_declarators.
6918 (structsp): Update class to finish_class_definition.
6919 (do_xref_defn): Unsplit into named_class_head.
6920 (access_specifier): Set current_access_specifier.
6921 * pt.c (set_current_access_from_decl): New function.
6922 (finish_member_template_decl): Don't take the parameters.
6923 (comp_template_args): Make more robust.
6924 (lookup_template_class): Don't use current_local_enum.
6925 (for_each_template_parm): Handle PTRMEM_CST.
6926 (instantiate_class_template): Use set_current_access_from_decl,
6927 finish_member_declaration and unreverse_member_declarations. Set
6928 lineno/input_filename before generating implicit member functions.
6929 (type_unification_real): Don't assume back-unification happens
6930 only for the last argument.
6931 (regenerate_decl_from_template): Call pushclass a bit earlier.
6932 (tsubst_chain): Remove.
6933 (tsubst_enum): Use set_current_access_from_decl.
6934 (set_mangled_name_for_template_decl): Fix indentation.
6935 * search.c (lookup_fnfields_1): Change iteration through
6936 CLASSTYPE_METHOD_VEC.
6937 (dfs_pushdecls): Likewise.
6938 (dfs_compress_decls): Likewise.
6939 (add_conversions): Likewise.
6940 * semantics.c (finish_class_definition): Don't take components.
6941 Change call to finish_struct.
6942 (finish_member_declaration): New function.
6943 (finish_member_class_template): Don't take template parameters.
6944 Change call to grok_x_components. Call finish_member_template_decl.
6945 (check_multiple_declarators): New function.
6946 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6947 a passed in fieldlist.
6948 * tree.c (search_tree): Handle PTRMEM_CST.
6949 (mapcar): Likewise.
6950 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6951 INTEGER_CSTs, for pointer-to-data members.
6952
6953 * call.c (resolve_args): Resolve template specializations, if
6954 possible.
6955
6956 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6957
6958 * Makefile.in (spew.o): Depend on toplev.h.
6959
6960 * call.c (compare_ics): Initialize variables `deref_from_type2',
6961 `deref_to_type1' and `deref_to_type2'.
6962
6963 * except.c (get_eh_type): Hide prototype and definition.
6964 (process_start_catch_block_old): Remove unused static prototype.
6965
6966 * pt.c (tsubst_decl): Initialize variable `argvec'.
6967
6968 * spew.c: Include toplev.h.
6969
6970 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
6971
6972 * pt.c (instantiate_decl): Do save and restore file position.
6973
6974 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
6975
6976 * method.c (build_decl_overload_real): Clear
6977 numeric_output_need_bar after __.
6978
6979 1998-10-05 Nathan Sidwell <nathan@acm.org>
6980
6981 * call.c (build_new_method_call): Issue 'incomplete type' error,
6982 if class is not defined.
6983
6984 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6985
6986 * call.c (build_object_call): Move declaration of variable
6987 `fn' into the scope where it is used. Don't access variable
6988 `fn' when it is uninitialized, instead use `fns'.
6989
6990 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6991
6992 * errfn.c (cp_thing): Print buf as a string not as a printf format
6993 to avoid problems with the operator%. Consequently, `%%' sequences
6994 in format are copied as `%' in buf.
6995
6996 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
6997
6998 * pt.c (pop_tinst_level): Call extract_interface_info.
6999 (instantiate_decl): Don't save and restore file position.
7000
7001 * decl.c (cp_finish_decl): Make statics in extern inlines and
7002 templates common, if possible and the target doesn't support weak
7003 symbols.
7004
7005 * decl.c (grokdeclarator): Remove redundant calls to
7006 build_type_variant and some duplicated code.
7007 * sig.c (build_signature_reference_type): Only take the type parm.
7008 (build_signature_pointer_type): Likewise.
7009 * tree.c (build_cplus_method_type): Adjust.
7010 * cp-tree.h: Update.
7011
7012 1998-10-04 Mark Mitchell <mark@markmitchell.com>
7013
7014 * call.c (build_over_call): Make pedwarns about dropped qualifiers
7015 into full-fledged errors.
7016 * cvt.c (convert_to_reference): Likewise.
7017 * typeck.c (convert_for_assignment): Likewise.
7018
7019 * search.c (expand_upcast_vtables): In addition to unsetting
7020 TREE_READONLY, remove top-level const type qualifier.
7021
7022 1998-10-03 Mark Mitchell <mark@markmitchell.com>
7023
7024 * class.c (current_class_ptr, current_class_ref): Clarify
7025 documentation.
7026 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7027 NOP type conversions.
7028 * decl.c (decls_match): Use comptypes directly; ignore
7029 qualifiers on the DECL.
7030 (duplicate_decls): Remove qualifier checks on DECL.
7031 (grokdeclarator): Make the type built up include top-level
7032 qualifiers.
7033 * decl2.c (do_dtors): Fix spelling error.
7034 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7035 when printing type information.
7036 * init.c (build_new_1): Add documentation. Deal with the fact
7037 that type of allocated memory now contains qualifiers.
7038 * lex.c (is_global): Improve error-recovery.
7039 * sig.c (build_member_function_pointer): Don't cast away const
7040 on fields of sigtable_entry_type.
7041 * tree.c (lvalue_type): Don't look at top-level qualifiers on
7042 expressions.
7043 * typeck.c (decay_conversion): Likewise.
7044 (build_component_ref): Make sure the type of the COMPONENT_REF
7045 contains top-level qualifiers, as appropriate. Improve
7046 error-handling.
7047 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
7048 (build_array_ref): Likewise.
7049 (build_unary_op): Improve error-recovery.
7050 (unary_complex_lvalue): Make taking the address a bound member
7051 function an error, not a sorry.
7052 (build_conditional_expr): Look at the type qualifiers, not the
7053 qualifiers on the expression itself.
7054
7055 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
7056
7057 * decl2.c (merge_functions): Remove duplicates.
7058
7059 * decl2.c: Add -f{no-,}implicit-inline-templates.
7060 (import_export_decl): Check it.
7061
7062 * decl.c (lookup_name_real): Template parms also take precedence
7063 over implicit typename. Only warn if yylex.
7064
7065 * typeck.c (build_conditional_expr): Only fold if ifexp is an
7066 INTEGER_CST.
7067
7068 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7069 instead of linkage.
7070
7071 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
7072
7073 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7074 * class.c (build_vbase_pointer): Use it.
7075 * rtti.c (expand_class_desc): Likewise.
7076 * tree.c (build_vbase_pointer_fields): Likewise.
7077
7078 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
7079
7080 * decl.c (start_decl): Add invocation of
7081 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7082 (start_function): Add invocation of
7083 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7084
7085 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7086 HANDLE_GENERIC_PRAGMAS.
7087
7088 1998-09-28 Anthony Green <green@cygnus.com>
7089
7090 * semantics.c (finish_asm_stmt): Always permit volatile asms.
7091
7092 1998-09-28 Mark Mitchell <mark@markmitchell.com>
7093
7094 * decl.c (grokdeclarator): Tighten checks for invalid
7095 destructors. Improve error-messages and error-recovery.
7096 * decl2.c (check_classfn): Don't assume that mangled destructor
7097 names contain type information.
7098
7099 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
7100
7101 * search.c (get_base_distance): Remove assert.
7102
7103 * decl2.c (build_anon_union_vars): Don't process a field with no
7104 name.
7105 (finish_anon_union): Also complain about local anon unions with no
7106 members.
7107
7108 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7109
7110 * decl.c (lookup_namespace_name): If the name is a namespace,
7111 return it immediately.
7112
7113 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7114
7115 * cp-tree.h (define_case_label): Remove unused parameter.
7116 (check_java_method): Likewise.
7117 (grokclassfn): Likewise.
7118 (expand_aggr_init): Likewise.
7119 (build_x_delete): Likewise.
7120 (maybe_end_member_template_processing): Likewise.
7121 (unshare_base_binfos): Add prototype.
7122 (string_conv_p): Likewise.
7123 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7124
7125 * cvt.c (build_up_reference): Remove unused parameter
7126 `checkconst', all callers changed.
7127 (build_type_conversion): Mark parameter `code' with
7128 ATTRIBUTE_UNUSED.
7129 (build_expr_type_conversion): Initialize variable `conv'.
7130
7131 * decl.c (push_namespace): Initialize variable `d'.
7132 (define_case_label): Remove unused parameter `decl', all callers
7133 changed.
7134
7135 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7136 `argc' with ATTRIBUTE_UNUSED.
7137 (grokclassfn): Remove unused parameter `cname', all callers
7138 changed.
7139 (check_java_method): Likewise for parameter `ctype'.
7140 (copy_assignment_arg_p): Mark parameter `virtualp' with
7141 ATTRIBUTE_UNUSED.
7142 (finish_prevtable_vardecl): Likewise for parameter `prev'.
7143
7144 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7145
7146 * init.c (expand_aggr_init_1): Remove unused parameter
7147 `alias_this', all callers changed.
7148 (expand_aggr_init): Likewise.
7149 (expand_default_init): Likewise.
7150 (build_new_1): Initialize variable `susp'.
7151 (build_x_delete): Remove unused parameter `type', all callers
7152 changed.
7153
7154 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7155 ATTRIBUTE_UNUSED.
7156 (readescape): Use (unsigned) value in shift.
7157 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
7158 comparing to a signed quantity.
7159
7160 * pt.c (maybe_end_member_template_processing): Remove unused
7161 parameter `decl', all callers changed.
7162 (check_explicit_specialization): Add braces around empty body in
7163 an else-statement.
7164 (current_template_args): Initialize variable `args'.
7165 (lookup_template_class): Likewise for variable `prev_local_enum'.
7166 (tsubst_decl): Likewise for variable `r'.
7167 (set_mangled_name_for_template_decl): Initialize variable
7168 `context'.
7169
7170 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7171 Likewise for variable `i'.
7172 (yylex): Initialize variable `trrr'.
7173
7174 * typeck.c (compparms): Mark variable `strict' with
7175 ATTRIBUTE_UNUSED.
7176
7177 * xref.c (simplify_type): Cast argument of ctype function to
7178 `unsigned char'.
7179
7180 1998-09-24 Mark Mitchell <mark@markmitchell.com>
7181
7182 * cp-tree.h (language_lvalue_valid): Remove.
7183 * decl.c (grokdeclarator): Don't disallow references to functions.
7184 * tree.c (lvalue_p_1): New function, combining duplicated
7185 code from ...
7186 (lvalue_p): Use it.
7187 (real_lvalue_p): Likewise.
7188 * typeck.c (language_lvalue_valid): Remove.
7189 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7190 they don't have TREE_READONLY set.
7191 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7192
7193 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
7194
7195 * spew.c (yylex): Give diagnostic.
7196 * hash.h (is_reserved_word): Add export.
7197 * gxx.gperf: Likewise.
7198 * lex.h (rid): Add RID_EXPORT.
7199 * lex.c (init_parse): Likewise.
7200
7201 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7202
7203 * friend.c (do_friend): Make warning a full sentence.
7204
7205 1998-09-22 Mark Mitchell <mark@markmitchell.com>
7206
7207 * parse.y (component_decl_list): Improve error-recovery.
7208
7209 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
7210
7211 * decl.c (make_typename_type): Move error to point where name
7212 variable can be used by dump_type.
7213
7214 1998-09-22 Mark Mitchell <mark@markmitchell.com>
7215
7216 * decl.c (grokfndecl): Improve error-recovery.
7217 * decl2.c (grokfield): Likewise.
7218 * pt.c (finish_member_template_decl): Likewise.
7219
7220 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
7221
7222 * method.c (hack_identifier): Finding multiple members is always
7223 an error.
7224
7225 1998-09-21 Per Bothner <bothner@cygnus.com>
7226
7227 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
7228
7229 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
7230
7231 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7232
7233 1998-09-20 Mark Mitchell <mark@markmitchell.com>
7234
7235 * class.c (maybe_warn_about_overly_private_class): Reformat.
7236
7237 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
7238
7239 * exception.cc (__cplus_type_matcher): Realign some code.
7240
7241 1998-09-16 Mark Mitchell <mark@markmitchell.com>
7242
7243 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7244 (tinfo2.o): Likewise.
7245 (exception.o): Likewise.
7246 (new.o): Likewise.
7247 (opnew.o): Likewise.
7248 (opnewnt.o): Likewise.
7249 (opvnew.o): Likewise.
7250 (opvnewnt.o): Likewise.
7251 (opdel.o): Likewise.
7252 (opdelnt.o): Likewise.
7253 (opvdel.o): Likewise.
7254 (opvdelnt.o): Likewise.
7255
7256 1998-09-16 Richard Henderson <rth@cygnus.com>
7257
7258 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7259
7260 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
7261
7262 * call.c (build_field_call): Handle static data members too.
7263
7264 * typeck.c (comptypes): When comparing pointer types, check
7265 whether referred types match even in strictest modes.
7266
7267 1998-09-15 Mark Mitchell <mark@markmitchell.com>
7268
7269 * cp-tree.h: Revert previous change.
7270 (finish_struct_methods): Remove declaration.
7271 * class.c: Revert previous change.
7272 (maybe_warn_about_overly_private_class): New function.
7273 (finish_struct_methods): Declare here, and make static. Remove
7274 unnecessary parameters. Tidy slightly. Use
7275 maybe_warn_about_overly_private_class.
7276 (finish_struct_1): Adjust. Remove check for private constructors,
7277 now done elsewhere.
7278 (finish_struct): Adjust.
7279
7280 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7281
7282 * except.c (expand_start_catch_block): No need to check for new
7283 exception model.
7284 (process_start_catch_block_old): Deleted.
7285 (process_start_catch_block): Add call to start_decl_1().
7286 (expand_end_catch_block): Add call to end_catch_handler().
7287 * exception.cc (__cplus_type_matcher): Only check the exception
7288 language if there is an exception table.
7289
7290 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7291
7292 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7293 as used to prevent conflicts with virtual function tables.
7294
7295 1998-09-14 Mark Mitchell <mark@markmitchell.com>
7296
7297 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7298 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7299 * class.c (maybe_class_too_private_p): New function.
7300 (finish_struct_methods): Use it.
7301 (finish_struct_1): Likewise.
7302 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7303 appropriate.
7304
7305 * pt.c (check_specialization_scope): Fix spelling error.
7306 (check_explicit_specialization): Remove code to handle explicit
7307 specializations in class scope; they are now correctly diagnosed
7308 as errors.
7309
7310 1998-09-10 Mark Mitchell <mark@markmitchell.com>
7311
7312 * decl.c (pushdecl): Don't copy types if the
7313 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7314 type.
7315
7316 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7317
7318 * class.c (get_enclosing_class): New function.
7319 (is_base_of_enclosing_class): Likewise.
7320 * cp-tree.h (get_enclosing_class): Declare.
7321 (is_base_of_enclosing_class): Likewise.
7322 * pt.c (coerce_template_parms): Use them.
7323
7324 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
7325
7326 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7327 null to decide whether to use it.
7328
7329 * error.c (dump_type_real): Handle NAMESPACE_DECL.
7330 * parse.y (base_class.1): Avoid crash on error.
7331
7332 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
7333
7334 * decl.c (make_typename_type): If context is a namespace, the code
7335 is in error.
7336
7337 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
7338
7339 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7340
7341 1998-09-08 Mark Mitchell <mark@markmitchell.com>
7342
7343 * cp-tree.h (anonymous_namespace_name): Declare.
7344 * decl.c: Define it.
7345 (push_namespace): Use anonymous_namespace_name, rather than local
7346 static anon_name.
7347 * error.c (dump_decl): If a namespace is named
7348 anonymous_namespace_name, call it {anonymous}.
7349
7350 * decl.c (grokparms): Distinguish between references and pointers
7351 in error message.
7352
7353 1998-09-08 Richard Henderson <rth@cygnus.com>
7354 Mark Mitchell <mark@markmitchell.com>
7355
7356 * pt.c (process_partial_specialization): Consistently allocate
7357 and zero tpd.parms based on ntparms. Use tpd2.parms, not
7358 tpd.parms, where appropriate.
7359
7360 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
7361
7362 * Makefile.in (INCLUDES): Update after recent toplevel gcc
7363 reorganizations.
7364
7365 1998-09-05 Mark Mitchell <mark@markmitchell.com>
7366
7367 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7368 * class.c (finish_struct): Remove hackery to deal with explicit
7369 specializations in class scope.
7370 * decl.c (grokfndecl): Improve error-recovery.
7371 * decl2.c (grokfield): Likewise.
7372 * pt.c (check_specialization_scope): New function.
7373 (begin_specialization): Call it.
7374 (process_partial_specialization): New function, split out from
7375 push_template_decl. Check partial specializations more
7376 stringently.
7377 (push_template_decl): Call it.
7378 (check_explicit_specialization): Don't attempt to handle explicit
7379 specializations in class scope.
7380 (template_parm_data): Document. Add current_arg and
7381 arg_uses_template_parms.
7382 (mark_template_parm): Set it.
7383 (tsubst_arg_types): Remove unused variable.
7384 * semantics.c (begin_class_definition): Tweak.
7385
7386 1998-09-04 Mark Mitchell <mark@markmitchell.com>
7387
7388 * inc/typeinfo (type_info::type_info(const char*)): Make
7389 `explicit'.
7390
7391 * cp-tree.h (hash_tree_cons_simple): New macro.
7392 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
7393 (coerce_template_parms): Use make_temp_vec, instead of
7394 make_tree_vec. Document this behavior.
7395 (lookup_template_class): Likewise.
7396 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7397 Remove dead code (and add assertion to check its deadness). Fix
7398 bug w.r.t. exception specifications.
7399
7400 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
7401
7402 * decl2.c (import_export_vtable): Always make artificials comdat.
7403 (import_export_decl): Likewise.
7404 * pt.c (mark_decl_instantiated): Likewise.
7405
7406 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7407
7408 * cp-tree.h (finish_globally_qualified_member_call_expr):
7409 Rename to ...
7410 (finish_qualified_call_expr).
7411 * semantics.c: Likewise.
7412 * parse.y (primary): Use it.
7413 * method.c (hack_identifier): Remove redundant code.
7414
7415 * init.c (resolve_offset_ref): Call convert_from_reference to
7416 handle members of reference type. Improve error recovery.
7417
7418 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
7419
7420 * cp-tree.h: Declare warn_nontemplate_friend.
7421 * decl2.c (lang_decode_option): Set.
7422 * lang-options.h: Add -Wnon-template-friend.
7423 * friend.c (do_friend): Use to toggle non-template function warning.
7424
7425 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7426
7427 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7428 corresponding INTEGER_CSTs when processing_template_decl.
7429 * pt.c (tsubst_enum): Tweak accordingly.
7430
7431 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7432
7433 * decl.c (pushdecl_class_level): Add warning here.
7434 (pushdecl): Tweak.
7435
7436 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
7437
7438 * cvt.c (convert_pointer_to_real): Tidy.
7439 * search.c (get_base_distance_recursive): Simplify.
7440 (get_base_distance): Likewise.
7441
7442 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7443 parms.
7444
7445 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
7446
7447 * lex.c (check_newline): Call HANDLE_PRAGMA before
7448 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
7449 if unknown pragmas are encountered.
7450 (handle_sysv_pragma): Interpret return code from
7451 handle_pragma_token (). Return success/failure indication rather
7452 than next unprocessed character.
7453 (pragma_getc): New function: retrieves characters from the
7454 input stream. Defined when HANDLE_PRAGMA is defined.
7455 (pragma_ungetc): New function: replaces characters back into the
7456 input stream. Defined when HANDLE_PRAGMA is defined.
7457
7458 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7459
7460 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7461 * class.c (build_vtable_entry_ref): Likewise.
7462
7463 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7464
7465 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7466 * decl2.c (import_export_decl): Likewise.
7467 * pt.c (instantiate_decl): Use it.
7468
7469 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7470
7471 * decl.c (lookup_name_real): Also do implicit typename thing for
7472 artificial TYPE_DECLs.
7473 * search.c (lookup_field): Likewise.
7474 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7475 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7476 (enter_scope_of): Extract type from implicit typename.
7477 (begin_class_definition): Likewise.
7478 * lex.c (identifier_type): Handle implicit typename when checking
7479 for SELFNAME.
7480
7481 * cp-tree.h: Declare flag_strict_prototype.
7482 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7483 -fstrict-prototype.
7484 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7485 specified, set it to the value of pedantic.
7486
7487 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7488
7489 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7490
7491 1998-08-31 Mark Mitchell <mark@markmitchell.com>
7492
7493 * decl.c (finish_enum): Handle member enums of classes declared in
7494 template functions.
7495
7496 * decl2.c (grok_x_components): Strip attributes before calling
7497 groktypename.
7498
7499 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
7500
7501 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7502 -fenum-int-equivalence and -fno-nonnull-objects.
7503 * class.c (check_for_override): Remove support for -fall-virtual.
7504 (finish_struct_1): Likewise.
7505 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7506 * typeck.c (build_binary_op_nodefault): Likewise.
7507 * cvt.c (ocp_convert): Likewise.
7508 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7509 * class.c (build_vbase_path): Likewise.
7510
7511 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
7512
7513 * Makefile.in (INTERFACE): New, set to 1.
7514
7515 1998-08-30 Mark Mitchell <mark@markmitchell.com>
7516
7517 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7518 comparing with global_namespace.
7519 (dump_aggr_type): Likewise.
7520
7521 * decl.c (grokfndecl): Issue error on declaration of friend
7522 templates with explicit template arguments.
7523
7524 * pt.c (convert_template_argument): New function, split out
7525 from...
7526 (coerce_template_parms): Here.
7527 (tsubst): Attempt better error-recovery.
7528
7529 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
7530
7531 * pt.c (decl_template_parm_p): Add checks for
7532 TEMPLATE_TEMPLATE_PARM.
7533
7534 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7535
7536 * lex.c (do_identifier): Fix thinko in previous change.
7537
7538 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
7539
7540 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7541 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7542
7543 1998-08-28 Richard Henderson <rth@cygnus.com>
7544
7545 Add support for discarding unused virtual functions.
7546 * lang-options.h: Add -fvtable-gc.
7547 * cp-tree.h: Add flag_vtable_gc.
7548 * decl2.c (output_vtable_inherit): New fn.
7549 (finish_vtable_vardecl): Call it.
7550 * class.c (build_vtable_entry_ref): New fn.
7551 (build_vtbl_ref): Call it.
7552
7553 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7554
7555 * cp-tree.h (build_enumerator): Take the enumeration type as a
7556 parameter.
7557 * decl.c (finish_enum): Don't set the TREE_TYPE for the
7558 enumeration constant values if we're processing_template_decls.
7559 Don't set the type for the CONST_DECLs either; that's done in
7560 build_enumerator.
7561 (build_enumerator): Take the enumeration type as a
7562 parameter.
7563 * lex.c (do_identifier): Don't resolve enumeration constants while
7564 processing template declarations, even if they happen to be
7565 TEMPLATE_PARM_INDEXs.
7566
7567 * parse.y (current_enum_type): New variable.
7568 (primary): Don't allow statement-expression in local classes just
7569 as we don't in global classes.
7570 (structsp): Use current_enum_type.
7571 (enum_list): Likewise.
7572 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7573 finish_enum; they no longer occur.
7574
7575 * cp-tree.h (finish_base_specifier): New function.
7576 * parse.y (base_class): Use it.
7577 * semantics.c (finish_base_specifier): Define it.
7578
7579 * parse.y (structsp): Warn on use of typename outside of template
7580 declarations.
7581
7582 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7583
7584 * lex.c (handle_cp_pragma): Remove #pragma vtable.
7585 * lang-options.h: Remove +e options.
7586 * decl2.c (lang_decode_option): Likewise.
7587 (import_export_vtable): Don't check write_virtuals.
7588 (finish_vtable_vardecl, finish_file): Likewise.
7589 * search.c (dfs_debug_mark): Likewise.
7590 * semantics.c (begin_class_definition): Likewise.
7591 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7592
7593 * call.c (build_over_call): Check flag_elide_constructors.
7594 * decl2.c: flag_elide_constructors defaults to 1.
7595 * typeck.c (convert_arguments): Remove return_loc parm.
7596 (build_function_call_real): Adjust.
7597
7598 * search.c: Tear out all mi_matrix and memoize code.
7599 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7600 * lang-options.h: Remove documentation for -fhandle-exceptions,
7601 -fmemoize-lookups and -fsave-memoized.
7602 * cp-tree.h: Lose mi_matrix and memoize support.
7603 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7604 * class.c: Lose struct class_level.
7605 (pushclass, popclass): Lose memoize support.
7606 * init.c (build_offset_ref): Likewise.
7607
7608 Never change BINFO_INHERITANCE_CHAIN.
7609 * init.c (emit_base_init): Change modification of
7610 BINFO_INHERITANCE_CHAIN to an assert.
7611 * search.c (get_base_distance_recursive): Likewise.
7612 (get_base_distance): Likewise.
7613 (lookup_member): Likewise.
7614 (convert_pointer_to_single_level): Likewise.
7615 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
7616 (lookup_fnfields): Likewise.
7617 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7618 (unshare_base_binfos): Don't call propagate_binfo_offsets.
7619 (layout_basetypes): Call propagate_binfo_offsets instead of
7620 unshare_base_binfos.
7621 * decl.c (xref_basetypes): Call unshare_base_binfos.
7622 * pt.c (instantiate_class_template): Likewise.
7623 * tree.c (reverse_path): Remove 'copy' parm; always make a
7624 temporary copy.
7625 * class.c (build_vbase_path): Just call it.
7626 * search.c (compute_access): Likewise. Don't re-reverse.
7627
7628 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7629
7630 * class.c (build_vbase_path): Use reverse_path.
7631 (finish_base_struct): Move warnings for inaccessible bases to
7632 layout_basetypes.
7633 (modify_one_vtable): Remove check of TREE_USED (binfo).
7634 (fixup_vtable_deltas1): Likewise.
7635 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7636 (xref_tag): Remove binfos parameter.
7637 (make_binfo): Remove chain parameter.
7638 (reverse_path): Add copy parameter.
7639 * decl.c (init_decl_processing): Change calls to xref_tag.
7640 (xref_tag): Remove binfos parameter.
7641 (xref_basetypes): Change calls to make_binfo.
7642 * decl2.c (grok_x_components): Change calls to xref_tag.
7643 (handle_class_head): Likewise.
7644 * friend.c (do_friend): Likewise.
7645 * lex.c (make_lang_type): Change calls to make_binfo.
7646 * parse.y (structsp): Change calls to xref_tag.
7647 (named_complex_class_head_sans_basetype): Likewise.
7648 (named_class_head): Likewise.
7649 * rtti.c (init_rtti_processing): Likewise.
7650 * search.c (compute_access): Change calls to reverse_path.
7651 (dfs_get_vbase_types): Change calls to make_binfo.
7652 (get_vbase_types): Remove dead code.
7653 * tree.c (unshare_base_binfos): Change calls to make_binfo.
7654 (layout_basetypes): Warn here about inaccessible bases.
7655 (make_binfo): Remove chain parameter.
7656 (reverse_path): Add copy parameter.
7657
7658 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7659
7660 * class.c: #if 0 complete_type_p.
7661 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7662 * method.c (process_overload_item): Likewise.
7663 * typeck.c (comp_target_types): Likewise.
7664
7665 Stop sharing binfos for indirect virtual bases.
7666 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7667 (layout_basetypes): Likewise.
7668 (unshare_base_binfos): Copy vbases, too.
7669 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7670 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7671 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7672 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7673 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7674 reference to BINFO_VIA_PUBLIC.
7675 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7676 (push_class_decls): Use them.
7677 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7678 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7679
7680 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7681
7682 * decl.c (build_enumerator): Set DECL_CONTEXT for the
7683 CONST_DECLs.
7684
7685 1998-08-26 Mark Mitchell <mark@markmitchell.com>
7686
7687 * cp-tree.h (finish_enum): Change prototype.
7688 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7689 VALUES parameter. Don't try to compute mins/maxs if
7690 processing_template_decl.
7691 * parse.y (structsp): Use new calling sequence for finish_enum.
7692 * pt.c (tsubst_enum): Likewise. Take the new type as input.
7693 (lookup_template_class): Remove unused variables. Tweak.
7694 Register enums on instantiation list before substituting
7695 enumeration constants.
7696 (tsubst_decl): Remove unused variables.
7697 (regenerate_decl_from_template): Likewise.
7698
7699 * decl.c (duplicate_decls): Don't obliterate the
7700 DECL_TEMPLATE_INFO for a template if we're not replacing it with
7701 anything.
7702
7703 * lex.c (do_identifier): Fix typo in comment.
7704
7705 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7706
7707 * errfn.c: Remove stdarg.h/varargs.h.
7708 * tree.c: Likewise.
7709
7710 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
7711
7712 * pt.c (tsubst_copy): Only do typename overloading on an
7713 IDENTIFIER_NODE that happens to look like a typename if it actually
7714 has a type for us to use.
7715
7716 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7717
7718 * typeck.c (comp_cv_target_types): Split out...
7719 (comp_target_types): From here. Don't allow cv-qual changes under
7720 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
7721 (build_ptrmemfunc): Pass 1 to nptrs.
7722 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7723
7724 1998-08-25 Mark Mitchell <mark@markmitchell.com>
7725
7726 * search.c (dependent_base_p): Don't compare a binfo to
7727 current_class_type; use the TREE_TYPE of the binfo instead.
7728
7729 * cp-tree.h (CLASS_TYPE_P): Revise definition.
7730
7731 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7732
7733 * decl.c (duplicate_decls): Don't complain about different
7734 exceptions from an internal decl even if pedantic.
7735
7736 * typeck.c (convert_for_assignment): Converting from pm of vbase
7737 to derived is an error, not a sorry.
7738
7739 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7740 * class.c (fixed_type_or_null): Rename from
7741 resolves_to_fixed_type_p. Return the dynamic type of the
7742 expression, if fixed, or null.
7743 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
7744 does not match the static type.
7745 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
7746 resolves_to_fixed_type_p again.
7747
7748 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7749
7750 * pt.c (tsubst_decl): Move special case code for dealing with
7751 tricky friend templates here from ...
7752 (regenerate_decl_from_template): Here.
7753
7754 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7755
7756 * decl.c (start_decl): Remove redundant linkage check.
7757
7758 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
7759
7760 * typeck.c (c_expand_return): Handle the case that valtype
7761 is wider than the functions return type.
7762
7763 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7764
7765 * cp-tree.h (CLASS_TYPE_P): New macro.
7766 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7767 * pt.c (process_template_parm): Undo previous change.
7768
7769 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
7770
7771 * cp-tree.h: Declare.
7772 * pt.c (decl_template_parm_p): New function.
7773 * decl.c (pushdecl): Check decls for redeclaring template parms.
7774 (xref_tag): Make redeclaration an error, print decl.
7775 * decl2.c (grokfield): Check field_decls for redeclaration as well.
7776
7777 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7778
7779 * parse.y (primary): Fix up the type of string constants.
7780
7781 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7782
7783 * typeck.c (convert_for_initialization): Move check for odd uses
7784 of NULL to avoid duplicate warnings.
7785
7786 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7787
7788 * tree.c (lvalue_type): Fix for arrays.
7789 * typeck.c (string_conv_p): New fn.
7790 (convert_for_assignment): Use it.
7791 (build_unary_op): Use lvalue_type.
7792 * call.c (standard_conversion, convert_like): Use string_conv_p.
7793 (add_function_candidate): Use lvalue_type.
7794 * cvt.c (convert_to_reference): Likewise.
7795 * decl2.c (lang_decode_option): Ignore -traditional.
7796 * decl.c (init_decl_processing): flag_writable_strings inhibits
7797 flag_const_strings.
7798
7799 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
7800
7801 * lang-options.h (lang_options): Add fconst-strings to the list
7802 of valid options.
7803 * decl2.c (lang_f_options, lang_decode_option): Likewise.
7804
7805 1998-08-24 Nathan Sidwell <nathan@acm.org>
7806
7807 * lex.c (real_yylex): Don't warn about long long constants if
7808 we're allowing long long.
7809
7810 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7811
7812 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7813 accessing bindings directly.
7814
7815 * search.c (my_tree_cons): Reimplement.
7816
7817 * lang-specs.h: Remove __HONOR_STD.
7818 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7819
7820 1998-08-23 Mark Mitchell <mark@markmitchell.com>
7821
7822 * decl.c (grokdeclarator): Complain about in-class initialization
7823 of aggregates and/or references.
7824 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7825 TEMPLATE_TYPE_PARMs.
7826
7827 * decl2.c (grok_array_decl): Add comment.
7828 (mark_used): Don't instantiate an explicit instantiation.
7829 * friend.c (make_friend_class): Remove bogus comment. Fix check
7830 for partial specializations.
7831 * pt.c (check_explicit_specialization): Don't
7832 SET_DECL_EXPLICIT_INSTANTIATION here.
7833 (mark_decl_instantiated): Or here.
7834 (do_decl_instantiation): Do it here, instead. Add checks for
7835 duplicate explicit instantiations, etc. Tidy.
7836 (do_type_instantiation): Likewise.
7837 (instantiate_decl): Improve comments. Complain about explicit
7838 instantiations where no definition is available.
7839
7840 * cp-tree.h (ansi_null_node): Remove.
7841 * call.c (build_over_call): Warn about converting NULL to an
7842 arithmetic type.
7843 * cvt.c (build_expr_type_conversion): Likewise. Use
7844 null_ptr_cst_p instead of expanding it inline.
7845 * decl.c (ansi_null_node): Remove.
7846 (init_decl_processing): Make null_node always have integral type.
7847 * except.c (build_throw): Warn about converting NULL to an
7848 arithmetic type.
7849 * lex.c (init_parse): Remove handling of ansi_null_node.
7850 * pt.c (type_unification_real): Don't convert NULL to void* type.
7851 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7852 (convert_for_assignment): Warn about converting NULL to an
7853 arithmetic type.
7854 (convert_for_initialization): Likewise.
7855
7856 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7857
7858 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7859 * pt.c (coerce_template_parms): Use no_linkage_check.
7860 * decl.c (grokvardecl): Likewise.
7861 (grokfndecl): Likewise. Members of anonymous types have no linkage.
7862
7863 * method.c (process_overload_item): Remove useless code.
7864
7865 1998-08-20 Per Bothner <bothner@cygnus.com>
7866
7867 Handle new'ing of Java classes.
7868 * init.c (build_class_classref): New function.
7869 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
7870 constructor does not return this; don't need to exception-protect.
7871
7872 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
7873 * decl2.c (acceptable_java_type): Handle template-derived types.
7874
7875 1998-08-20 Per Bothner <bothner@cygnus.com>
7876
7877 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
7878
7879 1998-08-20 Mark Mitchell <mark@markmitchell.com>
7880
7881 * decl.c (duplicate_decls): Always merge the old and new patterns
7882 for templates, regardless of whether or not the new one has
7883 DECL_INITIAL. Don't throw away specializations. Merge
7884 DECL_SAVED_TREE.
7885 * pt.c (tsubst_decl): Use the right pattern when calculating the
7886 complete args for a new template instance.
7887 (do_decl_instantiation): Fix typo in comment.
7888 (regenerate_decl_from_template): Deal with tricky friend template
7889 case.
7890 (instantiate_decl): Likewise.
7891
7892 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
7893
7894 * init.c (build_builtin_delete_call): Add missing assemble_external
7895 call.
7896
7897 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7898
7899 * parse.y (notype_unqualified_id): Also accept ~A<int>.
7900
7901 1998-08-19 Mark Mitchell <mark@markmitchell.com>
7902
7903 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7904 arithmetic.
7905 * except.c (build_throw): Warn when NULL is thrown, even with
7906 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
7907 thrown expression.
7908
7909 * cp-tree.h (ansi_null_node): New variable.
7910 * decl.c (ansi_null_node): New variable.
7911 (init_decl_processing): Initialize its type.
7912 * lex.c (init_parse): Initialize its value. Use ansi_null_node
7913 for null_node in non-ANSI mode.
7914 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7915 place of null_node to avoid spurious errors.
7916
7917 1998-08-17 Mark Mitchell <mark@markmitchell.com>
7918
7919 * cp-tree.h (enter_scope_of): New function.
7920 * parse.y (complex_direct_notype_declarator): Use it.
7921 * semantics.c (enter_scope_of): New function.
7922
7923 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
7924
7925 * decl.c (grokparms): No, here.
7926
7927 * decl.c (grokdeclarator): Catch parm with pointer to array of
7928 unknown bound here...
7929 * method.c (process_overload_item): ...not here.
7930
7931 * gxxint.texi: Remove obsolete documentation of overloading code.
7932
7933 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7934 * class.c (finish_struct_bits): Likewise.
7935
7936 * tree.c (lvalue_type): Fix for arrays.
7937 * typeck.c (build_unary_op): Use lvalue_type.
7938 * call.c (add_function_candidate): Likewise.
7939 * cvt.c (convert_to_reference): Likewise.
7940
7941 * decl2.c (lang_decode_option): Ignore -traditional.
7942
7943 * init.c (build_offset_ref): Don't mess with error_mark_node.
7944 * lex.c (do_scoped_id): Use cp_error.
7945
7946 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7947
7948 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
7949
7950 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7951
7952 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
7953
7954 * cp-tree.h (set_identifier_local_value): Provide prototype.
7955
7956 * decl2.c (do_namespace_alias): Remove unused variables `binding'
7957 and `old'.
7958
7959 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
7960
7961 * Makefile.in: Rename BBISON to BISON so that it can be properly
7962 inherited from the parent makefile.
7963
7964 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7965
7966 * lang-options.h: Add -finit-priority.
7967 * decl2.c: Likewise. Check flag_init_priority instead of
7968 USE_INIT_PRIORITY.
7969
7970 * decl2.c (setup_initp): New fn.
7971 (start_objects, finish_objects, do_ctors): Handle init_priority.
7972 (do_dtors, finish_file): Likewise.
7973
7974 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7975
7976 * pt.c (tsubst_copy): Hush warning.
7977
7978 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7979
7980 1998-08-12 Mark Mitchell <mark@markmitchell.com>
7981
7982 * pt.c (print_template_context): Don't abort when instantiating a
7983 synthesized method.
7984
7985 * decl.c (grokdeclarator): Issue errors on namespace qualified
7986 declarators in parameter lists or in class scope.
7987
7988 1998-08-09 Mark Mitchell <mark@markmitchell.com>
7989
7990 * pt.c (check_explicit_specialization): Don't abort on bogus
7991 explicit instantiations.
7992
7993 1998-08-07 Mark Mitchell <mark@markmitchell.com>
7994
7995 * typeck.c (require_complete_type): Use complete_type_or_else.
7996 (complete_type_or_else): Always return NULL_TREE on failure, as
7997 documented.
7998
7999 * pt.c (tsubst_aggr_type): Prototype.
8000 (tsubst_decl): New function, split out from tsubst. Set
8001 input_filename and lineno as appropriate.
8002 (pop_tinst_level): Restore the file and line number saved in
8003 push_tinst_level.
8004 (instantiate_class_template): Set input_filename and lineno as
8005 appropriate.
8006 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
8007 context for a TYPENAME_TYPE is complete.
8008
8009 * decl2.c (grokbitfield): Issue errors on bitfields declared with
8010 function type.
8011 (do_dtors): As in do_ctors, pretend to be a member of the same
8012 class as a static data member while generating a call to its
8013 destructor.
8014
8015 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8016 conversions, even in complex virtual base class hierarchies.
8017
8018 1998-08-06 Mark Mitchell <mark@markmitchell.com>
8019
8020 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8021 (TYPE_TEMPLATE_INFO): Likewise.
8022 (SET_TYPE_TEMPLATE_INFO): Likewise.
8023 (ENUM_TI_TEMPLATE): Likewise.
8024 (ENUM_TI_ARGS): Likewise.
8025 (lookup_nested_type_by_name): Remove.
8026 * decl.c (maybe_process_template_type_declaration): Handle enums.
8027 (start_enum): Don't check for primary-template enum declarations
8028 here.
8029 (finish_enum): Clean up, document. Make sure template enum
8030 constants get the correct type.
8031 (build_enumerator): Copy initializers for template enumerations,
8032 too.
8033 (grok_enum_decls): Document.
8034 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8035 better. Build LOOKUP_EXPRs for local variables, even if they are
8036 TREE_PERMANENT.
8037 * pt.c (tsubst_enum): Remove field_chain parameter.
8038 (template_class_depth): Include the depth of surrounding function
8039 contexts.
8040 (push_template_decl): Check for primary-template enum declarations
8041 here. Deal with enumeration templates.
8042 (lookup_template_class): Likewise.
8043 (for_each_template_parm): Likewise.
8044 (instantiate_class_template): Don't call tsubst_enum directly,
8045 call tsubst instead, to instantiate enums. Deal with all
8046 field_chain issues here, not in tsubst_enum.
8047 (lookup_nested_type_by_name): Remove.
8048 (tsubst_aggr_type): Revise handling of enumeration types.
8049 (tsubst): Likewise.
8050 (tsubst_copy): Likewise.
8051 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8052
8053 1998-08-04 Mark Mitchell <mark@markmitchell.com>
8054
8055 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8056 uses template parameters.
8057 * method.c (build_template_parm_names): Use the full set of
8058 template arguments for tsubst'ing.
8059 (build_overload_identifier): Pass the full set of template
8060 arguments to build_template_parm_names, not just the
8061 innermost_args.
8062 * pt.c (TMPL_ARGS_DEPTH): Define using
8063 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8064 (NUM_TMPL_ARGS): New macro.
8065 (add_outermost_template_args): Deal with the case where the outer
8066 args will be completely discarded.
8067 (coerce_template_parms): Use the full set of template arguments
8068 for tsubst'ing. Simplify. Add some asserts. Improve
8069 error messages.
8070 (lookup_template_class): Pass the full set of template arguments
8071 to coerce_template_parms.
8072 (tsubst): Add assertion.
8073 (do_type_instantiation): Don't instantiate member template
8074 classes.
8075
8076 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8077 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8078
8079 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
8080
8081 * method.c (set_mangled_name_for_decl): Change return type to void.
8082
8083 * decl.c (lookup_name_real): A namespace-level decl takes priority
8084 over implicit typename. Avoid doing the same lookup twice.
8085
8086 * search.c (dependent_base_p): New fn.
8087 (dfs_pushdecls, dfs_compress_decls): Use it.
8088
8089 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8090 virtual functions if the type doesn't have any.
8091
8092 1998-08-03 Mark Mitchell <mark@markmitchell.com>
8093
8094 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8095 uses template parameters.
8096
8097 1998-08-02 Mark Mitchell <mark@markmitchell.com>
8098
8099 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
8100 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8101 * lex.c (do_identifier): Don't use a second argument, or a type,
8102 when building LOOKUP_EXPRs.
8103 (do_identifier): Likewise.
8104 (do_scoped_id): Likewise.
8105 * method.c (hack_identifier): Improve error message.
8106 * pt.c (lookup_template_function): Don't needlessly call
8107 copy_to_permanent or build_min.
8108 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
8109 necessary.
8110 (do_decl_instantiation): Improve error message.
8111 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8112 (build_min): Copy the type to the permanent obstack, too.
8113
8114 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
8115
8116 * init.c (init_init_processing): Remove BI* handling.
8117 (build_builtin_call): Remove.
8118 (build_builtin_delete_call): New fn.
8119 (build_delete): Use it.
8120
8121 1998-07-31 Mark Mitchell <mark@markmitchell.com>
8122
8123 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8124 (maybe_check_template_type): New function.
8125 * decl.c (maybe_process_template_type_declaration): New function,
8126 split out from pushtag Call maybe_check_template_type.
8127 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
8128 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8129 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8130 * pt.c (template_class_depth_real): Generalization of ...
8131 (template_class_depth): Use it.
8132 (register_specialization): Use duplicate_decls for duplicate
8133 declarations of specializations.
8134 (maybe_check_template_type): New function.
8135 (push_template_decl_real): Fix comment.
8136 (convert_nontype_argument): Likewise.
8137 (lookup_template_class): Likewise. Avoid an infinite loop on
8138 erroneous code.
8139 (tsubst_friend_function): Fix comment.
8140 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8141 an IDENTIFIER_NODE.
8142 * semantics.c (begin_function_definition): Use
8143 reset_specialization to note that template headers don't apply
8144 directly to declarations after the opening curly for a function.
8145
8146 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
8147
8148 * decl.c (push_overloaded_decl): Use current_namespace instead of
8149 DECL_CONTEXT (decl) to determine where we go.
8150
8151 * decl.c (lookup_name_real): Fix typo.
8152
8153 1998-07-28 Mark Mitchell <mark@markmitchell.com>
8154
8155 * friend.c (is_friend): Be lenient with member functions to deal
8156 with nested friends.
8157
8158 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
8159
8160 * class.c (finish_struct_1): Convert integer_zero_node to
8161 ssizetype before passing it to set_rtti_entry.
8162 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8163 of any size to a pointer.
8164
8165 1998-07-27 Mark Mitchell <mark@markmitchell.com>
8166
8167 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8168 (build_template_decl_overload): Remove.
8169 (set_mangled_name_for_decl): New function.
8170 (innermost_args): Remove is_spec parameter.
8171 (most_specialized, most_specialized_class): Remove declarations.
8172 (lookup_template_class): Add entering_scope parameter.
8173 (maybe_process_partial_specialization): New function.
8174 (finish_template_decl): Likewise.
8175 (finish_template_type): Likewise.
8176 * class.c (finish_struct): Clean up processing of member template
8177 specializations.
8178 * decl.c (pushtag): Fix formatting.
8179 (lookup_tag): Improve handling of pseudo-global levels.
8180 (make_typename_type): Adjust call to lookup_template_class.
8181 (shadow_tag): Use maybe_process_partial_specialization.
8182 (xref_tag): Improve handling of member friends.
8183 (start_function): Call push_nested_class before
8184 push_template_decl. Don't call push_template_decl for
8185 specializations.
8186 * decl2.c (grok_x_components): Don't call xref_tag for
8187 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
8188 (grokclassfn): Use set_mangled_name_for_decl.
8189 (arg_assoc_class): Adjust call to innermost_args.
8190 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8191 * error.c (dump_function_name): Improve printing of template
8192 function names.
8193 * friend.c (is_friend): Don't compare types of decls to determine
8194 friendship, unless flag_guiding_decls.
8195 (make_friend_class): Partial specializations cannot be friends.
8196 (do_friend): Use set_mangled_name_for_decl. Call
8197 push_template_decl_real instead of push_template_decl.
8198 * method.c (build_decl_overload_real): Remove prototype. Give it
8199 external linkage.
8200 (build_overload_identififer): Adjust call to innermost_args.
8201 (build_template_decl_overload): Remove.
8202 (set_mangled_name_for_decl): New function.
8203 * parse.y (.finish_template_type): New non-terminal.
8204 (template_def): Use finish_template_decl. Use template_extdef
8205 instead of extdef.
8206 (template_extdef, template_datadef): New non-terminals, containing
8207 only those rules for things which can be templates.
8208 (datadef): Tidy.
8209 (template_type, self_template_type): Use .finish_template_type.
8210 (named_class_head): Use maybe_process_partial_specialization.
8211 * pt.c (mangle_class_name_for_template): Remove context parameter.
8212 (get_class_bindings): Remove outer_args parameter.
8213 (complete_template_args): Remove.
8214 (add_outermost_template_args): New function.
8215 (register_specialization): Return the specialization.
8216 (unregister_specialization): New function.
8217 (tsubst_template_parms): Likewise.
8218 (most_specialized, most_specialized_class): Prototype here as
8219 static.
8220 (original_template): Rename to most_general_template.
8221 (tsubst_template_parms): New function.
8222 (set_mangled_name_for_template_decl): Likewise.
8223 (TMPL_ARGS_DEPTH): New macro.
8224 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8225 (TMPL_ARGS_LEVEL): New macro.
8226 (SET_TMPL_ARGS_LEVEL): Likewise.
8227 (TMPL_ARG): Likewise.
8228 (SET_TMPL_ARG): Likewise.
8229 (TMPL_ARGS_DEPTH): Likewise.
8230 (finish_member_template_decl): Use finish_template_decl.
8231 (maybe_process_partial_specialization): New function, split out
8232 from tsubst.
8233 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8234 (maybe_begin_member_template_processing): Use new macros.
8235 (is_member_template): Likewise.
8236 (is_member_template_class): Likewise.
8237 (add_to_template_args): Likewise. Deal with multiple levels of
8238 args.
8239 (maybe_process_partial_specialization): New function.
8240 (retrieve_specialization): Add consistency check.
8241 (determine_specialization): Return full argument list.
8242 (check_explicit_specialization): Tweak friend handling. Use full
8243 argument lists. Simplify.
8244 (current_template_args): Use new macros.
8245 (push_template_decl_real): Change ill-named mainargs to specargs.
8246 Check that a partial specialization actually specializes at least
8247 one parameter. Improve friend handling. Modify for full
8248 template arguments.
8249 (classtype_mangled_name): Don't mangle the names of
8250 specializations.
8251 (lookup_template_class): Add entering_scope parameter. Use it to
8252 avoid finding a template type when an instantiation is required.
8253 Simplify. Use full template arguments.
8254 (tsubst_friend_function): Use unregister_specialization. Use new
8255 macros. Use full template arguments.
8256 (tsubst_friend_class): Substitute, using tsubst_template_parms,
8257 into the template parameters before passing them to
8258 redeclare_class_template.
8259 (instantiate_class_template): Simplify. Use full template
8260 arguments. Adjust calls to get_class_bindings. Use
8261 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
8262 (innermost_args): Use new macros.
8263 (tsubst_aggr_type): New function, split out from tsubst.
8264 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8265 conventions for lookup_template_class. Refine handling of partial
8266 instantiations. Remove calls to complete_template_args.
8267 Simplify. Add consistency checks. Use set_mangled_name_for_decl
8268 and set_mangled_name_for_template_decl.
8269 (tsubst_copy): Use tsubst_aggr_type.
8270 (instantiate_template): Use full template arguments.
8271 (more_specialized): Improve formatting.
8272 (more_specialized_class): Adjust calls to get_class_bindings.
8273 (get_bindings_real): Don't call complete_template_args.
8274 (most_specialized): Don't overwrite input; create a new list.
8275 (most_specialized_class): Use most_general_template.
8276 (regenerate_decl_from_template): Use unregister_specialization.
8277 Use full template arguments.
8278 (instantiate_decl): Use full template arguments.
8279 (set_mangled_name_for_template_decl): New function.
8280 * semantics.c (begin_class_definition): Use
8281 maybe_process_partial_specialization.
8282 (finish_member_class_template): New function.
8283 (finish_template_decl): Likewise.
8284 (finish_template_type): Likewise.
8285 (typeck.c): Don't crash after issuing a compiler_error.
8286 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8287
8288 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
8289
8290 * typeck2.c (build_functional_cast): Handle default-initialization.
8291
8292 * call.c (build_over_call): Pass 1 to popclass.
8293
8294 * parse.y (direct_notype_declarator): Add precedence declaration
8295 to notype_unqualified_id case.
8296 * Makefile.in (EXPECT): Adjust.
8297
8298 * tree.c (ovl_member): Fix for single function in OVL.
8299
8300 1998-07-27 Dave Brolley <brolley@cygnus.com>
8301
8302 * c-lex.c (yylex): Fix boundary conditions in character literal and
8303 string literal loops.
8304
8305 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
8306
8307 * decl.c (lookup_name_real): OK, do return the from_obj value
8308 unless got_object depends on template parms.
8309
8310 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8311
8312 * pt.c (coerce_template_parms): Also complain about local enums.
8313
8314 * cp-tree.h: Add prototype for set_identifier_local_value.
8315 * decl.c (set_identifier_local_value_with_scope): Make static,
8316 prototype.
8317 * search.c (covariant_return_p): Likewise.
8318 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8319
8320 * call.c (build_method_call): Only pull out the type of a destructor
8321 if it's a template type parm.
8322 * decl.c (lookup_name_real): Never return the from_obj value.
8323
8324 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8325
8326 * except.c (process_start_catch_block_old): Call start_decl_1 for
8327 catch parm.
8328 * decl.c (start_decl_1): Avoid duplicate error.
8329
8330 * init.c (expand_default_init): Only perform the initialization if
8331 it will do something.
8332
8333 1998-07-23 H.J. Lu (hjl@gnu.org)
8334
8335 * parse.y (base_class): Check for invalid base class.
8336
8337 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8338
8339 * decl2.c (import_export_template): Fold in...
8340 (import_export_class): ...to here. Handle dllimport/export.
8341
8342 * class.c (build_vtable): Pass at_eof to import_export_vtable.
8343 (prepare_fresh_vtable): Likewise.
8344 * decl2.c (import_export_class): Split out...
8345 (finish_prevtable_vardecl): From here.
8346 * class.c (finish_struct_1): Call import_export_class if at_eof.
8347
8348 * decl.c (start_function): #if 0 mysterious code I wrote and have
8349 forgotten why.
8350 * rtti.c (get_tinfo_fn): If this is for a class type, set
8351 DECL_CONTEXT.
8352
8353 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
8354
8355 * inc/exception: Change terminate and unexpected to ().
8356
8357 * parse.y (named_class_head_sans_basetype_defn): A
8358 named_class_head_sans_basetype followed by '{' or ':' is a defn.
8359
8360 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
8361
8362 * tree.c (canonical_type_variant): New fn to handle arrays.
8363 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8364 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
8365 * method.c (process_overload_item): Use build_overload_value for
8366 arrays.
8367
8368 1998-07-20 Dave Brolley <brolley@cygnus.com>
8369
8370 * lex.c (mbchar.h): #include it.
8371 (GET_ENVIRONMENT): New macro.
8372 (init_parse): Set character set based on LANG environment variable.
8373 (real_yylex): Handle multibyte characters in character literals.
8374 (real_yylex): Handle multibyte characters in string literals.
8375
8376 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
8377
8378 * lex.c (do_identifier): Look for class value even if we don't
8379 have a global value. Do implicit declaration if parsing is 2.
8380 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8381 lookup.
8382
8383 1998-07-19 Mark Mitchell <mark@markmitchell.com>
8384
8385 * decl.c (pushtag): Revert previous change.
8386 * pt.c (lookup_template_class): Don't put out debugging
8387 information for types that use template parameters.
8388
8389 * decl.c (pushtag): Don't put out debugging information for
8390 compiler-generated typedefs.
8391
8392 * error.c (dump_type_real): Don't crash when presented with
8393 intQI_type_node or the like.
8394
8395 * semantics.c (finish_translation_unit): Fix spelling error in
8396 comment.
8397
8398 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
8399
8400 * decl.c (lookup_name_real): Pull out single function here.
8401 (select_decl): Not here.
8402 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8403
8404 * decl.c (qualify_lookup): Tweak again.
8405
8406 * pt.c (lookup_template_class): Don't mess with the context of the
8407 instantiation.
8408 * decl2.c (current_decl_namespace): Remove special handling for
8409 templates.
8410
8411 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8412 a member template specialization.
8413
8414 * tree.c (ovl_member): Use decls_match to compare functions.
8415 * decl.c (decls_match): Check the context of a function.
8416
8417 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8418 in Koenig lookup support rules.
8419 * semantics.c (finish_call_expr): Handle the new cases.
8420
8421 * typeck.c (build_x_function_call): Handle overloaded methods.
8422
8423 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8424
8425 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8426
8427 * semantics.c (finish_object_call_expr): Revert previous change.
8428 * call.c (build_new_method_call): Likewise. Instead, convert
8429 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8430
8431 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8432
8433 * decl.c (qualify_lookup): Handle templates.
8434
8435 * decl2.c (do_using_directive): Don't pass ancestor.
8436 * decl.c (push_using_directive): Calculate ancestor.
8437
8438 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8439 * decl.c (pushdecl): Move type shadowing handling from here...
8440 (duplicate_decls): ...to here.
8441 * decl.c (set_identifier_local_value_with_scope): New fn.
8442 (pushdecl): Use it.
8443 (set_identifier_local_value, lookup_type_current_level): New fns.
8444 * decl2.c (do_local_using_decl): Handle types and binding level
8445 stuff properly.
8446
8447 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8448 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8449 (lookup_namespace_name): Likewise.
8450 * typeck.c (build_unary_op): Not here anymore.
8451
8452 * decl2.c (do_class_using_decl): Make sure we get an identifier.
8453 * class.c (handle_using_decl): Ignore TYPE_DECLs.
8454
8455 * decl.c (qualify_lookup): New fn.
8456 (lookup_name_real): Use it.
8457
8458 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8459
8460 * decl2.c (add_using_namespace): When directly using a namespace
8461 that was indirect before, promote it.
8462
8463 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8464 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8465 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8466 * decl.c (select_decl): Replace two flag parameters by one.
8467 (unqualified_namespace_lookup): Likewise, pass flag.
8468 (lookup_flags): New function.
8469 (lookup_name_real): Compute flags, pass them.
8470 (lookup_namespace_name): Call with zero-flag.
8471 * decl2.c (ambiguous_decl): Add flag parameter, complain only
8472 according to flags.
8473 (lookup_using_namespace, qualified_lookup_using_namespace):
8474 Add flag parameter, pass them through.
8475 * lex.c (do_scoped_id): Call with zero-flag.
8476
8477 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8478
8479 * typeck.c (convert_for_assignment): Use comptypes.
8480
8481 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8482
8483 * semantics.c (finish_object_call_expr): Move test for the
8484 function called being a TYPE_DECL to ...
8485 * call.c (build_new_method_call): Here.
8486
8487 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8488
8489 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8490 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8491
8492 * lex.c (looking_for_typename): Don't initialize.
8493
8494 * decl2.c (ambiguous_decl): Clarify error message.
8495
8496 * decl.c (push_using_directive): Iterate over namespaces used
8497 indirectly.
8498
8499 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8500
8501 * decl2.c (add_using_namespace): Iterate over namespaces used
8502 indirectly.
8503
8504 * decl.c (lookup_name_real): Accept namespace aliases as locals.
8505 (cat_namespace_levels): Ignore aliases.
8506 (duplicate_decls): Ignore duplicate aliases.
8507 * decl2.c (do_namespace_alias): Process block level namespace
8508 aliases. Store alias with pushdecl. Remove odr errors.
8509 * parse.y (namespace_alias): New non-terminal.
8510 (extdef): Use it.
8511
8512 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8513
8514 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8515 Handle TEMPLATE_TYPE_PARM.
8516 (arg_assoc): Rewrite.
8517
8518 * pt.c (complete_template_args): Don't look at the context unless
8519 we have to.
8520
8521 * method.c (build_decl_overload_real): Fix namespace handling.
8522
8523 * typeck.c (build_unary_op): Extract a lone function from an
8524 OVERLOAD.
8525
8526 * call.c (build_scoped_method_call): Handle getting a namespace
8527 for basetype in a destructor call.
8528 (check_dtor_name): Handle enums.
8529
8530 * parse.y (using_directive): New nonterminal.
8531 (extdef, simple_stmt): Use it.
8532
8533 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8534
8535 * decl2.c (add_function): Move error message ...
8536 (arg_assoc_namespace): ... from here.
8537
8538 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8539
8540 * parse.y (namespace_qualifier): Fix multiple level handling.
8541 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8542 (arg_assoc): Don't skip the first argument of a function.
8543
8544 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
8545
8546 * search.c (my_tree_cons): Clean up.
8547
8548 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8549
8550 * call.c (joust): Don't warn about "confusing" conversions to the
8551 same type.
8552
8553 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8554
8555 * class.c (push_nested_class): Complain about namespaces.
8556 * decl.c (start_decl): Enter the object's namespace.
8557 (cp_finish_decl): Leave it.
8558 (grokdeclarator): Likewise.
8559 * decl2.c (check_decl_namespace): New function.
8560 (finish_file): Call it.
8561 * parse.y (complex_direct_notype_declarator): Set complexity
8562 of namespace-qualified ids to -1, enter the namespace.
8563
8564 * method.c (build_template_decl_overload): Expect _DECL as first
8565 parameter. Put context temporarily into current_namespace.
8566 * pt.c (check_explicit_specialization): Change caller.
8567 (tsubst): Likewise.
8568
8569 * init.c (build_offset_ref): Call mark_used and
8570 convert_from_reference for namespace members.
8571
8572 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
8573
8574 * search.c (my_tree_cons): The bitfield is at index 2.
8575
8576 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
8577
8578 * lang-options.h: Format changed to work with new --help support
8579 in gcc/toplev.c
8580
8581 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
8582
8583 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8584 Do Koenig lookup in CALL_EXPR.
8585 (arg_assoc): Handle error_mark.
8586 * lex.c (is_global): New function.
8587 (do_identifier): Expect arguments for Koenig lookup.
8588 * parse.y (primary): Add rules for calls of unqualified function calls.
8589 (do_id): Change call of do_identifier.
8590 * pt.c (finish_stmt_expr): Likewise.
8591 * semantics.c (finish_id_expr): Likewise.
8592 (finish_call_expr): Add integer parameter to indicate
8593 argument-dependent lookup.
8594
8595 * decl.c (struct binding_level): New field using_directives.
8596 (push_using_decl): Not sorry anymore.
8597 (push_using_directive): New function.
8598 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8599 (unqualified_namespace_lookup): New function, code from ...
8600 (lookup_name_real): ... here.
8601 * decl2.c (lookup_using_namespace): Pass using list instead of
8602 initial scope.
8603 (validate_nonmember_using_decl): New function.
8604 (do_nonmember_using_decl): New function.
8605 (do_toplevel_using_decl): Use them.
8606 (do_local_using_decl): New function.
8607 (do_using_directive): Support block-level directives.
8608 * parse.y (simple_stmt): Support using declarations and
8609 directives.
8610 (namespace_qualifier, namespace_using_decl): New non-terminals.
8611
8612 * xref.c (classname): New function.
8613 (GNU_xref_hier): Change class and base parameters to tree.
8614 * decl.c (xref_baseypes): Change caller.
8615 * friend.c (make_friend_class): Likewise.
8616
8617 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8618
8619 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8620 comparison.
8621
8622 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8623 template template parameter, record its use.
8624 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8625 its template arguments if exists.
8626
8627 * pt.c (coerce_template_template_parms): New function equivalent
8628 to coerce_template_parms when IS_TMPL_PARM is true.
8629 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
8630 all callers changed.
8631
8632 (coerce_template_parms): Access ARGLIST properly when creating a
8633 new vector. Only accept implicit TYPE_DECL as valid argument for
8634 a template template parameter when it is a base class of
8635 current_class_type. Don't display error message when COMPLAIN is
8636 false.
8637
8638 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
8639
8640 * repo.c (get_base_filename): Use file_name_nondirectory.
8641 (open_repo_file): Likewise.
8642 * cp-tree.h (file_name_nondirectory): Add prototype.
8643
8644 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
8645
8646 * friend.c (do_friend): Pull the identifier out of declarator.
8647 Use cp_error and friends.
8648 * decl2.c (qualified_lookup_using_namespace): Fix call to
8649 purpose_member.
8650 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8651 (grokvardecl): Use DECL_CLASS_SCOPE_P.
8652 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8653 * class.c (warn_hidden): Fix for OVERLOAD.
8654 From grahams@rcp.co.uk:
8655 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8656 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8657
8658 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
8659
8660 * g++.1 (-traditional): Remove duplicated documentation.
8661
8662 1998-07-11 Mark Mitchell <mark@markmitchell.com>
8663
8664 * method.c (flush_repeats): Add nrepeats parameter.
8665 (issue_nrepeats): Likewise.
8666 (is_back_referenceable_type): New function. Don't back-reference
8667 TEMPLATE_TYPE_PARMs as well as simple types like integers.
8668 (build_mangled_name_for_type): Likewise.
8669 (build_mangled_name_for_type_with_Gcode): Likewise.
8670 (lasttype): Remove.
8671 (nrepeats): Likewise.
8672 (Nrepeats): Likewise.
8673 (start_squangling): Don't clear the variables removed above.
8674 (end_squangling): Likewise.
8675 (flush_repeats): Tidy. Use nrepeats parameter rather than
8676 Nrepeats global.
8677 (issue_nrepeats): Likewise, but with nrepeats global. Use
8678 is_backreferenceable_type.
8679 (build_overload_nested_name): Tidy. Add comment. Use
8680 build_mangled_name_for_type.
8681 (build_underscore_int): Comment.
8682 (build_overload_scope_ref): Use build_mangled_name_for_type.
8683 (build_overload_int): Likewise.
8684 (build_template_template_parm_names): Tidy.
8685 (build_template_parm_names): Use build_mangled_name_for_type.
8686 (build_overload_identifier): Add comments.
8687 (build_mangled_name_for_type_with_Gcode): Split out from
8688 build_mangled_name.
8689 (build_mangled_name_for_type): Use it.
8690 (build_mangled_name): Rework to use build_mangled_name_for_type
8691 and to not use global nrepeats/Nrepeats. Tidy.
8692 (process_modifiers): Tidy.
8693 (check_btype): Use is_backreferenceable_type. Add comment.
8694 Rename `node' to `type'.
8695 (process_overload_item): Set numeric_output_need_bar here.
8696 Use build_mangled_name_for_type. Tidy.
8697 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
8698 build_mangled_name_for_type.
8699
8700 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8701 for TYPE_DECLs.
8702
8703 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
8704
8705 * cp-tree.h (warn_long_long): Define.
8706 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8707 warning "ANSI C++ does not support `long long'".
8708 * decl2.c (warn_long_long): Define.
8709 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8710
8711 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
8712
8713 * decl.c (xref_tag): Handle attributes between 'class' and name.
8714 * parse.y (aggr): Likewise.
8715 * semantics.c (finish_class_definition): Likewise.
8716 * Makefile.in (EXPECTED): Adjust.
8717
8718 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8719 * decl2.c: Define them.
8720 (lang_decode_option): Handle them.
8721 * lang-options.h: Add -foptional-diags.
8722 * class.c (finish_struct): Don't complain about multiple meanings of
8723 name if -fno-optional-diags.
8724 * decl.c (pushdecl_class_level): Likewise.
8725 * lex.c (real_yylex): Check warn_multichar.
8726
8727 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
8728
8729 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8730
8731 * tree.c (make_binfo): Fix length.
8732
8733 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
8734
8735 * decl2.c (lang_decode_option): Remove warn_template_debugging.
8736 * lang-options.h: Likewise.
8737
8738 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8739
8740 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8741 (process_start_catch_block): Likewise for variables
8742 `false_label_rtx', `call_rtx' and `return_value_rtx'.
8743
8744 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
8745
8746 * tree.c (build_srcloc): Make sure we allocate this node on the
8747 permanent obstack.
8748
8749 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
8750
8751 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8752 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8753 (lang_specific_driver): Only add -lm automatically if need_math is
8754 nonzero.
8755
8756 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
8757
8758 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
8759
8760 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8761
8762 * Makefile.in (EXPR_H): New dependency variable.
8763 (decl2.o): Depend on $(EXPR_H).
8764 (typeck.o): Likewise.
8765 (init.o): Likewise.
8766 (expr.o): Likewise.
8767
8768 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
8769
8770 * decl.c (start_enum): Put local enums on permanent_obstack.
8771
8772 1998-06-25 Mark Mitchell <mark@markmitchell.com>
8773
8774 * cp-tree.h (c_get_alias_set): Declare.
8775 * decl.c (init_decl_processing): Set lang_get_alias_set.
8776
8777 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
8778
8779 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8780 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8781 flag for all function decls which are in the exception table.
8782 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8783 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8784 code is emitted for any referenced rtti function.
8785
8786 1998-06-25 Dave Brolley <brolley@cygnus.com>
8787
8788 * lang-specs.h: Use new | syntax to eliminate
8789 string concatenation.
8790
8791 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
8792
8793 * cp-tree.h (CP_DECL_CONTEXT): New macro.
8794 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8795 * method.c (build_overload_nested_name): Likewise.
8796 * sig.c (build_signature_pointer_or_reference_type): Don't set
8797 DECL_CONTEXT.
8798
8799 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8800
8801 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8802 * cp-tree.h (FROB_CONTEXT): New macro.
8803 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8804 * decl.c (namespace_binding): Replace NULL_TREE with
8805 global_namespace.
8806 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8807 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8808 Likewise.
8809 * decl.c (pushtag): Use FROB_CONTEXT.
8810 (pushdecl, make_typename_type, define_function, grokdeclarator):
8811 Likewise.
8812 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8813 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8814 Likewise.
8815 * decl2.c (decl_namespace): Return global_namespace if no context.
8816 * method.c (build_overload_nested_name): Expect null as context.
8817 * pt.c (mangle_class_name_for_template): Do nothing for null
8818 contexts.
8819 (lookup_template_class): Allow for null id_context.
8820
8821 1998-06-25 Richard Henderson <rth@cygnus.com>
8822
8823 * method.c (emit_thunk): Set current_function_is_thunk for the
8824 ASM_OUTPUT_MI_THUNK case as well.
8825
8826 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8827
8828 * exception.cc (__cplus_type_matcher): Get a match_info pointer
8829 instead of an exception table entry as a parameter.
8830
8831 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8832
8833 * parse.y (function_try_block): Don't call start_catch_handler.
8834 * except.c (call_eh_info): Remove coerced field from declaration.
8835 (build_eh_type_type_ref): New function to create an address of a
8836 rtti function for the new style exception tables.
8837 (expand_start_catch_block): Split function, this contains the
8838 common part.
8839 (process_start_catch_block_old): New function to perform the rest
8840 of expand_start_catch_block under old style exceptions.
8841 (process_start_catch_block_old): New function to perform the rest
8842 of expand_start_catch_block under new style exceptions.
8843 (expand_end_catch_block): Only pop the false label off the stack under
8844 the old style of exceptions.
8845 * semantics.c (finish_try_block): Don't call start_catch_handler.
8846 * exception.cc (struct cp_eh_info): Add original_value field.
8847 (__cplus_type_matcher): Perform type matching on the original exception
8848 value, and if we have a match, set the current value.
8849 (__cp_push_exception): Set the original exception value.
8850
8851 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
8852
8853 * call.c (joust): Fix confusing conversion warning.
8854
8855 * call.c (build_op_delete_call): Add placement parm. Check
8856 LOOKUP_SPECULATIVELY.
8857 * cp-tree.h, decl2.c, init.c: Adjust.
8858 * decl.c (finish_function): Use it.
8859
8860 * pt.c (tsubst): Diagnose creating void fields or variables.
8861
8862 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8863
8864 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8865
8866 * cp-tree.h (check_dtor_name): Add prototype.
8867
8868 * init.c (expand_member_init): Remove unused variables
8869 `ptr_type_node', `parm' and `rval'.
8870
8871 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8872 in call to fprintf.
8873 (lang_print_xnode): Likewise.
8874
8875 * typeck2.c (enum_name_string): Cast argument to sprintf to long
8876 and use %ld specifier.
8877
8878 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8879 specifier in call to fprintf.
8880 (GNU_xref_member): Cast argument to sprintf to int.
8881
8882 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8883
8884 * typeck2.c (pop_init_level): Warn about implicit zero initialization
8885 of struct members.
8886
8887 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8888
8889 * cp-tree.h: Prototype function `check_java_method'.
8890
8891 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8892
8893 * class.c (finish_struct): Make conflicting use of id a pedwarn.
8894 * decl.c (pushdecl_class_level): Likewise.
8895
8896 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8897
8898 * pt.c (convert_nontype_argument): Issue an error when presented
8899 with an integer (real) constant that cannot be simplified to an
8900 INT_CST (REAL_CST).
8901
8902 * cp-tree.h (c_get_alias_set): Remove declaration added in
8903 1998-06-13 change that should never have been checked in.
8904
8905 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8906
8907 * typeck.c (build_binary_op_nodefault): Change % in format strings
8908 to %%.
8909
8910 * decl.c (grokvardecl): Don't build_static_name for decls that
8911 aren't at namespace scope.
8912
8913 * init.c (perform_member_init): Catch default-initialization of
8914 references.
8915
8916 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8917
8918 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8919
8920 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8921
8922 * method.c (hack_identifier): Complain about getting a namespace
8923 or class template.
8924 * typeck.c (decay_conversion): Remove check for namespaces.
8925 * typeck2.c (incomplete_type_error): Likewise.
8926 * parse.y (template_arg): Add PTYPENAME expansion.
8927
8928 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
8929
8930 * decl.c (grokvardecl): Don't build external assembler names for
8931 TYPENAMEs in other namespaces as there is no declarator.
8932 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8933 info from DECL_CONTEXT if it is NULL.
8934
8935 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
8936
8937 * call.c (check_dtor_name): Split out.
8938 (build_scoped_method_call): Use it.
8939 (build_method_call): Use it.
8940 * init.c (build_offset_ref): Use it.
8941
8942 * typeck.c (build_static_cast): Fix handling of pointers to members.
8943
8944 * decl.c (finish_function): Just return nothing from a constructor.
8945 * typeck.c (c_expand_return): Complain about returning a void
8946 expression from a destructor.
8947
8948 1998-06-13 Mark Mitchell <mark@markmitchell.com>
8949
8950 * class.c (alter_access): Accept a BINFO explaining how to get
8951 from the entity whose accessed is being altered to the type doing
8952 the altering.
8953 (handle_using_decl): New function containing code split out from ...
8954 (finish_struct_1): Here.
8955
8956 * cp-tree.h (complete_type_or_else): Declare.
8957 * init.c (build_new_1, build_delete): Use it.
8958 * typeck.c (require_complete_type): Use complete_type, rather than
8959 expanding it inline.
8960 (complete_type_or_else): New function.
8961 (build_component_ref): Use it.
8962 (pointer_int_sum): Make sure the type pointed to is complete.
8963 (pointer_diff): Likewise.
8964
8965 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8966 types.
8967
8968 * search.c (get_matching_virtual): Note that member templates
8969 cannot override virtual functions.
8970
8971 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
8972
8973 * pt.c (check_explicit_specialization): If DECLARATOR turned into
8974 an error_mark_node from lookup_template_function, return the same.
8975 (determine_specialization): Also make sure TEMPLATE_ID isn't an
8976 error_mark_node, before we try to read its operands.
8977 * decl.c (grokdeclarator): If we got an error_mark_node from
8978 check_explicit_specialization, just return it right back.
8979
8980 1998-06-12 Mark Mitchell <mark@markmitchell.com>
8981
8982 * class.c (instantiate_type): Don't treat template-ids that don't
8983 specify any template arguments as equivalent to ordinary
8984 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
8985 pointer-to-members for member templates. Tidy slightly.
8986 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8987 * init.c (build_offset_ref): Handle template-ids like ordinary
8988 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8989 offset part of the OFFSET_REF.
8990 * typeck.c (build_unary_op): Change check for unknown types to
8991 look for OFFSET_REFs, not SCOPE_REFs.
8992
8993 1998-06-11 Mark Mitchell <mark@markmitchell.com>
8994
8995 * pt.c (is_member_template_class): New function.
8996 (push_template_decl_real): Use it.
8997
8998 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
8999
9000 * friend.c (do_friend): Add support for nested classes using
9001 member functions of the enclosing class as friends.
9002
9003 1998-06-10 Mark Mitchell <mark@markmitchell.com>
9004
9005 * call.c (convert_default_arg): Make global, not static.
9006 (convert_arg_for_ellipsis): Split out from ...
9007 (build_over_call): Here.
9008 * cp-tree.h (convert_default_arg); Declare.
9009 (convert_arg_to_ellipsis): Likewise.
9010 (do_member_init): Remove.
9011 * init.c (do_member_init): Remove; this code is dead.
9012 (expand_member_init): Remove much of this code; it is dead.
9013 * typeck.c (convert_arguments): Use convert_default_arg and
9014 convert_arg_for_ellipsis, rather than duplicating here.
9015
9016 * call.c (convert_like): Don't fail silently if
9017 build_user_type_conversion fails. Always return error_mark_node
9018 for failure.
9019
9020 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9021
9022 * search.c (covariant_return_p): Complain about ambiguous base.
9023
9024 * typeck.c (build_component_ref): Diagnose ref to nested type.
9025
9026 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
9027
9028 * decl.c (grokparms): Check that INIT isn't an error_mark_node
9029 before giving error about invalid type for default arg.
9030
9031 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9032
9033 * call.c (build_method_call): Fix thinko.
9034
9035 1998-06-10 Dave Brolley <brolley@cygnus.com>
9036
9037 * decl2.c (lang_decode_option): New argc/argv interface.
9038 * cp-tree.h (lang_decode_option): New argc/argv interface.
9039 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9040 specified for cpplib-enabled compilers.
9041 * lex.c (lang_init): Don't check_newline for cpplib.
9042 (init_parse): Don't initialize cpplib here.
9043
9044 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
9045
9046 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9047 piece before checking DECL_MUTABLE_P.
9048
9049 1998-06-10 John Carr <jfc@mit.edu>
9050
9051 * tree.c (debug_binfo): Make printf format match arguments.
9052
9053 * error.c (OB_PUTI): Make printf format match arguments.
9054
9055 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9056
9057 * init.c (perform_member_init): Handle default-initialization.
9058
9059 * except.c (build_throw): Handle throwing NULL.
9060
9061 * typeck.c (build_x_function_call): Use resolve_offset_ref.
9062
9063 * search.c (compute_access): Only strip an anonymous union
9064 for a FIELD_DECL.
9065
9066 * call.c (add_builtin_candidates): Tweak.
9067
9068 * cvt.c (build_expr_type_conversion): Restore code for conversion
9069 from class types.
9070 * decl2.c (delete_sanity): Use it. Clean up.
9071
9072 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9073
9074 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
9075
9076 * typeck.c (c_expand_return): Don't warn about void expressions on
9077 return statements in functions returning void.
9078
9079 1998-06-09 Mark Mitchell <mark@markmitchell.com>
9080
9081 * pt.c (fn_type_unification): Revise documentation. Tidy.
9082 (type_unification): Likewise.
9083
9084 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
9085
9086 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9087 expand_end_catch.
9088 * parse.y (function_try_block): Rename expand_start_catch, and delete
9089 expand_end_catch.
9090 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9091 expand_end_catch.
9092
9093 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
9094
9095 * search.c (lookup_member): New fn.
9096 * class.c (finish_struct_1): Use it.
9097 * decl.c (lookup_name_real): Use it.
9098
9099 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9100
9101 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9102
9103 * cp-tree.h: Add prototype for `maybe_print_template_context' and
9104 `maybe_make_one_only'.
9105
9106 * decl.c (auto_function): Remove unused variable `decl'.
9107
9108 * decl2.c: Include dwarf2out.h and dwarfout.h.
9109
9110 * lex.c: Remove redundant declarations of `set_float_handler' and
9111 `asm_out_file'.
9112
9113 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
9114
9115 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9116 time flag. Call __cp_eh_info instead of __cp_exception_info.
9117 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9118 (__cp_exception_info): Return offset into cp_eh_info structure to
9119 match what use to be the start of this structure.
9120 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9121 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9122 compile time flag.
9123 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9124 __cp_eh_info instead of __cp_exception_info.
9125
9126 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
9127
9128 * decl.c (cp_finish_decl): Disable inlining of extern inlines
9129 with static variables.
9130
9131 1998-06-08 Mark Mitchell <mark@markmitchell.com>
9132
9133 * init.c (build_offset_ref): Correct previous change to use build,
9134 not build_min.
9135
9136 1998-06-07 Mark Mitchell <mark@markmitchell.com>
9137
9138 * class.c (instantiate_type): Handle pointer-to-members where the
9139 member is a template.
9140 * init.c (build_offset_ref): Likewise.
9141 * typeck.c (build_unary_op): Likewise.
9142
9143 1998-06-07 Richard Henderson <rth@cygnus.com>
9144
9145 * lex.c (lang_init_options): New function.
9146 (lang_init): Remove flag_exceptions == 2 hack.
9147
9148 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
9149
9150 * search.c (envelope_add_decl): Tweak for implicit typename.
9151
9152 * call.c (joust): Also warn about confusing conversion op/constructor
9153 overload resolution.
9154
9155 * spew.c (yylex): Also return the TYPE_DECL if got_object.
9156 Don't clear got_object after '~'.
9157 * call.c (build_scoped_method_call): Tweak destructor handling.
9158 (build_method_call): Likewise.
9159 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9160 TYPE_MAIN_VARIANT for destructors.
9161 * semantics.c (finish_object_call_expr): Complain about calling a
9162 TYPE_DECL.
9163
9164 1998-06-05 Per Bothner <bothner@cygnus.com>
9165
9166 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9167 Define - update needed by gcc.c change.
9168
9169 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
9170
9171 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9172
9173 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9174
9175 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9176 * decl.c (lookup_name_real): Add namespaces_only parameter.
9177 If set, return only NAMESPACE_DECLs.
9178 (select_decl): Likewise.
9179 (identifier_type_value): Give additional parameter.
9180 (lookup_name_nonclass): Likewise.
9181 (lookup_name): Likewise.
9182 (find_binding): Skip namespace aliases.
9183 (binding_for_name): Likewise.
9184 (push_namespace): Check for namespace aliases.
9185 (lookup_name_namespace_only): New function.
9186 (begin_only_namespace_names, end_only_namespace_names): New functions.
9187 * decl2.c (set_decl_namespace): Skip namespace aliases.
9188 (do_using_directive): Likewise.
9189 (do_namespace_alias): Produce namespace aliases, fix alias
9190 redeclaration.
9191 * error.c (dump_decl): Support SCOPE_REF.
9192 * parse.y (extdef): Wrap lookup with namespace_only for namespace
9193 aliases and using declarations.
9194
9195 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
9196
9197 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9198
9199 * error.c (dump_expr): Clean up NEW_EXPR case.
9200
9201 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
9202
9203 Suggested by Brendan Kehoe
9204 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9205 treat it as using ::decl.
9206
9207 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9208
9209 * tree.c (mapcar): Support NEW_EXPR.
9210
9211 * error.c (dump_expr): Support NEW_EXPR.
9212
9213 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
9214
9215 * method.c (make_thunk): Use overload machinery to make name.
9216 * search.c (covariant_return_p): New fn.
9217 (get_matching_virtual): Use it.
9218
9219 * init.c (build_new_1): Fix check for void.
9220
9221 1998-06-01 Per Bothner <bothner@cygnus.com>
9222
9223 * cp-tree.h (TYPE_FOR_JAVA): New macro.
9224 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9225 java_int_type_node, java_long_type_node, java_float_type_node,
9226 java_double_type_node, java_char_type_node, java_boolean_type_node):
9227 New "primitive" types, with predefined names __java_byte etc.
9228 (record_builtin_java_type): New function.
9229 (init_decl_processing): Make Java types with record_builtin_java_type.
9230 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
9231 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
9232 (grokfndecl): Call check_java_method for Java classes.
9233 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
9234 (process_overload_item): Match types against specific
9235 java_XX_type_node types, rather than using is_java_type.
9236 * class.c (finish_struct_1): Don't add default copy constructor
9237 or operator= if TYPE_FOR_JAVA.
9238 (pop_lang_conext): Restore strict_prototyp proper if Java.
9239 * decl2.c (acceptable_java_type, check_java_method): New functions.
9240 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
9241 (tsubst): Move common statement after if statement.
9242 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
9243
9244 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
9245
9246 * pt.c (for_each_template_parm): Use first_rtl_op.
9247
9248 * tree.c (build_cplus_array_type_1): Also check index_type for
9249 template parms.
9250
9251 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
9252
9253 * pt.c (tsubst): Always copy BINFO_BASETYPES.
9254
9255 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
9256
9257 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9258 TYPE_SIZE_UNIT too.
9259
9260 1998-05-29 Mark Mitchell <mark@markmitchell.com>
9261
9262 * decl.c (grokdeclarator): Don't complain about in-class
9263 initialization of static consts if we don't really know the type
9264 of the variable.
9265
9266 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
9267
9268 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9269 * method.c (build_destructor_name): New fn.
9270 * decl2.c (maybe_retrofit_in_chrg): Split out...
9271 (grokclassfn): From here. Reorganize.
9272 * decl.c (grok_ctor_properties): Make sure ctors for types with
9273 vbases have the in_chrg parm.
9274 * pt.c (instantiate_class_template): Update
9275 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
9276 grok_*_properties.
9277 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9278
9279 1998-05-28 Mark Mitchell <mark@markmitchell.com>
9280
9281 * pt.c (instantiate_decl): Make test for whether or not static
9282 variables should be instantiated early match its comment.
9283
9284 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
9285
9286 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9287 a member.
9288 (start_function): Call check_default_args.
9289 * decl2.c (grokfield): Don't call check_default_args.
9290 (check_default_args): Use cp_error_at.
9291 * lex.c (do_pending_defargs): Call check_default_args.
9292
9293 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
9294
9295 * call.c (build_method_call): Make sure get_type_value returns
9296 something before we try to use its TYPE_MAIN_VARIANT.
9297 (build_scoped_method_call): Likewise.
9298
9299 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
9300
9301 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9302 initialize an array.
9303
9304 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9305 DECL_VIRTUAL_P.
9306
9307 * friend.c (do_friend): Clarify template warning.
9308
9309 1998-05-27 Mark Mitchell <mark@markmitchell.com>
9310
9311 * decl.c (shadow_label): Don't treat decls as identifiers.
9312 (maybe_push_to_top_level): Clear shadowed_labels.
9313
9314 * pt.c (instantiate_decl): Reset lineno and filename after calling
9315 regenerate_decl_from_template.
9316
9317 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9318 error_mark_node.
9319
9320 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
9321
9322 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9323
9324 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9325
9326 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9327 (convert_nontype_argument): Handle cases when nontype template
9328 parameters become classes after substitution.
9329
9330 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9331
9332 * friend.c (is_friend): Use comptypes, rather than == to compare
9333 types. Modify for new representation of template friends.
9334 (make_friend_class): Likewise.
9335 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
9336 (instantiate_class_template): Deal with template friends.
9337
9338 * decl.c (store_parm_decls): Remove redundant call to
9339 expand_main_function.
9340
9341 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
9342
9343 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9344 DECL_USE_TEMPLATE.
9345
9346 1998-05-26 Per Bothner <bothner@cygnus.com>
9347
9348 * language_as_string: Handle lang_java.
9349
9350 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
9351
9352 * decl.c (pushdecl): Don't copy the type_decl.
9353
9354 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9355
9356 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9357 current_class_type.
9358 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9359
9360 * parse.y (complex_direct_notype_declarator): Use $1 to access
9361 scope of notype_qualified_id.
9362
9363 1998-05-26 Dave Brolley <brolley@cygnus.com>
9364
9365 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9366 (init_parse): Initialize cpplib interface.
9367
9368 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9369 empty continuation.
9370
9371 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9372
9373 * decl.c (pushtag): Avoid crashing on erroneous input.
9374
9375 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9376
9377 * decl.c (push_namespace): Only produce one unique name for
9378 anonymous namespaces.
9379 (get_unique_name): Remove.
9380
9381 1998-05-25 Mark Mitchell <mark@markmitchell.com>
9382
9383 * call.c (tourney): Don't do any extra comparisons.
9384
9385 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9386
9387 * cp-tree.h (processing_template_parmlist): Declare.
9388 * decl.c (pushtag): Don't call push_template_decl when we
9389 shouldn't.
9390 * pt.c (processing_template_parmlist): New variable.
9391 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9392 (complete_template_args): Use it.
9393 (add_to_template_args): Likewise.
9394 (innermost_args): Likewise.
9395 (tsubst): Likewise.
9396 (begin_template_parm_list): Use processing_template_parmlist.
9397 (end_template_parm_list): Likewise.
9398
9399 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9400 * decl.c (grokdeclarator): Use it.
9401 * decl2.c (grok_x_components): Likewise.
9402 * init.c (initializing_context): Likewise.
9403 * method.c (do_build_copy_constructor): Likewise.
9404 (do_build_assign_ref): Likewise.
9405 * search.c (compute_access): Likewise.
9406 * typeck.c (build_component_ref): Likewise.
9407
9408 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9409 unnamed type a typedef name "for linkage purposes".
9410
9411 * pt.c (lookup_template_class): Don't look at
9412 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9413
9414 * method.c (build_overload_int): Handle error cases gracefully.
9415
9416 * pt.c (instantiate_decl): Handle static member variables
9417 correctly.
9418
9419 * pt.c (tsubst): Use the tsubst'd type when producing new
9420 TEMPLATE_PARM_INDEX nodes.
9421
9422 1998-05-24 Mark Mitchell <mark@markmitchell.com>
9423
9424 * tree.c (cp_tree_equal): Handle pointers to member functions.
9425
9426 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
9427 sure the type of the REF_BIND is a reference type.
9428 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9429 target_type for clarity.
9430
9431 * parse.y (xcond): Move call to condition_conversion ...
9432 * semantics.c (finish_for_cond): Here.
9433 * parse.c: Regenerated.
9434
9435 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
9436
9437 * decl.c (push_namespace): Namespaces have type void.
9438 * typeck2.c (incomplete_type_error): Complain about namespace
9439 used as expression.
9440 * typeck.c (decay_conversion): Likewise.
9441
9442 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9443
9444 * error.c (dump_expr): Support namespaces.
9445
9446 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
9447
9448 * cp-tree.def: Add SRCLOC.
9449 * cp-tree.h: Add struct tree_srcloc and accessor macros.
9450 * tree.c (build_srcloc, build_srcloc_here): New fns.
9451 * pt.c (add_pending_template): Use build_srcloc_here.
9452 (push_tinst_level): Update last_template_error_tick before erroring.
9453 (instantiate_decl): Restore lineno and input_filename before
9454 calling add_pending_template.
9455 * decl2.c (finish_file): Set up lineno and input_filename for
9456 pending templates.
9457
9458 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9459
9460 * decl.c (lang_print_error_function): New fn.
9461 (init_decl_processing): Set print_error_function to use it.
9462 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9463
9464 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9465 ICS_BAD_FLAG.
9466
9467 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9468 copy-initialization.
9469
9470 * class.c (build_vtable_entry): Use int_fits_type_p.
9471 (build_vtable): Pass a signed offset to build_vtable_entry.
9472 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9473 set_rtti_entry): Likewise.
9474
9475 1998-05-22 Per Bothner <bothner@cygnus.com>
9476
9477 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
9478 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
9479
9480 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9481
9482 * pt.c (print_template_context): Use fprintf instead of cp_error.
9483
9484 * pt.c (determine_specialization): Just return an error_mark_node.
9485 Also print the decl we want in error messages. If we complain,
9486 return error_mark_node.
9487 (tsubst_friend_function): Set lineno and input_filename so
9488 error messages will be useful.
9489 (instantiate_template): Just return an error_mark_node.
9490 (check_explicit_specialization): Don't mess with a returned
9491 error_mark_node.
9492
9493 * pt.c (print_template_context): Add new argument.
9494 (maybe_print_template_context): New fn.
9495 (push_tinst_level): Increment tinst_level_tick.
9496 (pop_tinst_level): Likewise.
9497 * errfn.c (cp_thing): Call maybe_print_template_context. Use
9498 xrealloc instead of xmalloc.
9499
9500 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9501
9502 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9503
9504 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9505 if the template we looked up is the same as the one we already
9506 have.
9507
9508 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
9509
9510 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9511 (cpp_reader,parse_in): Add for cpplib.
9512 (check_newline): Call handle_sysv_pragma with new interface.
9513 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9514
9515 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9516 (sub_getch): Call GETC for cpplib.
9517
9518 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9519 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9520
9521 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9522
9523 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9524
9525 * decl2.c (maybe_make_one_only): New fn.
9526 (import_export_vtable): Use it.
9527 (import_export_decl): Likewise.
9528 * pt.c (mark_decl_instantiated): Likewise.
9529
9530 1998-05-21 Mark Mitchell <mmitchell@usa.net>
9531
9532 * decl2.c (find_representative_member): Rename to ...
9533 (build_anon_union_vars): New function.
9534 (finish_anon_union): Fix stupidity of previous change.
9535
9536 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
9537
9538 * decl.c (grokfndecl): Handle definition of specialization in
9539 friend declaration.
9540
9541 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9542
9543 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9544
9545 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9546 to look for type declarations.
9547 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9548 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9549 (finish_member_class_template): Declare.
9550 * decl.c (pushtag): Put member class templates on the
9551 CLASSTYPE_TAGS list, just as for ordinary member classes.
9552 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9553 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9554 IDENTIFIER_NAMESPACE_VALUEs.
9555 * parse.y (component_decl): Move code to ...
9556 * semantics.c (finish_member_class_template): New function.
9557 Don't put member class templates on the list of components for a
9558 class.
9559 * parse.c: Regenerated.
9560 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9561 In fact, don't use DECL_CONTEXT at all here.
9562
9563 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
9564
9565 * decl.c (record_unknown_type): New function.
9566 (init_decl_processing): Call it for the unknown and global type
9567 nodes.
9568
9569 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9570
9571 * decl2.c (find_representative_member): New function.
9572 (finish_anon_union): Use it.
9573
9574 * cp-tree.h (MAIN_NAME_P): New macro.
9575 (DECL_MAIN_P): Likwise.
9576 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9577 (grokfndecl): Use the new macros.
9578 (grokdeclarator): Likewise.
9579 (start_function): Likewise.
9580 (store_parm_decls): Likewise.
9581 (finsh_function): Likewise.
9582 * friend.c (do_friend): Likewise.
9583 * typeck.c (build_function_call_real): Likewise.
9584 (build_unary_op): Likewise.
9585
9586 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
9587
9588 * decl2.c (start_objects, finish_objects, do_dtors,
9589 do_ctors): Split out from...
9590 (finish_file): ...here.
9591
9592 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
9593
9594 * tree.c (is_overloaded_fn): Don't abort on placeholders from
9595 push_class_decls.
9596
9597 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
9598
9599 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9600
9601 * error.c (dump_expr): Handle an ARROW_EXPR.
9602
9603 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
9604
9605 * decl.c (saveable_obstack): Declare.
9606 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9607 declare, if necessary.
9608
9609 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
9610
9611 * call.c (compare_qual): Remove.
9612 (is_subseq): Tweak.
9613 (is_properly_derived_from): New function.
9614 (maybe_handle_ref_bind): Likewise.
9615 (maybe_handle_implicit_object): Likewise.
9616 (compare_ics): Modify substantially to bring into conformance with
9617 the standard.
9618 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9619 (comp_cv_qualification): Declare.
9620 (comp_cv_qual_signature): Likewise.
9621 * typeck.c (comp_cv_qualification): Likewise.
9622 (comp_cv_qual_signature): Likewise.
9623
9624 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9625
9626 * Makefile.in (parse.o): Depend on toplev.h.
9627
9628 * class.c (typecode_p): Remove prototype and definition.
9629
9630 * cp-tree.h (currently_open_class, is_empty_class, member_p):
9631 Add prototype.
9632
9633 * decl.c (push_overloaded_decl_top_level): Remove prototype and
9634 definition.
9635
9636 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9637 in call to `cp_thing'.
9638 (cp_warning): Likewise for function pointer `warning'.
9639
9640 * except.c (do_function_call): Remove prototype and definition.
9641 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9642
9643 * method.c (is_java_type): Add prototype and make it static.
9644
9645 * parse.y: Include toplev.h.
9646
9647 * pt.c (type_unification): Remove unused variable `arg'.
9648 (instantiate_decl): Likewise for `save_ti'.
9649
9650 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9651
9652 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
9653
9654 * init.c (build_member_call): Handle template_ids.
9655 * parse.y (primary): Add global_scope template_id.
9656
9657 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
9658
9659 * decl2.c (get_sentry): Use end_temporary_allocation.
9660 Don't declare permanent_obstack.
9661
9662 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
9663
9664 * parse.y (.finish_new_placement): New non-terminal.
9665 (unary_expr, new_type_id): Use it.
9666 * parse.c: Regenerated.
9667
9668 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
9669
9670 * pt.c (redeclare_class_template): Say where the original definition
9671 of the template-parameter's default argument appeared.
9672
9673 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
9674
9675 * call.c (build_over_call): Tweak empty class handling.
9676
9677 * decl.c (make_typename_type): Use currently_open_class.
9678
9679 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9680
9681 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9682
9683 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9684 for a type unless it is one.
9685
9686 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9687
9688 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
9689
9690 * Makefile.in (program_transform_name, objdir): Define.
9691
9692 * Makefile.in (BISON): Use bison from the build tree if it exists.
9693 (FLEX): Likewise.
9694
9695 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9696
9697 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9698
9699 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9700
9701 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
9702
9703 * call.c (build_scoped_method_call): Likewise.
9704
9705 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
9706
9707 * init.c (build_new_1): Call suspend_momentary around the creation
9708 of values that must be saved for exception handling.
9709 * parse.y (.build_new_placement): New non-terminal.
9710 (unary_expr, new_placement): Use it.
9711 * parse.c: Regenerated.
9712
9713 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
9714
9715 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9716 old and new types.
9717
9718 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9719 canonical type.
9720
9721 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9722
9723 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
9724
9725 * decl.c (start_decl): Revert problem change.
9726
9727 * Makefile.in (CONFLICTS): Fix.
9728
9729 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9730
9731 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9732
9733 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9734
9735 * class.c (finish_struct_1): Use BINFO_SIZE.
9736
9737 * decl.c (start_decl): Use 'tem'.
9738
9739 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
9740
9741 * exception.cc: Include eh-common.h.
9742 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9743 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9744 (__cp_push_exception): Initialize eh_info struct as well.
9745 * except.c: Remove local structs and include eh-common.h.
9746 (init_exception_processing): Set language and version codes.
9747 (call_eh_info): Add presence of eh_info to runtime description of
9748 struct cp_eh_info.
9749 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9750 * semantics.c (finish_try_block): Call start_catch_block() and
9751 end_catch_block().
9752 * parse.y (function_try_block): Call start_catch_block() and
9753 end_catch_block().
9754
9755 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
9756
9757 * typeck.c (original_type): New function.
9758 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9759 to see if they're actually the same.
9760 * cp-tree.h (original_type): Declare.
9761
9762 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9763
9764 * Makefile.in (lex.o): Depend on output.h.
9765
9766 * call.c (add_function_candidate): Remove unused variable `cand'.
9767 (add_conv_candidate): Likewise.
9768 (build_builtin_candidate): Likewise.
9769
9770 * cp-tree.h: Add prototype for `types_overlap_p'.
9771
9772 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9773
9774 * decl2.c (merge_functions): Remove unused variables `tmp' and
9775 `tempn'.
9776
9777 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9778 (code_as_string): Likewise.
9779 (language_as_string): Likewise.
9780 (parm_as_string): Likewise.
9781 (op_as_string): Likewise.
9782 (assop_as_string): Likewise.
9783 (cv_as_string): Likewise.
9784
9785 * lex.c: Include output.h.
9786
9787 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9788
9789 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9790 ATTRIBUTE_UNUSED.
9791
9792 * tinfo.cc (__class_type_info::dcast): Change the type of variable
9793 `i' from int to size_t.
9794
9795 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9796 ATTRIBUTE_UNUSED.
9797
9798 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
9799
9800 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9801 DECL_NAMESPACE_SCOPE_P.
9802 (lang_decl_name): Likewise.
9803 * pt.c (tsubst_friend_function, tsubst): Likewise.
9804 * decl.c (pushdecl, redeclaration_error_message, start_decl,
9805 cp_finish_decl, start_function): Likewise.
9806 * class.c (finish_struct_1): Likewise.
9807 * call.c (build_over_call): Likewise.
9808 (compare_ics): Use DERIVED_FROM_P.
9809
9810 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
9811
9812 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9813 * method.c (build_mangled_name): Use it.
9814 (build_decl_overload_real): Likewise.
9815
9816 * error.c (dump_simple_decl): New function, broken out from ...
9817 (dump_decl): Use it.
9818
9819 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
9820
9821 * ptree.c (lang_print_xnode): Add missing `break'.
9822
9823 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9824
9825 * call.c (add_template_candidate): Adjust for changes to
9826 fn_type_unification.
9827 (add_template_candidate_real): Likewise.
9828 (add_template_conv_candidate): Likewise.
9829 (build_user_type_conversion_1): Likewise.
9830 (build_new_function_call): Likewise.
9831 (build_object_call): Likewise.
9832 (build_new_op): Likewise.
9833 (build_new_method_call): Likewise.
9834 * class.c (instantiate_type): Likewise.
9835 * cp-tree.h (unification_kind_t): New type.
9836 (fn_type_unification): Adjust prototype.
9837 (type_unificaiton): Likewise.
9838 * pt.c (UNIFY_ALLOW_NONE): New macro.
9839 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9840 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9841 (UNIFY_ALLOW_DERIVED): Likewise.
9842 (unify): Change prototype.
9843 (maybe_adjust_types_for_deduction): New function.
9844 (check_cv_quals_for_unify): Likewise.
9845 (determine_specialization): Adjust.
9846 (fn_type_unification): Likewise.
9847 (type_unification): Likewise.
9848 (type_unification_real): Likewise. Use
9849 maybe_adjust_types_for_deduction. Fix mishandling of
9850 back-unification of template functions passed as arguments. Pass
9851 appropriate combination of UNIFY_ALLOW_* to unify.
9852 (unify): Remove unused NTPARMS parameter. Use
9853 check_cv_quals_for_unify. Remove bogus code that allowed
9854 too-generous unification in order to adhere more closely to standard.
9855 (get_bindings_real): Adjust.
9856 (get_class_bindings): Likewise.
9857
9858 * method.c (build_overload_identifier): Only use the innermost
9859 template arguments when mangling.
9860 * pt.c (tsubst_template_argument_vector): New function.
9861 (complete_template_args): Deal with the situation where the
9862 extra_args contain more than one level of arguments.
9863 (lookup_template_class): Deal with member template classes, which
9864 may have more than one level of arguments.
9865 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9866 Improve handling of member template classes. Use
9867 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
9868 tsubst_template_argument_vector where appropriate.
9869 (regenerate_decl_from_template): Break out from ...
9870 (instantiate_decl): Here.
9871
9872 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9873 * parse.h: Regenerated.
9874 * parse.c: Really regenerated.
9875
9876 * cp-tree.h (finish_unary_op_expr): New function.
9877 (finish_id_expr): Likewise.
9878 (begin_new_placement): Likewise.
9879 (finish_new_placement): Likewise.
9880 (finish_declarator): Likewise.
9881 (finish_translation_unit): Likewise.
9882 (finish_parmlist): Likewise.
9883 (begin_class_definition): Likewise.
9884 (finish_class_definition): Likewise.
9885 (finish_default_args): Likewise.
9886 (finish_inline_definitions): Likewise.
9887 * parse.y (GCC_ASM_KEYWORD): Remove.
9888 (TYPENAME_ELLIPSIS): Likewise.
9889 * parse.c: Regenerated.
9890 Use new functions in semantics.c in the actions for many rules.
9891 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9892 * hash.h: Regenerated.
9893 * semantics.c (finish_expr_stmt): Allow NULL expr.
9894 (finish_unary_op_expr): New function, containing
9895 code previously in parse.y.
9896 (finish_id_expr): Likewise.
9897 (begin_new_placement): Likewise.
9898 (finish_new_placement): Likewise.
9899 (finish_declarator): Likewise.
9900 (finish_translation_unit): Likewise.
9901 (finish_parmlist): Likewise.
9902 (begin_class_definition): Likewise.
9903 (finish_class_definition): Likewise.
9904 (finish_default_args): Likewise.
9905 (finish_inline_definitions): Likewise.
9906
9907 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
9908
9909 * typeck.c (build_c_cast): Don't decay arrays and functions to
9910 pointer type when converting to a class type.
9911
9912 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
9913
9914 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9915 (DECL_CLASS_SCOPE_P): Likewise.
9916
9917 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
9918
9919 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9920 * decl2.c (constructor_name_full): Likewise.
9921
9922 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
9923
9924 * tree.c (mapcar): Add OVERLOAD support.
9925
9926 * init.c (resolve_offset_ref): We must use basetype_path before we
9927 destroy it with a call to convert_pointer_to.
9928
9929 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9930
9931 * class.c (currently_open_class): New fn.
9932 * decl.c (lookup_name_real): Use it.
9933 * search.c (lookup_field): Likewise.
9934
9935 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9936
9937 * cp-tree.def (OVERLOAD): New node.
9938 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9939 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9940 (NAMESPACE_BINDING): Remove.
9941 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9942 namespace_binding.
9943 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9944 Define.
9945 (tree_overload): New struct.
9946 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9947 (REAL_IDENTIFIER_TYPE_VALUE): Define.
9948 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9949 (lang_decl_flags): Remove in_namespace.
9950 (lang_decl): Remove chain.
9951 (DECL_CHAIN, DECL_NAMESPACE): Remove.
9952 (flag_honor_std): Declare extern.
9953 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9954 namespace_binding, set_namespace_binding,
9955 lookup_function_nonclass, cat_namespace_levels,
9956 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9957 scratch_ovl_cons, ovl_member, build_overload): Declare.
9958 (decl_list_length, get_namespace_id, current_namespace_id,
9959 overloaded_globals_p): Remove.
9960 (lookup_using_namespace, qualified_lookup_using_namespace): Change
9961 return type.
9962 (push_scratch_obstack): New macro.
9963 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9964 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9965 convs, fns.
9966 (build_new_function_call): Iterate using OVL_CHAIN.
9967 Print DECL_NAME in when reporting ambiguities.
9968 (build_object_call): Iterate using OVL_NEXT for fns, convs.
9969 (build_new_op): Call lookup_function_nonclass.
9970 Iterate using OVL_NEXT.
9971 (build_op_delete_call): Change detection of members.
9972 Do not wrap TREE_LIST around fields and single global functions.
9973 (build_over_call): Don't push a class level if the context is a
9974 namespace.
9975 (build_new_method_call): Iterate using OVL_NEXT.
9976 * class.c (add_method): Chain overloaded members using
9977 build_overload. Remove copying of method.
9978 (grow_method): When iterating through the obstack, expect OVERLOAD
9979 nodes. Chain overload members.
9980 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
9981 nodes in call to get_baselinks.
9982 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9983 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
9984 fdecls that are OVERLOAD nodes.
9985 (validate_lhs): New function.
9986 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
9987 code. Use DECL_NAME in error messages. Split code between global
9988 and member function processing.
9989 * decl.c (global_type_node): New static variable.
9990 (in_std): New global.
9991 (struct binding_level): New field usings.
9992 (resume_binding_level): Assert that we are not in a class.
9993 (toplevel_bindings_p): Just check for namespace_p or
9994 pseudo_global.
9995 (resume_level): Remove.
9996 (find_binding): New function.
9997 (binding_for_name): Call it.
9998 (namespace_binding, set_namespace_binding): New functions.
9999 (push_namespace): Associate binding level with new namespace,
10000 resume_binding_level for existing namespace. Remove old code.
10001 Fake std by counting.
10002 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10003 (maybe_push_to_top_level): Save current namespace.
10004 (pop_from_top_level): Restore saved namespace.
10005 (pop_namespace): Call suspend_binding_level. Remove old code.
10006 (cat_namespace_levels): New function.
10007 (set_identifier_type_value_with_scope): For namespace bindings,
10008 set BINDING_TYPE, and use global_type_node.
10009 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10010 (identifier_type_value): New function.
10011 (pushtag): If no context, use current_namespace.
10012 (duplicate_decls): Don't process DECL_CHAIN.
10013 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10014 already set. Never reset it to NULL_TREE. Lookup global variables
10015 in their namespace. Push overloaded templates if they are on
10016 namespace level.
10017 (pushdecl_namespace_level): New function.
10018 (pushdecl_top_level): Implement using pushdecl_namespace_level.
10019 (pushdecl_using_decl): New function.
10020 (overloaded_globals_p): Remove.
10021 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10022 them. Use namespace_binding and set_namespace_value.
10023 (redeclaration_error_message): Complain if the declarations come
10024 from different namespaces.
10025 (lookup_tag): On namespace level, look in the BINDING_TYPE.
10026 (lookup_namespace_name): Pass tree_bindings from stack. Remove
10027 old code.
10028 (select_decl): New function.
10029 (lookup_name_real): Call it for qualified and unqualified lookup.
10030 Pass tree_bindings from the stack.
10031 If prefer_type is 1, also accept namespaces.
10032 (lookup_function_nonclass): New function.
10033 (init_decl_processing): Set the binding level of the global
10034 namespace to global_binding_level.
10035 Build a proper type list for __builtin_apply.
10036 Initialize std_node to "fake std" if flag_honor_std is set.
10037 Initialize global_type_node.
10038 Allocated bad_alloc in namespace std if flag_honor_std.
10039 (define_function): Set the DECL_CONTEXT to the current_namespace.
10040 (start_decl): A namespace is not considered as a context here. If
10041 the DECL_CONTEXT is a namespace, push the decl.
10042 (cp_finish_decl): Check for namespaces used as initializers.
10043 (grokfndecl): Add namespace parameter. Remove processing of
10044 DECL_CHAIN.
10045 (grokvardecl): Add namespace parameter.
10046 (grokdeclarator): Process SCOPEs that are namespaces. For
10047 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10048 (start_function): Check for contexts that are namespaces.
10049 Set context for declarations that have not been pushed.
10050 (store_parm_decls): Check for ::main only.
10051 (finish_function): Likewise.
10052 (start_method): Check for contexts that are namespaces.
10053 (start_method): Remove DECL_CHAIN processing.
10054 * decl2.c (flag_honor_std): Declare.
10055 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10056 (decl_namespace_list): New static global.
10057 (grok_x_components): Ignore namespaces as type contexts.
10058 (check_classfn): Expect OVERLOAD nodes.
10059 (grokfield): Remove DECL_CHAIN processing.
10060 (finish_file): Call cat_namespace_levels.
10061 (merge_functions): New function.
10062 (ambiguous_decl): Rewrite.
10063 (lookup_using_namespace): Produce tree_bindings.
10064 (qualified_lookup_using_namespace): Likewise.
10065 (set_decl_namespace, decl_namespace, current_decl_namespace,
10066 push_decl_namespace, pop_decl_namespace): New functions.
10067 (arg_lookup): New struct.
10068 (add_function, arg_assoc_namespace, arg_assoc_class,
10069 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10070 New functions.
10071 (get_namespace_id, current_namespace_id): Remove.
10072 (do_toplevel_using_decl): Rewrite.
10073 (do_class_using_decl): Complain about namespace qualifiers.
10074 (do_using_directive): Sorry if not on namespace level. Complain
10075 about unknown namespaces.
10076 * error.c (dump_aggr_type): Check for namespace contexts.
10077 * except.c (init_exception_processing): Push terminate into std.
10078 * friend.c (is_friend): A namespace is not a context, here.
10079 * init.c (expand_member_init): Remove DECL_CHAIN processing.
10080 (build_offset_ref): Process OVERLOAD nodes.
10081 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10082 * lex.c (identifier_type): Loop using OVL_CHAIN.
10083 (see_typename): Set looking_for_typename to 2.
10084 (real_yylex): Likewise.
10085 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10086 (do_scoped_id): Expect OVERLOAD nodes.
10087 Change calling convention for qualified_lookup_using_namespace.
10088 (build_lang_decl): Don't set in_namespace anymore.
10089 * method.c (typevec_size): New global.
10090 (build_overload_nested_name): Return if global_namespace.
10091 Otherwise, always expect a declaration context.
10092 (build_qualified_name): Likewise.
10093 Make sure we don't write beyond typevec_size.
10094 (build_decl_overload_real): Likewise.
10095 Allocate one extra slot for the namespace.
10096 (hack_identifier): Mark code dead.
10097 Process OVERLOAD and NAMESPACE_DECL nodes.
10098 * parse.y (program): Pop namespaces until in global namespace.
10099 (extdef): In a using-declaration, don't discard the identifier if
10100 there is no declaration.
10101 (left_curly): Ignore type contexts which are namespaces.
10102 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10103 used as scope.
10104 * pt.c (template_class_depth): Expect types to be namespaces.
10105 (determine_specialization): Simplify by expecting OVERLOAD nodes.
10106 (push_template_decl): Push into namespace level.
10107 Reset ctx if it is a namespace.
10108 Set DECL_CONTEXT to current_namespace if not set already.
10109 Ignore real contexts that are namespaces.
10110 (mangle_class_name_for_template): Skip global_namespace.
10111 Mangle other namespaces as declarations.
10112 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10113 (lookup_template_class): Push into namespace of context.
10114 If the context is a namespace, set it to global_namespace.
10115 Use id_context for mangling.
10116 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10117 (tsubst_friend_function): Ignore namespace contexts.
10118 Push into namespace level.
10119 (tsubst): Handle NAMESPACE_DECL nodes.
10120 Remove DECL_CHAIN processing.
10121 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10122 * ptree.c (print_lang_identifier): Print bindings.
10123 (lang_print_xnode): Print OVERLOAD nodes.
10124 * rtti.c (init_rtti_processing): Push type_info into std.
10125 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10126 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10127 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10128 lookup_fnfields_here): Likewise.
10129 Process all nodes, instead of going through TREE_CHAIN.
10130 * sig.c (build_signature_pointer_or_reference_type): Set context
10131 to global_namespace.
10132 (build_signature_table_constructor): Expect OVERLOAD nodes.
10133 * spew.c (yylex): Save old setting of looking_for_typename.
10134 * tree.c (decl_list_length): Remove.
10135 (binding_init): New function.
10136 (count_functions): Rewrite.
10137 (is_overloaded_fn): Expect OVERLOAD nodes.
10138 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10139 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10140 ovl_member): New functions.
10141 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10142 (type_unknown_p): Likewise.
10143 (require_instantiated_type): Likewise.
10144 (build_component_ref): Declare code dead.
10145 (build_x_function_call): Create and expect OVERLOAD nodes.
10146 (build_function_call_real): Check for ::main only.
10147 (build_unary_op): Likewise. Expect OVERLOAD nodes.
10148 (convert_for_assignment): Check for TREE_LIST before accessing
10149 TREE_VALUE.
10150 * decl.c (duplicate_decls): Check for namespace bindings instead
10151 of global bindings.
10152 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10153 lookup_name_current_level, start_decl, xref_tag,
10154 finish_enum): Likewise.
10155 * init.c (build_offset_ref): Likewise.
10156 * search.c (lookup_field): Likewise.
10157 (lookup_fnfields): Likewise.
10158 (dfs_debug_mark): Likewise.
10159 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10160 (poplevel_class, pop_from_top_level): Likewise.
10161 * decl2.c (finish_method): Likewise.
10162 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10163 * decl.c (record_builtin_type): Likewise.
10164 (init_decl_processing, grokfndecl): Likewise.
10165 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10166 (make_lang_type): Likewise.
10167 * parse.y (make_thunk): Likewise.
10168 * pt.c (tsubst): Likewise.
10169 * tree.c (debug_binfo): Likewise.
10170 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10171 tinfo2.cc, inc/new.h: Add std qualifications.
10172 * inc/new: Wrap with namespace std if __HONOR_STD.
10173 * inc/typeinfo: Likewise.
10174
10175 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10176
10177 * call.c (build_user_type_conversion_1): Handle second_conv
10178 properly for templates.
10179
10180 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
10181
10182 * method.c (build_decl_overload_real): Set TREE_USED flag to
10183 zero for build_type_variants nodes as well.
10184
10185 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
10186
10187 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10188
10189 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
10190
10191 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10192 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10193 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10194 xref.o): Add toplev.h dependencies.
10195
10196 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
10197
10198 * errfn.c (cp_error, cp_warning): Remove declarations for
10199 error and warning respectively.
10200
10201 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10202
10203 * error.c: Convert to using ctype macros defined in system.h.
10204 * method.c: Likewise.
10205 * xref.c: Likewise.
10206 * lex.c: Likewise. Also remove redundant system header stuff.
10207
10208 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
10209
10210 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10211 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10212 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10213 xref.c: Add include of toplev.h.
10214
10215 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10216
10217 * tree.c (perm_manip): Also regenerate the RTL of an extern.
10218 (copy_to_permanent): Use end_temporary_allocation.
10219
10220 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
10221
10222 * init.c (expand_vec_init): The initialization of each array
10223 element is a full-expression.
10224
10225 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
10226
10227 * method.c (build_mangled_name): Add a call to build_type_variant
10228 to get the right type.
10229
10230 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
10231
10232 * Makefile.in: Add .SUFFIXES.
10233
10234 * cp-tree.def: Remove NAMESPACE_DECL.
10235
10236 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
10237
10238 * call.c (build_over_call): Do evaluate arg even if it has empty
10239 class type.
10240 * decl.c (start_function): Don't push a member function.
10241
10242 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
10243
10244 * Makefile.in (g++FAQ.info): Put -o option before input file.
10245
10246 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
10247
10248 * gxxint.texi: Add info for squangling codes K and B.
10249
10250 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
10251
10252 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10253 the expression in templates.
10254 (finish_stmt_expr): Likewise.
10255
10256 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
10257
10258 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10259
10260 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
10261
10262 * decl.c (maybe_push_to_top_level): Always clear
10263 current_template_parms and processing_template_decl.
10264 (pushtag): Remove check of current_class_type and some comments,
10265 since maybe_push_to_top_level no longer creates confusion.
10266
10267 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
10268
10269 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10270 (DECL_CLASS_TEMPLATE_P): Likewise.
10271 (DECL_PRIMARY_TEMPLATE): Likewise.
10272 (PRIMARY_TEMPLATE_P): Use it.
10273 (push_template_decl_real): New function.
10274 (redeclare_class_template): Take new template parameters as
10275 input.
10276 (is_specialization_of): New function.
10277 (comp_template_args): Declare.
10278 * decl.c (pushtag): Handle friend template classes.
10279 (xref_tag): Likewise. Use new calling convention for
10280 redeclare_class_template.
10281 * decl2.c (grok_x_components): Handle friend templates.
10282 * friend.c (is_friend): Use is_specialization_of where
10283 appropriate. Deal with friend class templates.
10284 (make_friend_class): Let a class template be friends with itself.
10285 * pt.c (comp_template_args): Remove declaration.
10286 (tsubst_friend_class): New function.
10287 (push_template_decl_real): New function.
10288 (push_template_decl): Use it.
10289 (redeclare_class_template): Adjust for new calling convention.
10290 (comp_template_args): Give it external linkage.
10291 (instantiate_class_type): Use tsubst_friend_class to deal
10292 with friend templates.
10293 * typeck.c (comptypes): Use comp_template_args, rather than
10294 expanding it inline.
10295 * parse.y (component_decl): Handle a nested template type
10296 like other component type declarations.
10297
10298 * pt.c (check_explicit_specialization): Handle overloaded
10299 constructors correctly.
10300
10301 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10302 (lookup_template_class): Use it.
10303
10304 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10305
10306 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
10307 * cp-tree.h: Add WRAPPER support.
10308 * call.c (add_candidate): Split out from add_*_candidate fns.
10309 (build_over_call): Take the candidate instead of function and args.
10310 Enforce access control here. Emit overload warnings here.
10311 (add_warning): New fn.
10312 (joust): Add WARN parm. If not set, call add_warning instead of
10313 printing a warning. Re-enable some warnings.
10314 (tourney): Pass it.
10315 (convert_like): Adjust.
10316 (build_new_op): Adjust.
10317 (build_new_function_call): Adjust.
10318 (build_user_type_conversion_1): Adjust.
10319 (USER_CONV_FN): Adjust.
10320 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10321 build_int_wrapper): New fns.
10322
10323 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
10324
10325 * pt.c (unify): Fix typo in previous change.
10326
10327 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10328
10329 * error.c (dump_type_real): Declare canonical_name.
10330
10331 * typeck.c (comp_target_types): Fix PMFs.
10332
10333 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
10334
10335 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10336 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10337 TEMPLATE_DECL.
10338
10339 * pt.c (tsubst): Decrease the template-level of
10340 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
10341 TEMPLATE_PARM_INDEX.
10342 (template_decl_level): New function.
10343 (unify): Make sure to record unifications for template
10344 parameters, even when the parameters exactly match the arguments.
10345 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10346 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
10347 aren't from the level we're currently working on.
10348
10349 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
10350
10351 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10352
10353 * decl2.c (check_member_template): Set DECL_IGNORED for member
10354 class templates, too.
10355
10356 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10357
10358 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10359
10360 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10361
10362 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
10363
10364 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10365 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10366 (init_decl_processing): Handle TI types.
10367 * typeck.c (unsigned_type, signed_type): Handle TI types.
10368
10369 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
10370
10371 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10372 New local added_libraries. Increment count when add library to
10373 arglist.
10374
10375 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
10376
10377 * cp-tree.h (type_as_string_real): New function.
10378 * pt.c (mangle_class_name_for_template): Use it.
10379 * error.c (dump_aggr_type): Change prototype.
10380 (dump_type_prefix): Likewise.
10381 (dump_type_suffix): Likewise.
10382 (dump_type_real): Convert from dump_type. If desired, the
10383 "canonica" name of a typedef, i.e., the name of the underlying
10384 type, can be printed.
10385 (dump_type): Call dump_type_real.
10386
10387 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
10388
10389 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10390
10391 * typeck.c (comp_target_types): Tweak pedantic case.
10392 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
10393 Return -1 or 1 instead of 1 or 2.
10394 (compparms): Remove STRICT handling.
10395 (convert_for_assignment): Fix handling of pmfs.
10396
10397 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
10398
10399 * typeck.c (comp_target_types): Handle references like pointers.
10400 (comp_target_parms): Note that return code from comp_target_types
10401 can be negative to indicate failure.
10402
10403 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10404
10405 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10406 which requires a working target compiler to build.
10407
10408 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
10409
10410 * tree.c (avoid_overlap): Add prototype.
10411
10412 * spew.c (num_tokens): Add prototype.
10413 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10414
10415 * search.c (dfs_check_overlap): Add prototype.
10416 (dfs_no_overlap_yet): Likewise.
10417
10418 * pt.c (original_template): Add prototype.
10419 (inline_needs_template_parms): Likewise.
10420 (push_inline_template_parms_recursive): Likewise.
10421 (retrieve_specialization, register_specialization): Likewise.
10422 (print_candidates, reduce_template_parm_level): Likewise.
10423 (build_template_decl, mark_template_parm): Likewise.
10424 (tsubst_friend_function, get_bindings_real): Likewise.
10425
10426 * method.c (start_squangling): Add prototype.
10427 (end_squangling, check_ktype, issue_ktype): Likewise.
10428 (build_overloaded_scope_ref, check_btype): Likewise.
10429 (build_mangled_template_parm_index): Likewise.
10430
10431 * lex.c (init_cpp_parse): Add prototype.
10432 (handle_cp_pragma, handle_sysv_pragma): Likewise.
10433 (reduce_cmp, token_cmp): Likewise.
10434
10435 * except.c (call_eh_info): Add prototype.
10436 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10437 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10438
10439 * decl2.c (is_namespace_ancestor): Add prototype.
10440 (namespace_ancestor, add_using_namespace): Likewise.
10441 (ambiguous_decl): Likewise.
10442
10443 * decl.c (indent): Add prototype.
10444
10445 * call.c (add_template_candidate_real): Add prototype.
10446
10447 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10448
10449 * decl2.c (build_expr_from_tree): Just return a PMF.
10450
10451 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
10452
10453 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10454 when doing initializations.
10455
10456 * pt.c (unify): Use comptypes to compare type args.
10457
10458 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
10459
10460 * decl.c (duplicate_decls): Fix check for when it's safe to free
10461 the new decl.
10462
10463 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10464 to type_as_string.
10465
10466 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
10467
10468 * pt.c (build_template_parm_index): Add prototype.
10469
10470 * search.c (my_tree_cons): Don't clear words outside the
10471 newly allocated node.
10472
10473 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
10474
10475 * lex.c (init_parse): Now returns char* containing the filename.
10476
10477 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
10478 Jeff Law <law@cygnus.com>
10479
10480 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10481 than a pointer.
10482
10483 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10484
10485 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10486
10487 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10488
10489 * decl.c (duplicate_decls): Don't warn for redundant decls if
10490 friend: let add_friend take care of it.
10491
10492 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10493
10494 * sig.c (build_signature_pointer_constructor): Don't set
10495 TREE_HAS_CONSTRUCTOR for a signature pointer.
10496 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10497 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10498 here, too.
10499 * typeck.c (build_unary_op): Only allow taking the address of a
10500 real constructor.
10501 * typeck2.c (digest_init): Simplify.
10502 (store_init_value): Don't pedwarn about using { } for pmfs.
10503
10504 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
10505
10506 * cp-tree.h (start_decl): Update prototype.
10507 * decl.c (start_decl): Like the C version, new parameters
10508 for the attributes. Call cplus_decl_attributes here,
10509 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
10510 (grokdeclarator): Pass NULL for new start_decl arguments.
10511 * pt.c (tsubst_expr): Likewise.
10512 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
10513 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10514 * lex.c (build_lang_decl): Add lang_name_java.
10515 * class.c (push_lang_context): Add lang_name_java.
10516 * method.c (build_mangled_name): Check for is_java_type.
10517
10518 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10519
10520 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10521 * call.c (build_scoped_method_call): Check for TREE_CODE for
10522 VOID_TYPE instead of type == void_type_node.
10523 (build_method_call): Likewise.
10524 * decl.c (lookup_name_real): Likewise.
10525 (grokdeclarator): Likewise.
10526 (start_decl): Likewise.
10527 (grokparms): Likewise.
10528 (start_function): Likewise.
10529 (finish_function): Likewise.
10530 (start_method): Likewise.
10531
10532 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
10533
10534 * lex.c (finput): New variable.
10535 (init_cpp_parse): Renamed from init_parse.
10536 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
10537 (finish_parse): New function.
10538 * cp-tree.h (init_lex, init_parse): Remove declarations.
10539
10540 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
10541
10542 * call.c (build_call): Still evaluate the actual argument.
10543 * class.c (is_empty_class): Update for -fnew-abi.
10544
10545 * decl2.c: -fnew-abi implies -fsquangle.
10546
10547 * method.c (do_build_assign_ref): Don't do anything to copy
10548 an empty class.
10549 (do_build_copy_constructor): Likewise.
10550 * call.c (build_over_call): Likewise.
10551
10552 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10553
10554 * tree.c (avoid_overlap): Return a value.
10555
10556 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
10557
10558 * method.c (check_btype): Add missing argument to xrealloc.
10559 (check_ktype): Likewise.
10560
10561 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10562
10563 Implement empty base optimization.
10564 * class.c (finish_struct_1): Add vbase fields earlier. Set
10565 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
10566 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10567 (types_overlap_p): New fn.
10568 * tree.c (avoid_overlap): New fn.
10569 (build_base_fields): Use it to avoid overlapping empty bases.
10570 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10571
10572 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10573
10574 Re-implement allocation of base class subobjects.
10575 * tree.c (unshare_base_binfos): New fn.
10576 (layout_basetypes): Use it. Now handles offsets of both virtual and
10577 non-virtual bases, after layout_type.
10578 (layout_vbasetypes): Remove.
10579 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10580 (build_vbase_pointer_fields): Split out from old layout_basetypes.
10581 * class.c (finish_base_struct): Lose offset handling code.
10582 Move nonvdtor warning here. Don't mess with t_binfo anymore.
10583 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
10584 * cp-tree.h: Adjust.
10585
10586 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
10587
10588 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10589 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10590 * class.c (duplicate_tag_error): Likewise.
10591 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10592 * tree.c (layout_vbasetypes): Update from layout_record, remove
10593 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10594 (layout_basetypes): Likewise.
10595
10596 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
10597
10598 * class.c, Make sure system.h is included just after config.h.
10599 Delete lingering stdio and errno references too.
10600 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10601
10602 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
10603
10604 * friend.c (is_friend): Fix access control for local classes.
10605
10606 * class.c (is_empty_class): New fn.
10607 * call.c (build_call): Don't pass empty class objects to a function.
10608
10609 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
10610
10611 * call.c (build_over_call): Do name resolution for default
10612 arguments of function templates in the scope of the templates.
10613
10614 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
10615
10616 * call.c: Include system.h. Remove includes, declarations and
10617 defines provided by system.h.
10618 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10619 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10620 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10621 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10622 * typeck2.c, xref.c: Likewise.
10623 * Makefile.in: Dependencies updated as appropriate.
10624 * Make-lang.in: Likewise.
10625
10626 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
10627
10628 * pt.c (fn_type_unification): Allow incomplete unification without
10629 an immediate error message.
10630
10631 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10632
10633 * tree.c (member_p): New fn.
10634 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10635 initializing class members.
10636
10637 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10638 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10639
10640 * call.c (build_method_call): Handle non-scoped destructors, too.
10641 * pt.c (tsubst_copy): Likewise.
10642
10643 * pt.c (print_template_context): Split out...
10644 (push_tinst_level): ...from here.
10645
10646 * friend.c (is_friend): Don't pass a type to decl_function_context.
10647
10648 * typeck.c (convert_for_initialization): Always hand off
10649 conversions to class type.
10650
10651 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10652
10653 * friend.c (is_friend): Local classes have the same access as the
10654 enclosing function.
10655
10656 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
10657
10658 * typeck.c (expand_target_expr): Delete dead function.
10659
10660 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10661
10662 * repo.c (save_string): Delete dead function.
10663
10664 * method.c (thunk_printable_name): Delete dead function.
10665
10666 * lex.c (yynextch): Delete dead function.
10667
10668 * expr.c (tree_extract_aggr_init): #if 0 out.
10669
10670 * except.c (do_unwind): Delete dead function.
10671 (easy_expand_asm): Likewise.
10672
10673 * cvt.c (build_conversion_type_1): Delete dead function.
10674
10675 * cp-tree.h (push_expression_obstack): Declare.
10676
10677 * call.c (source_type): #if 0 out.
10678
10679 * class.c (alter_access): Remove unused label. Add braces
10680 around empty else clause.
10681
10682 * lex.c (yyprint): Fix argument to printf.
10683
10684 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
10685
10686 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10687
10688 * pt.c (instantiate_class_template): Make sure template
10689 arguments are permanent.
10690 * init.c (resolve_offset_ref): Don't go looking around in
10691 template types.
10692
10693 * semantics.c: Add routines to handle expressions, and some
10694 declaration processing.
10695 * parse.y: Use them.
10696 (current_class_depth): Move declaration to cp-tree.h.
10697 * parse.c: Regenerated.
10698 * cp-tree.h: Use them.
10699 (current_class_depth): Declare.
10700 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10701
10702 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
10703
10704 * error.c (dump_decl): Be a bit more explicit with template
10705 type arguments, when verbose.
10706
10707 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10708
10709 * inc/exception: Reorder closing braces.
10710
10711 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
10712
10713 * pt.c (redeclare_class_template): New function.
10714 * cp_tree.h (redeclare_class_template): Declare it.
10715 * decl.c (xref_tag): Use it.
10716
10717 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
10718
10719 * call.c (build_over_call): Check IS_AGGR_TYPE, not
10720 TYPE_LANG_SPECIFIC.
10721 * typeck.c (convert_arguments): Likewise.
10722
10723 * decl.c (grokdeclarator): Remove const and volatile from type after
10724 setting constp and volatilep.
10725
10726 * class.c (finish_struct_1): Don't warn about bool bitfield larger
10727 than one bit.
10728
10729 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
10730
10731 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10732
10733 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
10734
10735 * call.c (build_object_call): Complain about ambiguous operator(),
10736 rather that crashing.
10737 (build_new_op): Likewise.
10738 (build_op_delete_call): Likewise.
10739
10740 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
10741
10742 * cvt.c (perform_qualification_conversions): Use comp_target_types
10743 instead of comp_ptr_ttypes.
10744
10745 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
10746
10747 * cp-tree.h (enforce_access): Declare.
10748 * call.c (enforce_access): Make it extern, not static.
10749 * class.c (alter_access): Use enforce_access; modify code for ISO
10750 compliance, rather than ARM rules.
10751
10752 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10753
10754 * cp-tree.h: Fix typo.
10755
10756 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10757
10758 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10759 if (aggregate_value_p (type)).
10760
10761 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10762
10763 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
10764
10765 * tree.c (mapcar): When dealing with a DECL, use it's constant
10766 value, if any.
10767 * pt.c (lookup_template_class): Don't mangle the names of template
10768 classes whose arguments are unknown.
10769
10770 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10771
10772 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10773
10774 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10775
10776 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
10777
10778 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10779 boolean_type_node to 1.
10780
10781 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
10782
10783 * error.c (dump_expr): Remove unused variable `l'.
10784
10785 * pt.c (for_each_template_parm): New function, created by
10786 converting uses_template_parms.
10787 (tree_fn_t): New typedef.
10788 (uses_template_parms): Use it.
10789 (mark_template_parm): New function.
10790 (push_template_decl): Check that the argument list of a partial
10791 specialization uses all the template parameters.
10792
10793 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10794 with it; we might want it for debugging.
10795 * cp-tree.h (type_unification): Change interface.
10796 * class.c (finish_struct_1): Skip nested template types, just like
10797 ordinary nested types.
10798 (instantiate_type): Use new interface to type_unification.
10799 * lex.c (init_lex): Add __sz as opname for sizeof.
10800 * method.c (build_overload_scope_ref): New function.
10801 (build_overload_int): Handle complex expressions. Set
10802 numeric_output_need_bar if necessary.
10803 (build_overload_value): Handle non-PARM_DECL nodes; this
10804 routine is now used by build_overload_int. Remove some
10805 assignments to numeric_output_need_bar. Use
10806 build_overload_scope_ref.
10807 (build_qualified_name): Note that some template mangled names end
10808 with digits, and set numeric_output_need_bar appropriately. Use
10809 build_underscore_int.
10810 * pt.c (unify): Change interface.
10811 (type_unification_real): Likewise.
10812 (determine_specialization): Use new interfaces.
10813 (tsubst): Deal gracefully with situations in which the argument
10814 vector is not fully filled.
10815 (fn_type_unification): Use new interfaces.
10816 (type_unification): Likewise. Remove NOP_EXPR hack.
10817 (type_unification_real): Likewise.
10818 (unify): Likewise. Deal with unification of complex expressions.
10819
10820 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10821
10822 * pt.c (complete_template_args): Initialize skip properly.
10823
10824 * decl.c (make_typename_type): Revert.
10825 (make_implicit_typename): Remove.
10826 (lookup_name_real): Don't call it. Call lookup_field if we see a
10827 TYPE_DECL from a template base.
10828 * search.c (lookup_field): Do implicit typename stuff.
10829
10830 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
10831 Geoff Noer <noer@cygnus.com>
10832
10833 * Makefile.in: Various fixes for building cygwin32 native toolchains.
10834 * Make-lang.in: Likewise.
10835
10836 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10837
10838 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10839
10840 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
10841
10842 * decl.c (make_implicit_typename): Rewrite removed code.
10843 (make_typename_type): Call it if the type we look up comes from
10844 a base that uses template parms.
10845
10846 * pt.c (complete_template_args): Rewrite.
10847 (tsubst, FUNCTION_DECL): Use it.
10848
10849 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
10850
10851 * semantics.c (finish_asm_stmt): Fix combine strings. Call
10852 c_expand_asm_operands () if output_operands, input_operands or
10853 clobbers is not NULL_TREE.
10854
10855 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10856
10857 * pt.c (complete_template_args): New function.
10858 (get_bindings): Deal with specializations of function templates
10859 with return type containing parameters from outer class
10860 templates.
10861 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10862 substitute arguments and compose a new type.
10863
10864 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
10865
10866 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10867 FUNCTION_DECLs.
10868
10869 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10870
10871 * decl.c (make_implicit_typename): Lose useless code.
10872
10873 * call.c (standard_conversion): Handle A* -> const A* properly.
10874
10875 * pt.c (get_bindings_real): Rename from get_bindings. Add
10876 check_rettype parm.
10877 (get_bindings): Pass 1.
10878 (get_bindings_overload): Pass 0.
10879
10880 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
10881
10882 * pt.c (check_explicit_specialization): When reverting a static
10883 member function, also remove the `this' parameter from
10884 last_function_parms.
10885
10886 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10887
10888 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10889 a function context.
10890
10891 * decl.c (store_bindings): Use free_binding_vecs.
10892 (pop_from_top_level): Likewise.
10893
10894 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10895
10896 * decl.c (make_implicit_typename): Only change the type of a
10897 TYPENAME_TYPE.
10898
10899 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
10900
10901 * semantics.c: New file, containing routines to perform the
10902 semantic phase of parsing.
10903 * parse.y: Use it.
10904 * pt.c (tsubst_expr): Likewise.
10905 * cp-tree.h: Declare the various functions in semantics.c.
10906 Provide macros to access _STMT tree nodes.
10907 * cp-tree.def: Add ASM_STMT tree node.
10908 * Makefile.in, Make-lang.in: Add dependencies on and for
10909 semantics.c.
10910
10911 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
10912
10913 * pt.c (push_template_decl): Only check primary templates.
10914
10915 * pt.c (check_explicit_specialization): Complain about default args
10916 in explicit specialization.
10917
10918 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10919 constructor_declarator.
10920
10921 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
10922
10923 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10924 has no overloaded operator ->.
10925
10926 * call.c (build_field_call): Don't crash when presented with a
10927 field that is actually a nested type.
10928
10929 * decl.c (pushtag): Deal with friend class injection in local
10930 classes.
10931
10932 * call.c (build_object_call): Don't crash if OBJ is a
10933 pointer-to-member-function.
10934
10935 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10936
10937 * pt.c (push_template_decl): Complain about template with C linkage,
10938 anonymous template class.
10939
10940 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10941
10942 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10943 * search.c: Likewise.
10944
10945 * lex.c (do_pending_defargs): Only call
10946 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10947
10948 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10949
10950 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
10951
10952 * parse.y: Deal with CONSTRUCTORS in new_initializers.
10953
10954 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
10955
10956 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10957 closely mimics the behavior in parse.y.
10958 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10959 into a compound statement.
10960
10961 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10962
10963 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10964 * pt.c (inline_needs_template_parms): New fn.
10965 (original_template): New fn.
10966 (push_inline_template_parms_recursive): New fn.
10967 (maybe_begin_member_template_processing): Use them.
10968 (maybe_end_member_template_processing): Likewise.
10969 (is_member_or_friend_template): Rename to is_member_template.
10970 Member functions of local classes are never member templates.
10971
10972 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10973
10974 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10975 added in the class scope to catch redefinition error.
10976
10977 * pt.c (reduce_template_parm_level): Also copy
10978 the DECL_TEMPLATE_PARMS field.
10979
10980 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
10981
10982 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10983 reduced-level template type parameter.
10984
10985 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
10986
10987 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10988 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10989 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10990 * decl.c (duplicate_decls): Propagate it.
10991 * typeck2.c (abstract_virtuals_error): Use two loops to emit
10992 abstract virtual functions and virtual functions which need a
10993 final overrider separately.
10994
10995 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
10996
10997 * lang-specs.h: Properly put brackets around array elements in
10998 initializer.
10999
11000 * typeck.c (build_binary_op_nodefault): Correctly place parens around
11001 && and || in expression.
11002
11003 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
11004
11005 * call.c (default_parm_conversions): Remove prototype definition.
11006 (build_method_call): Remove unused variable result.
11007
11008 * cvt.c (ocp_convert): Remove unused variable conversion.
11009
11010 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11011
11012 * except.c (do_unwind): #if 0 definition of unused variables fcall
11013 and next_pc.
11014
11015 * expr.c (extract_scalar_init): #if 0 prototype and function
11016 definition.
11017
11018 * init.c (expand_aggr_init_1): Remove unused variable init_type.
11019 (build_new_1): Remove unused variable t.
11020
11021 * pt.c (instantiate_class_template): Remove unused variable newtag;
11022 cast called function return value to void.
11023 (do_decl_instantiation): Remove unused variables name and fn.
11024
11025 * tree.c (get_type_decl): Add default return to shut up compiler from
11026 complaining control reaches end of non-void function.
11027
11028 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11029
11030 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
11031
11032 * call.c (default_parm_conversions): Remove prototype definition.
11033 (build_method_call): Remove unused variable result.
11034 (build_over_call): Add default case in enumeration switch.
11035
11036 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
11037
11038 * decl2.c (lang_decode_option): Change j's type to size_t.
11039
11040 * tree.c (layout_vbasetypes): record_align and desired_align are of
11041 type unsigned int; const_size and nonvirtual_const_size likewise.
11042
11043 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
11044
11045 * parse.y (new_initializer): Make sure all initializers are
11046 lists.
11047
11048 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
11049
11050 * decl2.c (import_export_decl): Mark tinfo functions for
11051 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11052
11053 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
11054
11055 * method.c: Fix typo.
11056
11057 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11058
11059 * method.c: Include "system.h" to get stdlib.h, stdio.h,
11060 ctype.h, string.h, etc.
11061 (issue_nrepeats): Add default case in enumeration switch.
11062 (check_btype): Likewise.
11063 (process_overload_item): Likewise.
11064
11065 * Makefile.in (method.o): Depend on system.h.
11066
11067 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11068
11069 * lex.c (do_scoped_id): Fix parenthesizing.
11070
11071 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
11072
11073 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11074 FLAG_RTTI is unset, initialize type info machinery and continue
11075 with FLAG_RTTI enabled.
11076 (get_typeid): Likewise.
11077
11078 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
11079
11080 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11081 from B.
11082
11083 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
11084
11085 * pt.c (finish_member_template_decl): Deal more gracefully with
11086 invalid declarations.
11087
11088 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
11089
11090 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11091 cp-tree.h: Clean up more old overloading code, old RTTI code, and
11092 some formatting quirks.
11093
11094 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11095 method.c, pt.c, ptree.c, typeck.c: Remove support for
11096 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11097 * class.h: Remove.
11098 * Makefile.in: Adjust.
11099
11100 * pt.c (unify): Don't allow reduced cv-quals when strict.
11101
11102 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11103 *type_unification* and unify.
11104
11105 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
11106
11107 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11108 (nested_name_specifier): And add it before this use.
11109 (typename_sub0): And this use. Also add use without the keyword.
11110 (typename_sub1): Likewise.
11111 * pt.c (instantiate_class_template): Don't actually instantiate
11112 anything if our type uses template parms.
11113
11114 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
11115
11116 * decl.c (start_function): Don't call temporary_allocation for a
11117 nested function.
11118
11119 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11120
11121 * pt.c (instantiate_class_template): Don't mess with friends if
11122 our type uses template parms.
11123
11124 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
11125
11126 * parse.y (nested_name_specifier): Use explicit_template_type.
11127 (typename_sub): Allow a template_type, an explicit_template_type,
11128 or an implicit template type at the end.
11129 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11130 * decl.c (make_typename_type): Handle template-id where the name
11131 is a TEMPLATE_DECL.
11132 * call.c (build_scoped_method_call): Handle member template
11133 destructor call.
11134 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11135 destructor is represented by the type.
11136
11137 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11138 * parse.y (nested_name_specifier): Add 'template' case.
11139 (explicit_template_type): New rule.
11140 (typename_sub): Use it.
11141 * decl.c (make_typename_type): Handle getting a template-id for NAME.
11142 * pt.c (tsubst): Likewise.
11143
11144 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
11145
11146 * pt.c (add_to_template_args): Fix thinko.
11147 (instantiate_class_template): Call it later.
11148
11149 * pt.c (get_class_bindings): Add outer_args parm.
11150 (most_specialized_class): Likewise.
11151 (instantiate_class_template): Pass it.
11152 (more_specialized_class): Likewise.
11153 (lookup_template_class): Get context from template if none
11154 was specified.
11155 (finish_member_template_decl): Don't do anything with a
11156 partial specialization.
11157 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11158 AGGREGATE_TYPE_P.
11159 * class.c (finish_struct): Member class templates have already been
11160 checked for name clashes.
11161 * decl.c (pushdecl_with_scope): Handle pushing at class level.
11162
11163 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
11164
11165 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11166 (tsubst, *_PARM): Support multiple levels of template classes.
11167 (instantiate_class_template): Look up the pattern from the
11168 original template.
11169 (lookup_template_class): Handle getting a template for d1.
11170 (push_template_decl): Correct setting of 'primary'.
11171 (reduce_template_parm_level): Add 'levels' parm.
11172 (finish_member_template_decl): Support member class templates.
11173 (template_class_depth): Handle multiple levels.
11174 * parse.y (component_decl_1, fn.def2): Remove member template case.
11175 (component_decl): Add member template cases.
11176 * decl2.c (check_member_template): We now handle member template
11177 classes.
11178 * decl.c (pushtag): Handle member templates.
11179 * method.c (do_inline_function_hair): Don't touch
11180 IDENTIFIER_GLOBAL_VALUE.
11181 * init.c (build_offset_ref): If name isn't an identifier, just
11182 return it.
11183 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11184
11185 * typeck.c (get_delta_difference): Do adjust for conversions to
11186 and from virtual base.
11187
11188 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
11189
11190 * typeck.c (get_delta_difference): Give hard error for conversion
11191 from virtual base.
11192
11193 * cp-tree.h: Tweak formatting.
11194
11195 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
11196
11197 * decl.c (push_namespace): Handle redeclaration error.
11198
11199 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11200 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11201 (NAMESPACE_BINDING): New macro.
11202 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11203 * *.c: Use them.
11204
11205 * pt.c (push_template_decl): Use innermost_args.
11206
11207 * decl.c (get_unique_name): Tweak from earlier in the name.
11208
11209 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
11210
11211 * cp-tree.def: Add CPLUS_BINDING node.
11212 * cp-tree.h (tree_binding): New struct.
11213 (BINDING_SCOPE, BINDING_VALUE): New macros.
11214 (current_namespace, global_namespace): Declare extern.
11215 (struct lang_decl_flags): New field in_namespace.
11216 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11217 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11218 (TREE_INDIRECT_USING): New macro.
11219 * decl2.c (current_namespace, global_namespace): Declare. The
11220 value is a NAMESPACE_DECL now, not a TREE_LIST.
11221 (is_namespace_ancestor, namespace_ancestor): New static functions.
11222 (add_using_namespace, ambiguous_decl): Likewise.
11223 (lookup_using_namespace): New support function for lookup_name.
11224 (qualified_lookup_using_namespace): New support function for
11225 do_scoped_id and lookup_namespace_name.
11226 (get_namespace_id): Mark as obsolete.
11227 (current_namespace_id): Likewise.
11228 (do_namespace_alias): Implement.
11229 (do_using_directive): Implement as call to add_using_namespace.
11230 * decl.c (binding_for_name): New function.
11231 (push_namespace, pop_namespace): Implement.
11232 (push_decl): Don't install a FUNCTION_DECL in the global branch.
11233 (lookup_namespace_name): Implement using qualified lookup.
11234 (lookup_name_real): For global scoping, lookup in
11235 global_namespace. For namespace scoping, lookup in given
11236 namespace. For unscoped lookup, iterate over namespace,
11237 considering using directives.
11238 (init_decl_processing): Initialize global_namespace.
11239 (grokvardecl): Build assembler name as static name for globals.
11240 (grokdeclarator): Remove old namespace mangling.
11241 (xref_tag): When installing a global binding for the
11242 tag, make sure we have an identifier.
11243 * method.c (build_overload_nested_name): Mangle namespaces.
11244 (build_qualified_name): Likewise.
11245 (build_decl_overload_real): Likewise.
11246 * lex.c (build_lang_decl): Set namespace for new declaration to
11247 current_namespace.
11248 (do_scoped_id): Find global names in global or current
11249 namespace, or using qualified namespace lookup, depending on
11250 context.
11251 * init.c (build_member_call): When scope is namespace, use
11252 build_x_function_call instead.
11253 (build_offset_ref): When scope is namespace, collapse processing
11254 to lookup_namespace_name instead.
11255 * error.c (dump_decl): Support NAMESPACE_DECL.
11256 * decl.c (pushdecl): Bind globals to current namespace.
11257 (push_overloaded_decl): Likewise.
11258 (lookup_tag): Likewise.
11259 (lookup_name_current_level): Likewise.
11260 (xref_tag): Likewise.
11261 (start_function): Likewise.
11262 * lex.c (do_identifier): Likewise.
11263 (identifier_typedecl_value): Likewise.
11264 (real_yylex): Likewise.
11265 * method.c (do_inline_function_hair): Likewise.
11266 * parse.y (unscoped): Likewise.
11267 * pt.c (check_explicit_specialization): Likewise.
11268 (lookup_template_class): Likewise.
11269 * rtti.c (call_void_fn): Likewise.
11270 * sig.c (build_sigtable): Likewise.
11271 * ptree.c (lang_print_xnode): New function.
11272
11273 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
11274
11275 * pt.c (instantiate_class_template): Don't instantiate if pedantic
11276 and the args use template parms.
11277
11278 * pt.c (push_tinst_level): If the instantiation uses template parms,
11279 fail silently.
11280 * decl.c (xref_basetypes): Do call complete_type for basetypes
11281 that involve template parameters.
11282
11283 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
11284
11285 * typeck2.c (process_init_constructor): Fix labeled init check.
11286
11287 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
11288
11289 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11290 argument to tsubst and friends.
11291
11292 * pt.c (tsubst, FUNCTION_DECL): Tidy.
11293
11294 * typeck.c (build_x_function_call): Handle static member function
11295 templates like non-templates. Handle friend templates like normal
11296 function templates.
11297 * pt.c (tsubst, *_PARM): Don't use orig_level.
11298 (get_bindings): Don't call add_to_template_args.
11299 (instantiate_template): Likewise.
11300 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11301 * ptree.c (print_lang_type): Print index/level for template parms.
11302
11303 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
11304
11305 * Make-lang.in (cc1plus): Note that cc1plus depends on
11306 cp/cp-tree.h and cp/cp-tree.def.
11307
11308 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11309 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11310 position in a template parameter list.
11311 * cp-tree.h (template_parm_index): New structure, used as the tree
11312 structure for a TEMPLATE_PARM_INDEX.
11313 (TEMPLATE_PARM_IDX): New macro.
11314 (TEMPLATE_PARM_LEVEL): Likewise.
11315 (TEMPLATE_PARM_DESCENDANTS): Likewise.
11316 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11317 (TEMPLATE_PARM_DECL): Likewise.
11318 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11319 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11320 (TEMPLATE_TYPE_DECL): Likewise.
11321 (TEMPLATE_CONST_IDX): Remove.
11322 (TEMPLATE_CONST_LEVEL): Likewise.
11323 (TEMPLATE_CONST_SET_INFO): Likewise.
11324 (TEMPLATE_TYPE_SET_INFO): Likewise.
11325 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11326 node.
11327 (TEMPLATE_TYPE_LEVEL): Likewise.
11328 * decl.c (decls_match): Call comp_template_parms, rather than
11329 expanding it inline.
11330 (duplicate_decls): If two template declarations are being merged,
11331 then their TEMPLATE_INFOs should be merged as well.
11332 (grokfndecl): Save template-id information when declaring a friend
11333 with explicit template arguments. Pass arguments to
11334 check_explicit_specialization via correct convention; at some
11335 point check_explicit_specialization changed, but these call-sites
11336 did not.
11337 (grokdeclarator): Tidy up slightly.
11338 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
11339 two template functions with the same DECL_ASSEMBLER_NAME the same,
11340 since the names are not yet mangled.
11341 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11342 TEMPLATE_CONST_PARM.
11343 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
11344 decl for a non-type parameter, rather than printing `<tparm ...>'.
11345 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11346 (do_friend): Deal with template friends.
11347 * lex.c (do_pending_inlines): Call
11348 maybe_begin_member_template_processing, rather than
11349 conditionally calling begin_member_template_processing.
11350 (process_next_inline): Likewise. Call
11351 maybe_end_member_template_processing, rather than
11352 conditionally calling end_member_template_processing.
11353 (do_pending_defargs): Likewise.
11354 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11355 TEMPLATE_CONST_PARM.
11356 * method.c (build_mangled_template_parm_index): New function.
11357 (build_overload_value): Use it.
11358 (build_overload_name): Likewise.
11359 * pt.c (finish_member_template_decl): Allow friend declarations.
11360 (template_class_depth): New function.
11361 (is_member_template): Rename, and modify, to become...
11362 (is_member_or_friend_template): New function.
11363 (end_member_template_processing): Rename, and modify, to become...
11364 (maybe_end_member_template_processing).
11365 (build_template_parm_index): New function.
11366 (reduce_template_parm_level): New function.
11367 (process_template_parm): Modify to use build_template_parm_index.
11368 (push_template_decl): Deal with friend templates.
11369 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11370 TEMPLATE_CONST_PARM.
11371 (tsubst_friend_function): New function.
11372 (instantiate_class_template): Generate the DECL_FRIENDLIST
11373 for a new instantiation by using tsubst_friend_function rather
11374 than just tsubst.
11375 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11376 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11377 appropriate new macros. Use reduce_template_parm_level to
11378 generate lower-level template parameters. Handle tsubst'ing into
11379 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
11380 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11381 templates. Similarly for the template parameters for a new
11382 template.
11383 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
11384 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
11385 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11386 (get_bindings): Call add_to_template_args if necessary.
11387 (instantiate_decl): Handle instantiations of friend templates.
11388 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11389 TEMPLATE_TYPE_PARM as a list of fields; it's not!
11390 * spew.c (yylex): Do a little manual constant propagation to
11391 clarify the code.
11392
11393 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
11394
11395 * error.c: Include sys/types.h.
11396
11397 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
11398
11399 * method.c (build_mangled_name): Start CPP directives in column zero.
11400
11401 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
11402
11403 * typeck2.c (process_init_constructor): Sorry about non-trivial
11404 labeled initializers.
11405 * parse.y (initlist): Re-enable labeled initializers.
11406
11407 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11408
11409 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11410 all callers changed. Rely on the new parameter instead of arg
11411 being a TREE_LIST when determine whether we are working inside
11412 template template parameter. Clean up is_type test.
11413
11414 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
11415
11416 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11417 * typeck2.c (initializer_constant_valid_p): Allow conversions
11418 between pointers and references.
11419
11420 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
11421
11422 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11423 if pedantic || warn_pointer_arith.
11424
11425 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11426
11427 * pt.c (unify): Handle TEMPLATE_DECL.
11428
11429 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
11430
11431 * cp-tree.h (strip_attrs): Remove decl.
11432
11433 1998-02-18 Doug Evans <devans@cygnus.com>
11434
11435 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11436 Update olddecl's attributes too.
11437 (strip_attrs): Remove function.
11438 * typeck.c (common_type): Call merge_machine_type_attributes.
11439
11440 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
11441
11442 * parse.y (initdcl0_innards): New grammar symbol.
11443 (nomods_initdecls, nomods_initdcl0): Change type from itype to
11444 none, since the resulting value is never used.
11445 (parse_decl): New function.
11446 (datadef): Remove redundant actions.
11447 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11448 * parse.c: Regenerated.
11449
11450 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
11451
11452 * parse.y (simple_stmt): Use getdecls() to check for decl.
11453
11454 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
11455
11456 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11457 macros.
11458 (c++.install-common): Install c++filt properly as native or as cross
11459 variant.
11460 (c++.uninstall): Add c++filt.
11461
11462 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11463
11464 * call.c (standard_conversion): Fix multi-level ptr conversions.
11465
11466 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
11467
11468 * init.c (build_new): Propagate error_mark_node up.
11469
11470 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
11471
11472 * parse.y (simple_stmt): If the condition isn't a declaration,
11473 start the controlled block after the test.
11474
11475 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11476
11477 * call.c (build_over_call): Convert builtin abs, labs and fabs to
11478 tree-codes.
11479 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11480 builtins.
11481
11482 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11483
11484 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11485
11486 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
11487
11488 * cp-tree.h: Add access_protected_virtual_node.
11489 * class.c (init_class_processing): Initialize it.
11490 * decl.c (xref_basetypes): Use it.
11491 * parse.y (base_class_access_list): Likewise.
11492
11493 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11494 (c++.install-common): Install c++filt.
11495
11496 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11497
11498 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11499
11500 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
11501
11502 * call.c (reference_binding): Use comptypes when comparing
11503 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11504
11505 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
11506
11507 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11508 (really_overloaded_fn): Move check here from is_overloaded_fn.
11509 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11510
11511 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
11512
11513 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11514 conversions.
11515
11516 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
11517
11518 * cp-tree.h (push_template_decl): Return the decl passed in, or an
11519 equivalent duplicate.
11520 * decl.c (pushtag): Use the return value from push_template_decl.
11521 (duplicate_decls): When duplicating a template declaration, merge
11522 the DECL_TEMPLATE_RESULTs as well.
11523 (make_implicit_typename): Don't try to dive into typename types to
11524 find a context for making a new implicit typename.
11525 (start_decl): Use the return value from push_template_decl.
11526 (grokdeclarator): Complain about declarations list `const operator
11527 int'. Since we don't correctly handle in-class initializations of
11528 non-static data members, complain about this (now illegal)
11529 practice. Issue an error for initializations of non-const statics
11530 since that is illegal as well, and since we don't handle that case
11531 correctly either.
11532 (start_function): Use the return value from push_template_decl.
11533 (start_method): Likewise.
11534 * decl2.c (grokfield): Likewise. Since the change to
11535 grokdeclarator ensures that all initialized fields are in fact
11536 static, remove a redundant test for TREE_PUBLIC.
11537 * parse.y (initlist): Disable labeled initializers since they do
11538 not work as per the documentation, and since they do not use the
11539 same syntax as the C front end.
11540 * pt.c (push_template_decl): Return the decl passed in, or an
11541 equivalent duplicate.
11542 (lookup_template_class): When searching in a nested context,
11543 use the right arguments.
11544 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11545 * typeck.c (build_component_ref): Assign the correct type to the
11546 result of build_vfn_ref.
11547
11548 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
11549
11550 * pt.c (convert_nontype_argument): Fix typo.
11551 (check_explicit_specialization): Allow old-style specialization
11552 of class template members.
11553
11554 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
11555 Manfred Hollstein <manfred@s-direktnet.de>
11556
11557 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11558 when deciding to override DECL_ASSEMBLER_NAME.
11559
11560 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
11561
11562 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11563 * cp-tree.h (flag_do_squangling): Add declaration.
11564 * lang-options.h: Add -fsquangle and -fno-squangle.
11565 * method.c: Add macros and static variables for squangling.
11566 (build_overload_name): Rename to build_mangled_name, add logic for B
11567 compression, and split into process_modifiers and
11568 process_overload_item.
11569 (process_modifiers): New function, to handle constant, reference,
11570 and pointer types.
11571 (process_overload_item): New function, handles issue of type codes.
11572 (build_overload_name): New function, start squangling and call
11573 build_mangled_name.
11574 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11575 (start_squangling): New function to initialize squangling structs.
11576 (end_squangling): New function to destroy squangling structs.
11577 (nrepeats): Rename variable to Nrepeats.
11578 (issue_nrepeats): New function for issuing 'n' type repeats.
11579 (check_ktype): New function to check for type K name compression.
11580 (build_overload_nested_name): Add a check for K name compression.
11581 (build_qualified_name): Add a check for K name compression and don't
11582 use DECL_ASSEMBLER_NAME when squangling is on.
11583 (check_btype): New function, checks for B type compression.
11584 (build_static_name, build_decl_overload_real): Initiate squangling.
11585 (build_typename_overload, build_overload_with_type): Initiate
11586 squangling
11587
11588 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
11589
11590 * method.c (make_thunk): Avoid name buffer overflow.
11591
11592 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11593
11594 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11595 don't define them yet.
11596
11597 * parse.y (nomods_initdcl0): Add constructor_declarator case.
11598
11599 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11600
11601 * config-lang.in (diff_excludes): Use basename only.
11602
11603 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
11604
11605 * tinfo2.cc: Add tinfo for signed char.
11606
11607 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
11608
11609 * search.c (compute_access): Handle protected constructors in derived
11610 classes as accessible.
11611
11612 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
11613
11614 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11615 Call convert_from_reference sooner.
11616
11617 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
11618
11619 * cvt.c (ocp_convert): Obtain the constant values from constant
11620 decls even if the destination type is the same as the type of the
11621 decl.
11622
11623 * decl2.c (finish_file): Make sure that static inlines with
11624 definitions are not marked DECL_EXTERNAL before returning.
11625
11626 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11627
11628 * decl.c: Lose arg_looking_for_template.
11629 (lookup_name_real): Likewise.
11630 * parse.y: Lose processing_template_arg, template_arg1.
11631 (primary): Likewise.
11632 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11633
11634 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11635
11636 * error.c (dump_decl): Fix type of default arguments for template
11637 template parameters and nontype template parameters.
11638 * parse.y (template_parm): Handle invalid default template
11639 template arguments here.
11640
11641 * parse.y (template_parm): Use template_arg instead of PTYPENAME
11642 for default template template argument.
11643 * pt.c (coerce_template_parms): Merge default template argument
11644 codes. Can treat RECORD_TYPE as template name if it is implicitly
11645 created. Fix argument index in error message.
11646 * typeck.c (comptypes): Merge template argument comparison codes in
11647 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11648
11649 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
11650
11651 * lex.c (file_name_nondirectory): Also check for '/'.
11652
11653 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
11654
11655 * parse.y (primary): Deal with statement-expressions in
11656 templates.
11657 * pt.c (tsubst_copy): Handle BIND_EXPR.
11658 * tree.c (mapcar): Likewise.
11659
11660 * call.c (add_template_candidate_real): Pass extra parameter to
11661 fn_type_unification.
11662 * cp-tree.h (fn_type_unification): Add parameter.
11663 * pt.c (fn_type_unification): Add additional parameter to deal with
11664 static member functions.
11665 (get_bindings): Deal with static member functions.
11666
11667 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11668 (revert_static_member_fn): Declare.
11669 * decl.c (revert_static_member_fn): Remove declaration. Change
11670 linkage from internal to external.
11671 (cp_finish_decl): Deal with virtual functions in classes local to
11672 template functions.
11673 * decl2.c (finish_file): Don't forget to emit increment/decrement
11674 expressions in initializers for file-scope variables.
11675 * parse.y (typename_sub2): If the typename doesn't names a
11676 template, rather than a type, issue an error message.
11677 * pt.c (check_explicit_specialization): Handle specializations of
11678 static member functions.
11679 (coerce_template_parms): Handle offset references to lists of
11680 member functions.
11681 * search.c (note_debug_info_needed): Don't crash when handed a
11682 type which is being defined.
11683 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11684 that can happen with some illegal code.
11685
11686 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11687
11688 * call.c (user_harshness): Initialize `code' to 0.
11689 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11690 (null_ptr_cst_p): Add parentheses around && within ||.
11691 (standard_conversion): Likewise.
11692 (z_candidate): Likewise.
11693 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11694 (build_object_call): Likewise for `mem_args'.
11695 (build_new_op): Likewise for `mem_arglist'. Add `return' from
11696 default case in enumeration switch.
11697
11698 * class.c (build_vtable_entry): Add explicit braces to avoid
11699 ambiguous `else'.
11700 (build_class_init_list): Likewise.
11701 (finish_struct_1): Initialize `width' to 0.
11702 (instantiate_type): Initialize `name' to NULL_TREE. Add
11703 explicit braces to avoid ambiguous `else'.
11704
11705 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11706 `else'.
11707
11708 * decl.c (grok_reference_init): Eliminate unused parameter, all
11709 callers changed.
11710 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11711 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11712 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11713 (grokdeclarator): Add parentheses around && within ||. Add
11714 explicit braces to avoid ambiguous `else'.
11715 (grokparms): Initialize `type' to NULL_TREE.
11716 (xref_tag): Remove unused label `just_return'.
11717 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11718 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11719 (hack_incomplete_structures): Add parentheses around assignment
11720 used as truth value.
11721
11722 * decl2.c (coerce_delete_type): Hide definition of `e3'.
11723
11724 * error.c: Include <stdlib.h>.
11725 (dump_expr): Change the type of `i' to size_t. Remove unused
11726 label `error'.
11727
11728 * except.c (init_exception_processing): Remove unused variable `d'.
11729 (expand_throw): Likewise for `label'.
11730
11731 * friend.c (add_friends): Add explicit braces to avoid ambiguous
11732 `else'.
11733
11734 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11735 (sort_base_init): Likewise for `binfo'.
11736 (expand_member_init): Likewise for `rval'.
11737 (build_member_call): Add parentheses around assignment used as
11738 truth value.
11739 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11740 (build_new): Initialize `nelts' to NULL_TREE. Initialize
11741 `old_immediate_size_expand' to 0.
11742 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11743 (build_vec_delete_1): Remove unused variable `block'.
11744 (expand_vec_init): Initialize `itype' to NULL_TREE.
11745
11746 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
11747 declaration of `index' and `rindex' with autoconf macros.
11748 (reinit_parse_for_expr): Remove unused variables
11749 `look_for_semicolon' and `look_for_lbrac'.
11750 (cons_up_default_function): Initialize `args' to NULL_TREE.
11751 (readescape): Initialize `firstdig' to 0.
11752 (real_yylex): Add parentheses around assignment used as truth value.
11753
11754 * method.c: Include <strings.h> if we don't have <string.h>.
11755 Protect declaration of `index' with autoconf macro.
11756
11757 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11758 Initialize `type' to NULL_TREE.
11759 (structsp): Remove unused variable `id'.
11760
11761 * pt.c (coerce_template_parms): Add explicit braces to avoid
11762 ambiguous `else'.
11763 (lookup_template_class): Initialize `template' to NULL_TREE.
11764 (instantiate_class_template): Remove unused variable `name' and `e'.
11765 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
11766 (do_poplevel): Initialize `saved_warn_unused' to 0.
11767 (type_unification): Remove unused varable `parm'.
11768 (unify): Likewise for `j'.
11769
11770 * repo.c (init_repo): Add parentheses around assignment used as
11771 truth value.
11772 (finish_repo): Remove unused varable `p'.
11773
11774 * search.c (get_binfo): Initialize `type' to NULL_TREE.
11775 (get_base_distance): Likewise.
11776 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11777 and `new_v' to NULL_TREE.
11778 (lookup_fnfields): Likewise for `rval_binfo_h'.
11779 (breadth_first_search): Add parentheses around assignment used as
11780 truth value.
11781 (get_template_base): Initialize `type' to NULL_TREE.
11782
11783 * sig.c (append_signature_fields): Initialize `last_mfptr' to
11784 NULL_TREE.
11785 (build_signature_table_constructor): Likewise for
11786 `last_rhs_field', `pfn' and `vt_off'.
11787 (build_sigtable): Likewise for `init'.
11788
11789 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11790 (propagate_binfo_offsets): Likewise for `delta'.
11791 (hash_tree_cons): Initialize hashcode to 0.
11792 (can_free): Likewise for `size'.
11793 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11794
11795 * typeck.c (convert_sequence): Hide prototype.
11796 (common_type): Add explicit braces to avoid ambiguous `else'.
11797 (comp_target_types): Likewise.
11798 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11799 (build_function_call_real): Add explicit braces to avoid ambiguous
11800 `else'.
11801 (convert_arguments): Initialize `called_thing' to 0.
11802 (convert_for_initialization): Initialize `savew' and `savee' to 0.
11803
11804 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11805 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11806 (build_x_arrow): Likewise for `last_rval'.
11807
11808 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11809
11810 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
11811
11812 * decl.c (init_decl_processing): Use set_sizetype.
11813 * decl2.c (sizetype): Don't declare.
11814 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11815 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11816 (build_component_addr, unary_complex_lvalue): Likewise.
11817 * rtti.c (expand_class_desc): Likewise.
11818 * class.c (get_vfield_offset): Likewise.
11819
11820 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
11821
11822 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11823 early to avoid bogus error. Handle overloaded function
11824 names provided as template arguments correctly.
11825 (coerce_template_parms): Don't mishandle overloaded functions when
11826 dealing with template template parameters.
11827 (lookup_template_class): Issue an error message, rather than
11828 crashing, when the TYPE_DECL provided is not a template type.
11829
11830 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
11831
11832 * class.c (instantiate_type): Don't just return a known type if
11833 it's wrong.
11834
11835 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
11836
11837 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11838 since that code could never be reached.
11839
11840 * error.c (dump_decl): Avoid aborting in the midst of printing an
11841 error message about an illegal template declaration.
11842
11843 * parse.y (structsp): Print an error message, rather than crashing,
11844 when a class-head does not name a class.
11845
11846 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
11847 template arguments as a g++ extension.
11848
11849 * cp-tree.def (ALIGNOF_EXPR): New tree code.
11850 * decl2.c (grok_alignof): If processing_template_decl, just store
11851 the expression.
11852 * typeck.c (c_alignof): Likewise.
11853 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11854 * error.c (dump_expr): Likewise.
11855 * pt.c (tsubst_copy): Likewise.
11856 * tree.c (cp_tree_equal): Likewise.
11857 * pt.c (uses_template_parms): Correctly determine whether or not a
11858 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11859 folding can be done.
11860
11861 * cp-tree.h (grok_enum_decls): Remove type parameter.
11862 * decl.c (grok_enum_decls): Likewise.
11863 * decl2.c (grok_x_components): Call grok_enum_decls
11864 unconditionally, since it will do nothing if there is no
11865 current_local_enum. Use the new calling sequence.
11866 * pt.c (tsubst_enum): Use the new calling sequence for
11867 grok_enum_decls.
11868
11869 * decl.c (start_function): Make member functions of local classes
11870 in extern inline functions have comdat linkage here...
11871 (grokdeclarator): Rather than here.
11872
11873 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
11874
11875 * pt.c (convert_nontype_argument): Use decl_constant_value.
11876
11877 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
11878
11879 * call.c (add_template_candidate_real): New function.
11880 (add_template_candidate): Use it.
11881 (add_template_conv_candidate): Likewise.
11882 (joust): Pass extra argument to more_specialized.
11883 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11884 (is_local_class): Remove.
11885 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11886 * cp-tree.h (is_local_class): Remove.
11887 (perform_array_to_pointer_conversion): Likewise.
11888 (finish_member_template_decl): Add.
11889 (check_explicit_specialization): Return a tree, not an int.
11890 (more_specialized): Take additional argument.
11891 (get_bindings): Likewise.
11892 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11893 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11894 (perform_array_to_pointer_conversion): Remove.
11895 * decl.c (saved_scope): Add processing_specialization,
11896 processing_explicit_instantiation fields.
11897 (maybe_push_to_top_level): Save them.
11898 (pop_from_top_level): Restore them.
11899 (grokfndecl): Use new return value from
11900 check_explicit_specialization.
11901 (start_decl): Don't check flag_guiding_decls before pushing
11902 decls.
11903 (cp_finish_decl): Remove previous (bogus) change.
11904 (grok_declarator): Use decl_function_context rather than
11905 is_local_class.
11906 * decl2.c (finish_file): Pass extra argument to get_bindings.
11907 (build_expr_from_tree): Let build_x_component_ref check
11908 validity of arguments rather than doing it here.
11909 * lex.c (cons_up_default_function): Remove code fooling with
11910 processing_specialization, processing_explicit_instantiation
11911 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11912 * method.c (build_overload_identifier): Mangle local classes in
11913 template functions correctly.
11914 * parse.y (finish_member_template_decl): Move to pt.c.
11915 * pt.c (finish_member_template_decl): Moved here from parse.y.
11916 (print_candidates): New function.
11917 (determine_specialization): Change interface. Properly look for
11918 most specialized versions of template candidates.
11919 (check_explicit_specialization): Fully process explicit
11920 instantiations.
11921 (push_template_decl): Avoid looking at CLASSTYPE fields in
11922 FUNCTION_DECLS.
11923 (determine_overloaded_function): Remove.
11924 (convert_nontype_argument): Change name from
11925 convert_nontype_parameter. Use determine_overloaded_function
11926 instead of instantiate_type.
11927 (mangle_class_name_for_template): Handle type contexts as well as
11928 function contexts.
11929 (classtype_mangled_name): Likewise.
11930 (lookup_template_class): Likewise.
11931 (tsubst): Likewise.
11932 (more_specialized): Take explict template arguments as a
11933 parameter.
11934 (most_specialized): Likewise.
11935 (get_bindings): Likewise. Check that return types match before
11936 proclaiming a function a match.
11937 (do_decl_instantiation): Remove code searching for function to
11938 instantiate; that is now done in check_explicit_specialization.
11939 (add_maybe_template): Pass extra argument to get_bindings.
11940 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11941 implementation.
11942 * typeck.c (build_component_ref): Check for invalid arguments.
11943
11944 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11945
11946 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11947 return_target and call_target are equivalent.
11948
11949 * pt.c (type_unification_real): Just accept function parms that
11950 don't use any template parms.
11951
11952 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11953
11954 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11955 unset DECL_NOT_REALLY_EXTERN.
11956
11957 * parse.y (typename_sub*): Fix std::.
11958
11959 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11960
11961 * error.c (dump_decl): Fix type default template args.
11962 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11963
11964 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
11965
11966 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11967 (file_name_nondirectory): Use.
11968
11969 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11970
11971 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11972 that are not really present. Substitute default arguments in
11973 template template arguments. Correctly convert TEMPLATE_DECL to
11974 TEMPLATE_TEMPLATE_PARM.
11975 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11976 are no longer treated specially here.
11977 * parse.y (template_template_parm): Fix copy error.
11978 * decl.c (grokdeclarator): Warn about missing `typename' for nested
11979 type created from template template parameters.
11980 * parse.y (bad_parm): Likewise
11981
11982 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11983 (push_nested_class): Likewise.
11984 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11985 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11986 (copy_template_template_parm): Declare.
11987 * decl.c (arg_looking_for_template): New variable.
11988 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11989 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11990 node if arg_looking_for_template is nonzero.
11991 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11992 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11993 (grokdeclarator): Handle TEMPLATE_DECL.
11994 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11995 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11996 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11997 (dump_decl): Handle unnamed template type parameters.
11998 Handle template template parameters.
11999 (dump_function_name): Handle template template parameters.
12000 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12001 Handle TEMPLATE_TEMPLATE_PARM.
12002 * method.c (build_template_template_parm_names): New function.
12003 (build_template_parm_names): Handle TEMPLATE_DECL.
12004 (build_overload_nested_name, build_overload_name):
12005 Handle TEMPLATE_TEMPLATE_PARM.
12006 * parse.y (maybe_identifier): New nonterminal.
12007 (template_type_parm): Use it.
12008 (template_template_parm, template_arg1): New nonterminal.
12009 (template_parm): Add template_template_parm rules.
12010 (template_arg): Set processing_template_arg.
12011 (template_arg1): Rules moved from template_arg.
12012 (primary, nonnested_type): Set arg_looking_for_template if we are
12013 processing template arguments.
12014 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12015 (process_template_parm): Handle template template parameters.
12016 (coerce_template_parms, comp_template_args): Likewise.
12017 (mangle_class_name_for_template, lookup_template_class): Likewise.
12018 (uses_template_parms): Handle TEMPLATE_DECL and
12019 TEMPLATE_TEMPLATE_PARM.
12020 (current_template_args): Handle TEMPLATE_DECL.
12021 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12022 * search.c (dfs_walk, dfs_record_inheritance):
12023 Handle TEMPLATE_TEMPLATE_PARM.
12024 * tree.c (copy_template_template_parm): New function.
12025 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12026 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12027
12028 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
12029
12030 * decl.c (start_decl): Don't allow duplicate definitions of static
12031 data members.
12032
12033 * call.c (build_user_type_conversion_1): Handle user-defined
12034 template conversion operators correctly.
12035
12036 * decl2.c (build_expr_from_tree): Issue an error message if the
12037 object in a COMPONENT_REF is a TEMPLATE_DECL.
12038
12039 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12040
12041 * class.c (is_local_class): New function.
12042 * cp-tree.h (is_local_class): Declare it.
12043 (last_tree): Likewise.
12044 (begin_tree): Likewise.
12045 (end_tree): Likewise.
12046 (lookup_template_class): Change prototype.
12047 * decl.c (cp_finish_decl): Check for NULL where necessary.
12048 Consider FUNCTION_DECLS to declare objects with top-level binding,
12049 when calling make_decl_rtl.
12050 (grokdeclarator): Give members of local classes internal linkage.
12051 (start_function): Remove declaration of last_tree.
12052 (finish_function): Set flag_keep_inline_functions around call to
12053 rest_of_compilation if we are processing a member function in a
12054 local class.
12055 (start_method): Call push_template_decl for member functions of
12056 local classes in template functions.
12057 * decl2.c (import_export_decl): Don't give external linkage to
12058 instantiations of templates with internal linkage.
12059 * parse.y (last_tree): Remove declaration.
12060 (template_type): Pass extra parameter to lookup_template_class.
12061 (self_template_type): Likewise.
12062 (structsp): Move call to reset_specialization into left_curly.
12063 (left_curly): Call reset_specialization, and begin_tree.
12064 * pt.c (saved_trees): New variable.
12065 (mangle_class_name_for_template): Change prototype. Use
12066 additional function context to name local classes in templates
12067 correctly.
12068 (classtype_mangled_name): Pass the context.
12069 (push_template_decl): Handle local classes and templates, and
12070 member functions for such classes.
12071 (convert_nontype_parameter): Fix handling of pointer-to-member
12072 constants.
12073 (lookup_template_class): Handle local classes in templates.
12074 (tsubst): Likewise. Don't assume that template instantiations
12075 have external linkage; pay attention to the template declaration.
12076 (mark_decl_instantiated): Likewise.
12077 (begin_tree): New function.
12078 (end_tree): Likewise.
12079
12080 * decl.c (xref_basetypes): Don't call complete_type for basetypes
12081 that involve template parameters; that can lead to infinite
12082 recursion unnecessarily.
12083
12084 * pt.c (register_specialization): Do not register specializations
12085 that aren't ready to be registered yet.
12086 (check_explicit_specialization): Handle explicit specialization of
12087 constructors and destructors.
12088 (build_template_decl): New function.
12089 (push_template_delc): Handle out-of-class specializations of
12090 member templates.
12091
12092 * pt.c (check_explicit_specialization): Set up the template
12093 information before registering the specialization.
12094 (coerce_template_parms): Fix thinko.
12095 (tsubst): Handle specializations of member templates correctly.
12096
12097 * class.c (finish_struct_methods): Remove calls to
12098 check_explicit_specialization from here.
12099 (finish_struct): And insert them here.
12100 * cp-tree.h (perform_qualification_conversions): New function.
12101 (perform_array_to_pointer_conversion): Likewise.
12102 (begin_explicit_instantiation): Likewise.
12103 (end_explicit_instantiation): Likewise.
12104 (determine_specialization): Renamed from
12105 determine_explicit_specialization.
12106 (comp_template_parms): New function.
12107 (processing_explicit_instantiation): New variable.
12108 * cvt.c (perform_qualification_conversions): New function.
12109 (perform_array_to_pointer_conversion): Likewise.
12110 * decl.c (duplicate_decls): Don't consider template functions
12111 alike unless they have the same parameters. Refine handling of
12112 instantiation/specialization mismatches.
12113 (start_decl): Don't call pushdecl for template specializations,
12114 since they don't affect overloading.
12115 (start_function): Likewise.
12116 (grokfndecl): Call check_explicit_specialization a little later.
12117 Don't call duplicate_decls for memberm template specializations.
12118 (grokdeclarator): Don't update template_count for classes that are
12119 themselves specializations. Remove use of `2' as parameter to
12120 grokfndecl since that value isn't used.
12121 * lex.c (cons_up_default_function): Save and restore
12122 processing_explicit_instantiation around calls to grokfield.
12123 * parse.y (finish_member_template_decl): New function.
12124 (component_decl_1): Use it.
12125 (fn.def2): Likewise.
12126 (template_arg_list_opt): New nonterminal.
12127 (template_type): Use it.
12128 (self_template_type): Likewise.
12129 (template_id): Likewise.
12130 (object_template_id): Likewise.
12131 (notype_template_declarator): Likwise.
12132 (begin_explicit_instantiation): Likewise.
12133 (end_explicit_instantiation): Likewise.
12134 (explicit_instantiation): Use them.
12135 * pt.c (coerce_template_parms): Add parameters.
12136 (processing_explicit_instantiation): New variable.
12137 (convert_nontype_parameter): New function.
12138 (determine_overloaded_function): Likewise.
12139 (begin_explicit_instantiation): Likewise.
12140 (end_explicit_instantiation): Likewise.
12141 (retrieve_specialization): Likewise.
12142 (register_specialization): Likewise.
12143 (processing_explicit_specialization): Removed.
12144 (determine_specialization): Handle specializations of member
12145 functions of template class instantiations.
12146 (check_explicit_specialization): Refine to conform to standard.
12147 (comp_template_parms): New function.
12148 (coerce_template_parms): Call convert_nontype_parameter.
12149 (tsubst): Refine handling of member templates. Use
12150 register_specialization.
12151 (instantiate_template): Use retrieve_specialization.
12152 (do_decl_instantiation): Likewise.
12153 (instantiate_decl): Likewise.
12154 (type_unification): Improve handling of explict template
12155 arguments.
12156 * tree.c (mapcar): Return error_mark_node, rather than aborting,
12157 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12158 * typeck.c (build_unary_op): Call determine_specialization, rather
12159 than determine_explicit_specialization.
12160
12161 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
12162
12163 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12164
12165 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12166
12167 * error.c (dump_decl): For enum tags, output the tag, not its value.
12168
12169 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
12170
12171 * decl.c (init_decl_processing): Only call init_rtti_processing
12172 FLAG_RTTI is set.
12173
12174 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
12175
12176 * init.c (build_new_1): Split out from build_new.
12177 (build_new): Just return a NEW_EXPR.
12178 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12179
12180 * decl2.c (get_temp_regvar): Tweak.
12181
12182 * cp-tree.h (TREE_CALLS_NEW): Comment out.
12183 * class.c (resolves_to_fixed_type_p): Remove use.
12184 * method.c (build_opfncall): Likewise.
12185 * call.c (build_new_op): Likewise.
12186
12187 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
12188
12189 * exception.cc (__eh_alloc, __eh_free): New fns.
12190 (__cp_push_exception, __cp_pop_exception): Use them.
12191 (__uncatch_exception): Call terminate here if no exception.
12192 * except.c (build_terminate_handler): New fn.
12193 (expand_start_catch_block): Use it.
12194 (expand_exception_blocks): Likewise.
12195 (alloc_eh_object): New fn.
12196 (expand_throw): Use it. Protect exception init with terminate.
12197 * typeck.c (build_modify_expr): Remove code that ignores trivial
12198 methods.
12199
12200 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12201
12202 * call.c (add_builtin_candidate): Add default case in enumeration
12203 switch.
12204 (build_new_op): Likewise.
12205 (convert_like): Likewise.
12206 * cvt.c (build_expr_type_conversion): Likewise.
12207 * tree.c (real_lvalue_p): Likewise.
12208 (lvalue_p): Likewise.
12209 (cp_tree_equal): Likewise.
12210 * typeck.c (comptypes): Likewise.
12211 (build_component_ref): Likewise.
12212 (build_function_call_real): Likewise.
12213 (build_binary_op_nodefault): Likewise.
12214 (build_unary_op): Likewise.
12215 (build_modify_expr): Likewise.
12216 * typeck2.c (initializer_constant_valid_p): Likewise.
12217
12218 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
12219
12220 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12221
12222 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
12223
12224 * pt.c (coerce_template_parms): Make sure to digest_init if
12225 possible.
12226
12227 * decl.c (duplicate_decls): Make the newdecl virtual if the
12228 olddecl was, just as is done with other attributes of olddecl.
12229
12230 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12231
12232 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12233 address of an OFFSET_REF.
12234
12235 * cp-tree.def: Add AGGR_INIT_EXPR.
12236 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12237 AGGR_INIT_EXPR where appropriate.
12238 * expr.c (cplus_expand_expr): Likewise. Simplify.
12239
12240 * decl2.c (finish_file): Remove call to register_exception_table.
12241
12242 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12243
12244 * pt.c (instantiate_class_template): Don't do injection when
12245 processing_template_decl is true, as pollutes current_binding_level
12246 for base classes.
12247
12248 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
12249
12250 * pt.c (maybe_fold_nontype_arg): Add prototype.
12251
12252 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12253
12254 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12255 * error.c (dump_expr): Likewise.
12256
12257 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12258
12259 * typeck.c (build_function_call_real): Remove "inline called before
12260 definition" pedwarn.
12261
12262 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12263
12264 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12265
12266 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12267
12268 * pt.c (type_unification_real): Change __null to type void* with
12269 a warning.
12270
12271 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
12272
12273 * call.c (implicit_conversion): Don't call
12274 build_user_type_conversion_1 with a NULL expr, since it will
12275 crash.
12276
12277 * pt.c (unify): Don't try to unify array bounds if either array is
12278 unbounded.
12279
12280 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12281
12282 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12283 Replace extern decls with casts.
12284
12285 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12286 Update last_parm_cleanup_insn.
12287 (store_after_parms): Remove.
12288 * cp-tree.h: Adjust.
12289
12290 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12291
12292 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12293 (finish_file): Check DECL_COMDAT instead of weak|one_only.
12294 (import_export_vtable): Use make_decl_one_only instead of
12295 comdat_linkage for win32 tweak.
12296 (import_export_decl): Likewise.
12297 * pt.c (mark_decl_instantiated): Likewise.
12298
12299 * decl2.c (finish_file): Lose handling of templates in pending_statics.
12300
12301 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12302
12303 * decl2.c (finish_file): Lose call to expand_builtin_throw.
12304 * except.c (expand_builtin_throw): Remove.
12305 * cp-tree.h: Remove ptr_ptr_type_node.
12306 * decl.c: Likewise.
12307
12308 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
12309
12310 * decl.c (ptr_ptr_type_node): Define.
12311 (init_decl_processing): Initialize it.
12312 * cp-tree.h: Declare it.
12313 * exception.cc (__cp_exception_info): Use __get_eh_info.
12314 (__cp_push_exception): Likewise.
12315 (__cp_pop_exception): Likewise.
12316
12317 From Scott Snyder <snyder@d0sgif.fnal.gov>:
12318 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12319 saved_pc.
12320 (init_exception_processing): Removed saved_pc initialization.
12321
12322 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
12323
12324 * pt.c (instantiate_decl): Defer all templates but inline functions.
12325
12326 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12327
12328 * init.c (expand_vec_init): Don't fold a list of parameters.
12329
12330 * decl.c (copy_args_p): Handle copy elision for types with virtual
12331 bases.
12332 * call.c (build_over_call): Likewise.
12333
12334 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
12335
12336 * pt.c (lookup_template_function): Copy the template arguments,
12337 not just the list containing them, to the permanent obstack.
12338
12339 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12340
12341 * except.c (expand_start_catch_block): suspend_momentary for the
12342 terminate handler.
12343
12344 * error.c (dump_decl): Handle LOOKUP_EXPR.
12345
12346 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
12347
12348 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12349 permanent obstack if we are processing a template decl.
12350 * typeck.c (build_static_cast): Likewise.
12351 (build_const_cast): Likewise.
12352 (build_reinterpret_cast): Likewise.
12353
12354 * pt.c (coerce_template_parms): Coerce some expressions, even
12355 when processing_template_decl.
12356
12357 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12358
12359 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12360 handling of pointer difference expressions.
12361
12362 * typeck.c (comp_target_types): Comparison of function/method types
12363 is independent of nptrs.
12364
12365 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
12366
12367 * pt.c (tsubst): Avoid creating pointer to reference and
12368 reference to reference types.
12369
12370 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12371
12372 * parse.y (do_id): New nonterminal.
12373 (template_id): Use it.
12374
12375 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12376
12377 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12378 * spew.c (yylex): Don't do_identifier here.
12379 * decl2.c (build_expr_from_tree): Revert last change.
12380
12381 * decl2.c (build_expr_from_tree): Expand the name for a method call.
12382 * parse.y (object_template_id): Don't try to take the DECL_NAME.
12383
12384 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12385
12386 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12387 alloc_expr.
12388 * call.c (build_op_delete_call): Adjust.
12389
12390 * except.c (expand_end_catch_block): Lose rethrow region.
12391 (expand_start_catch_block): Likewise.
12392 (expand_end_catch_block): Don't expand_leftover_cleanups.
12393
12394 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12395
12396 * pt.c (tsubst): Remove tree_cons call (places redundant info into
12397 DECL_TEMPLATE_INSTANTIATION).
12398
12399 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12400
12401 * tree.c (is_overloaded_fn): Handle getting a fn template.
12402 (really_overloaded_fn): Likewise.
12403 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12404 * pt.c (check_explicit_specialization): Tweak.
12405 (determine_explicit_specialization): Tweak.
12406
12407 * tree.c, cp-tree.h (get_target_expr): New fn.
12408
12409 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
12410
12411 * pt.c (check_explicit_specialization): Fix misspelling in
12412 diagnostic: `preceeded'.
12413 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12414 `conversiona'.
12415
12416 1997-12-02 Mark Mitchell <mmitchell@usa.net>
12417
12418 * pt.c (determine_explicit_specialization): Avoid an internal
12419 error for bad specializations.
12420
12421 * method.c (build_overload_value): Handle SCOPE_REF.
12422
12423 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
12424
12425 * class.c (prepare_fresh_vtable): Enable even more complex MI
12426 vtable names.
12427
12428 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12429
12430 * exception.cc (__check_eh_spec): Optimize a bit.
12431
12432 * exception.cc (__cp_pop_exception): Lose handler arg.
12433 * except.c (do_pop_exception): Likewise.
12434 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12435 (expand_end_catch_block): Likewise.
12436
12437 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12438
12439 * pt.c (check_explicit_specialization): Complain about using a
12440 template-id for a non-specialization.
12441
12442 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
12443
12444 * repo.c: Prototype rindex only if needed.
12445 * xref.c: Likewise.
12446
12447 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12448
12449 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12450
12451 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12452
12453 * typeck.c (build_const_cast): Handle references here instead of
12454 handing off to convert_to_reference.
12455
12456 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12457 TerminateFunctionCall.
12458 (init_exception_processing): Likewise. Terminate et al are now
12459 the fns, not ADDR_EXPRs.
12460 (various): Lose redundant assemble_external calls.
12461 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12462
12463 * cp-tree.h (struct lang_decl_flags): Add comdat.
12464 (DECL_COMDAT): New macro.
12465 * decl.c (duplicate_decls): Propagate it.
12466 (cp_finish_decl): Handle it.
12467 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12468
12469 * class.c: Remove static pending_hard_virtuals.
12470 (add_virtual_function): Take pointers to pending_virtuals
12471 and pending_hard_virtuals.
12472 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
12473
12474 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12475
12476 * decl2.c (import_export_vtable): If we support one_only but not
12477 weak symbols, mark instantiated template vtables one_only.
12478 (import_export_decl): Likewise for tinfo functions.
12479 (finish_vtable_vardecl): Also write out vtables from explicitly
12480 instantiated template classes.
12481 * pt.c (mark_class_instantiated): Revert last change.
12482
12483 * except.c (expand_throw): Call mark_used on the destructor.
12484
12485 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
12486
12487 * lex.c (lang_init): Enable flag_exceptions by default if no
12488 command line switch was specified.
12489
12490 1997-11-26 Mark Mitchell <mmitchell@usa.net>
12491
12492 * pt.c (unify): Handle `void' template parameters in
12493 specializations.
12494
12495 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
12496
12497 * rtti.c (build_dynamic_cast): Handle template case here.
12498 (build_dynamic_cast_1): Not here.
12499
12500 * typeck2.c (digest_init): Make copies where appropriate.
12501
12502 * decl2.c (delete_sanity): resolve_offset_ref.
12503
12504 * except.c: Call terminate without caching so many bits.
12505
12506 * except.c (expand_start_catch_block): Fix catching a reference
12507 to pointer.
12508
12509 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12510
12511 * init.c (build_new): Copy size to the saveable obstack.
12512
12513 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12514 TRY_CATCH_EXPR for now.
12515
12516 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12517
12518 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12519 has DECL_LANG_SPECIFIC.
12520
12521 * exception.cc (struct cp_eh_info): Add handlers field.
12522 (__cp_push_exception): Initialize it.
12523 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
12524 (__throw_bad_exception): Remove.
12525 * except.c (call_eh_info): Add handlers field.
12526 (get_eh_handlers): New fn.
12527 (push_eh_cleanup): Increment handlers.
12528
12529 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12530
12531 * except.c (expand_start_eh_spec): Use the try/catch code.
12532 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
12533 doing everything inline.
12534 (init_exception_processing): throw_type_match now takes
12535 const void pointers.
12536 * exception.cc (__check_eh_spec): New fn.
12537 * inc/exception: Neither terminate nor unexpected return.
12538 * decl.c: Make const_ptr_type_node public.
12539 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12540
12541 * except.c (expand_start_catch_block): We only need the rethrow
12542 region for non-sjlj exceptions.
12543 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
12544
12545 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
12546
12547 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12548 (various.o): Likewise.
12549 * inc/new: Add placement deletes. Add throw specs for default new.
12550 * new.cc (set_new_handler): Move here from libgcc2.
12551 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12552 (new): Move from libgcc2. Throw bad_alloc.
12553 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12554 * decl.c (init_decl_processing): Update exception specs on new and
12555 delete.
12556
12557 * method.c (build_decl_overload_real): Don't mess with global
12558 placement delete.
12559
12560 * init.c (build_new): Check for null throw spec, not nothrow_t.
12561
12562 * decl.c (duplicate_decls): Don't complain about different exceptions
12563 from an internal declaration.
12564
12565 * call.c (build_op_delete_call): Fix check for member fns again.
12566
12567 * decl2.c (import_export_decl): Interface hackery affects
12568 virtual synthesized methods.
12569
12570 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12571
12572 * decl.c (start_decl): Don't just complain about a mismatched
12573 scope, fix it.
12574
12575 * decl.c (make_implicit_typename): Handle case where t is not
12576 actually from context.
12577 * tree.c (get_type_decl): Lose identifier case.
12578 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12579 * parse.y (nonnested_type): Just use lookup_name.
12580 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12581
12582 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
12583
12584 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12585 T was built in C language context (for example, by
12586 output_func_start_profiler).
12587
12588 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12589
12590 * decl.c (make_implicit_typename): New fn.
12591 (lookup_name_real): Use it. Use current_class_type as the context.
12592
12593 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
12594
12595 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12596
12597 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12598
12599 * friend.c (do_friend): Warn about non-template friends in templates.
12600
12601 * call.c (build_op_delete_call): Fix handling of inherited delete.
12602
12603 * search.c (dfs_record_inheritance): Ignore template type parms.
12604
12605 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
12606
12607 * call.c (build_new_op): Fix copy error.
12608 (build_op_new_call): New fn.
12609 (build_op_delete_call): New fn.
12610 * cp-tree.h: Declare them.
12611 * init.c (build_new): Use them. Support placement delete.
12612 (build_x_delete): Use build_op_delete_call.
12613 (build_delete): Likewise.
12614 * decl2.c (delete_sanity): Likewise.
12615 (coerce_delete_type): Don't complain about placement delete.
12616
12617 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12618
12619 * call.c (build_new_function_call): Remove unused 'obj' parm.
12620 * cp-tree.h, typeck.c: Adjust.
12621
12622 * init.c (build_new): Make the cleanup last longer.
12623 (expand_vec_init): Call do_pending_stack_adjust.
12624
12625 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
12626
12627 * pt.c (do_type_instantiation): Fix typo.
12628 (mark_class_instantiated): If we support one_only but not weak
12629 symbols, don't mark this as known.
12630
12631 * init.c (build_new): Handle vec delete in EH cleanup.
12632
12633 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12634
12635 * call.c (build_method_call): Call complete_type before checking
12636 for destructor.
12637
12638 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
12639
12640 * decl.c (add_block_current_level): Delete.
12641 * init.c (build_vec_delete_1): Delete build_block and
12642 add_block_current_level calls.
12643
12644 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
12645
12646 * init.c (build_new): Handle freeing allocated memory when the
12647 constructor throws.
12648
12649 * call.c (build_new_method_call): Fix flags arg.
12650
12651 * pt.c (do_type_instantiation): Don't try to instantiate
12652 member templates.
12653 (mark_decl_instantiated): If we support one_only but not
12654 weak symbols, mark this one_only.
12655 * decl2.c (import_export_vtable): Don't defer handling of vtables
12656 if MULTIPLE_SYMBOL_SPACES.
12657
12658 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12659
12660 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12661
12662 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
12663
12664 * except.c (do_pop_exception): Return a value.
12665
12666 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12667
12668 * call.c (build_new_method_call): Handle getting a
12669 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
12670 if we got template parms.
12671 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12672 not just the args.
12673 * decl2.c (build_expr_from_tree): Tweak last change.
12674 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12675 (maybe_fold_nontype_arg): Split out from tsubst_copy.
12676 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12677
12678 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12679
12680 * pt.c (tsubst_copy): Handle explicit template arguments in
12681 function calls.
12682 * typeck.c (build_x_function_call): Likewise.
12683 * decl2.c (build_expr_from_tree): Lookup function name if it
12684 hasn't been done.
12685
12686 * pt.c (tsubst): Instantiate template functions properly when
12687 template parameter does not appear in function arguments and return
12688 type.
12689 (comp_template_args): Handle member templates required by tsubst.
12690
12691 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12692
12693 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12694 previous change.
12695
12696 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12697
12698 * pt.c (coerce_template_parms): Tweak error message.
12699
12700 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12701 return type defaults to `int', even if there are storage-class
12702 specifiers.
12703
12704 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12705
12706 Complete nested exception support.
12707 * except.c (do_pop_exception): Split out...
12708 (push_eh_cleanup): From here. Handle the EH region by hand.
12709 (expand_start_catch_block): Add a new level for the catch parm.
12710 Move the rethrow region outside the two cleanup regions.
12711 Protect the initializer for the catch parm with terminate.
12712 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
12713 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
12714 popping off the middle of the stack.
12715 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12716 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12717 (build_cplus_new): Only wrap CALL_EXPRs.
12718 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12719 the constructor call.
12720
12721 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12722
12723 * Make-lang.in (c++.distdir): Make inc subdirectory.
12724
12725 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12726
12727 * decl2.c (finish_file): Put back some code.
12728
12729 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12730
12731 * decl2.c (finish_file): Remove redundant code.
12732 * method.c (emit_thunk): Don't let the backend defer generic thunks.
12733
12734 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12735
12736 * except.c (call_eh_info): Split out...
12737 (push_eh_info): From here.
12738 (expand_builtin_throw): Use it.
12739 (expand_start_catch_block): Move region start back.
12740
12741 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
12742
12743 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12744 (real_yylex): Record wide strings using target endianness, not host.
12745
12746 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
12747
12748 * repo.c (rindex): Add decl unconditionally.
12749 (get_base_filename, open_repo_file): Don't cast rindex.
12750 * xref.c (rindex): Add decl unconditionally.
12751 (index): Remove unused decl.
12752 (open_xref_file): Don't cast rindex.
12753
12754 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12755
12756 * class.c (build_vbase_path): Propagate the result type properly.
12757
12758 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
12759
12760 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12761 remaining use of saved_throw_type with a call to get_eh_type.
12762
12763 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
12764
12765 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12766 (file_name_nondirectory): New function, doing the same as the macro.
12767 (set_typedecl_interface_info): Use it instead of the macro.
12768 (check_newline): Likewise.
12769 (handle_cp_pragma): Likewise.
12770
12771 * repo.c (get_base_filename): Cast result of rindex to char*.
12772 (open_repo_file): Likewise.
12773 * xref.c (open_xref_file): Likewise.
12774 * error.c (dump_char): Make its arg int, not char.
12775
12776 * except.c (push_eh_info): Pass the number of fields - 1 down, not
12777 the exact number of fields.
12778
12779 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12780
12781 Support for nested exceptions.
12782 * tinfo2.cc (__is_pointer): New fn.
12783 * exception.cc (struct cp_eh_info): Define.
12784 (__cp_exception_info, __uncatch_exception): New fns.
12785 (__cp_push_exception, __cp_pop_exception): New fns.
12786 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12787 Lose empty_fndecl.
12788 (init_exception_processing): Likewise. __eh_pc is now external.
12789 (push_eh_info): New fn.
12790 (get_eh_{info,value,type,caught}): New fns.
12791 (push_eh_cleanup): Just call __cp_pop_exception.
12792 (expand_start_catch_block): Use push_eh_info. Start the eh region
12793 sooner.
12794 (expand_end_eh_spec): Use push_eh_info.
12795 (expand_throw): Call __cp_push_exception to set up the exception info.
12796 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
12797 when we rethrow.
12798 (expand_builtin_throw): Don't refer to empty_fndecl.
12799
12800 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12801
12802 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12803
12804 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
12805
12806 * method.c (build_template_parm_names, build_decl_overload_real):
12807 Add static to definitions.
12808 * pt.c (add_to_template_args, note_template_header,
12809 processing_explicit_specialization, type_unification_real): Likewise.
12810 ({determine,check}_explicit_specialization): Use a single string for
12811 error messages.
12812
12813 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12814
12815 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12816 (expand_end_catch_block): Likewise.
12817 (expand_end_eh_spec): Likewise.
12818
12819 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
12820
12821 * decl.c (duplicate_decls): Handle template specializations
12822 correctly.
12823 * error.c (dump_function_name): Fix printing of specializations of
12824 member functions that are not member templates.
12825 * cp-tree.h (processing_specialization): Make global.
12826 * pt.c (processing_specialization): Likewise.
12827 * lex.c (cons_up_default_function): Save and restore
12828 processing_specialization to avoid confusion.
12829
12830 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12831
12832 * decl.c (init_decl_processing): Give null_node unknown* type.
12833 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12834 (common_type): Likewise.
12835 * error.c (args_as_string): Recognize null_node.
12836
12837 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12838
12839 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12840 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12841
12842 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12843
12844 * Make-lang.in (g++): Include prefix.o.
12845
12846 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
12847
12848 * pt.c (determine_explicit_specialization): Initialize "dummy"
12849 to keep Purify quiet.
12850
12851 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12852
12853 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12854 (build_overload_int): Not here.
12855
12856 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
12857
12858 * class.c (build_type_pathname): Remove.
12859 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12860
12861 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
12862
12863 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12864 &&label GNU extension.
12865
12866 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
12867
12868 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12869 so as to avoid incorrect manglings.
12870 * method.c (build_decl_overload_real): Don't mangle return types
12871 for constructors.
12872
12873 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12874
12875 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12876 scratch_tree_cons): Define as macros for now.
12877 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12878 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12879 typeck2.c: Use them and the expression_obstack variants.
12880
12881 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12882
12883 * decl.c (store_return_init): Allow classes with explicit ctors to
12884 be used with the named return values extension.
12885
12886 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
12887
12888 * pt.c (instantiate_decl): Fix previous change.
12889
12890 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12891
12892 * pt.c (tsubst): Fix thinko.
12893 (instantiate_decl): Really use the original template.
12894
12895 * call.c (build_new_method_call): Use simple constructor_name for
12896 error messages.
12897
12898 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
12899
12900 * method.c (build_underscore_int): Don't use ANSI specific
12901 features.
12902
12903 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12904
12905 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12906 for our key method; it might have been inlined by -O3.
12907
12908 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
12909
12910 * decl.c (make_typename_type): Do not try to call lookup_field for
12911 non-aggregate types.
12912
12913 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
12914
12915 * typeck.c (build_reinterpret_cast): Tweak.
12916
12917 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12918
12919 * typeck.c (build_reinterpret_cast): Converting a void pointer
12920 to function pointer with a reinterpret_cast produces a warning
12921 if -pedantic is issued.
12922
12923 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12924
12925 * typeck.c (c_expand_return): Don't warn about returning a
12926 reference-type variable as a reference.
12927
12928 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12929
12930 * method.c (build_static_name): Fix typo.
12931
12932 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
12933
12934 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12935 OLDDECL before we try to do DECL_USE_TEMPLATE.
12936
12937 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12938
12939 * decl.c (duplicate_decls): Don't warn about template instances.
12940
12941 * typeck.c (mark_addressable): Lose ancient code that unsets
12942 DECL_EXTERNAL.
12943
12944 * pt.c (do_decl_instantiation): Lose support for instantiating
12945 non-templates.
12946
12947 * call.c (build_new_function_call): Fix handling of null explicit
12948 template args.
12949 (build_new_method_call): Likewise.
12950
12951 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
12952
12953 * method.c (build_underscore_int): Fix typo.
12954
12955 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
12956
12957 * tree.c (print_lang_statistics): #if 0 call to
12958 print_inline_obstack_statistics until its definition is checked in.
12959
12960 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12961
12962 * decl2.c (finish_file): Move dump_tree_statistics to end.
12963
12964 * pt.c (instantiate_decl): Look for the original template.
12965 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12966 of member templates.
12967
12968 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12969
12970 * Makefile.in (g++FAQ.*): New rules.
12971 (CONFLICTS): Update.
12972 * g++FAQ.texi: Moved from libg++.
12973
12974 * parse.y (PFUNCNAME): Only specify the type once.
12975
12976 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
12977
12978 * lex.c (real_yylex): Clean up the code to fully behave the way
12979 the c-lex.c parser does for complex and real numbers.
12980
12981 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12982
12983 * method.c (build_decl_overload_real): Reformat.
12984
12985 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
12986
12987 * method.c (synthesize_method): If at_eof, determine our linkage.
12988
12989 1997-09-29 Paul Eggert <eggert@twinsun.com>
12990
12991 * lex.c (real_yylex): Treat `$' just like `_', except issue a
12992 diagnostic if !dollars_in_ident or if pedantic.
12993
12994 * lang-specs.h (@c++): -ansi no longer implies -$.
12995
12996 * decl2.c (lang_decode_option):
12997 -traditional and -ansi now do not mess with
12998 dollars_in_ident.
12999
13000 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
13001
13002 * Makefile.in (parse.o, decl.o): Also depend on
13003 $(srcdir)/../except.h $(srcdir)/../output.h.
13004 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13005 $(srcdir)/../except.h $(srcdir)/../output.h.
13006 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13007 ../insn-codes.h.
13008
13009 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13010
13011 * expr.c (cplus_expand_expr): Make it static.
13012
13013 * decl2.c, init.c, typeck.c: Include "expr.h".
13014 (expand_expr): Use proper values when calling the function.
13015
13016 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
13017
13018 * lang-options.h: New -Wold-style-cast flag.
13019 * cp-tree.h (warn_old_style_cast): New variable.
13020 * decl2.c (warn_old_style_cast): Likewise.
13021 (lang_decode_option): Support -Wold-style-cast.
13022 (reparse_absdcl_as_casts): Produce old-style-cast warning.
13023
13024 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13025
13026 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13027 TREE_USED, reset value based on already_used.
13028
13029 * init.c (expand_member_init): Revert change.
13030
13031 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13032
13033 * cp-tree.h, decl.c, decl2.c, pt.c:
13034 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
13035
13036 * decl2.c (lang_decode_option): Add missing ;.
13037
13038 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13039
13040 * friend.c (do_friend): Disable injection for all template-derived
13041 decls.
13042 * decl2.c (lang_decode_option): Handle -fguiding-decls.
13043 * parse.y (notype_template_declarator): New nonterminal.
13044 (direct_notype_declarator): Use it.
13045 (complex_direct_notype_declarator): Likewise.
13046 (object_template_id): Accept any kind of identifier after TEMPLATE.
13047 (notype_qualified_id): Don't add template declarators here.
13048
13049 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
13050
13051 * call.c (add_template_candidate): Add explicit_targs parameter.
13052 (build_scoped_method_call): Use it.
13053 (build_overload_call_real): Likewise.
13054 (build_user_type_conversion_1): Likewise.
13055 (build_new_function_call): Likewise.
13056 (build_object_call): Likewise.
13057 (build_new_op): Likewise.
13058 (build_new_method_call): Likewise.
13059 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13060 (build_new_method_call): Likewise.
13061
13062 * class.c (finish_struct_methods): Add specialization pass to
13063 determine which methods were specializing which other methods.
13064 (instantiate_type): Handle TEMPLATE_ID_EXPR.
13065
13066 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13067
13068 * cp-tree.h (name_mangling_version): New variable.
13069 (flag_guiding_decls): Likewise.
13070 (build_template_decl_overload): New function.
13071 (begin_specialization): Likewise.
13072 (reset_specialization): Likewise.
13073 (end_specialization): Likewise.
13074 (determine_explicit_specialization): Likewise.
13075 (check_explicit_specialization): Likewise.
13076 (lookup_template_function): Likewise.
13077 (fn_type_unification): Add explicit_targs parameter.
13078 (type_unification): Likewise.
13079
13080 * decl.c (duplicate_decls): Add smarts for explicit
13081 specializations.
13082 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13083 specializations.
13084 (grokfndecl): Call check_explicit_specialization.
13085
13086 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13087 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13088 (check_classfn): Handle specializations.
13089
13090 * error.c (dump_function_name): Print specialization arguments.
13091
13092 * friend.c (do_friend): Don't call pushdecl for template
13093 instantiations.
13094
13095 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13096
13097 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13098 and -fno-guiding-decls.
13099
13100 * lex.c (identifier_type): Return PFUNCNAME for template function
13101 names.
13102
13103 * method.c (build_decl_overload_real): New function.
13104 (build_template_parm_names): New function.
13105 (build_overload_identifier): Use it.
13106 (build_underscore_int): New function.
13107 (build_overload_int): Use it. Add levels for template
13108 parameters.
13109 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
13110 (build_overload_nested_names): Handle template type parameters.
13111 (build_template_decl_overload): New function.
13112
13113 * parse.y (YYSTYPE): New ntype member.
13114 (nested_name_specifier): Use it.
13115 (nested_name_specifier_1): Likewise.
13116 (PFUNCNAME): New token.
13117 (template_id, object_template_id): New non-terminals.
13118 (template_parm_list): Note specializations.
13119 (template_def): Likewise.
13120 (structsp): Likewise.
13121 (fn.def2): Handle member template specializations.
13122 (component_decl_1): Likewise.
13123 (direct_notype_declarator): Handle template-ids.
13124 (component_decl_1): Likewise.
13125 (direct_notype_declarator): Handle template-ids.
13126 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13127
13128 * pt.c (processing_specializations): New variable.
13129 (template_header_count): Likewise.
13130 (type_unification_real): New function.
13131 (processing_explicit_specialization): Likewise.
13132 (note_template_header): Likewise.
13133 (is_member_template): Handle specializations.
13134 (end_template_decl): Call reset_specialization.
13135 (push_template_decl): Handle member template specializations.
13136 (tsubst): Likewise.
13137 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13138 (instantiate_template): Handle specializations.
13139 (instantiate_decl): Likewise.
13140 (fn_type_unification): Handle explicit_targs.
13141 (type_unification): Likewise. Allow incomplete unification
13142 without an error message, if allow_incomplete.
13143 (get_bindings): Use new calling sequence for fn_type_unification.
13144
13145 * spew.c (yylex): Handle PFUNCNAME.
13146
13147 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13148 (really_overloaded_fn): Likewise.
13149 (get_first_fn): Handle function templates.
13150
13151 * typeck.c (build_x_function_call): Use really_overloaded_fn.
13152 Handle TEMPLATE_ID_EXPR.
13153 (build_x_unary_op): Likewise.
13154 (build_unary_op): Likewise.
13155 (mark_addressable): Templates whose address is taken are marked
13156 as used.
13157
13158 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13159
13160 * decl.c (init_decl_processing): Declare __builtin_constant_p as
13161 accepting any kind of type, not only int.
13162
13163 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13164
13165 * search.c (get_matching_virtual): Notice virtual bases when sorrying
13166 about covariant returns.
13167
13168 * parse.y (member_init): Also imply typename here. Remove ancient
13169 extension for initializing base members.
13170
13171 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13172
13173 Handle multi-level typenames and implicit typename in base list.
13174 * parse.y (typename_sub{,[0-2]}): New rules.
13175 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13176 (nonnested_type): New rule.
13177 (complete_type_name): Use it.
13178 (base_class.1): Use typename_sub and nonnested_type.
13179 (nested_name_specifier): Don't elide std:: here.
13180 * decl.c (make_typename_type): Handle getting a type for NAME.
13181 (lookup_name_real): Turn std:: into :: here.
13182
13183 Rvalue conversions were removed in London.
13184 * call.c (is_subseq): Don't consider lvalue transformations.
13185 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13186 (joust): Re-enable ?: kludge.
13187
13188 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
13189
13190 * decl.c (start_function): Up warning of no return type to be a
13191 pedwarn.
13192
13193 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13194
13195 * init.c (expand_member_init): Don't set TREE_USED.
13196 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13197 set,don't clear TREE_USED wholesale.
13198
13199 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13200
13201 * call.c (build_over_call): Do require_complete_type before
13202 build_cplus_new.
13203
13204 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13205
13206 * search.c (lookup_field): Call complete_type in all cases.
13207
13208 * decl.c (finish_function): Just warn about flowing off the end.
13209
13210 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13211
13212 * decl.c (grokparms): Don't bash a permanent list node if we're
13213 in a function.
13214
13215 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
13216
13217 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13218
13219 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13220
13221 * call.c (build_new_op): Give better error for syntactically
13222 correct, but semantically invalid, use of undeclared template.
13223
13224 * call.c (compare_qual): Handle pmfs.
13225
13226 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13227 after the exception spec.
13228
13229 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13230
13231 * call.c (null_ptr_cst_p): Integer type, not integral type.
13232
13233 * call.c (joust): Disable warnings until they can be moved to the
13234 right place.
13235
13236 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
13237
13238 * Makefile.in, config-lang.in: Convert to autoconf.
13239
13240 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13241
13242 * decl.c (lookup_name_real): Add implicit 'typename' to types from
13243 base classes.
13244
13245 * pt.c (most_specialized_class): Fix typo.
13246 (tsubst): Move constant folding to TREE_VEC case.
13247
13248 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
13249
13250 * pt.c (do_poplevel): Don't warn about unused local variables
13251 while processing_template_decl since we don't always know whether
13252 or not they will need constructing/destructing.
13253
13254 * pt.c (uses_template_parms): Check the values of an enumeration
13255 type to make sure they don't depend on template parms.
13256
13257 * decl.c (make_typename_type): Don't lookup the field if the
13258 context uses template parms, even if we're not
13259 processing_template_decl at the moment.
13260
13261 * pt.c (coerce_template_parms): Avoid looking at the
13262 TYPE_LANG_DECL portion of a typename type, since there won't be
13263 one.
13264 (tsubst): Do constant folding as necessary to make sure that
13265 arguments passed to lookup_template_class really are constants.
13266
13267 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13268
13269 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13270 * decl2.c (finish_file): Only register exception tables if we
13271 need to.
13272
13273 * decl.c (init_decl_processing): Add __builtin_[fs]p.
13274
13275 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13276
13277 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13278
13279 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
13280
13281 * error.c (dump_decl): Avoid crashing when presented with a
13282 uninitialized constant, as can occur with a template parameter.
13283 (dump_expr): Make sure that there are enough levels of
13284 current_template_parms before we start diving through them.
13285
13286 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
13287
13288 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13289 c-typeck.c.
13290
13291 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13292
13293 * except.c (expand_throw): Call build_delete for all
13294 exception types, not just objects with destructors.
13295
13296 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
13297
13298 * decl.c (current_local_enum): Remove static.
13299 * pt.c (tsubst_enum): Save and restore value of current_local_enum
13300 in case template is expanded in enum decl.
13301 (instantiate_class_template): Use new tsubst_enum signature.
13302 (tsubst_expr): Likewise.
13303
13304 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
13305
13306 * pt.c (begin_member_template_processing): Take a function as
13307 argument, not a set of template arguments. Use the template
13308 parameters, rather than the arguments. Handle non-type parameters
13309 correctly. Push a binding level for the parameters so that multiple
13310 member templates using the same parameter names can be declared.
13311 (end_member_template_processing): Pop the binding level.
13312 (push_template_decl): Mark member templates as static when
13313 appropriate.
13314
13315 * lex.c (do_pending_inlines): Pass the function, not its template
13316 arguments, to begin_member_template_processing.
13317 (process_next_inline): Likewise.
13318 (do_pending_defargs): Likewise.
13319
13320 * error.c (dump_expr): Obtain the correct declaration for a
13321 TEMPLATE_CONST_PARM.
13322
13323 * call.c (add_template_conv_candidate): New function.
13324 (build_object_call): Handle member templates, as done in the other
13325 build_ functions.
13326
13327 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
13328
13329 * decl.c (replace_defag): Undo previous change.
13330 * lex.c (do_pending_defargs): Deal with member templates.
13331
13332 * pt.c (is_member_template): Avoid crashing when passed a
13333 non-function argument.
13334
13335 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13336
13337 * class.c (grow_method): Remove check for redeclaration.
13338
13339 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
13340
13341 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13342 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13343 (PRIMARY_TEMPLATE_P): Use it.
13344 * call.c (build_overload_call_real): Use it.
13345 * class.c (instantiate_type): Likewise.
13346 * decl.c (decls_match): Likewise.
13347 * method.c (build_overload_identifier): Likewise.
13348 * pt.c (push_template_decl): Likewise.
13349 (classtype_mangled_name): Likewise.
13350 (lookup_template_class): Likewise.
13351
13352 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13353 DECL_NTPARMS to conform to usage elsewhere.
13354 * call.c (add_template_candidate): Likewise.
13355 * class.c (instantiate_type): Likewise.
13356 * pt.c (instantiate_template): Likewise.
13357 (get_bindings): Likewise.
13358
13359 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13360 is_member_template.
13361
13362 * pt.c (unify): Undo changes to allow multiple levels of template
13363 parameters.
13364 (type_unification): Likewise.
13365 (fn_type_unification): Likewise.
13366 (get_class_bindings): Likewise.
13367 * cp-tree.h (Likewise).
13368
13369 * decl.c (replace_defarg): Check that the type of the default
13370 parameter does not invlove a template type before complaining
13371 about the initialization.
13372
13373 * error.c (dump_expr): Deal with template constant parameters in
13374 member templates correctly.
13375
13376 * pt.c (is_member_template): Deal with class specializations
13377 correctly.
13378 (tsubst): Handle "partial instantiation" of member templates
13379 correctly.
13380
13381 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
13382
13383 * pt.c (type_unification): Change calling sequence to allow for
13384 multiple levels of template parameters.
13385 (tsubst_expr): Likewise.
13386 (tsubst): Likewise.
13387 (tsubst_copy): Likewise.
13388 (instantiate_template): Likewise.
13389 (unify): Likewise.
13390 * call.c (build_overload_call_real): Use it.
13391 (add_builtin_candidate): Use it.
13392 (build_new_method_call): Use it.
13393 * class.c (instantiate_type): Use it.
13394 * decl.c (grokdeclarator): Use it.
13395 * decl2.c (finish_file): Use it.
13396 * method.c (build_overload_identifier): Use it.
13397
13398 * call.c (add_template_candidate): Add additional parameter for
13399 the function return type. Call fn_type_unification istead of
13400 type_unification.
13401 (build_user_type_conversion_1): Handle member templates.
13402 (build_new_function_call): Likewise.
13403 (build_new_op): Likewise.
13404 (build_new_method_call): Likewise.
13405
13406 * class.c (grow_method): Don't give an error message indicating
13407 that two member templates with the same name are ambiguous.
13408 (finish_struct): Treat member template functions just like member
13409 functions.
13410
13411 * cp-tree.h (check_member_template): Add declaration.
13412 (begin_member_template_processing): Likewise.
13413 (end_member_template_processing): Likewise.
13414 (fn_type_unification): Likewise.
13415 (is_member_template): Likewise.
13416 (tsubst): Change prototype.
13417 (tsubst_expr): Likewise.
13418 (tsubst_copy): Likewise.
13419 (instantiate_template): Likewise.
13420 (get_bindings): Likewise.
13421
13422 * decl.c (decls_match): Handle multiple levels of template
13423 parameters.
13424 (pushdecl): Handle template type params just like other type
13425 declarations.
13426 (push_class_level_binding): Return immediately if the
13427 class_binding_level is NULL.
13428 (grokfndecl): If check_classfn() returns a member_template, use
13429 the result of the template, not the template itself.
13430
13431 * decl2.c (check_member_template): New function. Check to see
13432 that the entity declared to be a member template can be one.
13433 (check_classfn): Allow redeclaration of member template functions
13434 with different types; the new functions can be specializations or
13435 explicit instantiations.
13436
13437 * error.c (dump_decl): Handle multiple levels of template
13438 parameters.
13439 (dump_function_decl): Update to handle function templates.
13440
13441 * lex.c (do_pending_inlines): Set up template parameter context
13442 for member templates.
13443 (process_next_inline): Likewise.
13444
13445 * method.c (build_overload_identifier): Adjust for multiple levels
13446 of template parameters.
13447
13448 * parse.y (fn.def2): Add member templates.
13449 (component_decl_1): Likewise.
13450
13451 * pt.c (begin_member_template_processing): New function.
13452 (end_member_template_processing): Likewise.
13453 (is_member_template): Likewise.
13454 (fn_type_unification): Likewise.
13455 (current_template_parms): Return a vector of all the template
13456 parms, not just the innermost level of parms.
13457 (push_template_decl): Deal with the possibility of member
13458 templates.
13459 (lookup_template_class): Likewise.
13460 (uses_template_parms): Likewise.
13461 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13462 TEMPLATE_CONST_PARM to deal with multiple levels of template
13463 arguments. Add processing of TEMPLATE_DECL to produce new
13464 TEMPLATE_DECLs from old ones.
13465 (do_decl_instantiation): Handle member templates.
13466
13467 * search.c (lookup_fnfields_1): Handle member template conversion
13468 operators.
13469
13470 * tree.c (cp_tree_equal): Check the levels, as well as the
13471 indices, of TEMPLATE_CONST_PARMs.
13472
13473 * typeck.c (comptypes): Check the levels, as well as the indices,
13474 fo TEMPLATE_TYPE_PARMs.
13475 (build_x_function_call): Treat member templates like member
13476 functions.
13477
13478 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13479
13480 * typeck.c (c_expand_return): Always convert_for_initialization
13481 before checking for returning a pointer to local.
13482
13483 * pt.c (type_unification): If strict and the function parm doesn't
13484 use template parms, just compare types.
13485
13486 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
13487
13488 * method.c (build_overloaded_value): Replace direct call
13489 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13490
13491 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13492
13493 * typeck.c (convert_arguments): Don't arbitrarily choose the first
13494 of a set of overloaded functions.
13495
13496 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13497
13498 * lex.c (real_yylex): Don't elide __FUNCTION__.
13499
13500 * method.c (build_overload_value): Add in_template parm.
13501 (build_overload_int): Likewise.
13502 (build_overload_identifier): Pass it.
13503
13504 * decl.c (duplicate_decls): Don't bash a previous template
13505 definition with a redeclaration.
13506
13507 * pt.c (unify): float doesn't match double.
13508
13509 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13510 TYPE_DECL. Handle getting non-template types.
13511 * parse.y (explicit_instantiation): Use typespec instead of
13512 aggr template_type.
13513
13514 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
13515
13516 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13517
13518 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
13519
13520 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13521 (compare_ics): Likewise.
13522
13523 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13524
13525 * call.c (joust): Warn about choosing one conversion op over
13526 another because of 'this' argument when the other return type is
13527 better.
13528 (source_type): New fn.
13529
13530 * call.c (build_new_op): Strip leading REF_BIND from first operand
13531 to builtin operator.
13532
13533 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13534 use its RTL.
13535
13536 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13537
13538 * call.c (null_ptr_cst_p): Remove support for (void*)0.
13539
13540 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
13541
13542 * typeck.c (expand_target_expr): Make definition match declaration.
13543
13544 * class.c (get_basefndecls): Make definition match declaration.
13545
13546 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
13547
13548 * input.c (sub_getch): Eventually give up and release the input file.
13549
13550 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13551 right place.
13552
13553 * call.c (joust): Tweak message.
13554
13555 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
13556
13557 * error.c (type_as_string): Put const/volatile on template type
13558 parameters where appropriate.
13559
13560 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
13561
13562 * call.c (strictly_better): Make arguments unsigned ints.
13563
13564 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
13565
13566 * lex.c (real_yylex): Refer to __complex instead of complex.
13567
13568 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
13569
13570 * lex.c (real_yylex): Don't use getc directly.
13571
13572 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13573
13574 * call.c (is_subseq): Don't try to be clever.
13575
13576 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13577
13578 * parse.y, pt.c: Include "except.h".
13579 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13580 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13581 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13582 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13583 prototyping.
13584
13585 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13586
13587 * decl2.c (mark_vtable_entries): Instead of replacing pure
13588 virtuals with a reference to __pure_virtual, copy the decl and
13589 change the RTL.
13590
13591 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13592
13593 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13594
13595 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13596
13597 * pt.c (instantiate_class_template): Call repo_template_used
13598 before finish_prevtable_vardecl.
13599
13600 * call.c (is_subseq): New fn.
13601 (compare_ics): Use it.
13602
13603 * repo.c (finish_repo): Don't crash on no args.
13604
13605 * parse.y (named_complex_class_head_sans_basetype): Handle
13606 explicit global scope.
13607 * decl2.c (handle_class_head): New fn.
13608
13609 * pt.c (unify): Add CONST_DECL case.
13610
13611 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13612
13613 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13614
13615 * cp-tree.h (report_type_mismatch): Add prototype.
13616 * call.c (build_overload_call_real): Remove erroneous fourth
13617 argument to report_type_mismatch.
13618 (build_user_type_conversion_1): Remove erroneous second arg to
13619 tourney.
13620 (build_new_function_call): Likewise.
13621 (build_object_call): Likewise.
13622 (build_new_op): Likewise.
13623 (build_new_method_call): Likewise.
13624
13625 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13626
13627 * error.c (dump_decl): Don't bother processing a function with no
13628 DECL_LANG_SPECIFIC.
13629
13630 * method.c (emit_thunk): Call init_function_start in the macro case.
13631
13632 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13633
13634 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13635 defined and used to set flag_vtable_thunks.
13636
13637 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13638
13639 * parse.y: Don't clear the inlines from their obstack until they've
13640 all been processed.
13641
13642 * decl.c (duplicate_decls): Don't complain about exception
13643 specification mismatch if flag_exceptions is off.
13644
13645 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
13646
13647 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13648
13649 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
13650
13651 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13652 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13653 Include <stdio.h> before include files that formerly used STDIO_PROTO.
13654
13655 * decl.c, g++spec.c, lex.c, method.c, repo.c:
13656 Include "config.h" first, as per autoconf manual.
13657
13658 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13659
13660 * decl.c (duplicate_decls): Tweak wording.
13661 * lex.c (do_pending_defargs): Don't die if we see a default arg
13662 that isn't a DEFAULT_ARG.
13663 * error.c (dump_expr): Handle DEFAULT_ARG.
13664
13665 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13666 * lang-options.h: Add -fhandle-exceptions.
13667
13668 * class.c (build_vtable): Vtables are artificial.
13669 (prepare_fresh_vtable): Likewise.
13670
13671 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13672
13673 * cvt.c (ocp_convert): After converting to the target type, set
13674 LOOKUP_NO_CONVERSION.
13675
13676 * call.c (joust): Warn about potentially confusing promotion rules
13677 with -Wsign-promo.
13678 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13679
13680 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
13681
13682 * exception.cc: Declare __terminate_func with noreturn attribute.
13683
13684 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13685
13686 * parse.y: Break out eat_saved_input, handle errors.
13687 (function_try_block): Use compstmt instead of compstmt_or_error.
13688
13689 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13690
13691 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13692
13693 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13694
13695 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13696 existence of cc1plus check whether $(LANGUAGES) contains C++.
13697
13698 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13699
13700 * method.c (do_build_copy_constructor): When copying an anonymous
13701 union member loop around to handle nested anonymous unions. Use
13702 the offset of the member relative to the outer structure, not the
13703 union.
13704
13705 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13706
13707 * call.c (resolve_args): New fn.
13708 (build_new_function_call): Use it.
13709 (build_object_call): Likewise.
13710 (build_new_method_call): Likewise.
13711
13712 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13713
13714 * call.c (build_over_call): tsubst all default parms from templates.
13715
13716 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13717
13718 * decl.c (struct cp_function): Add static_labelno.
13719 (push_cp_function_context): Save it.
13720 (pop_cp_function_context): Restore it.
13721
13722 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13723
13724 * typeck.c (build_component_ref_1): Convert from reference.
13725
13726 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13727
13728 * parse.y (current_declspecs, prefix_attributes): Initialize to
13729 NULL_TREE.
13730
13731 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13732 before we try to force it to be a TREE_LIST.
13733 (decl): Make sure $1.t is non-nil.
13734
13735 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13736
13737 * pt.c (uses_template_parms): Handle template first-parse codes.
13738
13739 * decl.c (cp_finish_decl): Only warn about user-defined statics.
13740
13741 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13742
13743 * pt.c (unify): Handle BOOLEAN_TYPE.
13744
13745 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13746 * pt.c (tsubst): Don't set it.
13747 * call.c (build_over_call): Use uses_template_parms.
13748
13749 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13750
13751 * method.c (build_overload_nested_name): Use static_labelno
13752 instead of var_labelno.
13753 (build_qualified_name): New fn.
13754 (build_overload_name): Split out from here.
13755 (build_static_name): Use build_qualified_name.
13756 * decl.c (cp_finish_decl): Statics in extern inline functions
13757 have comdat linkage.
13758 (start_function): Initialize static_labelno.
13759
13760 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13761
13762 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13763 before "all member functions in class [] are private".
13764
13765 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13766
13767 * lex.c (do_scoped_id): convert_from_reference.
13768 * init.c (build_offset_ref): Likewise.
13769
13770 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13771
13772 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13773
13774 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13775
13776 * typeck.c (get_member_function_from_ptrfunc): Promote index
13777 before saving it.
13778
13779 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13780
13781 * tree.c (layout_basetypes): Move non-virtual destructor warning.
13782 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13783
13784 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13785
13786 * decl.c (grokdeclarator): Call add_defarg_fn for the function
13787 type, too.
13788 * lex.c (add_defarg_fn): Adjust.
13789 (do_pending_defargs): Adjust. Don't skip the first parm.
13790
13791 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13792
13793 * decl.c (build_enumerator): Global enumerators are also readonly.
13794
13795 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13796 (build_dynamic_cast): Call it and convert_from_reference.
13797
13798 * lex.c (add_defarg_fn): New fn.
13799 (snarf_defarg): Don't add to defarg_types.
13800 (do_pending_defargs): Lose defarg_types. All fns we process now
13801 have defargs.
13802 * decl.c (grokfndecl): Call add_defarg_fn.
13803
13804 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13805 * cp-tree.def: Add DEFAULT_ARG.
13806 * spew.c (yylex): Call snarf_defarg as appropriate.
13807 * parse.y: New tokens DEFARG and DEFARG_MARKER.
13808 (defarg_again, pending_defargs, defarg, defarg1): New rules.
13809 (structsp): Use pending_defargs.
13810 (parms, full_parm): Use defarg.
13811 * lex.c (init_lex): Initialize inline_text_firstobj.
13812 (do_pending_inlines): Never pass the obstack to feed_input.
13813 (process_next_inline): Call end_input instead of restore_pending_input.
13814 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13815 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13816 * input.c (end_input): New fn.
13817 (sub_getch): At the end of some fed input, just keep returning EOF
13818 until someone calls end_input.
13819 Remove 'obstack' field from struct input_source.
13820 * decl.c (grokparms): Handle DEFAULT_ARG.
13821 (replace_defarg): New fn.
13822 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13823
13824 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13825
13826 * call.c (implicit_conversion): If nothing else works, try binding
13827 an rvalue to a reference.
13828
13829 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
13830
13831 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13832 ifndef for Cygwin32 to include SIGSEGV.
13833
13834 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13835
13836 * class.c (finish_struct_1): Only complain about pointers without
13837 copy stuff if there are any constructors.
13838
13839 * rtti.c (build_dynamic_cast): Call complete_type on the types.
13840
13841 * decl.c (grokfndecl): If the function we chose doesn't actually
13842 match, die.
13843
13844 * decl2.c (grokclassfn): Don't specify 'const int' for the
13845 artificial destructor parm.
13846
13847 * pt.c (type_unification): If we are called recursively, nothing
13848 decays.
13849
13850 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
13851
13852 * decl.c (init_decl_processing): Stop trying to catch signals
13853 other than SIGABRT since the Cygwin32 library doesn't support
13854 them correctly yet. This fixes a situation in which g++ causes
13855 a hang on SIGSEGVs and other such signals in our Win32-hosted
13856 tools.
13857
13858 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
13859
13860 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13861
13862 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13863
13864 * typeck2.c (store_init_value): Always return the value if our
13865 type needs constructing.
13866
13867 * method.c (hack_identifier): Convert class statics from
13868 reference, too.
13869
13870 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13871
13872 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13873
13874 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
13875
13876 * typeck.c (c_expand_return): Make sure we clean up temporaries at
13877 the end of return x;
13878
13879 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13880
13881 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13882
13883 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
13884
13885 * except.c (expand_builtin_throw): Add support
13886 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13887
13888 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13889
13890 * repo.c (extract_string): Null-terminate.
13891
13892 * cp-tree.h (TI_SPEC_INFO): New macro.
13893 (CLASSTYPE_TI_SPEC_INFO): New macro.
13894 * pt.c (push_template_decl): Correctly determine # of template parms
13895 for partial specs.
13896
13897 * call.c (compare_ics): Really fix 'this' conversions.
13898
13899 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13900 non-template fn.
13901
13902 * pt.c (push_template_decl): Complain about mismatch in # of
13903 template parms between a class template and a member template.
13904
13905 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13906
13907 * method.c (synthesize_method): You can't call
13908 function_cannot_inline_p after finish_function.
13909 * decl.c (finish_function): Turn on flag_inline_functions and turn
13910 off DECL_INLINE before handing a synthesized method to the
13911 backend.
13912
13913 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13914
13915 * method.c (synthesize_method): Remove July 30 change to never set
13916 DECL_INLINE if at_eof.
13917
13918 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
13919
13920 * xref.c (GNU_xref_member): Ensure that the node has a
13921 decl_lang_specific part before checking DECL_FRIEND_P.
13922
13923 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13924
13925 * pt.c (instantiate_class_template): Diagnose non-class types used
13926 as bases.
13927
13928 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13929
13930 * typeck.c (build_conditional_expr): Use convert_for_initialization
13931 instead of convert_and_check.
13932
13933 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13934
13935 * parse.y (typespec): Don't pedwarn for typeof.
13936
13937 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13938
13939 * repo.c (finish_repo): Only check changes if we would write a
13940 repo file.
13941
13942 * call.c (compare_ics): Fix handling of 'this' conversions.
13943
13944 * pt.c (do_decl_instantiation): Support static data too. Rename
13945 from do_function_instantiation.
13946 * cp-tree.h: Adjust.
13947 * parse.y: Adjust.
13948
13949 * repo.c (extract_string): New fn.
13950 (get_base_filename): Use it.
13951 (init_repo): Compare old args with current args.
13952
13953 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
13954
13955 * Makefile.in, Make-lang.in: Protect C-ls with a comment
13956 character, idea from Paul Eggert <eggert@twinsun.com>.
13957
13958 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
13959
13960 * typeck.c (c_expand_return): Be more persistent in looking for
13961 returned temps.
13962
13963 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13964 pointer to reference.
13965
13966 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13967
13968 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13969
13970 * init.c (build_member_call, build_offset_ref):
13971 Use do_scoped_id instead of do_identifier.
13972
13973 * cvt.c (convert): Remove bogosity.
13974
13975 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13976
13977 * cvt.c (build_up_reference): Do checks of ARGTYPE and
13978 TARGET_TYPE before trying to use get_binfo.
13979
13980 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13981
13982 * cvt.c (build_up_reference): Call get_binfo to get access control.
13983
13984 * decl2.c (import_export_decl): If we don't support weaks, leave
13985 statics undefined.
13986
13987 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
13988
13989 * except.c (expand_builtin_throw): Add support for machines that
13990 cannot access globals after throw's epilogue when
13991 -fno-sjlj-exceptions is used.
13992
13993 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13994
13995 * parse.y: 'std::' becomes '::'.
13996 * lex.c (real_yylex): Remove 'namespace' warning.
13997 * init.c (build_member_call): Ignore 'std::'.
13998 (build_offset_ref): Likewise.
13999 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14000 (do_toplevel_using_decl): Ignore 'using std::whatever'.
14001 * decl.c (push_namespace): Just sorry.
14002 (pop_namespace): Nop.
14003 (init_decl_processing): Declare std namespace.
14004
14005 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
14006
14007 * search.c (push_class_decls): A name which ambiguously refers to
14008 several instantiations of the same template just refers to the
14009 template.
14010
14011 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
14012
14013 * decl.c (build_enumerator): Fix problem with unsigned long
14014 enumerated values being smashed to ints, causing overflow
14015 when computing next enumerated value (for enum values around
14016 MAX_VAL).
14017
14018 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14019
14020 * typeck.c (build_component_ref): Only call mark_used on a decl.
14021
14022 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14023
14024 * typeck.c (build_c_cast): Make the check for a ptr to function
14025 more specific before possible default_conversion call.
14026
14027 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
14028
14029 * except.c (expand_exception_blocks): Simplify and fix and make
14030 sure we don't end a region in a sequence, as expand_end_bindings
14031 doesn't like it.
14032
14033 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
14034
14035 * except.c (init_exception_processing): Mark terminate as not
14036 returning so that the optimizer can optimize better.
14037
14038 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
14039
14040 * cvt.c (convert): Don't do any extra work, if we can avoid it
14041 easily.
14042
14043 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
14044
14045 * *.[chy]: Change cp_convert to ocp_convert, change convert to
14046 cp_convert. convert is now reserved for the backend, and doesn't
14047 have the semantics a frontend person should ever want.
14048
14049 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
14050
14051 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14052 Lose -traditional support.
14053
14054 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14055
14056 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14057
14058 * parse.y (self_reference): Do it for templates, too.
14059 * class.c (pushclass): Don't overload_template_name; the alias
14060 generated by build_self_reference serves the same purpose.
14061
14062 * tree.c (list_hash): Make static, take more args.
14063 (list_hash_lookup): Likewise.
14064 (list_hash_add): Make static.
14065 (list_hash_canon): Lose.
14066 (hash_tree_cons): Only build a new node if one isn't already in the
14067 hashtable.
14068 (hash_tree_chain): Use hash_tree_cons.
14069 * cp-tree.h: Adjust.
14070 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14071 of calling lookup_name.
14072
14073 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14074
14075 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14076 doesn't refer to the CONST_DECLs.
14077
14078 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
14079
14080 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14081 is bigger.
14082 (expand_class_desc): Convert the last argument to a sizetype.
14083
14084 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14085
14086 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14087 __real__): Add reswords.
14088 * hash.h: Regenerate.
14089 * lex.h (rid): Add RID_COMPLEX.
14090 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14091 * lex.c (init_lex): Add building of RID_COMPLEX.
14092 (real_yylex): General cleanup in line with what c-lex.c also has,
14093 sans the cruft for traditional; add handling of SPEC_IMAG, complex
14094 types, and imaginary numeric constants.
14095 * parse.y (REALPART, IMAGPART): Add tokens.
14096 (unary_expr): Add REALPART and IMAGPART rules.
14097 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14098 * decl.c (complex_{integer,float,double,long}_type_node): Define
14099 types.
14100 (init_decl_processing): Set up the types.
14101 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
14102 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14103 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14104 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14105 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14106 COMPLEX_TYPE case.
14107 * method.c (build_overload_name): Add handling of the different
14108 COMPLEX_TYPEs, prefixing them with `J'.
14109 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14110 as a template parm.
14111 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14112 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14113 (mapcar): Handle COMPLEX_CST.
14114 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14115 (common_type): Add code for complex types.
14116 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14117 (convert_for_assignment): Likewise.
14118 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14119
14120 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
14121
14122 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14123 tsubst_expr, as it might try to do overload resolution.
14124
14125 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
14126
14127 * pt.c (instantiate_class_template): Oops.
14128
14129 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14130
14131 * cp-tree.def: Add TAG_DEFN.
14132 * pt.c (tsubst_enum): New fn.
14133 (instantiate_class_template): Use it.
14134 (tsubst_expr): Support TAG_DEFN.
14135 (tsubst): Support local enums.
14136 (tsubst_copy): Likewise.
14137 * decl.c (finish_enum): Likewise.
14138 (start_enum): If this is a local enum, switch to permanent_obstack.
14139
14140 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
14141
14142 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14143 (finish_function): Put the base init code for constructors just
14144 after the parm cleanup insns.
14145 (struct cp_function): Add last_parm_cleanup_insn.
14146 (push_cp_function_context): Likewise.
14147 (pop_cp_function_context): Likewise.
14148
14149 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14150
14151 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14152
14153 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14154
14155 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14156 for THUNK_FNDECL before we switch to temporary allocation.
14157
14158 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
14159
14160 * call.c (build_new_op): Handle null arg2 for ?:.
14161
14162 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
14163
14164 * except.c (expand_exception_blocks): Ensure that we flow through
14165 the end of the exception region for the exception specification.
14166 Move exception region for the exception specification in, so that
14167 it doesn't protect the parm cleanup. Remove some obsolete code.
14168 * decl.c (store_parm_decls): Likewise.
14169 (finish_function): Likewise.
14170
14171 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
14172
14173 * init.c (build_new): Fix nothrow handling.
14174
14175 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14176
14177 * init.c (emit_base_init): Don't warn about the initialization
14178 list for an artificial member.
14179
14180 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14181
14182 * expr.c (do_case): Handle !START case for the error msg.
14183
14184 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
14185
14186 * decl2.c, lang-options.h: New option -Weffc++.
14187 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14188 to -Weffc++.
14189
14190 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14191 to MULTIPLE_SYMBOL_SPACES.
14192
14193 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
14194
14195 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14196
14197 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14198
14199 * typeck.c (c_expand_return): Don't complain about returning void
14200 to void in an artificial function.
14201 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14202 don't set DECL_RESULT, set DECL_ARTIFICIAL.
14203 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14204
14205 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
14206
14207 * init.c (init_decl_processing): Add support for setjmp/longjmp based
14208 exception handling.
14209 * except.c (init_exception_processing): Likewise.
14210 (expand_end_catch_block): Likewise.
14211 (expand_exception_blocks): Likewise.
14212 (expand_throw): Likewise.
14213 * exception.cc (__default_terminate): Likewise.
14214
14215 * init.c (perform_member_init): Use new method of expr level
14216 cleanups, instead of cleanups_this_call and friends.
14217 (emit_base_init): Likewise.
14218 (expand_aggr_vbase_init_1): Likewise.
14219 (expand_vec_init): Likewise.
14220 * decl.c (cp_finish_decl): Likewise.
14221 (expand_static_init): Likewise.
14222 (store_parm_decls): Likewise.
14223 (cplus_expand_expr_stmt): Likewise.
14224 * decl2.c (finish_file): Likewise.
14225
14226 * Make-lang.in (exception.o): Ok to compile with -O now.
14227
14228 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14229 we know it will be done later by the backend.
14230
14231 * decl2.c (lang_f_options): Remove support for short temps.
14232 * lang-options.h: Likewise.
14233
14234 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14235
14236 * tree.c (varargs_function_p): New fn.
14237 * method.c (emit_thunk): Replace broken generic code with code to
14238 generate a heavyweight thunk function.
14239
14240 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
14241
14242 * pt.c (process_template_parm): pedwarn about floating-point parms.
14243
14244 * decl.c (grokdeclarator): inline no longer implies static.
14245
14246 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14247
14248 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
14249
14250 * class.c (check_for_override): The signature of an overriding
14251 function is not changed.
14252
14253 * call.c (build_over_call): Move setting of conv into the loop.
14254 Note: this change, along with the related changes of the 18th thru
14255 the 20th of April, fix an infinite loop problem in conversions.
14256
14257 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14258
14259 * call.c (build_user_type_conversion_1): Really ignore rvalue
14260 conversions when looking for a REFERENCE_TYPE.
14261
14262 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14263 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14264 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14265 (build_unary_op): Likewise.
14266 * call.c (build_over_call): See through a CONVERT_EXPR around the
14267 ADDR_EXPR for on a temporary.
14268 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14269 the ADDR_EXPR for a local variable.
14270
14271 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
14272
14273 * call.c (build_user_type_conversion_1): If we're trying to
14274 convert to a REFERENCE_TYPE, only consider lvalue conversions.
14275 (build_new_function_call): Print candidates.
14276 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14277 (reference_binding): Binding a temporary of a reference-related type
14278 is BAD.
14279
14280 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14281
14282 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14283 * tinfo2.cc (type_info::before): Likewise.
14284
14285 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
14286
14287 * call.c (implicit_conversion): Oops.
14288
14289 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14290
14291 * call.c (implicit_conversion): Try to find a reference conversion
14292 before binding a const reference to a temporary.
14293
14294 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
14295
14296 * exception.cc (__default_unexpected): Call terminate by default,
14297 so that if the user overrides terminate, the correct function will
14298 be called.
14299
14300 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
14301
14302 * parse.y (left_curly): Avoid trying to use any fields of
14303 error_mark_node, as there aren't any.
14304
14305 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14306
14307 * lex.c (do_identifier): Avoid breaking on overloaded methods
14308 as default arguments.
14309
14310 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
14311
14312 * call.c (add_template_candidate): Initialize the variable "dummy".
14313
14314 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
14315
14316 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14317 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14318
14319 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14320
14321 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14322 (debug_binfo): Delete decl, not needed.
14323
14324 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14325 promotes_to_aggr_type): Delete fns.
14326 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14327 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14328 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14329
14330 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14331
14332 * friend.c (is_friend_type): Delete fn.
14333 * cp-tree.h (is_friend_type): Delete decl.
14334
14335 * decl.c (original_result_rtx, double_ftype_double,
14336 double_ftype_double_double, int_ftype_int, long_ftype_long,
14337 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14338 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14339
14340 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14341 fwd decls.
14342 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14343
14344 * decl.c (pushdecl_nonclass_level): #if 0, unused.
14345 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14346
14347 * lex.c (reinit_lang_specific): #if 0, unused.
14348 * cp-tree.h (reinit_lang_specific): #if 0 decl.
14349
14350 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14351 * cp-tree.h (revert_static_member_fn): Delete decl.
14352
14353 * class.c (root_lang_context_p): Delete fn.
14354 * cp-tree.h (root_lang_context_p): Delete decl.
14355
14356 * decl.c (set_current_level_tags_transparency): #if 0, unused.
14357 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14358
14359 * lex.c (set_vardecl_interface_info): Make static.
14360 * cp-tree.h (set_vardecl_interface_info): Delete decl.
14361
14362 * call.c (find_scoped_type): Make static.
14363 * cp-tree.h (find_scoped_type): Delete decl.
14364
14365 * search.c (convert_pointer_to_vbase): Make static.
14366 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14367
14368 * decl.c (const_ptr_type_node): Likewise.
14369 * cp-tree.h (const_ptr_type_node): Delete decl.
14370
14371 * typeck.c (common_base_type): Make static.
14372 * cp-tree.h (common_base_types): Delete erroneous decl.
14373
14374 * pt.c (classtype_mangled_name): Make static.
14375 * cp-tree.h (classtype_mangled_name): Delete decl.
14376
14377 * lex.c (check_newline): Make static.
14378 * cp-tree.h (check_newline): Delete decl.
14379
14380 * typeck.c (build_x_array_ref): Delete fn, same idea as
14381 grok_array_decl.
14382 * cp-tree.h (build_x_array_ref): Delete decl.
14383
14384 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14385 copy_lang_decl.
14386 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14387
14388 * class.c (build_vtable_entry): Make static.
14389 * cp-tree.h (build_vtable_entry): Delete decl.
14390
14391 * class.c (build_vbase_pointer): Make static.
14392 * cp-tree.h (build_vbase_pointer): Delete decl.
14393
14394 * sig.c (build_sptr_ref): Add forward decl and make static.
14395 * cp-tree.h (build_sptr_ref): Delete decl.
14396
14397 * call.c (build_new_method_call): Add forward decl and make static.
14398 * cp-tree.h (build_new_method_call): Delete decl.
14399
14400 * call.c (build_object_call): Make static.
14401 * class.c (check_for_override, complete_type_p, mark_overriders):
14402 Likewise.
14403 * decl.c (cp_function_chain): Likewise.
14404 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14405 Likewise.
14406 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14407 Likewise.
14408 * tree.c (build_cplus_array_type_1): Likewise.
14409 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14410 (comp_target_parms): Likewise.
14411
14412 * init.c (build_builtin_call): Make static.
14413 * cp-tree.h (build_builtin_call): Delete decl.
14414
14415 * typeck.c (binary_op_error): Delete decl.
14416 * cp-tree.h (binary_op_error): Likewise.
14417
14418 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14419
14420 * call.c (build_method_call): Compare against error_mark_node
14421 directly, rather than the ERROR_MARK tree code.
14422 * cvt.c (cp_convert): Likewise.
14423 * decl.c (print_binding_level): Likewise.
14424 (duplicate_decls): Likewise.
14425 (grokdeclarator): Likewise.
14426 (grokdeclarator): Likewise.
14427 * init.c (expand_aggr_init_1): Likewise.
14428 (decl_constant_value): Likewise.
14429 * method.c (build_opfncall): Likewise.
14430 (hack_identifier): Likewise.
14431 * typeck.c (build_modify_expr): Likewise.
14432
14433 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14434
14435 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14436
14437 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14438
14439 * pt.c (coerce_template_parms): Add new error message.
14440
14441 * method.c (build_overload_value): Implement name mangling for
14442 floating-point template arguments.
14443
14444 * method.c (build_overload_int, icat, dicat): Fix mangling of template
14445 arguments whose absolute value doesn't fit in a signed word.
14446
14447 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14448
14449 * friend.c: New file; put all of the friend stuff in here.
14450 * init.c: Instead of here.
14451 * Makefile.in (CXX_OBJS): Add friend.o.
14452 (friend.o): Add dependencies.
14453 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14454
14455 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
14456
14457 * call.c (build_scoped_method_call): Complain if the scope isn't a
14458 base.
14459
14460 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14461
14462 * parse.y (left_curly): Don't crash on erroneous type.
14463
14464 * init.c (build_delete): Fix type of ref.
14465
14466 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14467
14468 * search.c (get_vbase_1): Renamed from get_vbase.
14469 (get_vbase): Wrapper, now non-static.
14470 (convert_pointer_to_vbase): Now static.
14471
14472 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14473 * init.c (build_delete): Pass one.
14474 (build_partial_cleanup_for): Use build_scoped_method_call.
14475 * decl.c (finish_function): Pass a binfo.
14476
14477 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14478
14479 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14480
14481 * typeck.c (build_c_cast): Lose other reference to flag.
14482
14483 * call.c (build_field_call): Don't look for [cd]tor_identifier.
14484 * decl2.c (delete_sanity): Remove meaningless use of
14485 LOOKUP_HAS_IN_CHARGE.
14486 * decl.c (finish_function): Use build_scoped_method_call instead
14487 of build_delete for running vbase dtors.
14488 * init.c (build_delete): Call overload resolution code instead of
14489 duplicating it badly.
14490
14491 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
14492
14493 * call.c (build_over_call): Call mark_used before trying to elide
14494 the call.
14495
14496 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14497
14498 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14499
14500 * typeck.c (build_modify_expr): Always pedwarn for a cast to
14501 non-reference used as an lvalue.
14502
14503 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14504
14505 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14506
14507 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14508
14509 * parse.y (handler): Fix template typo.
14510
14511 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14512
14513 * error.c (lang_decl_name): New fn.
14514 * tree.c (lang_printable_name): Use it.
14515
14516 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
14517
14518 * g++spec.c: Include config.h so that we can catch bzero #defines
14519 from the config file.
14520
14521 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
14522
14523 * new1.cc: Include a declaration for malloc, to avoid warning, and
14524 avoid lossing on systems that require one (ones that define malloc
14525 in xm.h).
14526
14527 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14528
14529 * decl2.c (max_tinst_depth): New variable.
14530 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14531 option.
14532 * pt.c (max_tinst_depth): Variable moved.
14533 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14534 as legal.
14535
14536 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14537
14538 * decl.c (xref_basetypes): Allow a base class that depends on
14539 template parms to be incomplete.
14540
14541 * decl2.c (build_expr_from_tree): Support typeid(type).
14542 * rtti.c (get_typeid): Support templates.
14543 (expand_si_desc, expand_class_desc): Fix string length.
14544 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14545
14546 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14547
14548 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14549
14550 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14551
14552 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14553
14554 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14555 smashes together template and non-template decls of the same
14556 signature.
14557
14558 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14559
14560 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14561
14562 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14563
14564 * decl.c (duplicate_decls): Next route, pedwarn about different
14565 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14566
14567 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14568
14569 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14570 (struct lang_type): Delete has_default_implementation member.
14571 Increase dummy to 21.
14572 * decl.c (start_method): Delete usage.
14573
14574 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14575 store_after_parms, start_decl_1, auto_function): Add decls.
14576 (get_arglist_len_in_bytes, declare_implicit_exception,
14577 have_exceptions_p, make_type_decl, typedecl_for_tag,
14578 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14579 build_component_type_expr, cplus_exception_name,
14580 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14581 * call.c (build_this): Make static.
14582 (is_complete): Likewise.
14583 (implicit_conversion): Likewise.
14584 (reference_binding): Likewise.
14585 (standard_conversion): Likewise.
14586 (strip_top_quals): Likewise.
14587 (non_reference): Likewise.
14588 (build_conv): Likewise.
14589 (user_harshness): Likewise.
14590 (rank_for_ideal): Likewise.
14591 * decl.c (start_decl_1): Delete forward decl.
14592 (push_decl_level): Make static.
14593 (resume_binding_level): Make static.
14594 (namespace_bindings_p): Make static.
14595 (declare_namespace_level): Make static.
14596 (lookup_name_real): Make static.
14597 (duplicate_decls): Make static. Take register off NEWDECL and
14598 OLDDECL parm decls.
14599 * decl2.c (get_sentry): Make static.
14600 (temp_name_p): Delete fn.
14601 * except.c (auto_function): Delete decl.
14602 * lex.c (handle_{cp,sysv}_pragma): Make static.
14603 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14604 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14605 * pt.c (tsubst_expr_values): Make static.
14606 * rtti.c (combine_strings): Delete decl.
14607
14608 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
14609
14610 * pt.c (push_template_decl): Handle getting a typedef.
14611
14612 * call.c (build_new_function_call): Complain about void arg.
14613
14614 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14615
14616 * decl.c (duplicate_decls): Give pedwarn of different exceptions
14617 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14618
14619 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
14620
14621 * except.c (expand_throw): Don't expand the cleanup tree here,
14622 since we are not going to write the rtl out. Fixes problem with
14623 -g -O on SPARC.
14624
14625 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
14626
14627 * Make-lang.in: Add $(exeext) as necessary.
14628
14629 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
14630
14631 * parse.y (handler_seq): Must have at least one catch clause.
14632
14633 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14634
14635 * call.c (add_builtin_candidate): Restore ?: hack.
14636
14637 * decl.c (grok_op_properties): More warnings.
14638
14639 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14640
14641 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14642 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14643
14644 * decl.c (duplicate_decls): Scale back to a warning, and only do
14645 'em if -pedantic.
14646
14647 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
14648
14649 * decl.c (duplicate_decls): pedwarn mismatched exception
14650 specifications.
14651
14652 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
14653
14654 * call.c (build_new_method_call): Don't display the invisible
14655 argument for controlling virtual bases.
14656
14657 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
14658
14659 * new: Add nothrow new and delete, bad_alloc and throw specifications
14660 for delete.
14661 * decl.c (init_decl_processing): Add throw specification for delete.
14662 * new.cc (nothrow): Define.
14663 * lex.c (real_yylex): Removing warning that throw and friends are
14664 keywords.
14665 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14666 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14667 * Make-lang.in: Add new{1,2}.{cc,o}.
14668
14669 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14670
14671 * lex.c (cons_up_default_function): Fix return type of synth op=.
14672
14673 * init.c (emit_base_init): Add warnings for uninitialized members
14674 and bases.
14675
14676 * decl.c (xref_basetypes): Add warning for non-polymorphic type
14677 with destructor used as base type.
14678
14679 * decl.c (grok_op_properties): Add warning for op= returning void.
14680 * typeck.c (c_expand_return): Add warning for op= returning anything
14681 other than *this.
14682
14683 * class.c (finish_struct_1): Add warning for class with pointers
14684 but not copy ctor or copy op=.
14685
14686 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14687 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14688 (instantiate_template): If -fexternal-templates, add this
14689 instantiation to pending_templates.
14690
14691 * decl2.c (copy_assignment_arg_p): Disable old hack to support
14692 Booch components.
14693
14694 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
14695
14696 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14697
14698 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14699
14700 * call.c (standard_conversion): Handle getting references. Tack
14701 on RVALUE_CONV here. Do it for non-class types, too.
14702 (reference_binding): Pass references to standard_conversion.
14703 (implicit_conversion): Likewise.
14704 (add_builtin_candidate): Disable one ?: kludge.
14705 (convert_like): Handle RVALUE_CONVs for non-class types.
14706 (joust): Disable the other ?: kludge.
14707
14708 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14709
14710 * decl.c (init_decl_processing): Add code to build up common
14711 function types beforehand, to avoid creation then removal of
14712 things already in the hash table.
14713
14714 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14715
14716 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14717 the arguments.
14718
14719 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14720 current_template_parms.
14721
14722 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
14723
14724 * search.c (lookup_field): Don't return a function, check want_type.
14725
14726 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14727
14728 * init.c (build_new): Make sure PLACEMENT has a type.
14729
14730 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14731
14732 * init.c (build_new): Support new (nothrow).
14733
14734 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14735
14736 * pt.c (instantiate_decl): Also do push_to_top_level before setting
14737 up DECL_INITIAL.
14738
14739 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14740 * pt.c (tsubst): Defer instantiation of default args.
14741 * call.c (build_over_call): Until here.
14742
14743 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14744
14745 * search.c (lookup_field): Make sure we have an
14746 IDENTIFIER_CLASS_VALUE before we try to return it.
14747
14748 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14749
14750 * call.c (build_method_call): Delete unused var PARM.
14751 (build_overload_call_real): Likewise.
14752 (build_object_call): Delete unused var P.
14753 (build_new_op): Likewise.
14754 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14755 var definitions, which are never used.
14756 (shadow_tag): Delete unused var FN.
14757 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14758 * init.c (build_new): Delete unused var ALLOC_TEMP.
14759 * method.c (hack_identifier): Delete unused var CONTEXT.
14760 (do_build_copy_constructor): Delete unused var NAME.
14761 (synthesize_method): Delete unused var BASE.
14762 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14763 * rtti.c (build_headof): Delete unused var VPTR.
14764 (get_typeid): Delete unused var T.
14765 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14766 and ORIG_OP2.
14767 (build_ptrmemfunc): Delete unused vars U and NINDEX.
14768 * typeck2.c (build_functional_cast): Delete unused var BINFO.
14769
14770 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
14771
14772 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14773 things in a type being defined.
14774 * decl.c (finish_enum): Reverse the values so that they are in
14775 the correct order.
14776
14777 * pt.c (instantiate_class_template): Don't initialize
14778 BINFO_BASETYPES until the vector is filled out.
14779 (unify): Don't abort on conflicting bindings, just fail.
14780 (instantiate_decl): Do push_tinst_level before any tsubsting.
14781
14782 * method.c (build_overload_value): Handle getting a
14783 TEMPLATE_CONST_PARM for a pointer.
14784
14785 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
14786
14787 * init.c (expand_member_init): Don't give 'not a base' error for
14788 templates.
14789
14790 * pt.c (instantiate_decl): Call import_export_decl later.
14791
14792 * pt.c (instantiate_class_template): Return a value.
14793
14794 * parse.y (extension): New rule for __extension__.
14795 (extdef, unary_expr, decl, component_decl): Use it.
14796
14797 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
14798
14799 * class.c (base_binfo): Remove unused base_has_virtual member.
14800 (finish_base_struct): Likewise.
14801 (finish_struct_1): Likewise.
14802
14803 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
14804
14805 * search.c (expand_upcast_fixups): Fix bogus code generation
14806 problem where the generated code uses the wrong index into the
14807 runtime built vtable on the stack. Old code could clobber random
14808 stack values.
14809
14810 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
14811
14812 * init.c (perform_member_init): Make sure the partial EH cleanups
14813 live on the function_obstack.
14814
14815 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
14816
14817 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14818 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14819
14820 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
14821
14822 * decl.c (grokvardecl): Avoid ANSI style initialization.
14823
14824 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14825
14826 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14827
14828 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14829
14830 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14831
14832 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14833
14834 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14835 arguments we compare against. Start the count of I at 1, not 0,
14836 since argv[0] is still the command.
14837
14838 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
14839
14840 * lang-specs.h: Accept .cp as an C++ extension.
14841
14842 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14843
14844 * cp-tree.h (ptr_reasonably_similar): Add decl.
14845
14846 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14847
14848 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14849 pointer. New local SPECBITS with the parm's value.
14850 (grokdeclarator): Pass &specbits down.
14851
14852 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14853 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14854
14855 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14856 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14857
14858 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14859 not an error_mark_node.
14860
14861 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14862
14863 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14864 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14865
14866 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14867
14868 * decl.c (grokdeclarator): When giving an anonymous struct a name,
14869 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14870 not affected).
14871
14872 * typeck2.c (build_m_component_ref): If component is a pointer
14873 to data member, resolve the OFFSET_REF now.
14874
14875 * call.c (convert_like): Don't go into infinite recursion.
14876
14877 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14878
14879 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14880 * tree.c (layout_basetypes): And on the vbase ptr.
14881
14882 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14883
14884 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14885 CHAR_TYPE_SIZE so bool is always the same size as another type.
14886
14887 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14888
14889 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
14890
14891 * decl2.c (grok_x_components): Remove synthesized methods from
14892 TYPE_METHODS of an anonymous union, complain about member
14893 functions.
14894 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14895 anonymous unions.
14896 (finish_function): Just clear the DECL_RTL of our arguments.
14897
14898 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14899
14900 * decl2.c (finish_file): Emit DWARF debugging info for static data
14901 members.
14902
14903 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14904
14905 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
14906
14907 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14908 IDENTIFIER_NODE.
14909
14910 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14911
14912 * Make-lang.in (g++-cross$(exeext)): Fix typo.
14913
14914 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14915
14916 Make the g++ driver now be a standalone program, rather than one
14917 that tries to run the gcc driver after munging up the options.
14918 * Make-lang.in (g++.c, g++spec.o): New rules.
14919 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14920 added.
14921 (g++$(exeext)): New rule, based on xgcc rule.
14922 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14923 * g++spec.c: New file.
14924 * g++.c: Removed file.
14925
14926 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
14927
14928 * cvt.c (build_up_reference): Arrange for any temporary values
14929 that have been keep in registers until now to be put into memory.
14930
14931 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14932
14933 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14934 that make -j3 bootstrap works better.
14935
14936 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14937
14938 * decl.c (pushtag): Do pushdecl for anon tags.
14939
14940 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14941
14942 * typeck.c (c_expand_return): Fix logic.
14943 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14944
14945 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
14946
14947 * g++.c (main): Make sure arglist has a final NULL entry. Add
14948 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14949 stdin/stdout of the invoked program are redirected to
14950 nowheresville.
14951
14952 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14953
14954 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14955
14956 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
14957
14958 * init.c (resolve_offset_ref): Handle obj.vfn better.
14959 * typeck.c (build_component_ref): Set TREE_TYPE on result from
14960 build_vfn_ref.
14961
14962 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
14963
14964 * typeck.c (convert_for_assignment): Also handle anachronistic
14965 implicit conversions from (::*)() to cv void*.
14966 * cvt.c (cp_convert_to_pointer): Likewise.
14967
14968 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14969
14970 * lex.c (handle_cp_pragma): Fix bogus warning.
14971
14972 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
14973
14974 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14975 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14976
14977 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14978
14979 * class.c (finish_struct_1): Support DWARF2_DEBUG.
14980 * search.c (dfs_debug_mark): Likewise.
14981 * decl2.c (finish_vtable_vardecl): Likewise.
14982 * decl.c (pushtag, finish_enum): Likewise.
14983 * lex.c (check_newline): Use debug_* instead of calling *out
14984 functions directly.
14985
14986 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14987
14988 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14989 on some picky hosts.
14990
14991 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14992
14993 * class.c (finish_struct_1): A class has a non-trivial copy
14994 constructor if it has virtual functions.
14995
14996 * cvt.c (cp_convert): Always call a constructor.
14997
14998 * call.c (reference_binding): Still tack on a REF_BIND
14999 for bad conversions.
15000 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15001
15002 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15003 (c_expand_return): Likewise.
15004 * typeck2.c (digest_init): Likewise for { }.
15005 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15006 * cvt.c (cp_convert): Handle failure better.
15007
15008 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15009
15010 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15011 of GCC be path-relative.
15012
15013 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15014
15015 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15016 it does need choose-temp.o and pexecute.o.
15017
15018 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15019
15020 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15021 that we still use it.
15022 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15023
15024 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
15025
15026 * init.c (expand_default_init): Avoid calling constructors to
15027 initialize reference temps.
15028
15029 * cvt.c (convert_to_reference): Fix.
15030
15031 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15032
15033 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15034 (convert_to_reference): Likewise.
15035 * typeck.c (convert_for_initialization): Likewise.
15036 * init.c (expand_default_init): Likewise.
15037 (expand_aggr_init_1): Likewise.
15038 * cp-tree.h (CONV_NONCONVERTING): Lose.
15039 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15040 * *.c: Adjust.
15041 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15042
15043 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
15044
15045 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15046
15047 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15048
15049 * init.c (expand_aggr_init_1): Don't crash on non-constructor
15050 TARGET_EXPR.
15051
15052 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15053
15054 * g++.c: Include gansidecl.h.
15055 (VPROTO, PVPROTO, VA_START): Delete.
15056 (choose_temp_base_try, choose_temp_base, perror_exec,
15057 run_dos) [__MSDOS__]: Delete fns.
15058 (pfatal_with_name): Delete fn.
15059 (temp_filename): Declare like in gcc.c.
15060 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15061 (error_count, signal_count): Define.
15062 (error): Delete both definitions.
15063 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15064 (pfatal_pexecute): Add fn from gcc.c.
15065 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
15066 code to use the pexecute stuff also used by gcc.c.
15067 (MIN_FATAL_STATUS): Define.
15068 * Make-lang.in (g++): Add dependency on and linking with
15069 choose-temp.o and pexecute.o.
15070
15071 * cp-tree.h: Include gansidecl.h.
15072 (STDIO_PROTO): Delete #undef/#define.
15073 * cvt.c (NULL): Delete #undef/#define.
15074 * expr.c (NULL): Likewise.
15075 * init.c (NULL): Likewise.
15076 * rtti.c (NULL): Likewise.
15077 * xref.c (NULL): Likewise.
15078
15079 * cp-tree.h (build_user_type_conversion): Add prototype.
15080 * call.c (build_user_type_conversion): Delete prototype. Correct
15081 decl of FLAGS arg to be an int.
15082 * cvt.c (build_user_type_conversion): Likewise.
15083
15084 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
15085
15086 * cp-tree.def: Add TRY_BLOCK and HANDLER.
15087 * except.c (expand_start_catch_block): Support templates.
15088 * parse.y (try_block, handler_seq): Likewise.
15089 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15090
15091 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15092
15093 * pt.c (current_template_args): New fn.
15094 (push_template_decl): Use it.
15095 * decl.c (grokdeclarator): Use it.
15096
15097 * decl2.c (build_expr_from_tree): Dereference ref vars.
15098
15099 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15100 the decl-specifier-seq.
15101
15102 * decl.c (grok_op_properties): Don't force the type of a conversion
15103 op to be complete. Don't warn about converting to the same type
15104 for template instantiations.
15105
15106 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15107 methods.
15108
15109 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
15110
15111 * typeck.c (get_delta_difference): Remove previous bogusness.
15112 Don't give errors if force is set.
15113
15114 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15115
15116 * decl2.c (finish_file): Don't emit debug info.
15117 * decl.c (pushdecl): Lose obsolete code.
15118 (grokdeclarator): Still do the long long thing after complaining.
15119 * search.c (note_debug_info_needed): Don't do anything if we're in a
15120 template.
15121 * method.c (synthesize_method): For non-local classes,
15122 push_to_top_level first.
15123
15124 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
15125
15126 * typeck.c (get_delta_difference): Add no_error parameter.
15127 (build_ptrmemfunc): Call get_delta_difference with no_error set;
15128 we don't want error messages when converting unrelated
15129 pointer-to-member functions.
15130
15131 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
15132
15133 * error.c (dump_expr): Improve the wording on error messages that
15134 involve pointer to member functions.
15135
15136 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
15137
15138 * cvt.c (cp_convert_to_pointer): Move code for conversions from
15139 (::*)() to void* or (*)() up a bit, so that we can convert from
15140 METHOD_TYPEs as well.
15141
15142 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15143
15144 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15145 There are no 'member' types.
15146 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15147 (build_x_typeid): Handle errors.
15148
15149 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
15150
15151 * typeck.c (convert_for_assignment): Handle anachronistic implicit
15152 conversions from (::*)() to void* or (*)().
15153 * cvt.c (cp_convert_to_pointer): Likewise.
15154 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15155 conversions from here.
15156 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15157 * lang-options.h: Likewise.
15158 * decl2.c (warn_pmf2ptr): Define.
15159 * cp-tree.h: Declare it.
15160 * typeck2.c (digest_init): Allow pmfs down into
15161 convert_for_initialization.
15162
15163 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15164
15165 * typeck.c (c_expand_return): Fix for returning overloaded fn.
15166
15167 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15168
15169 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15170 * decl.c (grok_reference_init): Pass DIRECT_BIND.
15171 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
15172 DIRECT_BIND.
15173 * call.c (convert_like): Don't pass INDIRECT_BIND.
15174 * typeck.c (convert_arguments): Likewise.
15175 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15176
15177 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15178
15179 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15180 similar code in build_up_ref.
15181 * cvt.c (build_up_reference): Drastically simplify.
15182
15183 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
15184
15185 * typeck.c (signed_or_unsigned_type): If the given type already
15186 as the correct signedness, then just return it.
15187
15188 * typeck.c ({un,}signed_type): If can't do anything, call
15189 signed_or_unsigned_type.
15190
15191 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
15192
15193 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15194 current_class_type is NULL.
15195
15196 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
15197
15198 * class.c (finish_struct_1): Avoid empty structs by adding a field
15199 so layout_type gets the mode right.
15200
15201 * typeck.c (c_expand_return): Drastically simplify.
15202
15203 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15204
15205 * typeck.c (decay_conversion): Handle overloaded methods.
15206
15207 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
15208
15209 * call.c (build_over_call): A TARGET_EXPR has side-effects.
15210
15211 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
15212
15213 * cvt.c (convert_to_pointer_force): Add code to support pointer to
15214 member function to pointer to function conversions.
15215 * init.c (resolve_offset_ref): Add code to allow faked up objects,
15216 ignoring them if they are not used, and giving an error, if they
15217 are needed.
15218 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15219 code, and so that we can give an error, if we needed an object,
15220 and one was not provided.
15221 (build_c_cast): Don't call default_conversion when we want to
15222 convert to pointer to function from a METHOD_TYPE.
15223
15224 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15225
15226 * Make-lang.in (cplib2.ready): Fix logic.
15227
15228 * decl.c (shadow_tag): Only complain about non-artificial function
15229 members.
15230
15231 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15232
15233 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
15234
15235 * expr.c (cplus_expand_expr): Pre-tweak call_target like
15236 expand_inline_function would.
15237
15238 * pt.c (mark_decl_instantiated): If extern_p, call
15239 mark_inline_for_output.
15240
15241 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
15242
15243 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15244 pmd conversions.
15245
15246 * typeck.c (get_delta_difference): Fix wording, as we can be used
15247 for pointer to data members.
15248
15249 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
15250
15251 * pt.c (tsubst): If the function decl isn't a member of this
15252 template, return a copy of the decl (including copying the
15253 lang-specific part) so we don't hose ourselves later.
15254
15255 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15256
15257 * class.c (finish_struct): Remove DWARF-specific tag handling.
15258 * decl.c (pushtag): Likewise.
15259 (finish_function): Always clear DECL_ARGUMENTS on function decls with
15260 no saved RTX.
15261 * decl2.c (finish_file): Emit DWARF debugging info for static data
15262 members.
15263
15264 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
15265
15266 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15267 isn't the same as the new one before we whack it.
15268
15269 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
15270
15271 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15272 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15273 warn_traditional and warn_strict_prototypes; remove ancient
15274 'overload' code; remove references to flag_traditional.
15275
15276 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
15277
15278 * input.c (sub_getch): Handle 8-bit characters in string literals.
15279
15280 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
15281
15282 * tree.c (mapcar): Handle CONSTRUCTORs.
15283 (copy_to_permanent): Handle expression_obstack properly.
15284
15285 * Make-lang.in (cplib2.txt): Also depend on the headers.
15286
15287 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15288 INT_TYPE_SIZE.
15289 (expand_class_desc): Use USItype for offset field.
15290 * tinfo.h (struct __class_type_info): Likewise.
15291
15292 * method.c (build_overload_int): TYPE_PRECISION should be applied
15293 to types.
15294
15295 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15296
15297 * call.c (build_new_op): A COND_EXPR involving void must be a
15298 builtin.
15299
15300 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15301
15302 * typeck.c (build_x_component_ref): New fn.
15303 (build_object_ref): Use it.
15304 * parse.y (primary): Use it.
15305 * decl2.c (build_expr_from_tree): Use it.
15306 * cp-tree.h: Declare it.
15307
15308 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15309 * error.c (dump_type_suffix): Handle variable arrays.
15310
15311 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15312
15313 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15314
15315 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15316
15317 * decl.c (lookup_name_real): Don't try to look up anything in a
15318 TYPENAME_TYPE.
15319
15320 * tinfo2.cc (__throw_type_match_rtti): Oops.
15321
15322 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15323
15324 * Make-lang.in (exception.o): Use -fno-PIC for now.
15325
15326 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15327
15328 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15329 calling them.
15330 (get_tinfo_fn_dynamic): Extracted from build_typeid.
15331 * tinfo2.cc (__dynamic_cast): Adjust.
15332
15333 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15334 (build_x_typeid): Likewise.
15335
15336 * parse.y: Call build_x_typeid instead of build_typeid.
15337 * cp-tree.def: Add TYPEID_EXPR.
15338 * pt.c (tsubst_copy): Handle typeid.
15339 * decl2.c (build_expr_from_tree): Likewise.
15340 * rtti.c (build_x_typeid): Throw bad_typeid from here.
15341 (build_typeid): Not here.
15342 * cp-tree.h: Declare build_x_typeid.
15343
15344 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
15345
15346 * call.c (convert_like): Pull out constant values.
15347
15348 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15349
15350 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15351
15352 * decl.c (init_decl_processing): Create short int types before
15353 creating size_t in case a machine description needs to use
15354 unsigned short for size_t.
15355
15356 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15357
15358 * Make-lang.in (exception.o): Turn off pic.
15359
15360 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15361 type, multi-level ptr conversions.
15362
15363 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15364 (throw_bad_cast): Use it.
15365 (throw_bad_typeid): New fn.
15366 (build_typeid): Throw bad_typeid as needed.
15367 Use build_call.
15368 (synthesize_tinfo_fn): Handle functions and arrays before checking
15369 for cv-quals.
15370
15371 * Remove .h from standard C++ headers, add new.h, move into inc
15372 subdirectory.
15373
15374 * exception*: Remove pointer from object, constructors. Add
15375 default exception::what that uses type_info::name. Add
15376 __throw_bad_typeid.
15377
15378 * init.c (build_new): Don't add a cookie to new (void *) T[2].
15379
15380 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15381
15382 * Make-lang.in: Building C++ code depends on cc1plus.
15383
15384 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15385
15386 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15387 a HOST_WIDE_INT, not a tree.
15388
15389 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15390
15391 * exception.cc: Don't include <stdlib.h>.
15392
15393 * Make-lang.in (c++.clean): Remove cplib2.*.
15394
15395 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
15396
15397 * parse.y (component_decl_1, component_costructor_declarator case):
15398 Pass attributes/prefix_attributes in tree list.
15399
15400 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15401
15402 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15403
15404 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15405
15406 * lex.c (do_identifier): Don't do deferred lookup in a template
15407 header.
15408
15409 * typeck2.c (store_init_value): Oops.
15410
15411 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15412 New files for C++ lang-support library.
15413 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15414 (CXX_LIB2FUNCS): Define.
15415 And rules for building the C++ lang-support code.
15416 * config-lang.in (headers): Define.
15417 (lib2funcs): Define.
15418
15419 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15420
15421 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15422 digest_init.
15423 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15424 * typeck2.c (store_init_value): Check for initializing pmf with { }
15425 here.
15426 (process_init_constructor): Not here.
15427
15428 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15429
15430 * pt.c (begin_template_parm_list): Increment
15431 processing_template_decl here.
15432 (end_template_parm_list): Not here.
15433 (process_template_parm): No need to add 1 to it now.
15434 * *.c: Use processing_template_decl instead of current_template_parms
15435 to check for being in a template.
15436
15437 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
15438 (tsubst_copy): Handle CONSTRUCTOR.
15439 (instantiate_decl): Set up context properly for variables.
15440 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15441 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15442
15443 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15444
15445 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15446
15447 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15448
15449 * method.c (make_thunk): Call comdat_linkage before setting the
15450 TREE_CODE.
15451
15452 * decl2.c (comdat_linkage): Use make_decl_one_only.
15453 (import_export_decl): Likewise.
15454 * decl.c (init_decl_processing): Check supports_one_only instead of
15455 SUPPORTS_WEAK.
15456
15457 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15458
15459 * decl2.c (grokfield): Tighten checking for access decls.
15460
15461 * decl.c (make_typename_type): Resolve references to
15462 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
15463 (lookup_name_real): Types that depend on a template parameter get
15464 an implicit 'typename' unless they're in the current scope.
15465 (start_decl_1): We don't care about incomplete types that depend
15466 on a template parm.
15467 (grokdeclarator): Resolve 'typename's in the type specifier that
15468 refer to members of the current scope.
15469
15470 * call.c (build_over_call): Remove 'inline called before
15471 definition' diagnostic.
15472 (build_method_call): Likewise.
15473 * decl.c (duplicate_decls): Downgrade 'used before declared
15474 inline' to a warning, only with -Winline.
15475
15476 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
15477
15478 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15479
15480 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15481
15482 * call.c (build_method_call): When calling a signature
15483 default implementation, as in other cases, let instance_ptr simply
15484 be instance.
15485
15486 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
15487
15488 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15489
15490 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
15491
15492 * except.c (expand_start_catch_block): Add a pushlevel so that -g
15493 works on hppa and SPARC.
15494
15495 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15496
15497 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15498
15499 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15500
15501 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15502 before testing whether it's a signature.
15503
15504 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15505
15506 * call.c (build_new_method_call): Don't complain about signature
15507 pointers and references not being an aggr type.
15508 (build_this): If a signature pointer or reference was passed in,
15509 just return it.
15510 (build_new_method_call): If instance is a signature pointer, set
15511 basetype to the signature type of instance.
15512 * sig.c (build_signature_method_call): Deleted basetype and
15513 instance parameters, they can be found as the DECL_CONTEXT of
15514 function and as the first argument passed in.
15515 * cp-tree.h: Changed declaration of build_signature_method_call.
15516 * call.c (build_method_call): Deleted first two arguments in call
15517 of build_signature_method_call.
15518 (build_over_call): Added call to build_signature_method_call.
15519
15520 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15521
15522 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15523 target_expr.
15524
15525 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15526
15527 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15528
15529 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
15530
15531 * except.c (expand_start_try_stmts): Move to except.c in the backend.
15532 (expand_end_try_stmts): Remove.
15533
15534 * init.c (perform_member_init): Use add_partial_entry () instead
15535 of directly manipulating lists.
15536 (emit_base_init): Likewise.
15537
15538 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
15539
15540 * except.c (expand_exception_blocks): Always make sure USE and
15541 CLOBBER insns that came at the end still do, the backend relies
15542 upon this.
15543
15544 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
15545
15546 * call.c (build_over_call): We can only use a TARGET_EXPR of the
15547 right type.
15548
15549 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15550
15551 * cvt.c (convert_to_reference): Revert last change, don't complain
15552 about temp without target decl.
15553
15554 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
15555
15556 * decl.c (grokdeclarator): Don't core dump when void() is given.
15557
15558 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15559
15560 * decl.c (copy_args_p): Don't crash.
15561
15562 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
15563
15564 * pt.c (tsubst): And support template args inside the exception
15565 specification.
15566
15567 * pt.c (tsubst): Add support for exception specifications in
15568 template functions.
15569
15570 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
15571
15572 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15573 fields now.
15574 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15575 (start_function): Likewise.
15576 (start_method): Likewise.
15577 (grokfield): Likewise.
15578 (make_call_declarator): Add throw spec parameter.
15579 (set_quals_and_spec): Add routine.
15580 * lex.c (set_quals_and_spec): Likewise.
15581 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15582 * decl.c (shadow_tag): Eliminate the throw spec parameter to
15583 grokdeclarator.
15584 (groktypename): Likewise.
15585 (start_decl): Eliminate the throw spec parameter. Eliminate the
15586 throw spec parameter to grokdeclarator. Eliminate the throw spec
15587 field in DECL_STMT.
15588 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15589 (grokfndecl): Remove useless set of raises.
15590 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
15591 the throw spec parameter to start_decl. Pull the throw spec out
15592 of the call declarator.
15593 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15594 (start_function): Eliminate the throw spec parameter. Eliminate
15595 the throw spec parameter to grokdeclarator.
15596 (start_method): Likewise.
15597 * decl2.c (grokfield): Likewise.
15598 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15599 (grokoptypename): Likewise.
15600 (finish_file): Eliminate the throw spec parameter to
15601 start_function. Add throw spec to make_call_declarator.
15602 * except.c (init_exception_processing): Add throw spec to
15603 make_call_declarator. Eliminate the throw spec parameter to
15604 start_decl.
15605 (expand_start_catch_block): Eliminate the throw spec parameter to
15606 grokdeclarator.
15607 (expand_builtin_throw): Add throw spec to make_call_declarator.
15608 Eliminate the throw spec parameter to start_function.
15609 (start_anon_func): Likewise.
15610 * lex.c (make_call_declarator): Add throw spec parameter.
15611 (set_quals_and_spec): New routine.
15612 (cons_up_default_function): Add throw spec to make_call_declarator.
15613 Eliminate the throw spec parameter to grokfield.
15614 * method.c (synthesize_method): Eliminate the throw spec parameter
15615 to start_function.
15616 * pt.c (process_template_parm): Eliminate the throw spec parameter
15617 to grokdeclarator.
15618 (tsubst): Add throw spec to make_call_declarator.
15619 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15620 (do_function_instantiation): Eliminate the throw spec parameter to
15621 grokdeclarator. Eliminate the throw spec parameter to
15622 start_function.
15623 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15624 to start_function.
15625 * parse.y (datadef): Remove non-winning optimization.
15626 (decl): Likewise.
15627 (fndef): Remove ambiguous error productions uncovered by grammar
15628 fixing.
15629 (constructor_declarator): Add exception_specification_opt here.
15630 (component_constructor_declarator): Likewise.
15631 (direct_after_type_declarator): Likewise.
15632 (complex_direct_notype_declarator): Likewise.
15633 (direct_abstract_declarator): Likewise.
15634 (fn.def1): Remove exception_specification_opt.
15635 (fn.def2): Likewise.
15636 (condition): Likewise.
15637 (initdcl0): Likewise.
15638 (initdcl): Likewise.
15639 (notype_initdcl0): Likewise.
15640 (nomods_initdcl0): Likewise.
15641 (component_decl_1): Likewise.
15642 (component_declarator): Likewise.
15643 (after_type_component_declarator0): Likewise.
15644 (after_type_component_declarator): Likewise.
15645 (notype_component_declarator): Likewise.
15646
15647 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15648
15649 * call.c (build_over_call): Also use an INIT_EXPR when
15650 initializing anything from an rvalue.
15651
15652 * call.c (build_over_call): Call stabilize_reference when building
15653 an INIT_EXPR instead of calling the copy ctor.
15654
15655 * call.c (joust): Extend the previous change to all comparisons.
15656
15657 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15658 NO_LINKAGE_HEURISTICS.
15659
15660 * decl2.c (finish_file): Emit any statics that weren't already.
15661
15662 * typeck.c (build_static_cast): Implement.
15663 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15664 * decl.c (grokparms): Use can_convert_arg instead of
15665 implicit_conversion directly.
15666 (copy_args_p): New fn.
15667 * cvt.c (convert_to_reference): Don't complain about temp with
15668 static_cast.
15669 (build_up_reference): Handle TARGET_EXPRs.
15670 * call.c (build_over_call): Elide unnecessary temps.
15671 (can_convert*): Use new overloading code.
15672
15673 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15674
15675 * call.c: Move TYPE_PTR*_MACROS ...
15676 * cp-tree.h: To here.
15677 * typeck.c (build_reinterpret_cast): Implement.
15678
15679 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15680 ptr_complete_ob.
15681 (joust): If we're comparing a function to a builtin and the worst
15682 conversion for the builtin is worse than the worst conversion for the
15683 function, take the function.
15684
15685 * typeck.c (build_const_cast): Implement.
15686 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15687 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15688
15689 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
15690
15691 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15692 too early. Make sure we explode if exprtype turns out to be a
15693 NULL_TREE when it shouldn't be.
15694
15695 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
15696
15697 * cp-tree.h: New routine make_call_declarator.
15698 * lex.c (make_call_declarator): Define it.
15699 * except.c (init_exception_processing): Use it.
15700 (expand_builtin_throw): Likewise.
15701 (start_anon_func): Likewise.
15702 * decl2.c (finish_file): Likewise.
15703 * lex.c (cons_up_default_function): Likewise.
15704 * parse.y: Likewise.
15705 * pt.c (tsubst): Likewise.
15706
15707 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
15708
15709 * decl2.c (groktypefield): Remove unused code.
15710
15711 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
15712
15713 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15714 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
15715 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
15716 nonempty_cv_qualifiers.
15717 * hash.h: Rebuild.
15718
15719 * lex.c (make_pointer_declarator): Change type_quals into
15720 cv_qualifiers.
15721 (make_reference_declarator): Likewise.
15722
15723 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15724
15725 * decl.c (start_function): Only check interface_* for templates
15726 with flag_alt_external_templates.
15727
15728 * call.c (build_new_op): Check for comparison of different enum types.
15729 (build_over_call): Fix arg # output.
15730
15731 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15732
15733 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15734
15735 * call.c (build_new_op): Check for erroneous args.
15736
15737 * call.c (build_new_method_call): Add missing args to cp_error.
15738
15739 * tree.c (error_type): Don't print reference-to-array.
15740
15741 * typeck.c (convert_for_assignment): Don't say contravariance for
15742 removing const.
15743
15744 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15745
15746 * call.c (build_over_call): Diagnose bad convs for `this'.
15747
15748 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15749 on _ctor_arg.
15750
15751 * call.c (convert_like): Handle bad convs.
15752 (build_over_call): Handle bad convs better.
15753
15754 * decl2.c: -fansi-overloading is now the default.
15755
15756 * call.c (build_new_method_call): Check for erroneous args.
15757
15758 * pt.c (instantiate_class_template): Propagate
15759 TYPE_USES_MULTIPLE_INHERITANCE.
15760
15761 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
15762
15763 * call.c (enforce_access): Add static to routine.
15764
15765 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15766
15767 * call.c (build_user_type_conversion_1): Fix bad handling.
15768 (compare_ics): Likewise.
15769
15770 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15771
15772 * call.c (standard_conversion): Oops.
15773
15774 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
15775
15776 * g++.c: Update test for win32 (&& ! cygwin32).
15777
15778 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15779
15780 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15781 (ptr_reasonably_similar): New fn.
15782 * call.c (BAD_RANK): New rank.
15783 (ICS_BAD_FLAG): New macro.
15784 (standard_conversion): Handle almost-right pointer conversions.
15785 (reference_binding): Handle bad rvalue bindings.
15786 (add_*_candidate): Stuff.
15787 (build_over_call): Pass bad conversions to convert_for_initialization.
15788 (compare_ics): Handle bad convs.
15789 (joust): Likewise.
15790
15791 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
15792
15793 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15794 integer_type_node when computing pointer offsets.
15795
15796 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15797
15798 * tree.c (lvalue_type): New fn.
15799 (error_type): New fn.
15800 * call.c (op_error): Use error_type.
15801 (add_conv_candidate): Use lvalue_type.
15802 (add_builtin_candidates): Likewise.
15803 * error.c (args_as_string): Use error_type.
15804
15805 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15806
15807 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15808 (tsubst): Not here.
15809
15810 * decl.c (init_decl_processing): With -ansi, __null's type is the
15811 signed integral type with the same number of bits as a pointer.
15812 Introduce a new variable null_node for it.
15813 * cp-tree.h: Adjust.
15814 * call.c (null_ptr_cst_p): Adjust.
15815
15816 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
15817
15818 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15819 optimize.
15820
15821 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15822
15823 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15824 fns of classes without virtual functions.
15825
15826 * call.c (add_function_candidate): Handle `this' specially.
15827 (compare_ics): Likewise.
15828
15829 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
15830
15831 * typeck.c (build_conditional_expr): Fix handling of __null.
15832
15833 * decl2.c (comdat_linkage): New fn.
15834 (import_export_vtable): Use it.
15835 (import_export_decl): Use it.
15836 * method.c (make_thunk): Use it.
15837
15838 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15839
15840 * pt.c (end_template_decl): If we don't actually have parms, return.
15841 * parse.y (template_header): Accept 'template <>'.
15842
15843 * errfn.c: Allow 5 args.
15844
15845 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15846
15847 * tree.c (make_temp_vec): New fn.
15848 * pt.c (push_template_decl): Handle partial specs.
15849 (instantiate_class_template): Likewise.
15850 (more_specialized): Use get_bindings.
15851 (more_specialized_class): New fn.
15852 (get_class_bindings): New fn.
15853 (most_specialized_class): New fn.
15854 (do_function_instantiation): List candidates for ambiguous case.
15855 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15856 (shadow_tag): Call push_template_decl for partial specializations.
15857 * parse.y: Likewise.
15858 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15859 DECL_TEMPLATE_MEMBERS.
15860 * call.c (print_z_candidates): Reduce duplication.
15861
15862 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15863
15864 * decl2.c (lang_decode_option): Allow -fansi-overloading.
15865
15866 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15867
15868 * pt.c (get_bindings): New fn.
15869 (most_specialized): Likewise.
15870 (do_function_instantiation): Use them.
15871 (add_maybe_template): New fn.
15872 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15873 * call.c (build_new_op): Handle guiding decls.
15874 (build_new_function_call): Likewise.
15875 * decl2.c (finish_file): Likewise.
15876
15877 * decl2.c (mark_used): Do synthesis here.
15878 * call.c (build_method_call): Not here.
15879 (build_over_call): Or here.
15880 * typeck.c (build_function_call_real): Or here.
15881 * tree.c (bot_manip): Call mark_used on functions used in default
15882 args.
15883
15884 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15885
15886 * decl2.c (import_export_vtable): Delete code that disabled vtable
15887 heuristic on systems with ASM_OUTPUT_EXTERNAL.
15888
15889 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15890
15891 * typeck.c (build_x_function_call): Handle static call context
15892 better.
15893
15894 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15895 the function, not its outer block.
15896
15897 * call.c (build_field_call): Pass fields on to build_opfncall
15898 regardless of TYPE_OVERLOADS_CALL_EXPR.
15899 (build_method_call): Pass on to build_new_method_call sooner.
15900
15901 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15902 gives us.
15903 * class.c (instantiate_type): Don't put a POINTER_TYPE to
15904 METHOD_TYPE on an expression. Also make a copy of rhs instead of
15905 modifying it.
15906
15907 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15908
15909 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15910 (add_builtin_candidate): Don't take enums for ++.
15911 (build_new_method_call): Handle non-aggregates and field calls.
15912 Move new overloading code from...
15913 * cvt.c: Here.
15914
15915 * decl.c (grokparms): Don't check default args in templates.
15916
15917 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
15918
15919 * cvt.c (build_new_op): Fix args to build_unary_op.
15920 (add_builtin_candidates): Don't call type_promotes_to on float.
15921
15922 * decl.c (grokparms): Check the type of the default arg.
15923
15924 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15925 returning NULL_TREE.
15926
15927 * typeck.c (build_x_binary_op): Avoid doing extra work.
15928 (build_x_unary_op): Likewise.
15929 (build_x_conditional_expr): Likewise.
15930 * cvt.c (build_over_call): Return.
15931 (add_builtin_candidate): Fix MEMBER_REF.
15932 (build_new_op): Likewise.
15933
15934 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
15935
15936 * method.c (build_overload_name): Put bug fix into code but leave
15937 disabled for now so we can be bug compatible with older releases
15938 that do repeats incorrectly. In the future, we can enable it.
15939
15940 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15941
15942 * cvt.c (convert_like): Don't call build_cplus_new twice.
15943
15944 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15945 Control new overloading code with -fansi-overloading.
15946
15947 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15948
15949 * cvt.c (build_over_call): Call build_cplus_new.
15950 * call.c (build_method_call): Likewise.
15951 * typeck.c (build_function_call_real): Likewise.
15952 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15953 the COND_EXPR in a TARGET_EXPR so they use the same slot.
15954
15955 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15956 recursive calls.
15957 * typeck.c (complete_type): Propagate
15958 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15959
15960 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15961
15962 * cvt.c (joust): More ?: kludging. Sigh.
15963 (build_over_call): Don't try to synthesize global fns.
15964
15965 * search.c (lookup_conversions): Use binfo marking.
15966
15967 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
15968
15969 * search.c (build_mi_matrix): Use the correct value of cid
15970 when determining the new mi_size.
15971
15972 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15973
15974 * cvt.c (add_builtin_candidates): Do consider type conversion ops
15975 for the first parms of += et al.
15976 (strip_top_quals): New fn.
15977 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15978 (implicit_conversion): Likewise.
15979 (add_builtin_candidates): Be careful about arrays.
15980 (build_new_method_call): Handle vtable optimization.
15981
15982 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15983
15984 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15985 * cvt.c (reference_binding): Use it.
15986 (implicit_conversion): Use it.
15987 (add_builtin_candidate, COND_EXPR): Use it.
15988
15989 * cvt.c (build_new_function_call): Check for error args.
15990
15991 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15992
15993 * gxx.gperf: Add __null.
15994 * hash.h: Regenerate.
15995 * lex.h: Add RID_NULL.
15996 * lex.c (init_lex): Create null_pointer_node here, stick it in
15997 RID_NULL.
15998 * decl.c (init_decl_processing): Still set its type here.
15999 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16000 (convert_to_pointer_force): Likewise.
16001 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16002 if (! pedantic).
16003 * call.c (convert_harshness): Use null_ptr_cst_p.
16004 * typeck.c (convert_for_assignment): Likewise. Don't produce
16005 null_pointer_node.
16006
16007 * error.c (args_as_string): Handle lists of actual args, too.
16008 * cvt.c (null_ptr_cst): Support (void*)0 for now.
16009 (build_user_type_conversion_1): Improve diagnostics.
16010 (build_new_function_call): Likewise.
16011 (build_object_call): Likewise.
16012 (build_new_method_call): Likewise. Move call before def diagnostic...
16013 (build_over_call): Here.
16014
16015 * cvt.c (build_new_method_call): Don't complain about no match if
16016 LOOKUP_SPECULATIVELY.
16017 (build_over_call): Fix 'this' for virtual fn.
16018 (build_new_method_call): Add diagnostic.
16019
16020 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16021
16022 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16023 constructors to be passed in.
16024 (build_over_call): Likewise.
16025 (build_user_type_conversion_1): Pass them in.
16026 (convert_like): Likewise.
16027 (build_object_call): Handle overloaded conversions.
16028 (build_over_call): Pass the right args to build_vfn_ref.
16029 (standard_conversion): Fix pmf convs.
16030 (joust): Handle comparing statics and non-statics.
16031 (build_new_method_call): New fn.
16032 * call.c (build_method_call): Call it if NEW_OVER.
16033
16034 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
16035
16036 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16037 %D instead.
16038
16039 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
16040
16041 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16042 instead of just maybe_build_cleanup so that we deallocate the
16043 thrown object.
16044
16045 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16046
16047 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16048 * cp-tree.h (finish_prevtable_vardecl): Add decl.
16049
16050 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
16051
16052 * pt.c (instantiate_class_template): Call complete_type. Also, if
16053 we're at the end of the file and we just instantiated a template
16054 class with a vtable, call finish_prevtable_vardecl.
16055
16056 * error.c (dump_decl): Don't explode (or explode more gracefully
16057 as appropriate) if the object being dumped has a null type.
16058 (dump_expr): Likewise.
16059
16060 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16061 by counting the number of nodes that we'll need before allocating
16062 the array.
16063 (lookup_fnfields): Fix comment.
16064 (breadth_first_search): Fix comment.
16065
16066 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
16067
16068 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16069 TYPE_ALIGN.
16070 * class.c (finish_struct): Call cplus_decl_attributes here.
16071 (finish_struct_1): Not here.
16072 * cp-tree.h: Adjust.
16073
16074 * pt.c (type_unification): New parameter STRICT.
16075 (unify): If STRICT, don't allow cv addition or base deduction.
16076 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16077
16078 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16079
16080 * search.c (get_template_base{_recursive}): New fns.
16081 * pt.c (more_specialized): New fn.
16082 (do_function_instantiation): Use it.
16083 (unify): Handle base deduction.
16084 * cvt.c (joust): Use more_specialized.
16085 Don't arbitrarily choose between non-builtin candidates.
16086 (build_over_call): Call require_complete_type.
16087
16088 * decl.c (start_function): Statics are static even in a #pragma
16089 interface file.
16090
16091 * decl2.c (import_export_vtable): Disable vtable heuristic on
16092 systems with ASM_OUTPUT_EXTERNAL.
16093
16094 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16095 (standard_conversion): No std conv to enum type.
16096
16097 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16098 for ptm's.
16099
16100 * cvt.c (reference_binding): Bind directly to a base subobject of
16101 a class rvalue.
16102
16103 * cvt.c (build_new_op): Enforce access control.
16104
16105 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
16106
16107 * typeck2.c (process_init_constructor): When scanning the
16108 union for a named field, skip things that aren't FIELD_DECLs.
16109
16110 * method.c (synthesize_method): Don't scan fndecl's rtl if
16111 we're at the end of the file; just assume the function can't
16112 be inlined.
16113
16114 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16115
16116 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16117 it failed.
16118
16119 * cvt.c (build_user_type_conversion_1): Handle overloaded
16120 conversion ops.
16121
16122 * cvt.c (add_builtin_candidates): Don't consider type conversion
16123 operators for the first parameter of operator=.
16124
16125 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
16126
16127 * typeck.c (complete_type): Only call layout_type if we're not
16128 expanding a template.
16129
16130 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
16131
16132 * cvt.c (compare_ics): Oops.
16133
16134 * cvt.c (op_error): Oops.
16135
16136 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16137 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
16138 (build_conv): Use them.
16139 (implicit_conversion): Use them.
16140 (convert_like): Handle them.
16141 (build_new_op): Handle builtin COND_EXPR again.
16142 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
16143 in lists of types for COND_EXPR.
16144 (add_builtin_candidate): Add enum candidates for COND_EXPR.
16145
16146 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
16147
16148 * typeck.c (build_modify_expr): Always attempt to build a call to
16149 the assignment operator, even if we're using a default one.
16150 (convert_for_initialization): Call complete_type.
16151
16152 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16153
16154 * cvt.c (reference_binding): A REF_BIND gets the reference type.
16155 (implicit_conversion): Likewise.
16156 (convert_like): Likewise.
16157 (compare_ics): Likewise.
16158 (compare_qual): Likewise.
16159 (print_z_candidates): Handle no candidates.
16160 (build_new_op): Don't handle builtin COND_EXPR for now.
16161
16162 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
16163
16164 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16165
16166 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16167
16168 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16169
16170 * cvt.c (build_builtin_candidate): Oops.
16171 (build_new_op): Oops.
16172
16173 * method.c (build_opfncall): Pass COND_EXPR on.
16174 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16175 (add_builtin_candidate{,s}): Likewise.
16176 (add_builtin_candidates): Likewise.
16177 (print_z_candidates, op_error, build_new_op): Likewise.
16178 (type_decays_to): New fn.
16179 * lex.c (init_lex): Just say ?: for COND_EXPR.
16180
16181 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16182
16183 * typeck.c (complete_type): Call layout_type rather than building
16184 a new array type.
16185
16186 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16187 only use ptrdiff_t.
16188
16189 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16190
16191 * cvt.c: Always compile the new overloading code (but don't use it).
16192 (implicit_conversion): Add a BASE_CONV when converting to
16193 the same class type.
16194 (convert_like): Handle BASE_CONV.
16195
16196 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16197
16198 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16199 (add_builtin_candidate): Likewise.
16200
16201 NEW_OVER changes:
16202 * typeck.c (build_x_function_call): Try an operator function
16203 whenever we call an object of class type.
16204 * method.c (build_opfncall): Pass CALL_EXPRs through.
16205 * cvt.c (implicit_conversion): Do const-ref case first.
16206 (add_conv_candidate, build_object_call, op_error): New fns.
16207 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16208 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16209 builtin candidates.
16210 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
16211 Fall back on preincrement handling. Use op_error.
16212 Handle warn_synth.
16213 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
16214 an error_mark_node.
16215 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16216 properly.
16217
16218 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
16219
16220 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16221
16222 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
16223
16224 * typeck.c (build_component_ref_1): Use build_component_ref
16225 instead of open coding it here.
16226
16227 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16228
16229 * g++.c (main): Don't link with -lg++.
16230
16231 NEW_OVER changes:
16232 * cvt.c (convert_to_reference): Don't use convert_from_reference on
16233 result of build_type_conversion.
16234 (cp_convert): Only call build_method_call for ctors if
16235 build_type_conversion failed.
16236 (ptr_complete_ob): New function.
16237 (TYPE_PTR{,OB,MEM}_P): New macros.
16238 ({add,build}_builtin_candidate{,s}): New functions.
16239 (print_z_candidates): Handle builtins.
16240 (build_user_type_conversion_1): Don't use conversion fns for
16241 converting to a base type.
16242 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16243 (build_user_type_conversion): Use convert_from_reference.
16244 (build_new_op): New function.
16245 (build_over_call): Fix handling of methods.
16246 (compare_ics): Handle AMBIG_CONV properly.
16247 * typeck2.c: Increment abort count.
16248 * method.c (build_opfncall): Forward most requests to build_new_op.
16249 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16250
16251 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16252
16253 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16254 invalid second argument to dump_expr_list.
16255
16256 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
16257
16258 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16259
16260 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
16261
16262 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16263 ASSEMBLE_EXTERNAL.
16264
16265 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
16266
16267 * typeck2.c (process_init_constructor): New pedwarn for using { }
16268 to initialize a pointer to member function.
16269 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16270 we can avoid the new error.
16271
16272 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
16273
16274 * typeck.c (build_ptrmemfunc1): New function to hide details of
16275 pointer to member functions better.
16276
16277 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
16278
16279 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16280 methods into the actual method, as we know the implied object is
16281 not used.
16282
16283 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16284
16285 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16286 inside a system header.
16287
16288 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
16289
16290 * call.c (build_method_call): Call complete_type on the
16291 instance type.
16292
16293 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
16294
16295 * typeck.c (build_component_ref): Always build up an OFFSET_REF
16296 for obj_ptr->func so that we can know which object to use in a
16297 method call.
16298
16299 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
16300
16301 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16302 around things. Also improve maintainability.
16303
16304 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
16305
16306 * decl.c (grokdeclarator): Check for overflow when evaluating an
16307 array dimension.
16308
16309 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16310
16311 * cvt.c (cp_convert): Don't check for ambiguity with constructor
16312 if NEW_OVER.
16313
16314 * typeck.c (build_x_function_call): Pass function overload
16315 questions to new overloading code if NEW_OVER.
16316 * init.c (expand_aggr_init_1): Only check for type conversion ops
16317 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16318 Don't check for ambiguity with constructor if NEW_OVER.
16319 * cvt.c (convert_to_reference): Dereference the result of a type
16320 conversion operator.
16321 (build_conv): Propagate ICS_USER_FLAG.
16322 (implicit_conversion): Call instantiate_type.
16323 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16324 (add_function_candidate): Fix cv-quals on argtype.
16325 (print_z_candidates): New function.
16326 (build_new_function_call): Call it.
16327 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16328 consider non-converting constructors.
16329 Call print_z_candidates.
16330 Return an AMBIG_CONV for an ambiguous conversion.
16331 (build_user_type_conversion): Handle AMBIG_CONV.
16332 (convert_like): Fix test for building TARGET_EXPR.
16333 Call instantiate_type.
16334 Handle AMBIG_CONV and LVALUE_CONV.
16335 (build_over_call): Handle 0 args and ellipsis.
16336 * cp-tree.def: Add AMBIG_CONV.
16337
16338 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
16339
16340 * decl.c (lookup_name_real): If we find mem in obj when parsing
16341 `obj->mem', make sure we return the right value.
16342
16343 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
16344
16345 * search.c (get_base_distance): Call complete_type.
16346
16347 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
16348
16349 * decl.c (store_bindings): Make static.
16350
16351 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16352
16353 * init.c (expand_aggr_init_1): Don't check type conversions if
16354 NEW_OVER.
16355
16356 * cvt.c (z_candidate): Put back template field.
16357 (add_function_candidate): Set it.
16358 (add_template_candidate): Likewise.
16359 (joust): Use it.
16360 (compare_qual): Handle references and pointers to members.
16361 (compare_ics): Handle reference bindings.
16362
16363 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16364
16365 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
16366
16367 * call.c (compute_conversion_costs): Call complete_type.
16368
16369 * tree.c (vec_binfo_member): Use comptypes instead of comparing
16370 pointers, so we can handle template parameters.
16371
16372 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
16373
16374 * cvt.c (cp_convert_to_pointer): We have to call complete_type
16375 here; let's make it explicit instead of a side effect of an
16376 error check.
16377
16378 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16379
16380 * cvt.c (z_candidate): Remove template field.
16381 (reference_binding): Handle binding to temporary.
16382 (implicit_conversion): Likewise.
16383 (add_function_candidate): Handle artificial constructor parms.
16384 Handle functions with too few parms.
16385 (add_template_candidate): New function.
16386 (build_user_type_conversion_1): Handle constructors.
16387 (convert_like): Likewise.
16388 (build_over_call): Likewise.
16389 (build_new_function_call): Support templates.
16390 (compare_ics): Fix reference, inheritance handling.
16391
16392 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
16393
16394 * decl.c: Add signed_size_zero_node.
16395 (init_decl_processing): Build it.
16396 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16397 when we're trying to make a negative delta.
16398
16399 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16400
16401 Stop doing this damn index==strchr variable name confusion.
16402 * class.c (add_virtual_function): Change local var INDEX to be
16403 named IDX.
16404 (add_method): Likewise.
16405 * lex.c (print_parse_statistics): Likewise.
16406 * search.c (make_memoized_table_entry): Likewise.
16407 (lookup_fnfields_here): Likewise.
16408 (lookup_field): Likewise.
16409 (lookup_fnfields): Likewise.
16410 (get_baselinks): Likewise.
16411 * sig.c (build_signature_table_constructor): Likewise.
16412 (build_signature_method_call): Likewise.
16413 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16414 (get_member_function_from_ptrfunc): Likewise.
16415 (build_ptrmemfunc): Change local var INDEX to be IDX.
16416 (c_expand_start_case): Likewise.
16417
16418 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16419
16420 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16421 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16422 (convert_to_reference): Use build_type_conversion to convert to
16423 the reference type directly.
16424 (standard_conversion): Fix void* case, non-conversions.
16425 (reference_binding): Fix expr == 0 case, non-conversions.
16426 (convert_like): Support REF_BIND.
16427 (compare_qual): Split out from compare_ics.
16428 (compare_ics): Use it, handle icses with only a qual_conv.
16429
16430 * init.c (expand_vec_init): Don't crash if decl is NULL.
16431
16432 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
16433
16434 * mpw-config.in: New file, configury for Mac MPW.
16435 * mpw-make.sed: New file, makefile editing for MPW.
16436
16437 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16438
16439 * pt.c (instantiate_class_template): Call repo_template_used.
16440
16441 * search.c (lookup_conversions): Only lookup conversions in
16442 complete types.
16443
16444 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16445
16446 * cp-tree.def: Renamed from tree.def, to avoid confusion with
16447 gcc's tree.def.
16448 * cp-tree.h, lex.c: Include cp-tree.def.
16449 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16450
16451 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
16452
16453 * init.c (build_vec_delete_1): Call complete_type.
16454
16455 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
16456
16457 * except.c (start_anon_func): Make sure anonymous functions are
16458 never external.
16459
16460 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16461
16462 * decl.c (finish_function): If function_depth > 1, set nested.
16463
16464 * decl2.c (grokbitfield): Revert Bob's change.
16465 * class.c (finish_struct_1): Fix handling of named bitfield widths.
16466
16467 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
16468
16469 * pt.c (add_pending_template): Handle types.
16470 (lookup_template_class): With -fexternal-templates, just add the class
16471 to pending_templates instead of instantiating it now.
16472 * decl2.c (finish_file): Handle types in pending_templates.
16473
16474 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
16475
16476 * decl2.c (grokbitfield): Handle constant decls appropriately.
16477 Give an appropriate error message now instead of spewing core
16478 later.
16479
16480 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16481
16482 * decl2.c: Don't turn on thunks by default for now.
16483
16484 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
16485
16486 * typeck.c (complete_type): Handle error_mark_node.
16487 (common_type, OFFSET_TYPE): Handle template_type_parms.
16488
16489 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16490
16491 * pt.c (instantiate_decl): If at_eof, call import_export_decl
16492 regardless of DECL_INLINE.
16493
16494 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16495
16496 * class.c (finish_struct_bits): Copy TYPE_SIZE.
16497
16498 * rtti.c (build_dynamic_cast): Support templates.
16499 * tree.def: Support DYNAMIC_CAST_EXPR.
16500 * pt.c (tsubst_copy): Likewise.
16501 * decl2.c (build_expr_from_tree): Likewise.
16502
16503 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16504
16505 * typeck.c (build_static_cast): Support templates.
16506 (build_const_cast): Likewise.
16507 * tree.def: Support CONST/STATIC_CAST_EXPR.
16508 * pt.c (tsubst_copy): Likewise.
16509 * decl2.c (build_expr_from_tree): Likewise.
16510
16511 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16512
16513 * decl2.c (finish_vtable_vardecl): Don't trust
16514 TREE_SYMBOL_REFERENCED for vtables of local classes.
16515
16516 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16517
16518 * pt.c (tsubst_copy): Handle operator T.
16519
16520 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16521
16522 * init.c (build_delete): Move creation of PARMS inside test of
16523 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16524
16525 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
16526
16527 * typeck.c (build_conditional_expr): Don't assume that
16528 the arguments to ?: are always pointers or records.
16529
16530 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16531
16532 * decl2.c (import_export_decl): Still emit static/weak/comdat
16533 copies of inline template functions with -fno-implicit-templates.
16534
16535 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
16536
16537 * init.c (build_delete): Determine the complete basetype
16538 path to the destructor we're calling.
16539
16540 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
16541
16542 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16543 initialize the enum, because we really and truly don't know where
16544 it came from.
16545 (start_enum): Don't copy integer_zero_node because
16546 build_enumerator will do it.
16547
16548 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16549
16550 * decl.c (finish_function): Do access control on base destructors.
16551
16552 * pt.c (tsubst, case FUNCTION_DECL): Set up
16553 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16554 hose us.
16555
16556 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
16557
16558 * cvt.c (build_up_reference): If we have already extended the
16559 lifetime of the temporary, don't try it again.
16560 * typeck.c (c_expand_return): Don't try and convert the return
16561 value twice when we want a reference, once is enough.
16562
16563 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
16564
16565 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16566 LOOKUP_ONLYCONVERTING at all for now.
16567
16568 * search.c (add_conversions): Put the conversion function in
16569 TREE_VALUE, the basetype in TREE_PURPOSE.
16570 * cvt.c (build_type_conversion): Adjust.
16571 * cvt.c (build_expr_type_conversion): Adjust.
16572 * call.c (user_harshness): Adjust.
16573
16574 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16575
16576 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16577 backend's benefit.
16578
16579 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
16580
16581 * except.c (expand_start_catch_block): Add a dummy region, if we
16582 get an error, so that we can avoid core dumping later.
16583
16584 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
16585
16586 * cp-tree.h (OFFSET_REF): Remove.
16587 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16588 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16589 * init.c (expand_aggr_init_1): Likewise.
16590 (build_new): Likewise.
16591 * typeck.c (expand_target_expr): Likewise.
16592
16593 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16594
16595 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16596 TARGET_EXPR.
16597
16598 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
16599
16600 * cvt.c (build_up_reference): Redo how and when temporaries are
16601 created.
16602 * decl.c (grok_reference_init): Don't try and be smart about
16603 running cleanups.
16604
16605 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
16606
16607 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16608 (TARGET_EXPR...), now that it has 4 arguments.
16609 * tree.c (build_cplus_new): Likewise.
16610
16611 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16612
16613 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16614
16615 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16616 * decl.c (struct saved_scope): Remove named_labels,
16617 {base,member}_init_list.
16618 (maybe_push_to_top_level): Don't set them. Call
16619 push_cp_function_context if appropriate.
16620 (pop_from_top_level): Likewise.
16621
16622 * method.c (do_build_assign_ref): Remove obsolete check of
16623 TYPE_HAS_ASSIGN_REF (basetype).
16624
16625 * decl.c (grokfndecl): Diagnose user definition of
16626 implicitly-declared methods.
16627
16628 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
16629
16630 * method.c (do_build_copy_constructor): Add code to give
16631 meaningful error messages instead of crashing.
16632 (do_build_assign_ref): Don't synthesize assignment operators for
16633 classes containing reference or const members.
16634
16635 * class.c (struct base_info): Remove cant_synth_copy_ctor
16636 and cant_synth_asn_ref.
16637 (finish_base_struct): Remove the code that tries to conditionalize
16638 synthesis of copy constructors & assignment operators based on
16639 access permissions. Instead, let it fail when it tries to
16640 synthesize the copy constructor. This will give meaningful error
16641 messages instead of silently generating code to perform a bitcopy.
16642
16643 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
16644
16645 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16646 determining types for constant values.
16647
16648 * decl.c (struct named_label_list): Use instead of stuffing
16649 random items into a TREE_LIST node.
16650 (named_label_uses): Use the new struct.
16651 (poplevel): Likewise.
16652 (lookup_label): Likewise.
16653 (define_label): Add an error message to tell the user the line
16654 where the goto is located in addition to the destination of the
16655 goto.
16656 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16657 named_label_uses.
16658 (finish_function): Likewise.
16659
16660 (start_decl): Complain about defining a static data member
16661 in a different type from which it was declared.
16662
16663 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16664
16665 * cvt.c (build_expr_type_conversion): Adjust.
16666
16667 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16668
16669 * call.c (build_method_call): Always convert 'this' to the
16670 appropriate type.
16671
16672 * search.c (add_conversions): Put the conversion function in
16673 TREE_VALUE, the type in TREE_PURPOSE.
16674 * cvt.c (build_type_conversion): Adjust.
16675 * call.c (user_harshness): Adjust.
16676
16677 * method.c (emit_thunk): Call temporary_allocation and
16678 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16679
16680 * tree.c (build_cplus_array_type): Handle tweaking of
16681 TYPE_MAIN_VARIANT here.
16682 * typeck.c (common_type): Not here.
16683
16684 * typeck.c (complete_type): Only try to complete an array type if
16685 it has a domain.
16686
16687 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
16688
16689 * decl.c (grokvardecl): Call complete_type.
16690 (grokdeclarator): Call complete_type for PARM_DECLs.
16691
16692 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
16693
16694 * pt.c (instantiate_class_template): Re-set
16695 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16696
16697 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
16698
16699 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16700 smart enough to do it right.
16701 * tree.c (cp_expand_decl_cleanup): Likewise.
16702 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16703 cp_expand_decl_cleanup.
16704 (store_parm_decls): Likewise.
16705 (hack_incomplete_structures): Likewise.
16706 * except.c (push_eh_cleanup): Likewise.
16707
16708 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
16709
16710 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16711 frontend to the backend where it belongs.
16712 * tree.c (unsave_expr): Likewise.
16713 (unsave_expr_now): Likewise.
16714 * tree.def (UNSAVE_EXPR): Likewise.
16715 * cp-tree.h (unsave_expr): Likewise.
16716 (unsave_expr_now): Likewise.
16717
16718 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
16719
16720 * init.c (emit_base_init): Make sure the partial EH cleanups live
16721 on the function_obstack.
16722
16723 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
16724
16725 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16726 when checking for pointer types.
16727
16728 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16729
16730 * pt.c (instantiate_class_template): Remove obsolete check for
16731 access declarations.
16732
16733 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
16734
16735 * call.c (build_overload_call): Simplify calls to
16736 build_overload_call by removing last parameter.
16737 (build_method_call): Likewise.
16738 * cp-tree.h: Likewise.
16739 * method.c (build_opfncall): Likewise.
16740 * typeck.c (build_x_function_call): Likewise.
16741
16742 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
16743
16744 * call.c (default_parm_conversions): Factor out common code.
16745 (build_method_call): Use it.
16746 (build_overload_call_real): Use it.
16747
16748 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
16749
16750 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16751 but pedwarn as the code is bogus.
16752 * typeck.c (decay_conversion): Likewise.
16753 (build_function_call_real): Use build_addr_func instead of
16754 default_conversion. Don't allow pointer-to-method functions down
16755 here.
16756 (build_unary_op): Use real pointer-to-member functions instead of
16757 fake ones.
16758 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16759 (convert_for_assignment): Removed some obsolete code.
16760 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16761 build_x_function_call instead of current_class_ptr. Only call
16762 digest_init once on an initializer, we do this just checking
16763 TREE_TYPE.
16764 (build_expr_from_tree): Pass current_class_ref to
16765 build_x_function_call instead of current_class_ptr.
16766 * init.c (build_member_call): Likewise.
16767 * pase.y: Likewise.
16768 * error.c (dump_expr): Handle OFFSET_REFs better.
16769 * pt.c (unify): Handle pointer-to-member functions better.
16770 * decl.c (finish_function): Clear out current_class_ref just like
16771 we do for current_class_ptr.
16772
16773 * typeck.c (get_delta_difference): Handle virtual bases better.
16774
16775 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
16776
16777 * sig.c (build_signature_table_constructor): Use the delta for
16778 the original basetype for this virtual function with thunks.
16779 (build_signature_method_call): We still need to adjust 'this'
16780 with thunks.
16781
16782 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
16783
16784 * call.c (build_addr_func): New routine. Used to get the `real'
16785 address of a function or a method. Needed to avoid getting a
16786 pointer-to-member function.
16787 (build_call): New routine to build CALL_EXPRs.
16788 (build_method_call): Use it.
16789 * cvt.c (convert_to_aggr): Likewise.
16790 * typeck.c (build_function_call_real): Likewise.
16791 * sig.c (build_signature_table_constructor): Use build_addr_func.
16792 * cp-tree.h (build_call, build_addr_func): Declare them.
16793
16794 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
16795
16796 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16797 * parse.y: Remove uses of LOOKUP_AGGR.
16798
16799 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
16800
16801 * *.[chy]: Rename current_class_decl to current_class_ptr, and
16802 C_C_D to current_class_ref.
16803
16804 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16805
16806 * call.c (convert_harshness): Tighten up pointer conversions.
16807
16808 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
16809
16810 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16811 (finish_file): Likewise.
16812
16813 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16814
16815 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16816
16817 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16818 code.
16819
16820 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16821
16822 * decl2.c: Turn on thunks by default where supported.
16823
16824 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
16825
16826 * cp-tree.h (build_overload_call_maybe): Removed.
16827 * call.c (build_overload_call_real): Invert meaning of last arg to
16828 be require_complete.
16829 (build_overload_call): Likewise.
16830 * typeck.c (build_x_function_call): Use build_overload_call_real
16831 instead of build_overload_call_maybe.
16832
16833 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16834
16835 * decl2.c (finish_file): Don't try to emit functions that haven't
16836 been compiled.
16837
16838 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16839
16840 * decl2.c (finish_vtable_vardecl): Oops.
16841
16842 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16843 Also store the bindings from previous_class_values.
16844 (pop_from_top_level): Restore them.
16845
16846 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16847
16848 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16849 symbol has been referenced.
16850 (finish_file): Re-join synthesis/vtable loop with inline emission
16851 loop, disable inlining when an inline is output.
16852
16853 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
16854
16855 * except.c (init_exception_processing): Setup saved_in_catch.
16856 (push_eh_cleanup): Reset __eh_in_catch.
16857 (expand_start_catch_block): Set __eh_in_catch.
16858
16859 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
16860
16861 * except.c (push_eh_cleanup): Add tracking for whether or not we
16862 have an active exception object.
16863 (expand_builtin_throw): Use it to make sure a rethrow without an
16864 exception object is caught.
16865
16866 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
16867
16868 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16869 cache.
16870
16871 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16872
16873 * decl2.c (finish_file): Also use sentries for vars with
16874 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16875 created).
16876
16877 * lex.c (handle_cp_pragma): Disable #pragma
16878 interface/implementation if SUPPORTS_ONE_ONLY > 1.
16879
16880 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16881
16882 * method.c (emit_thunk): Wrap default case in
16883 temporary/permanent_allocation.
16884
16885 * method.c (make_thunk): Use DECL_ONE_ONLY.
16886 (emit_thunk): Call assemble_end_function.
16887
16888 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16889
16890 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16891 (import_export_decl): Likewise.
16892 (finish_prevtable_vardecl): Disable vtable hack if
16893 SUPPORTS_ONE_ONLY > 1.
16894
16895 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
16896
16897 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16898 PREDECREMENT_EXPRs take two arguments, not one.
16899
16900 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
16901
16902 * class.c (build_vtable_entry): Don't build thunks for abstract
16903 virtuals.
16904
16905 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16906 frontend.
16907
16908 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16909
16910 * class.c (set_rtti_entry): Use size_zero_node.
16911 (build_vtable): Likewise.
16912
16913 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
16914
16915 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16916 (prepare_fresh_vtable): Likewise.
16917
16918 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16919
16920 * method.c (emit_thunk): Call mark_used on the target function.
16921
16922 * call.c (build_method_call): Don't warn about pending templates.
16923
16924 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16925
16926 * decl2.c (finish_file): Fix list walking logic.
16927
16928 * typeck2.c (check_for_new_type): Only warn if -pedantic.
16929
16930 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
16931
16932 * class.c (finish_struct_1): Remove old code for
16933 dont_allow_type_definitions.
16934 * cp-tree.h: Likewise.
16935 * spew.c: Make sure cp-tree.h is included before parse.h, so the
16936 definition of flagged_type_tree is found before it is used.
16937 * lex.c: Likewise.
16938 * parse.y: Added the ftype member to the type union, and changed a
16939 number of rules to use it instead of ttype. Added calls to
16940 check_for_new_type() as appropriate.
16941 * typeck2.c (check_for_new_type): New function for checking
16942 if a newly defined type appears in the specified tree.
16943 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
16944 for check_for_new_type().
16945
16946 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16947
16948 * decl2.c (finish_file): Only use a sentry if the decl is public.
16949
16950 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16951 don't pass LOOKUP_ONLYCONVERTING.
16952
16953 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
16954
16955 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16956 properly keeps track of const and volatile type modifiers.
16957
16958 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16959
16960 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16961 * pt.c (comp_template_args): Use it.
16962
16963 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16964 assemble_external for artificial function decls.
16965
16966 * decl.c (cp_finish_decl): Oops.
16967
16968 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16969
16970 * decl2.c (import_export_decl): Put static data member templates
16971 into common storage, or make them weak, depending on whether they
16972 are dynamically or statically initialized.
16973 (get_sentry): New function.
16974 (finish_file): Do import_export_decl for static data members before
16975 building the init/fini functions. Don't init/fini a variable that's
16976 EXTERNAL. Use a sentry for variables in common. Fix mismatching
16977 push/pop_temp_slots.
16978 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16979 expand_static_init thang.
16980 * method.c (get_id_2): New function.
16981
16982 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
16983
16984 * parse.y (empty_parms): Make sure we use C++-style prototypes
16985 when we're declaring member functions.
16986
16987 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16988
16989 * Makefile.in (CONFLICTS): 16 s/r conflicts.
16990 * parse.y (self_template_type): New nonterminal.
16991
16992 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16993
16994 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16995 name.
16996 * parse.y (base_class.1): Allow 'typename foo::bar'.
16997
16998 * lex.c (check_newline): Remove #pragma code that plays with the
16999 input stream, since we now deal with tokens. Clear nextchar when
17000 we're done.
17001 (handle_cp_pragma): Use real_yylex.
17002 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
17003 in one place.
17004
17005 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17006
17007 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17008
17009 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17010
17011 * parse.y: New token SELFNAME for potential constructor.
17012 * spew.c (yylex): Handle it.
17013 * lex.c (identifier_type): Produce it.
17014
17015 * parse.y (complete_type_name): In :: case, don't push class binding.
17016 (complex_type_name): Likewise.
17017
17018 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
17019
17020 * typeck.c (build_reinterpret_cast): Handle pointer to member
17021 functions.
17022
17023 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17024
17025 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17026 pragmas.
17027 (check_newline): Put the vtable/unit/implementation/interface pragma
17028 code into handle_cp_pragma, replacing it with a call.
17029 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17030 args. Get the next token after handling the pragma token.
17031
17032 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
17033
17034 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17035 (convert_to_pointer_force): Likewise.
17036
17037 * init.c (build_new): Fix array new without -fcheck-new.
17038
17039 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
17040
17041 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17042 tree.c: Lose TYPE_NESTED_NAME.
17043
17044 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17045 as identifiers.
17046
17047 * tree.def: Add VEC_INIT_EXPR.
17048 * expr.c (cplus_expand_expr): Handle it.
17049 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17050 the extra file-scope symbol nastiness.
17051
17052 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
17053
17054 * method.c (make_thunk): Thunks are static.
17055 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17056
17057 * decl2.c (mark_vtable_entries): Emit thunks as needed.
17058 (finish_file): Don't emit them here.
17059
17060 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
17061
17062 * rtti.c (build_dynamic_cast): Handle null pointers.
17063 (ifnonnull): New function.
17064
17065 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
17066
17067 * call.c (build_method_call): Remember the original basetype we
17068 were called with. Give an error message instead of trying
17069 (incorrectly) to call a non-static member function through a
17070 non-inherited class.
17071
17072 * search.c (expand_upcast_fixups): Mark the new fixup as
17073 DECL_ARTIFICIAL.
17074
17075 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17076
17077 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17078
17079 * class.c (set_rtti_entry): Fix for thunks.
17080
17081 * decl2.c (import_export_decl): Still emit typeinfo fns for
17082 cv-variants of builtin types.
17083
17084 * rtti.c (expand_class_desc): Set up base_info_type_node here.
17085 (init_rtti_processing): Instead of here.
17086
17087 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
17088
17089 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17090 (build_typeid): Only complain about taking dynamic typeid without
17091 -frtti.
17092
17093 * decl2.c: flag_rtti defaults to 1.
17094
17095 * rtti.c (get_tinfo_var): The general class case is now smaller.
17096 (init_rtti_processing): Pack the latter three fields of base_info
17097 into 32 bits.
17098
17099 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
17100
17101 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17102
17103 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
17104
17105 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17106 (push_memoized_context): Split out code to undefer pop_type_level to
17107 (clear_memoized_cache): here.
17108 (pop_memoized_context): We can only handle one layer of deferral of
17109 pop_type_level so clear the cache, if there was a previous level.
17110
17111 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17112
17113 * rtti.c (init_rtti_processing): Build up base_info_type_node.
17114 (expand_class_desc): Use one pointer to an array of base_info
17115 structs, passed using a CONSTRUCTOR.
17116
17117 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
17118
17119 * class.c (build_vbase_path): Remove block extern for
17120 flag_assume_nonnull_objects here.
17121 (build_vfn_ref): Split out functionality into build_vtbl_ref.
17122 (build_vtbl_ref): New routine.
17123 (build_vtable): Set up rtti info here.
17124 (add_virtual_function): Note in CLASSTYPE_RTTI the best
17125 place where we can get the rtti pointers from to avoid having to
17126 search around for a place.
17127 (finish_base_struct): Likewise.
17128 (finish_struct_1): Likewise. Never create totally new vtables
17129 with totally new vtable pointers for rtti. Disable code to layout
17130 vtable pointers better until we want to break binary
17131 compatibility.
17132 * rtti.c (build_headof_sub): New routine to convert down to a
17133 sub-object that has an rtti pointer in the vtable.
17134 (build_headof): Use it. Also, use build_vtbl_ref now to be more
17135 maintainable.
17136 (build_dynamic_cast): Make sure we have saved it, if we need to.
17137 * search.c (dfs_init_vbase_pointers): Disable code that deals with
17138 a more efficient vtable layout, enable later.
17139 * call.c (flag_assume_nonnull_objects): Moved declaration to
17140 * cp-tree.h: here. Declare build_vtbl_ref.
17141 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17142 function calls that want a tree.
17143
17144 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17145
17146 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17147 other X subobjects in the most derived type. Ack.
17148
17149 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17150 get_typeid will do it for us.
17151 (get_typeid_1): Break out call-building for expand_*_desc to use.
17152 (get_typeid): Call it.
17153 (expand_*_desc): Likewise.
17154 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17155 and void *.
17156 (init_decl_processing): Lose builtin_type_tdescs lossage.
17157 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17158
17159 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
17160
17161 * pt.c (tsubst): When calling set_nested_typename, use
17162 TYPE_NESTED_NAME (current_class_type) instead of
17163 current_class_name.
17164
17165 * decl.c (pushdecl): Likewise.
17166 (pushdecl_class_level): Likewise.
17167 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17168 set_nested_typename.
17169
17170 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
17171
17172 * rtti.c (synthesize_tinfo_fn): Handle arrays.
17173
17174 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17175
17176 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
17177
17178 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17179 (init_rtti_processing): Lose bad_cast_type.
17180 (build_dynamic_cast): Use throw_bad_cast.
17181
17182 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17183
17184 * decl2.c (finish_file): Don't synthesize artificial functions
17185 that are external and not inline.
17186
17187 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17188
17189 * decl2.c (finish_file): Handle having new inlines added to
17190 saved_inlines by synthesis.
17191
17192 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17193
17194 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17195
17196 RTTI rewrite to initialize nodes as needed, not require that
17197 users #include <typeinfo>, complete functionality and reduce wasted
17198 space.
17199 * rtti.c (init_rtti_processing): New fn.
17200 (build_typeid): The vtable entry is now a function.
17201 (get_tinfo_var): New fn.
17202 (get_tinfo_fn): Likewise.
17203 (get_typeid): Use it.
17204 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17205 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17206 points __rtti_*.
17207 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17208 (synthesize_tinfo_fn): New fn.
17209 * method.c (build_t_desc_overload): Lose.
17210 (build_overload_with_type): More generic.
17211 * decl.c (init_decl_processing): Call init_rtti_processing.
17212 * class.c (set_rtti_entry): Use get_tinfo_fn.
17213 * decl2.c (mark_vtable_entries): Mark the rtti function.
17214 (finish_prevtable_vardecl): Don't build_t_desc.
17215 (import_export_decl): Handle tinfo functions.
17216 (finish_file): Likewise.
17217 * typeck.c (inline_conversion): New fn.
17218 (build_function_call_real): Use it.
17219 * cp-tree.h: Add decls.
17220
17221 * method.c (hack_identifier): Also convert component_refs from
17222 references.
17223
17224 * lex.c (cons_up_default_function): Use the type, not the name, in
17225 declspecs.
17226
17227 * decl2.c (import_export_vtable): Fix weak vtables.
17228
17229 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
17230
17231 * search.c (get_base_distance_recursive): Fix access checks for
17232 protected bases.
17233
17234 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17235
17236 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17237 cp-tree.h.
17238 (convert_harshness): Add prototypes wrapped by PROTO.
17239 * decl2.c (grok_function_init): Likewise.
17240 (do_toplevel_using_decl): Change to void return type.
17241 * class.c (build_vtable_entry): Remove decl of make_thunk.
17242 (merge_overrides): Fix order of arg definitions.
17243 (finish_vtbls): Likewise.
17244 (fixup_vtable_deltas): Likewise.
17245 (modify_all_direct_vtables): Likewise.
17246 (modify_all_indirect_vtables): Likewise.
17247 * search.c (get_base_distance_recursive): Likewise.
17248 (get_abstract_virtuals_1): Likewise.
17249 (fixup_virtual_upcast_offsets): Likewise.
17250 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17251 * init.c (perform_member_init): Fix order of arg definitions.
17252 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17253 * cp-tree.h (make_thunk): Add decl.
17254 (overload_template_name, push_template_decl): Add decls.
17255 (do_toplevel_using_decl): Change to void return type.
17256 (vec_binfo_member): Add decl.
17257
17258 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17259
17260 * typeck.c (mark_addressable, convert_for_assignment,
17261 convert_for_initialization, pointer_int_sum, pointer_diff,
17262 unary_complex_lvalue): Add prototypes wrapped by PROTO.
17263 (convert_sequence): #if 0 fn decl, since definition also is.
17264
17265 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
17266
17267 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17268 cast to pointer types for type searching.
17269
17270 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17271
17272 * typeck.c (get_delta_difference): Use cp_error, not error, in the
17273 case where BINFO == 0.
17274
17275 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
17276
17277 * call.c (build_method_call): Fix wording of error messages so
17278 constructors come out right.
17279
17280 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
17281
17282 * decl.c (push_overloaded_decl): Don't warn about hidden
17283 constructors when both the type and the function are declared
17284 in a system header file.
17285
17286 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
17287
17288 * class.c (finish_struct_1): Propagate the TYPE_PACKED
17289 flag for the type to the type's fields.
17290
17291 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17292
17293 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17294
17295 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
17296
17297 * class.c (base_info, finish_base_struct): Replace
17298 needs_virtual_dtor with base_has_virtual.
17299
17300 (finish_struct_1): Remove the old code that tried to make default
17301 destructors virtual. Use base_has_virtual when checking if we need
17302 to add a vtable entry for the rtti code.
17303
17304 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17305
17306 * pt.c (push_template_decl): Complain about template decl with
17307 inappropriate declaration.
17308
17309 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
17310
17311 * typeck.c (build_x_unary_op): Remove bogus check for taking
17312 the address of a member function.
17313
17314 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17315
17316 * parse.y (constructor_declarator): Only push the class if
17317 we are not already in the class.
17318
17319 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
17320
17321 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17322 Add additional argument to INIT_CUMULATIVE_ARGS.
17323
17324 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
17325
17326 * decl.c (shadow_tag): Fix error about anon union with methods.
17327
17328 * parse.y (self_reference): Only generate a self-reference if this
17329 is a non-template class.
17330 (opt.component_decl_list): Only use it if it was generated.
17331
17332 * parse.y (component_decl_1): Use constructor_declarator.
17333 (fn.def2): Likewise.
17334 (notype_component_declarator0): Likewise.
17335
17336 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
17337
17338 * typeck.c (build_x_unary_op): Add checks for taking the address
17339 of a TARGET_EXPR or of a member function, and give appropriate
17340 warnings.
17341
17342 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17343
17344 * pt.c (process_template_parm): Allow template type parms to be
17345 used as types for template const parms.
17346
17347 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
17348
17349 * init.c (expand_vec_init): Ensure the eh cleanups are on the
17350 function_obstack.
17351
17352 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
17353
17354 * decl.c (lookup_name_real): Be even more picky about the
17355 ambiguous lookup warning.
17356 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17357 * parse.y (constructor_declarator): Rather than here.
17358
17359 * parse.y (constructor_declarator): New nonterminal.
17360 (fn.def1): Use it.
17361 (explicit_instantiation): Likewise.
17362
17363 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17364
17365 Add implicit declaration of class name at class scope.
17366 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17367 * parse.y (self_reference): New nonterminal.
17368 (opt.component_decl_list): Use it.
17369 (fn.def1): Add nested_name_specifier type_name cases.
17370 * class.c (build_self_reference): New function.
17371 (finish_struct): Handle access_default later, move self-reference
17372 decl to the end.
17373 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17374 * cp-tree.h: Adjust.
17375
17376 * pt.c (do_function_instantiation): Separate handling of member
17377 functions and non-member functions properly.
17378
17379 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17380
17381 * pt.c (process_template_parm): Improve error for 'volatile class K'.
17382
17383 * class.c (finish_struct_1): Check the right slot for destructors.
17384
17385 * decl.c (start_enum): Complain about enum templates.
17386
17387 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
17388
17389 * init.c (resolve_offset_ref): Offset pointers to member data by one.
17390 * typeck.c (unary_complex_lvalue): Likewise.
17391
17392 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
17393
17394 * typeck.c (c_expand_return): Check for a returned local
17395 array name, similar to the check for an ADDR_EXPR.
17396
17397 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17398
17399 * decl.c (cp_finish_decl): Don't build cleanups for static
17400 variables here.
17401
17402 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
17403
17404 * typeck.c (build_modify_expr): Fix error messages to be more
17405 accurate.
17406 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17407 assignment operators.
17408 * error.c (assop_as_string): Likewise. Add support for `%Q' for
17409 assignment operators.
17410
17411 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
17412
17413 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
17414 give an error if initialized. pedwarn about nested type with the
17415 same name as its enclosing class.
17416
17417 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17418
17419 * typeck.c (require_complete_type): Be sure to instantiate the
17420 MAIN_VARIANT of the type.
17421
17422 * decl2.c (finish_file): Instantiate pending templates before
17423 processing static constructors and destructors.
17424
17425 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17426 unless at_eof.
17427
17428 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
17429
17430 * decl2.c (delete_sanity): If error_mark_node is passed
17431 in as an expression, quit while we're ahead.
17432
17433 * decl.c (grokdeclarator): Give an error message if `friend'
17434 is combined with any storage class specifiers.
17435
17436 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
17437
17438 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17439 definition of nonexistent nested type.
17440
17441 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17442 not to say 'typedef'.
17443
17444 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17445
17446 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17447 * search.c (dfs_walk, dfs_init_vbase_pointers,
17448 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17449 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17450
17451 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17452
17453 * except.c (build_throw): Support minimal parse.
17454 * pt.c (tsubst_copy): Support THROW_EXPR.
17455 * decl2.c (build_expr_from_tree): Likewise.
17456
17457 * pt.c (mangle_class_name_for_template): Always allocate
17458 scratch_firstobj.
17459
17460 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
17461
17462 * cvt.c (cp_convert_to_pointer): Give an appropriate error
17463 when trying to cast from an incomplete type.
17464
17465 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17466
17467 * pt.c (instantiate_class_template): Don't bother setting up
17468 CLASSTYPE_TAGS explicitly, as the nested types will add
17469 themselves.
17470
17471 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
17472
17473 * decl.c (shadow_tag): Remove old error check for usage of
17474 an enum without a previous declaration.
17475 (xref_tag): Add error message about usage of enums without a
17476 previous declaration.
17477
17478 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17479
17480 * lex.c (do_identifier): Only do name consistency check if we're
17481 parsing.
17482
17483 * pt.c (push_template_decl): Don't crash if we get a member defn
17484 that doesn't match.
17485
17486 * decl.c (xref_tag_from_type): New function to do an xref without
17487 always having to figure out code_type_node.
17488 * cp-tree.h: Declare it.
17489 * pt.c (instantiate_class_template): Use it for friend classes.
17490 (lookup_template_class): Use it.
17491
17492 * typeck2.c (build_functional_cast): Pull out a single parm before
17493 passing it to build_c_cast.
17494
17495 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
17496
17497 * expr.c (do_case): Give an error message if a pointer is
17498 given as a case value.
17499
17500 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
17501
17502 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17503 an overload list.
17504
17505 * lex.c (cons_up_default_function): Really, now, interface hackery
17506 does not apply to synthesized methods.
17507
17508 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
17509
17510 * call.c (build_method_call): Ctors and dtors now have special names
17511 with respect to lookups.
17512 * class.c (add_method): Likewise.
17513 (grow_method): Likewise.
17514 (finish_struct_methods): Likewise.
17515 (warn_hidden): Likewise.
17516 (finish_struct_1): Likewise.
17517 * cvt.c (convert_to_reference): Likewise.
17518 (convert_to_aggr): Likewise.
17519 (cp_convert): Likewise.
17520 * decl2.c (check_classfn): Likewise.
17521 * init.c (expand_member_init): Likewise.
17522 (expand_default_init): Likewise.
17523 (expand_aggr_init_1): Likewise.
17524 (build_offset_ref): Likewise.
17525 (build_new): Likewise.
17526 (build_delete): Likewise.
17527 * lex.c (do_inline_function_hair): Likewise.
17528 * search.c (lookup_field_1): Likewise.
17529 (lookup_fnfields_here): Likewise.
17530 (lookup_field): Likewise.
17531 (lookup_fnfields): Likewise.
17532 (get_virtual_destructor): Likewise.
17533 (dfs_debug_mark): Likewise.
17534 (dfs_pushdecls): Likewise.
17535 (dfs_compress_decls): Likewise.
17536 * tree.c (layout_basetypes): Likewise.
17537 * typeck.c (build_component_ref): Likewise.
17538 (build_x_function_call): Likewise.
17539 (build_modify_expr): Likewise.
17540 (convert_for_initialization): Likewise.
17541 (build_functional_cast): Likewise.
17542 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17543 (CTOR_NAME): New.
17544 (DTOR_NAME): New.
17545 * decl.c (ctor_identifier): New.
17546 (dtor_identifier): New.
17547 (init_decl_processing): Set them.
17548
17549 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
17550
17551 * typeck.c (build_component_ref): Don't get confused by fields whose
17552 context has no type name, like pointer to member functions.
17553
17554 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17555
17556 * decl.c (grokdeclarator): Handle typedef without declarator.
17557
17558 * pt.c (tsubst): Handle SCOPE_REF in declarator.
17559
17560 * parse.y (bad_parm): Catch another case of missing `typename'.
17561
17562 * lex.c (yyprint): Handle TYPE_DECLs.
17563
17564 * decl.c (start_function): Don't try to be clever.
17565
17566 * lex.c: Lose compiler_error_with_decl.
17567 * typeck2.c: Lose error_with_aggr_type.
17568 (incomplete_type_error): Use cp_* instead of old functions.
17569 (readonly_error): Likewise.
17570 * typeck.c (convert_arguments): Likewise.
17571 * search.c (lookup_nested_field): Likewise.
17572 * method.c (make_thunk): Likewise.
17573 * decl.c (grokparms): Likewise.
17574 * cp-tree.h: Update.
17575
17576 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17577 and value.
17578
17579 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
17580
17581 * method.c (build_opfncall): When deleting a pointer to an
17582 array, build a new pointer to the tree past any ARRAY_TYPE
17583 nodes.
17584
17585 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17586
17587 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17588
17589 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
17590
17591 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17592 and ! DECL_INLINE.
17593
17594 * decl.c (finish_function): Don't set nested based on
17595 hack_decl_function_context.
17596 * parse.y (function_try_block): Check for nested function.
17597 (pending_inlines): Likewise.
17598
17599 * decl2.c (build_expr_from_tree): If a unary op already has a
17600 type, just return it.
17601
17602 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17603
17604 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17605 (finish_file): Check the return value of walk_vtables.
17606 (finish_prevtable_vardecl): Return int.
17607 (finish_vtable_vardecl): Likewise.
17608 (prune_vtable_vardecl): Likewise.
17609 * lex.c (set_vardecl_interface_info): Likewise.
17610 * cp-tree.h: Adjust return types.
17611
17612 * class.c (delete_duplicate_fields_1): Don't complain about
17613 duplicate nested types if they're the same type.
17614 (finish_struct): Remove check for duplicate.
17615 * decl2.c (grokfield): Don't check for typedef of anonymous type.
17616
17617 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17618
17619 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17620
17621 * decl.c (grokdeclarator): Lose special handling of class-level
17622 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
17623 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17624
17625 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17626
17627 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17628
17629 * search.c (compute_access): Fix handling of anonymous union
17630 members.
17631 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17632 from anonymous unions to their members.
17633
17634 * typeck.c (build_x_function_call): For static member functions,
17635 hand off to build_member_call.
17636
17637 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
17638
17639 * typeck.c (build_component_ref): Handle OFFSET_REFs.
17640
17641 * init.c (expand_vec_init): Fix init == 0 case.
17642
17643 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17644
17645 * init.c (build_new): pedwarn about init and array new.
17646 (expand_vec_init): Handle lists, use convert_for_initialization.
17647
17648 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17649 when converting to an aggregate type.
17650 * cvt.c (cp_convert): Pass it through.
17651
17652 * typeck.c (build_conditional_expr): Handle user-defined
17653 conversions to slightly different types.
17654
17655 * decl.c (grokdeclarator): Force an array type in a parm to be
17656 permanent.
17657
17658 * decl2.c (do_using_directive): Sorry.
17659 (do_namespace_alias): Likewise.
17660 * lex.c (real_yylex): Warn about using the `namespace' keyword.
17661
17662 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17663
17664 * parse.y (datadef): Move call to note_list_got_semicolon up.
17665
17666 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
17667
17668 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17669
17670 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
17671
17672 * decl.c (cp_finish_decl): The exception regions have to be
17673 nested, not overlapping. We start the exception region for a
17674 decl, after it has been fully built, and all temporaries for it
17675 have been cleaned up.
17676
17677 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
17678
17679 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17680
17681 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
17682
17683 * tree.def: Add RETURN_INIT.
17684 * pt.c (instantiate_decl): Handle RETURN_INIT.
17685 * decl.c (store_return_init): Handle minimal_parse_mode.
17686
17687 * tree.c (cp_build_type_variant): Just return an error_mark_node.
17688 * decl.c (make_typename_type): Don't try to get the file and line
17689 of an identifier.
17690 * typeck.c (comptypes): Handle TYPENAME_TYPE.
17691
17692 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
17693
17694 * decl.c (poplevel): Make sure we clear out and restore old local
17695 non-VAR_DECL values by default when they go out of scope.
17696
17697 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17698
17699 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17700 referring to addresses of variables and functions.
17701
17702 * error.c (dump_expr): Support SIZEOF_EXPR.
17703
17704 * init.c (do_friend): Use the return value of check_classfn.
17705
17706 * typeck.c (convert_arguments): Call complete_type.
17707
17708 * method.c (hack_identifier): After giving an error, set value to
17709 error_mark_node.
17710
17711 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17712
17713 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17714 lossage for local classes.
17715 * cp-tree.h: Declare it.
17716 * decl.c (lookup_name_real): Evil, painful hack for local classes.
17717 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17718 Use hack_decl_function_context.
17719 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17720 (start_function): Use hack_decl_function_context.
17721 (finish_function): Likewise.
17722 * method.c (synthesize_method): Likewise.
17723 * lex.c (process_next_inline): Likewise.
17724 (do_pending_inlines): Likewise.
17725 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17726 done with it.
17727
17728 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
17729
17730 * sig.c (build_signature_pointer_or_reference_type): Align
17731 signature pointers/references on 8-byte boundaries so they can be
17732 grabbed 2 words at a time on a Sparc.
17733
17734 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
17735
17736 * method.c (hack_identifier): Requiring a static chain is now a
17737 hard error.
17738 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17739 functions.
17740
17741 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17742
17743 * init.c (build_offset_ref): Call complete_type.
17744
17745 * decl.c (pop_from_top_level): Always pop previous_class_type.
17746
17747 * parse.y: Handle multiple decls in a for-init-statement.
17748 * pt.c (tsubst_expr): Likewise.
17749
17750 * pt.c (tsubst): Use tsubst_expr for the second operand of an
17751 ARRAY_REF.
17752
17753 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17754 (poplevel_class): Set it here.
17755 (pop_from_top_level): Pop it here if we're returning to class scope.
17756 * class.c (pushclass): Don't set it here.
17757
17758 * decl.c (maybe_push_to_top_level): Save current_template_parms,
17759 and clear it if !pseudo.
17760 (pop_from_top_level): Restore it.
17761
17762 * decl2.c (finish_file): Push the dummy each time we walk the list
17763 of vtables.
17764
17765 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17766 something for CAST_EXPR.
17767
17768 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17769
17770 * cvt.c (cp_convert): Warn about implicit conversion of the
17771 address of a function to bool, as it is always true.
17772
17773 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17774
17775 * typeck.c (c_expand_return): Fix warning for local externs returned.
17776
17777 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
17778
17779 * tree.c (mapcar): Propagate const and volatile properly.
17780
17781 * typeck.c (complete_type): Be sure to instantiate the
17782 MAIN_VARIANT of the type.
17783
17784 * method.c (synthesize_method): Class interface hackery does not
17785 apply to synthesized methods.
17786
17787 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
17788
17789 * pt.c (comp_template_args): Use comptypes rather than just
17790 checking for TEMPLATE_TYPE_PARM equivalence.
17791
17792 * typeck.c (build_x_function_call): Call complete_type before
17793 checking TYPE_OVERLOADS_CALL_EXPR.
17794
17795 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
17796
17797 * g++.c (main): Check also for new define ALT_LIBM.
17798
17799 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17800
17801 * pt.c (instantiate_class_template): If we don't have a pattern
17802 yet, that's OK.
17803 (coerce_template_parms): If we see a local class, bail.
17804
17805 * decl.c (grok_reference_init): Make sure there's a type before
17806 checking its code.
17807
17808 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17809 (push_template_decl): Likewise.
17810
17811 * parse.y (named_class_head): Set
17812 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17813
17814 * decl.c (xref_tag): Diagnose redeclaration of template
17815 type-parameter name.
17816
17817 * error.c (dump_type): Handle anonymous template type parms.
17818
17819 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17820 TYPE_STUB_DECL.
17821 (coerce_template_parms): Likewise.
17822
17823 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
17824
17825 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17826 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17827
17828 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17829
17830 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17831 before trying to get its STUB_DECL.
17832 (coerce_template_parms): Likewise.
17833
17834 * parse.y (template_type_parm): If they didn't use 'class',
17835 pretend they did after giving an error.
17836
17837 * pt.c (coerce_template_parms): Diagnose use of local class.
17838
17839 * decl.c (grok_reference_init): Use instantiate_type.
17840
17841 * error.c (dump_expr): Handle TEMPLATE_DECLs.
17842
17843 * parse.y (named_class_head): Diagnose mismatching types and tags.
17844
17845 * decl.c (pushdecl): Type decls and class templates clash with
17846 artificial type decls, not hide them.
17847
17848 * decl.c (redeclaration_error_message): Diagnose redefinition of
17849 templates properly.
17850 (duplicate_decls): Diagnose disallowed overloads for template
17851 functions, too.
17852
17853 * decl.c (start_decl): Call complete_type before checking for a
17854 destructor.
17855
17856 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17857
17858 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17859
17860 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17861
17862 * decl.c (grok_op_properties): Don't check for operator++(int) in
17863 a template.
17864
17865 * tree.c (perm_manip): Return a copy of variable and function
17866 decls with external linkage.
17867
17868 * tree.def: Change some of the min tree codes to type "1".
17869 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17870 * method.c (build_overload_int): Emit something arbitrary for
17871 anything but an INTEGER_CST if we're in a template.
17872
17873 * decl.c (cp_finish_decl): Call complete_type before deciding
17874 whether or not to lay out the decl.
17875
17876 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17877
17878 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17879
17880 * typeck2.c (build_x_arrow): Call complete_type.
17881
17882 * pt.c (add_pending_template): Broken out.
17883 (lookup_template_class): If -fexternal-templates, call it for all
17884 the methods of implemented types.
17885 (instantiate_class_template): Instead of instantiating them here.
17886 (instantiate_decl): Handle -fexternal-templates earlier.
17887
17888 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17889
17890 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17891 memoized lookup stuff inside GATHER_STATISTICS.
17892
17893 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17894
17895 * decl.c (start_decl): Complain about array of incomplete type
17896 here.
17897 (grokdeclarator): Not here.
17898
17899 * parse.y (template_parm): Expand full_parm inline so we can set
17900 the rule's precedence.
17901
17902 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17903 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17904 * decl2.c (grokbitfield): Don't check for integer constant here.
17905 * class.c (finish_struct_1): Check here.
17906
17907 * decl.c (define_label): Make the min decl go on permanent_obstack.
17908
17909 * pt.c (unify): Don't handle CONST_DECLs.
17910 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17911 (tsubst_copy): Likewise.
17912
17913 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17914 CONST_DECL for a template parm.
17915
17916 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
17917
17918 * decl.c (grokdeclarator): Complain about array of incomplete type
17919 here.
17920 (start_decl_1): Not here.
17921
17922 * pt.c (tsubst): Handle pointer-to-function declarators.
17923
17924 * method.c (hack_identifier): If pedantic, diagnose local class
17925 methods that require a static chain.
17926
17927 * decl.c (grok_op_properties): No longer static.
17928 * cp-tree.h: Declare it.
17929 * pt.c (tsubst): Call it for operators.
17930 Use tsubst_copy for TREE_VECs.
17931
17932 * parse.y (template_arg): The expr has precedence like '>'.
17933
17934 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
17935
17936 * pt.c (coerce_template_parms): Don't coerce an expression using
17937 template parms.
17938 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17939 (tsubst): Don't use build_index_2_type if the max_value uses template
17940 parms.
17941 * method.c (build_overload_int): Emit something arbitrary for an
17942 expression using template parms.
17943
17944 * parse.y (template_close_bracket): New non-terminal to catch use
17945 of '>>' instead of '> >' in template class names.
17946 (template_type): Use it.
17947 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17948
17949 * tree.def: Add CAST_EXPR.
17950 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17951 CONVERT_EXPR for minimal_parse_mode.
17952 * typeck.c (build_c_cast): Likewise.
17953 * pt.c (tsubst_copy): Likewise.
17954 * decl2.c (build_expr_from_tree): Likewise.
17955 * error.c (dump_expr): Likewise.
17956
17957 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17958
17959 * except.c (SetTerminate, SetUnexpected): Put back global vars.
17960 (init_exception_processing): Put back decl/init of
17961 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17962 fns from libstdc++.
17963
17964 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17965 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17966 Delete unused fns.
17967 * cp-tree.h (declare_uninstantiated_type_level,
17968 uninstantiated_type_level_p): Delete prototypes.
17969
17970 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17971
17972 * pt.c (tsubst_expr): Add default return.
17973
17974 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17975
17976 * error.c (fndecl_as_string): Delete unused arg CNAME.
17977 * sig.c (build_signature_table_constructor,
17978 build_signature_method_call): Fix calls.
17979
17980 * class.c (the_null_vtable_entry): Delete var definition.
17981 (init_class_processing): Delete tree the_null_vtable_entry init.
17982 * decl.c (no_print_{functions, builtins}): Declare as static.
17983 (__tp_desc_type_node): #if 0 var definition.
17984 (init_type_desc): #if 0 init of __tp_desc_type_node.
17985 (vb_off_identifier): Move var decl into init_decl_processing.
17986 (current_function_assigns_this): Declare as static.
17987 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17988 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17989 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17990 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17991 * init.c (BI_header_type, BI_header_size): Declare as static.
17992 * pt.c (template_classes): Delete unused var.
17993 (add_pending_template): Delete decl for non-existent fn.
17994 (lookup_template_class): Delete vars CODE and TAG_CODE.
17995 (instantiate_template): Delete unused var TARGS.
17996 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17997 Delete decls.
17998 (__tp_desc_type_node): #if 0 var decl.
17999 (fndecl_as_string): Fix prototype.
18000
18001 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
18002
18003 * tree.def: Add GOTO_STMT.
18004 * pt.c (tsubst_expr): Support goto and labels.
18005 * decl.c (define_label): Support minimal parsing.
18006 * parse.y (simple_stmt): Likewise.
18007
18008 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18009
18010 * xref.c (GNU_xref_member): Only define/set var I if
18011 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18012 used.
18013 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18014 (GNU_xref_end): Fix call.
18015 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18016 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18017
18018 * tree.c (build_exception_variant): Delete unused vars I, A, T,
18019 T2, and CNAME.
18020 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18021 (mapcar): Delete unused var CODE.
18022 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18023 (break_out_cleanups): Fix call.
18024 (bot_manip): Likewise.
18025 * call.c (build_method_call): Likewise.
18026 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18027 Likewise.
18028 * typeck.c (unary_complex_lvalue, build_modify_expr,
18029 convert_for_initialization): Likewise.
18030 * typeck2.c (build_functional_cast): Likewise.
18031 * cp-tree.h (build_cplus_new): Fix prototype.
18032
18033 * repo.c (open_repo_file): Delete unused var Q.
18034 (repo_compile_flags, repo_template_declared,
18035 repo_template_defined, repo_class_defined, repo_inline_used,
18036 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18037 (repo_get_id, repo_vtable_used): Declare as static.
18038 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18039 prototypes.
18040
18041 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
18042
18043 * parse.y (pending_inlines): Add function_try_block case.
18044
18045 * pt.c (unify): Fix for template const parms.
18046
18047 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18048
18049 * lex.c (extract_interface_info): Delete forward decl.
18050 (default_copy_constructor_body, default_assign_ref_body): Delete
18051 decls for non-existent functions.
18052 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18053 (init_lex): Delete setting them.
18054 (cons_up_default_function): Delete unused vars FUNC_BUF,
18055 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
18056 #if 0'd synth code.
18057 (toplevel, expression_obstack): Delete unused extern decls.
18058 (tree_node_kind): Delete unused enum.
18059 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18060 GATHER_STATISTICS.
18061 (tree_node_kind_names): Delete unused extern decl.
18062 (synth_obstack): Delete unused var.
18063 (init_lex): Don't set it.
18064 (init_parse): Add decl before use.
18065 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18066 (current_unit_{name, language}): Delete unused vars.
18067 (check_newline): Don't bother setting them, just accept the #pragma.
18068 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18069 (current_unit_{name, language}): Delete decls.
18070
18071 * search.c: Wrap all of the memoized functions, macros, and
18072 variables inside #ifdef GATHER_STATISTICS.
18073 (lookup_field, lookup_fnfields): Likewise.
18074 (init_search_processing): Likewise.
18075 (reinit_search_statistics): Wrap whole function.
18076 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18077
18078 * decl.c (finish_function): Only call pop_memoized_context if
18079 GATHER_STATISTICS is defined.
18080 (start_function): Likewise for push_memoized_context.
18081 * class.c (pushclass, popclass): Likewise.
18082
18083 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18084 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18085
18086 * cvt.c (cp_convert): Delete unused local var FORM.
18087 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18088 prototypes.
18089
18090 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18091
18092 * pt.c (do_poplevel): Oops; really return what we get from
18093 poplevel this time.
18094
18095 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18096
18097 * cp-tree.h (is_aggr_type): Add prototype.
18098
18099 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18100 * method.c ({push,pop}_cp_function_context): Delete decls.
18101 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18102 (SetUnexpected, SetTerminate): Delete unused vars.
18103 (init_exception_processing): Don't set SetUnexpected or
18104 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18105 (output_exception_table_entry): Delete unused array LABEL.
18106 (expand_internal_throw): Delete unused var PARAMS.
18107 (expand_start_catch_block): Delete unused var CLEANUP.
18108 (emit_exception_table): Delete unused var EH_NODE_DECL.
18109 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18110 GOTO_UNWIND_AND_THROW. Don't set them.
18111 (end_eh_unwinder): Add top decl.
18112 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18113 (exception_section, push_rtl_perm, do_function_call,
18114 lang_interim_eh, push_eh_cleanup, eh_outer_context,
18115 expand_end_eh_spec, end_eh_unwinder): Declare as static.
18116 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18117 throw_used): Likewise.
18118 * cp-tree.h (expand_end_eh_spec): Delete prototype.
18119
18120 * search.c (dfs_mark, dfs_mark_vtable_path,
18121 dfs_unmark_vtable_path, dfs_mark_new_vtable,
18122 dfs_unmark_new_vtable, dfs_clear_search_slot,
18123 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18124 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18125 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18126 functions.
18127 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18128 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18129 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18130 Only define #ifdef GATHER_STATISTICS.
18131 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18132 is defined.
18133 (vbase_decl): Delete var definition.
18134 (init_search): Delete old decl.
18135 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18136 never actually used.
18137 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18138 (get_base_distance_recursive): Delete unused fourth arg
18139 BASETYPE_PATH. Fix call .
18140 (get_base_distance): Fix call.
18141 (push_class_decls): Delete unused var ID.
18142 (make_memoized_table_entry): Declare as static.
18143 (breadth_first_search): Declare as static.
18144 (tree_has_any_destructor_p): Declare as static.
18145 (pop_class_decls): Delete unused arg pop_class_decls.
18146 * class.c (popclass): Fix call to pop_class_decls.
18147 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18148 tree_has_any_destructor_p): Delete prototypes.
18149
18150 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18151 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
18152 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18153 (build_user_desc): Delete unused var T.
18154 (build_class_desc): Delete unused vars T and OFF.
18155 (build_t_desc): Delete unused var NAME_STRING.
18156 (build_headof): Make static.
18157 (get_bad_cast_node): Likewise.
18158 (get_def_to_follow): Likewise.
18159 * cp-tree.h (init_type_desc): Add prototype.
18160 (build_headof): Remove prototype.
18161
18162 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
18163
18164 * pt.c (tsubst): Only look for matching decls at file scope for
18165 non-member functions.
18166
18167 * call.c (build_scoped_method_call): Handle scoped destructor
18168 calls in templates.
18169
18170 * decl.c (*_top_level): Also save previous_class_values.
18171
18172 * pt.c (tsubst_expr): Support do {} while loops.
18173 * parse.y (simple_stmt): Likewise.
18174 * tree.def: Likewise.
18175
18176 * method.c (build_overload_identifier): For a class nested in a
18177 template class, don't mangle in the template parms from our
18178 context.
18179
18180 * lex.c, cp-tree.h: Remove support for template instantiations in
18181 the pending_inlines code.
18182 * pt.c: Remove dead functions and unused arguments.
18183 (uses_template_parms): TYPENAME_TYPEs always use template parms.
18184 * parse.y: Stop passing anything to end_template_decl.
18185 * tree.c (print_lang_statistics): Only print tinst info #ifdef
18186 GATHER_STATISTICS.
18187
18188 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18189
18190 * init.c (expand_recursive_init{,_1}): Delete decls.
18191 (sort_member_init): Delete unused var INIT.
18192 (emit_base_init): Delete unused var X.
18193 (build_offset_ref): Delete unused var CNAME.
18194 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18195 (emit_base_init): Delete unused local var BASE. Delete extern
18196 decl of IN_CHARGE_IDENTIFIER.
18197 (build_delete): Delete unused local var VIRTUAL_SIZE.
18198
18199 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18200 (build_delete): Fix call.
18201 * decl2.c (delete_sanity): Likewise.
18202 * cp-tree.h (build_vec_delete): Update prototype.
18203
18204 * typeck.c (common_base_type): Delete unused var TMP.
18205 (build_binary_op): Delete local var ARGS_SAVE.
18206 (build_array_ref): Delete unused var ITYPE.
18207 (c_expand_return): Delete unused var USE_TEMP.
18208
18209 * typeck.c (compexcepttypes): Delete unused arg STRICT.
18210 (comptypes): Fix calls.
18211 * decl.c (duplicate_decls): Likewise.
18212 * cp-tree.h (compexcepttypes): Delete extra arg.
18213
18214 * decl2.c (check_classfn): Delete unused second arg CNAME.
18215 * decl.c (start_decl, grokfndecl): Fix calls.
18216 * init.c (do_friend): Likewise.
18217 * cp-tree.h (check_classfn): Update prototype.
18218
18219 * cp-tree.h (signature_error, import_export_vtable,
18220 append_signature_fields, id_in_current_class, mark_used,
18221 copy_assignment_arg_p): Add decls.
18222 * decl2.c (mark_used): Delete decl.
18223
18224 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18225
18226 * class.c (get_vtable_entry): Disable unused function.
18227 (doing_hard_virtuals): Delete unused static global var.
18228 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18229 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18230 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18231 (modify_one_vtable): Delete unused var OLD_RTTI.
18232 (finish_struct_anon): Delete unused vars OFFSET and X.
18233 (finish_struct_bits): Delete unused var METHOD_VEC.
18234 (get_basefndecls): Delete unused var PURPOSE. Delete unused
18235 for-scope local variable METHODS.
18236
18237 * call.c (user_harshness): Delete unused/unneeded arg PARM.
18238 (ideal_candidate): Delete unused args BASETYPE and PARMS.
18239 (build_method_call): Delete unused args passed into ideal_candidate.
18240 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
18241 * cp-tree.h (synthesize_method): Add decl.
18242
18243 * decl.c (note_level_for_for): Give void return type.
18244 (pushdecl_nonclass_level): Likewise.
18245 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18246 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18247 (suspend_binding_level): Delete unused var LEVEL.
18248 (duplicate_decls): Delete unused var CTYPE.
18249 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18250 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18251 PTR_ENDLINK.
18252 (grokdeclarator): Delete unused var C.
18253 (grokdeclarator): Delete unused var SIZE_VARIES.
18254 (grokparms): Delete unused var SAW_VOID.
18255 (start_function): Delete unused var OLDDECL.
18256 (cplus_expand_expr_stmt): Delete unused var
18257 REMOVE_IMPLICIT_IMMEDIATELY.
18258
18259 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18260
18261 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18262
18263 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18264
18265 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18266 (build_min_nt): Likewise.
18267 * pt.c (do_pushlevel): Emit line note.
18268 (do_poplevel): Return what we get from poplevel.
18269 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18270 * parse.y: Use do_pushlevel and do_poplevel.
18271 * cp-tree.h: Declare do_poplevel.
18272
18273 * cp-tree.h: Declare at_eof.
18274 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18275 * decl2.c (import_export_decl): Renamed from import_export_inline.
18276 (finish_file): Call it to do interface handling for statics.
18277 * pt.c (tsubst_copy): Call mark_used on variables and functions
18278 used here.
18279
18280 * decl2.c (finish_file): Don't emit statics we can't generate.
18281 * pt.c (instantiate_decl): Don't set interface on instantiations
18282 we can't generate.
18283
18284 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18285 * tree.c (print_lang_statistics): Print max template depth.
18286 * pt.c (push_tinst_level): Dump entire instantiation context.
18287 (instantiate_class_template): Use it and pop_tinst_level.
18288 (instantiate_decl): Likewise.
18289
18290 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18291 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18292
18293 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18294
18295 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18296 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18297 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18298 the new template implementation.
18299
18300 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18301
18302 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18303
18304 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
18305
18306 * decl.c (cp_finish_decl): Delay emitting the debug information for
18307 a typedef that has been installed as the canonical typedef, if the
18308 type has not yet been defined.
18309
18310 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
18311
18312 * decl2.c (grokfield): Still call pop_nested_class for access decls.
18313
18314 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18315
18316 * decl.c (lookup_label): Call label_rtx.
18317
18318 * decl.c (make_binding_level): New function.
18319 (pushlevel, pushlevel_class): Call it instead of explicit
18320 duplicate calls to xmalloc.
18321
18322 * decl.c (init_decl_processing): Delete useless build_pointer_type
18323 call.
18324
18325 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18326 (sizet_ftype_string): Delete variable.
18327 (init_decl_processing): Add built-in functions fabsf, fabsl,
18328 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
18329 variable strlen_ftype, used for strlen.
18330
18331 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
18332
18333 * decl.c (push_to_top_level): Start from current_binding_level
18334 again for now; the stl hacks depend on g++ being broken in this
18335 way, and it'll be fixed in the template rewrite.
18336
18337 * tree.def: Add USING_DECL.
18338 * decl2.c (do_class_using_decl): Implement.
18339 (grokfield): Pass access decls off to do_class_using_decl instead of
18340 grokdeclarator.
18341 * error.c (dump_decl): Handle USING_DECLs.
18342 * decl.c (grokdeclarator): Remove code for handling access decls.
18343 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18344 as access decls for now.
18345 (finish_struct): Don't check USING_DECLs for other uses of the name.
18346
18347 * search.c (get_matching_virtual): Use cp_error_at.
18348
18349 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18350
18351 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18352 match c-typeck.c.
18353 (self_promoting_args_p): Move the check that TYPE is non-nil
18354 before trying to look at its main variant.
18355 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18356
18357 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18358 Delete macros.
18359 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18360 (do_friend): Delete call to xref_friend.
18361 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18362
18363 * typeck.c (convert_sequence): #if 0 unused function.
18364
18365 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18366 be in decl_in_memory_p.
18367 (decl_in_memory_p): Delete decl.
18368 * expr.c (decl_in_memory_p): Delete fn.
18369 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18370
18371 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18372
18373 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18374
18375 * class.c (finish_struct_1): Check for a pure-specifier on a
18376 non-virtual function here.
18377
18378 * decl2.c (grok_function_init): Don't check whether the function
18379 is virtual here.
18380 (grokfield): Don't call check_for_override here.
18381
18382 * decl.c (push_to_top_level): Start from inner_binding_level,
18383 check class_shadowed in class levels.
18384
18385 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
18386
18387 * decl.c (resume_level): Ignore things that don't have names, instead
18388 of core dumping.
18389
18390 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18391
18392 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18393
18394 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
18395
18396 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18397 synthesized dtor.
18398
18399 * parse.y (complete_type_name): Bind global_scope earlier.
18400 (complex_type_name): Likewise.
18401 (qualified_type_name): Remove.
18402
18403 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
18404
18405 * decl.c (grokfndecl): Move code that looks for virtuals in base
18406 classes...
18407 * class.c (check_for_override): ... to a new function.
18408 (finish_struct_1): Call it.
18409
18410 * cp-tree.h: Declare warn_sign_compare.
18411
18412 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18413 rather than extra_warnings to decide whether to warn about
18414 comparison of signed and unsigned.
18415
18416 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
18417 implies -Wsign-compare. -Wall doesn't imply -W.
18418
18419 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
18420
18421 * typeck.c (build_component_ref): Fix to handle anon unions in base
18422 classes as well.
18423
18424 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18425
18426 * class.c (resolves_to_fixed_type_p): Delete code dealing with
18427 a WITH_CLEANUP_EXPR, since we don't generate them any more.
18428 * cvt.c (build_up_reference): Likewise.
18429 * decl.c (grok_reference_init): Likewise.
18430 (cp_finish_decl): Likewise.
18431 * error.c (dump_expr): Likewise.
18432 * tree.c (real_lvalue_p): Likewise.
18433 (lvalue_p): Likewise.
18434 (build_cplus_new): Likewise.
18435 (unsave_expr_now): Likewise.
18436 * typeck.c (unary_complex_lvalue, build_modify_expr,
18437 c_expand_return): Likewise.
18438
18439 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18440
18441 Make the C++ front-end pay attention to attributes for structures.
18442 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18443 finish_struct_1.
18444 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18445 Take out old round_up_size use and setting the DECL_ALIGN possibly
18446 using it. Take out setting of TYPE_ALIGN to round_up_size, which
18447 can override what the attribute set.
18448 * cp-tree.h (finish_struct): Update prototype.
18449 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18450 attributes to finish_struct.
18451 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18452 value down into finish_struct.
18453 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18454
18455 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
18456
18457 * decl.c (poplevel): Re-word dead for local handling.
18458 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
18459 (cp_finish_decl): If is_for_scope, check for duplicates so
18460 we can disable is_for_scope. Otherwise, preserve_temp_slots.
18461
18462 * lex.c (do_identifier): Use global binding in preference of
18463 dead for local variable.
18464
18465 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
18466
18467 * init.c (initializing_context): Handle anon union changes, the
18468 context where fields of anon unions can be initialized now has to be
18469 found by walking up the TYPE_CONTEXT chain.
18470
18471 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
18472
18473 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18474 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18475 (obscure_complex_init): If bss is supported, always set
18476 DECL_INITIAL to error_mark_node.
18477
18478 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18479
18480 * init.c (is_friend): Make sure there's a context before we see if
18481 it's an aggr type.
18482
18483 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
18484
18485 * init.c (is_friend): Classes are not friendly with nested classes.
18486
18487 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
18488
18489 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18490 and record its result.
18491
18492 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
18493
18494 * class.c (finish_struct_anon): Switch around code to not move anon
18495 union elements around, nor mess up their contexts, nor offsets,
18496 instead we now build up the right number of COMPONENT_REFs for all
18497 the anon unions that may be present at build_component_ref time.
18498 * typeck.c (lookup_anon_field): New routine to handle field lookup
18499 on fields without names. We find them, based upon their unique type
18500 instead.
18501 * typeck.c (build_component_ref): Allow FIELD_DECL components.
18502 Handle finding components in anonymous unions, and ensure that a
18503 COMPONENT_REF is built for each level as necessary.
18504
18505 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
18506
18507 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18508 code that ensures that copy ctors are used if appropriate.
18509
18510 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18511
18512 * init.c (build_vec_delete): Only give an error if base isn't an
18513 error_mark_node.
18514
18515 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
18516
18517 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18518 (yylex): If we see `new', keep slurping.
18519
18520 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
18521
18522 * class.c (finish_struct_1): Move code for handling anon unions...
18523 (finish_struct_anon): to here. Fixup so that we do the offset
18524 calculations right, and so that the fields are physically moved to
18525 the containers's chain.
18526
18527 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18528
18529 * decl.c (grokdeclarator): Avoid trying to get an operand off an
18530 identifier node.
18531
18532 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
18533
18534 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18535 POINTER_SIZE to agree with expr.c.
18536
18537 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
18538
18539 * search.c (lookup_field): Don't report ambiguities if protect is 0,
18540 instead return NULL_TREE.
18541
18542 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
18543
18544 * class.c (finish_struct_1): Call warn_hidden if we want warnings
18545 about overloaded virtual functions.
18546 (warn_hidden): New routine to warn of virtual functions that are
18547 hidden by other virtual functions, that are not overridden.
18548 (get_basefndecls): New routine, used by warn_hidden.
18549 (mark_overriders): New routine, used by warn_hidden.
18550 * search.c (get_matching_virtual): Remove old warning that just
18551 isn't very useful.
18552
18553 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18554
18555 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18556
18557 * typeck.c (null_ptr_cst_p): Delete unused fn.
18558 (build_function_call_maybe): Delete unused fn.
18559
18560 * expr.c (extract_init): #if 0 the code after unconditional return 0
18561 for now.
18562
18563 Delete old cadillac code.
18564 * edsel.c: Remove file.
18565 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18566 * Makefile.in (CXX_OBJS): Delete edsel.o.
18567 (edsel.o): Delete rule.
18568 * cp-tree.h (flag_cadillac): Delete var decl.
18569 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18570 * decl2.c (flag_cadillac): Delete var definition.
18571 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18572 (grokfield): Delete code depending on flag_cadillac.
18573 (finish_anon_union): Likewise.
18574 * class.c (finish_struct_1): Likewise.
18575 (pushclass): Likewise.
18576 (popclass): Likewise.
18577 (push_lang_context): Likewise.
18578 (pop_lang_context): Likewise.
18579 * decl.c (init_decl_processing): Likewise.
18580 (start_decl): Likewise.
18581 (cp_finish_decl): Likewise.
18582 (xref_tag): Likewise.
18583 (finish_enum): Likewise.
18584 (start_function): Likewise.
18585 (finish_function): Likewise.
18586 (finish_stmt): Likewise.
18587 * lex.c (lang_init): Likewise.
18588 (check_newline): Likewise.
18589
18590 * lex.c (do_pending_inlines): Delete synthesized method kludge.
18591
18592 Delete defunct, ancient garbage collection implementation.
18593 * rtti.c: New file with the RTTI stuff from gc.c.
18594 * gc.c: Removed file (moved the remaining stuff into rtti.c).
18595 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18596 (rtti.o): New rule, replacing gc.o.
18597 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18598 * cp-tree.h: Delete gc-related fn decls.
18599 (DECL_GC_OFFSET): Delete macro.
18600 (flag_gc): Delete extern decl.
18601 * decl.c (current_function_obstack_index): Delete var decl.
18602 (current_function_obstack_usage): Delete var decl.
18603 (start_function): Delete clearing of current_function_obstack_index
18604 and current_function_obstack_usage.
18605 (init_decl_processing): Delete code relying on -fgc.
18606 Delete call to init_gc_processing.
18607 (cp_finish_decl): Delete calls to build_static_gc_entry and
18608 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
18609 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18610 and to expand_expr of a __gc_main call.
18611 (maybe_gc_cleanup): Delete var decl.
18612 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18613 * decl2.c (flag_gc): Delete var decl.
18614 (lang_f_options): Delete offering of -fgc.
18615 (lang_decode_option): Delete -fgc and -fno-gc handling.
18616 (get_temp_regvar): Delete gc code.
18617 * init.c (build_new): Delete gc code.
18618 * lex.c (init_lex): Delete checking of flag_gc.
18619
18620 * typeck.c (convert_arguments): Delete gc code.
18621 (build_component_addr): Delete -fgc warning.
18622 (build_modify_expr): Delete gc code.
18623
18624 * decl2.c (build_push_scope): Delete fn.
18625 * cp-tree.h (build_push_scope): Delete decl.
18626
18627 * search.c (clear_search_slots): Delete fn.
18628 * cp-tree.h (clear_search_slots): Delete decl.
18629
18630 * search.c (tree_needs_constructor_p): Delete fn.
18631 * cp-tree.h (tree_needs_constructor_p): Delete decl.
18632
18633 * tree.c (id_cmp): Delete fn.
18634
18635 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18636 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18637
18638 * tree.c (decl_value_member): Delete fn.
18639 * cp-tree.h (decl_value_member): Delete decl.
18640
18641 * tree.c (list_hash_lookup_or_cons): Delete fn.
18642 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18643
18644 * method.c (cplus_exception_name): Delete fn.
18645 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18646
18647 * spew.c (shift_tokens): Delete fn.
18648
18649 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18650
18651 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18652 to cp_finish_decl.
18653 * parse.y: Likewise.
18654
18655 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18656
18657 * tree.c (build_cplus_staticfn_type): Delete function definition;
18658 never used.
18659 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18660
18661 * tree.c (virtual_member): Delete function definition; never used.
18662 * cp-tree.h (virtual_member): Delete decl.
18663
18664 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
18665
18666 * typeck.c (build_component_ref): Handle getting vbase pointers
18667 out of complex multiple inheritance better.
18668
18669 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
18670
18671 * typeck.c (build_object_ref): Make sure we use the real type, not
18672 any reference type.
18673
18674 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
18675
18676 * tree.c (build_exception_variant): Don't create new types if we
18677 don't have to, also build new types on the right obstack.
18678
18679 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18680
18681 * decl.c (store_bindings): Split out from push_to_top_level.
18682 (push_to_top_level): Call it for b->type_shadowed on class binding
18683 levels.
18684
18685 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
18686
18687 * search.c (expand_upcast_fixups): Fix so that offsets stored in
18688 vbase_offsets are always right. Fixes a problem where virtual base
18689 upcasting and downcasting could be wrong during conversions on this
18690 during virtual function dispatch at ctor/dtor time when dynamic
18691 vtable fixups for deltas are needed. This only sounds easier than
18692 it is. :-)
18693 (fixup_virtual_upcast_offsets): Change to reflect new calling
18694 convention for expand_upcast_fixups.
18695
18696 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18697
18698 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18699 check that it's usable as the bitfield width.
18700
18701 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18702
18703 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18704 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18705 only ever used for functions in it.
18706
18707 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18708
18709 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18710 (nested_type): Likewise.
18711 (nested_name_specifier): Use lastiddecl.
18712
18713 * decl.c (grokdeclarator): Adjust accordingly.
18714 * init.c (expand_member_init): Likewise.
18715 * parse.y (base_class): Likewise.
18716 * typeck2.c (build_functional_cast): Likewise.
18717
18718 * typeck2.c (build_functional_cast): Fill in name after we've
18719 checked for non-aggr type.
18720
18721 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
18722
18723 * decl2.c (warn_pointer_arith): Default to on.
18724
18725 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18726
18727 * lex.c (is_rid): New function.
18728 * decl.c (grokdeclarator): Diagnose reserved words used as
18729 declarator-ids.
18730
18731 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18732
18733 * tree.c (get_decl_list): Don't lose cv-quals.
18734
18735 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18736 typespecs used as declarator-ids.
18737
18738 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
18739
18740 * decl.c (poplevel): When poping a level, don't give a warning for
18741 any subblocks that already exist.
18742
18743 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18744
18745 * typeck.c (build_object_ref): Finish what I started.
18746
18747 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18748
18749 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18750
18751 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18752 scope.
18753
18754 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18755
18756 * decl.c (xref_tag): Handle passing a type in directly.
18757
18758 * parse.y (qualified_type_name): Pull out the type.
18759 (nested_type): Likewise.
18760 Take types directly instead of as identifiers.
18761 * call.c (build_scoped_method_call): Take types directly instead of
18762 as identifiers.
18763 * decl.c (xref_basetypes): Likewise.
18764 * init.c (expand_member_init): Likewise.
18765 (build_member_call): Likewise.
18766 (build_offset_ref): Likewise.
18767 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18768 * method.c (do_build_assign_ref): Likewise.
18769 * decl.c (grokdeclarator): Handle a type appearing as the
18770 declarator-id for constructors.
18771 * method.c (do_build_copy_constructor): current_base_init_list now
18772 uses the types directly, not their names.
18773 * init.c (sort_base_init): Likewise.
18774 (expand_member_init): Likewise.
18775 * init.c (is_aggr_type): New function, like is_aggr_typedef.
18776
18777 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
18778
18779 * tree.c (layout_basetypes): Call build_lang_field_decl instead
18780 of build_lang_decl if first arg is a FIELD_DECL.
18781
18782 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18783
18784 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18785 non-empty.
18786 * except.c (expand_start_catch_block): Set TREE_USED to avoid
18787 warnings about the catch handler.
18788
18789 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
18790
18791 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18792 expand_target_expr.
18793
18794 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18795
18796 Fix access control to use trees rather than integers.
18797 * class.c (access_{default, public, protected, private,
18798 default_virtual, public_virtual, private_virtual}_node): Add
18799 definitions.
18800 (init_class_processing): Do creation of those nodes.
18801 * cp-tree.h (access_type): Delete enum decl.
18802 (access_{default, public, protected, private, default_virtual,
18803 public_virtual, private_virtual}_node): Add decls.
18804 (compute_access): Change return type.
18805 * search.c (compute_access): Have tree return type, instead of enum.
18806 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18807 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18808 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18809 * parse.y (VISSPEC): Make ttype rather than itype.
18810 (base_class_access_list): Likewise.
18811 * *.[cy]: Change all refs of `access_public' to `access_public_node',
18812 etc.
18813 * call.c (build_method_call): Make ACCESS be a tree.
18814 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18815 * cvt.c (convert_to_aggr): Likewise.
18816 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18817 Likewise.
18818 * method.c (hack_identifier): Likewise.
18819 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18820
18821 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
18822
18823 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18824 frontend, and make it more consistent with respect to
18825 warn_pointer_arith.
18826
18827 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
18828
18829 * decl.c (pushdecl): Check for duplicate parameter names.
18830
18831 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
18832
18833 * decl.c (expand_static_init): Call assemble_external for atexit.
18834
18835 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
18836
18837 * except.c (do_unwind): Remove some generated dead code.
18838 (eh_outer_context): New routine, factor out some common code from
18839 expand_builtin_throw and end_eh_unwinder. Add code to do return
18840 address masking for the PA.
18841 (expand_builtin_throw): Use eh_outer_context instead of open coding
18842 it here.
18843 (end_eh_unwinder): Likewise.
18844
18845 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
18846
18847 * except.c (expand_throw): Call assemble_external for __empty, if we
18848 use it.
18849
18850 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
18851
18852 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18853 NORMAL_RETURN_ADDR_OFFSET.
18854 (end_eh_unwinder): Likewise.
18855
18856 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
18857
18858 * gc.c (build_dynamic_cast): Make sure we don't cast away const
18859 when dealing with references, and make sure we handle dynamic
18860 casting to a cv qualified reference.
18861
18862 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
18863
18864 * except.c (struct eh_context): New structure top hold eh context
18865 information.
18866 (push_eh_context): New routine.
18867 (pop_eh_context): Likewise.
18868 * decl.c (push_cp_function_context): Use them.
18869 (pop_cp_function_context): Likewise.
18870
18871 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
18872
18873 * decl2.c (finish_file): Also prune uninteresting functions in the
18874 inline emission loop.
18875
18876 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
18877
18878 * sig.c (build_signature_table_constructor): Mark functions
18879 in the signature as referenced.
18880
18881 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
18882
18883 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18884 the inline emission stuff.
18885
18886 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
18887
18888 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18889 weak symbols.
18890 * lang-options.h: Add -f{no-,}weak.
18891 * decl.c (init_decl_processing): If the target does not support weak
18892 symbols, don't use them.
18893 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18894
18895 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18896
18897 * init.c (expand_member_init): warning for base init after members.
18898
18899 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
18900
18901 * cvt.c (build_expr_type_conversion): Don't convert to a reference
18902 type.
18903
18904 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
18905
18906 * method.c (report_type_mismatch): Improve wording for volatile
18907 mismatches.
18908
18909 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
18910
18911 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18912 expand_assignment, as the later doesn't handle things that have
18913 copy constructors well. The compiler would do bitwise copying,
18914 instead of ctor calling in some cases.
18915
18916 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
18917
18918 * g++.c (my_strerror): Return "cannot access" if errno is 0.
18919 (pfatal_with_name, perror_exec): Don't assume that
18920 the returned value from my_strerror contains no '%'s.
18921 (concat): Remove.
18922 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18923
18924 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
18925
18926 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18927 TYPE_METHODS/TREE_CHAIN mean what they used to.
18928 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18929 instead of TYPE_METHODS.
18930 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18931 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18932 * cp-tree.h (CLASSTYPE_METHODS): Lose.
18933 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18934 TYPE_METHODS.
18935 (struct lang_decl): Lose next_method field.
18936 (DECL_NEXT_METHOD): Lose.
18937 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18938 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18939 anymore.
18940 (finish_struct_methods): Don't mess with the TREE_CHAINs in
18941 fn_fields.
18942
18943 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18944 vector.
18945
18946 * call.c (build_method_call): Synthesize here even when not inlining.
18947 * typeck.c (build_function_call_real): Likewise.
18948
18949 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
18950
18951 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18952 == DBX_DEBUG, call dbxout_start_new_source_file and
18953 dbxout_resume_previous_source_file when appropriate.
18954
18955 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
18956
18957 * except.c (start_anon_func): Push to the top level.
18958 (end_anon_func): Pop from the top level.
18959
18960 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
18961
18962 * cp-tree.h (build_cleanup): New routine to build cleanups.
18963 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18964 call at ctor time and use atexit to run it later.
18965 * decl2.c (build_cleanup): New routine, taken from finish_file.
18966 (finish_file): Use build_cleanup instead, and don't put function
18967 local statics in global dtor list.
18968
18969 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
18970
18971 * except.c (expand_throw): Ensure that we have cleanups, if we try
18972 and expand cleanups.
18973
18974 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
18975
18976 * except.c (expand_throw): Add logic to manage dynamic cleanups for
18977 the EH object.
18978 (expand_end_catch_block): Use the magic of expand_goto, instead of
18979 emit_jump so that we get the cleanup for any catch clause parameter
18980 and the cleanup for the exception object. Update to reflect label
18981 changes.
18982 (push_eh_cleanup): New routine to register a cleanup for an
18983 exception object.
18984 (empty_fndecl): Used to default cleanup actions to
18985 nothing.
18986 (init_exception_processing): Setup empty_fndecl. Setup
18987 saved_cleanup.
18988 (expand_start_catch_block): Update to reflect label changes. Call
18989 push_eh_object to register the cleanup for the EH object.
18990 (start_anon_func): New routine to start building lambda expressions
18991 from trees.
18992 (end_anon_func): New routine to end them.
18993 (struct labelNode): Change so that we can use tree labels, or rtx
18994 labels.
18995 (saved_cleanup): Object to check for dynamic cleanups for the
18996 exception handling object.
18997 (push_label_entry): Change so that we can use tree labels, or rtx
18998 labels.
18999 (pop_label_entry): Likewise.
19000 (top_label_entry): Likewise.
19001 (expand_start_all_catch): Use tree label instead of rtx label, so
19002 that we can get the magic of expand_goto.
19003 (expand_end_all_catch): Update to reflect label changes.
19004
19005 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19006 use UNSAVE_EXPRs.
19007 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19008 building_cleanup logic, as we now use UNSAVE_EXPRs.
19009 * cp-tree.h (unsave_expr): Declare it.
19010 * decl.c (building_cleanup): Remove.
19011 (maybe_build_cleanup): Remove building_cleanup logic, and use
19012 UNSAVE_EXPR instead.
19013
19014 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
19015
19016 * gc.c (build_t_desc): Update error message to say <typeinfo>.
19017
19018 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19019
19020 * decl.c (pushdecl): Only warn about shadowing a local variable if
19021 warn_shadow is true.
19022
19023 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
19024
19025 * typeck.c (build_binary_op_nodefault): Added warning about
19026 comparisons between different enum types with -Wall, unless
19027 -fenum-int-equiv set.
19028
19029 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
19030
19031 * class.c (finish_struct_1): Skip down to the inner type in
19032 multidimensional arrays. Ensures ctors will be made for types that
19033 need constructing.
19034
19035 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
19036
19037 * decl.c (last_dtor_insn): New to track the last compiler generated
19038 insn in a dtor.
19039 (store_parm_decls): Set it.
19040 (finish_function): Use it to see if the dtor is empty. Avoid doing
19041 vtable setup all the time, if we can.
19042 (struct cp_function): Add last_dtor_insn.
19043 (push_cp_function_context): Save it.
19044 (pop_cp_function_context): Restore it.
19045
19046 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
19047
19048 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19049 warnings.
19050
19051 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
19052
19053 * typeck.c (expand_target_expr): Make sure targets get put into the
19054 current temp_slot_level, so that the free_temp_slots call will reuse
19055 them.
19056
19057 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
19058
19059 * class.c (finish_struct_1): Delay delta fixups for virtual bases
19060 until after we have done the hard virtuals, to avoid a bogus `every
19061 virtual function must have a unique final overrider' for virtual
19062 functions that are only overridden by hard virtuals.
19063
19064 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
19065
19066 * pt.c (do_function_instantiation): Don't try to find a file-scope
19067 template for a member function.
19068
19069 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
19070
19071 * g++.c (main): Add handling of -nodefaultlibs.
19072
19073 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
19074
19075 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19076 distinguish between direct bindings of reference variables, and
19077 indirect bindings of reference variables.
19078 * cvt.c (build_up_reference): Use it.
19079 * typeck.c (convert_arguments): Use it to indicate this is an
19080 indirect binding.
19081 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19082 as they are unused.
19083 (expand_static_init): Likewise.
19084 (cplus_expand_expr_stmt): Likewise.
19085 * decl2.c (finish_file): Likewise.
19086 * init.c (perform_member_init): Likewise.
19087 (emit_base_init): Likewise.
19088 (expand_aggr_vbase_init_1): Likewise.
19089
19090 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19091
19092 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19093 get a DECL_LANG_SPECIFIC node.
19094 * cp-tree.h (lang_decl_flags): Add new member `level'.
19095 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19096 decl_flags level member.
19097
19098 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19099
19100 * call.c (build_method_call): Make sure instance has a
19101 TYPE_LANG_SPECIFIC node before we dive into it.
19102
19103 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
19104
19105 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19106
19107 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
19108
19109 * decl.c (duplicate_decls): When smashing decls, smash staticness in
19110 the usual way.
19111
19112 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
19113
19114 * decl.c (poplevel): Handle the merging of subblocks of cleanups
19115 when finishing blocks that have already been created (usually due to
19116 the fixup goto code). Fixes bad debugging information.
19117
19118 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
19119
19120 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19121 that's not a list of overloaded functions.
19122
19123 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19124
19125 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19126 before trying to use DECL_ABSTRACT_VIRTUAL_P.
19127
19128 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
19129
19130 * decl2.c (mark_used): New function for hooking into setting of
19131 TREE_USED on decls.
19132 * call.c (build_method_call): Use it.
19133 * class.c (instantiate_type): Likewise.
19134 * init.c (build_offset_ref): Likewise. Don't call assemble_external
19135 for all like-named functions.
19136 * method.c (hack_identifier): Likewise.
19137 (emit_thunk): Don't call assemble_external.
19138 (make_thunk): Create thunk as a FUNCTION_DECL so that it
19139 gets the right mode and ENCODE_SECTION_INFO works.
19140
19141 * parse.y: Use mark_used. Pass operator names to do_identifier.
19142 * lex.c (do_identifier): Handle operator names.
19143
19144 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19145
19146 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19147
19148 * errfn.c: Include stdio.h.
19149 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19150
19151 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
19152
19153 * typeck2.c (digest_init): Always convert initializers to the
19154 right type.
19155
19156 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
19157
19158 * init.c (member_init_ok_or_else): Don't allow member initializers
19159 for indirect members, as it is invalid.
19160
19161 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19162
19163 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19164
19165 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
19166
19167 * parse.y (for.init.statement): Catch compound statements inside for
19168 initializations, if we're being pedantic.
19169
19170 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
19171
19172 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19173 looking for.
19174
19175 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
19176
19177 * error.c (dump_expr): Don't core dump when a boolean expression is
19178 used as a default argument.
19179
19180 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
19181
19182 * class.c (finish_struct_bits): Check aggregate_value_p instead of
19183 RETURN_IN_MEMORY.
19184
19185 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
19186
19187 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19188 BLKmode type that would otherwise be returned in registers.
19189
19190 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19191
19192 * g++.c (WITHLIBC): New macro.
19193 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
19194 saw_libc and pass it at the end if it was set.
19195
19196 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
19197
19198 * parse.y (fn.def1): Call split_specs_attrs in
19199 declmods notype_declarator case.