1 1999-09-24 Mark Mitchell <mark@codesourcery.com>
3 * decl.c (pushdecl): Don't make local declarations of extern
4 variables give the variable a DECL_CONTEXT for the function.
5 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
6 Don't accidentally make RTL for local declarations.
7 (emit_local_var): Handle declarations with asm-specifiers here.
9 1999-09-23 Mark Mitchell <mark@codesourcery.com>
11 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
14 * cp-tree.h (language_function): Add cannot_inline.
15 * decl.c (start_function): Restore current_function_cannot_inline
17 (save_function_data): Save current_function_cannot_inline.
18 * decl2.c (start_objects): Change prototype. Build the function
19 in function-at-a-time mode.
20 (finish_objects): Likewise.
21 (generate_ctor_or_dtor_function): Adjust accordingly.
23 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
24 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
25 Don't call expand_anon_union_decl here
26 * semantics.c (exapnd_stmt): Call it here, instead.
27 * typeck.c (mark_addressable): Addressed variables are implicitly
30 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
32 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
33 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
34 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
35 * cp-tree.h: Add tree checking macros to various tree access
37 * ptree.c (print_lang_decl): Test for function or variable
38 before accessing template info.
40 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
42 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
43 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
44 * decl2.c (lang_f_options): Add -fshort-wchar.
45 * cp-tree.h: Declare flag_short_wchar.
46 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
49 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
51 * ir.texi: Fix formatting errors and typos.
53 1999-09-22 Mark Mitchell <mark@codesourcery.com>
55 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
57 * decl.c (pushdecl): Do create a binding for extern "C" functions,
58 but not for their DECL_ASSEMBLER_NAMEs.
59 (lookup_name_current_level): Fix formatting.
61 * decl2.c (start_objects): Mark static constructors and
64 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
66 * decl.c (define_case_label): Don't crash if we're not in a switch.
68 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
69 * lang-options.h: Restore -fthis-is-variable. Remove help strings
70 for unsupported flags.
72 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
74 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
75 Accept and warn about -fthis-is-variable.
77 1999-09-21 Mark Mitchell <mark@codesourcery.com>
79 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
80 CLEANUP_STMT, and SCOPE_STMT.
82 * decl2.c (lang_decode_option): Adjust, in the wake of recent
83 changes to option processing.
85 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
87 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
88 function pointer from pmfs with no object given.
89 (convert_for_assignment): Do not return error when converting
92 1999-09-21 Alex Samuel <samuel@codesourcery.com>
94 * lex.c (internal_filename): New variable.
95 (INTERNAL_FILENAME): New macro.
96 (init_parse): Allocate internal_filename and mark as root. Use it
97 instead of a string constant.
99 1999-09-21 Nathan Sidwell <nathan@acm.org>
101 Reimplement dynamic cast and catch matching.
102 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
103 * search.c (dynamic_cast_base_recurse): New function.
104 (get_dynamic_cast_base_type): New function for dynamic cast.
105 * rtti.c (build_dynamic_cast_1): Determine source and target
106 class relationship. Call __dynamic_cast_2.
107 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
108 (__user_type_info::dyncast): New dynamic cast dispatcher.
109 (__user_type_info::sub_kind): New nested enumeration.
110 (__user_type_info::contained_p): sub_kind predicate.
111 (__user_type_info::contained_public_p): Likewise.
112 (__user_type_info::contained_nonpublic_p): Likewise.
113 (__user_type_info::contained_nonvirtual_p: Likewise.
114 (__user_type_info::upcast_result): New nested struct.
115 (__user_type_info::dyncast_result): New nested struct.
116 (*::do_upcast): New catch function.
117 (*::do_dyncast): New dynamic cast function.
118 (__user_type_info::find_public_subobj): New dynamic cast
120 (*::do_find_public_subobj): New dynamic cast helper function.
121 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
122 (__user_type_info::dyncast): Define dynamic cast dispatcher.
123 (*::do_upcast): Define catch function.
124 (*::do_dyncast): Define dynamic cast function.
125 (*::do_find_public_subobj): Define dynamic cast helper function.
126 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
127 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
128 (__dynamic_cast_2): New dynamic cast runtime.
130 1999-09-20 Mark Mitchell <mark@codesourcery.com>
132 * cp-tree.h (finish_stmt_expr): Change prototype.
133 * expr.c (cplus_expand_expr): Adjust call accordingly.
134 * init.c (finish_init_stmts): Likewise.
135 * parse.y (primary): Likewise.
136 * pt.c (tsubst_copy): Likewise.
137 * semantics.c (finish_stmt_expr): Don't take two parameters.
138 Don't remove generated BLOCKs from the block-tree.
140 Remove support for assigning to `this'.
141 * NEWS: Note that fact.
142 * class.c (build_vbase_path): Don't check flag_this_is_variable.
143 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
144 (language_function): Remove assigns_this, just_assigned_this, and
145 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
146 (base_init_expr): Remove.
147 (current_vcalls_possible_p): New macro.
148 (vtbls_set_up_p): Likewise.
149 (emit_base_init): Change prototype.
150 * decl.c (finish_destructor_body): New function, split out from
152 (current_function_assigns_this): Remove.
153 (current_function_just_assigned_this): Likewise.
154 (start_function): Don't set them.
155 (finish_function): Don't check them. Don't emit
156 base-initialization code here. Generate code for destructors when
157 doing semantic analysis.
158 (finish_stmt): Don't check current_function_just_assigned_this.
159 * decl2.c (lang_f_options): Remove this-is-variable.
160 (lang_decode_option): Likewise.
161 (grokclassfn): Don't check flag_this_is_variable.
162 * init.c (emit_base_init): Return the expression generated.
163 (construct_virtual_bases): Don't push/pop obstacks. Fix
165 (build_new_1): Don't check flag_this_is_variable.
166 (get_temp_regvar): Don't set DECL_REGISTER.
167 (build_vec_init): Don't call use_variable.
168 * lang-options.h: Remove "-fthis-is-variable" and
169 "-fno-this-is-variable".
170 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
171 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
173 * semantics.c (finish_expr_stmt_real): Rename to ...
174 (finish_expr_stmt): This. Remove assigned_this parameter.
175 (begin_if_stmt): Call do_pushlevel before starting the statement.
176 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
178 (setup_vtbl_ptr): Emit initialization code for bases and members
179 at semantic-analysis time. Emit code to initialize vtables in
181 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
182 Don't handle CTOR_INITIALIZER any more.
183 * typeck.c (build_modify_expr): Don't check for assignments to
185 (c_expand_return): Don't suggest assigning to `this'.
187 * Makefile.in (decl.o): Depend on RTL_H.
191 (method.o): Likewise.
192 (search.o): Likewise.
196 * decl.c (duplicate_decls): When a builtin function is redeclared
197 as static, make sure it is mangled correctly.
199 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
200 detail about the statement-tree.
202 1999-09-20 Nathan Sidwell <nathan@acm.org>
204 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
206 1999-09-20 Nick Clifton <nickc@cygnus.com>
208 * decl2.c (lang_decode_option): Extend comment.
210 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
212 * typeck.c: Include "tm_p.h".
214 1999-09-19 Mark Mitchell <mark@codesourcery.com>
218 1999-09-19 Paul Burchard <burchard@pobox.com>
220 * semantics.c (expand_stmt): Initialize return value.
222 1999-09-18 Paul Burchard <burchard@pobox.com>
224 * gxxint.texi: G++ now implements namespaces.
226 1999-09-18 Mark Mitchell <mark@codesourcery.com>
228 * decl.c (pop_label): Don't warn about unused labels more than
230 * semantics.c (finish_goto_stmt): Always marked used labels as
233 * decl.c (layout_var_decl): Change prototype. Call layout_decl
234 even when the declaration is external.
235 (cp_finish_decl): Adjust call to layout_var_decl.
236 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
238 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
240 * typeck.c (get_member_function_from_ptrfunc): Always consider
241 virtuality inside member pointer.
243 1999-09-17 Mark Mitchell <mark@codesourcery.com>
245 Turn on function-at-a-time processing.
246 * cp-tree.h (doing_semantic_analysis_p): New macro.
247 (SF_DEFAULT): Define to zero, not SF_EXPAND.
248 (start_handler_parms): Change prototype.
249 (expand_start_catch_block): Likewise.
250 (expand_end_catch_block): Likewise.
251 (expand_start_eh_spec): Likewise.
252 (expand_end_eh_spec): Declare.
253 (finish_handler_parms): Change prototype.
254 (begin_catch_block): Declare.
255 (finish_handler): Change prototype.
256 (do_pushlevel): Declare.
257 (do_poplevel): Likewise.
258 * decl.c (pushlevel): Don't create
259 binding levels when not doing semantic analysis.
260 (poplevel): Don't pop them.
261 (pushdecl): Assert that we are never called when not doing
263 (pushdecl_top_level): Use push_to_top_level.
264 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
265 label when expanding.
266 (cp_finish_decl): Only inject for-scope variables when doing
267 semantic analysis. Add comments.
268 (start_handler_parms): Return the handler parm.
269 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
270 already set. Reinitialize from saved function data if available.
271 Don't pushlevel when not doing semantic analysis.
272 (store_parm_decls): Only generate RTL when expanding. Only
273 pushdecl when doing semantic analysis. Set
274 current_eh_spec_try_block if appropriate.
275 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
276 Combine common code. Don't poplevel when not doing semantic
278 (push_cp_function_context): Don't expand functions without an
279 explicit call to expand_body.
280 (mark_lang_function): Make eh_spec_try_block and
282 * except.c (expand_end_eh_spec): Don't
284 (process_start_catch_block): Likewise.
285 (push_eh_cleanup): Use finish_decl_cleanup.
286 (initialize_handler_parm): New function.
287 (expand_start_catch_block): Use it.
288 (expand_end_catch_block): Use tree-generation functions, not
289 RTL-generation functions.
290 (expand_start_eh_spec): Likewise.
291 (expand_end_eh_spec): Likewise.
292 (expand_exception_blocks): Simplify.
293 (start_anon_func): Use do_pushlevel.
294 (end_anon_func): Use do_poplvel. Call expand_body for the
296 * expr.c (do_case): Don't call define_case_label.
297 * init.c (create_temporary_var): Set DECL_CONTEXT for local
299 * method.c (emit_thunk): Call expand_body for the
301 (sythesize_method): Likewise.
302 * parse.y (handler_args): Give it ttype.
303 (eat_saved_input): Call expand_body.
304 (base_init): Use do_pushlevel.
305 (pending_inline): Call expand_body.
306 (handler): Adjust calls to finish_handler_parms and
308 (handler_args): Don't call expand_start_catch_block. Return the
309 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
310 * parse.c: Regenerated.
311 * rtti.c (synthesize_tinfo_fn): Call finish_function.
312 * semantics.c (do_pushlevel): Give it external linkage. Build
314 (do_poplevel): Likewise.
315 (finish_case_label): Call define_case_label when doing semantic
317 (finish_goto_stmt): Create RTL for labels.
318 (finish_function_try_block): Set in_function_try_handler
320 (finish_function_handler_sequence): Unset it.
321 (finish_handler_parms): Use expand_start_catch_block even when
322 building a statement-tree.
323 (begin_catch_block): New function.
324 (finish_handler): Move a little RTL-generation logic here.
325 (finish_decl_cleanup): Allow cleanups for empty declarations.
326 (finish_named_return_value): Don't pushdecl when not doing
328 (expand_stmt): Don't do semantic analysis for variable
329 declarations. Handle START_CATCH_STMT. Call expand_label
330 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
331 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
332 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
333 RETURN_INIT and function try blocks.
335 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
336 x_scope_stmt_stack. Add x_in_charge_parm.
337 (current_eh_spec_try_block): New macro.
338 (current_scope_stmt_stack): Likewise.
339 (current_in_charge_parm): Likewise.
340 * decl.c (start_function): Initialize current_in_charge_parm.
341 (finish_function): Use current_in_charge_parm rather than looking
343 * search.c (expand_indirect_vtbls_init): Likewise.
345 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
346 (TRY_BLOCK): Likewise.
348 (START_CATCH_STMT): New tree node.
349 (SCOPE_STMT): Likewise.
350 * cp-tree.h (SCOPE_BEGIN_P): New macro.
351 (SCOPE_NULLIFIED_P): Likewise.
352 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
353 (struct lang_decl): Add saved_language_function.
354 (DECL_PENDING_INLINE_INFO): Adjust documentation.
355 (DECL_PENDING_INLINE_P): New macro.
356 (TYPE_TI_ARGS): Fix typo in comment.
357 (DECL_SAVED_TREE): Add to documentation.
358 (DECL_SAVED_FUNCTION_DATA): New macro.
359 (START_CATCH_TYPE): Likewise.
360 (SCOPE_END_P): New macro.
361 (declare_parm_level): Don't declare.
362 * decl.c (mark_lang_function): New function, split out from
363 mark_cp_function_context.
364 (save_function_data): New function.
365 (declare_parm_level): Remove.
366 (finish_function): Use save_function_data to squirrel away
367 important stuff for later use.
368 (mark_cp_function_context): Use mark_function_data.
369 (lang_mark_tree): Likewise.
370 * lex.c (begin_definition_of_inclass_inline): Set
371 DECL_PENDING_INLINE_P.
372 (store_pending_inline): Clear it.
373 * pt.c (tsubst_decl): Likewise.
375 1999-09-17 Nathan Sidwell <nathan@acm.org>
377 * call.c (perform_implicit_conversion): Deal with error_mark_node.
379 1999-09-17 Mark Mitchell <mark@codesourcery.com>
381 * decl.c (warn_extern_redeclared_static): Don't get confused by
382 static member functions.
383 (duplicate_decls): Merge DECL_THIS_STATIC.
385 * decl.c (expand_static_init): Make sure assignments to local
386 statics actually occur.
388 1999-09-17 Mark Mitchell <mark@codesourcery.com>
390 * cp-tree.h (poplevel_class): Declare.
391 * class.c (popclass): Use poplevel_class, not poplevel.
392 * decl.c (poplevel_class): Don't make it static. Don't return a
394 (poplevel): Don't call poplevel_class; abort in a class
395 binding level is seen.
396 * semantics.c (finish_translation_unit): Use pop_everything.
397 * parse.y (member_init): Allow errors.
398 (pending_inline): Call finish_function.
399 * parse.c: Regenerated.
400 * Makefile.in (CONFLICTS): Adjust.
402 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
404 * error.c: Reduce code duplication.
405 (dump_template_value): New function.
406 (dump_type_real): Use it.
407 (dump_decl): Likewise.
408 (dump_function_name): Likewise.
409 (dump_function_decl): Don't be too talkative about function return
412 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
414 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
416 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
418 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
420 * decl2.c (finish_file): Also call check_global_declarations for
421 the pending_statics list.
423 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
425 * lex.c (cp_pragma_implementation): Allow #pragma implementation
428 1999-09-15 Richard Henderson <rth@cygnus.com>
430 * lex.c (mark_impl_file_chain): Follow the next chain.
432 1999-09-15 Mark Mitchell <mark@codesourcery.com>
434 * decl.c (warn_extern_redeclared_static): Simplify. Catch
435 problems with extern "C" functions redeclared as static.
436 (duplicate_decls): When a builtin is redeclared static, make the
437 new function have internal linkage.
439 1999-09-15 Mark Mitchell <mark@codesourcery.com>
441 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
442 * pt.c (tsubst_copy): Likewise.
443 * tree.c (search_tree): Likewise.
446 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
448 * typeck2.c (ack): Don't declare progname.
450 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
452 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
453 filenames with ggc_alloc_string.
455 1999-09-14 Mark Mitchell <mark@codesourcery.com>
457 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
459 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
461 * cvt.c (build_up_reference): Likewise.
462 * tree.c (build_cplus_new): Likewise.
463 (get_target_expr): Likewise.
465 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
467 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
469 1999-09-13 Mark Mitchell <mark@codesourcery.com>
471 * cp-tree.h (build_target_expr): New function.
472 * call.c (build_conditional_expr): Use build_target_expr.
473 (convert_like): Likewise.
474 (build_over_call): Likewise.
475 * cvt.c (build_up_reference): Likewise.
476 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
477 (destroy_local_var): Here.
478 (build_target_expr): New function.
479 * tree.c (build_cplus_new): Use it.
480 (get_target_expr): Likewise.
482 1999-09-13 Nathan Sidwell <nathan@acm.org>
484 * typeck.c (expr_sizeof): Don't decay arrays and functions.
485 Remove misleading comment.
486 (build_compound_expr): Don't decay arrays.
488 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
490 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
493 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
495 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
497 * g++spec.c: Include gcc.h.
498 (lang_specific_driver): Constify a char*. Call xcalloc, not
499 xmalloc/bzero. All calls to the function pointer parameter now
500 explicitly call `fatal'.
502 1999-09-12 Mark Mitchell <mark@codesourcery.com>
504 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
505 * cvt.c (ocp_convert): Complete the from and destination types.
506 Adjust warning about functions always being `true' in conditionals.
507 * decl.c (duplicate_decls): Don't play funny games with abort.
508 * error.c (dump_expr): Handle OVERLOADs.
509 * spew.c (probe_obstack): Remove.
510 * typeck.c (condition_conversion): Use perform_implicit_conversion.
512 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
514 * cp-tree.h (auto_function, define_function): Adjust prototypes.
515 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
517 (auto_function): Likewise, for CODE arg.
518 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
519 (builtin_function): ... here.
521 1999-09-11 Mark Mitchell <mark@codesourcery.com>
523 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
524 (init_decl_processing): Don't set TREE_PERMANENT for the
526 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
527 (grokdeclarator): Likewise.
528 (grokparms): Don't check TREE_PERMANENT when building up lists.
529 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
530 (mark_inline_for_output): Likewise.
531 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
532 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
533 * lex.c (check_newline): Don't check ggc_p; it is always one.
534 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
535 * spew.c (yylex): Don't copy_node or probe_obstacks for
536 non-permanent CONSTANTs and STRINGs.
537 * tree.c (build_cplus_array_type_1): Don't fuss with
538 TREE_PERMANENT on ARRAY_TYPEs.
540 * cp-tree.def (CLEANUP_STMT): New node.
541 * cp-tree.h (language_function): Add name_declared.
542 (current_function_name_declared): New macro.
543 (CLEANUP_DECL): New macro.
544 (CLEANUP_EXPR): Likewise.
545 (emit_local_var): Likewise.
546 (finish_decl_cleanup): New function.
547 * cvt.c (build_up_reference): Simplify.
548 (ocp_convert): Remove dead code.
549 * decl.c (start_decl): Remove call to add_decl_stmt.
550 (grok_reference_init): Adjust, to handle bindings temporaries to
551 references. Remove dead code.
552 (initialize_local_var): Don't generate RTL for
553 declarations here, or build cleanups here. Don't fuss with
554 obstacks. Replace expand_start_target_temps calls with explicit
555 setting of stms_are_full_exprs_p.
556 (destroy_local_var): New function.
557 (emit_local_var): Likewise.
558 (cp_finish_decl): Use them, as appropriate.
559 (start_function): Announce template functions.
560 (store_parm_decls): Don't call declare_function_name here.
561 (finish_stmt): Don't start emit base-initialization code when just
562 building the statement-tree.
563 * init.c (create_temporary_var): Move add_decl_stmt call ...
564 (get_temp_regvar): Here.
565 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
566 cp_finish_decl would expect. Don't call add_decl_stmt.
567 * semantics.c (begin_compound_stmt): Call declare_function_name,
569 (finish_decl_cleanup): New function.
570 (expand_stmt): Use emit_local_var to output variables.
571 (expand_body): Set current_funtion_name_declared.
573 1999-09-10 Mark Mitchell <mark@codesourcery.com>
575 * cp-tree.h (finish_cleanup_try_block): New function.
576 * semantics.c (finish_cleanup_try_block): Add comment.
578 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
580 * cp-tree.h: Delete declarations for all tree nodes now moved to
582 * decl.c: Delete their definitions.
583 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
584 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
586 (init_decl_processing): Call build_common_tree_nodes and
587 build_common_tree_nodes_2 instead of building their nodes here.
588 Don't add gc roots for them.
590 1999-09-10 Mark Mitchell <mark@codesourcery.com>
592 * cp-tree.h (language_function): Rename expanding_p to
593 x_expanding_p. Rename named_label_uses to x_named_label_uses.
594 (expanding_p): Adjust accordingly.
595 (TREE_VIA_PRIVATE): Fix typo in comment.
596 (DECL_REFERENCE_SLOT): Remove.
597 (SET_DECL_REFERENCE_SLOT): Likewise.
598 * decl.c (named_label_uses): Adjust. Remove chicken comment.
599 (push_overloaded_decl): Don't truncate the chain of bindings when
600 adding an overloaded function.
601 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
602 (initialize_local_var): Fix typo in comment.
603 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
604 * decl2.c (start_objects): Make the fact that we are expanding
605 the generated function right away explicit.
606 (start_static_storage_duration_function): Likewise.
607 (finish_file): Fix typo in comment.
608 * init.c (build_vec_init): Correct bugs in handling cleanups.
609 * semantics.c (maybe_convert_cond): New function.
610 (FINISH_COND): Always store the condition, even if there's
612 (finish_if_stmt_cond): Use maybe_convert_cond.
613 (finish_while_stmt_cond): Likewise.
614 (finish_do_stmt): Likewise.
615 (finish_for_cond): Likewise.
616 (expand_cond): Adjust.
618 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
619 * init.c (perform_member_init): Remove obstack machinations.
620 (expand_cleanup_for_base): Likewise.
621 (finish_init_stmts): Mark the statement-expression as used.
622 * method.c (emit_thunk): Use tree-generating functions, not
624 (do_build_copy_constructor): Likewise.
625 (do_build_assign_ref): Likewise.
626 (synthesize_method): Likewise. Keep track of line numbers.
627 * pt.c (tsubst_expr): Handle various kinds of try blocks.
628 * semantics.c (expand_stmts): Remove.
629 (begin_function_try_block): Set FN_TRY_BLOCK_P.
630 (finish_function_try_block): Be careful rechaining
632 (expand_stmt): Loop through all the statements at a given level.
633 (exapnd_body): Be careful with line-numbers here too. Prepare for
634 being called directly from the parser.
636 * cp-tree.h (finish_function): Adjust prototype.
637 * decl.c (finish_function): Return the function compiled.
638 * pt.c (instantiate_decl): Don't play games with obstacks.
639 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
640 (search_tree): Likewise.
641 * typeck.c: Fix typo in comment.
642 * typeck2.c (store_init_value): Add comment.
644 * cp-tree.h (CPTI_ATEXIT): New macro.
645 (atexit_node): Likewise.
646 * decl.c (destroy_local_static): New function, broken out from ...
647 (expand_static_init): Here.
649 * rtti.c (get_tinfo_var): These should always be global
650 (expand_si_desc): Use tree, not RTL, functions to generate code.
651 (expand_class_desc): Likewise.
652 (expand_ptr_desc): Likewise.
653 (expand_attr_desc): Likewise.
654 (expand_generic_desc): Likewise.
655 (synthesize_tinfo_fn): Likewise.
657 1999-09-09 Mark Mitchell <mark@codesourcery.com>
659 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
660 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
662 (RECHAIN_STMST_FROM_CHAIN): Likewise.
664 * parse.y (simple_stmt): Fix typo in last change.
666 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
667 (STMT_IS_FULL_EXPR_P): Likewise.
668 (STMT_LINENO_FOR_FN_P): Likewise.
669 (prep_stmt): New function.
670 (building_stmt_tree): Tweak for safety.
671 * pt.c (tsubst_expr): Use prep_stmt throughout.
672 (add_tree): Move it to semantics.c
673 * semantics.c (add_tree): Move it here.
674 (finish_expr_stmt_real): New function.
675 (finish_expr_stmt): Use it.
676 (finish_if_stmt_cond): Use FINISH_COND.
677 (finish_while_stmt_cond): Likewise.
678 (finish_for_cond): Likewise.
679 (finish_stmt_tree): Tweak line-number handling.
680 (prep_stmt): New function.
681 (expand_stmt): Use it.
683 * cp-tree.h (begin_switch_stmt): Adjust prototype.
684 (finish_switch_cond): Likewise.
685 * parse.y (simple_stmt): Adjust accordingly.
686 * parse.c: Regenerated.
687 * pt.c (tsubst_expr): Adjust accordingly.
688 * semantics.c (expand_cond): New function.
689 (FINISH_COND): New macro.
690 (begin_switch_stmt): Build the SWITCH_STMT here.
691 (finish_switch_stmt_cond): Not here.
692 (expand_stmt): Adjust calls to begin_switch_stmt and
693 finish_switch_cond. Use expand_cond throughout.
695 * dump.c (dequeue_and_dump): Dump types for constants.
696 Describe DECL_ARG_TYPE more intuitively.
699 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
700 (lang_cleanup_tree): Remove.
701 * lex.c (make_lang_type): Use ggc_alloc to allocate
704 Reorganize per-function data.
705 * cp-tree.h (saved_scope): Add function_decl, bindings.
706 (language_function): Rename binding_level to bindings.
707 (cp_function_chain): Use the current_function, not the
708 outer_function_chain.
709 (current_class_ptr): Make it work, even when there's no
711 (current_class_ref): Likewise.
712 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
714 (clear_temp_name): Remove.
715 * decl.c (check_function_type): New function, broken out from
717 (current_binding_level): Adjust definition.
718 (pushlevel): Simplify.
719 (poplevel): Don't use named_label_uses when we're outside
721 (mark_saved_scope): Mark function_decl and bindings.
722 (maybe_push_to_top_level): Don't unconditionally push a new
723 function context. Save bindings and the current_function_decl.
724 Don't clear named_labels.
725 (pop_from_top_level): Pop function context if appropriate.
726 (init_decl_processing): Set init_lang_status and free_lang_status,
727 rather than save_lang_status and restore_lang_status.
728 (start_function): Take SF_* flags. Don't clear per-function data.
729 Reorder and simplify to use new per-function data code. Add
731 (store_parm_decls): Don't call init_function_start here.
732 (finish_function): Adjust for new handling of per-function data.
733 (push_cp_function_context): Simplify.
734 (mark_cp_function_context): Change binding_level to bindings.
735 * decl2.c (clear_temp_name): Remove.
736 (start_objects): Use SF flags to start_function.
737 (start_static_storage_duration_function): Likewise.
738 * except.c (start_anon_func): Remove redundant calls to
739 push_function_context_to. Use SF flags to start function.
740 (end_anon_func): Remove redundant call to pop_function_context
742 * lex.c (reinit_parse_for_function): Don't initialize per-function
744 * method.c (emit_thunk): Clear current_function after calling
745 assemble_end_function. Use SF flags for start_function.
746 (synthesize_method): Use SF flags for start_function.
747 * parse.c: Regenerated.
748 * parse.y (fn.defpen): Likewise.
749 (pending_inline): Clear current_function, even if something goes
751 * pt.c (instantiate_decl): Use SF flags to start_function.
752 Don't save and restore expanding_p.
753 (add_tree): Handle the case where we are outside any function.
754 (end_tree): Likewise.
755 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
756 * semantics.c (begin_function_definition): Likewise.
757 (expand_body): Likewise.
759 1999-09-09 Nathan Sidwell <nathan@acm.org>
761 * cp-tree.h (convert_to_void): Prototype new function.
762 (require_complete_type_in_void): Remove prototype.
763 * cvt.c (convert_to_void): New function.
764 (ocp_convert): Use convert_to_void.
765 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
767 * typeck.c (require_complete_type_in_void): Remove function.
768 (build_compound_expr): Use convert_to_void.
769 (build_static_cast): Likewise.
770 (build_c_cast): Likewise.
771 * semantics.c (finish_expr_stmt): Do not decay full expressions.
773 * typeck.c (build_x_compound_expr): Add FIXME.
775 1999-09-08 Mark Mitchell <mark@codesourcery.com>
777 * cp-tree.h (scratch_tree_cons): Remove.
778 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
779 and perm_tree_cons with plain tree_cons.
783 * except.c: Likewise.
787 * method.c: Likewise.
792 * search.c: Likewise.
793 * typeck.c: Likewise.
794 * parse.c: Regenerated.
795 * tree.c (build_srcloc): Simplify.
797 1999-09-08 Mark Mitchell <mark@codesourcery.com>
799 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
801 (LANG_DECL_PERMANENT): Remove.
802 * decl.c (duplicate_decls): Don't mess about with obstacks trying
804 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
805 * lex.c (free_lang_decl_chain): Remove.
806 (build_lang_decl): Don't use obstacks.
807 (retrofit_lang_decl): Likewise.
808 (copy_lang_decl): Likewise.
810 * cp-tree.h (saved_scope): Remove old_binding_level and
811 function_decl. Tidy up.
812 * decl.c (mark_saved_scope): Don't set them.
813 (maybe_push_to_top_level): Clear memory.
815 * decl.c (layout_var_decl): Change prototype. Don't complete
816 types for external objects.
817 (check_initializer): Likewise. Tidy.
818 (initialize_local_var): Complete types here.
819 (cp_finish_decl): Not here. Reorganize a little.
820 (grokvardecl): Don't complete types here.
822 * decl.c (start_function): Clear last_dtor_insn and
823 last_parm_cleanup_insn.
824 (push_cp_function_context): Just copy over a little of
825 the old context, not all of it.
827 * cp-tree.h (copy_to_permanent): Remove.
828 (permanent_p): Likewise.
829 * decl.c (building_typename_type): Don't use copy_to_permanent.
830 (start_decl): Likewise.
831 (grok_reference_init): Likewise.
832 (cp_finish_decl): Likewise.
833 * init.c (build_new_1): Don't use mapcar.
834 (build_vec_delete_1): Don't use copy_to_permanent.
835 (build_vec_init): Likewise.
836 * parse.y (primary): Likewise.
837 * parse.c: Regenerated.
838 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
839 (lookup_template_class): Likewise.
840 (tsubst_friend_function): Likewise.
841 (instantiate_class_template): Likewise.
842 (tsubst_decl): Likewise.
844 (instantiate_template): Likewise.
846 * rtti.c (get_tinfo_fn): Likewise.
847 (build_dynamic_cast): Likewise.
848 * semantics.c (finish_if_stmt_cond): Likewise.
849 (finish_while_stmt_cond): Likewise.
850 (finish_do_stmt): Likewise.
851 (finish_for_cond): Likewise.
852 (finish_for_expr): Likewise.
853 (finish_cleanup): Likewise.
854 (add_decl_stmt): Likewise.
855 (finish_named_return_value): Likewise.
856 (finish_qualified_call_expr): Likewise.
857 * tree.c (perm_manip): Remove.
858 (build_exception_variant): Don't use copy_to_permanent.
859 (permanent_p): Remove.
860 (copy_to_permament): Remove.
861 (build_min_nt): Don't use copy_to_permanent.
862 (build_min): Likewise.
863 (min_tree_cons): Likewise.
864 * typeckc.c (build_static_cast): Likewise.
865 (build_reinterpret_cast): Likewise.
866 (build_const_cast): Likewise.
868 1999-09-07 Mark Mitchell <mark@codesourcery.com>
870 * decl.c (ggc_p): Set it to 1.
871 (mark_saved_scope): Add prototype.
873 1999-09-07 Richard Henderson <rth@cygnus.com>
875 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
876 * typeck.c (self_promoting_args_p): Delete.
878 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
880 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
881 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
883 1999-09-07 Mark Mitchell <mark@codesourcery.com>
885 * Makefile.in (tree.o): Depend on ggc.h.
886 * class.c (make_method_vec): Remove.
887 (free_method_vec): Likewise.
888 (free_method_vecs): Remove.
889 (add_method): Don't use them.
890 * cp-tree.def (PTRMEM_CST): Make it longer.
891 (TEMPLATE_PARM_INDEX): Make it shorter.
892 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
893 (template_parm_index): Remove RTL field.
894 (ptrmem_cst): Add RTL field.
895 (finish_function): Removed parameter.
896 (process_next_inline): Change prototype.
897 (init_cplus_unsave): Rename to init_tree.
898 (binding_init): Remove.
899 * decl.c (free_binding_nodes): Remove.
900 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
901 (pop_binding): Don't use free_binding_nodes.
902 (free_binding_vecs): Remove.
903 (store_bindings): Don't use them.
904 (pop_from_top_level): Likewise.
905 (lookup_namespace_name): Simplify.
906 (build_typename_type): Don't use obstack_free.
907 (unqualified_namespace_lookup): Simplify.
908 (lookup_name_real): Simplify.
909 (start_function): Remove comment about leaks.
910 (finish_function): Removed nested parameter. Call
911 expand_end_bindings even when building_stmt_tree.
912 Call ggc_push_context and ggc_pop_context around
913 rest_of_compilation, if necessary.
914 (mark_cp_function_context): Handle a NULL language-context.
915 (lang_mark_false_label_stack): Fix typo.
916 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
917 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
918 pointer to method types.
919 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
920 * decl2.c (finish_objects): Adjust call to finish_function.
921 (finish_static_store_duration_function): Likewise.
922 (do_nonmember_using_decl): Remove call to binding_init.
923 * except.c (end_anon_func): Adjust call to finish_function.
924 * lex.c (mark_impl_file_chain): New function.
925 (init_parse): Call init_tree, not init_cplus_unsave.
927 (cp_pramga_interface): Use xmalloc, not permalloc.
928 (cp_pragma_implementation): Likewise.
929 (begin_definition_of_inclass_inline): Simplify.
930 (process_next_inline): Adjust prototype.
931 (do_scoped_id): Don't call binding_init.
932 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
933 * method.c (emit_thunk): Adjust call to finish_function.
934 (synthesize_method): Likewise.
935 * parse.y (%union): Add a new `pi' variant.
936 (PRE_PARSED_FUNCTION_DECL): Use it.
937 (fn.defpen): Likewise.
938 (fndef): Adjust call to finish_function.
939 * pt.c (instantiate_decl): Likewise.
940 * rtti.c (syntheisze_tinfo_fn): Likewise.
941 * semantics.c (expand_body): Likewise.
942 * tree.c: Include ggc.h.
943 (mark_list_hash): New function.
944 (binding_init): Remove.
945 (init_cplus_unsave): Rename to ...
946 (init_tree): This. Add GC roots.
948 1999-09-05 Mark Mitchell <mark@codesourcery.com>
950 Get ready for garbage collection.
951 * Makefile.in (CXX_TREE_H): Add varray.h
952 (lex.o): Depend on ggc.h.
955 (method.o): Likewise.
956 (search.o): Likewise.
959 * class.c: Include ggc.h.
960 (current_class_name): Remove.
961 (current_class_type): Likewise.
962 (current_access_specifier): Likewise.
963 (previous_class_type): Likewise.
964 (previous_class_values): Likewise.
965 (class_cache_firstobj): Likewise.
966 (current_lang_base): Likewise.
967 (current_lang_stack): Likewise.
968 (current_lang_stacksize): Likewise.
969 (lang_name_c): Likewise.
970 (lang_name_cplusplus): Likewise.
971 (lang_name_java): Likewise.
972 (current_lang_name): Likewise.
973 (base_layout_decl): Likewise.
974 (access_default_node): Likewise.
975 (access_public_node): Likewise.
976 (access_protected_node): Likewise.
977 (access_private_node): Likewise.
978 (access_default_virtual_node): Likewise.
979 (access_public_virtual_node): Likewise.
980 (access_protected_virtual_node): Likewise.
981 (access_private_virtual_node): Likewise.
982 (signed_zero_node): Likewise.
983 (init_class_processing): Don't build base_layout_decl.
984 (push_lang_context): Adjust now that current_lang_base is a varray.
985 (pop_lang_context): Likewise.
986 * cp-tree.h: Include varray.h.
987 (cp_global_trees): Add access_default, access_public,
988 access_protected, access_private, access_default_virtual,
989 access_public_virtual, access_protected_virtual,
990 access_private_virtual, ctor_identifier, delta2_identifier,
991 delta_identifier, dtor_identifier, in_charge_identifier,
992 index_identifier, nelts_identifier, this_identifier,
993 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
994 lang_name_c, lang_name_cplusplus, lang_name_java,
995 empty_except_spec, null, jclass, minus_one, terminate.
996 (saved_scope): Move here from decl.c. Define globals in terms of
997 saved_scope: current_namespace, current_class_name,
998 current_class_type, current_access_specifier, current_lang_stack,
999 current_lang_base, current_lang_name, current_function_parms,
1000 current_template_parms, processing_template_decl,
1001 processing_specialization, processing_explicit_instantiation,
1002 previous_class_type, previous_class_values, class_cache_firstobj.
1003 (scope_chain): New variable.
1004 (init_pt): New function.
1005 * decl.c (current_namespace): Remove.
1006 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1007 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1008 (delta_identifier, delta2_identifier): Likewise.
1009 (pfn_or_delta2_identifier, tag_identifier): Likewise
1010 (vt_off_identifier, empty_except_spec, null_node): Likewise.
1011 (current_function_parms, current_lang_base): Remove.
1012 (current_lang_stack, previous_class_values): Remove.
1013 (class_binding_level): Macroize.
1014 (saved_scope): Remove.
1015 (current_saved_scope): Rename to scope_chain.
1016 (mark_saved_scope): Adjust for new scope structure.
1017 (maybe_push_to_top_level): Likewise.
1018 (pop_from_top_level): Likewise.
1019 (duplicate_decls): Adjust now that current_lang_base is a varray.
1020 (build_typename_type): Call ggc_add_tree_hash_table_root.
1021 (init_decl_processing): Call init_pt. Call push_to_top_level to
1022 set up globals. Add GC roots.
1023 (xref_basetypes): Adjust now that current_lang_base is a varray.
1024 * decl.h (this_identifier): Remove.
1025 (in_charge_identifier): Likewise.
1026 * decl2.c: Don't include varray.h.
1027 (current_namespace): Remove.
1028 (init_decl2): Add GC roots.
1029 * except.c (Terminate): Remove.
1030 (init_exception_processing): Use terminate_node instead.
1031 (build_terminate_handler): Likewise.
1032 * init.c (nc_nelts_field_id): Remove.
1033 (minus_one): Likewise.
1034 (init_init_processing): Use minus_one_node and nelts_identifier
1035 instead. Add GC roots.
1036 (jclass_node): Remove.
1037 (build_new_1): Use nelts_identifier.
1038 (build_vec_init): Likewise.
1039 (build_vec_delete): Likewise.
1040 * lex.c: Include ggc.h.
1041 (defarg_fn): Move declaration early.
1042 (defarg_parms): Likewise.
1043 (init_parse): Add GC roots.
1044 (handle_cp_pragma): Remove redundant declaration of
1046 * method.c: Include ggc.h.
1047 (btypelist): Make it a varray. All uses changed.
1048 (ktypelist): Likewise.
1049 (init_method): Add GC roots.
1050 * pt.c: Don't include varray.h. Include ggc.h.
1051 (current_template_parms): Remove.
1052 (processing_template_decl): Likewise.
1053 (processing_specialization): Likewise.
1054 (processing_explicit_instantiation): Likewise.
1055 (init_pt): New function.
1056 * repo.c: Include ggc.h.
1057 (init_repo): Add GC roots.
1058 * search.c: Don't include varray.h.
1059 (_vptr_name): Remove.
1060 (lookup_field_1): Use vtpr_identifier instead.
1061 (expand_indirect_vtbls_init): Remove redundant declaration of
1062 in_charge_identifier.
1063 (init_search_processing): Use vptr_identifier.
1065 1999-09-05 Richard Henderson <rth@cygnus.com>
1066 Bernd Schmidt <bernds@cygnus.co.uk>
1067 Mark Mitchell <mark@codesourcery.com>
1069 * Makefile.in (parse.o): Depend on ggc.h.
1070 (decl2.o): Depend on ggc.h.
1071 (init.o): Depend on ggc.h.
1072 * cp-tree.h (init_decl2): Declare.
1073 (cp_parse_init): Likewise.
1074 * decl.c (ggc_p): Define to zero.
1075 (mark_saved_scope): New function.
1076 (init_decl_processing): Call cp_parse_init, and cp_decl2.
1078 (expand_static_init): Add GC roots.
1079 * decl2.c: Include ggc.h.
1080 (init_decl2): New function.
1081 * init.c: Include ggc.h.
1082 (init_init_processing): Add GC roots.
1083 * parse.y: Include ggc.h.
1084 (cp_parse_init): New function.
1086 1999-09-04 Mark Mitchell <mark@codesourcery.com>
1088 * decl.c (init_decl_processing): Set mark_lang_status.
1089 (lang_mark_false_label_stack): Adjust prototype.
1090 * decl2.c (grok_function_init): Remove extraneous declaration of
1093 * Make-lang.in (cc1plus): Remove dependency on GGC.
1094 * Makefile.in (OBJS): Don't mention ggc-simple.o.
1095 (OBJDEPS): Don't mention ggc-simple.o.
1097 * Make-lang.in (cc1plus): Depend on $(GGC).
1098 * Makefile.in (OBJS): Add ggc-simple.o.
1099 (OBJDEPS): Likewise.
1100 * cp-tree.h (language_function): Rename members to `x_' versions;
1101 we now have x_named_labels, x_ctor_label, x_dtor_label,
1102 x_base_init_list, x_member_init_list, x_base_init_expr,
1103 x_current_class_ptr, x_current_class_ref, x_last_tree,
1104 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1106 (dtor_label, ctor_label, current_base_init_list,
1107 current_member_init_list, base_init_expr, current_class_ptr,
1108 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1109 * decl.c: Include ggc.h.
1110 (last_dtor_insn): Adjust to use x_ names.
1111 (last_parm_cleanup_insn): Likewise.
1112 (original_result_rtx): Likewise.
1113 (named_labels): Likewise.
1114 (mark_binding_level): New function.
1115 (mark_cp_function_context): Likewise.
1116 (mark_false_label_stack): Likewise.
1117 (lang_mark_tree): Likewise.
1118 (lang_cleanup_tree): Likewise.
1120 1999-09-03 Mark Mitchell <mark@codesourcery.com>
1122 * Makefile.in (CXX_TREE_H): Include function.h.
1123 (decl.o): Don't depend on function.h.
1124 (decl2.o): Likewise.
1125 (typeck.o): Likewise.
1127 (method.o): Likewise.
1128 * cp-tree.h: Include function.h.
1129 (cp_function): Rename to language_function. Remove next.
1130 (cp_function_chain): Make it a macro, not a variable.
1131 (push_cp_function_context): Don't declare.
1132 (pop_cp_function_context): Likewise.
1133 * decl.c: Don't include function.h.
1134 (push_cp_function_context): Make it static. Make it suitable for
1135 a save_lang_status callback.
1136 (pop_cp_function_context): Likewise.
1137 (maybe_push_to_top_level): Call push_function_context_to, not
1138 push_cp_function_context.
1139 (pop_from_top_level): Call pop_function_context_from, not
1140 pop_cp_function_context.
1141 (init_decl_processing): Set save_lang_status and
1142 restore_lang_status. Call push_function_context_to, not
1143 push_cp_function_context.
1144 (cp_function_chain): Remove.
1145 * decl2.c: Don't include function.h.
1146 * except.c: Don't include function.h.
1147 (start_anon_func): Call push_function_context_to, not
1148 push_cp_function_context.
1149 (end_anon_func): Call pop_function_context_from, not
1150 pop_cp_function_context.
1151 * init.c: Don't include function.h.
1152 * lex.c (begin_definition_of_inclass_inline): Call
1153 push_function_context_to, not push_cp_function_context.
1154 (process_next_inline): Call pop_function_context_from, not
1155 pop_cp_function_context.
1156 * method.c: Don't include function.h.
1157 (synthesize_method): Call push_function_context_to, not
1158 push_cp_function_context. Call pop_function_context_from, not
1159 pop_cp_function_context.
1160 * typeck.c: Don't include function.h.
1162 * decl.c (expand_static_init): Tweak handling of static
1163 initializations for objects without constructors.
1165 1999-09-03 Nathan Sidwell <nathan@acm.org>
1167 * typeck.c (build_indirect_ref): Reject dereference of pointer to
1170 1999-09-02 Mark Mitchell <mark@codesourcery.com>
1172 * cp-tree.h (cp_function): Move here, from decl.c.
1173 (cp_function_chain): Declare.
1174 (dtor_label): New macro, instead of variable.
1175 (ctor_label): Likewise.
1176 (current_base_init_list): Likewise.
1177 (current_member_init_list): Likewise.
1178 (base_init_expr): Likewise.
1179 (current_class_ptr): Likewise.
1180 (current_class_ref): Likewise.
1181 (last_tree): Likewise.
1182 (last_expr_type): Likewise.
1183 (current_function_returns_value): Likewise.
1184 (current_function_returns_null): Likewise.
1185 (current_function_just_assigned_this): Likewise.
1186 (current_function_parms_stored): Likewise.
1187 (temp_name_counter): Likewise.
1188 (static_labelno): Likewise.
1189 (expanding_p): Likewise.
1190 (stmts_are_full_exprs_p): Likewise.
1191 (in_function_try_handler): Likewise.
1192 (lang_type): Remove nested type_flags. All uses changed.
1193 * call.c (ctor_label): Remove.
1194 (dtor_label): Likewise.
1195 * class.c (current_class_ptr): Remove.
1196 (current_class_ref): Likewise.
1197 * decl.c (static_labelno): Remove.
1198 (dtor_label): Likewise.
1199 (last_dtor_insn): New macro, instead of variable.
1200 (last_parm_cleanup_insn): Likewise.
1201 (original_result_rtx): Likewise.
1202 (in_function_try_handler): Remove.
1203 (named_label_uses): New macro, instead of variable.
1204 (named_labels): Likewise.
1205 (current_function_returns_value): Remove.
1206 (current_function_returns_null): Likewise.
1207 (current_function_assigns_this): New macro, instead of variable.
1208 (current_function_just_assigned_this): Likewise.
1209 (current_binding_level): Likewise.
1210 (init_decl_processing): Call push_cp_function_context.
1211 (cp_function): Move to cp-tree.h
1212 (cp_function_chain): Make it global.
1213 (temp_name_counter): Remove.
1214 (push_cp_function_context): Simplify.
1215 (pop_cp_function_context): Likewise.
1216 * decl2.c (temp_name_counter): Remove.
1217 * init_c (current_base_init_list): Likewise.
1218 (current_member_init_list): Likewise.
1219 (base_init_expr): Likewise.
1220 * method.c (static_labelno): Likewise.
1221 * pt.c (last_tree): Likewise.
1222 * semantics.c (expanding_p): Likewise.
1223 (stmts_are_full_exprs_p): Likewise.
1224 (last_expr_type): Likewise.
1225 * typeck.c (dtor_label): Likewise.
1226 (ctor_label): Likewise.
1228 1999-09-01 Alex Samuel <samuel@codesourcery.com>
1230 * decl2.c (arg_assoc_template_arg): New prototype. New function.
1231 (arg_assoc_class): Use arg_assoc_template_arg for template
1233 (arg_assoc): Likewise.
1234 * pt.c (mangle_class_name_for_template): Allow member template
1237 1999-09-02 Nathan Sidwell <nathan@acm.org>
1239 * call.c (build_conditional_expr): Warn on enum mismatches.
1240 (convert_arg_to_ellipsis): Move non-pod check to after
1243 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1245 * gxx.gperf (hash, is_reserved_word): Add prototypes.
1247 * init.c (build_vec_init): Initialize variable `try_block'.
1249 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1250 Likewise for bzero/memset.
1251 (token_getch, token_put_back): Add static prototypes. Remove
1252 `inline' from the definitions.
1253 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1255 1999-09-01 Mark Mitchell <mark@codesourcery.com>
1257 * cp-tree.h (lang_type): Move align into type_flags.
1258 (CLASSTYPE_ALIGN): Adjust accordingly.
1259 * call.c (direct_reference_binding): Remove misleading comment.
1261 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1263 * parse.y (language_string): Constify.
1265 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1267 * repo.c (getpwd): Don't prototype.
1268 * xref.c (getpwd): Likewise
1270 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1272 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1273 Remove hacks for stuff which now comes from libiberty.
1275 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
1277 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1279 1999-08-30 Mark Mitchell <mark@codesourcery.com>
1281 * cp-tree.h (begin_init_stmts): Declare.
1282 (finish_init_stmts): Likewise.
1283 * cvt.c (build_up_reference): Wrap the declaration of a temporary
1284 in a statement-expression so that we will see it when expanding
1285 tree structure later.
1286 * init.c (begin_init_stmts): Don't make it static.
1287 (finish_init_stmts): Likewise.
1289 * cp-tree.h (start_handler_parms): New function.
1290 (expand_start_catch_block): Take only one parameter.
1291 (start_handler_parms): New function.
1292 * decl.c (start_handler_parms): Define it.
1293 * except.c (process_start_catch_block): Take only one parameter.
1294 Don't call grokdeclarator here.
1295 (expand_start_catch_block): Don't call grokdeclarator here,
1297 * parse.y (handler_args): Adjust call to
1298 expand_start_catch_block. Use start_handler_parms.
1299 * pt.c (push_template_decl_real): Make permanent lists have
1301 (tsubst_expr): Adjust calls to expand_start_catch_block
1303 * semantics.c (expand_stmt): Likewise.
1305 1999-08-29 Alex Samuel <samuel@codesourcery.com>
1307 * pt.c (push_template_decl_real): Use template declaration from
1308 class type if it exists.
1310 1999-08-29 Mark Mitchell <mark@codesourcery.com>
1312 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1313 (maybe_inject_for_scope_var): Declare it.
1314 (initialize_local_var): Likewise.
1315 * decl.c (maybe_inject_for_scope_var): Make it global.
1316 (initialize_local_var): Likewise. Move cleanup handling here,
1317 from cp_finish_decl.
1318 (make_rtl_for_nonlocal_decl): Use
1319 push_obstacks_nochange/pop_obstacks, rather than
1320 end_temporary_allocation/resume_temporary_allocation.
1321 (cp_finish_decl): Try to complete the type of a variable when it
1322 is declared. Move cleanup-handling to initialize_local_var.
1323 (expand_static_init): Use tree-building code, rather than
1325 * decl2.c (get_temp_name): Assert non-initializedness of
1327 * init.c (create_temporary_var): Move RTL-assigning code to ...
1328 (get_temp_regvar): Here.
1329 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
1330 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
1331 call initialize_local_var to generate initialization code.
1333 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1335 * cp-tree.h (fndecl_as_string, type_as_string,
1336 type_as_string_real, args_as_string, decl_as_string,
1337 expr_as_string, code_as_string, language_as_string,
1338 parm_as_string, op_as_string, assop_as_string, cv_as_string,
1339 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1341 * errfn.c (cp_printer): Likewise.
1343 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1344 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1345 cp_file_of, code_as_string, language_as_string, parm_as_string,
1346 op_as_string, assop_as_string, args_as_string, cv_as_string):
1349 * tree.c (lang_printable_name): Likewise.
1351 1999-08-28 Richard Henderson <rth@cygnus.com>
1353 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1355 1999-08-28 Mark Mitchell <mark@codesourcery.com>
1357 * cp-tree.h (strip_array_types): New function.
1358 * decl.c (maybe_deduce_size_from_array_init): New function, split
1359 out from cp_finish_decl.
1360 (layout_var_decl): Likewise.
1361 (maybe_commonize_var): Likewise.
1362 (maybe_inject_for_scope_var): Likewise.
1363 (initialize_local_var): Likewise.
1364 (build_cleanup_on_safe_obstack): Likewise.
1365 (check_initializer): Likewise.
1366 (make_rtl_for_nonlocal_decl): Likewise.
1367 (cp_finish_decl): Use them.
1368 * typeck.c (strip_array_types): New function.
1370 * cp-tree.def (LABEL_STMT): New tree node.
1371 * cp-tree.h (LABEL_STMT_LABEL): New macro.
1372 (shadow_label): Remove.
1373 (declare_local_label): New function.
1374 (finish_label_decl): Likewise.
1375 * decl.c (make_label_decl): New function, split out from
1377 (shadowed_labels): Remove.
1378 (binding_level): Add shadowed_labels.
1379 (clear_binding_level): Remove.
1380 (push_binding_level): Just bzero the new binding level.
1381 (pushlevel): Fix indentation.
1382 (pop_label): New function.
1383 (pop_labels): Likewise, split out from poplevel.
1384 (poplevel): Pop local labels. Use pop_labels.
1385 (maybe_push_to_top_level): Don't clear shadowed_labels.
1386 (lookup_label): Use make_label_decl.
1387 (shadow_label): Remove.
1388 (declare_local_label): New function.
1389 (define_label): Simplify.
1390 (start_function): Don't clear shadowed_labels.
1391 (cp_function): Remove shadowed_labels.
1392 (push_cp_function_context): Don't save shadowed_labels.
1393 (pop_cp_function_context): Don't restore it.
1394 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1395 * parse.y (label_decl): Use finish_label_decl.
1396 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1398 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1400 (finish_label_decl): New function.
1401 (expand_stmt): Handle LABEL_STMTs and local label declarations.
1403 1999-08-26 Mark Mitchell <mark@codesourcery.com>
1405 * decl.c (lookup_label): Build labels on the permanent obstack
1406 when building statement trees. Don't build RTL for labels when
1407 building statement trees.
1408 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1409 building statement trees.
1410 (finish_label_stmt): Likewise.
1411 (expand_stmt): Adjust accordingly.
1412 * pt.c (tsubst_expr); Likewise.
1413 (do_decl_instantiation): Robustify.
1415 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1416 * tree.c (build_cplus_new): Set it.
1417 * expr.c (cplus_expand_expr): Use it.
1418 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1420 * decl.c (store_parm_decls): Reset immediate_size_expand.
1421 (finish_function): Likewise.
1423 * tree.c (cplus_unsave_expr_now): Don't return a value.
1425 * semantics.c (do_poplevel): Always initialize the return value.
1427 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
1429 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1430 * tree.h (cplus_unsave_expr_now) : Same.
1432 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1434 * decl.c (grokdeclarator): Amend comment.
1435 * except.c (expand_start_catch_block): Call push_template_decl for
1436 catch-block parameters.
1437 * method.c (synthesize_method): Build an empty compound statement
1438 for the body of a constructor.
1440 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
1442 * tree.c (cp_build_qualified_type_real): If we're asking for the
1443 same quals we already have, just return.
1445 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1447 * cp-tree.def (SUBOBJECT): New tree node.
1448 * cp-tree.h (CLEANUP_P): New macro.
1449 (SUBOBJECT_CLEANUP): Likewise.
1450 (keep_next_level): Add parameter.
1451 (get_temp_regvar): Don't declare.
1452 (emit_base_init): Remove parameter.
1453 (expand_aggr_init): Rename to build_aggr_init.
1454 (expand_vec_init): Rename to build_vec_init.
1455 (do_pushlevel): Remove.
1456 (do_poplevel): Likewise.
1457 (finish_cleanup): New function.
1458 (finish_subobject): Likewise.
1459 (stmts_are_full_exprs_p): New variable.
1460 * decl.c (keep_next_level): Add parameter.
1461 (cp_finish_decl): Use build_aggr_init, not
1462 expand_aggr_init. Use finish_expr_stmt to expand the code.
1463 (expand_static_init): Use tree-generating, not RTL-generating,
1464 functions to handle the initialization.
1465 (start_function): Remove dead code. Always have a momentary
1466 obstack inside the function, even before hitting the first curly
1468 (cplus_expand_expr_stmt): Move calls to
1469 expand_{start,end}_target_temps into semantics.c.
1470 (cp_function): Add stmts_are_full_exprs_p.
1471 (push_cp_function_context): Save it.
1472 (pop_cp_function_context): Restore it.
1473 * decl2.c (get_temp_regvar): Move to init.c.
1474 (do_static_initialization): Use build_{aggr,vec}_init.
1475 (do_static_destruction): Fix typo in comment.
1476 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1477 * except.c (expand_throw): Use create_temporary_var.
1478 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1479 * init.c (expand_vec_init_try_block): Remove.
1480 (expand_vec_init_catch_clause): Likewise.
1481 (get_temp_regvar): New function.
1482 (begin_init_stmts): Likewise.
1483 (finish_init_stmts): Likewise.
1484 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1486 (emit_base_init): Likewise. Remove unused parameter.
1487 (expand_virtual_init): Likewise.
1488 (expand_cleanup_for_base): Use finish_subobject.
1489 (expand_aggr_vbase_init_1): Simplify.
1490 (construct_virtual_bases): Use tree-generating functions to build
1492 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1493 (expand_default_init): Likewise.
1494 (expand_aggr_init_1): Likewise.
1495 (expand_vec_init): Rename to build_vec_init.
1496 * method.c (do_build_copy_constructor): Use tree-generating
1497 functions. Don't call clear_last_expr.
1498 (do_build_assign_ref): Likewise.
1499 (synthesize_method): Call clear_last_expr here.
1500 * parse.y (base_init): Don't call clear_last_expr here.
1501 (nodecls): Likewise.
1502 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1503 * semantics.c (do_pushlevel): Move to here.
1504 (do_poplevel): Likewise.
1505 (stmts_are_full_exprs_p): New variable.
1506 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1507 (finish_for_stmt): Use finish_expr_stmt.
1508 (finish_cleanup): New function.
1509 (finish_function_try_block): Fix indentation.
1510 (finish_subobject): New function.
1511 (setup_vtbl_ptr): Call keep_next_level here.
1512 (finish_stmt_expr): Handle a block with no scope inside the
1513 statement-expression.
1514 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1516 * tree.c (search_tree): Handle INIT_EXPR.
1518 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1519 * typeck2.c (store_init_value): Change expand_aggr_init to
1520 build_aggr_init in comment.
1522 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1524 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1526 1999-08-25 Nathan Sidwell <nathan@acm.org>
1528 * decl2.c (handle_class_head): Be graceful about additional
1529 scope qualifiers. Adjust comments to reflect reality.
1531 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1533 * call.c (build_conditional_expr): Fix typo.
1534 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1535 lvalue before trying to mess with the sides.
1537 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1539 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1541 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1543 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1545 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1546 Return arbitrary pointer or NULL.
1547 (check_eh_spec): Call __throw_type_match_rtti_2.
1548 * tinfo.h (*::dcast): Return int. Add valp parm.
1549 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1550 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1551 (__throw_type_match_rtti): Now just a wrapper.
1553 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1554 (init_exception_processing): Don't initialize them.
1556 1999-08-23 Paul Burchard <burchard@pobox.com>
1558 * decl.c (check_default_argument): Fix typo.
1560 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1562 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1564 * dump.c (dump_next_stmt): New function.
1565 (dequeue_and_dump): Use it.
1567 * pt.c (tsubst_copy): Make sure to initialize return value for a
1568 STMT_EXPR, even when processing_template_decl.
1569 * semantics.c (finish_stmt_expr): A statement-expression whose
1570 last statement is not an expression-statement has type `void'.
1572 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1574 * semantics.c (finish_stmt_expr): Fix typo in comment.
1575 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1577 * init.c (build_vec_delete_1): Make the children of a permanent
1578 BIND_EXPR permanent.
1579 * pt.c (register_specialization): Don't register a specialization
1582 1999-08-18 Andrew Haley <aph@cygnus.com>
1584 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1585 for all integer parameter types larger than long long.
1587 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1589 * pt.c (redeclare_class_template): Merge default template
1590 arguments in both directions.
1592 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1593 compiler_error message.
1595 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1597 * cp-tree.h: Declare flag_use_repository.
1598 * pt.c (do_decl_instantiation): Don't complain about duplicate
1599 instantiation with -frepo.
1600 (do_type_instantiation): Likewise.
1602 * pt.c (push_template_decl_real): Complain about everything
1603 that isn't a valid template.
1605 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1608 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1610 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1611 * decl2.c (build_expr_from_tree): Handle it.
1612 * error.c (dump_expr): Likewise.
1613 * pt.c (for_each_template_parm): Likewise.
1614 (tsubst_copy): Likewise.
1615 * tree.c (search_tree): Likewise.
1616 * semantics.c (finish_pseudo_destructor_call): Create it.
1618 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1620 * search.c (setup_class_bindings): Robustify.
1621 * typeck.c (common_type): Use same_type_p, not pointer equality,
1624 * cp-tree.h (build_lang_field_decl): Remove.
1625 * class.c (build_vtable): Replace calls to build_lang_field_decl
1626 with build_lang_decl.
1627 (prepare_fresh_vtable): Likewise.
1628 (finish_struct_1): Likewise.
1629 (init_class_processing): Likewise.
1630 * decl.c (push_using_decl): Likewise.
1631 (init_decl_processsing): Likewise.
1632 (grokvardecl): Likewise.
1633 (build_ptrmemfunc_type): Likewise.
1634 (grokdeclarator): Likewise.
1635 (build_enumerator): Likewise.
1636 * decl2.c (grok_x_components): Likewise.
1637 (do_class_using_decl): Likewise.
1638 * except.c (call_eh_info): Likewise.
1639 * init.c (init_init_processing): Likewise.
1640 * rtti.c (expand_class_decl): Likewise.
1641 * tree.c (build_base_fields): Likewise.
1642 (build_vbase_pointer_fields): Likewise.
1643 * lex.c (build_lang_decl): Build declarations on the permanent
1644 obstack if we're building statmeent trees.
1645 (retrofit_lang_decl): Handle both the full lang_decl and also the
1646 smaller lang_decl_flags here.
1647 (build_lang_field_decl): Remove.
1648 * pt.c (push_template_decl_real): Issue errors for variable
1649 declarations that are not static members.
1651 1999-08-18 Richard Henderson <rth@cygnus.com>
1653 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1656 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1658 * cp-tree.h (back_end_hook): New variable.
1659 * decl2.c (back_end_hook): Define it.
1660 (finish_file): If it's non-NULL, call it.
1662 * decl.c (add_decl_to_level): New function.
1663 (push_local_binding): Use it.
1664 (find_binding): Fix typo in comment.
1665 (pushdecl): Use add_decl_to_level. Put templates on the
1666 corresponding namespace-scope binding levels.
1667 * dump.c (dequeue_and_dump): Print the specializations of a
1669 * pt.c (push_template_decl_real): Don't push a template multiple
1672 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1674 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1675 (CALL_DECLARATOR_QUALS): Likewise.
1676 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1677 * decl.c (grokdeclarator): Adjust to use them.
1678 * decl2.c (grokfield): Likewise.
1679 (reparse_absdcl_as_casts): Likewise.
1680 * lex.c (make_call_declarator): Likewise.
1681 (set_quals_and_spec): Likewise.
1682 * pt.c (tsubst): Likewise.
1683 * tree.c (mapcar): Remove special hack to handle third operand of
1686 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1688 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1689 * class.c (build_vtable): Use build_lang_field_decl to build the
1690 VAR_DECLs for vtables.
1691 (prepare_fresh_vtable): Likewise.
1692 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1693 CAN_HAVE_FULL_LANG_DECL_P.
1694 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1695 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1696 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1697 (build_lang_field_decl): Likewise.
1698 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1701 * cp-tree.def (STMT_EXPR): New tree node.
1702 * cp-tree.h (STMT_EXPR_STMT): New macro.
1703 (store_return_init): Change prototype.
1704 (finish_named_return_value): New function.
1705 (expand_stmt): Likewise.
1706 (expand_body): Likewise.
1707 (begin_stmt_tree): Likewise.
1708 (finish_stmt_tree): Likewise.
1709 (expanding_p): New variable.
1710 (last_expr_type): Likewise.
1711 (building_stmt_tree): New macro.
1712 * decl.c (start_function): Use building_stmt_tree, not
1713 processing_template_decl, where appropriate.
1714 (store_parm_decls): Likewise.
1715 (store_return_init): Move most of the body to semantics.c.
1716 (finish_function): Use building_stmt_tree.
1717 (finish_stmt): Clear last_expr_type here.
1718 (cp_function): Add expanding_p, last_tree, last_expr_type.
1719 (push_cp_function_context): Save them.
1720 (pop_cp_function_context): Restore them.
1721 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1722 * error.c (dump_expr): Handle STMT_EXPR.
1723 * except.c (expand_start_catch_block): Use building_stmt_tree.
1725 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1726 (do_case): Move add_tree call to semantics.c.
1727 * parse.y (return_init): Use finish_named_return_value.
1728 (for.init.statement): Use finish_expr_stmt.
1729 * parse.c: Regenerated.
1730 * pt.c (do_pushlevel): Move to semantics.c.
1731 (do_poplevel): Likewise.
1732 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1733 (tsubst_expr): Don't expand all the way to RTL here. Handle
1734 RETURN_INIT and CTOR_INITIALIZER.
1735 (instantiate_decl): Call expand_body after tsubst'ing into
1737 * semantics.c (expand_stmts): New function.
1738 (expanding_p): New variable.
1739 (last_expr_type): Likewise.
1740 (finish_expr_stmt): Use building_stmt_tree.
1741 (begin_if_stmt): Likewise.
1742 (finish_if_stmt_cond): Likewise.
1743 (finish_then_clause): Likewise.
1744 (begin_else_clause): Likewise.
1745 (finish_else_clause): Likewise.
1746 (begin_while_stmt): Likewise.
1747 (finish_while_stmt_cond): Likewise.
1748 (finish_while_stmt): Likewise.
1749 (finish_do_body): Likewise.
1750 (finish_do_stmt): Likewise.
1751 (finish_return_stmt): Likewise.
1752 (begin_for_stmt): Likewise.
1753 (fnish_for_init_stmt): Likewise.
1754 (finish_for_cond): Likewise.
1755 (finish_for_expr): Likewise.
1756 (finish_for_stmt): Likewise.
1757 (finish_break_stmt): Likewise.
1758 (finish_continue_stmt): Likewise.
1759 (finish_switch_cond): Likewise.
1760 (finish_switch_stmt): Likewise.
1761 (finish_case_label): Call add_tree here if necessary.
1762 (finish_goto_statement): Use building_stmt_tree.
1763 (begin_try_block): Likewise.
1764 (begin_function_try_block): Likewise.
1765 (finish_try_block): Likewise.
1766 (finish_function_try_block): Likewise.
1767 (finish_handler_sequence): Likewise.
1768 (finish_function_handler_sequence): Likewise.
1769 (begin_handler): Likewise.
1770 (finish_handler_parms): Likewise.
1771 (finish_handler): Likewise.
1772 (begin_compound_stmt): Likewise.
1773 (finish_compound_stmt): Likewise.
1774 (finish_asm_stmt): Likewise.
1775 (finish_label_stmt): Likewise.
1776 (finish_named_return_value): New function.
1777 (setup_vtbl_ptr): Moved here from decl2.c.
1778 (do_pushlevel): Moved here from pt.c.
1779 (do_poplevel): Likewise.
1780 (begin_stmt_expr): Use building_stmt_tree.
1781 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
1782 when building_stmt_tree.
1783 (begin_stmt_tree): New function.
1784 (finish_stmt_tree): Likewise.
1785 (expand_stmt): Likewise.
1786 (expand_body): Likewise.
1787 * tree.c (build_cplus_method_type): Make sure the argument types
1788 end up on the same obstack as the METHOD_TYPE.
1789 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1790 THROW_EXPR, STMT_EXPR.
1791 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
1792 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
1793 sorry, if an unsupported node is encountered.
1794 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1795 (c_expand_return): Don't call add_tree here.
1797 1999-08-15 Mark Mitchell <mark@codesourcery.com>
1799 * pt.c (check_default_tmpl_args): Don't check in local scopes.
1800 (tsubst_decl): Make sure the declaration is on a saveable
1801 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1803 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1805 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
1807 Speed up Koenig lookup.
1808 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
1809 to return namespaces we've looked at.
1810 * decl2.c (lookup_using_namespace): Likewise.
1811 (add_function): Don't call ovl_member.
1812 (lookup_arg_dependent): Initialize k.namespaces to the list of
1813 namespaces seen in unqualified lookup.
1814 * call.c (equal_functions): Move here from tree.c.
1815 (joust): Use it to handle duplicate candidates.
1816 * tree.c (ovl_member): Use ==.
1818 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1820 * cp-tree.def (DECL_STMT): Make it smaller.
1821 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1822 (lang_decl): ... here. Add next.
1823 (DECL_SAVED_TREE): Adjust accordingly.
1824 (DECL_IMPLICIT_TYPEDEF_P): New macro.
1825 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1826 (DECL_STMT_DECL): Likewise.
1827 (create_implicit_typedef): New function.
1828 (maybe_push_decl): Likewise.
1829 (tsubst_default_argument): New function.
1830 (at_function_scope_p): Likewise.
1831 (add_decl_stmt): Likewise.
1832 (push_permanent_obstack): Likewise.
1833 * call.c (convert_default_arg): Use tsubst_default_argument.
1834 * class.c (add_method): Use push_permanent_obstack.
1835 (build_self_reference): Create a TEMPLATE_DECL for the
1836 self-reference, if necessary.
1837 * decl.c (pseudo_global_level_p): Only look at the current binding
1839 (push_binding): Use push_permanent_obstack.
1840 (create_implicit_typedef): New function.
1842 (duplicate_decls): Use push_permanent_obstack.
1843 (maybe_push_decl): New function.
1844 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
1845 (start_decl_1): Remove dead code.
1846 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
1847 pseudo_global_level_p.
1848 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1850 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
1851 pseudo_global_level_p.
1852 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1854 (get_sentry): Use push_permanent_obstack.
1855 * dump.c (dequeue_and_dump): Enable DECL_STMT.
1856 * except.c (call_eh_info): Use push_permanent_obstack.
1857 (build_eh_type_ref): Likewise.
1858 (do_pop_exception): Likewise.
1859 (expand_eh_spec): Likewise.
1860 (alloc_eh_object): Likewise.
1861 (expand_throw): Likewise.
1862 * init.c (build_java_class_ref): Likewise.
1863 * lex.c (get_time_identifier): Likewise.
1864 (free_lang_decl_chain): Correct type.
1865 (retrofit_lang_decl): Adjust accordingly.
1866 (build_lang_field_decl): Likewise.
1867 * lex.h (free_lang_decl_chain): Likewise.
1868 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1869 * parse.c: Regenerated.
1870 * pt.c (tsubst_default_arguments): New function.
1871 (retrieve_local_specialization): Likewise.
1872 (register_local_specialization): Likewise.
1873 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
1874 pseudo_global_level_p to determine whether or not a template is
1876 (lookup_template_class): Likewise. Use create_implicit_typedef.
1877 (instantiate_class_template): Call tsubst_default_arguments for
1878 member functions, if appropriate.
1879 (tsubst_default_argument): New function.
1880 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
1881 * search.c (at_function_scope_p): New function.
1882 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1883 (finish_label_stmt): Likewise.
1884 (add_decl_stmt): New function.
1885 (begin_class_definition): Likewise.
1886 (finish_typeof): Likewise.
1887 * tree.c (copy_template_template_parm): Likewise.
1888 (copy_to_permanent): Likewise.
1889 (push_permanent_obstack): Define.
1890 (mark_addressable): Use it.
1891 * typeck.c (mark_addressable): Likewise.
1893 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
1895 * cp-tree.h (init_cplus_unsave): New.
1896 (cplus_unsave_expr_now): New.
1897 * lex.c (init_parse): Call init_cplus_unsave.
1898 * tree.c (init_cplus_unsave): New.
1899 (cplus_unsave_expr_now): New.
1901 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1903 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
1904 decl_constant_value to simplify array bounds.
1906 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
1908 * lang-options.h: Add -fms-extensions.
1909 * cp-tree.h: Declare flag_ms_extensions.
1910 * decl2.c: Define it.
1911 * class.c (instantiate_type): Don't complain about taking the address
1912 of a bound member function if -fms-extensions.
1913 * typeck.c (build_unary_op): Likewise.
1914 * decl.c (grokdeclarator): Or about implicit int.
1915 * init.c (resolve_offset_ref): Or about implicit '&'.
1917 1999-08-11 Mark Mitchell <mark@codesourcery.com>
1919 * cp-tree.h (minimal_parse_mode): Remove.
1920 (finish_label_stmt): New function.
1921 * decl.c (saved_scope): Remove minimal parse mode.
1922 (maybe_push_to_top_level): Don't save it.
1923 (pop_from_top_level): Don't restore it.
1924 (define_label): Split out template-handling code to semantics.c.
1925 (start_decl): Don't use minimal_parse_mode.
1926 (cp_finish_decl): Likewise.
1927 (start_function): Don't increment it.
1928 (store_return_init): Don't use it.
1929 (finish_function): Don't decrement it.
1930 * parse.y (label_colon): Use finish_label_stmt throughout.
1931 * parse.c: Regenerated.
1932 * pt.c (minimal_parse_mode): Don't define it.
1933 (tsubst_expr): Use finish_label_stmt.
1934 * semantics.c (finish_label_stmt): New function.
1936 * dump.c (queue): Be careful when computing bitmasks.
1937 (dequeue_and_dump): Describe binfos as binfos, not as
1940 * parse.y (pedantic): Give it itype. Adjust usage accordingly
1942 * parse.c: Regenerated.
1944 * Make-lang.in (CXX_SRCS): Remove sig.c.
1945 * Makefile.in (CXX_OBJS): Remove sig.o.
1947 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1948 (CPTI_SIGNATURE_TYPE): Likewise.
1949 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1950 (opaque_type_node): Likewise.
1951 (signature_type_node): Likewise.
1952 (sigtable_entry_type): Likewise.
1953 (flag_handle_signatures): Likewise.
1954 (lang_type): Remove is_signature, is_signature_pointer,
1955 is_signature_reference, has_opaque_typedecls,
1956 sigtables_has_been_generated. Adjust dummy. Remove signature,
1957 signature_pointer_to, signature_reference_to.
1958 (IS_SIGNATURE): Remove.
1959 (SET_SIGNATURE): Remove.
1960 (CLEAR_SIGNATURE): Remove.
1961 (IS_SIGNATURE_POINTER): Remove.
1962 (IS_SIGNATURE_REFERENCE): Remove.
1963 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1964 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1965 (CLASSTYPE_SIGNATURE): Remove.
1966 (SIGNATURE_TYPE): Remove.
1967 (SIGNATURE_METHOD_VEC): Remove.
1968 (SIGNATURE_POINTER_TO): Remove.
1969 (SIGNATURE_REFERENCE_TO): Remove.
1970 (lang_decl_flags): Remove is_default_implementation. Rename
1971 memfunc_pointer_to to saved_tree.
1972 (IS_DEFAULT_IMPLEMENTATION): Remove.
1973 (DECL_MEMFUNC_POINTER_TO): Remove.
1974 (DECL_MEMFUNC_POINTING_TO): Remove.
1975 (DECL_SAVED_TREE): Adjust definition.
1976 (tag_types): Remove signature_type_node.
1977 (SIGNATURE_FIELD_NAME): Remove.
1978 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1979 (SIGNATURE_OPTR_NAME): Likewise.
1980 (SIGNATURE_SPTR_NAME): Likewise.
1981 (SIGNATURE_POINTER_NAME): Likewise.
1982 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1983 (SIGNATURE_REFERENCE_NAME): Likewise.
1984 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1985 (SIGTABLE_PTR_TYPE): Likewise.
1986 (SIGTABLE_NAME_FORMAT): Likewise.
1987 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1988 (SIGTABLE_TAG_NAME): Likewise.
1989 (SIGTABLE_VB_OFF_NAME): Likewise.
1990 (SIGTABLE_VT_OFF_NAME): Likewise.
1991 (finish_base_specifiers): Change prototype.
1992 (build_signature_pointer_type): Remove.
1993 (build_signature_reference_type): Remove.
1994 (build_signature_pointer_constructor): Remove.
1995 (build_signature_method_call): Remove.
1996 (build_optr_ref): Likewise.
1997 (append_signature_fields): Likewise.
1998 (signature_error): Likewise.
1999 * call.c (build_this): Remove signature support.
2000 (build_over_call): Likewise.
2001 (build_new_method_call): Likewise.
2002 * class.c (add_implicitly_declared_members): Likewise.
2003 (finish_struct_1): Likewise.
2004 (finish_struct): Likewise.
2005 * cvt.c (cp_convert_to_pointer): Likewise.
2006 (convert_to_pointer_force): Likewise.
2007 (ocp_convert): Likewise.
2008 * decl.c (sigtable_decl_p): Remove.
2009 (init_decl_processing): Remove support for signatures.
2010 (cp_finish_decl): Likewise.
2011 (grokdeclarator): Likewise.
2012 (grokparms): Likewise.
2013 (xref_tag): Likewise.
2014 (start_function): Likewise.
2015 (start_method): Likewise.
2016 * decl2.c (finish_sigtable_vardecl): Remove.
2017 (flag_handle_signatures): Remove.
2018 (lang_f_options): Remove handle-signatures.
2019 (grokfield): Remove support for signatures.
2020 (grokbitfield): Likewise.
2021 (finish_file): Likewise.
2022 (reparse_absdcl_as_casts): Likewise.
2023 * error.c (dump_type_real): Likewise.
2024 (dump_function_decl): Likewise.
2025 * friend.c (make_friend_class): Likewise.
2026 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2027 * hash.h: Regenerated.
2028 * init.c (build_new_1): Remove support for signatures.
2029 * lang-options.h: Remove -fhandle-signatures,
2030 -fno-handle-signatures.
2031 * lex.c (init_parse): Remove support for signatures.
2032 (yyprint): Likewise.
2033 * lex.h (rid): Remove RID_SIGNATURE.
2034 * method.c (build_decl_overload_real): Remove support for
2036 (hack_identifier): Likewise.
2037 * parse.y (base_class): Likewise.
2038 (base_class.1): Likewise.
2039 (access_specifier): Likewise.
2040 * search.c (lookup_member): Likewise.
2041 * semantics.c (finish_qualified_object_call_expr): Likewise.
2042 (finish_template_type_parm): Likewise.
2043 (begin_class_definition): Likewise.
2044 (finish_base_specifier): Likewise.
2046 * tree.c (build_cplus_method_type): Remove support for signatures.
2047 * typeck.c (require_complete_type): Likewise.
2048 (c_sizeof): Likewise.
2049 (c_alignof): Likewise.
2050 (build_object_ref): Likewise.
2051 (build_component_ref): Likewise.
2052 (build_indirect_ref): Likewise.
2053 (build_c_cast): Likewise.
2054 (build_modify_expr): Likewise.
2055 (convert_for_initialization): Likewise.
2056 * typeck2.c (signature_error): Remove.
2057 (store_init_value): Remove support for signatures.
2058 (digest_init): Likewise.
2059 (build_x_arrow): Likewise.
2060 (build_functional_cast): Likewise.
2061 * xref.c (GNU_xref_decl): Likewise.
2063 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2065 * lex.c (do_identifier): Remove unnecessary lookup of class field.
2067 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2069 * decl2.c (set_decl_namespace): Do not complain about non-matching
2070 decls if processing a template.
2072 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2074 * decl.c (build_ptrmemfunc_type): Handle qualified
2075 pointer-to-member types here.
2076 * tree.c (cp_build_qualified_type_real): Simplify handling here.
2078 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2080 * lex.c (lang_identify): Likewise.
2082 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
2084 * Makefile.in: Update dependencies.
2085 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2087 * decl.c: Include "function.h"
2088 (cleanup_label, return_label): Delete declarations.
2089 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2090 (finish_function): Rename last_parm_insn variable to
2091 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
2092 * decl2.c: Include "function.h".
2093 (rtl_expr_chain): Delete declaration.
2094 * method.c: Include "function.h"
2095 * tree.c (build_vbase_pointer_fields): Don't initialize
2096 DECL_SAVED_INSNS with NULL_RTX.
2097 * typeck.c: Include "function.h"
2099 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
2101 * semantics.c (begin_function_try_block, finish_function_try_block,
2102 finish_function_handler_sequence): New fns.
2103 * parse.y (function_try_block): Use them.
2104 * pt.c (instantiate_decl): Likewise.
2106 * cp-tree.h: Declare in_function_try_handler.
2107 * decl.c: Define it.
2108 (start_function): Clear it.
2109 (struct cp_function, push_cp_function_context): Save it.
2110 (pop_cp_function_context): Restore it.
2111 * parse.y (function_try_block): Set and clear it.
2112 * except.c (expand_end_catch_block): Rethrow if we reach the end
2113 of a function-try-block handler in a ctor or dtor.
2114 * typeck.c (c_expand_return): Complain about returning from a
2115 function-try-block handler of a ctor.
2117 * parse.y (function_try_block): Call end_protect_partials
2118 before expand_start_all_catch.
2120 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
2122 * decl.c (struct binding_level): Add eh_region field.
2123 (push_binding_level): Set it.
2124 (define_label): Complain about jumping into an EH block.
2126 * ptree.c (print_lang_type): Print the real type of a PMF.
2127 Print what exceptions a fn type throws.
2129 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2131 * class.c (count_fields, add_fields_to_vec): Add static prototype.
2133 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2134 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2137 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2140 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2143 * dump.c (queue_and_dump_index, dump_int, dump_string,
2144 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2146 (dump_stmt): Add static prototype.
2148 * errfn.c (cp_thing): Constify a char*.
2150 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2151 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2152 dump_expr): Constify a char*.
2154 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2155 read_line_number): Add static prototype.
2156 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2157 (real_yylex): Move label `letter' into the scope where it is used.
2159 * method.c (build_mangled_template_parm_index, build_overload_int,
2160 build_decl_overload_real, get_id_2): Constify a char*.
2162 * search.c (check_final_overrider): Make static.
2164 * typeck.c (composite_pointer_type): Constify a char*.
2166 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2168 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2169 we're looking at a class.
2171 * decl.c (lookup_name_real): Set the complain flag if we're
2172 looking for a namespace member.
2174 * lex.c (real_yylex): We can have a number with no digits.
2176 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2178 * search.c (binfo_from_vbase): New fn.
2179 * cp-tree.h: Declare it.
2180 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2181 from pointer to member of virtual base.
2182 * typeck.c (get_delta_difference): Likewise.
2184 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
2186 * pt.c (tsubst): Use build_index_type to build in-template array
2187 index type. Fixes g++.oliva/dwarf1.C.
2188 * decl.c (grokdeclarator): Likewise, just for consistency, as it
2189 doesn't seem to trigger the bug without it.
2191 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2193 * typeck2.c (add_exception_specifier): Use complete_type.
2195 1999-08-06 Mark Mitchell <mark@codesourcery.com>
2197 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2198 (dump_binary_op): Bulletproof.
2199 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2200 * tree.c (search_tree): Don't enumerate all the nodes of classes
2201 `1', `2', and `<'; handle them generically. Don't be sorry about
2202 "unrecognized tree codes"; just abort.
2203 (no_linkage_check): Don't do linkage checks for templates.
2205 * tree.c (cp_build_qualified_type_real): Handle
2206 pointer-to-member-function types correctly.
2208 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
2210 * decl.c (pushdecl): Only give an error for shadowing a parm
2211 from *this* function.
2213 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
2215 * typeck2.c: Update URLs and mail addresses.
2217 1999-08-04 Nathan Sidwell <nathan@acm.org>
2219 * cp-tree.h (empty_except_spec): New global var.
2220 (compexcepttypes): Remove prototype.
2221 (comp_except_specs): Prototype new global function.
2222 (add_exception_specifier): Prototype new global function.
2223 * decl.c (empty_except_spec): Define new global var.
2224 (duplicate_decls): Use comp_except_specs, reword error message.
2225 (init_decl_processing): Initialize empty_except_spec.
2226 Adjust build_exception_variant calls.
2227 * parse.y (exception_specification_opt): Use empty_except_spec.
2228 (ansi_raise_identifier): Call check_for_new_type.
2229 (ansi_raise_identifiers): Use add_exception_specifier.
2230 * pt.c (tsubst): Use add_exception_specifier to build exception
2232 * search.c (check_final_overrider): New static function, broken
2233 out of get_matching_virtual. Check throw specifiers, reword
2235 (get_matching_virtual): Use check_final_overrider.
2236 * tree.c (build_exception_variant): Use comp_except_specs.
2237 * typeck.c (compexcepttypes): Remove.
2238 (comp_except_types): New static function, helper for
2239 comp_except_specs. Compare two types as exception specifiers.
2240 (comp_except_specs): New global function, compare two exception
2242 (comptypes): Adjust for comp_except_specs.
2243 * typeck2.c (add_exception_specifier): New global function.
2245 * class.c (check_for_override): Reword error message.
2247 1999-08-03 Nathan Sidwell <nathan@acm.org>
2249 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2250 * cp-tree.h (struct lang_type): Added non_pod_class flag.
2251 (CLASSTYPE_NON_POD_P): New macro to access it.
2252 * class.c (finish_struct_1): Determine non-PODness.
2253 Check for arrays of pointers (-Weffc++).
2254 Remove array inspection duplicated code.
2255 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2256 Use CLASSTYPE_NON_POD_P.
2258 1999-08-03 Nathan Sidwell <nathan@acm.org>
2260 * class.c (duplicate_tag_error): Preserve template information.
2262 1999-08-03 Nathan Sidwell <nathan@acm.org>
2264 * decl.c (start_enum): Show location of previous definition.
2265 * parse.y (enumlist_opt): New reduction.
2266 (structsp): Simplify enum rules to use enumlist_opt.
2268 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
2270 * lex.c (yyprint): Handle PFUNCNAME.
2272 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2273 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2275 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
2277 * decl.c (start_decl): Set attributes before duplicate_decls call.
2279 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2281 * Make-lang.in (CXX_SRCS): Add dump.c.
2282 * Makefile.in (CXX_OBJS): Add dump.o.
2283 (dump.o): New target.
2284 * cp-tree.h (DECL_CONV_FN_P): Document.
2285 (DECL_OVERLOADED_OPERATOR_P): New function.
2286 (TYPE_PTRMEM_CLASS_TYPE): New macro.
2287 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2288 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2289 (ASM_VOLATILE_P): New macro.
2290 (STMT_LINENO): Likewise.
2291 (cp_namespace_decls): New function.
2292 (dump_node_to_file): New function.
2293 * decl.c (cp_namespace_decls): New function.
2294 (walk_namespaces_r): Use it.
2295 (wrapup_globals_for_namespace): Likewise.
2296 * decl2.c (flag_dump_translation_unit): New variable.
2297 (lang_decode_option): Handle -fdump-translation-unit.
2298 (finish_file): If flag_dump_translation_unit is set, dump the
2301 * lang-options.h: Add -fdump-translation-unit.
2302 * pt.c (tsubst_template_parms): Robustify.
2303 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2304 (tsubst_expr): Use STMT_LINENO.
2305 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
2306 for invalid cv-qualifiers even while building templates.
2308 1999-08-02 Richard Henderson <rth@cygnus.com>
2310 * call.c: Include defaults.h instead of expr.h.
2313 * typeck.c: Include defaults.h.
2315 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2317 * lex.c (errorcount, sorrycount): Don't declare.
2318 * repo.c (errorcount, sorrycount): Likewise.
2319 * typeck2.c (errorcount, sorrycount): Likewise.
2321 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2323 * call.c (convert_default_arg, build_over_call): Change all uses of
2324 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2325 Ensure expr.h is included.
2326 * decl.c (grokparams): Ditto.
2327 * pt.c (tsubst_decl): Ditto.
2328 * typeck.c (convert_arguments): Ditto.
2330 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
2332 * class.c (mark_overriders): Fix order of args to overrides.
2333 (warn_hidden): Likewise. Fix for having virtual and non-virtual
2334 functions with the same name.
2336 1999-08-02 Richard Henderson <rth@cygnus.com>
2338 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2340 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2342 * call.c (build_conditional_expr): Fix typo in comment.
2344 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
2346 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2347 case_stack; use in_control_zone_p.
2348 * typeck.c (c_expand_return): Likewise.
2350 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
2352 * except.c (catch_clauses): Delete declaration.
2354 1999-07-30 Mark Mitchell <mark@codesourcery.com>
2356 * call.c (build_conditional_expr): Call convert_from_reference to
2357 avoid reference/non-reference type confusion. Fix typo.
2359 1999-07-30 Richard Henderson <rth@cygnus.com>
2361 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2362 * cp-tree.h (initializer_constant_valid_p): Remove.
2364 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2366 * call.c (conditional_conversion): Don't build BASE_CONVs for
2367 conversions between things that have the same type.
2368 (build_conditional_expr): Tweak.
2369 (convert_like): Some BASE_CONVs really do require the generation
2372 * init.c (perform_member_init): Don't go through build_modify_expr
2373 for simple initializations.
2375 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
2377 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2378 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2379 virtual functions and MI. Simplify.
2381 * method.c: Remove prototype for largest_union_member.
2382 * pt.c (determine_specialization): Fix uninitialized warning.
2383 * lex.c (real_yylex): Likewise.
2385 1999-07-27 Mark Mitchell <mark@codesourcery.com>
2387 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2390 * cp-tree.h (BINFO_VIRTUALS): Document new format.
2391 * class.c (modify_one_vtable): Change prototype accordingly.
2392 (modify_all_vtables): Likewise.
2393 (modify_all_direct_vtables): Likewise.
2394 (modify_all_indirect_vtables): Likewise.
2395 (build_vtable_entry_for_fn): New function.
2396 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2397 (modify_vtable_entry): Likewise.
2398 (add_virtual_function): Likewise.
2399 (build_vtbl_initializer): New function.
2400 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2401 (fixup_vtable_deltas1): Likewise.
2402 (fixup_vtable_deltas): Likewise.
2403 (override_one_vtable): Likewise.
2404 (finish_struct_1): Likewise.
2406 * error.c (dump_expr): Likewise.
2407 * search.c (get_abstract_virtuals_1): Likewise.
2408 (get_abstract_virtuals): Likewise.
2409 (expand_upcast_fixups): Likewise.
2410 * tree.c (debug_binfo): Likewise.
2411 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2412 __pure_virtual here.
2414 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2416 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2417 as per 1999-07-26 change.
2419 * typeck.c (c_sizeof): Don't allow non-static data members.
2420 (expr_sizeof): Likewise.
2422 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
2424 * input.c (feed_input): Only touch lineno and input_filename
2425 if !USE_CPPLIB. Save the old values before setting the new ones.
2427 * input.c (feed_input): Add file, line parms.
2428 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2429 (real_yylex): Check linemode before input_redirected().
2431 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2432 from op new to warning.
2434 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2436 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2437 * call.c: All uses changed.
2438 * typeck.c: Likewise.
2440 1999-07-26 Nathan Sidwell <nathan@acm.org>
2442 * exception.cc (__cplus_type_matcher): Match __eh_matcher
2445 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2447 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2448 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2449 (strip_top_quals): Declare.
2450 (ncp_convert): Likewise.
2451 (type_after_usual_arithmetic_converions): Likewise.
2452 (composite_pointer_type): Likewise.
2453 * call.c (strip_top_quals): Don't make it static.
2454 (promoted_arithmetic_type_p): New function.
2455 (conditional_conversion): Likewise.
2456 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2457 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
2458 for converting a type to itself.
2459 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2460 (implicit_conversion): Make sure the from and to types are
2462 (add_builtin_candidate): Correct handling of ?: operator.
2463 (add_builtin_candidates): Improve documentation.
2464 (build_conditional_expr): New function.
2465 (can_convert): Implement in terms of can_convert_arg.
2466 (ncp_convert): New function.
2467 * typeck.c (type_after_usual_arithmetic_conversions): New
2468 function, split out from common_type.
2469 (composite_pointer_type): New function, split out from
2470 build_conditional_expr.
2471 (common_type): Use type_after_usual_arithmetic_conversions.
2472 Remove redundant attribute merging.
2473 (comptypes): Tidy. Handle COMPLEX_TYPE.
2474 (build_binary_op_nodefault): Use null_ptr_cst_p.
2475 (build_conditional_expr): Remove.
2476 (convert_for_assignment): Use new conversion functions.
2478 * cp-tree.h (abstract_virtuals_error): Change declaration.
2479 * typeck2.c (abstract_virtuals_error): Check to see if an error
2480 ocurred, and return a boolean value accordingly.
2481 (build_functional_cast): Adjust accordingly.
2482 * class.c (finish_struct_1): Likewise.
2483 * cvt.c (ocp_convert): Likewise.
2484 * decl.c (cp_finish_decl): Likewise.
2485 (grokparams): Likewise.
2486 (grok_op_properties): Likewise.
2487 (start_function): Likewise.
2488 * init.c (build_new_1): Likewise.
2490 * pt.c (unify): Don't get confused by pointers-to-member functions.
2492 * search.c (build_cplus_new): Robustify.
2494 1999-07-24 Richard Henderson <rth@cygnus.com>
2496 * gxx.gperf (__builtin_va_arg): New.
2497 * parse.y (VA_ARG): New token.
2498 (unary_expr): Recognize it.
2500 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2502 * g++FAQ.texi: Deleted per Joe Buck's request.
2503 * Makefile.in: Corresponding changes.
2505 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2507 * lex.c: Sync with C frontend.
2508 (whitespace_cr): New fn.
2509 (skip_white_space): Use it.
2510 (init_parse): Reorder.
2511 (yyprint): Support CONSTANT.
2512 (pragma_getc, pragma_ungetc): Bring back.
2513 (read_line_number): Change in_system_header directly.
2514 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2515 (parse_float): Update to C version.
2516 (yylex): Handle '$' under the letter case.
2517 Remove looking_for_typename handling.
2518 Support hex floating point constants.
2519 Follow C's lead for choosing type of integer constants.
2520 Rearrange stuff to match C frontend.
2521 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2522 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2524 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2526 * call.c (reference_binding): Tweak.
2527 (mayble_handle_implicit_object): Use direct_reference_binding to
2528 create the right implicit conversion sequence.
2530 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2532 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2533 if we're converting to a reference type.
2535 * call.c (NEED_TEMPORARY_P): New macro.
2536 (standard_conversion): Set it, for derived-to-base conversions.
2537 (reference_related_p): New function.
2538 (reference_compatible_p): Likewise.
2539 (convert_class_to_reference): Likewise.
2540 (direct_reference_binding): Likewise.
2541 (reference_binding): Rework for standards-compliance.
2542 (convert_like): Adjust accordingly.
2543 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2544 are now built up in reference_binding.
2545 (initialize_reference): New function.
2546 * cp-tree.h (ICS_USER_FLAG): Document.
2547 (ICS_THIS_FLAG): Likewise.
2548 (ICS_BAD_FLAG): Likewise.
2549 (NEED_TEMPORARY_P): Likewise.
2550 (cp_lvalue_kind): New type.
2551 (real_lvalue_p): Return it.
2552 * error.c (dump_expr): Provide more accurate representation for
2554 * init.c (expand_default_init): Do not try to perform implicit
2555 conversions for a brace-enclosed initializer.
2556 * search.c (lookup_conversions): Document.
2557 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2559 (real_lvalue_p): Adjust accordingly.
2560 (lvalue_p): Likewise.
2561 (build_cplus_new): Don't allow the creation of an abstract class.
2562 * typeck.c (convert_for_initialization): Use initialize_reference.
2564 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2566 * lex.c (real_yylex) : Correct the test for overflow when lexing
2569 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2571 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2572 not DECL_BUILT_IN, to determine if a function is internally declared.
2573 (duplicate_decls): Likewise. Improve handling of builtins.
2574 (push_overloaded_decl): Remove special handling of builtins.
2576 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2578 * decl.c (grokdeclarator): Pull out decl_constant_value in
2581 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2582 * cp-tree.h, pt.c, semantics.c: Adjust.
2583 * method.c (largest_union_member): Remove.
2585 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2587 * lex.c (token_getch, token_put_back): New fns.
2588 (real_yylex): Use them.
2590 * lex.c (lang_init): Generalize.
2591 (lang_init_options): Tell cpplib this is C++.
2592 (nextchar): Remove. Replace uses with put_back.
2593 (skip_white_space): Handle linemode here. Optimize for cpplib.
2594 (extend_token_buffer_to): New fn.
2595 (extend_token_buffer): Use it.
2596 (read_line_number, check_newline): Just deal with tokens.
2597 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2598 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2599 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2600 * parse.y (PAREN_STAR_PAREN): Remove.
2601 * input.c: Don't use the putback machinery with cpplib.
2602 (sub_getch): Fold back into getch.
2603 (getch): Don't handle linemode here.
2604 (feed_input): Unget any text in the token buffer.
2606 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2607 nextyychar, nextyylval): Remove.
2609 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2610 Jason Merrill <jason@yorick.cygnus.com>
2612 * lex.c (indent_level): New variable.
2613 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2614 (consume_string): Make this smart about USE_CPPLIB.
2615 (yyungetc): Use put_back function.
2616 (pragma_getc, pragma_ungetc): Functions deleted.
2617 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2618 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2620 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2621 Also, clean up cases where we redundantly set token_buffer[0].
2622 (read_line_number): New fn.
2623 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2624 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2625 (sub_getch): Conditionalize out code that's not appropriate if
2627 (put_back): Rewrite in case USE_CPPLIB is defined.
2628 (input_redirected): Ditto.
2630 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2632 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2633 c_global_trees and accessor macros defined in c-common.h.
2634 (cp_tree_index): New enumeration.
2635 (cp_global_trees): Declare new array. Add accessor macros for it, and
2636 delete declarations of tree nodes replaced by it.
2637 (builtin_function): Delete macro, add declaration for new function.
2639 * decl.c: Delete definitions for tree nodes that were replaced by
2640 cp_global_trees and c_global_trees.
2641 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2642 to generate the common builtins here.
2643 (builtin_function): New function.
2644 * decl2.c (abort_fndecl): Delete declaration.
2645 * except.c (expand_builtin_return_address): Delete declaration.
2646 (builtin_return_address_fndecl): Delete variable.
2647 (const_ptr_type_node): Delete declaration.
2648 * lex.c (cons_up_default_function): Delete declaration of
2650 * parse.y (void_list_node): Delete declaration.
2651 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2653 (const_string_type_node): Delete declaration.
2654 * search.c (abort_fndecl): Delete declaration.
2655 * Makefile.in: Update dependencies.
2657 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2659 * pt.c (check_default_tmpl_args): Move test for missing default
2660 arguments here, from ...
2661 (end_template_parm_list): Here.
2663 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2665 * decl.c (lookup_nested_type): Remove.
2666 (pushtag): Don't call it.
2668 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2670 * Makefile.in (INTERFACE): Bump to 2.
2672 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2674 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2675 instructions to gcc.gnu.org. Removed e-mail address.
2677 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2679 * pt.c (determine_specialization): Tighten error-checking.
2680 (end_template_parm_list): Likewise.
2682 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2684 * pt.c (check_default_tmpl_args): Handle friends defined in the
2685 class just like member functions defined in the class.
2687 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2688 Jason Merrill <jason@yorick.cygnus.com>
2690 * cp-tree.h (struct lang_decl): Added field for storing sorted
2691 FIELD_DECLs (used in TYPE_DECLs).
2692 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2693 (DECL_SORTED_FIELDS): New macro.
2694 * class.c (method_name_cmp): New function.
2695 (finish_struct_methods): Modified to support sorting and searching
2697 (finish_struct_anon): Changed code in inner loop to use ELT rather
2698 than UELT (which required an extra indirection for every reference).
2699 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2700 (finish_struct_1): Sort fields.
2701 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2702 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2703 Also, switch to using array indexing rather than a changing pointer.
2704 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2707 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2709 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2710 casts in system headers or extern "C" blocks.
2712 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2715 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2717 * decl2.c (write_virtuals): Deleted declaration.
2718 * cp-tree.h (write_virtuals): Deleted extern declaration.
2719 * class.c (finish_struct_1): Removed #if 0'd code that mentions
2721 * semantics.c (begin_class_definition): Rewrite code to not depend
2724 * lex.c (cp_pragma_interface): New function.
2725 (cp_pragma_implementation): Likewise.
2726 (handle_cp_pragma): Call them.
2728 * typeck.c (comptypes): Simplify C code in look_hard.
2730 * xref.c (PALLOC): Use xcalloc, not calloc.
2731 (SALLOC): Use xmalloc, not malloc.
2733 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2735 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2738 * decl.c (duplicate_decls): If a redeclaration doesn't match the
2739 initial declaration, then don't save the inline info and by all
2740 means don't mark the function as a builtin function.
2742 * decl.c (lookup_name_real): Set NONCLASS to 1 if
2743 CURRENT_CLASS_TYPE is 0.
2745 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2748 * ptree.c (print_lang_type): Added vtable-needs-writing.
2750 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
2752 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2754 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
2756 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2757 Merged into c-common.
2759 1999-07-05 Dave Brolley <brolley@cygnus.com>
2761 * lex.c (errorcount): Declare it.
2762 (finish_parse): Update errorcount for when using CPPLIB.
2764 1999-07-05 Mark Mitchell <mark@codesourcery.com>
2766 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2768 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2769 * decl.c (push_class_binding): Use it.
2770 (lookup_name_real): Likewise.
2772 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
2774 * cp-tree.h (widest_integer_literal_type_node,
2775 widest_unsigned_literal_type) : New.
2776 * decl.c (widest_integer_literal_type_node,
2777 widest_unsigned_literal_type) : New.
2778 (init_decl_processing): Handle/use the two new types.
2779 * lex.c (real_yylex): Same.
2780 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2783 1999-07-01 Mark Mitchell <mark@codesourcery.com>
2785 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2786 to anonymous cv-qualified types.
2788 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
2790 * lex.c (real_yylex) : Change integer literal overflow handling to
2793 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2795 1999-06-28 Richard Henderson <rth@cygnus.com>
2797 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2799 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
2801 * error.c (dump_type_real): Handle TREE_LIST again.
2803 * typeck.c (comp_target_parms): Don't complain about
2804 converting from () to (...) if !flag_strict_prototype.
2806 * decl.c (grokdeclarator): Update the names of all variants when
2809 1999-06-21 Mark Mitchell <mark@codesourcery.com>
2811 * init.c (expand_aggr_vbase_init): Rename to
2812 construct_virtual_bases. Conditionalize construction here,
2814 (emit_base_init): Here.
2816 1999-06-19 Mark Mitchell <mark@codesourcery.com>
2818 * semantics.c (finish_asm_statement): Apply decay conversions to
2821 * decl.c (expand_static_init): When building an anonymous function
2822 for use with atexit, compute its body before and after entering
2825 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2828 1999-06-18 Mark Mitchell <mark@codesourcery.com>
2830 * init.c (expand_aggr_vbase_init): Add flag parameter.
2831 (build_partial_cleanup_for): Remove, inlining into ..
2832 (expand_cleanup_for_base): ... here. Take flag parameter.
2833 (emit_base_init): Pass the in_chrg parameter to
2834 emit_aggr_vbase_init.
2835 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2837 1999-06-16 Mark Mitchell <mark@codesourcery.com>
2839 * decl2.c (import_export_decl): Use same_type_p, rather than
2840 relying on pointer-equality for types.
2842 * method.c (do_build_copy_constructor): Simplify.
2844 * call.c (build_method_call): Remove bogus code for two-argument
2846 * init.c (build_new_1): Expand on comment, and remove dead code.
2848 * init.c (expand_cleanup_for_base): New function, split out
2850 (emit_base_init): Here.
2851 (expand_aggr_vbase_init): Use it.
2853 1999-06-15 Mark Mitchell <mark@codesourcery.com>
2855 * cp-tree.h (class_cache_firstobj): Declare.
2856 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2857 * class.c (permanent_obstack): Remove declaration.
2858 (class_cache_firstobj): Make it global.
2859 (add_method): Don't use permanent_obstack directly.
2860 (pushclass): Only free the class_cache_obstack if we know how far
2862 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2863 * decl.c: Remove dead comment.
2864 (saved_scope): Add class_cache_firstobj.
2865 (push_to_top_level): Save it.
2866 (pop_from_top_level): Restore it.
2867 (push_class_level_binding): Use push_cache_obstack, not
2868 maybe_push_cache_obstack.
2869 * search.c (push_class_decls): Likewise.
2871 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
2873 * pt.c (tsubst_friend_function): Push into namespace of friend
2874 function before pushdecl'ing it.
2876 1999-06-14 Nathan Sidwell <nathan@acm.org>
2878 * call.c (build_new_op): Remove REF_BIND from all operands.
2880 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
2882 * init.c (build_new_1): Look up operator delete even if there was
2883 no explicit new placement.
2885 1999-06-08 Nathan Sidwell <nathan@acm.org>
2887 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2889 (build_throw): ... here. Call it.
2890 (process_start_catch_block): Call it.
2892 1999-06-07 Mark Mitchell <mark@codesourcery.com>
2894 * search.c (convert_pointer_to_single_level): Reimplement without
2897 1999-06-06 Mark Mitchell <mark@codesourcery.com>
2899 * method.c (is_back_referenceable_type): Back-reference bools when
2902 1999-06-07 Dave Brolley <brolley@cygnus.com>
2904 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2905 * input.c (putback_buffer): New structure type.
2906 (putback): Replaces putback_char member.
2907 (putback): Replaces putback_char static variable.
2908 (feed_input): Use putback.
2909 (end_input): Use putback.
2910 (sub_getch): Use putback.
2911 (put_back): Use putback.
2913 1999-06-05 Mark Mitchell <mark@codesourcery.com>
2915 * decl.c (grokdeclarator): Fix typo in last change.
2917 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
2919 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2920 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2922 1999-06-04 Nathan Sidwell <nathan@acm.org>
2924 * except.c (build_throw): Check throw expression validity.
2926 1999-06-03 Mark Mitchell <mark@codesourcery.com>
2928 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2929 just because flag_signed_bitfields is false.
2931 1999-06-03 Nathan Sidwell <nathan@acm.org>
2933 * semantics.c (begin_class_definition): Update the struct's
2935 * class.c (finish_struct): ... rather than here.
2937 * decl.c (make_typename_type): Don't rely on uninitialized
2940 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2942 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2944 1999-05-31 Mark Mitchell <mark@codesourcery.com>
2946 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2947 and friends rather than messing with current_obstack directly.
2948 (cp_build_qualified_type_real): Rework ARRAY_TYPE
2949 allocation to match practice throughout the rest of the
2952 1999-05-30 Mark Mitchell <mark@codesourcery.com>
2954 * lex.c (make_lang_type): Create TYPE_BINFO for
2955 TEMPLATE_TYPE_PARMs just like for non-template types.
2957 * decl.c (start_decl): Move checks on initialization to ...
2958 (cp_finish_decl): Here. Tidy formatting slightly.
2960 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2962 * decl.c (add_binding): Don't complain about a redeclaration of a
2963 semantically identical typedef in a local scope.
2965 1999-05-28 Nathan Sidwell <nathan@acm.org>
2967 * decl.c (complete_array_type): Allocate off same obstack. Fix
2968 DO_DEFAULT comment to match reality.
2970 * friend.c (make_friend_class): Fix diagnostic typo.
2972 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2974 * decl.c (lookup_namespace_name): Handle getting a
2976 (expand_static_init): Don't call pushdecl for implicitly declared
2977 `atexit' used to register destructors.
2979 1999-05-25 Mark Mitchell <mark@codesourcery.com>
2981 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2984 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2985 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
2986 by combining TEMPLATE_INFO and LEVEL into a single union.
2987 (DECL_TEMPLATE_INFO): Reformat.
2988 (DECL_SAVED_TREE): Document.
2989 (DECL_TEMPLATE_INJECT): Remove.
2990 * class.c (finish_struct): Remove code to deal with
2991 DECL_TEMPLATE_INJECT.
2993 * decl.c (maybe_process_template_type_declaration): Handle all new
2994 types in templates uniformly.
2995 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2997 * pt.c (lookup_template_class): Inject template instantiations of
2998 forward-declarations.
2999 (instantiate_class_template): Remove code processing
3000 DECL_TEMPLATE_INJECT.
3002 * pt.c (lookup_template_class): Tweak lookup to find member
3005 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3007 * semantics.c (finish_asm_stmt): Make strings permanent if they're
3010 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
3012 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3013 parts of pointer to data member types.
3015 1999-05-24 Mark Mitchell <mark@codesourcery.com>
3017 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3018 and then make it look like `abort'. Just use `abort' instead.
3020 * typeck.c (build_static_cast): Don't allow static_casts that cast
3022 (casts_away_constness_r): New function.
3023 (casts_away_constness): Likewise.
3025 * decl.c (lookup_tag): Remove code no longer needed after
3026 name-lookup improvements.
3027 * decl2.c (handle_class_head): Make error-recovery more robust.
3028 * friend.c (make_friend_class): Reject templated typename types.
3029 * lex.c (is_global): A template parameter isn't global.
3030 * parse.y (class_head): Robustify.
3031 * parse.c: Regenerated.
3033 1999-05-22 Mark Mitchell <mark@codesourcery.com>
3035 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3036 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
3038 * cp-tree.h (push_nested_namespace): Declare.
3039 (pop_nested_namespace): Likewise.
3040 * decl.c (push_nested_namespace): New function.
3041 (pop_nested_namespace): Likewise.
3042 * pt.c (instantiate_class_template): Use them.
3044 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3046 * cp-tree.h (cplus_expand_constant): Declare.
3047 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3048 converted from one pointer-to-object type to another.
3049 * expr.c (cplus_expand_constant): Don't make it static.
3050 * typeck.c (build_component_ref): Don't crash when presented with
3051 a component which is a TEMPLATE_DECL.
3052 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
3053 cast from a pointer-to-member constant to its own type does not
3054 result in a valid non-type template argument.
3056 1999-05-21 Mark Mitchell <mark@codesourcery.com>
3057 Nathan Sidwell <nathan@acm.org>
3059 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3060 * cp-tree.h: Fix typo in documentation on pointers-to-members.
3061 (cp_build_qualified_type): Make it a macro.
3062 (cp_build_qualified_type_real): Declare.
3063 * decl.c (grokdeclarator): Remove misleading comment. Avoid
3064 problem with template parameters and restrict-qualification.
3065 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3066 * hash.h: Regenerated.
3067 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3069 (NORID): Remove definition.
3070 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3071 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
3072 (fn_type_unification): Check that the function type resulting from
3073 the deduction is legal.
3074 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3075 (unify): Use cp_build_qualified_type_real.
3076 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3077 (cp_build_qualified_type): Rename to ...
3078 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3079 and modify appropriately.
3081 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3082 reveal optimization opportunities.
3084 * pt.c (tsubst): Don't issue error messages when we're not
3085 complaining, even if we see a qualified function type.
3086 (check_cv_quals_for_unify): Don't allow a qualified function
3089 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3091 * class.c (instantiate_type): Downgrade errors for object-dependent
3092 memfn refs to pedwarn.
3094 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3096 * decl.c (grokdeclarator): Don't treat [] as indicating a
3097 zero-sized array in a typedef.
3099 * call.c (build_object_call): Don't look at DECL_NAME for a type.
3100 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3101 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3103 * pt.c (for_each_template_parm): Rework to match documentation.
3104 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3106 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3108 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3110 * class.c (finish_base_struct): Allow non-COM bases for COM classes
3111 except at the leftmost position.
3112 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3113 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3114 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3116 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3117 (build_cplus_new): Make sure that what we return is of the right type.
3119 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3121 * cp-tree.h (make_ptrmem_cst): New function.
3122 * expr.c (cplus_expand_constant): Split out from ...
3123 (cplus_expand_expr): Here. Use cplus_expand_constant.
3124 (init_cplus_expand): Set lang_expand_constant.
3125 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3127 * tree.c (make_ptrmem_cst): Define.
3128 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3129 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3131 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3133 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3135 * decl2.c (start_static_storage_duration_function): Fix comment.
3136 (finish_file): Create static storage duration functions lazily.
3138 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3140 Implement anonymous structs.
3141 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3142 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3143 * class.c (finish_struct_1): Remove redundant check for anon struct.
3144 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3145 (check_tag_decl): Check for anonymous struct here.
3146 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3147 * init.c (sort_member_init, emit_base_init): Handle getting fields
3148 as well as names in current_member_init_list.
3149 (perform_member_init): Handle getting an anon aggr.
3150 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3151 (do_build_copy_constructor): Likewise.
3153 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3155 * tree.c (cp_build_qualified_type): Don't allow qualified function
3158 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
3160 * gxxint.texi: Fix typo.
3162 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3164 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3165 * class.c (finish_struct_1): Use CLASS_TYPE_P.
3166 * ptree.c (print_lang_type): Likewise.
3167 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3169 * typeck2.c (digest_init): Likewise.
3171 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
3173 * call.c (joust): Compare the types of the conv ops, not the
3174 target types of the conversions.
3176 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
3178 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3181 1999-05-17 Mark Mitchell <mark@codesourcery.com>
3183 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3184 * decl.c (grokfndecl): Don't allow inline declarations of friend
3185 template specializations, or friend template specializations with
3187 * pt.c (tsubst): Handle substitution into array types that does
3188 not yield a fixed upper bound, even when not processing a
3190 (tsubst_copy): Deal with the fact that the second operand to a
3191 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3192 * search.c (marked_pushdecls_p): Don't descend into
3193 TEMPLATE_TYPE_PARMs and the like.
3194 (unmarked_pushdecls_p): Likewise.
3196 * call.c (build_over_call): Don't throw away
3197 initializations/copies of empty classes; use MODIFY_EXPR and
3198 INIT_EXPR as for non-empty classes.
3199 * class.c (finish_struct_1): Put the padding byte for an empty
3200 class on the TYPE_NONCOPIED_PARTS list for the class.
3202 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3204 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3205 indicate a reference to a field that is a qualified name.
3207 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
3209 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3210 ASM_OUTPUT_CONSTRUCTOR.
3212 * friend.c (do_friend): Add attrlist arg. Remove support for
3213 getting a non-decl as 'decl'.
3214 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
3216 (grokdeclarator): Adjust.
3217 * cp-tree.h: Adjust.
3219 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3221 * cp-tree.h (permanent_p): New function.
3222 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3223 possibly complex tree node.
3224 * tree.c (mapcar): Adjust comments, and follow coding standards in
3226 (permanent_p): New function.
3228 1999-05-13 Per Bothner <bothner@cygnus.com>
3230 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
3231 primitive Java types, if we actually see `extern "Java"'.
3233 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3235 * lang-specs.h: Pass -$ to the preprocessor.
3237 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
3239 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3240 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3241 (resolve_offset_ref): Don't handle a raw baselink.
3242 * cvt.c (build_expr_type_conversion): Likewise.
3243 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3244 convert_for_initialization): Likewise.
3245 * class.c (instantiate_type): Handle seeing a baselink under an
3247 * error.c (dump_expr): Likewise.
3248 * pt.c (for_each_template_parm): Likewise.
3249 (resolve_overloaded_unification): Likewise.
3250 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3251 * typeck.c (expr_sizeof): Also complain about other permutations
3252 of overloaded functions.
3254 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
3256 * init.c (resolve_offset_ref): Don't return a raw method.
3258 * typeck.c (decay_conversion): Don't handle a raw method.
3259 Resolve all OFFSET_REFs.
3260 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3261 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
3262 same_type_p for pmf bits. Don't use build_binary_op to compare
3263 raw pointers to methods.
3264 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3265 to decide when to call resolve_offset_ref.
3266 (build_c_cast, convert_for_initialization): Likewise.
3267 * cvt.c (build_expr_type_conversion): Likewise.
3269 1999-05-06 Nathan Sidwell <nathan@acm.org>
3271 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3273 1999-05-05 Mark Mitchell <mark@codesourcery.com>
3275 * decl2.c (start_objects): Don't let static constructors and
3276 destructors get inlined.
3278 * parse.y (nested_name_specifier): Make sure ordinary types are
3279 complete, just like template types.
3280 * parse.c: Regenerated.
3282 * pt.c (check_explicit_specialization): Improve error messages.
3284 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
3286 * typeck.c (string_conv_p): Use same_type_p to check whether we
3287 try to convert between char and wchar_t.
3289 1999-05-03 Mark Mitchell <mark@codesourcery.com>
3291 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3292 lookup to error_mark_node here.
3293 (lookup_member): Revise documentation. Add comments. Don't set
3294 the TREE_TYPE to error_mark_node here, and don't build up an extra
3295 TREE_LIST for ambiguous lookups.
3296 (setup_class_bindings): Adjust accordingly.
3297 (push_class_decls): Revise out-of-date comments.
3299 * typeck.c (build_const_cast): Tighten checks for legality.
3301 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3303 * init.c (build_member_call): Lookup names coming from
3304 namespace-scoped LOOKUP_EXPR.
3306 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
3308 * gxxint.texi: Add documentation for 'I'.
3310 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3312 * tinfo.cc (operator==): Qualify type_info with std::.
3314 1999-05-02 Mark Mitchell <mark@codesourcery.com>
3316 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
3317 (DECL_COMDAT): Remove definition.
3319 1999-05-01 Mark Mitchell <mark@codesourcery.com>
3321 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3324 1999-04-30 Mark Mitchell <mark@codesourcery.com>
3326 * class.c (build_vtable): Use build_lang_decl when building
3327 vtables, not just build_decl.
3328 (prepare_fresh_vtable): Likewise.
3329 * decl.c (wrapup_globals_for_namespace): Mark vtables as
3330 DECL_EXTERNAL when calling wrapup_global_declarations.
3331 * decl2.c (priority_info_s): Add initializations_p and
3332 destructions_p members.
3333 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3334 when deciding what vtables to write out.
3335 (ssdf_decls): New variable.
3336 (ssdf_decls_used): Likewise.
3337 (start_static_storage_duration_function): Deal with being called
3338 multiple times. Avoid inlining this function.
3339 (generate_inits_for_priority): Deal with reuse of priority map.
3340 (get_priority_info): Clear initializations_p and destructions_p.
3341 (do_static_initialization): Tweak comment.
3342 (do_static_destruction): Likewise. Fix condition on sentries for
3344 (generate_ctor_or_dtor_function): Call all of the static storage
3346 (generate_ctor_or_dtor_function_for_priority): Check
3347 initializations_p and destructions_p to see what priorities need
3348 initialization functions.
3349 (finish_file): Rework to generate multiple static storage duration
3350 functions, rather than just one.
3352 * typeck.c (build_const_cast): Tweak last change to handle
3353 templates correctly.
3355 * typeck.c (build_const_cast): Disallow use of const_cast to
3356 anything but a pointer or reference type.
3358 1999-04-30 Nathan Sidwell <nathan@acm.org>
3360 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3363 1999-04-29 Mark Mitchell <mark@codesourcery.com>
3365 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3366 (finish_file): Indent comments properly.
3368 1999-04-29 Richard Henderson <rth@cygnus.com>
3370 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3371 (do_static_destruction): Likewise.
3373 1999-04-29 Nathan Sidwell <nathan@acm.org>
3375 * cp-tree.h (TYPE_NOTHROW_P): New macro.
3376 * decl2.c (delete_sanity): Warn on deleting void *.
3377 * init.c (build_new_1): Use TYPE_NOTHROW_P.
3378 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3379 throwing operator new.
3381 1999-04-28 Nathan Sidwell <nathan@acm.org>
3383 * cp-tree.h (build_component_addr): Remove prototype.
3384 * typeck.c (build_component_addr): Make static. Remove MSG
3386 (build_component_addr): Remove MSG parameter, clean up
3388 (build_x_function_call): Use cp_error.
3389 (build_unary_op): Adjust call of build_component_addr.
3391 1999-04-28 Mark Mitchell <mark@codesourcery.com>
3393 * pt.c (tsubst_friend_class): Check for NULL.
3395 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3397 * search.c (binfo_for_vtable): Initialize bfvi.var.
3399 1999-04-27 Nathan Sidwell <nathan@acm.org>
3401 * rtti.c (build_x_typeid): Check rtti is enabled.
3403 1999-04-26 Mark Mitchell <mark@codesourcery.com>
3405 * search.c (is_subobject_of_p): Make sure we're looking at the
3408 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
3410 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3412 1999-04-23 Mark Mitchell <mark@codesourcery.com>
3414 * decl2.c (finish_file): Tweak handling of extern inlines so that
3415 they are not unnecessarily put out.
3417 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3418 such as base classes.
3420 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
3422 * tree.c (build_exception_variant): Fix typo: use the chain of U,
3423 not trying V, while cycling through U.
3425 1999-04-22 Mark Mitchell <mark@codesourcery.com>
3427 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3428 preserves_first_arg. Enlarge dummy accordingly.
3429 (DECL_TINFO_FN_P): New macro.
3430 (SET_DECL_TINFO_FN_P): Likeiwse.
3431 (DECL_RETURNS_FIRST_ARG): Remove.
3432 (DECL_PRESERVES_THIS): Likewise.
3433 (DECL_INIT_PRIORITY): New macro.
3434 (finish_struct_1): Change prototype.
3435 (cat_namespace_levels): Remove prototype.
3436 (vtable_decl_p): New prototype.
3437 (vtype_decl_p): Likewise.
3438 (sigtable_decl_p): Likewise.
3439 (walk_globals_pred): New typedef.
3440 (walk_globals_fn): Likewise.
3441 (walk_globals): New prototype.
3442 (walk_namespaces_fn): New typedef.
3443 (walk_namespaces): New prototype.
3444 (wrapup_globals_for_namespace): Likewise.
3445 (walk_vtables): Remove prototype.
3446 (walk_sigtables): Likewise.
3447 (instantiate_pending_templates): New prototype.
3448 * class.c (finish_struct_1): Don't return a value.
3449 * decl.h (pending_statics): Remove declaration.
3450 * decl.c (walk_namespaces_r): New function.
3451 (walk_globals_r): Likewise.
3452 (vtable_decl_p): Likewise.
3453 (vtype_decl_p): Likewise.
3454 (sigtable_decl_p): Likewise.
3455 (walk_namespaces): Likewise.
3456 (walk_globals_data): New type.
3457 (walk_globals): New function.
3458 (wrapup_globals_for_namespace): Likewise.
3459 (expand_static_init): Remove assertion. Remove redundancy in
3460 conditional. Don't put static data members in static_aggregates
3462 (finish_function): Remove redundancy in conditional. Don't set
3463 DECL_RETURNS_FIRST_ARG.
3464 (cat_namespace_levels): Remove.
3465 * decl2.c: Include splay-tree.h and varray.h.
3466 (priority_info_s): New structure.
3467 (finish_vtable_vardecl): Change prototype. Adjust for new calling
3469 (prune_vtable_vardecl): Likewise.
3470 (finish_sigtable_vardecl): Likewise.
3471 (setup_initp): Remove.
3474 (start_static_storage_duration_function): New function.
3475 (generate_inits_for_priority): Likewise.
3476 (finish_static_storage_duration_function): Likewise.
3477 (get_priority_info): Likewise.
3478 (do_static_initialization): Likewise.
3479 (do_static_destruction): Likewise.
3480 (do_static_initialization_and_destruction): Likewise.
3481 (generate_ctor_or_dtor_function): Likewise.
3482 (generate_ctor_and_dtor_functions_for_priority): Likewise.
3483 (pending_statics): Make it a varray.
3484 (pending_statics_used): New variable.
3485 (saved_inlines): Make it a varray.
3486 (saved_inlines_used): New variable.
3487 (finish_static_data_member): Change method of updating
3489 (mark_inline_for_output): Remove #if 0'd code. Change method of
3490 updating saved_inlines.
3491 (walk_vtables): Remove.
3492 (walk_sigtables): Likewise.
3493 (import_export_decl): Use DECL_TINFO_FN_P.
3494 (pending_templates): Remove declaration.
3495 (maybe_templates): Likewise.
3496 (static_aggregates_initp): Likewise.
3497 (setup_initp): Likewise.
3498 (finish_objects): Simplify.
3499 (INITIALIZE_P_IDENTIFIER): New macro.
3500 (PRIORITY_IDENTIFIER): New macro.
3501 (SSDF_IDENTIFIER): New macro.
3502 (initialize_p_decl): New variable.
3503 (priority_decl): Likewise.
3504 (ssdf_decl): Likewise.
3505 (priority_info_map): Likewise.
3506 (finish_file): Recode output of static intializers and other
3507 file-scope finalization tasks.
3508 * error.c (OB_END_TEMPLATE_ID): New macro.
3509 (dump_type_real): Use it.
3510 (dump_decl): Likewise.
3511 (dump_function_name): Likewise.
3512 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3514 (check_newline): Use walk_globals, not walk_vtables.
3515 * pt.c (pending_tempalte_expansions): Remove.
3516 (set_vardecl_interface_info): Likewise.
3517 (pending_templates): Make static.
3518 (maybe_templates): Likewise.
3519 (instantiate_class_template): Adjust call to finish_struct_1.
3520 (instantiate_pending_templates): New function.
3521 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3522 * tree.c (static_aggregates_initp): Remove.
3523 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3525 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3527 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3528 with the RTL code RETURN.
3529 * hash.h: Regenerated.
3530 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3531 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3532 * parse.c: Regenerated.
3533 * pt.c: Include varray.h. Include rtl.h since varray.h requires
3535 (inline_parm_levels): New variable.
3536 (inline_parm_levels_used): Likewise.
3537 (maybe_begin_member_template_processing): Update them.
3538 (maybe_end_member_template_processing): Use them, rather than
3539 guessing how many levels to pop.
3541 * decl.c (make_typename_type): Tighten error-checking.
3543 1999-04-20 Mark Mitchell <mark@codesourcery.com>
3545 * cp-tree.h (build_binary_op): Remove unneeded parameter.
3546 * class.c (build_vrable_entry_ref): Adjust call to
3548 * decl.c (expand_static_init): Likewise.
3549 (grokdeclarator): Likewise.
3550 (finish_function): Likewise.
3551 * decl2.c (delete_sanity): Likewise.
3552 (do_dtors): Likewise.
3553 (do_ctors): Likewise.
3554 * error.c (dump_type_suffix): Likewise.
3555 * expr.c (cplus_expand_expr): Likewise.
3556 * init.c (resolve_offset_ref): Likewise.
3557 (build_new): Likewise.
3558 (build_new_1): Likewise.
3559 (build_vec_delete_1): Likewise.
3560 (expand_vec_init_catch_clause): Likewise.
3561 (build_delete): Likewise.
3562 * pt.c (tsubst): Likewise.
3563 * rtti.c (synthesize_tinfo_fn): Likewise.
3564 * search.c (expand_upcast_fixups): Likewise.
3565 (expand_direct_vtbls_init): Likewise.
3566 * typeck.c (get_member_function_from_ptrfunc): Likewise.
3567 (build_binary_op_nodefault): Likewise.
3568 (point_int_sum): Likewise.
3569 (pointer_diff): Likewise.
3570 (build_unary_op): Likewise.
3571 (build_modify_expr): Likewise.
3572 (get_delta_difference): Likewise.
3573 (build_ptrmemfunc): Likewise.
3574 (expand_ptrmemfunc_cst): Likewise.
3576 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
3578 * decl.c (grokfndecl): Always call cplus_decl_attributes.
3579 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3581 1999-04-19 Mark Mitchell <mark@codesourcery.com>
3583 * cp-tree.h (finish_static_data_member_decl): New function.
3584 * decl2.c (finish_static_data_member_decl): Split out from ...
3586 * pt.c (instantiate_class_template): Use it here instead of
3588 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3589 finish_static_data_member_decl will do that. Explicit set
3590 DECL_EXTERNAL to match non-template processing.
3592 1999-04-18 Mark Mitchell <mark@codesourcery.com>
3594 * cp-tree.h (finish_class_definition): Add parameter.
3595 * parse.y (structsp): Use it. Don't call pop_scope here.
3596 * parse.c: Regenerated.
3597 * semantics.c (finish_class_definition): Pop it here.
3599 1999-04-17 Mark Mitchell <mark@codesourcery.com>
3601 * decl.c (xref_tag): Revise handling of nested template
3603 * pt.c (check_explicit_specialization): Tweak handling of friend
3604 templates in template classes.
3605 (tsubst_friend_class): Handle friend declarations for nested
3606 member template classes.
3608 1999-04-16 Mark Mitchell <mark@codesourcery.com>
3610 * class.c (finish_struct): Remove unused variable.
3611 (pushclass): Likewise.
3612 (invalidate_class_lookup_cache): Likewise.
3613 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3614 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3615 doesn't get obliterated.
3616 (make_typename_type): Handle template classes correctly.
3618 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3619 (storetags): Declare.
3620 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3621 (pushclass): Likewise. Use storetags to install tag declarations,
3623 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3624 * decl.c (storetags): Make it global.
3625 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3626 implicit typename declaration.
3627 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
3628 * method.c (hack_identifier): Likewise.
3629 * search.c (lookup_member): Likewise.
3631 * decl.c (warn_about_implicit_typename_lookup): New function.
3632 (lookup_name_real): Use it. Rework handling of implicit typename
3635 1999-04-15 Mark Mitchell <mark@codesourcery.com>
3637 * cp-tree.h (lookup_nested_field): Remove.
3638 * class.c (push_nested_class): Handle UNION_TYPEs.
3639 (pop_nested_class): Likewise.
3640 * decl.c (lookup_name_real): Don't call lookup_nested_field.
3641 (start_decl): Use push_nested_class, not just pushclass.
3642 (cp_finish_decl): Use pop_nested_class, not just popclass.
3643 * search.c (lookup_nested_field): Remove.
3645 * cp-tree.h (lang_type): Add documentation.
3646 * decl2.c (handle_class_head): Create template declarations here,
3648 * parse.y (class_head): Return whether or not we entered a new
3649 scope, as well as the type named.
3650 (named_class_head): Likewise.
3651 (named_complex_class_head_sans_basetype): Likewise.
3652 (structsp): Adjust accordingly. Pop scope when required.
3653 * parse.c: Regenerated.
3654 * pt.c (check_default_tmpl_args): Robustify.
3655 (redeclare_class_template): Likewise.
3656 (instantiate_class_template): An instantiation of an
3657 anonymous union is itself an anonymous union.
3658 * semantics.c (begin_class_definition): Don't create template
3661 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
3663 * parse.y (after_type_declarator_intern): New nonterminal.
3664 (after_type_declarator): Use it.
3665 (direct_after_type_declarator): Likewise. Move above
3666 nonnested_type to fix reduce/reduce conflict resolution.
3667 (declmods): Reducing from just 'attributes' has EMPTY precedence.
3668 * Makefile.in (CONFLICTS): Update.
3670 * decl.c (define_label): Downgrade error for jumping over a
3671 non-POD decl to pedwarn.
3673 1999-04-14 Mark Mitchell <mark@codesourcery.com>
3675 * cp-tree.h (popclass): Change declaration.
3676 (pop_nested_class): Likewise.
3677 (poplevel_class): Remove declaration.
3678 * call.c (convert_default_argument): Pass no arguments to
3680 * class.c (finish_struct_1): Likewise.
3681 (finish_struct): Likewise.
3682 (popclass): Remove argument. Simplify code accordingly.
3683 (pop_nested_class): Likewise.
3684 * decl.c (poplevel_class): Declare it here, and make it static.
3685 (poplevel): Handle class scopes.
3686 (poplevel_class): Don't take an rgument. Simplify.
3687 (pop_everything): Pass no arguments to pop_nested_class.
3688 (cp_finish_decl): Pass no arguments to popclass.
3689 (grokdeclarator): Pass no arguments to pop_nested_class.
3690 (finish_function): Likewise.
3691 * decl2.c (grokfield): Likewise.
3692 (pop_scope): Pass no arguments to popclass.
3693 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3694 * pt.c (instantiate_class_template): Move call to pushclass, and
3695 document. Pass no arguments to popclass.
3696 (regenerate_decl_from_template): Likewise.
3698 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
3700 * typeck.c (build_unary_op): Handle taking the address of a unique
3701 bound non-static member function.
3703 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
3705 * lang-options.h (-Wdeprecated): New flag.
3706 * decl2.c (warn_deprecated): New flag.
3707 (lang_decode_option): Deprecated this-is-variable,
3708 external-templates, alt-external-templates.
3709 Support -Wdeprecated.
3710 * errfn.c (cp_deprecated): New function.
3712 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3714 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3715 of the decls themselves.
3717 * pt.c (tsubst_function_type): Copy attributes over.
3719 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
3721 * cp-tree.h: Add prototype.
3722 * decl.c (init_decl_processing): Set valid_lang_attribute.
3724 1999-04-13 Mark Mitchell <mark@codesourcery.com>
3726 * class.c (finish_struct_1): Look at the const-ness of the field's
3727 type, not the TREE_READONLY-ness of the declaration.
3728 * method.c (synthesize_method): Likewise.
3729 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3730 creating new declarations.
3732 1999-04-13 Mike Stump <mrs@wrs.com>
3734 * decl2.c (import_export_decl): Because vtables always reference
3735 virtual functions, even if they are inlined, don't allow
3736 -fno-implement-inlines to not emit them, instead, emit them with
3738 * decl.c (start_function): Likewise.
3740 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
3742 * cp-tree.h (struct lang_type): Add com_interface.
3743 (CLASSTYPE_COM_INTERFACE): New macro.
3744 * class.c (set_rtti_entry): COM interface classes have no RTTI
3745 entries in their vtables; adjust.
3746 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3747 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3748 finish_struct_1): Likewise.
3749 * decl2.c (mark_vtable_entries): Likewise.
3750 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3751 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3752 expand_upcast_fixups): Likewise.
3753 * tree.c (debug_binfo): Likewise.
3755 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3756 * typeck.c (comptypes): If we get it, ignore attributes.
3757 * class.c (instantiate_type): Use BASELINK_P. Change complain
3758 parameter to flags; 2 means ignore attributes.
3759 * call.c (build_op_delete_call): Pass it.
3761 * decl.c (xref_tag): Only complain once about using a typedef-name
3762 with 'struct'. Downgrade to pedwarn.
3764 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3766 * parse.y (absdcl_intern): New nonterminal.
3767 (absdcl, direct_abstract_declarator): Use it.
3769 * pt.c (lookup_template_class): Look through implict typename.
3771 1999-04-11 Mark Mitchell <mark@codesourcery.com>
3773 * friend.c (add_friend): Deal gracefully with error_mark_node.
3774 * method.c (build_overload_value): Handle pointers-to-members as
3775 template parameters.
3777 * decl.c (push_binding): Fix typo in comment.
3779 1999-04-10 Mark Mitchell <mark@codesourcery.com>
3781 * error.c (dump_type_real): If a typename is a template-id, put
3782 out the template arguments.
3783 (dump_expr): Handle TEMPLATE_ID_EXPR.
3784 * pt.c (lookup_template_class): Now that full arguments are
3785 available everywhere, remove code that tried to guess them.
3787 1999-04-09 Mark Mitchell <mark@codesourcery.com>
3789 * decl.c (make_typename_type): Complain if we don't find a type
3790 when trying to make a typename type for a non-template type.
3792 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
3794 * decl.c (start_decl): Pass attributes to grokdeclarator.
3795 (grokdeclarator): Handle attributes on constructor-syntax
3798 1999-04-08 Mark Mitchell <mark@codesourcery.com>
3800 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3803 * search.c (template_self_reference_p): Tweak.
3805 1999-04-07 Mark Mitchell <mark@codesourcery.com>
3807 * init.c (build_offset_ref): Don't build yet another weird data
3808 structure to describe overloaded functions.
3810 1999-04-06 Mark Mitchell <mark@codesourcery.com>
3812 * cp-tree.h (BASELINK_P): New macro.
3813 (SET_BASELINK_P): Likewise.
3814 * init.c (build_member_call): Remove needless assignment in if
3816 * search.c (lookup_field_r): Fix handling when we are looking
3817 specifically for a type; these are not hidden by functions and
3819 (lookup_member): Use SET_BASELINK_P.
3820 * tree.c (is_overloaded_fn): Use BASELINK_P.
3821 (really_overloaed_fn): Likewise.
3822 (get_first_fn): Likewise.
3824 1999-04-05 Mark Mitchell <mark@codesourcery.com>
3826 * decl.c (lookup_name_current_level): Tweak, and improve
3829 * class.c (maybe_fixup_vptrs): Remove declaration.
3830 (build_class_init_list): Likewise.
3831 * decl.c (pushdecl_class_level): Call check_template_shadow here
3833 (push_class_level_binding): ... not here.
3834 * search.c (dfs_push_type_decls): Only avoid
3835 template-self-reference TYPE_DECLs if they are from base classes.
3837 1999-04-04 Mark Mitchell <mark@codesourcery.com>
3839 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3842 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
3844 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3845 (finish_struct_1): Don't call build_class_init_list.
3847 1999-04-02 Mark Mitchell <mark@codesourcery.com>
3849 * tinfo.h (__class_type_info): Fix illegal declaration.
3851 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3852 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3853 (IDENTIFIER_CLASS_VALUE): Improve documentation.
3854 (is_properly_derived_from): Declare.
3855 (invalidate_class_lookup_cache): Likewise.
3856 (maybe_maybe_note_name_used_in_class): Likewise.
3857 (note_name_declared_in_class): Likewise.
3858 (push_using_decl): Remove duplicate declaration.
3859 (id_in_current_class): Remove declaration.
3860 (push_class_binding): Change prototype.
3861 (clear_identitifer_class_values): Declare.
3862 * call.c (is_properly_derived_from): Make it global.
3863 (build_new_function_call): Be careful about updating candidates.
3864 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
3865 asked to make illegal calls.
3866 * class.c: Include splay-tree.h.
3867 (class_stack_node): Add names_used slot.
3868 (check_member_decl_is_same_in_complete_scope): Remove.
3869 (add_method): Fix comment. Push the declaration into class
3871 (finish_struct_1): When popping the class, pop the bindings too.
3872 Remove check for data member/function member conflict.
3873 (finish_struct): Remove calls to
3874 check_member_decl_is_same_in_complete_scope. Change calls to
3876 (pushclass): Clear names_used in the class stack entry.
3877 Use invalidate_class_lookup_cache to remove cached entries, rather
3878 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
3879 before entering a new class. Remove dead code. Don't mess with
3880 current_function_decl when pushing declarations.
3881 (invalidate_class_lookup_cache): New function, split out from ...
3882 (popclass): Here. Clean up names_used on our way out.
3883 (instantiate_type): Adjust.
3884 (build_self_reference): Don't push the declaration here.
3885 (maybe_note_name_used_in_class): New function.
3886 (note_name_declared_in_class): Likewise.
3887 * decl.c (add_binding): Change prototype.
3888 (find_class_binding_level): New function.
3889 (innermost_nonclass_level): Likewise.
3890 (current_binding_level): Update documentation.
3891 (inner_binding_level): Remove. Replace with current_binding_level
3893 (push_binding_level): Remove special handling of
3894 class_binding_level.
3895 (pop_binding_level): Likewise. Use find_class_binding_level.
3896 (suspend_binding_level): Likewise.
3897 (global_bindings_p): Use innermost_nonclass_level.
3898 (toplevel_bindings_p): Likewise.
3899 (namespace_bindings_p): Likewise.
3900 (pseudo_global_level_p): Likewise.
3901 (push_binding): Clear INHERITED_VALUE_BINDING_P.
3902 (add_binding): Check for illegal multiple declarations. Return a
3903 value indicating whether or not the new binding was legal.
3904 (push_local_binding): Skip over class binding levels. Check
3905 return value from add_binding.
3906 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
3907 note_name_declared_in_class.
3908 (pushlevel_class): Remove "fake out the rest of the compiler"
3910 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3911 (clear_identifier_class_values): New function.
3912 (pop_from_top_level): Use it.
3913 (pop_everything): Tweak.
3914 (maybe_process_template_type_declaration): Don't push the
3915 declaration for the template here.
3916 (pushtag): Don't push tag declarations into class scope here.
3917 (pushdecl): Apply DeMorgan's law for readability.
3918 (pushdecl_class_level): Remove special-case code for
3919 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
3920 (push_class_level_bindng): Deal with inherited bindings.
3921 (lookup_name_real): Remove special-case code for
3922 TYPE_BEING_DEFINED, and some implicit typename magic.
3923 (grokdeclarator): Handle COMPONENT_REF for a template function.
3924 (build_enumerator): Don't call pushdecl_class_level here.
3925 (id_in_current_class): Remove.
3926 * decl2.c (grokfield): Don't call pushdecl_class_level or
3927 check_template_shadow.
3928 * errfn.c (cp_file_of): Don't declare.
3929 (cp_line_of): Likewise.
3930 * error.c (dump_decl): Handle an OVERLOAD.
3931 (cp_file_of): Likewise.
3932 (cp_line_of): Likewise.
3933 * init.c (build_member_call): Handle a COMPONENT_REF.
3934 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3935 pushdecl_class_level.
3936 * method.c (hack_identifier): Build COMPONENT_REFs for references
3937 to member templates as well as member functions. Remove dead
3939 * parse.y (left_curly): Remove.
3940 (nonnested_type): Call maybe_note_name_used_in_class, not
3941 pushdecl_class_level.
3942 * parse.c: Regenerated.
3943 (nested_name_specifier_1): Likewise.
3944 * pt.c (check_explicit_specialization): Adjust, for robustness.
3945 (check_template_shadow): Handle OVERLOADs.
3946 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3947 TEMPLATE_DECL, if appropriate.
3948 * search.c (envelope_add_decl): Remove.
3949 (dfs_pushdecls): Likewise.
3950 (dfs_compress_decls): Likewise.
3951 (dfs_push_decls): New function.
3952 (dfs_push_type_decls): Likewise.
3953 (setup_class_bindings): Likewise.
3954 (template_self_reference_p): Likewise.
3955 (lookup_field_r): Use it.
3956 (looup_member): Remove old comment. Deal with ambiguity.
3957 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3958 and remove envelope processing.
3959 * semantics.c (begin_class_definition): Let pushclass push
3960 declarations for base classes.
3961 (finish_member_declaration): Push declarations into class scope.
3962 * typeck.c (build_component_ref): Just put an OVERLOAD into the
3963 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3964 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
3965 * Makefile.in (class.o): Depend on splay-tree.h.
3967 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
3969 * cvt.c (convert_pointer_to_real): Use same_type_p.
3970 * typeck.c (comp_target_types): Use same_type_p.
3972 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
3974 * semantics.c (begin_inline_definitions,
3975 finish_inline_definitions): Rename from finish_default_args and
3976 begin_inline_definitions, respectively, to something that isn't a
3978 * parse.y (structsp): Adjust.
3980 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3981 (list_hash_lookup): Likewise.
3982 (hash_tree_chain): Adjust.
3983 * pt.c (tsubst): Adjust.
3984 (tsubst_arg_types): Use plain hash_tree_cons.
3985 * cp-tree.h (hash_tree_cons_simple): Lose.
3986 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3988 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3990 * Makefile.in (hash.h): Generate using gperf language 'C', not
3991 'KR-C', so gperf uses the `const' keyword on strings.
3993 * gxx.gperf (resword): Const-ify a char*.
3995 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
3997 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3998 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3999 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4000 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4001 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4002 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4005 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
4007 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4009 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
4011 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4013 1999-03-27 Mark Mitchell <mark@codesourcery.com>
4015 * cp-tree.h (add_friend): Declare.
4016 (add_friends): Likewise.
4017 * friend.c (add_friend): Make it global. Don't add to
4018 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4019 (add_friends): Make it global.
4020 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4021 befriending class is a template.
4022 * parse.y (component_decl_1): Fix typo in comment.
4023 * parse.c: Regenerated.
4024 * pt.c (instantiate_class_template): Use add_friend and
4025 add_friends rather that duplicating some of their functionality
4028 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
4030 * call.c (build_field_call): Unify 'this' and non-'this' cases.
4032 * typeck.c (build_indirect_ref): Check for 'this' sooner.
4034 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4036 * call.c (op_error): Const-ify a char*.
4037 (add_candidate, source_type, add_warning): Add static prototype.
4038 (print_z_candidates): Const-ify a char*.
4040 * class.c (resolve_address_of_overloaded_function,
4041 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4042 (get_vtable_name, finish_struct_1): Const-ify a char*.
4044 * cvt.c (convert_to_reference): Likewise.
4046 * decl.c (redeclaration_error_message, record_builtin_type,
4047 record_unknown_type, member_function_or_else, bad_specifiers):
4049 (find_binding, select_decl, unqualified_namespace_lookup,
4050 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4051 Add static prototype.
4052 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4053 implicitly_declare, record_builtin_java_type, define_function,
4054 grok_op_properties, tag_name): Const-ify a char*.
4056 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4057 (define_function, finish_builtin_type): Const-ify a char*.
4058 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4059 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4060 (file_name_nondirectory): Const-ify a char*.
4061 (init_filename_times): Don't prototype.
4062 (compiler_error): Prototype.
4063 (yyerror, init_repo): Const-ify a char*.
4064 (build_srcloc): Don't prototype.
4065 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4067 (warn_for_assignment): Don't prototype.
4068 (convert_for_initialization, readonly_error, check_for_new_type,
4069 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4072 * decl2.c (acceptable_java_type, output_vtable_inherit,
4073 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4074 merge_functions, decl_namespace, validate_nonmember_using_decl,
4075 do_nonmember_using_decl): Add static prototype.
4076 (lang_f_options): Const-ify a char*.
4077 (finish_builtin_type): Likewise.
4078 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4081 * errfn.c: Include cp-tree.h.
4082 (cp_thing): Add static prototype.
4083 (compiler_error): Don't protoptype.
4084 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4085 passing it to `cp_thing'.
4087 * error.c (interesting_scope_p): Add static prototype.
4089 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4092 * init.c (compiler_error): Don't prototype.
4093 (member_init_ok_or_else): Const-ify a char*.
4094 (build_java_class_ref): Add static prototype.
4096 * lex.c (compiler_error): Don't prototype.
4097 (get_time_identifier, interface_strcmp, extend_token_buffer,
4098 handle_cp_pragma): Const-ify a char*.
4099 (is_global, init_filename_times): Add static prototype.
4100 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4101 (compiler_error): Change from fixed args to variable args.
4102 (yyerror): Const-ify a char*.
4104 * parse.y (cond_stmt_keyword): Const-ify a char*.
4105 (parse_decl): Add static prototype.
4107 * pt.c (template_args_equal, print_template_context): Likewise.
4108 (print_candidates, check_default_tmpl_args): Const-ify a char*.
4109 (instantiate_class_template): Likewise.
4111 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4113 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4114 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4116 * search.c (lookup_field_info, lookup_member): Likewise.
4117 (lookup_member): Cast the first argument of `bzero' to a PTR.
4119 * sig.c (compiler_error): Don't prototype.
4120 (build_signature_pointer_or_reference_nam): Const-ify a char*.
4121 (get_sigtable_name, build_member_function_pointer): Likewise.
4123 * tree.c (compiler_error): Don't prototype.
4124 (no_linkage_helper, build_srcloc): Add static prototype.
4125 (build_vbase_pointer_fields): Const-ify a char*.
4126 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4128 * typeck.c (compiler_error): Don't prototype.
4129 (convert_for_assignment): Const-ify a char*.
4130 (comp_cv_target_types): Add static prototype.
4131 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4132 build_component_addr, build_unary_op, convert_for_initialization):
4135 * typeck2.c (ack): Add static prototype and change from fixed args
4137 (readonly_error, check_for_new_type): Const-ify a char*.
4139 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4140 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4141 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
4142 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4143 gen_assign, GNU_xref_member): Const-ify a char*.
4145 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4147 * gxxint.texi: Remove old discussion on copying virtual bases.
4149 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
4151 * Make-lang.in: Remove all references to g++.o/g++.c.
4152 Link g++ from gcc.o.
4154 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4156 * decl2.c (comdat_linkage): Treat vtables like functions.
4158 1999-03-25 Mark Mitchell <mark@codesourcery.com>
4160 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4162 1999-03-25 Nathan Sidwell <nathan@acm.org>
4164 * decl.c (init_decl_processing): Add `signed' type as a synonym
4167 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4169 * typeck.c (common_type): Handle cv-qual unification for pointers
4172 * decl.c (unqualified_namespace_lookup): Return error_mark_node
4174 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4175 * lex.c (do_identifier): If we got error_mark_node, call
4178 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4180 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4183 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
4185 * decl.c (lookup_name_real): Do nested field lookup regardless of
4188 1999-03-24 Mark Mitchell <mark@codesourcery.com>
4190 * cp-tree.h (lang_type): Remove has_assignment and
4191 has_real_assignment. Add befriending_classes.
4192 (TYPE_HAS_ASSIGNMENT): Remove.
4193 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4194 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4195 (lang_decl): Document.
4196 (DECL_BEFRIENDING_CLASSES): New macro.
4197 (FRIEND_NAME): Move declaration to more obvious location.
4198 (FRIEND_DECLS): Likewise.
4199 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4200 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4201 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4202 (grok_op_properties): Likewise.
4203 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4204 (add_friend): Likewise. Don't do weird things with assignment
4205 operators. Update DECL_BEFRIENDING_CLASSES.
4206 (add_friends): Don't do weird things with assignment operators.
4207 (make_friend_class): Likewise. Update
4208 CLASSTYPE_BEFRIENDING_CLASSES.
4209 * pt.c (instantiate_class_template): Don't set
4210 TYPE_HAS_ASSIGNMENT.
4211 (tsubst_copy): Substitute the TREE_TYPE for more unary
4213 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4214 * search.c (protected_accessible_p): New function.
4215 (friend_accessible_p): Likewise.
4216 (accessible_p): Use them.
4218 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4220 * pt.c (convert_nontype_argument): Don't create things that aren't
4221 PTRMEM_CSTs when applying a qualification conversion to a
4224 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4226 * Makefile.in (OBJS): Don't mention hash.o.
4227 (OBJDEPS): Likewise.
4229 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
4231 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4232 * decl.c (expand_static_init): Make sure we don't add any after
4235 * decl.c (cp_finish_decl): Move intelligence about handling
4236 DECL_COMDAT for variables from here...
4237 * decl2.c (comdat_linkage): ...to here.
4238 (maybe_make_one_only): Tweak.
4239 (import_export_decl): Call comdat_linkage for variables, too.
4240 (finish_file): Handle template statics properly.
4242 1999-03-22 Mark Mitchell <mark@codesourcery.com>
4244 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4245 Document internals of pointer-to-member-functions.
4246 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4247 (PFN_FROM_PTRMEMFUNC): Likewise.
4248 (build_type_conversion): Remove unused parameter.
4249 (build_ptrmemfunc1): Declare.
4250 (expand_ptrmemfunc_cst): New function.
4251 (delta2_from_ptrmemfunc): Likewise.
4252 (pfn_from_ptrmemfunc): Likewise.
4253 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4254 build_type_conversion. Use TYPE_PTRMEM_P for readability.
4255 (convert_to_reference): Remove unused parameter to
4256 build_type_conversion.
4257 (ocp_convert): Likewise.
4258 (build_user_type_conversion): Likewise.
4259 * error.c (dump_expr): Handle NULL pointer-to-member functions.
4260 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4261 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4262 open when handling pointer-to-member functions.
4263 * pt.c (convert_nontype_argument): Clean up error messages. Be
4264 more stringent with pointers-to-members.
4265 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
4266 (build_unary_op): Tidy ever-so-slightly.
4267 (build_conditional_expr): Remove extra parameter to
4268 build_type_conversion.
4269 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4271 (expand_ptrmemfunc_cst): Define.
4272 (delta2_from_ptrmemfunc): Likewise.
4273 (pfn_from_ptrmemfunc): Likewise.
4275 1999-03-19 Mark Mitchell <mark@codesourcery.com>
4277 * init.c (build_member_call): Handle template-id expressions
4279 * typeck.c (build_x_function_call): Likewise.
4281 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
4283 * friend.c (make_friend_class): Avoid core dump when
4284 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4286 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
4288 * decl.c (start_function): Suppress normal linkage heuristics
4289 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4291 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
4293 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4294 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4296 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
4298 * parse.y (named_complex_class_head_sans_basetype):
4299 Do not push a scope for error_mark_node.
4300 (maybe_base_class_list): Likewise.
4302 * decl.c (start_decl): Check for error_mark_node as a type.
4303 Detected by g++.brendan/array-refs.C.
4304 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
4305 (maybe_build_cleanup_1): Likewise. Detected by
4306 g++.jason/incomplete1.C.
4308 * tree.c (build_dummy_object): Use void_zero_node instead of the
4310 (is_dummy_object): Check for such a node.
4311 Detected by g++.bob/inherit1.C
4313 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
4315 * method.c (old_backref_index): Split out...
4316 (flush_repeats): From here. Rename back from try_old_backref.
4317 (build_mangled_name): Put back some old-style repeat handling.
4319 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4321 * lex.c: Don't include setjmp.h.
4322 (parse_float): New static function.
4323 (pf_args): New struct.
4324 (real_yylex): Use them in call to `do_float_handler'.
4326 1999-03-15 Mark Mitchell <mark@markmitchell.com>
4328 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4329 * tree.c (layout_basetypes): Not here.
4330 * search.c (dfs_search): Remove; no longer used.
4332 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4334 * decl2.c (validate_nonmember_using_decl): Issue sensible
4335 error-messages on bogus qualifiers.
4337 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
4339 * call.c (add_function_candidate): Fix uninitialized variable.
4341 * Makefile.in (search.o): Add dependency on varray.h.
4343 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
4345 * decl.c (duplicate_decls): Use same_type_p.
4346 * method.c (try_old_backref): Renamed from flush_repeats. Use
4347 same_type_p. Don't try to handle repeats. Return success.
4348 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
4349 calls from old-style code, too.
4350 (check_ktype): Use same_type_p.
4351 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
4352 (build_qualified_name): Simplify logic.
4353 (process_overload_item): Strip typedefs and quals at the top.
4354 (build_mangled_name_for_type_with_Gcode): Remove call to
4355 type_canonical_variant.
4356 (build_mangled_name): Likewise. Remove support for old-style
4357 repeats, which have been disabled since 2.7.2. Don't mess with
4359 (build_decl_overload_real): Don't mess with TREE_USED.
4361 1999-03-13 Nathan Sidwell <nathan@acm.org>
4363 * error.c (cp_printers): Add 'F' escape character.
4364 (dump_type_real): Remove TREE_LIST (fnargs) printing.
4365 Functionality moved to dump_parameters.
4366 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4367 (dump_function_decl): Extend meaning of V parameter. Use
4368 dump_parameters and dump_exception_spec.
4369 (dump_parameters): New static function.
4370 (dump_exception_spec): New static function.
4371 (fndecl_as_string): Change argument semantics. Use
4372 dump_function_decl directly.
4374 * sig.c (build_signature_table_constructor): Use cp_error.
4376 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
4378 * semantics.c (finish_switch_cond): Handle error cases gracefully.
4379 Detected by g++.law/enum5.C.
4381 * typeck.c (build_modify_expr): Check for errors after resolving
4382 offsets. Detected by g++.brendan/static1.C.
4384 * decl.c (complete_array_type): Ignore initial_value if it is an
4385 error. Detected by g++.benjamin/17930.C.
4387 * typeck2.c (process_init_constructor): Return error if one argument
4388 is in error. Detected by g++.benjamin/13478.C.
4390 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
4392 * decl.c (select_decl): Allow class templates when we need types.
4393 * decl2.c (ambiguous_decl): Likewise.
4395 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4397 * lex.c (do_identifier): Correct call to enforce_access.
4398 * search.c (accessible_p): Tweak comment.
4400 1999-03-10 Mark Mitchell <mark@markmitchell.com>
4402 * semantics.c (begin_class_definition): Call build_self_reference.
4403 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4405 * search.c (assert_canonical_unmarked): Fix typo in prototype.
4407 * search.c (dfs_canonical_queue): New function.
4408 (dfs_assert_unmarked_p): Likewise.
4409 (assert_canonical_unmarked): Likewise.
4410 (access_in_type): Use it.
4411 (accessible_p): Likewise. Walk the whole tree when umarking.
4413 * sig.c (build_signature_table_constructor): Use accessible_p
4414 instead of compute_access.
4416 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4418 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4420 1999-03-09 Mark Mitchell <mark@markmitchell.com>
4422 * cp-tree.h (flag_access_control): Declare.
4423 (TREE_VIA_PPUBLIC): Document.
4424 (DECL_NONSTATIC_MEMBER_P): New macro.
4425 (enforce_access): Return an indication of whether or not access
4427 (build_self_reference): Change prototype.
4428 (compute_access): Replace with ...
4429 (accessible_p): New function.
4430 (dfs_walk): Change prototype.
4431 (dfs_unmark): Likewise.
4432 (markedp): Likewise.
4433 * call.c (enforce_access): Use accessible_p.
4434 * class.c (build_self_reference): Insert the declaration into the
4435 list of members for this type, and make it public.
4436 * decl.c (xref_basetypes): Avoid ill-timed recursion.
4437 * init.c (build_offset_ref): Use lookup_member, not three separate
4438 name-lookups. Call enforce_access rather than checking for
4439 illegal accesses here.
4440 (resolve_offset_ref): Likewise.
4441 * lex.c (do_identifier): Likewise.
4442 * method.c (hack_identifier): Likewise.
4443 * parse.y (self_reference): Remove.
4444 (opt_component_decl_list): Don't use it.
4445 * parse.c: Regenerated.
4446 * pt.c (print_candidates): Generalize to handle lists of
4447 overloaded functions.
4448 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4450 (get_template_base): Use new calling convention for dfs_walk.
4451 * search.c: Include varray.h. Add prototypes.
4452 (dfs_walk): Accept a data pointer to pass to the work functions.
4453 All callers changed. All work functions changed.
4454 (breadth_first_search): Rename to bfs_walk, and make consistent
4456 (dfs_walk_real): New function.
4457 (canonical_binfo): New function.
4458 (context_for_name_lookup): Likewise.
4459 (shared_marked_p): Likewise.
4460 (shared_unmarked_p): Likewise.
4461 (lokup_field_queue_p): Likewise.
4462 (lookup_field_r): Generalize to handle both functions and fields.
4463 (lookup_field): Just call lookup_member.
4464 (lookup_fnfields): Likewise.
4465 (lookup_member): Move body of lookup_field here and generalize.
4466 (dfs_accessible_queue_p): Likewise.
4467 (dfs_accessible_p): Likewise.
4468 (dfs_access_in_type): Likewise.
4469 (access_in_type): Likewise.
4470 (compute_access): Remove, and replace with ...
4471 (accessible_p): New function.
4472 (vbase_types): Remove.
4473 (vbase_decl_ptr_intermediate): Likewise.
4474 (vbase_decl_ptr): Likewise.
4475 (vbase_init_result): Likewise.
4476 (closed_envelopes): Likewise.
4477 (bvtable): Likewise.
4479 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4481 * call.c (add_function_candidate): Check for proper number of args
4482 before checking the validity of those args.
4484 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
4486 * cp-tree.h (struct lang_type): Add anon_union field.
4487 (ANON_UNION_TYPE_P): Use it instead of examining type.
4488 (SET_ANON_UNION_TYPE_P): New macro.
4489 * decl.c (check_tag_decl): Use it.
4491 * search.c (compute_access): Handle non-type contexts earlier, and
4494 * tree.c (build_exception_variant): Use copy_to_permanent.
4496 * decl2.c (setup_initp): Give statics with no priority the default
4498 (do_dtors, do_ctors, finish_file): Remove special handling of
4499 non-prioritized statics.
4501 1999-03-05 Mark Mitchell <mark@markmitchell.com>
4503 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4504 * decl.c (make_typename_type): Don't issue an error if an
4505 immediate lookup fails; it migt be resolved later.
4506 * friend.c (is_friend): Add comment.
4507 * search.c (breadth_first_search): Add POSTFN and DATA
4508 parameters. Tidy. All callers changed.
4509 (lookup_field_queue_p): New function.
4510 (lookup_field_r): Likewise.
4511 (lookup_field_post): Likewise.
4512 (lookup_field): Use them, via breadth_first_search, instead of
4514 (compute_access): Robustify.
4515 (lookup_fnfield_info): New structure.
4517 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
4519 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4521 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
4523 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4526 * decl2.c (import_export_class): Also return if
4527 CLASSTYPE_INTERFACE_ONLY is set.
4529 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
4531 * decl.c (push_overloaded_decl): Only overwrite the old binding if
4533 * decl2.c (do_local_using_decl): Fix loop termination.
4535 1999-03-02 Mark Mitchell <mark@markmitchell.com>
4537 * cp-tree.h (determine_specialization): Don't declare.
4538 * pt.c (determine_specialization): Make it static. Eliminate
4539 complain parameter. Note that decl is always non-NULL now, and
4540 simplify accordingly.
4542 * decl.c (maybe_push_to_top_level): Always call
4543 push_cp_function_context.
4544 (pop_from_top_level): Always call pop_cp_function_context.
4546 1999-02-26 Nathan Sidwell <nathan@acm.org>
4548 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4550 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4551 * init.c (build_new_1): Extra arg to complete_type_or_else.
4552 (build_delete): Likewise.
4553 * typeck.c (require_complete_type): Likewise.
4554 (pointer_int_sum): Likewise.
4555 (pointer_diff): Likewise.
4556 (build_component_ref): Likewise.
4558 * typeck2.c (incomplete_type_error): Always use cp_error.
4559 Show declaration of undefined type, if appropriate.
4560 Deal with UNKNOWN_TYPE nodes.
4562 * typeck.c (require_complete_type): Use TYPE_SIZE as
4563 size_zero_node to mean incomplete type.
4564 (require_complete_type_in_void): New function.
4565 (build_compound_expr): Call complete_type_in_void for LHS.
4566 (build_c_cast): Call complete_type_in_void for void cast.
4567 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4568 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4569 require_complete_type_in_void. Call it.
4570 * cp-tree.h (require_complete_type_in_void): Prototype new function.
4572 * typeck.c (convert_arguments): Use alternative format for
4573 function decls. Don't require_complete_type here. Simplify
4574 diagnostic printing.
4575 (convert_for_initialization): Don't require_complete_type on RHS yet.
4576 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4578 * call.c (build_over_call): Cope with qualified void return type.
4579 * semantics.c (finish_call_expr): Likewise.
4580 * typeck.c (build_function_call_real): Likewise.
4581 (c_expand_return): Likewise.
4582 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4584 * call.c (print_z_candidates): Use alternate print format, to be
4585 consistent with (pt.c) print_candidates.
4586 * method.c (hack_identifier): List candidate members.
4587 * search.c (lookup_field): Build ambiguous list, and show it, if
4590 1999-02-26 Mark Mitchell <mark@markmitchell.com>
4592 * typeck.c (decay_conversion): Don't confuse constant array
4593 variables with their initializers.
4595 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4597 * pt.c (regenerate_decl_from_template): Tweak for clarity.
4598 (instantiate_decl): Mark a decl instantiated before regenerating
4599 it to avoid recursion.
4600 * tree.c (mapcar): Don't call decl_constant_value unless we know
4601 something is TREE_READONLY_DECL_P.
4603 * class.c (check_for_override): Don't stop checking when we find
4604 the first overridden function. Delete #if 0'd code.
4605 * search.c (get_matching_virtual): Likewise.
4607 1999-02-25 Richard Henderson <rth@cygnus.com>
4609 * lang-specs.h: Define __FAST_MATH__ when appropriate.
4611 1999-02-24 Mike Stump <mrs@wrs.com>
4613 * typeck.c (convert_for_assignment): Allow boolean integral constant
4614 expressions to convert to null pointer.
4616 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
4618 * decl.c (lookup_namespace_name): Resolve namespace aliases.
4620 * class.c (push_nested_class): Allow namespaces.
4622 * decl2.c (set_decl_namespace): Add friendp parameter.
4623 * decl.c (grokfndecl): Pass it.
4624 (grokvardecl): Likewise.
4625 * cp-tree.h: Change declaration.
4627 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
4629 * pt.c (tsubst): Allow an array of explicit size zero.
4631 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
4633 * errfn.c: Change varargs code to look like toplev.c.
4635 * method.c (process_modifiers): Don't prepend 'U' for char or
4638 1999-02-20 Craig Burley <craig@jcb-sc.com>
4640 * Make-lang.in (cplib2.ready): Don't consider updating
4641 cplib2 stuff if the current directory isn't writable, as
4642 it won't work (such as during a `make install').
4644 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
4646 * decl2.c (start_objects): Make file scope constructors and
4647 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4648 ASM_OUTPUT_DESTRUCTOR are defined.
4650 1999-02-19 Mark Mitchell <mark@markmitchell.com>
4652 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4653 (fn_type_unification): Adjust prototype.
4654 (lookup_fnfields_1): Declare.
4655 * call.c (add_template_candidate_real): Adjust call to
4656 fn_type_unification.
4657 * class.c (add_method): Don't allow duplicate declarations of
4658 constructors or destructors.
4659 (resolve_address_of_overloaded_function): Remove unused variable.
4660 Adjust call to fn_type_unification.
4661 * decl.c (grokfndecl): Be more robust in the face of illegal
4663 * decl2.c (check_classfn): Remove hokey handling of member
4665 * pt.c (determine_specialization): Improve comments. Adjust to
4666 handle template argument deduction as per the standard.
4667 (check_explicit_specialization): Fix comment spacing. Handle
4668 type-conversion operators correctly. Improve error-recovery.
4669 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4670 (get_bindings_real): Simplify handling of static members.
4671 * search.c (lookup_fnfields_1): Make it have external linkage.
4672 * typeck.c (compparms): Fix comment.
4673 (build_unary_op): Don't try to figure out which template
4674 specialization is being referred to when when the address-of
4675 operator is used with a template function.
4677 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4679 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4680 keyword to match an analogous change at the top level.
4682 * tree.c (lvalue_or_else): Likewise.
4684 1999-02-17 Mark Mitchell <mark@markmitchell.com>
4686 * decl.c (xref_basetypes): Comment.
4687 * pt.c (instantiate_class_template): Use xref_basetypes.
4689 1999-02-16 Mark Mitchell <mark@markmitchell.com>
4691 * cp-tree.h (tsubst): Change prototype.
4692 (tsubst_expr): Likewise.
4693 (tsubst_copy): Likewise.
4694 (type_unification): Remove prototype.
4695 * call.c (convert_default_arg): Adjust call to tsubst_expr.
4696 * class.c (resolve_address_of_overloaded_function): Just use
4697 fn_type_unification.
4698 * decl.c (grokdeclarator): Adjust call to tsubst.
4699 * method.c (build_template_parm_names): Likewise.
4700 * pt.c (GTB_VIA_VIRTUAL): New macro.
4701 (GTB_IGNORE_TYPE): Likewise.
4702 (resolve_overloaded_unification): Add `complain' parameter.
4703 (try_one_overload): Likewise.
4704 (tsubst_template_arg_vector): Likewise.
4705 (tsubst_template_parms): Likewise.
4706 (tsubst_aggr_type): Likewise.
4707 (tsubst_arg_types): Likewise.
4708 (tsubst_call_declarator_parms): Likewise.
4709 (unify): Remove explicit_mask.
4710 (type_unification_real): Likewise.
4711 (get_template_base_recursive): Likewise.
4712 (coerce_template_template_parms): Provide prototype.
4713 (tsubst_function_type): Likewise.
4714 (try_class_unification): New function.
4715 All callers changed to use new complain parameter.
4716 (get_template_base): Use try_class_unification.
4717 (unify): Adjust handling of classes derived from template types.
4718 (fn_type_unification): Substitute explicit arguments before
4721 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4723 * decl.c (pushdecl): Remove dead code.
4725 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
4727 * decl2.c (finish_objects): Fix code I missed in previous change.
4729 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
4731 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4732 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4734 * pt.c (maybe_process_partial_specialization): Complain about
4735 'template <>' on non-specialization.
4737 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
4739 * decl.c (grokdeclarator): Catch wierd declarators.
4740 * decl2.c (finish_file): Don't abort because of namespace parsing
4742 (check_decl_namespace): Remove.
4744 1999-02-09 Mark Mitchell <mark@markmitchell.com>
4746 * cp-tree.h (get_template_base): Don't declare.
4747 (dfs_walk): Declare.
4748 (dfs_unmark): Likewise.
4749 (markedp): Likewise.
4750 * pt.c (unify): Remove duplicate declaration. Pass tparms and
4751 targs to get_template_base.
4752 (get_template_base_recursive): Move here from search.c. Check to
4753 see that the base found can be instantiated to form the desired
4755 (get_template_base): Likewise.
4756 (get_class_bindings): Simplify.
4757 * search.c (get_template_base_recursive): Move to pt.c.
4758 (get_template_base): Likewise.
4759 (markedp): Make it global.
4760 (dfs_walk): Likewise.
4761 (dfs_unmark): Likewise.
4763 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
4765 * pt.c (maybe_process_partial_specialization): Complain about
4766 specialization in wrong namespace.
4767 * tree.c (decl_namespace_context): New fn.
4769 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4771 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4772 * pt.c (coerce_template_template_parms): Handle nested
4773 template template parameters.
4775 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
4777 * typeck2.c: Update email addresses.
4779 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4781 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4784 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
4786 * lex.c (retrofit_lang_decl): Split out...
4787 (build_lang_decl): From here.
4788 * decl.c (pushdecl): Call it for functions generated by the middle
4789 end that don't have DECL_LANG_SPECIFIC.
4790 * cp-tree.h: Declare it.
4792 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
4793 (start_objects, finish_objects): Only use special
4794 init_priority code if the user specified a priority.
4795 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4798 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
4800 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4801 mkstemp.o. Get them from libiberty now.
4802 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4804 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4806 * decl2.c (lang_decode_option): Use read_integral_parameter.
4808 1999-02-01 Mark Mitchell <mark@markmitchell.com>
4810 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4811 before calling complete_type_or_else.
4813 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4815 * input.c (inline): Don't define, its handled by system.h.
4817 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
4819 * decl2.c: Don't define flag_no_ident here. Don't process
4821 * cp-tree.h: Don't declare flag_no_ident here.
4822 * lang-specs.h: Map -Qn to -fno-ident.
4824 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
4826 * cp-tree.h (struct tree_binding): Replace scope field with a union.
4827 (BINDING_SCOPE): Adjust.
4828 * decl.c (BINDING_LEVEL): Adjust.
4830 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
4832 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4835 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4838 * tree.c (equal_functions): Fix name in prototype.
4840 * decl.c (push_local_binding): Add FLAGS argument.
4841 (pushdecl, push_overloaded_decl): Pass it.
4842 * decl2.c (do_local_using_decl): Likewise.
4843 * cp-tree.h: Adjust prototype.
4844 * decl.c (poplevel): Fix logic.
4846 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4847 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
4848 (cat_namespace_levels): Don't loop forever.
4850 1999-01-25 Richard Henderson <rth@cygnus.com>
4852 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4854 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
4856 * class.c (resolve_address_of_overloaded_function): Mark the
4857 chosen function used.
4859 * call.c (build_call): Make sure that a function coming in has
4860 been marked used already.
4861 * decl.c (expand_static_init): Call mark_used instead of
4863 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4864 alloc_eh_object, expand_throw): Likewise.
4865 * init.c (build_builtin_delete_call): Likewise.
4866 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4867 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4868 expand_generic_desc): Likewise.
4870 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4872 * tree.c (equal_functions): New function.
4873 (ovl_member): Call it.
4875 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4877 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4879 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
4881 * decl.c (decls_match): Return 1 if old and new are identical.
4882 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4884 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4886 * decl.c (start_function): Make member functions one_only on windows.
4887 * decl2.c (import_export_decl): Likewise.
4889 * decl.c (grokdeclarator): Don't complain about implicit int in
4890 a system header. Change same-name field check to not complain in
4891 a system header instead of within extern "C".
4893 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4895 * cp-tree.h (PUSH_GLOBAL): New macro.
4896 (PUSH_LOCAL): Likewise.
4897 (PUSH_USING): Likewise.
4898 (namespace_bindings_p): Declare.
4899 (push_overloaded_decl): Likewise.
4900 * decl.c (push_overloaded_decl): Don't make it static. Check for
4901 illegal declarations after using declarations here.
4902 (namespace_bindings_p): Likewise.
4903 (duplicate_decls): Don't consider declarations from different
4904 namespaces to be the same.
4905 (pushdecl): Use symbolic PUSH_ constants in calls to
4906 push_overloaded_decl.
4907 (push_overloaded_decl_1): Likewise.
4908 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4909 (do_nonmember_using_decl): Check for illegal using declarations
4910 after ordinary declarations here.
4911 (do_local_using_decl): Call pushdecl to insert declarations.
4913 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
4915 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4917 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4919 * tree.c (build_cplus_array_type_1): Don't call build_array_type
4920 for types involving template parameters.
4922 * cp-tree.h (PARM_DECL_EXPR): Delete.
4923 (convert_default_arg): Change prototype.
4924 (check_default_argument): Declare.
4925 (search_tree): Likewise.
4926 * call.c (convert_default_arg): Take the function to which the
4927 default argument belongs as a parameter, and do any necessary
4928 instantiation here, instead of ...
4929 (build_over_call): Here.
4930 * decl.c (local_variable_p): New function.
4931 (check_default_argument): Likewise, split out and tidied from ...
4933 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4934 * pt.c (tsubst_call_declarator_parms): New function.
4935 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
4936 with CALL_EXPRs, rather than trying to be clever.
4937 (tsubst): Use tsubst_call_declarator_parms.
4938 * tree.c (search_tree): Don't make it static.
4939 * typeck.c (convert_arguments): Use new interface to
4940 convert_default_arg.
4942 1999-01-20 Mark Mitchell <mark@markmitchell.com>
4944 * error.c (dump_function_decl): Don't print the argument types for
4945 a function when the verbosity level is negative.
4947 * call.c (build_over_call): Check format attributes at call-time.
4949 * pt.c (tsubst_copy): Fix comment.
4950 (unify): Don't allow unification with variable-sized arrays.
4952 * semantics.c (finish_stmt_expr): When processing a template make
4953 the BIND_EXPR long-lived.
4955 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
4957 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4958 (import_export_vtable): Not here.
4960 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4962 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4963 non-static member function.
4965 1999-01-18 Nathan Sidwell <nathan@acm.org>
4967 * class.c (instantiate_type): Only diagnose illegal address of member
4968 function if complaining.
4970 * decl.c (lookup_name_real): Remove duplicate code.
4972 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4974 * tree.c (copy_template_template_parm): Use permanent_obstack.
4976 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4978 * pt.c (unify): Remove restrictions on deduction of argument
4979 of template template parameters.
4981 1999-01-18 Nathan Sidwell <nathan@acm.org>
4983 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4985 * class.c (resolve_address_of_overloaded_function): Show list of
4986 all candidates, when none of them match.
4988 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
4990 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4991 definition of 'casting away const' in reinterpret_cast<>.
4993 1999-01-18 Graham <grahams@rcp.co.uk>
4995 * cvt.c: Add include for decl.h, remove extern for
4996 static_aggregates which is now provided by decl.h.
4998 * Makefile.in (cvt.o): Add dependency for decl.h and missing
4999 dependencies for convert.h and flags.h.
5001 1999-01-18 Nathan Sidwell <nathan@acm.org>
5003 * decl2.c (do_dtors): Set current location to that of the
5004 decl, for sensible diagnostics and debugging.
5005 (check_classfn): Issue `incomplete type' error, if
5006 class is not defined.
5008 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
5010 * cp-tree.h: Add prototype for bound_pmf_p.
5012 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
5013 Manfred Hollstein <manfred@s-direktnet.de>
5015 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5018 1999-01-16 Nathan Sidwell <nathan@acm.org>
5020 * cp-tree.h (struct lang_type): Added has_mutable flag.
5021 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5022 (TYPE_HAS_MUTABLE_P): New macro to read it.
5023 (cp_has_mutable_p): Prototype for new function.
5024 * class.c (finish_struct_1): Set has_mutable from members.
5025 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5026 it contains a mutable.
5027 * typeck.c (cp_has_mutable_p): New function.
5029 1999-01-15 Mark Mitchell <mark@markmitchell.com>
5031 * pt.c (process_template_parm): Ignore top-level qualifiers on
5032 non-type parameters.
5034 * decl.c (start_function): Use current_function_parms in the call
5035 to require_complete_type_for_parms, not the probably empty
5038 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
5040 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5042 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5043 that we don't suppress the other copies.
5044 * lex.c (handle_cp_pragma): Likewise.
5046 1999-01-13 Mark Mitchell <mark@markmitchell.com>
5048 * decl.c (grokdeclarator): Undo 1998-12-14 change.
5049 * tree.c (build_cplus_array_type_1): Likewise.
5050 * pt.c (instantiate_class_template): Remove misleading comment.
5051 (tsubst_aggr_type): Substitute if there are template parameters,
5052 regardless of whether or not they use template arguments.
5053 (unify): Likewise, but for unification.
5055 1999-01-12 Richard Henderson <rth@cygnus.com>
5057 * cp-tree.h (flag_permissive): Declare extern.
5059 1999-01-06 Mark Mitchell <mark@markmitchell.com>
5061 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5063 (lang_type): Add is_partial_instantiation. Decrease width of
5065 (PARTIAL_INSTANTIATION_P): New macro.
5066 (OPERATOR_TYPENAME_P): Remove.
5067 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5068 OPERATOR_TYPENAME_P.
5069 (grok_op_properties): Likewise.
5070 * friend.c (do_friend): Handle friends that are member functions
5072 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5073 * pt.c (instantiate_class_template): Rework for clarity. Avoid
5074 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
5075 any more partial instantiation than is absolutely necessary for
5076 implicit typename. Set PARTIAL_INSTANTIATION_P.
5077 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5078 * semantics.c (begin_class_definition): Handle partial
5079 specializations of a type that was previously partially
5082 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
5084 * g++spec.c (LIBSTDCXX): Provide default definition.
5085 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5087 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5089 * Make-lang.in (g++.o): Depend on prefix.h.
5091 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
5093 * tree.c (bound_pmf_p): New fn.
5094 * typeck.c (build_c_cast): Use it.
5096 * decl.c (grok_op_properties): Use same_type_p.
5098 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5100 * Makefile.in (cvt.o): Depend on toplev.h.
5102 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5104 * cvt.c: Include toplev.h.
5106 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5109 * init.c (expand_vec_init): Initialize variable `itype'.
5111 * lex.c (yyerror): Cast the argument passed to a ctype function to
5114 * method.c (build_mangled_C9x_name): Wrap prototype and definition
5115 in "HOST_BITS_PER_WIDE_INT >= 64".
5117 * typeck.c (build_binary_op): Mark parameter `convert_p' with
5120 1998-12-22 Mark Mitchell <mark@markmitchell.com>
5122 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5123 * tree.c (build_exception_variant): Don't crash on empty throw
5126 1998-12-18 DJ Delorie <dj@cygnus.com>
5128 * cvt.c (convert_to_reference): Check for both error_mark_node
5129 and NULL_NODE after call to convert_for_initialization.
5131 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
5133 * error.c (interesting_scope_p): New fn.
5134 (dump_simple_decl): Use it.
5135 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5136 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5138 1998-12-16 Mark Mitchell <mark@markmitchell.com>
5140 * class.c (resolve_address_of_overloaded_function): Do conversion
5141 to correct type here, rather than ...
5142 (instantiate_type): Here.
5144 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5145 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5146 (decl_template_parm_p): Remove.
5147 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5149 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5150 * pt.c (push_inline_template_parms_recursive): Set it.
5151 (decl_template_parm_p): Remove.
5152 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5153 (process_template_parm): Set it.
5155 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
5157 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5158 if configured with cpplib.
5160 1998-12-15 Mark Mitchell <mark@markmitchell.com>
5162 * decl.c (poplevel): Make sure ns_binding is initialized.
5164 * decl.c (finish_function): Undo inadvertent change in previous
5167 1998-12-14 Mark Mitchell <mark@markmitchell.com>
5169 * class.c (pushclass): Tweak handling of class-level bindings.
5170 (resolve_address_of_overloaded_function): Update pointer-to-member
5172 (instantiate_type): Likewise.
5173 * cvt.c (cp_convert_to_pointer): Likewise.
5174 * decl.c (pop_binding): Take the DECL to pop, not just the name.
5175 Deal with `struct stat' hack.
5176 (binding_level): Add to documentation.
5177 (push_binding): Clear BINDING_TYPE.
5178 (add_binding): New function.
5179 (push_local_binding): Use it.
5180 (push_class_binding): Likewise.
5181 (poplevel): Adjust calls to pop_binding.
5182 (poplevel_class): Likewise.
5183 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5184 declarations to current binding level.
5185 (push_class_level_binding): Likewise.
5186 (push_overloaded_decl): Adjust handling of OVERLOADs in local
5188 (lookup_namespace_name): Don't crash when confronted with a
5190 (lookup_name_real): Do `struct stat' hack in local binding
5192 (build_ptrmemfunc_type): Adjust documentation.
5193 (grokdeclarator): Don't avoid building real array types when
5194 processing templates unless really necessary.
5195 (finish_method): Adjust calls to pop_binding.
5196 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5197 not reparse_decl_as_expr.
5198 (build_expr_from_tree): Deal with a template-id as the function to
5199 call in a METHOD_CALL_EXPR.
5200 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5201 (maybe_adjust_types_For_deduction): Don't do peculiar things with
5203 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
5204 pointer-to-member types where necessary.
5205 * tree.c (build_cplus_array_type_1): Don't avoid building real
5206 array types when processing templates unless really necessary.
5207 (build_exception_variant): Compare the exception lists correctly.
5209 1998-12-13 Mark Mitchell <mark@markmitchell.com>
5211 * cp-tree.def (CPLUS_BINDING): Update documentation.
5212 * cp-tree.h (LOCAL_BINDING_P): New macro.
5213 (lang_identifier): Rename local_value to bindings.
5214 (tree_binding): Make `scope' of type `void*', not `tree'.
5215 (BINDING_SCOPE): Update documentation.
5216 (IDENTIFIER_LOCAL_VALUE): Remove.
5217 (IDENTIFIER_CLASS_VALUE): Document.
5218 (IDENTIFIER_BINDING): New macro.
5219 (IDENTIFIER_VALUE): Likewise.
5220 (TIME_IDENTIFIER_TIME): Likewise.
5221 (TIME_IDENTIFIER_FILEINFO): Likewise.
5222 (IMPLICIT_TYPENAME_P): Likewise.
5223 (set_identifier_local_value): Remove.
5224 (push_local_binding): New function.
5225 (push_class_binding): Likewise.
5226 * class.c (pushclass): Update comments; use push_class_binding.
5227 * decl.c (set_identifier_local_value_with_scope): Remove.
5228 (set_identifier_local_value): Likewise.
5229 (push_binding): New function.
5230 (pop_binding): Likewise.
5231 (binding_level): Update documentation. Remove shadowed.
5232 (BINDING_LEVEL): New macro.
5233 (free_binding_nodes): New variable.
5234 (poplevel): Adjust for new name-lookup scheme. Don't mess up
5235 BLOCK_VARs when doing for-scope extension. Remove effectively
5237 (pushlevel_class): Tweak formatting.
5238 (poplevel_class): Adjust for new name-lookup scheme.
5239 (print_binding_level): Likewise.
5240 (store_bindings): Likewise.
5241 (pushdecl): Likewise.
5242 (pushdecl_class_level): Likewise.
5243 (push_class_level_binding): Likewise.
5244 (push_overloaded_decl): Update comments. Adjust for new
5246 (lookup_name_real): Likewise.
5247 (lookup_name_current_level): Likewise.
5248 (cp_finish_decl): Likewise.
5249 (require_complete_types_for_parms): Likewise. Remove misleading
5251 (grok_parms): Likewise. Don't call
5252 require_complete_types_for_parms here.
5253 (grok_ctor_properties): Don't treat templates as copy
5255 (grop_op_properties): Or as assignment operators.
5256 (start_function): Document. Adjust for new name-lookup scheme.
5257 (finish_function): Likewise.
5258 * decl2.c (do_local_using_decl): Use push_local_binding.
5259 * lex.c (begin_definition_of_inclass_inline): New function, split
5261 (do_pending_inlines): Here, and ...
5262 (process_next_inline): Here.
5263 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5264 (init_filename_times): Likewise.
5265 (extract_interface_info): Likewise.
5266 (ste_typedecl_interface_info): Likewise.
5267 (check_newline): Likewise.
5268 (dump_time_statistics): Likewise.
5269 (handle_cp_pragma): Likewise.
5270 (do_identifier): Adjust for new name-lookup scheme.
5271 * parse.y (function_try_block): Return ctor_initializer_opt value.
5273 (fn.defpen): Pass appropriate values to start_function.
5274 (pending_inline): Use functor_try_block value, and pass
5275 appropriate values to finish_function.
5276 * pt.c (is_member_template): Update documentation; remove handling
5277 of FUNCTION_DECLs. As per name, this function should deal only in
5279 (decl_template_parm_p): Change name of olddecl parameter to decl.
5280 (check_template_shadow): Adjust for new name-lookup scheme.
5281 (lookup_template_class): Likewise.
5282 (tsubst_decl): Tweak so as not to confuse member templates with
5283 copy constructors and assignment operators.
5284 (unify): Handle UNION_TYPEs.
5285 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5286 (lang_print_xnode): Adjust for new name-lookup scheme.
5287 * typeck.c (mark_addressable): Likewise.
5288 (c_expand_return): Likewise.
5290 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
5292 * decl.c (grokdeclarator): Allow field with same name as class
5295 * decl.c (lookup_name_real): Don't limit field lookup to types.
5296 * class.c (check_member_decl_is_same_in_complete_scope): No error
5297 if icv and x are the same.
5298 * lex.c (do_identifier): Tweak error message.
5300 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5302 * decl.c (start_enum): Use push_obstacks, not
5303 end_temporary_allocation.
5304 (finish_enum): Call pop_obstacks.
5306 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5308 * class.c (instantiate_type): Return error_mark_node rather than
5311 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5313 * cp-tree.h (most_specialized_instantiation): New function.
5314 (print_candidates): Likewise.
5315 * class.c (validate_lhs): Remove.
5316 (resolve_address_of_overloaded_function): New function, split out
5317 and then substantially reworked, from ...
5318 (instantiate_type): Use it. Simplify.
5319 * cvt.c (convert_to_reference): Complain when caller has indicated
5320 that's the right thing to do. Don't crash if instantiate_type
5322 * pt.c: Substitute `parameters' for `paramters' throughout.
5323 (print_candidates): Don't make it static.
5324 (most_specialized_instantiation): Split out from ...
5325 (most_specialized): Here.
5327 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
5329 * lex.c (lang_init_options): Initialize cpplib.
5330 * decl2.c (parse_options,cpp_initialized): Removed.
5331 (lang_decode_option): Move initialization of cpplib to
5334 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5336 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5337 well as the TYPE_DECL, when a typedef name is assigned to a
5338 previously anonymous type.
5340 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
5342 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5343 __cp_eh_info for getting the eh info pointer. Add table_index to
5345 (push_eh_cleanup): Don't increment 'handlers' data field.
5346 (process_start_catch_block): Don't set the 'caught' field.
5348 * cp/exception.cc (CP_EH_INFO): New macro for getting the
5349 exception info pointer within library routines.
5350 (__cp_eh_info): Use CP_EH_INFO.
5351 (__start_cp_handler): Get exception info pointer, set caught field,
5352 and increment the handlers field. Avoids this being done by handlers.
5353 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5354 (uncaught_exception): Use CP_EH_INFO macro.
5356 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
5358 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5360 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
5362 * lex.c (check_newline): Add support for \ as `natural'
5363 characters in file names in #line to be consistent with #include
5364 handling. We support escape processing in the # 1 "..." version of
5365 the command. See also support in cp/lex.c.
5367 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
5369 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5372 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
5374 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5376 * error.c (dump_simple_decl): Also print namespace context.
5377 (dump_function_decl): Likewise.
5379 * decl2.c (ambiguous_decl): Don't print old value if it's
5382 * decl.c (lookup_name_real): Fix handling of local types shadowed
5383 by a non-type decl. Remove obsolete code.
5384 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5386 * lang-options.h: Add -fpermissive.
5387 * decl2.c: Likewise.
5388 * cp-tree.h: Add flag_permissive.
5389 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5390 were specified, set flag_pedantic_errors.
5391 * call.c (build_over_call): Turn dropped qualifier messages
5393 * cvt.c (convert_to_reference): Likewise.
5394 * typeck.c (convert_for_assignment): Likewise.
5396 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
5398 * decl2.c (coerce_new_type): Use same_type_p.
5399 (coerce_delete_type): Likewise.
5401 * call.c (check_dtor_name): Return 1, not error_mark_node.
5403 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
5405 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5406 if MULTIPLE_SYMBOL_SPACES.
5408 * pt.c (check_template_shadow): New fn.
5409 * decl2.c (grokfield): Use it.
5410 * decl.c (pushdecl): Likewise.
5411 (pushdecl_class_level): Likewise.
5412 (start_method): Likewise.
5413 (xref_tag): Don't try to use 't' if we're defining.
5415 * call.c (check_dtor_name): Just return an error_mark_node.
5416 * pt.c (lookup_template_class): Complain about using non-template here.
5417 * parse.y (apparent_template_type): Not here.
5419 * pt.c (check_explicit_specialization): Complain about specialization
5422 * lang-options.h: Add -f{no-,}implicit-inline-templates.
5424 * pt.c (convert_nontype_argument): Don't assume that any integer
5425 argument is intended to be a constant-expression.
5427 1998-12-03 Mark Mitchell <mark@markmitchell.com>
5429 * class.c (handle_using_decl): Fix comment. Don't lookup
5430 constructors in base classes.
5431 (validate_lhs): Fix typo in comment.
5432 * search.c (lookup_field_1): Don't return a USING_DECL.
5434 * cp-tree.h (DECL_ACCESS): Improve documentation.
5436 * decl.c (expand_static_init): Don't set the initialization-done
5437 flag until the initialization is done.
5439 1998-12-02 Mark Mitchell <mark@markmitchell.com>
5441 * decl2.c (validate_nonmember_using_decl): Complain about using
5442 declarations for class members.
5444 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
5446 * typeck2.c (process_init_constructor): Use same_type_p.
5448 * decl.c (check_tag_decl): Don't warn about null decl inside a
5451 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5453 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5454 (resolve_overloaded_unification): Strip baselinks.
5456 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5458 * g++spec.c: Don't prototype xmalloc.
5460 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
5462 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5464 * decl.c (check_tag_decl): Do complain about null friend decl at
5467 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5469 * lex.c (make_lang_type): Clear the whole struct lang_type, not
5470 only the first multiple of sizeof (int).
5472 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5474 * decl.c (start_decl): An explicit specialization of a static data
5475 member is only a definition if it has an initializer.
5477 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5478 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5480 * init.c (expand_default_init): Check for DIRECT_BIND instead of
5483 * call.c (build_over_call): Use build_decl.
5485 * except.c (expand_throw): Just use convert, not
5486 build_reinterpret_cast.
5488 * lex.c (handle_generic_pragma): Use token_buffer.
5490 * decl.c (check_tag_decl): Don't complain about null friend decl.
5492 1998-11-24 Dave Pitts <dpitts@cozx.com>
5494 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5496 * lex.c (check_newline): Use ISALPHA.
5497 (readescape): Use ISGRAPH.
5498 (yyerror): Use ISGRAPH.
5500 1998-11-24 Nathan Sidwell <nathan@acm.org>
5502 * search.c (get_abstract_virtuals): Do not use initial
5503 CLASSTYPE_ABSTRACT_VIRTUALS.
5504 * typeck2.c (abstract_virtuals_error): Show location of abstract
5506 * call.c (build_new_method_call): Use
5507 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5508 * class.c (finish_struct_bits): Don't bother working out whether
5509 get_abstract_virtuals will do anything, just do it.
5511 1998-11-24 Graham <grahams@rcp.co.uk>
5513 * typeck.c (build_component_ref): Remove unused statement.
5515 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5517 * class.c (add_method): Catch invalid overloads.
5519 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5520 * search.c (lookup_conversions): Handle getting real OVERLOADs.
5521 (add_conversions): Likewise. Revert last change.
5522 * call.c (add_conv_candidate): Pass totype to add_candidate instead
5523 of fn. Don't add a new candidate if the last one was for the same
5525 (print_z_candidates): Handle getting a type as a function.
5526 (joust): If we got two conversion candidates to the same type,
5528 (build_object_call): Lose 'templates'.
5529 (build_user_type_conversion_1): Handle getting real OVERLOADs.
5531 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5533 * typeck2.c (process_init_constructor): If there are elements
5534 that don't have initializers and they need to have constructors
5535 run, supply them with initializers.
5537 * class.c (finish_struct_1): A class with a 0-width bitfield is
5540 1998-11-23 Mark Mitchell <mark@markmitchell.com>
5542 * pt.c (instantiate_class_template): Don't try to figure out what
5543 specialization to use for a partial instantiation. Correct
5544 typos in a couple of comments. Avoid calling uses_template_parms
5547 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
5549 * method.c (process_overload_item): Add call to
5550 build_mangled_C9x_name for intTI_type_nodes.
5551 (build_mangled_C9x_name): Add prototype, define.
5552 * decl.c (init_decl_processing): Add names for
5555 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5557 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5559 * class.c (finish_struct_1): Set things up for 0-width bitfields
5560 like we do for others.
5562 * decl.c (check_tag_decl): New fn.
5563 (shadow_tag): Split out from here.
5564 * decl2.c (grok_x_components): Call it.
5566 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
5568 * decl.c: Lose warn_about_return_type.
5569 (grokdeclarator): Always complain about implicit int, except for
5572 * decl.c (tag_name): New fn.
5573 (xref_tag): Complain about using typedef-name after class-key.
5575 * init.c (expand_vec_init): Also keep going if from_array.
5577 * tree.c (is_overloaded_fn): Also handle the output of
5580 * decl.c (grokdeclarator): Use constructor_name when comparing
5581 field name against enclosing class.
5582 * class.c (finish_struct_anon): Likewise.
5584 1998-11-22 Mark Mitchell <mark@markmitchell.com>
5586 * decl.c (poplevel): Remove code to handle KEEP == 2.
5587 (finish_function): Don't confuse BLOCK-order when
5588 processing a destructor.
5590 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5592 * decl.c (require_complete_types_for_parms): Call layout_decl
5593 after we've completed the type.
5595 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
5597 * decl2.c (validate_nonmember_using_decl): Allow using templates
5598 from the global namespace.
5600 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5602 Handle specifying template args to member function templates.
5603 * tree.c (build_overload): Always create an OVERLOAD for a template.
5604 * search.c (add_conversions): Handle finding an OVERLOAD.
5605 * decl2.c (check_classfn): Likewise.
5606 * lex.c (identifier_type): See through a baselink.
5607 * parse.y (do_id): Don't call do_identifier if we got a baselink.
5608 * class.c (instantiate_type, case TREE_LIST): Recurse.
5610 * decl.c (grokdeclarator): Allow a boolean constant for array
5611 bounds, odd as that sounds.
5613 * pt.c (unify): Be more strict about non-type parms, except for
5615 (UNIFY_ALLOW_INTEGER): New macro.
5617 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
5619 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5621 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
5623 * semantics.c (begin_class_definition): Call
5624 maybe_process_partial_specialization before push_template_decl.
5625 Don't call push_template_decl for a specialization.
5626 * search.c (lookup_field): Do return a member template class.
5627 * decl2.c (handle_class_head): Handle member template classes.
5629 * decl.c (grokdeclarator): A parm type need not be complete.
5631 * pt.c (convert_nontype_argument): Fix thinko.
5633 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5635 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5636 (global_delete_fndecl): New variable.
5637 * decl.c (global_delete_fndecl): Define it.
5638 (init_decl_processing): Set it.
5639 * init.c (build_builtin_delete_call): Use it.
5640 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5643 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5645 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5648 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5649 * call.c (build_object_call): Also support references to functions.
5650 * typeck.c (convert_for_initialization): Don't decay a function
5651 if the target is a reference to function.
5653 * search.c (add_conversions): Get all the overloads from a class.
5655 * decl.c (grok_ctor_properties): Complain about any constructor
5656 that will take a single arg of the class type by value.
5658 * typeck2.c (build_functional_cast): Can't create objects of
5659 abstract classes this way.
5660 * cvt.c (ocp_convert): Likewise.
5662 * decl.c (grokfndecl): Member functions of local classes are not
5665 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5667 * Make-lang.in (cc1plus): Add dependency on hash.o.
5669 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5671 * search.c (get_abstract_virtuals): Complain about virtuals with
5673 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5674 with no final overrider.
5675 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5676 on virtuals with no final overrider.
5678 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5680 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5683 * friend.c (do_friend): Don't set_mangled_name_for_decl.
5685 * class.c (finish_struct_anon): Complain about non-fields.
5686 * decl2.c (build_anon_union_vars): Likewise.
5688 * decl.c (grokdeclarator): Normal data members can't have the same
5689 name as the class, either.
5690 * class.c (finish_struct_anon): Neither can members of an
5693 1998-11-17 Mark Mitchell <mark@markmitchell.com>
5695 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5696 (TYPE_BINFO): Likewise.
5697 (IS_AGGR_TYPE): Tweak.
5698 (SET_IS_AGGR_TYPE): New macro.
5699 (CLASS_TYPE_P): Tweak.
5700 (lang_type): Group mark bitfields together. Remove linenum.
5701 (CLASSTYPE_SOURCE_LINE): Remove macro.
5702 (CLASSTYPE_MARKED_N): New macro.
5703 (SET_CLASSTYPE_MARKED_N): Likewise.
5704 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5705 (CLASS_TYPE_MARKED_*): Use them.
5706 (SET_CLASSTYPE_MARKED_*): Likewise.
5707 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5708 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5709 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5710 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5711 * class.c (class_cache_obstack): New variable.
5712 (class_cache_firstobj): Likewise.
5713 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5714 (pushclass): Free the cache, when appropriate.
5716 (maybe_push_cache_obstack): Use class_cache_obstack.
5717 * decl.c (include hash.h).
5718 (typename_hash): New function.
5719 (typename_compare): Likewise.
5720 (build_typename_type): Check the hash table to avoid creating
5722 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5723 (grokdeclarator): Use CLASS_TYPE_P.
5724 (xref_basetypes): Likewise.
5725 (start_function): Likewise. Don't put current_class_ref on the
5727 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5729 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5730 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5731 fields for types other than class types. Do clear TYPE_ALIAS_SET
5732 for types other than class types, though.
5733 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5734 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5735 * pt.c (process_template_parm): Don't set
5736 CLASSTYPE_GOT_SEMICOLON.
5737 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5738 Coerce arguments on the momentary obstack.
5739 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5740 (instantiate_class_template): Calculate template arguments on the
5741 momentary obstack. Tidy.
5742 (tsubst_template_arg_vector): Use make_temp_vec.
5743 (tsubst_aggr_type): Put template arguments on the momentary
5745 (tsubst_decl): Likewise.
5746 (tsubst): Copy the array bounds index to the permanent obstack
5747 before building index types. Use new macros.
5748 (unify): Use new macros.
5749 (do_type_instantiation): Likewise.
5750 * search.c (lookup_fnfields_1): Use new macros.
5751 (dfs_pushdecls): Build envelopes on the cache obstack.
5752 (dfs_compress_decls): Use new macros.
5753 (push_class_decls): Build on the cache obstack.
5754 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5755 * sign.c (build_signature_pointer_or_reference_type): Use
5757 * tree.c (make_binfo): Check CLASS_TYPE_P.
5758 (copy_template_template_parm): Adjust.
5759 (make_temp_vec): Use push_expression_obstack.
5760 * typeck.c (complete_type): Use new macros.
5761 (comptypes): Likewise.
5763 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
5765 * pt.c (tsubst): Add diagnostics for invalid array, reference
5766 and pointer to member types.
5768 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5770 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5772 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5775 * parse.y (structsp): Fix cut-and-paste error.
5777 * init.c (build_new): Complain about non-integral size.
5779 * parse.y (unary_expr): Complain about defining types in sizeof.
5781 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5783 * rtti.c (build_x_typeid): Complain about typeid without
5784 including <typeinfo>.
5785 (get_typeid): Likewise. Complain about typeid of incomplete type.
5786 (get_tinfo_fn_dynamic): Likewise.
5787 (get_typeid_1): Not static anymore.
5788 * except.c (build_eh_type_type): Use get_typeid_1.
5790 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5791 ambiguous or private bases. Fix warning for reference cast.
5793 1998-11-16 Mark Mitchell <mark@markmitchell.com>
5795 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5796 * decl.c (duplicate_decls): Remove special-case code to deal with
5797 template friends, and just do the obvious thing.
5798 * pt.c (register_specialization): Tweak for clarity, and also to
5799 clear DECL_INITIAL for an instantiation before it is merged with a
5801 (check_explicit_specialization): Fix indentation.
5802 (tsubst_friend_function): Handle both definitions in friend
5803 declaration and outside friend declarations.
5804 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5805 (regenerate_decl_from_template): Tweak accordingly.
5806 (instantiate_decl): Likewise.
5808 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5810 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5811 member function reference to error.
5812 * cvt.c (ocp_convert): Complain about converting an overloaded
5815 * init.c (build_offset_ref): Just return a lone static member
5818 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5821 * typeck.c (build_binary_op_nodefault): Improve error handling.
5823 * decl.c (grokfndecl): Complain about making 'main' a template.
5825 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5827 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5828 TYPE_DECL in a template.
5830 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
5832 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5834 * decl.c (struct cp_function): Add named_label_uses.
5835 (push_cp_function_context): Save it.
5836 (pop_cp_function_context): Restore it.
5837 (define_label): Also complain about jumping into the scope of
5838 non-POD objects that don't have constructors.
5839 * tree.c (pod_type_p): New fn.
5841 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5842 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5843 (get_tinfo_fn): Not here.
5844 * repo.c (repo_get_id): Abort if we get called for an incomplete
5847 1998-11-13 Mark Mitchell <mark@markmitchell.com>
5849 * except.c (expand_throw): Make sure first argument to
5850 __cp_push_exception is of type `void*' to avoid spurious error
5853 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
5855 * pt.c (try_one_overload): Take orig_targs again. Only check for
5856 mismatches against them; we don't care what a previous call found.
5857 (resolve_overloaded_unification): Adjust.
5859 * search.c (lookup_field): Don't return anything for a non-type
5860 field from a dependent type.
5861 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5862 in an array declarator.
5863 (start_decl): Push into the class before looking for the field.
5865 1998-11-08 Mark Mitchell <mark@markmitchell.com>
5867 * method.c (build_overload_value): Handle REFERENCE_TYPE.
5869 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5871 * decl.c (grokdeclarator): Allow namespace-scoped members if they
5874 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
5876 * pt.c (tsubst_decl): Don't mess with the global value of an
5877 un-mangled DECL_ASSEMBLER_NAME.
5879 1998-11-03 Christopher Faylor <cgf@cygnus.com>
5881 * decl.c (init_decl_processing): Remove CYGWIN conditional
5882 since CYGWIN is now able to deal with trapping signals.
5884 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5886 * cp-tree.h: Don't include gansidecl.h.
5887 * exception.cc: Include gansidecl.h (since we don't include config.h)
5888 * g++spec.c: Don't include gansidecl.h.
5890 1998-11-06 Mark Mitchell <mark@markmitchell.com>
5892 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
5894 (DECL_DEFINED_IN_CLASS_P): New macro.
5895 (TEMPLATE_PARMS_FOR_INLINE): Document.
5896 (check_static_variable_definition): New function.
5897 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5899 (check_static_variable_definition): Split out from ...
5900 (grokdeclarator): Here.
5901 * pt.c (check_default_tmpl_args): New function, split out from ...
5902 (push_template_decl_real): Here.
5903 (instantiate_template): Fix comment.
5905 1998-11-04 Mark Mitchell <mark@markmitchell.com>
5907 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5908 (CP_TYPE_VOLATILE_P): Likewise.
5909 (CP_TYPE_RESTRICT_P): Likewise.
5911 1998-11-03 Mark Mitchell <mark@markmitchell.com>
5913 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5915 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
5917 * class.c (instantiate_type): Be more helpful.
5919 * decl2.c (import_export_decl): Call import_export_class.
5921 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5922 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5923 * pt.c (tsubst_copy): Likewise.
5925 1998-11-02 Mark Mitchell <mark@markmitchell.com>
5927 * init.c (expand_vec_init): Fix off-by-one error.
5929 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
5931 * parse.y (apparent_template_type): New type.
5932 (named_complex_class_head_sans_basetype): Use it.
5933 * Makefile.in (CONFLICTS): One new conflict.
5934 * parse.c: Regenerated.
5936 1998-11-01 Mark Mitchell <mark@markmitchell.com>
5938 * cp-tree.h (COMPARE_STRICT): New macro.
5939 (COMPARE_BASE): Likewise.
5940 (COMPARE_RELAXED): Likewise.
5941 (COMPARE_REDECLARATION): Likewise.
5942 (same_type_p): Likewise.
5943 (same_or_base_type_p): Likewise.
5944 * call.c (standard_conversion): Use them, in place of comptypes
5945 with numeric arguments.
5946 (reference_binding): Likewise.
5947 (convert_like): Likewise.
5948 (build_over_call): Likewise.
5949 (is_subseq): Likewise.
5950 (is_properly_derived_from): Likewise.
5951 (compare_ics): Likewise.
5953 * class.c (delete_duplicate_fields_1): Likewise.
5954 (resolves_to_fixed_type_p): Likewise.
5955 (instantiate_type): Likewise. Remove #if 0'd code.
5956 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
5957 (pushdecl): Likewise.
5958 (lookup_name_real): Likewise.
5959 (grokdeclarator): Likewise. Check for illegal array declarations.
5960 (grokparms): Likewise.
5961 (grok_op_properties): Likewise.
5962 * decl2.c (check_classfn): Likewise.
5963 * friend.c (is_friend): Likewise.
5964 (make_friend_class): Likewise.
5965 * init.c (expand_aggr_init): Likewise.
5966 (expand_vec_init): Likewise.
5967 * pt.c (is_member_template_class): Remove declaration.
5968 (is_specialization_of): Use COMPARE_* and new macros.
5969 (comp_template_parms): Likewise.
5970 (convert_nontype_argument): Likewise.
5971 (coerce_template_template_parms): Likewise.
5972 (template_args_equal): Likewise.
5973 (lookup_template_class): Likewise.
5974 (type_unification_real): Likewise.
5976 (get_bindings_real): Likewise.
5977 * search.c (covariant_return_p): Likewise.
5978 (get_matching_virtual): Likewise.
5979 * sig.c (match_method_types): Likewise.
5980 * tree.c (vec_binfo_member): Likewise.
5981 (cp_tree_equal): Likewise.
5982 * typeck.c (common_type): Likewise.
5983 (comp_array_types): Likewise. Get issues involving unknown array
5985 (comptypes): Update comments. Use new flags.
5986 (comp_target_types): Use new macros.
5987 (compparms): Likewise.
5988 (comp_target_parms): Likewise.
5989 (string_conv_p): Likewise.
5990 (build_component_ref): Likewise.
5991 (build_indirect_ref): Likewise.
5992 (build_conditional_expr): Likewise.
5993 (build_static_cast): Likewise.
5994 (build_reinterpret_cast): Likewise.
5995 (build_const_cast): Likewise.
5996 (build_modify_expr): Likewise.
5997 (convert_for_assignment): Likewise.
5998 (comp_ptr_ttypes_real): Likewise.
5999 (ptr_reasonably_similar): Likewise.
6000 (comp_ptr_ttypes_const): Likewise.
6002 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
6004 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6006 1998-10-30 Mark Mitchell <mark@markmitchell.com>
6008 * decl2.c (delete_sanity): Pass integer_zero_node, not
6009 integer_two_node, to build_vec_delete.
6010 * init.c (build_array_eh_cleanup): Remove.
6011 (expand_vec_init_try_block): New function.
6012 (expand_vec_init_catch_clause): Likewise.
6013 (build_vec_delete_1): Don't deal with case that auto_delete_vec
6014 might be integer_two_node anymore.
6015 (expand_vec_init): Rework for initialization-correctness and
6016 exception-correctness.
6017 * typeck2.c (process_init_constructor): Make mutual exclusivity
6018 of cases more obvious.
6020 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
6022 * decl.c (lookup_name_real): OK, only warn if not lexing.
6023 Simplify suggested fix.
6025 * cp-tree.h (IDENTIFIER_MARKED): New macro.
6026 * search.c (lookup_conversions): Use breadth_first_search.
6027 (add_conversions): Avoid adding two conversions to the same type.
6028 (breadth_first_search): Work with base binfos, rather
6029 than binfos and base indices.
6030 (get_virtual_destructor): Adjust.
6031 (tree_has_any_destructor_p): Adjust.
6032 (get_matching_virtual): Adjust.
6034 * pt.c (push_template_decl_real): Generalize check for incorrect
6035 number of template parms.
6036 (is_member_template_class): #if 0.
6038 1998-10-29 Richard Henderson <rth@cygnus.com>
6040 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6043 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
6045 * lex.c: Call check_newline from lang_init always. After
6046 calling cpp_start_read, set yy_cur and yy_lim to read from the
6047 cpplib token buffer.
6049 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
6051 * class.c (instantiate_type): Don't consider templates for a normal
6054 * class.c (finish_struct_1): Don't complain about non-copy
6055 assignment ops in union members.
6057 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6058 (prepare_fresh_vtable): Likewise.
6059 (finish_struct_1): Don't call import_export_class.
6060 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6061 (finish_prevtable_vardecl): Lose.
6062 (finish_file): Don't call it.
6063 * pt.c (instantiate_class_template): Likewise.
6064 * cp-tree.h: Remove it.
6066 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6067 * decl.c (finish_function): Not here.
6068 (start_function): Do set DECL_INITIAL.
6070 * pt.c (push_template_decl_real): Complain about default template
6071 args for enclosing classes.
6073 * call.c (add_function_candidate): Treat conversion functions
6074 as coming from the argument's class.
6075 * cp-tree.h (DECL_CONV_FN_P): New fn.
6076 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6077 * class.c (add_method): Use DECL_CONV_FN_P.
6078 * decl2.c (check_classfn): Likewise.
6079 * error.c (dump_function_name): Likewise.
6080 (dump_function_decl): Likewise.
6081 * pt.c (fn_type_unification): Likewise.
6082 * search.c (add_conversions): Likewise.
6084 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6086 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6087 * method.c (hack_identifier): Also check for using RESULT_DECL
6090 1998-10-27 Mark Mitchell <mark@markmitchell.com>
6092 * decl.c (grokdeclarator): Use type_quals, rather than constp,
6095 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6097 * call.c (standard_conversion): instantiate_type here.
6098 (reference_binding): And here.
6099 (implicit_conversion): Not here.
6100 (build_op_delete_call): No need to cons up an OVERLOAD.
6101 * cvt.c (cp_convert_to_pointer): instantiate_type here.
6102 (convert_to_reference): And here.
6103 * decl.c (grok_reference_init): Not here.
6104 (grokparms): Or here.
6105 * typeck2.c (digest_init): Or here.
6106 * typeck.c (decay_conversion): Take the address of overloaded
6108 (require_instantiated_type): Lose.
6109 (convert_arguments): Don't handle unknown types here.
6110 (build_c_cast): Likewise.
6111 (build_binary_op): Gut.
6112 (build_conditional_expr): Don't require_instantiated_type.
6113 (build_modify_expr): Likewise.
6114 (build_static_cast): Don't instantiate_type.
6115 (build_reinterpret_cast): Likewise.
6116 (build_const_cast): Likewise.
6117 (convert_for_initialization): Likewise.
6118 (build_ptrmemfunc): Use type_unknown_p.
6119 (convert_for_assignment): Also do default_conversion on overloaded
6120 functions. Hand them off to ocp_convert.
6122 1998-10-26 Mark Mitchell <mark@markmitchell.com>
6124 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6125 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
6127 * class.c (finish_struct_1): Use build_cplus_array_type to build
6129 * decl.c (init_decl_processing): Likewise.
6130 * except.c (expand_end_eh_spec): Likewise.
6131 * search.c (expand_upcast_fixups): Simplify very slightly.
6133 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6135 * decl.c (grokdeclarator): Complain about a variable using
6136 constructor syntax coming back null from start_decl.
6138 * friend.c (make_friend_class): Complain about trying to make
6139 a non-class type a friend.
6141 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6142 (start_function): Not here.
6144 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
6146 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6148 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6150 * typeck2.c (process_init_constructor): Only skip anonymous fields
6151 if they are bitfields.
6153 * cp-tree.def (TYPEOF_TYPE): New code.
6154 * error.c (dump_type_real): Handle it.
6155 * pt.c (tsubst): Likewise.
6156 * tree.c (search_tree): Likewise.
6157 * semantics.c (finish_typeof): New fn.
6158 * parse.y (typespec): Use it.
6159 * cp-tree.h: Declare it.
6161 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
6163 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6165 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6167 * typeck.c (convert_arguments): Don't handle pmf references
6170 * init.c (build_member_call): Don't try to convert to the base type
6171 if it's ambiguous or pedantic.
6173 * typeck2.c (check_for_new_type): Only depend on pedantic for
6176 1998-10-25 Mark Mitchell <mark@markmitchell.com>
6178 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6179 non-converting constructors.
6181 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6183 * gxxint.texi: Correct documentation for n, N, Q, and B.
6185 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
6187 * parse.y (condition): Convert VAR_DECL from reference to indirect
6190 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
6192 * exception.cc (__cp_pop_exception): Free the original exception
6193 value, not the potentially coerced one.
6195 1998-10-23 Mark Mitchell <mark@markmitchell.com>
6197 * Makefile.in (hash.h): Run gperf when necessary.
6199 * cp-tree.h (CP_TYPE_READONLY): Remove.
6200 (CP_TYPE_VOLATILE): Likewise.
6201 (CP_TYPE_QUALS): New macro.
6202 (CP_TYPE_CONST_P): Likewise.
6203 (CP_TYPE_VOLATILE_P): Likewise.
6204 (CP_TYPE_RESTRICT_P): Likewise.
6205 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6206 (cp_build_type_variant): Rename to ...
6207 (cp_build_qualified_type): New function.
6208 (c_apply_type_quals_to_decl): Declare.
6209 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6210 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6211 (cp_type_qual_from_rid): New function.
6212 (compparms): Remove unused parameter. All callers changed.
6213 (cp_type_quals): New function.
6214 (at_least_as_qualified_p): Likewise.
6215 (more_qualified_p): Likewise.
6217 * call.c (standard_conversion): Replace calls to
6218 cp_build_type_variant with cp_build_qualified_type. Use
6219 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6220 compare them. Use CP_TYPE_* macros to check qualifiers.
6221 (reference_binding): Likewise.
6222 (implicit_conversion): Likewise.
6223 (add_builtin_candidates): Likewise.
6224 (build_over_call): Likewise.
6225 * class.c (overrides): Compare all qualifiers, not just `const',
6226 on method declarations.
6227 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6228 (convert_pointer_to_real): Likewise.
6229 (type_promotes_to): Likewise.
6230 * decl.c (check_for_uninitialized_const_var): New function.
6231 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6232 (cp_finish_decl): Use check_for_uninitialized_const_var.
6233 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
6235 (grok_ctor_properties): Likewise.
6236 (grok_op_properties): Likewise.
6237 (start_function): Likewise.
6238 (rever_static_member_fn): Likewise.
6239 * decl2.c (grok_method_quals): Likewise.
6240 (grokfield): Likewise.
6241 * error.c (dump_readonly_or_volatile): Rename to ...
6242 (dump_qualifiers): New function. Handle `restrict'.
6243 (dump_type_real): Use it.
6244 (dump_aggr_type): Likewise.
6245 (dump_type_prefix): Likewise.
6246 (dump_type_suffix): Likewise.
6247 (dump_function_decl): Likewise.
6248 (cv_as_string): Likewise.
6249 * gxx.gperf: Add __restrict and __restrict__.
6250 * gxxint.texi: Document `u' as used for `__restrict', and a few
6251 other previously undocumented codes.
6252 * hash.h: Regenerated.
6253 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6254 (build_member_call): Likewise.
6255 (build_new_1): Likewise.
6256 * lex.c (init_parse): Add entry for RID_RESTRICT.
6257 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6258 (cp_type_qual_from_rid): Define.
6259 * lex.h (enum rid): Add RID_RESTRICT.
6260 * method.c (process_modifiers): Deal with `restrict'.
6261 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6262 * parse.c: Regenerated.
6263 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6264 (tsubst_aggr_type): Likewise.
6266 (check_cv_quals_for_unify): Likewise.
6268 * rtti.c (init_rtti_processing): Likewise.
6269 (build_headof): Likewise.
6270 (get_tinfo_var): Likewise.
6271 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
6272 (expand_class_desc): Likewise.
6273 (expand_attr_desc): Likewise.
6274 (synthesize_tinfo_fn): Likewise.
6275 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
6276 (get_matching_virtual): Likewise.
6277 (expand_upcast_fixups): Likewise.
6278 * sig.c (build_signature_pointer_or_reference_name): Take
6279 type_quals, not constp and volatilep.
6280 (build_signature_pointer_or_reference_type): Likewise.
6281 (match_method_types): More CP_TYPE_QUALS conversion, etc.
6282 (build_signature_pointer_constructor): Likewise.
6283 (build_signature_method_call): Likewise.
6284 * tree.c (build_cplus_array_type): Likewise.
6285 (cp_build_type_variant): Rename to ...
6286 (cp_build_qualified_type): New function. Deal with `__restrict'.
6287 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6288 (build_exception_variant): Likewise.
6290 * typeck.c (qualif_type): Likewise.
6291 (common_type): Likewise.
6292 (comptypes): Likewise.
6293 (comp_cv_target_types): Likewise.
6294 (at_least_as_qualified_p): Define.
6295 (more_qualified_p): Likewise.
6296 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6297 (compparms): Likewise.
6298 (inline_conversion): Likewise.
6299 (string_conv_p): Likewise.
6300 (build_component_ref): Likewise.
6301 (build_indirect_ref): Likewise.
6302 (build_array_ref): Likewise.
6303 (build_unary_op): Likewise.
6304 (build_conditional_expr): Likewise.
6305 (build_static_cast): Likewise.
6306 (build_c_cast): Likewise.
6307 (build_modify_expr): Likewise.
6308 (convert_For_assignment): Likewise.
6309 (comp_ptr_ttypes_real): Likewise.
6310 (cp_type_quals): New function.
6312 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
6314 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6315 (CP_TYPE_VOLATILE): Likewise.
6316 * decl.c (grokdeclarator): Use them.
6317 * tree.c (canonical_type_variant): Likewise.
6319 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
6321 * parse.y (named_class_head): Push into class while parsing the
6323 * decl2.c (push_scope, pop_scope): New functions.
6324 * cp-tree.h: Declare them.
6325 * init.c (build_new_1): Delay cleanup until end of full expression.
6327 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
6329 * typeck.c (build_component_ref): Use of a type here is an error.
6331 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
6333 Revamp references to member functions.
6334 * method.c (hack_identifier): Call build_component_ref for a
6335 reference to a member function.
6336 * typeck.c (build_component_ref): Only return a single function
6337 if it's static. Otherwise, return a COMPONENT_REF.
6338 (build_x_function_call): Handle a COMPONENT_REF.
6339 (build_unary_op): Handle all unknown-type things.
6340 * decl2.c (arg_assoc): Handle COMPONENT_REF.
6341 * class.c (instantiate_type): Complain if the function we get is a
6342 nonstatic member function. Remove code for finding "compatible"
6344 * pt.c (tsubst_copy): Handle NOP_EXPR.
6345 * tree.c (build_dummy_object): New fn.
6346 (maybe_dummy_object): New fn.
6347 (is_dummy_object): New fn.
6348 * cp-tree.h: Declare them.
6349 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6350 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6351 * init.c (build_member_call): Use maybe_dummy_object and
6353 (build_offset_ref): Use maybe_dummy_object.
6354 (resolve_offset_ref): Use is_dummy_object.
6355 * typeck.c (build_x_function_call): Call build_dummy_object.
6356 (unary_complex_lvalue): Call is_dummy_object.
6358 * typeck.c (build_component_addr): Make sure field is a field.
6360 * call.c (build_new_op): Delete obsolete code.
6362 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6364 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
6366 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6367 std if std is ignored.
6369 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
6371 * decl.c (grokvardecl): Fix thinko.
6373 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6376 * parse.y (fn.def2): Fix 'attrs' format.
6378 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6380 * Makefile.in (CONFLICTS): Update.
6381 * parse.y (expr_or_declarator_intern): New rule.
6382 (expr_or_declarator, direct_notype_declarator, primary,
6383 functional_cast): Use it.
6384 (notype_declarator_intern): New rule.
6385 (notype_declarator, complex_notype_declarator): Use it.
6387 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
6389 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6390 (grokvardecl): Likewise.
6392 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6394 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6395 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6397 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6399 * pt.c (process_partial_specialization): Cast 1st argument of
6402 * tree.c (build_base_fields): Cast `base_align' to (int) when
6403 comparing against one.
6405 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6407 * decl.c (lookup_name_real): Handle template parameters for member
6408 templates where said parameters have the same name as the
6411 * decl.c (expand_static_init): Build cleanups before entering the
6412 anonymous function used to do them to avoid access-checking
6415 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6416 accidentally removed by previous change, and make DECL_RTL here.
6417 * class.c (add_method): Don't make DECL_RTL here.
6419 * pt.c (for_each_template_parm): Don't examine uninstantiated
6422 1998-10-16 Dave Brolley <brolley@cygnus.com>
6424 * lex.c (real_yylex): Fix unaligned access of wchar_t.
6426 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6428 * class.c (add_method): Fix documentation to reflect previous
6429 changes. Check for duplicate method declarations here.
6430 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6431 correctly; such things never match.
6432 (grokfndecl): Don't look for duplicate methods here.
6433 * decl2.c (check_classfn): Don't assume names are mangled.
6434 Don't add bogus member function declarations to a class before the
6435 class type is complete.
6436 (grokfield): Reformat error message.
6437 * method.c (set_mangled_name_for_decl): Don't mangle names while
6438 processing_template_decl.
6440 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
6442 * typeck.c (build_indirect_ref): Complain about a pointer to data
6444 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6446 * init.c (resolve_offset_ref): Don't undo the above.
6448 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6449 (struct lang_decl_flags): Add `bitfield'.
6450 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6452 * decl2.c (grokbitfield, grok_alignof): Likewise.
6453 * init.c (build_offset_ref): Likewise.
6454 * typeck.c (build_component_addr, expr_sizeof): Likewise.
6455 * cvt.c (build_up_reference): Don't crash if taking the address
6456 returns error_mark_node.
6458 * decl.c (grokfndecl): Also check ctype when checking for ::main().
6460 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
6462 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6464 (grokdeclarator): Instead of here.
6465 * friend.c (do_friend): Lose special handling of ::main and
6467 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6469 * spew.c (yylex): Clear looking_for_typename if we got
6472 1998-10-15 Mark Mitchell <mark@markmitchell.com>
6474 * class.c (maybe_warn_about_overly_private_class): Improve error
6475 messages for class with only private constructors.
6477 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6478 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6479 (build_typename_type): New function.
6480 * decl.c (build_typename_type): Broken out from ...
6481 (make_typename_type): Use it.
6482 * search.c (lookup_field): Likewise.
6484 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6486 * pt.c (convert_nontype_argument): Check against type_referred_to.
6487 * decl.c (grokvardecl): Check for declarator name before building
6488 DECL_ASSEMBLER_NAME.
6490 1998-10-14 Mark Mitchell <mark@markmitchell.com>
6492 * pt.c (lookup_template_class): Add comment.
6493 (instantiate_class_template): Don't mark the _TYPE node for
6494 member class templates as an instantiation.
6496 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
6498 * decl.c (grokfndecl): Fix my thinko.
6500 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
6502 * tinfo2.cc (fast_compare): Remove.
6503 (before): Just use strcmp.
6504 * tinfo.cc (operator==): Just use strcmp.
6506 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6508 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6511 1998-10-13 Mark Mitchell <mark@markmitchell.com>
6513 * cp-tree.h (specializations_of_same_template_p): Remove.
6514 * search.c (get_template_base): Don't use it.
6515 (get_template_base_recursive): Likewise.
6516 * pt.c (specializations_of_same_template_p): Remove.
6517 (unify): Don't use it.
6518 (lookup_template_class): Find the correct parent when setting
6519 CLASSTYPE_TI_TEMPLATE.
6521 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6523 * tinfo.cc (operator==): Always compare names.
6525 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6527 * decl.c (start_function): Fix cut-and-paste error.
6529 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6531 * inc/typeinfo: Add #pragma interface.
6532 (operator!=): Just call operator==.
6533 * tinfo.cc: Add #pragma implementation.
6534 (operator==): Move from inc/typeinfo and tinfo2.cc.
6535 Check __COMMON_UNRELIABLE instead of _WIN32.
6537 * typeck2.c (my_friendly_abort): Add URL.
6539 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6541 * decl.c (start_method): Added extra parameter for attributes.
6542 * cp-tree.h (start_method): Update prototype.
6543 * parse.y (fn.def2): Update start_method parameter list.
6545 1998-10-11 Mark Mitchell <mark@markmitchell.com>
6547 * cp-tree.h (specializations_of_same_template_p): Declare.
6548 * pt.c (specializations_of_same_template_p): New function.
6550 * search.c (get_template_base): Use it.
6551 (get_template_base_recursive): Likewise.
6553 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
6555 * decl2.c (start_objects): Add new variable `joiner' and
6556 initialize it properly.
6558 1998-10-09 Mark Mitchell <mark@markmitchell.com>
6560 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6561 change to vtable types.
6563 * cvt.c (ocp_convert): Avoid infinite recursion caused by
6566 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
6568 * pt.c (resolve_overloaded_unification): New fn.
6569 (try_one_overload): Likewise.
6570 (unify): Don't fail on unknown type.
6571 (type_unification_real): Likewise. Use resolve_overloaded_unification
6572 to handle an overloaded argument.
6573 (template_args_equal): Split out...
6574 (comp_template_args): From here.
6575 (determine_specialization): Also allow a template with more
6576 parms than were explicitly specified.
6577 * cp-tree.h: Add template_args_equal.
6578 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6580 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
6582 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6585 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
6587 * typeck.c (unsigned_type): Only return TItype nodes when
6588 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6589 (signed_type): Likewise.
6590 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6591 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6592 (init_decl_processing): Only create TItype nodes when
6593 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6594 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6595 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6597 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6599 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6600 (gxx.gperf): Update comments describing invocation flags.
6601 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6603 1998-10-07 Mark Mitchell <mark@markmitchell.com>
6605 * class.c (finish_struct_1): Add commentary on previous change.
6607 * cp-tree.h (vtbl_ptr_type_node): New variable.
6608 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6609 already of the right type.
6610 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6611 Simplify code to grow vtable.
6612 * decl.c (vtbl_ptr_type_node): Define.
6613 (init_decl_processing): Initialize it.
6615 1998-10-06 Mark Mitchell <mark@markmitchell.com>
6617 * cp-tree.def (PTRMEM_CST): New tree node.
6618 * cp-tree.h (ptrmem_cst): New type.
6619 (lang_type): Remove local_typedecls.
6620 (dummy): Increase to 12 bits from 11.
6621 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6622 (PTRMEM_CST_CLASS): New macro.
6623 (PTRMEM_CST_MEMBER): Likewise.
6624 (current_access_specifier): New variable.
6625 (current_class_type): Remove duplicate declaration.
6626 (finish_struct): Change prototype.
6627 (unreverse_member_declarations): New function.
6628 (pushdecl_class_level): Change prototype.
6629 (grok_enum_decls): Remove.
6630 (fixup_anonymous_union): New function.
6631 (grok_x_components): Change prototype.
6632 (tsubst_chain): Remove.
6633 (finish_member_template_decl): Likewise.
6634 (check_explicit_specialization): Fix indentation.
6635 (finish_class_definition): Change prototype.
6636 (finish_member_class_template): Likewise.
6637 (finish_member_declaration): New function.
6638 (check_multiple_declarators): Likewise.
6639 * class.c (class_stack_node_t): New type.
6640 (current_class_base): Remove.
6641 (current_class_stack): Change type.
6642 (current_access_specifier): New variable.
6643 (grow_method): Remove.
6644 (check_member_decl_is_same_in_complete_scope): Break out from
6646 (make_method_vec): New function.
6647 (free_method_vec): Likewise.
6648 (add_implicitly_declared_members): Break out from finish_struct_1.
6649 (free_method_vecs): New variable.
6650 (add_method): Rework for direct use from parser.
6651 (handle_using_decl): Watch for NULL_TREE while iterating through
6652 CLASSTYPE_METHOD_VEC.
6653 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6654 just do some error-checking.
6655 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6656 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
6657 (finish_struct): Change prototype. Simplify; fields and methods
6658 are already set up at this point.
6659 (init_class_processing): Set up current_class_stack.
6660 (pushclass): Save current_access_specifier.
6661 (popclass): Restore it.
6662 (currently_open_class): Simplify.
6663 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6664 * decl.c (saved_scope): Add access_specifier.
6665 (maybe_push_to_top_level): Save it.
6666 (pop_from_top_level): Restore it.
6667 (maybe_process_template_type_declaration): Use
6668 finish_member_declaration.
6669 (pushtag): Likewise.
6670 (pushdecl_class_level): Don't return a value.
6671 (fixup_anonymous_union): Break out from grok_x_components.
6672 (shadow_tag): Use it.
6673 (xref_tag): Complain about using an elaborated type specifier to
6674 reference a template type parameter or typedef name.
6675 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6676 (current_local_enum): Remove.
6677 (build_enumerator): Call finish_member_declaration.
6678 (grok_enum_decls): Remove.
6679 * decl2.c (grok_x_components): Simplify.
6680 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6681 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6682 (merge_functions): Add to comment.
6683 (arg_assoc_type): Prototype.
6684 (arg_assoc): Pass as many arguments as there are parameters.
6685 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
6687 * expr.c (cpls_expand_expr): Remove dead code. Handle
6689 * friend.c (do_friend): Lookup friends when in nested classes.
6691 * init.c (build_offset_ref): Do lookup even for classes that are
6692 only partially defined.
6693 (decl_constant_value): Remove dead code.
6694 * method.c (build_overload_value): Remove hack where by TYPE was
6695 not a TYPE. Handle PTRMEM_CST.
6696 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6698 * parse.y (components, notype_components, component_decl,
6699 component_decl_1, component_declarator, component_declarator0):
6700 Now all are itype rather than ttype. Rework to add members to
6702 (typesqpecqual_reserved): Use check_multiple_declarators.
6703 (structsp): Update class to finish_class_definition.
6704 (do_xref_defn): Unsplit into named_class_head.
6705 (access_specifier): Set current_access_specifier.
6706 * pt.c (set_current_access_from_decl): New function.
6707 (finish_member_template_decl): Don't take the parameters.
6708 (comp_template_args): Make more robust.
6709 (lookup_template_class): Don't use current_local_enum.
6710 (for_each_template_parm): Handle PTRMEM_CST.
6711 (instantiate_class_template): Use set_current_access_from_decl,
6712 finish_member_declaration and unreverse_member_declarations. Set
6713 lineno/input_filename before generating implicit member functions.
6714 (type_unification_real): Don't assume back-unification happens
6715 only for the last argument.
6716 (regenerate_decl_from_template): Call pushclass a bit earlier.
6717 (tsubst_chain): Remove.
6718 (tsubst_enum): Use set_current_access_from_decl.
6719 (set_mangled_name_for_template_decl): Fix indentation.
6720 * search.c (lookup_fnfields_1): Change iteration through
6721 CLASSTYPE_METHOD_VEC.
6722 (dfs_pushdecls): Likewise.
6723 (dfs_compress_decls): Likewise.
6724 (add_conversions): Likewise.
6725 * semantics.c (finish_class_definition): Don't take components.
6726 Change call to finish_struct.
6727 (finish_member_declaration): New function.
6728 (finish_member_class_template): Don't take template parameters.
6729 Change call to grok_x_components. Call finish_member_template_decl.
6730 (check_multiple_declarators): New function.
6731 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6732 a passed in fieldlist.
6733 * tree.c (search_tree): Handle PTRMEM_CST.
6735 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6736 INTEGER_CSTs, for pointer-to-data members.
6738 * call.c (resolve_args): Resolve template specializations, if
6741 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6743 * Makefile.in (spew.o): Depend on toplev.h.
6745 * call.c (compare_ics): Initialize variables `deref_from_type2',
6746 `deref_to_type1' and `deref_to_type2'.
6748 * except.c (get_eh_type): Hide prototype and definition.
6749 (process_start_catch_block_old): Remove unused static prototype.
6751 * pt.c (tsubst_decl): Initialize variable `argvec'.
6753 * spew.c: Include toplev.h.
6755 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
6757 * pt.c (instantiate_decl): Do save and restore file position.
6759 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
6761 * method.c (build_decl_overload_real): Clear
6762 numeric_output_need_bar after __.
6764 1998-10-05 Nathan Sidwell <nathan@acm.org>
6766 * call.c (build_new_method_call): Issue 'incomplete type' error,
6767 if class is not defined.
6769 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6771 * call.c (build_object_call): Move declaration of variable
6772 `fn' into the scope where it is used. Don't access variable
6773 `fn' when it is uninitialized, instead use `fns'.
6775 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6777 * errfn.c (cp_thing): Print buf as a string not as a printf format
6778 to avoid problems with the operator%. Consequently, `%%' sequences
6779 in format are copied as `%' in buf.
6781 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
6783 * pt.c (pop_tinst_level): Call extract_interface_info.
6784 (instantiate_decl): Don't save and restore file position.
6786 * decl.c (cp_finish_decl): Make statics in extern inlines and
6787 templates common, if possible and the target doesn't support weak
6790 * decl.c (grokdeclarator): Remove redundant calls to
6791 build_type_variant and some duplicated code.
6792 * sig.c (build_signature_reference_type): Only take the type parm.
6793 (build_signature_pointer_type): Likewise.
6794 * tree.c (build_cplus_method_type): Adjust.
6795 * cp-tree.h: Update.
6797 1998-10-04 Mark Mitchell <mark@markmitchell.com>
6799 * call.c (build_over_call): Make pedwarns about dropped qualifiers
6800 into full-fledged errors.
6801 * cvt.c (convert_to_reference): Likewise.
6802 * typeck.c (convert_for_assignment): Likewise.
6804 * search.c (expand_upcast_vtables): In addition to unsetting
6805 TREE_READONLY, remove top-level const type qualifier.
6807 1998-10-03 Mark Mitchell <mark@markmitchell.com>
6809 * class.c (current_class_ptr, current_class_ref): Clarify
6811 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6812 NOP type conversions.
6813 * decl.c (decls_match): Use comptypes directly; ignore
6814 qualifiers on the DECL.
6815 (duplicate_decls): Remove qualifier checks on DECL.
6816 (grokdeclarator): Make the type built up include top-level
6818 * decl2.c (do_dtors): Fix spelling error.
6819 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6820 when printing type information.
6821 * init.c (build_new_1): Add documentation. Deal with the fact
6822 that type of allocated memory now contains qualifiers.
6823 * lex.c (is_global): Improve error-recovery.
6824 * sig.c (build_member_function_pointer): Don't cast away const
6825 on fields of sigtable_entry_type.
6826 * tree.c (lvalue_type): Don't look at top-level qualifiers on
6828 * typeck.c (decay_conversion): Likewise.
6829 (build_component_ref): Make sure the type of the COMPONENT_REF
6830 contains top-level qualifiers, as appropriate. Improve
6832 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
6833 (build_array_ref): Likewise.
6834 (build_unary_op): Improve error-recovery.
6835 (unary_complex_lvalue): Make taking the address a bound member
6836 function an error, not a sorry.
6837 (build_conditional_expr): Look at the type qualifiers, not the
6838 qualifiers on the expression itself.
6840 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
6842 * decl2.c (merge_functions): Remove duplicates.
6844 * decl2.c: Add -f{no-,}implicit-inline-templates.
6845 (import_export_decl): Check it.
6847 * decl.c (lookup_name_real): Template parms also take precedence
6848 over implicit typename. Only warn if yylex.
6850 * typeck.c (build_conditional_expr): Only fold if ifexp is an
6853 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6856 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
6858 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6859 * class.c (build_vbase_pointer): Use it.
6860 * rtti.c (expand_class_desc): Likewise.
6861 * tree.c (build_vbase_pointer_fields): Likewise.
6863 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
6865 * decl.c (start_decl): Add invocation of
6866 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6867 (start_function): Add invocation of
6868 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6870 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6871 HANDLE_GENERIC_PRAGMAS.
6873 1998-09-28 Anthony Green <green@cygnus.com>
6875 * semantics.c (finish_asm_stmt): Always permit volatile asms.
6877 1998-09-28 Mark Mitchell <mark@markmitchell.com>
6879 * decl.c (grokdeclarator): Tighten checks for invalid
6880 destructors. Improve error-messages and error-recovery.
6881 * decl2.c (check_classfn): Don't assume that mangled destructor
6882 names contain type information.
6884 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
6886 * search.c (get_base_distance): Remove assert.
6888 * decl2.c (build_anon_union_vars): Don't process a field with no
6890 (finish_anon_union): Also complain about local anon unions with no
6893 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6895 * decl.c (lookup_namespace_name): If the name is a namespace,
6896 return it immediately.
6898 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6900 * cp-tree.h (define_case_label): Remove unused parameter.
6901 (check_java_method): Likewise.
6902 (grokclassfn): Likewise.
6903 (expand_aggr_init): Likewise.
6904 (build_x_delete): Likewise.
6905 (maybe_end_member_template_processing): Likewise.
6906 (unshare_base_binfos): Add prototype.
6907 (string_conv_p): Likewise.
6908 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6910 * cvt.c (build_up_reference): Remove unused parameter
6911 `checkconst', all callers changed.
6912 (build_type_conversion): Mark parameter `code' with
6914 (build_expr_type_conversion): Initialize variable `conv'.
6916 * decl.c (push_namespace): Initialize variable `d'.
6917 (define_case_label): Remove unused parameter `decl', all callers
6920 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6921 `argc' with ATTRIBUTE_UNUSED.
6922 (grokclassfn): Remove unused parameter `cname', all callers
6924 (check_java_method): Likewise for parameter `ctype'.
6925 (copy_assignment_arg_p): Mark parameter `virtualp' with
6927 (finish_prevtable_vardecl): Likewise for parameter `prev'.
6929 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6931 * init.c (expand_aggr_init_1): Remove unused parameter
6932 `alias_this', all callers changed.
6933 (expand_aggr_init): Likewise.
6934 (expand_default_init): Likewise.
6935 (build_new_1): Initialize variable `susp'.
6936 (build_x_delete): Remove unused parameter `type', all callers
6939 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6941 (readescape): Use (unsigned) value in shift.
6942 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
6943 comparing to a signed quantity.
6945 * pt.c (maybe_end_member_template_processing): Remove unused
6946 parameter `decl', all callers changed.
6947 (check_explicit_specialization): Add braces around empty body in
6949 (current_template_args): Initialize variable `args'.
6950 (lookup_template_class): Likewise for variable `prev_local_enum'.
6951 (tsubst_decl): Likewise for variable `r'.
6952 (set_mangled_name_for_template_decl): Initialize variable
6955 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6956 Likewise for variable `i'.
6957 (yylex): Initialize variable `trrr'.
6959 * typeck.c (compparms): Mark variable `strict' with
6962 * xref.c (simplify_type): Cast argument of ctype function to
6965 1998-09-24 Mark Mitchell <mark@markmitchell.com>
6967 * cp-tree.h (language_lvalue_valid): Remove.
6968 * decl.c (grokdeclarator): Don't disallow references to functions.
6969 * tree.c (lvalue_p_1): New function, combining duplicated
6972 (real_lvalue_p): Likewise.
6973 * typeck.c (language_lvalue_valid): Remove.
6974 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6975 they don't have TREE_READONLY set.
6976 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6978 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
6980 * spew.c (yylex): Give diagnostic.
6981 * hash.h (is_reserved_word): Add export.
6982 * gxx.gperf: Likewise.
6983 * lex.h (rid): Add RID_EXPORT.
6984 * lex.c (init_parse): Likewise.
6986 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6988 * friend.c (do_friend): Make warning a full sentence.
6990 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6992 * parse.y (component_decl_list): Improve error-recovery.
6994 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
6996 * decl.c (make_typename_type): Move error to point where name
6997 variable can be used by dump_type.
6999 1998-09-22 Mark Mitchell <mark@markmitchell.com>
7001 * decl.c (grokfndecl): Improve error-recovery.
7002 * decl2.c (grokfield): Likewise.
7003 * pt.c (finish_member_template_decl): Likewise.
7005 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
7007 * method.c (hack_identifier): Finding multiple members is always
7010 1998-09-21 Per Bothner <bothner@cygnus.com>
7012 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
7014 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
7016 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7018 1998-09-20 Mark Mitchell <mark@markmitchell.com>
7020 * class.c (maybe_warn_about_overly_private_class): Reformat.
7022 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
7024 * exception.cc (__cplus_type_matcher): Realign some code.
7026 1998-09-16 Mark Mitchell <mark@markmitchell.com>
7028 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7029 (tinfo2.o): Likewise.
7030 (exception.o): Likewise.
7032 (opnew.o): Likewise.
7033 (opnewnt.o): Likewise.
7034 (opvnew.o): Likewise.
7035 (opvnewnt.o): Likewise.
7036 (opdel.o): Likewise.
7037 (opdelnt.o): Likewise.
7038 (opvdel.o): Likewise.
7039 (opvdelnt.o): Likewise.
7041 1998-09-16 Richard Henderson <rth@cygnus.com>
7043 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7045 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
7047 * call.c (build_field_call): Handle static data members too.
7049 * typeck.c (comptypes): When comparing pointer types, check
7050 whether referred types match even in strictest modes.
7052 1998-09-15 Mark Mitchell <mark@markmitchell.com>
7054 * cp-tree.h: Revert previous change.
7055 (finish_struct_methods): Remove declaration.
7056 * class.c: Revert previous change.
7057 (maybe_warn_about_overly_private_class): New function.
7058 (finish_struct_methods): Declare here, and make static. Remove
7059 unnecessary parameters. Tidy slightly. Use
7060 maybe_warn_about_overly_private_class.
7061 (finish_struct_1): Adjust. Remove check for private constructors,
7063 (finish_struct): Adjust.
7065 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7067 * except.c (expand_start_catch_block): No need to check for new
7069 (process_start_catch_block_old): Deleted.
7070 (process_start_catch_block): Add call to start_decl_1().
7071 (expand_end_catch_block): Add call to end_catch_handler().
7072 * exception.cc (__cplus_type_matcher): Only check the exception
7073 language if there is an exception table.
7075 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7077 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7078 as used to prevent conflicts with virtual function tables.
7080 1998-09-14 Mark Mitchell <mark@markmitchell.com>
7082 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7083 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7084 * class.c (maybe_class_too_private_p): New function.
7085 (finish_struct_methods): Use it.
7086 (finish_struct_1): Likewise.
7087 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7090 * pt.c (check_specialization_scope): Fix spelling error.
7091 (check_explicit_specialization): Remove code to handle explicit
7092 specializations in class scope; they are now correctly diagnosed
7095 1998-09-10 Mark Mitchell <mark@markmitchell.com>
7097 * decl.c (pushdecl): Don't copy types if the
7098 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7101 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7103 * class.c (get_enclosing_class): New function.
7104 (is_base_of_enclosing_class): Likewise.
7105 * cp-tree.h (get_enclosing_class): Declare.
7106 (is_base_of_enclosing_class): Likewise.
7107 * pt.c (coerce_template_parms): Use them.
7109 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
7111 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7112 null to decide whether to use it.
7114 * error.c (dump_type_real): Handle NAMESPACE_DECL.
7115 * parse.y (base_class.1): Avoid crash on error.
7117 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
7119 * decl.c (make_typename_type): If context is a namespace, the code
7122 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
7124 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7126 1998-09-08 Mark Mitchell <mark@markmitchell.com>
7128 * cp-tree.h (anonymous_namespace_name): Declare.
7129 * decl.c: Define it.
7130 (push_namespace): Use anonymous_namespace_name, rather than local
7132 * error.c (dump_decl): If a namespace is named
7133 anonymous_namespace_name, call it {anonymous}.
7135 * decl.c (grokparms): Distinguish between references and pointers
7138 1998-09-08 Richard Henderson <rth@cygnus.com>
7139 Mark Mitchell <mark@markmitchell.com>
7141 * pt.c (process_partial_specialization): Consistently allocate
7142 and zero tpd.parms based on ntparms. Use tpd2.parms, not
7143 tpd.parms, where appropriate.
7145 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
7147 * Makefile.in (INCLUDES): Update after recent toplevel gcc
7150 1998-09-05 Mark Mitchell <mark@markmitchell.com>
7152 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7153 * class.c (finish_struct): Remove hackery to deal with explicit
7154 specializations in class scope.
7155 * decl.c (grokfndecl): Improve error-recovery.
7156 * decl2.c (grokfield): Likewise.
7157 * pt.c (check_specialization_scope): New function.
7158 (begin_specialization): Call it.
7159 (process_partial_specialization): New function, split out from
7160 push_template_decl. Check partial specializations more
7162 (push_template_decl): Call it.
7163 (check_explicit_specialization): Don't attempt to handle explicit
7164 specializations in class scope.
7165 (template_parm_data): Document. Add current_arg and
7166 arg_uses_template_parms.
7167 (mark_template_parm): Set it.
7168 (tsubst_arg_types): Remove unused variable.
7169 * semantics.c (begin_class_definition): Tweak.
7171 1998-09-04 Mark Mitchell <mark@markmitchell.com>
7173 * inc/typeinfo (type_info::type_info(const char*)): Make
7176 * cp-tree.h (hash_tree_cons_simple): New macro.
7177 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
7178 (coerce_template_parms): Use make_temp_vec, instead of
7179 make_tree_vec. Document this behavior.
7180 (lookup_template_class): Likewise.
7181 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7182 Remove dead code (and add assertion to check its deadness). Fix
7183 bug w.r.t. exception specifications.
7185 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
7187 * decl2.c (import_export_vtable): Always make artificials comdat.
7188 (import_export_decl): Likewise.
7189 * pt.c (mark_decl_instantiated): Likewise.
7191 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7193 * cp-tree.h (finish_globally_qualified_member_call_expr):
7195 (finish_qualified_call_expr).
7196 * semantics.c: Likewise.
7197 * parse.y (primary): Use it.
7198 * method.c (hack_identifier): Remove redundant code.
7200 * init.c (resolve_offset_ref): Call convert_from_reference to
7201 handle members of reference type. Improve error recovery.
7203 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
7205 * cp-tree.h: Declare warn_nontemplate_friend.
7206 * decl2.c (lang_decode_option): Set.
7207 * lang-options.h: Add -Wnon-template-friend.
7208 * friend.c (do_friend): Use to toggle non-template function warning.
7210 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7212 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7213 corresponding INTEGER_CSTs when processing_template_decl.
7214 * pt.c (tsubst_enum): Tweak accordingly.
7216 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7218 * decl.c (pushdecl_class_level): Add warning here.
7221 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
7223 * cvt.c (convert_pointer_to_real): Tidy.
7224 * search.c (get_base_distance_recursive): Simplify.
7225 (get_base_distance): Likewise.
7227 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7230 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
7232 * lex.c (check_newline): Call HANDLE_PRAGMA before
7233 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
7234 if unknown pragmas are encountered.
7235 (handle_sysv_pragma): Interpret return code from
7236 handle_pragma_token (). Return success/failure indication rather
7237 than next unprocessed character.
7238 (pragma_getc): New function: retrieves characters from the
7239 input stream. Defined when HANDLE_PRAGMA is defined.
7240 (pragma_ungetc): New function: replaces characters back into the
7241 input stream. Defined when HANDLE_PRAGMA is defined.
7243 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7245 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7246 * class.c (build_vtable_entry_ref): Likewise.
7248 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7250 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7251 * decl2.c (import_export_decl): Likewise.
7252 * pt.c (instantiate_decl): Use it.
7254 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7256 * decl.c (lookup_name_real): Also do implicit typename thing for
7257 artificial TYPE_DECLs.
7258 * search.c (lookup_field): Likewise.
7259 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7260 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7261 (enter_scope_of): Extract type from implicit typename.
7262 (begin_class_definition): Likewise.
7263 * lex.c (identifier_type): Handle implicit typename when checking
7266 * cp-tree.h: Declare flag_strict_prototype.
7267 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7269 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7270 specified, set it to the value of pedantic.
7272 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7274 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7276 1998-08-31 Mark Mitchell <mark@markmitchell.com>
7278 * decl.c (finish_enum): Handle member enums of classes declared in
7281 * decl2.c (grok_x_components): Strip attributes before calling
7284 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
7286 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7287 -fenum-int-equivalence and -fno-nonnull-objects.
7288 * class.c (check_for_override): Remove support for -fall-virtual.
7289 (finish_struct_1): Likewise.
7290 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7291 * typeck.c (build_binary_op_nodefault): Likewise.
7292 * cvt.c (ocp_convert): Likewise.
7293 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7294 * class.c (build_vbase_path): Likewise.
7296 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
7298 * Makefile.in (INTERFACE): New, set to 1.
7300 1998-08-30 Mark Mitchell <mark@markmitchell.com>
7302 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7303 comparing with global_namespace.
7304 (dump_aggr_type): Likewise.
7306 * decl.c (grokfndecl): Issue error on declaration of friend
7307 templates with explicit template arguments.
7309 * pt.c (convert_template_argument): New function, split out
7311 (coerce_template_parms): Here.
7312 (tsubst): Attempt better error-recovery.
7314 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
7316 * pt.c (decl_template_parm_p): Add checks for
7317 TEMPLATE_TEMPLATE_PARM.
7319 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7321 * lex.c (do_identifier): Fix thinko in previous change.
7323 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
7325 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7326 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7328 1998-08-28 Richard Henderson <rth@cygnus.com>
7330 Add support for discarding unused virtual functions.
7331 * lang-options.h: Add -fvtable-gc.
7332 * cp-tree.h: Add flag_vtable_gc.
7333 * decl2.c (output_vtable_inherit): New fn.
7334 (finish_vtable_vardecl): Call it.
7335 * class.c (build_vtable_entry_ref): New fn.
7336 (build_vtbl_ref): Call it.
7338 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7340 * cp-tree.h (build_enumerator): Take the enumeration type as a
7342 * decl.c (finish_enum): Don't set the TREE_TYPE for the
7343 enumeration constant values if we're processing_template_decls.
7344 Don't set the type for the CONST_DECLs either; that's done in
7346 (build_enumerator): Take the enumeration type as a
7348 * lex.c (do_identifier): Don't resolve enumeration constants while
7349 processing template declarations, even if they happen to be
7350 TEMPLATE_PARM_INDEXs.
7352 * parse.y (current_enum_type): New variable.
7353 (primary): Don't allow statement-expression in local classes just
7354 as we don't in global classes.
7355 (structsp): Use current_enum_type.
7356 (enum_list): Likewise.
7357 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7358 finish_enum; they no longer occur.
7360 * cp-tree.h (finish_base_specifier): New function.
7361 * parse.y (base_class): Use it.
7362 * semantics.c (finish_base_specifier): Define it.
7364 * parse.y (structsp): Warn on use of typename outside of template
7367 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7369 * lex.c (handle_cp_pragma): Remove #pragma vtable.
7370 * lang-options.h: Remove +e options.
7371 * decl2.c (lang_decode_option): Likewise.
7372 (import_export_vtable): Don't check write_virtuals.
7373 (finish_vtable_vardecl, finish_file): Likewise.
7374 * search.c (dfs_debug_mark): Likewise.
7375 * semantics.c (begin_class_definition): Likewise.
7376 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7378 * call.c (build_over_call): Check flag_elide_constructors.
7379 * decl2.c: flag_elide_constructors defaults to 1.
7380 * typeck.c (convert_arguments): Remove return_loc parm.
7381 (build_function_call_real): Adjust.
7383 * search.c: Tear out all mi_matrix and memoize code.
7384 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7385 * lang-options.h: Remove documentation for -fhandle-exceptions,
7386 -fmemoize-lookups and -fsave-memoized.
7387 * cp-tree.h: Lose mi_matrix and memoize support.
7388 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7389 * class.c: Lose struct class_level.
7390 (pushclass, popclass): Lose memoize support.
7391 * init.c (build_offset_ref): Likewise.
7393 Never change BINFO_INHERITANCE_CHAIN.
7394 * init.c (emit_base_init): Change modification of
7395 BINFO_INHERITANCE_CHAIN to an assert.
7396 * search.c (get_base_distance_recursive): Likewise.
7397 (get_base_distance): Likewise.
7398 (lookup_member): Likewise.
7399 (convert_pointer_to_single_level): Likewise.
7400 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
7401 (lookup_fnfields): Likewise.
7402 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7403 (unshare_base_binfos): Don't call propagate_binfo_offsets.
7404 (layout_basetypes): Call propagate_binfo_offsets instead of
7405 unshare_base_binfos.
7406 * decl.c (xref_basetypes): Call unshare_base_binfos.
7407 * pt.c (instantiate_class_template): Likewise.
7408 * tree.c (reverse_path): Remove 'copy' parm; always make a
7410 * class.c (build_vbase_path): Just call it.
7411 * search.c (compute_access): Likewise. Don't re-reverse.
7413 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7415 * class.c (build_vbase_path): Use reverse_path.
7416 (finish_base_struct): Move warnings for inaccessible bases to
7418 (modify_one_vtable): Remove check of TREE_USED (binfo).
7419 (fixup_vtable_deltas1): Likewise.
7420 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7421 (xref_tag): Remove binfos parameter.
7422 (make_binfo): Remove chain parameter.
7423 (reverse_path): Add copy parameter.
7424 * decl.c (init_decl_processing): Change calls to xref_tag.
7425 (xref_tag): Remove binfos parameter.
7426 (xref_basetypes): Change calls to make_binfo.
7427 * decl2.c (grok_x_components): Change calls to xref_tag.
7428 (handle_class_head): Likewise.
7429 * friend.c (do_friend): Likewise.
7430 * lex.c (make_lang_type): Change calls to make_binfo.
7431 * parse.y (structsp): Change calls to xref_tag.
7432 (named_complex_class_head_sans_basetype): Likewise.
7433 (named_class_head): Likewise.
7434 * rtti.c (init_rtti_processing): Likewise.
7435 * search.c (compute_access): Change calls to reverse_path.
7436 (dfs_get_vbase_types): Change calls to make_binfo.
7437 (get_vbase_types): Remove dead code.
7438 * tree.c (unshare_base_binfos): Change calls to make_binfo.
7439 (layout_basetypes): Warn here about inaccessible bases.
7440 (make_binfo): Remove chain parameter.
7441 (reverse_path): Add copy parameter.
7443 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7445 * class.c: #if 0 complete_type_p.
7446 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7447 * method.c (process_overload_item): Likewise.
7448 * typeck.c (comp_target_types): Likewise.
7450 Stop sharing binfos for indirect virtual bases.
7451 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7452 (layout_basetypes): Likewise.
7453 (unshare_base_binfos): Copy vbases, too.
7454 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7455 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7456 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7457 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7458 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7459 reference to BINFO_VIA_PUBLIC.
7460 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7461 (push_class_decls): Use them.
7462 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7463 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7465 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7467 * decl.c (build_enumerator): Set DECL_CONTEXT for the
7470 1998-08-26 Mark Mitchell <mark@markmitchell.com>
7472 * cp-tree.h (finish_enum): Change prototype.
7473 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7474 VALUES parameter. Don't try to compute mins/maxs if
7475 processing_template_decl.
7476 * parse.y (structsp): Use new calling sequence for finish_enum.
7477 * pt.c (tsubst_enum): Likewise. Take the new type as input.
7478 (lookup_template_class): Remove unused variables. Tweak.
7479 Register enums on instantiation list before substituting
7480 enumeration constants.
7481 (tsubst_decl): Remove unused variables.
7482 (regenerate_decl_from_template): Likewise.
7484 * decl.c (duplicate_decls): Don't obliterate the
7485 DECL_TEMPLATE_INFO for a template if we're not replacing it with
7488 * lex.c (do_identifier): Fix typo in comment.
7490 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7492 * errfn.c: Remove stdarg.h/varargs.h.
7495 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
7497 * pt.c (tsubst_copy): Only do typename overloading on an
7498 IDENTIFIER_NODE that happens to look like a typename if it actually
7499 has a type for us to use.
7501 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7503 * typeck.c (comp_cv_target_types): Split out...
7504 (comp_target_types): From here. Don't allow cv-qual changes under
7505 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
7506 (build_ptrmemfunc): Pass 1 to nptrs.
7507 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7509 1998-08-25 Mark Mitchell <mark@markmitchell.com>
7511 * search.c (dependent_base_p): Don't compare a binfo to
7512 current_class_type; use the TREE_TYPE of the binfo instead.
7514 * cp-tree.h (CLASS_TYPE_P): Revise definition.
7516 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7518 * decl.c (duplicate_decls): Don't complain about different
7519 exceptions from an internal decl even if pedantic.
7521 * typeck.c (convert_for_assignment): Converting from pm of vbase
7522 to derived is an error, not a sorry.
7524 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7525 * class.c (fixed_type_or_null): Rename from
7526 resolves_to_fixed_type_p. Return the dynamic type of the
7527 expression, if fixed, or null.
7528 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
7529 does not match the static type.
7530 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
7531 resolves_to_fixed_type_p again.
7533 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7535 * pt.c (tsubst_decl): Move special case code for dealing with
7536 tricky friend templates here from ...
7537 (regenerate_decl_from_template): Here.
7539 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7541 * decl.c (start_decl): Remove redundant linkage check.
7543 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
7545 * typeck.c (c_expand_return): Handle the case that valtype
7546 is wider than the functions return type.
7548 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7550 * cp-tree.h (CLASS_TYPE_P): New macro.
7551 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7552 * pt.c (process_template_parm): Undo previous change.
7554 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
7556 * cp-tree.h: Declare.
7557 * pt.c (decl_template_parm_p): New function.
7558 * decl.c (pushdecl): Check decls for redeclaring template parms.
7559 (xref_tag): Make redeclaration an error, print decl.
7560 * decl2.c (grokfield): Check field_decls for redeclaration as well.
7562 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7564 * parse.y (primary): Fix up the type of string constants.
7566 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7568 * typeck.c (convert_for_initialization): Move check for odd uses
7569 of NULL to avoid duplicate warnings.
7571 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7573 * tree.c (lvalue_type): Fix for arrays.
7574 * typeck.c (string_conv_p): New fn.
7575 (convert_for_assignment): Use it.
7576 (build_unary_op): Use lvalue_type.
7577 * call.c (standard_conversion, convert_like): Use string_conv_p.
7578 (add_function_candidate): Use lvalue_type.
7579 * cvt.c (convert_to_reference): Likewise.
7580 * decl2.c (lang_decode_option): Ignore -traditional.
7581 * decl.c (init_decl_processing): flag_writable_strings inhibits
7584 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
7586 * lang-options.h (lang_options): Add fconst-strings to the list
7588 * decl2.c (lang_f_options, lang_decode_option): Likewise.
7590 1998-08-24 Nathan Sidwell <nathan@acm.org>
7592 * lex.c (real_yylex): Don't warn about long long constants if
7593 we're allowing long long.
7595 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7597 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7598 accessing bindings directly.
7600 * search.c (my_tree_cons): Reimplement.
7602 * lang-specs.h: Remove __HONOR_STD.
7603 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7605 1998-08-23 Mark Mitchell <mark@markmitchell.com>
7607 * decl.c (grokdeclarator): Complain about in-class initialization
7608 of aggregates and/or references.
7609 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7610 TEMPLATE_TYPE_PARMs.
7612 * decl2.c (grok_array_decl): Add comment.
7613 (mark_used): Don't instantiate an explicit instantiation.
7614 * friend.c (make_friend_class): Remove bogus comment. Fix check
7615 for partial specializations.
7616 * pt.c (check_explicit_specialization): Don't
7617 SET_DECL_EXPLICIT_INSTANTIATION here.
7618 (mark_decl_instantiated): Or here.
7619 (do_decl_instantiation): Do it here, instead. Add checks for
7620 duplicate explicit instantiations, etc. Tidy.
7621 (do_type_instantiation): Likewise.
7622 (instantiate_decl): Improve comments. Complain about explicit
7623 instantiations where no definition is available.
7625 * cp-tree.h (ansi_null_node): Remove.
7626 * call.c (build_over_call): Warn about converting NULL to an
7628 * cvt.c (build_expr_type_conversion): Likewise. Use
7629 null_ptr_cst_p instead of expanding it inline.
7630 * decl.c (ansi_null_node): Remove.
7631 (init_decl_processing): Make null_node always have integral type.
7632 * except.c (build_throw): Warn about converting NULL to an
7634 * lex.c (init_parse): Remove handling of ansi_null_node.
7635 * pt.c (type_unification_real): Don't convert NULL to void* type.
7636 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7637 (convert_for_assignment): Warn about converting NULL to an
7639 (convert_for_initialization): Likewise.
7641 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7643 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7644 * pt.c (coerce_template_parms): Use no_linkage_check.
7645 * decl.c (grokvardecl): Likewise.
7646 (grokfndecl): Likewise. Members of anonymous types have no linkage.
7648 * method.c (process_overload_item): Remove useless code.
7650 1998-08-20 Per Bothner <bothner@cygnus.com>
7652 Handle new'ing of Java classes.
7653 * init.c (build_class_classref): New function.
7654 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
7655 constructor does not return this; don't need to exception-protect.
7657 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
7658 * decl2.c (acceptable_java_type): Handle template-derived types.
7660 1998-08-20 Per Bothner <bothner@cygnus.com>
7662 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
7664 1998-08-20 Mark Mitchell <mark@markmitchell.com>
7666 * decl.c (duplicate_decls): Always merge the old and new patterns
7667 for templates, regardless of whether or not the new one has
7668 DECL_INITIAL. Don't throw away specializations. Merge
7670 * pt.c (tsubst_decl): Use the right pattern when calculating the
7671 complete args for a new template instance.
7672 (do_decl_instantiation): Fix typo in comment.
7673 (regenerate_decl_from_template): Deal with tricky friend template
7675 (instantiate_decl): Likewise.
7677 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
7679 * init.c (build_builtin_delete_call): Add missing assemble_external
7682 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7684 * parse.y (notype_unqualified_id): Also accept ~A<int>.
7686 1998-08-19 Mark Mitchell <mark@markmitchell.com>
7688 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7690 * except.c (build_throw): Warn when NULL is thrown, even with
7691 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
7694 * cp-tree.h (ansi_null_node): New variable.
7695 * decl.c (ansi_null_node): New variable.
7696 (init_decl_processing): Initialize its type.
7697 * lex.c (init_parse): Initialize its value. Use ansi_null_node
7698 for null_node in non-ANSI mode.
7699 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7700 place of null_node to avoid spurious errors.
7702 1998-08-17 Mark Mitchell <mark@markmitchell.com>
7704 * cp-tree.h (enter_scope_of): New function.
7705 * parse.y (complex_direct_notype_declarator): Use it.
7706 * semantics.c (enter_scope_of): New function.
7708 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
7710 * decl.c (grokparms): No, here.
7712 * decl.c (grokdeclarator): Catch parm with pointer to array of
7713 unknown bound here...
7714 * method.c (process_overload_item): ...not here.
7716 * gxxint.texi: Remove obsolete documentation of overloading code.
7718 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7719 * class.c (finish_struct_bits): Likewise.
7721 * tree.c (lvalue_type): Fix for arrays.
7722 * typeck.c (build_unary_op): Use lvalue_type.
7723 * call.c (add_function_candidate): Likewise.
7724 * cvt.c (convert_to_reference): Likewise.
7726 * decl2.c (lang_decode_option): Ignore -traditional.
7728 * init.c (build_offset_ref): Don't mess with error_mark_node.
7729 * lex.c (do_scoped_id): Use cp_error.
7731 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7733 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
7735 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7737 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
7739 * cp-tree.h (set_identifier_local_value): Provide prototype.
7741 * decl2.c (do_namespace_alias): Remove unused variables `binding'
7744 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
7746 * Makefile.in: Rename BBISON to BISON so that it can be properly
7747 inherited from the parent makefile.
7749 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7751 * lang-options.h: Add -finit-priority.
7752 * decl2.c: Likewise. Check flag_init_priority instead of
7755 * decl2.c (setup_initp): New fn.
7756 (start_objects, finish_objects, do_ctors): Handle init_priority.
7757 (do_dtors, finish_file): Likewise.
7759 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7761 * pt.c (tsubst_copy): Hush warning.
7763 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7765 1998-08-12 Mark Mitchell <mark@markmitchell.com>
7767 * pt.c (print_template_context): Don't abort when instantiating a
7770 * decl.c (grokdeclarator): Issue errors on namespace qualified
7771 declarators in parameter lists or in class scope.
7773 1998-08-09 Mark Mitchell <mark@markmitchell.com>
7775 * pt.c (check_explicit_specialization): Don't abort on bogus
7776 explicit instantiations.
7778 1998-08-07 Mark Mitchell <mark@markmitchell.com>
7780 * typeck.c (require_complete_type): Use complete_type_or_else.
7781 (complete_type_or_else): Always return NULL_TREE on failure, as
7784 * pt.c (tsubst_aggr_type): Prototype.
7785 (tsubst_decl): New function, split out from tsubst. Set
7786 input_filename and lineno as appropriate.
7787 (pop_tinst_level): Restore the file and line number saved in
7789 (instantiate_class_template): Set input_filename and lineno as
7791 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
7792 context for a TYPENAME_TYPE is complete.
7794 * decl2.c (grokbitfield): Issue errors on bitfields declared with
7796 (do_dtors): As in do_ctors, pretend to be a member of the same
7797 class as a static data member while generating a call to its
7800 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7801 conversions, even in complex virtual base class hierarchies.
7803 1998-08-06 Mark Mitchell <mark@markmitchell.com>
7805 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7806 (TYPE_TEMPLATE_INFO): Likewise.
7807 (SET_TYPE_TEMPLATE_INFO): Likewise.
7808 (ENUM_TI_TEMPLATE): Likewise.
7809 (ENUM_TI_ARGS): Likewise.
7810 (lookup_nested_type_by_name): Remove.
7811 * decl.c (maybe_process_template_type_declaration): Handle enums.
7812 (start_enum): Don't check for primary-template enum declarations
7814 (finish_enum): Clean up, document. Make sure template enum
7815 constants get the correct type.
7816 (build_enumerator): Copy initializers for template enumerations,
7818 (grok_enum_decls): Document.
7819 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7820 better. Build LOOKUP_EXPRs for local variables, even if they are
7822 * pt.c (tsubst_enum): Remove field_chain parameter.
7823 (template_class_depth): Include the depth of surrounding function
7825 (push_template_decl): Check for primary-template enum declarations
7826 here. Deal with enumeration templates.
7827 (lookup_template_class): Likewise.
7828 (for_each_template_parm): Likewise.
7829 (instantiate_class_template): Don't call tsubst_enum directly,
7830 call tsubst instead, to instantiate enums. Deal with all
7831 field_chain issues here, not in tsubst_enum.
7832 (lookup_nested_type_by_name): Remove.
7833 (tsubst_aggr_type): Revise handling of enumeration types.
7835 (tsubst_copy): Likewise.
7836 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7838 1998-08-04 Mark Mitchell <mark@markmitchell.com>
7840 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7841 uses template parameters.
7842 * method.c (build_template_parm_names): Use the full set of
7843 template arguments for tsubst'ing.
7844 (build_overload_identifier): Pass the full set of template
7845 arguments to build_template_parm_names, not just the
7847 * pt.c (TMPL_ARGS_DEPTH): Define using
7848 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7849 (NUM_TMPL_ARGS): New macro.
7850 (add_outermost_template_args): Deal with the case where the outer
7851 args will be completely discarded.
7852 (coerce_template_parms): Use the full set of template arguments
7853 for tsubst'ing. Simplify. Add some asserts. Improve
7855 (lookup_template_class): Pass the full set of template arguments
7856 to coerce_template_parms.
7857 (tsubst): Add assertion.
7858 (do_type_instantiation): Don't instantiate member template
7861 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7862 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7864 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
7866 * method.c (set_mangled_name_for_decl): Change return type to void.
7868 * decl.c (lookup_name_real): A namespace-level decl takes priority
7869 over implicit typename. Avoid doing the same lookup twice.
7871 * search.c (dependent_base_p): New fn.
7872 (dfs_pushdecls, dfs_compress_decls): Use it.
7874 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7875 virtual functions if the type doesn't have any.
7877 1998-08-03 Mark Mitchell <mark@markmitchell.com>
7879 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7880 uses template parameters.
7882 1998-08-02 Mark Mitchell <mark@markmitchell.com>
7884 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
7885 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7886 * lex.c (do_identifier): Don't use a second argument, or a type,
7887 when building LOOKUP_EXPRs.
7888 (do_identifier): Likewise.
7889 (do_scoped_id): Likewise.
7890 * method.c (hack_identifier): Improve error message.
7891 * pt.c (lookup_template_function): Don't needlessly call
7892 copy_to_permanent or build_min.
7893 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
7895 (do_decl_instantiation): Improve error message.
7896 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7897 (build_min): Copy the type to the permanent obstack, too.
7899 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
7901 * init.c (init_init_processing): Remove BI* handling.
7902 (build_builtin_call): Remove.
7903 (build_builtin_delete_call): New fn.
7904 (build_delete): Use it.
7906 1998-07-31 Mark Mitchell <mark@markmitchell.com>
7908 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7909 (maybe_check_template_type): New function.
7910 * decl.c (maybe_process_template_type_declaration): New function,
7911 split out from pushtag Call maybe_check_template_type.
7912 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
7913 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7914 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7915 * pt.c (template_class_depth_real): Generalization of ...
7916 (template_class_depth): Use it.
7917 (register_specialization): Use duplicate_decls for duplicate
7918 declarations of specializations.
7919 (maybe_check_template_type): New function.
7920 (push_template_decl_real): Fix comment.
7921 (convert_nontype_argument): Likewise.
7922 (lookup_template_class): Likewise. Avoid an infinite loop on
7924 (tsubst_friend_function): Fix comment.
7925 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7927 * semantics.c (begin_function_definition): Use
7928 reset_specialization to note that template headers don't apply
7929 directly to declarations after the opening curly for a function.
7931 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
7933 * decl.c (push_overloaded_decl): Use current_namespace instead of
7934 DECL_CONTEXT (decl) to determine where we go.
7936 * decl.c (lookup_name_real): Fix typo.
7938 1998-07-28 Mark Mitchell <mark@markmitchell.com>
7940 * friend.c (is_friend): Be lenient with member functions to deal
7941 with nested friends.
7943 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
7945 * class.c (finish_struct_1): Convert integer_zero_node to
7946 ssizetype before passing it to set_rtti_entry.
7947 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7948 of any size to a pointer.
7950 1998-07-27 Mark Mitchell <mark@markmitchell.com>
7952 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7953 (build_template_decl_overload): Remove.
7954 (set_mangled_name_for_decl): New function.
7955 (innermost_args): Remove is_spec parameter.
7956 (most_specialized, most_specialized_class): Remove declarations.
7957 (lookup_template_class): Add entering_scope parameter.
7958 (maybe_process_partial_specialization): New function.
7959 (finish_template_decl): Likewise.
7960 (finish_template_type): Likewise.
7961 * class.c (finish_struct): Clean up processing of member template
7963 * decl.c (pushtag): Fix formatting.
7964 (lookup_tag): Improve handling of pseudo-global levels.
7965 (make_typename_type): Adjust call to lookup_template_class.
7966 (shadow_tag): Use maybe_process_partial_specialization.
7967 (xref_tag): Improve handling of member friends.
7968 (start_function): Call push_nested_class before
7969 push_template_decl. Don't call push_template_decl for
7971 * decl2.c (grok_x_components): Don't call xref_tag for
7972 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
7973 (grokclassfn): Use set_mangled_name_for_decl.
7974 (arg_assoc_class): Adjust call to innermost_args.
7975 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7976 * error.c (dump_function_name): Improve printing of template
7978 * friend.c (is_friend): Don't compare types of decls to determine
7979 friendship, unless flag_guiding_decls.
7980 (make_friend_class): Partial specializations cannot be friends.
7981 (do_friend): Use set_mangled_name_for_decl. Call
7982 push_template_decl_real instead of push_template_decl.
7983 * method.c (build_decl_overload_real): Remove prototype. Give it
7985 (build_overload_identififer): Adjust call to innermost_args.
7986 (build_template_decl_overload): Remove.
7987 (set_mangled_name_for_decl): New function.
7988 * parse.y (.finish_template_type): New non-terminal.
7989 (template_def): Use finish_template_decl. Use template_extdef
7991 (template_extdef, template_datadef): New non-terminals, containing
7992 only those rules for things which can be templates.
7994 (template_type, self_template_type): Use .finish_template_type.
7995 (named_class_head): Use maybe_process_partial_specialization.
7996 * pt.c (mangle_class_name_for_template): Remove context parameter.
7997 (get_class_bindings): Remove outer_args parameter.
7998 (complete_template_args): Remove.
7999 (add_outermost_template_args): New function.
8000 (register_specialization): Return the specialization.
8001 (unregister_specialization): New function.
8002 (tsubst_template_parms): Likewise.
8003 (most_specialized, most_specialized_class): Prototype here as
8005 (original_template): Rename to most_general_template.
8006 (tsubst_template_parms): New function.
8007 (set_mangled_name_for_template_decl): Likewise.
8008 (TMPL_ARGS_DEPTH): New macro.
8009 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8010 (TMPL_ARGS_LEVEL): New macro.
8011 (SET_TMPL_ARGS_LEVEL): Likewise.
8012 (TMPL_ARG): Likewise.
8013 (SET_TMPL_ARG): Likewise.
8014 (TMPL_ARGS_DEPTH): Likewise.
8015 (finish_member_template_decl): Use finish_template_decl.
8016 (maybe_process_partial_specialization): New function, split out
8018 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8019 (maybe_begin_member_template_processing): Use new macros.
8020 (is_member_template): Likewise.
8021 (is_member_template_class): Likewise.
8022 (add_to_template_args): Likewise. Deal with multiple levels of
8024 (maybe_process_partial_specialization): New function.
8025 (retrieve_specialization): Add consistency check.
8026 (determine_specialization): Return full argument list.
8027 (check_explicit_specialization): Tweak friend handling. Use full
8028 argument lists. Simplify.
8029 (current_template_args): Use new macros.
8030 (push_template_decl_real): Change ill-named mainargs to specargs.
8031 Check that a partial specialization actually specializes at least
8032 one parameter. Improve friend handling. Modify for full
8034 (classtype_mangled_name): Don't mangle the names of
8036 (lookup_template_class): Add entering_scope parameter. Use it to
8037 avoid finding a template type when an instantiation is required.
8038 Simplify. Use full template arguments.
8039 (tsubst_friend_function): Use unregister_specialization. Use new
8040 macros. Use full template arguments.
8041 (tsubst_friend_class): Substitute, using tsubst_template_parms,
8042 into the template parameters before passing them to
8043 redeclare_class_template.
8044 (instantiate_class_template): Simplify. Use full template
8045 arguments. Adjust calls to get_class_bindings. Use
8046 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
8047 (innermost_args): Use new macros.
8048 (tsubst_aggr_type): New function, split out from tsubst.
8049 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8050 conventions for lookup_template_class. Refine handling of partial
8051 instantiations. Remove calls to complete_template_args.
8052 Simplify. Add consistency checks. Use set_mangled_name_for_decl
8053 and set_mangled_name_for_template_decl.
8054 (tsubst_copy): Use tsubst_aggr_type.
8055 (instantiate_template): Use full template arguments.
8056 (more_specialized): Improve formatting.
8057 (more_specialized_class): Adjust calls to get_class_bindings.
8058 (get_bindings_real): Don't call complete_template_args.
8059 (most_specialized): Don't overwrite input; create a new list.
8060 (most_specialized_class): Use most_general_template.
8061 (regenerate_decl_from_template): Use unregister_specialization.
8062 Use full template arguments.
8063 (instantiate_decl): Use full template arguments.
8064 (set_mangled_name_for_template_decl): New function.
8065 * semantics.c (begin_class_definition): Use
8066 maybe_process_partial_specialization.
8067 (finish_member_class_template): New function.
8068 (finish_template_decl): Likewise.
8069 (finish_template_type): Likewise.
8070 (typeck.c): Don't crash after issuing a compiler_error.
8071 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8073 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
8075 * typeck2.c (build_functional_cast): Handle default-initialization.
8077 * call.c (build_over_call): Pass 1 to popclass.
8079 * parse.y (direct_notype_declarator): Add precedence declaration
8080 to notype_unqualified_id case.
8081 * Makefile.in (EXPECT): Adjust.
8083 * tree.c (ovl_member): Fix for single function in OVL.
8085 1998-07-27 Dave Brolley <brolley@cygnus.com>
8087 * c-lex.c (yylex): Fix boundary conditions in character literal and
8088 string literal loops.
8090 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
8092 * decl.c (lookup_name_real): OK, do return the from_obj value
8093 unless got_object depends on template parms.
8095 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8097 * pt.c (coerce_template_parms): Also complain about local enums.
8099 * cp-tree.h: Add prototype for set_identifier_local_value.
8100 * decl.c (set_identifier_local_value_with_scope): Make static,
8102 * search.c (covariant_return_p): Likewise.
8103 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8105 * call.c (build_method_call): Only pull out the type of a destructor
8106 if it's a template type parm.
8107 * decl.c (lookup_name_real): Never return the from_obj value.
8109 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8111 * except.c (process_start_catch_block_old): Call start_decl_1 for
8113 * decl.c (start_decl_1): Avoid duplicate error.
8115 * init.c (expand_default_init): Only perform the initialization if
8116 it will do something.
8118 1998-07-23 H.J. Lu (hjl@gnu.org)
8120 * parse.y (base_class): Check for invalid base class.
8122 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8124 * decl2.c (import_export_template): Fold in...
8125 (import_export_class): ...to here. Handle dllimport/export.
8127 * class.c (build_vtable): Pass at_eof to import_export_vtable.
8128 (prepare_fresh_vtable): Likewise.
8129 * decl2.c (import_export_class): Split out...
8130 (finish_prevtable_vardecl): From here.
8131 * class.c (finish_struct_1): Call import_export_class if at_eof.
8133 * decl.c (start_function): #if 0 mysterious code I wrote and have
8135 * rtti.c (get_tinfo_fn): If this is for a class type, set
8138 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
8140 * inc/exception: Change terminate and unexpected to ().
8142 * parse.y (named_class_head_sans_basetype_defn): A
8143 named_class_head_sans_basetype followed by '{' or ':' is a defn.
8145 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
8147 * tree.c (canonical_type_variant): New fn to handle arrays.
8148 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8149 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
8150 * method.c (process_overload_item): Use build_overload_value for
8153 1998-07-20 Dave Brolley <brolley@cygnus.com>
8155 * lex.c (mbchar.h): #include it.
8156 (GET_ENVIRONMENT): New macro.
8157 (init_parse): Set character set based on LANG environment variable.
8158 (real_yylex): Handle multibyte characters in character literals.
8159 (real_yylex): Handle multibyte characters in string literals.
8161 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
8163 * lex.c (do_identifier): Look for class value even if we don't
8164 have a global value. Do implicit declaration if parsing is 2.
8165 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8168 1998-07-19 Mark Mitchell <mark@markmitchell.com>
8170 * decl.c (pushtag): Revert previous change.
8171 * pt.c (lookup_template_class): Don't put out debugging
8172 information for types that use template parameters.
8174 * decl.c (pushtag): Don't put out debugging information for
8175 compiler-generated typedefs.
8177 * error.c (dump_type_real): Don't crash when presented with
8178 intQI_type_node or the like.
8180 * semantics.c (finish_translation_unit): Fix spelling error in
8183 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
8185 * decl.c (lookup_name_real): Pull out single function here.
8186 (select_decl): Not here.
8187 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8189 * decl.c (qualify_lookup): Tweak again.
8191 * pt.c (lookup_template_class): Don't mess with the context of the
8193 * decl2.c (current_decl_namespace): Remove special handling for
8196 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8197 a member template specialization.
8199 * tree.c (ovl_member): Use decls_match to compare functions.
8200 * decl.c (decls_match): Check the context of a function.
8202 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8203 in Koenig lookup support rules.
8204 * semantics.c (finish_call_expr): Handle the new cases.
8206 * typeck.c (build_x_function_call): Handle overloaded methods.
8208 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8210 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8212 * semantics.c (finish_object_call_expr): Revert previous change.
8213 * call.c (build_new_method_call): Likewise. Instead, convert
8214 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8216 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8218 * decl.c (qualify_lookup): Handle templates.
8220 * decl2.c (do_using_directive): Don't pass ancestor.
8221 * decl.c (push_using_directive): Calculate ancestor.
8223 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8224 * decl.c (pushdecl): Move type shadowing handling from here...
8225 (duplicate_decls): ...to here.
8226 * decl.c (set_identifier_local_value_with_scope): New fn.
8228 (set_identifier_local_value, lookup_type_current_level): New fns.
8229 * decl2.c (do_local_using_decl): Handle types and binding level
8232 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8233 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8234 (lookup_namespace_name): Likewise.
8235 * typeck.c (build_unary_op): Not here anymore.
8237 * decl2.c (do_class_using_decl): Make sure we get an identifier.
8238 * class.c (handle_using_decl): Ignore TYPE_DECLs.
8240 * decl.c (qualify_lookup): New fn.
8241 (lookup_name_real): Use it.
8243 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8245 * decl2.c (add_using_namespace): When directly using a namespace
8246 that was indirect before, promote it.
8248 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8249 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8250 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8251 * decl.c (select_decl): Replace two flag parameters by one.
8252 (unqualified_namespace_lookup): Likewise, pass flag.
8253 (lookup_flags): New function.
8254 (lookup_name_real): Compute flags, pass them.
8255 (lookup_namespace_name): Call with zero-flag.
8256 * decl2.c (ambiguous_decl): Add flag parameter, complain only
8258 (lookup_using_namespace, qualified_lookup_using_namespace):
8259 Add flag parameter, pass them through.
8260 * lex.c (do_scoped_id): Call with zero-flag.
8262 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8264 * typeck.c (convert_for_assignment): Use comptypes.
8266 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8268 * semantics.c (finish_object_call_expr): Move test for the
8269 function called being a TYPE_DECL to ...
8270 * call.c (build_new_method_call): Here.
8272 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8274 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8275 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8277 * lex.c (looking_for_typename): Don't initialize.
8279 * decl2.c (ambiguous_decl): Clarify error message.
8281 * decl.c (push_using_directive): Iterate over namespaces used
8284 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8286 * decl2.c (add_using_namespace): Iterate over namespaces used
8289 * decl.c (lookup_name_real): Accept namespace aliases as locals.
8290 (cat_namespace_levels): Ignore aliases.
8291 (duplicate_decls): Ignore duplicate aliases.
8292 * decl2.c (do_namespace_alias): Process block level namespace
8293 aliases. Store alias with pushdecl. Remove odr errors.
8294 * parse.y (namespace_alias): New non-terminal.
8297 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8299 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8300 Handle TEMPLATE_TYPE_PARM.
8301 (arg_assoc): Rewrite.
8303 * pt.c (complete_template_args): Don't look at the context unless
8306 * method.c (build_decl_overload_real): Fix namespace handling.
8308 * typeck.c (build_unary_op): Extract a lone function from an
8311 * call.c (build_scoped_method_call): Handle getting a namespace
8312 for basetype in a destructor call.
8313 (check_dtor_name): Handle enums.
8315 * parse.y (using_directive): New nonterminal.
8316 (extdef, simple_stmt): Use it.
8318 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8320 * decl2.c (add_function): Move error message ...
8321 (arg_assoc_namespace): ... from here.
8323 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8325 * parse.y (namespace_qualifier): Fix multiple level handling.
8326 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8327 (arg_assoc): Don't skip the first argument of a function.
8329 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
8331 * search.c (my_tree_cons): Clean up.
8333 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8335 * call.c (joust): Don't warn about "confusing" conversions to the
8338 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8340 * class.c (push_nested_class): Complain about namespaces.
8341 * decl.c (start_decl): Enter the object's namespace.
8342 (cp_finish_decl): Leave it.
8343 (grokdeclarator): Likewise.
8344 * decl2.c (check_decl_namespace): New function.
8345 (finish_file): Call it.
8346 * parse.y (complex_direct_notype_declarator): Set complexity
8347 of namespace-qualified ids to -1, enter the namespace.
8349 * method.c (build_template_decl_overload): Expect _DECL as first
8350 parameter. Put context temporarily into current_namespace.
8351 * pt.c (check_explicit_specialization): Change caller.
8354 * init.c (build_offset_ref): Call mark_used and
8355 convert_from_reference for namespace members.
8357 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
8359 * search.c (my_tree_cons): The bitfield is at index 2.
8361 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
8363 * lang-options.h: Format changed to work with new --help support
8366 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
8368 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8369 Do Koenig lookup in CALL_EXPR.
8370 (arg_assoc): Handle error_mark.
8371 * lex.c (is_global): New function.
8372 (do_identifier): Expect arguments for Koenig lookup.
8373 * parse.y (primary): Add rules for calls of unqualified function calls.
8374 (do_id): Change call of do_identifier.
8375 * pt.c (finish_stmt_expr): Likewise.
8376 * semantics.c (finish_id_expr): Likewise.
8377 (finish_call_expr): Add integer parameter to indicate
8378 argument-dependent lookup.
8380 * decl.c (struct binding_level): New field using_directives.
8381 (push_using_decl): Not sorry anymore.
8382 (push_using_directive): New function.
8383 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8384 (unqualified_namespace_lookup): New function, code from ...
8385 (lookup_name_real): ... here.
8386 * decl2.c (lookup_using_namespace): Pass using list instead of
8388 (validate_nonmember_using_decl): New function.
8389 (do_nonmember_using_decl): New function.
8390 (do_toplevel_using_decl): Use them.
8391 (do_local_using_decl): New function.
8392 (do_using_directive): Support block-level directives.
8393 * parse.y (simple_stmt): Support using declarations and
8395 (namespace_qualifier, namespace_using_decl): New non-terminals.
8397 * xref.c (classname): New function.
8398 (GNU_xref_hier): Change class and base parameters to tree.
8399 * decl.c (xref_baseypes): Change caller.
8400 * friend.c (make_friend_class): Likewise.
8402 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8404 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8407 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8408 template template parameter, record its use.
8409 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8410 its template arguments if exists.
8412 * pt.c (coerce_template_template_parms): New function equivalent
8413 to coerce_template_parms when IS_TMPL_PARM is true.
8414 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
8415 all callers changed.
8417 (coerce_template_parms): Access ARGLIST properly when creating a
8418 new vector. Only accept implicit TYPE_DECL as valid argument for
8419 a template template parameter when it is a base class of
8420 current_class_type. Don't display error message when COMPLAIN is
8423 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
8425 * repo.c (get_base_filename): Use file_name_nondirectory.
8426 (open_repo_file): Likewise.
8427 * cp-tree.h (file_name_nondirectory): Add prototype.
8429 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
8431 * friend.c (do_friend): Pull the identifier out of declarator.
8432 Use cp_error and friends.
8433 * decl2.c (qualified_lookup_using_namespace): Fix call to
8435 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8436 (grokvardecl): Use DECL_CLASS_SCOPE_P.
8437 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8438 * class.c (warn_hidden): Fix for OVERLOAD.
8439 From grahams@rcp.co.uk:
8440 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8441 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8443 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
8445 * g++.1 (-traditional): Remove duplicated documentation.
8447 1998-07-11 Mark Mitchell <mark@markmitchell.com>
8449 * method.c (flush_repeats): Add nrepeats parameter.
8450 (issue_nrepeats): Likewise.
8451 (is_back_referenceable_type): New function. Don't back-reference
8452 TEMPLATE_TYPE_PARMs as well as simple types like integers.
8453 (build_mangled_name_for_type): Likewise.
8454 (build_mangled_name_for_type_with_Gcode): Likewise.
8456 (nrepeats): Likewise.
8457 (Nrepeats): Likewise.
8458 (start_squangling): Don't clear the variables removed above.
8459 (end_squangling): Likewise.
8460 (flush_repeats): Tidy. Use nrepeats parameter rather than
8462 (issue_nrepeats): Likewise, but with nrepeats global. Use
8463 is_backreferenceable_type.
8464 (build_overload_nested_name): Tidy. Add comment. Use
8465 build_mangled_name_for_type.
8466 (build_underscore_int): Comment.
8467 (build_overload_scope_ref): Use build_mangled_name_for_type.
8468 (build_overload_int): Likewise.
8469 (build_template_template_parm_names): Tidy.
8470 (build_template_parm_names): Use build_mangled_name_for_type.
8471 (build_overload_identifier): Add comments.
8472 (build_mangled_name_for_type_with_Gcode): Split out from
8474 (build_mangled_name_for_type): Use it.
8475 (build_mangled_name): Rework to use build_mangled_name_for_type
8476 and to not use global nrepeats/Nrepeats. Tidy.
8477 (process_modifiers): Tidy.
8478 (check_btype): Use is_backreferenceable_type. Add comment.
8479 Rename `node' to `type'.
8480 (process_overload_item): Set numeric_output_need_bar here.
8481 Use build_mangled_name_for_type. Tidy.
8482 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
8483 build_mangled_name_for_type.
8485 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8488 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
8490 * cp-tree.h (warn_long_long): Define.
8491 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8492 warning "ANSI C++ does not support `long long'".
8493 * decl2.c (warn_long_long): Define.
8494 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8496 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
8498 * decl.c (xref_tag): Handle attributes between 'class' and name.
8499 * parse.y (aggr): Likewise.
8500 * semantics.c (finish_class_definition): Likewise.
8501 * Makefile.in (EXPECTED): Adjust.
8503 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8504 * decl2.c: Define them.
8505 (lang_decode_option): Handle them.
8506 * lang-options.h: Add -foptional-diags.
8507 * class.c (finish_struct): Don't complain about multiple meanings of
8508 name if -fno-optional-diags.
8509 * decl.c (pushdecl_class_level): Likewise.
8510 * lex.c (real_yylex): Check warn_multichar.
8512 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
8514 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8516 * tree.c (make_binfo): Fix length.
8518 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
8520 * decl2.c (lang_decode_option): Remove warn_template_debugging.
8521 * lang-options.h: Likewise.
8523 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8525 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8526 (process_start_catch_block): Likewise for variables
8527 `false_label_rtx', `call_rtx' and `return_value_rtx'.
8529 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
8531 * tree.c (build_srcloc): Make sure we allocate this node on the
8534 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
8536 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8537 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8538 (lang_specific_driver): Only add -lm automatically if need_math is
8541 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
8543 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
8545 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8547 * Makefile.in (EXPR_H): New dependency variable.
8548 (decl2.o): Depend on $(EXPR_H).
8549 (typeck.o): Likewise.
8553 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
8555 * decl.c (start_enum): Put local enums on permanent_obstack.
8557 1998-06-25 Mark Mitchell <mark@markmitchell.com>
8559 * cp-tree.h (c_get_alias_set): Declare.
8560 * decl.c (init_decl_processing): Set lang_get_alias_set.
8562 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
8564 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8565 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8566 flag for all function decls which are in the exception table.
8567 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8568 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8569 code is emitted for any referenced rtti function.
8571 1998-06-25 Dave Brolley <brolley@cygnus.com>
8573 * lang-specs.h: Use new | syntax to eliminate
8574 string concatenation.
8576 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
8578 * cp-tree.h (CP_DECL_CONTEXT): New macro.
8579 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8580 * method.c (build_overload_nested_name): Likewise.
8581 * sig.c (build_signature_pointer_or_reference_type): Don't set
8584 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8586 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8587 * cp-tree.h (FROB_CONTEXT): New macro.
8588 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8589 * decl.c (namespace_binding): Replace NULL_TREE with
8591 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8592 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8594 * decl.c (pushtag): Use FROB_CONTEXT.
8595 (pushdecl, make_typename_type, define_function, grokdeclarator):
8597 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8598 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8600 * decl2.c (decl_namespace): Return global_namespace if no context.
8601 * method.c (build_overload_nested_name): Expect null as context.
8602 * pt.c (mangle_class_name_for_template): Do nothing for null
8604 (lookup_template_class): Allow for null id_context.
8606 1998-06-25 Richard Henderson <rth@cygnus.com>
8608 * method.c (emit_thunk): Set current_function_is_thunk for the
8609 ASM_OUTPUT_MI_THUNK case as well.
8611 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8613 * exception.cc (__cplus_type_matcher): Get a match_info pointer
8614 instead of an exception table entry as a parameter.
8616 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8618 * parse.y (function_try_block): Don't call start_catch_handler.
8619 * except.c (call_eh_info): Remove coerced field from declaration.
8620 (build_eh_type_type_ref): New function to create an address of a
8621 rtti function for the new style exception tables.
8622 (expand_start_catch_block): Split function, this contains the
8624 (process_start_catch_block_old): New function to perform the rest
8625 of expand_start_catch_block under old style exceptions.
8626 (process_start_catch_block_old): New function to perform the rest
8627 of expand_start_catch_block under new style exceptions.
8628 (expand_end_catch_block): Only pop the false label off the stack under
8629 the old style of exceptions.
8630 * semantics.c (finish_try_block): Don't call start_catch_handler.
8631 * exception.cc (struct cp_eh_info): Add original_value field.
8632 (__cplus_type_matcher): Perform type matching on the original exception
8633 value, and if we have a match, set the current value.
8634 (__cp_push_exception): Set the original exception value.
8636 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
8638 * call.c (joust): Fix confusing conversion warning.
8640 * call.c (build_op_delete_call): Add placement parm. Check
8641 LOOKUP_SPECULATIVELY.
8642 * cp-tree.h, decl2.c, init.c: Adjust.
8643 * decl.c (finish_function): Use it.
8645 * pt.c (tsubst): Diagnose creating void fields or variables.
8647 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8649 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8651 * cp-tree.h (check_dtor_name): Add prototype.
8653 * init.c (expand_member_init): Remove unused variables
8654 `ptr_type_node', `parm' and `rval'.
8656 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8658 (lang_print_xnode): Likewise.
8660 * typeck2.c (enum_name_string): Cast argument to sprintf to long
8661 and use %ld specifier.
8663 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8664 specifier in call to fprintf.
8665 (GNU_xref_member): Cast argument to sprintf to int.
8667 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8669 * typeck2.c (pop_init_level): Warn about implicit zero initialization
8672 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8674 * cp-tree.h: Prototype function `check_java_method'.
8676 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8678 * class.c (finish_struct): Make conflicting use of id a pedwarn.
8679 * decl.c (pushdecl_class_level): Likewise.
8681 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8683 * pt.c (convert_nontype_argument): Issue an error when presented
8684 with an integer (real) constant that cannot be simplified to an
8687 * cp-tree.h (c_get_alias_set): Remove declaration added in
8688 1998-06-13 change that should never have been checked in.
8690 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8692 * typeck.c (build_binary_op_nodefault): Change % in format strings
8695 * decl.c (grokvardecl): Don't build_static_name for decls that
8696 aren't at namespace scope.
8698 * init.c (perform_member_init): Catch default-initialization of
8701 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8703 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8705 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8707 * method.c (hack_identifier): Complain about getting a namespace
8709 * typeck.c (decay_conversion): Remove check for namespaces.
8710 * typeck2.c (incomplete_type_error): Likewise.
8711 * parse.y (template_arg): Add PTYPENAME expansion.
8713 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
8715 * decl.c (grokvardecl): Don't build external assembler names for
8716 TYPENAMEs in other namespaces as there is no declarator.
8717 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8718 info from DECL_CONTEXT if it is NULL.
8720 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
8722 * call.c (check_dtor_name): Split out.
8723 (build_scoped_method_call): Use it.
8724 (build_method_call): Use it.
8725 * init.c (build_offset_ref): Use it.
8727 * typeck.c (build_static_cast): Fix handling of pointers to members.
8729 * decl.c (finish_function): Just return nothing from a constructor.
8730 * typeck.c (c_expand_return): Complain about returning a void
8731 expression from a destructor.
8733 1998-06-13 Mark Mitchell <mark@markmitchell.com>
8735 * class.c (alter_access): Accept a BINFO explaining how to get
8736 from the entity whose accessed is being altered to the type doing
8738 (handle_using_decl): New function containing code split out from ...
8739 (finish_struct_1): Here.
8741 * cp-tree.h (complete_type_or_else): Declare.
8742 * init.c (build_new_1, build_delete): Use it.
8743 * typeck.c (require_complete_type): Use complete_type, rather than
8744 expanding it inline.
8745 (complete_type_or_else): New function.
8746 (build_component_ref): Use it.
8747 (pointer_int_sum): Make sure the type pointed to is complete.
8748 (pointer_diff): Likewise.
8750 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8753 * search.c (get_matching_virtual): Note that member templates
8754 cannot override virtual functions.
8756 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
8758 * pt.c (check_explicit_specialization): If DECLARATOR turned into
8759 an error_mark_node from lookup_template_function, return the same.
8760 (determine_specialization): Also make sure TEMPLATE_ID isn't an
8761 error_mark_node, before we try to read its operands.
8762 * decl.c (grokdeclarator): If we got an error_mark_node from
8763 check_explicit_specialization, just return it right back.
8765 1998-06-12 Mark Mitchell <mark@markmitchell.com>
8767 * class.c (instantiate_type): Don't treat template-ids that don't
8768 specify any template arguments as equivalent to ordinary
8769 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
8770 pointer-to-members for member templates. Tidy slightly.
8771 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8772 * init.c (build_offset_ref): Handle template-ids like ordinary
8773 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8774 offset part of the OFFSET_REF.
8775 * typeck.c (build_unary_op): Change check for unknown types to
8776 look for OFFSET_REFs, not SCOPE_REFs.
8778 1998-06-11 Mark Mitchell <mark@markmitchell.com>
8780 * pt.c (is_member_template_class): New function.
8781 (push_template_decl_real): Use it.
8783 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
8785 * friend.c (do_friend): Add support for nested classes using
8786 member functions of the enclosing class as friends.
8788 1998-06-10 Mark Mitchell <mark@markmitchell.com>
8790 * call.c (convert_default_arg): Make global, not static.
8791 (convert_arg_for_ellipsis): Split out from ...
8792 (build_over_call): Here.
8793 * cp-tree.h (convert_default_arg); Declare.
8794 (convert_arg_to_ellipsis): Likewise.
8795 (do_member_init): Remove.
8796 * init.c (do_member_init): Remove; this code is dead.
8797 (expand_member_init): Remove much of this code; it is dead.
8798 * typeck.c (convert_arguments): Use convert_default_arg and
8799 convert_arg_for_ellipsis, rather than duplicating here.
8801 * call.c (convert_like): Don't fail silently if
8802 build_user_type_conversion fails. Always return error_mark_node
8805 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8807 * search.c (covariant_return_p): Complain about ambiguous base.
8809 * typeck.c (build_component_ref): Diagnose ref to nested type.
8811 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8813 * decl.c (grokparms): Check that INIT isn't an error_mark_node
8814 before giving error about invalid type for default arg.
8816 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8818 * call.c (build_method_call): Fix thinko.
8820 1998-06-10 Dave Brolley <brolley@cygnus.com>
8822 * decl2.c (lang_decode_option): New argc/argv interface.
8823 * cp-tree.h (lang_decode_option): New argc/argv interface.
8824 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8825 specified for cpplib-enabled compilers.
8826 * lex.c (lang_init): Don't check_newline for cpplib.
8827 (init_parse): Don't initialize cpplib here.
8829 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8831 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8832 piece before checking DECL_MUTABLE_P.
8834 1998-06-10 John Carr <jfc@mit.edu>
8836 * tree.c (debug_binfo): Make printf format match arguments.
8838 * error.c (OB_PUTI): Make printf format match arguments.
8840 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8842 * init.c (perform_member_init): Handle default-initialization.
8844 * except.c (build_throw): Handle throwing NULL.
8846 * typeck.c (build_x_function_call): Use resolve_offset_ref.
8848 * search.c (compute_access): Only strip an anonymous union
8851 * call.c (add_builtin_candidates): Tweak.
8853 * cvt.c (build_expr_type_conversion): Restore code for conversion
8855 * decl2.c (delete_sanity): Use it. Clean up.
8857 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8859 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
8861 * typeck.c (c_expand_return): Don't warn about void expressions on
8862 return statements in functions returning void.
8864 1998-06-09 Mark Mitchell <mark@markmitchell.com>
8866 * pt.c (fn_type_unification): Revise documentation. Tidy.
8867 (type_unification): Likewise.
8869 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
8871 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8873 * parse.y (function_try_block): Rename expand_start_catch, and delete
8875 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8878 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
8880 * search.c (lookup_member): New fn.
8881 * class.c (finish_struct_1): Use it.
8882 * decl.c (lookup_name_real): Use it.
8884 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8886 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8888 * cp-tree.h: Add prototype for `maybe_print_template_context' and
8889 `maybe_make_one_only'.
8891 * decl.c (auto_function): Remove unused variable `decl'.
8893 * decl2.c: Include dwarf2out.h and dwarfout.h.
8895 * lex.c: Remove redundant declarations of `set_float_handler' and
8898 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
8900 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8901 time flag. Call __cp_eh_info instead of __cp_exception_info.
8902 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8903 (__cp_exception_info): Return offset into cp_eh_info structure to
8904 match what use to be the start of this structure.
8905 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8906 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8908 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8909 __cp_eh_info instead of __cp_exception_info.
8911 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
8913 * decl.c (cp_finish_decl): Disable inlining of extern inlines
8914 with static variables.
8916 1998-06-08 Mark Mitchell <mark@markmitchell.com>
8918 * init.c (build_offset_ref): Correct previous change to use build,
8921 1998-06-07 Mark Mitchell <mark@markmitchell.com>
8923 * class.c (instantiate_type): Handle pointer-to-members where the
8924 member is a template.
8925 * init.c (build_offset_ref): Likewise.
8926 * typeck.c (build_unary_op): Likewise.
8928 1998-06-07 Richard Henderson <rth@cygnus.com>
8930 * lex.c (lang_init_options): New function.
8931 (lang_init): Remove flag_exceptions == 2 hack.
8933 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8935 * search.c (envelope_add_decl): Tweak for implicit typename.
8937 * call.c (joust): Also warn about confusing conversion op/constructor
8938 overload resolution.
8940 * spew.c (yylex): Also return the TYPE_DECL if got_object.
8941 Don't clear got_object after '~'.
8942 * call.c (build_scoped_method_call): Tweak destructor handling.
8943 (build_method_call): Likewise.
8944 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8945 TYPE_MAIN_VARIANT for destructors.
8946 * semantics.c (finish_object_call_expr): Complain about calling a
8949 1998-06-05 Per Bothner <bothner@cygnus.com>
8951 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8952 Define - update needed by gcc.c change.
8954 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8956 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8958 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8960 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8961 * decl.c (lookup_name_real): Add namespaces_only parameter.
8962 If set, return only NAMESPACE_DECLs.
8963 (select_decl): Likewise.
8964 (identifier_type_value): Give additional parameter.
8965 (lookup_name_nonclass): Likewise.
8966 (lookup_name): Likewise.
8967 (find_binding): Skip namespace aliases.
8968 (binding_for_name): Likewise.
8969 (push_namespace): Check for namespace aliases.
8970 (lookup_name_namespace_only): New function.
8971 (begin_only_namespace_names, end_only_namespace_names): New functions.
8972 * decl2.c (set_decl_namespace): Skip namespace aliases.
8973 (do_using_directive): Likewise.
8974 (do_namespace_alias): Produce namespace aliases, fix alias
8976 * error.c (dump_decl): Support SCOPE_REF.
8977 * parse.y (extdef): Wrap lookup with namespace_only for namespace
8978 aliases and using declarations.
8980 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
8982 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8984 * error.c (dump_expr): Clean up NEW_EXPR case.
8986 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8988 Suggested by Brendan Kehoe
8989 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8990 treat it as using ::decl.
8992 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8994 * tree.c (mapcar): Support NEW_EXPR.
8996 * error.c (dump_expr): Support NEW_EXPR.
8998 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
9000 * method.c (make_thunk): Use overload machinery to make name.
9001 * search.c (covariant_return_p): New fn.
9002 (get_matching_virtual): Use it.
9004 * init.c (build_new_1): Fix check for void.
9006 1998-06-01 Per Bothner <bothner@cygnus.com>
9008 * cp-tree.h (TYPE_FOR_JAVA): New macro.
9009 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9010 java_int_type_node, java_long_type_node, java_float_type_node,
9011 java_double_type_node, java_char_type_node, java_boolean_type_node):
9012 New "primitive" types, with predefined names __java_byte etc.
9013 (record_builtin_java_type): New function.
9014 (init_decl_processing): Make Java types with record_builtin_java_type.
9015 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
9016 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
9017 (grokfndecl): Call check_java_method for Java classes.
9018 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
9019 (process_overload_item): Match types against specific
9020 java_XX_type_node types, rather than using is_java_type.
9021 * class.c (finish_struct_1): Don't add default copy constructor
9022 or operator= if TYPE_FOR_JAVA.
9023 (pop_lang_conext): Restore strict_prototyp proper if Java.
9024 * decl2.c (acceptable_java_type, check_java_method): New functions.
9025 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
9026 (tsubst): Move common statement after if statement.
9027 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
9029 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
9031 * pt.c (for_each_template_parm): Use first_rtl_op.
9033 * tree.c (build_cplus_array_type_1): Also check index_type for
9036 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
9038 * pt.c (tsubst): Always copy BINFO_BASETYPES.
9040 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
9042 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9045 1998-05-29 Mark Mitchell <mark@markmitchell.com>
9047 * decl.c (grokdeclarator): Don't complain about in-class
9048 initialization of static consts if we don't really know the type
9051 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
9053 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9054 * method.c (build_destructor_name): New fn.
9055 * decl2.c (maybe_retrofit_in_chrg): Split out...
9056 (grokclassfn): From here. Reorganize.
9057 * decl.c (grok_ctor_properties): Make sure ctors for types with
9058 vbases have the in_chrg parm.
9059 * pt.c (instantiate_class_template): Update
9060 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
9062 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9064 1998-05-28 Mark Mitchell <mark@markmitchell.com>
9066 * pt.c (instantiate_decl): Make test for whether or not static
9067 variables should be instantiated early match its comment.
9069 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
9071 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9073 (start_function): Call check_default_args.
9074 * decl2.c (grokfield): Don't call check_default_args.
9075 (check_default_args): Use cp_error_at.
9076 * lex.c (do_pending_defargs): Call check_default_args.
9078 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
9080 * call.c (build_method_call): Make sure get_type_value returns
9081 something before we try to use its TYPE_MAIN_VARIANT.
9082 (build_scoped_method_call): Likewise.
9084 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
9086 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9087 initialize an array.
9089 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9092 * friend.c (do_friend): Clarify template warning.
9094 1998-05-27 Mark Mitchell <mark@markmitchell.com>
9096 * decl.c (shadow_label): Don't treat decls as identifiers.
9097 (maybe_push_to_top_level): Clear shadowed_labels.
9099 * pt.c (instantiate_decl): Reset lineno and filename after calling
9100 regenerate_decl_from_template.
9102 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9105 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
9107 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9109 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9111 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9112 (convert_nontype_argument): Handle cases when nontype template
9113 parameters become classes after substitution.
9115 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9117 * friend.c (is_friend): Use comptypes, rather than == to compare
9118 types. Modify for new representation of template friends.
9119 (make_friend_class): Likewise.
9120 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
9121 (instantiate_class_template): Deal with template friends.
9123 * decl.c (store_parm_decls): Remove redundant call to
9124 expand_main_function.
9126 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
9128 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9131 1998-05-26 Per Bothner <bothner@cygnus.com>
9133 * language_as_string: Handle lang_java.
9135 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
9137 * decl.c (pushdecl): Don't copy the type_decl.
9139 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9141 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9143 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9145 * parse.y (complex_direct_notype_declarator): Use $1 to access
9146 scope of notype_qualified_id.
9148 1998-05-26 Dave Brolley <brolley@cygnus.com>
9150 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9151 (init_parse): Initialize cpplib interface.
9153 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9156 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9158 * decl.c (pushtag): Avoid crashing on erroneous input.
9160 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9162 * decl.c (push_namespace): Only produce one unique name for
9163 anonymous namespaces.
9164 (get_unique_name): Remove.
9166 1998-05-25 Mark Mitchell <mark@markmitchell.com>
9168 * call.c (tourney): Don't do any extra comparisons.
9170 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9172 * cp-tree.h (processing_template_parmlist): Declare.
9173 * decl.c (pushtag): Don't call push_template_decl when we
9175 * pt.c (processing_template_parmlist): New variable.
9176 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9177 (complete_template_args): Use it.
9178 (add_to_template_args): Likewise.
9179 (innermost_args): Likewise.
9181 (begin_template_parm_list): Use processing_template_parmlist.
9182 (end_template_parm_list): Likewise.
9184 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9185 * decl.c (grokdeclarator): Use it.
9186 * decl2.c (grok_x_components): Likewise.
9187 * init.c (initializing_context): Likewise.
9188 * method.c (do_build_copy_constructor): Likewise.
9189 (do_build_assign_ref): Likewise.
9190 * search.c (compute_access): Likewise.
9191 * typeck.c (build_component_ref): Likewise.
9193 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9194 unnamed type a typedef name "for linkage purposes".
9196 * pt.c (lookup_template_class): Don't look at
9197 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9199 * method.c (build_overload_int): Handle error cases gracefully.
9201 * pt.c (instantiate_decl): Handle static member variables
9204 * pt.c (tsubst): Use the tsubst'd type when producing new
9205 TEMPLATE_PARM_INDEX nodes.
9207 1998-05-24 Mark Mitchell <mark@markmitchell.com>
9209 * tree.c (cp_tree_equal): Handle pointers to member functions.
9211 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
9212 sure the type of the REF_BIND is a reference type.
9213 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9214 target_type for clarity.
9216 * parse.y (xcond): Move call to condition_conversion ...
9217 * semantics.c (finish_for_cond): Here.
9218 * parse.c: Regenerated.
9220 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
9222 * decl.c (push_namespace): Namespaces have type void.
9223 * typeck2.c (incomplete_type_error): Complain about namespace
9225 * typeck.c (decay_conversion): Likewise.
9227 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9229 * error.c (dump_expr): Support namespaces.
9231 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
9233 * cp-tree.def: Add SRCLOC.
9234 * cp-tree.h: Add struct tree_srcloc and accessor macros.
9235 * tree.c (build_srcloc, build_srcloc_here): New fns.
9236 * pt.c (add_pending_template): Use build_srcloc_here.
9237 (push_tinst_level): Update last_template_error_tick before erroring.
9238 (instantiate_decl): Restore lineno and input_filename before
9239 calling add_pending_template.
9240 * decl2.c (finish_file): Set up lineno and input_filename for
9243 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9245 * decl.c (lang_print_error_function): New fn.
9246 (init_decl_processing): Set print_error_function to use it.
9247 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9249 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9252 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9253 copy-initialization.
9255 * class.c (build_vtable_entry): Use int_fits_type_p.
9256 (build_vtable): Pass a signed offset to build_vtable_entry.
9257 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9258 set_rtti_entry): Likewise.
9260 1998-05-22 Per Bothner <bothner@cygnus.com>
9262 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
9263 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
9265 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9267 * pt.c (print_template_context): Use fprintf instead of cp_error.
9269 * pt.c (determine_specialization): Just return an error_mark_node.
9270 Also print the decl we want in error messages. If we complain,
9271 return error_mark_node.
9272 (tsubst_friend_function): Set lineno and input_filename so
9273 error messages will be useful.
9274 (instantiate_template): Just return an error_mark_node.
9275 (check_explicit_specialization): Don't mess with a returned
9278 * pt.c (print_template_context): Add new argument.
9279 (maybe_print_template_context): New fn.
9280 (push_tinst_level): Increment tinst_level_tick.
9281 (pop_tinst_level): Likewise.
9282 * errfn.c (cp_thing): Call maybe_print_template_context. Use
9283 xrealloc instead of xmalloc.
9285 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9287 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9289 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9290 if the template we looked up is the same as the one we already
9293 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
9295 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9296 (cpp_reader,parse_in): Add for cpplib.
9297 (check_newline): Call handle_sysv_pragma with new interface.
9298 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9300 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9301 (sub_getch): Call GETC for cpplib.
9303 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9304 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9306 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9308 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9310 * decl2.c (maybe_make_one_only): New fn.
9311 (import_export_vtable): Use it.
9312 (import_export_decl): Likewise.
9313 * pt.c (mark_decl_instantiated): Likewise.
9315 1998-05-21 Mark Mitchell <mmitchell@usa.net>
9317 * decl2.c (find_representative_member): Rename to ...
9318 (build_anon_union_vars): New function.
9319 (finish_anon_union): Fix stupidity of previous change.
9321 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
9323 * decl.c (grokfndecl): Handle definition of specialization in
9326 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9328 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9330 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9331 to look for type declarations.
9332 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9333 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9334 (finish_member_class_template): Declare.
9335 * decl.c (pushtag): Put member class templates on the
9336 CLASSTYPE_TAGS list, just as for ordinary member classes.
9337 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9338 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9339 IDENTIFIER_NAMESPACE_VALUEs.
9340 * parse.y (component_decl): Move code to ...
9341 * semantics.c (finish_member_class_template): New function.
9342 Don't put member class templates on the list of components for a
9344 * parse.c: Regenerated.
9345 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9346 In fact, don't use DECL_CONTEXT at all here.
9348 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
9350 * decl.c (record_unknown_type): New function.
9351 (init_decl_processing): Call it for the unknown and global type
9354 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9356 * decl2.c (find_representative_member): New function.
9357 (finish_anon_union): Use it.
9359 * cp-tree.h (MAIN_NAME_P): New macro.
9360 (DECL_MAIN_P): Likwise.
9361 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9362 (grokfndecl): Use the new macros.
9363 (grokdeclarator): Likewise.
9364 (start_function): Likewise.
9365 (store_parm_decls): Likewise.
9366 (finsh_function): Likewise.
9367 * friend.c (do_friend): Likewise.
9368 * typeck.c (build_function_call_real): Likewise.
9369 (build_unary_op): Likewise.
9371 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
9373 * decl2.c (start_objects, finish_objects, do_dtors,
9374 do_ctors): Split out from...
9375 (finish_file): ...here.
9377 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
9379 * tree.c (is_overloaded_fn): Don't abort on placeholders from
9382 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
9384 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9386 * error.c (dump_expr): Handle an ARROW_EXPR.
9388 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
9390 * decl.c (saveable_obstack): Declare.
9391 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9392 declare, if necessary.
9394 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
9396 * call.c (compare_qual): Remove.
9398 (is_properly_derived_from): New function.
9399 (maybe_handle_ref_bind): Likewise.
9400 (maybe_handle_implicit_object): Likewise.
9401 (compare_ics): Modify substantially to bring into conformance with
9403 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9404 (comp_cv_qualification): Declare.
9405 (comp_cv_qual_signature): Likewise.
9406 * typeck.c (comp_cv_qualification): Likewise.
9407 (comp_cv_qual_signature): Likewise.
9409 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9411 * Makefile.in (parse.o): Depend on toplev.h.
9413 * class.c (typecode_p): Remove prototype and definition.
9415 * cp-tree.h (currently_open_class, is_empty_class, member_p):
9418 * decl.c (push_overloaded_decl_top_level): Remove prototype and
9421 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9422 in call to `cp_thing'.
9423 (cp_warning): Likewise for function pointer `warning'.
9425 * except.c (do_function_call): Remove prototype and definition.
9426 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9428 * method.c (is_java_type): Add prototype and make it static.
9430 * parse.y: Include toplev.h.
9432 * pt.c (type_unification): Remove unused variable `arg'.
9433 (instantiate_decl): Likewise for `save_ti'.
9435 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9437 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
9439 * init.c (build_member_call): Handle template_ids.
9440 * parse.y (primary): Add global_scope template_id.
9442 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
9444 * decl2.c (get_sentry): Use end_temporary_allocation.
9445 Don't declare permanent_obstack.
9447 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
9449 * parse.y (.finish_new_placement): New non-terminal.
9450 (unary_expr, new_type_id): Use it.
9451 * parse.c: Regenerated.
9453 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
9455 * pt.c (redeclare_class_template): Say where the original definition
9456 of the template-parameter's default argument appeared.
9458 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
9460 * call.c (build_over_call): Tweak empty class handling.
9462 * decl.c (make_typename_type): Use currently_open_class.
9464 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9466 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9468 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9469 for a type unless it is one.
9471 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9473 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
9475 * Makefile.in (program_transform_name, objdir): Define.
9477 * Makefile.in (BISON): Use bison from the build tree if it exists.
9480 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9482 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9484 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9486 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
9488 * call.c (build_scoped_method_call): Likewise.
9490 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
9492 * init.c (build_new_1): Call suspend_momentary around the creation
9493 of values that must be saved for exception handling.
9494 * parse.y (.build_new_placement): New non-terminal.
9495 (unary_expr, new_placement): Use it.
9496 * parse.c: Regenerated.
9498 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
9500 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9503 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9506 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9508 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
9510 * decl.c (start_decl): Revert problem change.
9512 * Makefile.in (CONFLICTS): Fix.
9514 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9516 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9518 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9520 * class.c (finish_struct_1): Use BINFO_SIZE.
9522 * decl.c (start_decl): Use 'tem'.
9524 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
9526 * exception.cc: Include eh-common.h.
9527 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9528 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9529 (__cp_push_exception): Initialize eh_info struct as well.
9530 * except.c: Remove local structs and include eh-common.h.
9531 (init_exception_processing): Set language and version codes.
9532 (call_eh_info): Add presence of eh_info to runtime description of
9534 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9535 * semantics.c (finish_try_block): Call start_catch_block() and
9537 * parse.y (function_try_block): Call start_catch_block() and
9540 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
9542 * typeck.c (original_type): New function.
9543 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9544 to see if they're actually the same.
9545 * cp-tree.h (original_type): Declare.
9547 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9549 * Makefile.in (lex.o): Depend on output.h.
9551 * call.c (add_function_candidate): Remove unused variable `cand'.
9552 (add_conv_candidate): Likewise.
9553 (build_builtin_candidate): Likewise.
9555 * cp-tree.h: Add prototype for `types_overlap_p'.
9557 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9559 * decl2.c (merge_functions): Remove unused variables `tmp' and
9562 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9563 (code_as_string): Likewise.
9564 (language_as_string): Likewise.
9565 (parm_as_string): Likewise.
9566 (op_as_string): Likewise.
9567 (assop_as_string): Likewise.
9568 (cv_as_string): Likewise.
9570 * lex.c: Include output.h.
9572 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9574 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9577 * tinfo.cc (__class_type_info::dcast): Change the type of variable
9578 `i' from int to size_t.
9580 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9583 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
9585 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9586 DECL_NAMESPACE_SCOPE_P.
9587 (lang_decl_name): Likewise.
9588 * pt.c (tsubst_friend_function, tsubst): Likewise.
9589 * decl.c (pushdecl, redeclaration_error_message, start_decl,
9590 cp_finish_decl, start_function): Likewise.
9591 * class.c (finish_struct_1): Likewise.
9592 * call.c (build_over_call): Likewise.
9593 (compare_ics): Use DERIVED_FROM_P.
9595 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
9597 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9598 * method.c (build_mangled_name): Use it.
9599 (build_decl_overload_real): Likewise.
9601 * error.c (dump_simple_decl): New function, broken out from ...
9602 (dump_decl): Use it.
9604 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
9606 * ptree.c (lang_print_xnode): Add missing `break'.
9608 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9610 * call.c (add_template_candidate): Adjust for changes to
9611 fn_type_unification.
9612 (add_template_candidate_real): Likewise.
9613 (add_template_conv_candidate): Likewise.
9614 (build_user_type_conversion_1): Likewise.
9615 (build_new_function_call): Likewise.
9616 (build_object_call): Likewise.
9617 (build_new_op): Likewise.
9618 (build_new_method_call): Likewise.
9619 * class.c (instantiate_type): Likewise.
9620 * cp-tree.h (unification_kind_t): New type.
9621 (fn_type_unification): Adjust prototype.
9622 (type_unificaiton): Likewise.
9623 * pt.c (UNIFY_ALLOW_NONE): New macro.
9624 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9625 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9626 (UNIFY_ALLOW_DERIVED): Likewise.
9627 (unify): Change prototype.
9628 (maybe_adjust_types_for_deduction): New function.
9629 (check_cv_quals_for_unify): Likewise.
9630 (determine_specialization): Adjust.
9631 (fn_type_unification): Likewise.
9632 (type_unification): Likewise.
9633 (type_unification_real): Likewise. Use
9634 maybe_adjust_types_for_deduction. Fix mishandling of
9635 back-unification of template functions passed as arguments. Pass
9636 appropriate combination of UNIFY_ALLOW_* to unify.
9637 (unify): Remove unused NTPARMS parameter. Use
9638 check_cv_quals_for_unify. Remove bogus code that allowed
9639 too-generous unification in order to adhere more closely to standard.
9640 (get_bindings_real): Adjust.
9641 (get_class_bindings): Likewise.
9643 * method.c (build_overload_identifier): Only use the innermost
9644 template arguments when mangling.
9645 * pt.c (tsubst_template_argument_vector): New function.
9646 (complete_template_args): Deal with the situation where the
9647 extra_args contain more than one level of arguments.
9648 (lookup_template_class): Deal with member template classes, which
9649 may have more than one level of arguments.
9650 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9651 Improve handling of member template classes. Use
9652 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
9653 tsubst_template_argument_vector where appropriate.
9654 (regenerate_decl_from_template): Break out from ...
9655 (instantiate_decl): Here.
9657 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9658 * parse.h: Regenerated.
9659 * parse.c: Really regenerated.
9661 * cp-tree.h (finish_unary_op_expr): New function.
9662 (finish_id_expr): Likewise.
9663 (begin_new_placement): Likewise.
9664 (finish_new_placement): Likewise.
9665 (finish_declarator): Likewise.
9666 (finish_translation_unit): Likewise.
9667 (finish_parmlist): Likewise.
9668 (begin_class_definition): Likewise.
9669 (finish_class_definition): Likewise.
9670 (finish_default_args): Likewise.
9671 (finish_inline_definitions): Likewise.
9672 * parse.y (GCC_ASM_KEYWORD): Remove.
9673 (TYPENAME_ELLIPSIS): Likewise.
9674 * parse.c: Regenerated.
9675 Use new functions in semantics.c in the actions for many rules.
9676 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9677 * hash.h: Regenerated.
9678 * semantics.c (finish_expr_stmt): Allow NULL expr.
9679 (finish_unary_op_expr): New function, containing
9680 code previously in parse.y.
9681 (finish_id_expr): Likewise.
9682 (begin_new_placement): Likewise.
9683 (finish_new_placement): Likewise.
9684 (finish_declarator): Likewise.
9685 (finish_translation_unit): Likewise.
9686 (finish_parmlist): Likewise.
9687 (begin_class_definition): Likewise.
9688 (finish_class_definition): Likewise.
9689 (finish_default_args): Likewise.
9690 (finish_inline_definitions): Likewise.
9692 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
9694 * typeck.c (build_c_cast): Don't decay arrays and functions to
9695 pointer type when converting to a class type.
9697 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
9699 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9700 (DECL_CLASS_SCOPE_P): Likewise.
9702 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
9704 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9705 * decl2.c (constructor_name_full): Likewise.
9707 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
9709 * tree.c (mapcar): Add OVERLOAD support.
9711 * init.c (resolve_offset_ref): We must use basetype_path before we
9712 destroy it with a call to convert_pointer_to.
9714 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9716 * class.c (currently_open_class): New fn.
9717 * decl.c (lookup_name_real): Use it.
9718 * search.c (lookup_field): Likewise.
9720 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9722 * cp-tree.def (OVERLOAD): New node.
9723 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9724 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9725 (NAMESPACE_BINDING): Remove.
9726 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9728 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9730 (tree_overload): New struct.
9731 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9732 (REAL_IDENTIFIER_TYPE_VALUE): Define.
9733 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9734 (lang_decl_flags): Remove in_namespace.
9735 (lang_decl): Remove chain.
9736 (DECL_CHAIN, DECL_NAMESPACE): Remove.
9737 (flag_honor_std): Declare extern.
9738 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9739 namespace_binding, set_namespace_binding,
9740 lookup_function_nonclass, cat_namespace_levels,
9741 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9742 scratch_ovl_cons, ovl_member, build_overload): Declare.
9743 (decl_list_length, get_namespace_id, current_namespace_id,
9744 overloaded_globals_p): Remove.
9745 (lookup_using_namespace, qualified_lookup_using_namespace): Change
9747 (push_scratch_obstack): New macro.
9748 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9749 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9751 (build_new_function_call): Iterate using OVL_CHAIN.
9752 Print DECL_NAME in when reporting ambiguities.
9753 (build_object_call): Iterate using OVL_NEXT for fns, convs.
9754 (build_new_op): Call lookup_function_nonclass.
9755 Iterate using OVL_NEXT.
9756 (build_op_delete_call): Change detection of members.
9757 Do not wrap TREE_LIST around fields and single global functions.
9758 (build_over_call): Don't push a class level if the context is a
9760 (build_new_method_call): Iterate using OVL_NEXT.
9761 * class.c (add_method): Chain overloaded members using
9762 build_overload. Remove copying of method.
9763 (grow_method): When iterating through the obstack, expect OVERLOAD
9764 nodes. Chain overload members.
9765 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
9766 nodes in call to get_baselinks.
9767 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9768 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
9769 fdecls that are OVERLOAD nodes.
9770 (validate_lhs): New function.
9771 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
9772 code. Use DECL_NAME in error messages. Split code between global
9773 and member function processing.
9774 * decl.c (global_type_node): New static variable.
9775 (in_std): New global.
9776 (struct binding_level): New field usings.
9777 (resume_binding_level): Assert that we are not in a class.
9778 (toplevel_bindings_p): Just check for namespace_p or
9780 (resume_level): Remove.
9781 (find_binding): New function.
9782 (binding_for_name): Call it.
9783 (namespace_binding, set_namespace_binding): New functions.
9784 (push_namespace): Associate binding level with new namespace,
9785 resume_binding_level for existing namespace. Remove old code.
9786 Fake std by counting.
9787 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9788 (maybe_push_to_top_level): Save current namespace.
9789 (pop_from_top_level): Restore saved namespace.
9790 (pop_namespace): Call suspend_binding_level. Remove old code.
9791 (cat_namespace_levels): New function.
9792 (set_identifier_type_value_with_scope): For namespace bindings,
9793 set BINDING_TYPE, and use global_type_node.
9794 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9795 (identifier_type_value): New function.
9796 (pushtag): If no context, use current_namespace.
9797 (duplicate_decls): Don't process DECL_CHAIN.
9798 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9799 already set. Never reset it to NULL_TREE. Lookup global variables
9800 in their namespace. Push overloaded templates if they are on
9802 (pushdecl_namespace_level): New function.
9803 (pushdecl_top_level): Implement using pushdecl_namespace_level.
9804 (pushdecl_using_decl): New function.
9805 (overloaded_globals_p): Remove.
9806 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9807 them. Use namespace_binding and set_namespace_value.
9808 (redeclaration_error_message): Complain if the declarations come
9809 from different namespaces.
9810 (lookup_tag): On namespace level, look in the BINDING_TYPE.
9811 (lookup_namespace_name): Pass tree_bindings from stack. Remove
9813 (select_decl): New function.
9814 (lookup_name_real): Call it for qualified and unqualified lookup.
9815 Pass tree_bindings from the stack.
9816 If prefer_type is 1, also accept namespaces.
9817 (lookup_function_nonclass): New function.
9818 (init_decl_processing): Set the binding level of the global
9819 namespace to global_binding_level.
9820 Build a proper type list for __builtin_apply.
9821 Initialize std_node to "fake std" if flag_honor_std is set.
9822 Initialize global_type_node.
9823 Allocated bad_alloc in namespace std if flag_honor_std.
9824 (define_function): Set the DECL_CONTEXT to the current_namespace.
9825 (start_decl): A namespace is not considered as a context here. If
9826 the DECL_CONTEXT is a namespace, push the decl.
9827 (cp_finish_decl): Check for namespaces used as initializers.
9828 (grokfndecl): Add namespace parameter. Remove processing of
9830 (grokvardecl): Add namespace parameter.
9831 (grokdeclarator): Process SCOPEs that are namespaces. For
9832 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9833 (start_function): Check for contexts that are namespaces.
9834 Set context for declarations that have not been pushed.
9835 (store_parm_decls): Check for ::main only.
9836 (finish_function): Likewise.
9837 (start_method): Check for contexts that are namespaces.
9838 (start_method): Remove DECL_CHAIN processing.
9839 * decl2.c (flag_honor_std): Declare.
9840 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9841 (decl_namespace_list): New static global.
9842 (grok_x_components): Ignore namespaces as type contexts.
9843 (check_classfn): Expect OVERLOAD nodes.
9844 (grokfield): Remove DECL_CHAIN processing.
9845 (finish_file): Call cat_namespace_levels.
9846 (merge_functions): New function.
9847 (ambiguous_decl): Rewrite.
9848 (lookup_using_namespace): Produce tree_bindings.
9849 (qualified_lookup_using_namespace): Likewise.
9850 (set_decl_namespace, decl_namespace, current_decl_namespace,
9851 push_decl_namespace, pop_decl_namespace): New functions.
9852 (arg_lookup): New struct.
9853 (add_function, arg_assoc_namespace, arg_assoc_class,
9854 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9856 (get_namespace_id, current_namespace_id): Remove.
9857 (do_toplevel_using_decl): Rewrite.
9858 (do_class_using_decl): Complain about namespace qualifiers.
9859 (do_using_directive): Sorry if not on namespace level. Complain
9860 about unknown namespaces.
9861 * error.c (dump_aggr_type): Check for namespace contexts.
9862 * except.c (init_exception_processing): Push terminate into std.
9863 * friend.c (is_friend): A namespace is not a context, here.
9864 * init.c (expand_member_init): Remove DECL_CHAIN processing.
9865 (build_offset_ref): Process OVERLOAD nodes.
9866 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9867 * lex.c (identifier_type): Loop using OVL_CHAIN.
9868 (see_typename): Set looking_for_typename to 2.
9869 (real_yylex): Likewise.
9870 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9871 (do_scoped_id): Expect OVERLOAD nodes.
9872 Change calling convention for qualified_lookup_using_namespace.
9873 (build_lang_decl): Don't set in_namespace anymore.
9874 * method.c (typevec_size): New global.
9875 (build_overload_nested_name): Return if global_namespace.
9876 Otherwise, always expect a declaration context.
9877 (build_qualified_name): Likewise.
9878 Make sure we don't write beyond typevec_size.
9879 (build_decl_overload_real): Likewise.
9880 Allocate one extra slot for the namespace.
9881 (hack_identifier): Mark code dead.
9882 Process OVERLOAD and NAMESPACE_DECL nodes.
9883 * parse.y (program): Pop namespaces until in global namespace.
9884 (extdef): In a using-declaration, don't discard the identifier if
9885 there is no declaration.
9886 (left_curly): Ignore type contexts which are namespaces.
9887 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9889 * pt.c (template_class_depth): Expect types to be namespaces.
9890 (determine_specialization): Simplify by expecting OVERLOAD nodes.
9891 (push_template_decl): Push into namespace level.
9892 Reset ctx if it is a namespace.
9893 Set DECL_CONTEXT to current_namespace if not set already.
9894 Ignore real contexts that are namespaces.
9895 (mangle_class_name_for_template): Skip global_namespace.
9896 Mangle other namespaces as declarations.
9897 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9898 (lookup_template_class): Push into namespace of context.
9899 If the context is a namespace, set it to global_namespace.
9900 Use id_context for mangling.
9901 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9902 (tsubst_friend_function): Ignore namespace contexts.
9903 Push into namespace level.
9904 (tsubst): Handle NAMESPACE_DECL nodes.
9905 Remove DECL_CHAIN processing.
9906 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9907 * ptree.c (print_lang_identifier): Print bindings.
9908 (lang_print_xnode): Print OVERLOAD nodes.
9909 * rtti.c (init_rtti_processing): Push type_info into std.
9910 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9911 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9912 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9913 lookup_fnfields_here): Likewise.
9914 Process all nodes, instead of going through TREE_CHAIN.
9915 * sig.c (build_signature_pointer_or_reference_type): Set context
9916 to global_namespace.
9917 (build_signature_table_constructor): Expect OVERLOAD nodes.
9918 * spew.c (yylex): Save old setting of looking_for_typename.
9919 * tree.c (decl_list_length): Remove.
9920 (binding_init): New function.
9921 (count_functions): Rewrite.
9922 (is_overloaded_fn): Expect OVERLOAD nodes.
9923 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9924 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9925 ovl_member): New functions.
9926 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9927 (type_unknown_p): Likewise.
9928 (require_instantiated_type): Likewise.
9929 (build_component_ref): Declare code dead.
9930 (build_x_function_call): Create and expect OVERLOAD nodes.
9931 (build_function_call_real): Check for ::main only.
9932 (build_unary_op): Likewise. Expect OVERLOAD nodes.
9933 (convert_for_assignment): Check for TREE_LIST before accessing
9935 * decl.c (duplicate_decls): Check for namespace bindings instead
9937 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9938 lookup_name_current_level, start_decl, xref_tag,
9939 finish_enum): Likewise.
9940 * init.c (build_offset_ref): Likewise.
9941 * search.c (lookup_field): Likewise.
9942 (lookup_fnfields): Likewise.
9943 (dfs_debug_mark): Likewise.
9944 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9945 (poplevel_class, pop_from_top_level): Likewise.
9946 * decl2.c (finish_method): Likewise.
9947 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9948 * decl.c (record_builtin_type): Likewise.
9949 (init_decl_processing, grokfndecl): Likewise.
9950 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9951 (make_lang_type): Likewise.
9952 * parse.y (make_thunk): Likewise.
9953 * pt.c (tsubst): Likewise.
9954 * tree.c (debug_binfo): Likewise.
9955 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9956 tinfo2.cc, inc/new.h: Add std qualifications.
9957 * inc/new: Wrap with namespace std if __HONOR_STD.
9958 * inc/typeinfo: Likewise.
9960 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9962 * call.c (build_user_type_conversion_1): Handle second_conv
9963 properly for templates.
9965 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
9967 * method.c (build_decl_overload_real): Set TREE_USED flag to
9968 zero for build_type_variants nodes as well.
9970 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
9972 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9974 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
9976 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9977 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9978 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9979 xref.o): Add toplev.h dependencies.
9981 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
9983 * errfn.c (cp_error, cp_warning): Remove declarations for
9984 error and warning respectively.
9986 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9988 * error.c: Convert to using ctype macros defined in system.h.
9989 * method.c: Likewise.
9991 * lex.c: Likewise. Also remove redundant system header stuff.
9993 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
9995 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9996 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9997 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9998 xref.c: Add include of toplev.h.
10000 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10002 * tree.c (perm_manip): Also regenerate the RTL of an extern.
10003 (copy_to_permanent): Use end_temporary_allocation.
10005 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
10007 * init.c (expand_vec_init): The initialization of each array
10008 element is a full-expression.
10010 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
10012 * method.c (build_mangled_name): Add a call to build_type_variant
10013 to get the right type.
10015 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
10017 * Makefile.in: Add .SUFFIXES.
10019 * cp-tree.def: Remove NAMESPACE_DECL.
10021 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
10023 * call.c (build_over_call): Do evaluate arg even if it has empty
10025 * decl.c (start_function): Don't push a member function.
10027 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
10029 * Makefile.in (g++FAQ.info): Put -o option before input file.
10031 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
10033 * gxxint.texi: Add info for squangling codes K and B.
10035 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
10037 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10038 the expression in templates.
10039 (finish_stmt_expr): Likewise.
10041 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
10043 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10045 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
10047 * decl.c (maybe_push_to_top_level): Always clear
10048 current_template_parms and processing_template_decl.
10049 (pushtag): Remove check of current_class_type and some comments,
10050 since maybe_push_to_top_level no longer creates confusion.
10052 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
10054 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10055 (DECL_CLASS_TEMPLATE_P): Likewise.
10056 (DECL_PRIMARY_TEMPLATE): Likewise.
10057 (PRIMARY_TEMPLATE_P): Use it.
10058 (push_template_decl_real): New function.
10059 (redeclare_class_template): Take new template parameters as
10061 (is_specialization_of): New function.
10062 (comp_template_args): Declare.
10063 * decl.c (pushtag): Handle friend template classes.
10064 (xref_tag): Likewise. Use new calling convention for
10065 redeclare_class_template.
10066 * decl2.c (grok_x_components): Handle friend templates.
10067 * friend.c (is_friend): Use is_specialization_of where
10068 appropriate. Deal with friend class templates.
10069 (make_friend_class): Let a class template be friends with itself.
10070 * pt.c (comp_template_args): Remove declaration.
10071 (tsubst_friend_class): New function.
10072 (push_template_decl_real): New function.
10073 (push_template_decl): Use it.
10074 (redeclare_class_template): Adjust for new calling convention.
10075 (comp_template_args): Give it external linkage.
10076 (instantiate_class_type): Use tsubst_friend_class to deal
10077 with friend templates.
10078 * typeck.c (comptypes): Use comp_template_args, rather than
10079 expanding it inline.
10080 * parse.y (component_decl): Handle a nested template type
10081 like other component type declarations.
10083 * pt.c (check_explicit_specialization): Handle overloaded
10084 constructors correctly.
10086 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10087 (lookup_template_class): Use it.
10089 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10091 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
10092 * cp-tree.h: Add WRAPPER support.
10093 * call.c (add_candidate): Split out from add_*_candidate fns.
10094 (build_over_call): Take the candidate instead of function and args.
10095 Enforce access control here. Emit overload warnings here.
10096 (add_warning): New fn.
10097 (joust): Add WARN parm. If not set, call add_warning instead of
10098 printing a warning. Re-enable some warnings.
10099 (tourney): Pass it.
10100 (convert_like): Adjust.
10101 (build_new_op): Adjust.
10102 (build_new_function_call): Adjust.
10103 (build_user_type_conversion_1): Adjust.
10104 (USER_CONV_FN): Adjust.
10105 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10106 build_int_wrapper): New fns.
10108 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
10110 * pt.c (unify): Fix typo in previous change.
10112 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10114 * error.c (dump_type_real): Declare canonical_name.
10116 * typeck.c (comp_target_types): Fix PMFs.
10118 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
10120 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10121 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10124 * pt.c (tsubst): Decrease the template-level of
10125 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
10126 TEMPLATE_PARM_INDEX.
10127 (template_decl_level): New function.
10128 (unify): Make sure to record unifications for template
10129 parameters, even when the parameters exactly match the arguments.
10130 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10131 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
10132 aren't from the level we're currently working on.
10134 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
10136 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10138 * decl2.c (check_member_template): Set DECL_IGNORED for member
10139 class templates, too.
10141 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10143 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10145 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10147 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
10149 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10150 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10151 (init_decl_processing): Handle TI types.
10152 * typeck.c (unsigned_type, signed_type): Handle TI types.
10154 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
10156 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10157 New local added_libraries. Increment count when add library to
10160 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
10162 * cp-tree.h (type_as_string_real): New function.
10163 * pt.c (mangle_class_name_for_template): Use it.
10164 * error.c (dump_aggr_type): Change prototype.
10165 (dump_type_prefix): Likewise.
10166 (dump_type_suffix): Likewise.
10167 (dump_type_real): Convert from dump_type. If desired, the
10168 "canonica" name of a typedef, i.e., the name of the underlying
10169 type, can be printed.
10170 (dump_type): Call dump_type_real.
10172 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
10174 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10176 * typeck.c (comp_target_types): Tweak pedantic case.
10177 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
10178 Return -1 or 1 instead of 1 or 2.
10179 (compparms): Remove STRICT handling.
10180 (convert_for_assignment): Fix handling of pmfs.
10182 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
10184 * typeck.c (comp_target_types): Handle references like pointers.
10185 (comp_target_parms): Note that return code from comp_target_types
10186 can be negative to indicate failure.
10188 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10190 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10191 which requires a working target compiler to build.
10193 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
10195 * tree.c (avoid_overlap): Add prototype.
10197 * spew.c (num_tokens): Add prototype.
10198 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10200 * search.c (dfs_check_overlap): Add prototype.
10201 (dfs_no_overlap_yet): Likewise.
10203 * pt.c (original_template): Add prototype.
10204 (inline_needs_template_parms): Likewise.
10205 (push_inline_template_parms_recursive): Likewise.
10206 (retrieve_specialization, register_specialization): Likewise.
10207 (print_candidates, reduce_template_parm_level): Likewise.
10208 (build_template_decl, mark_template_parm): Likewise.
10209 (tsubst_friend_function, get_bindings_real): Likewise.
10211 * method.c (start_squangling): Add prototype.
10212 (end_squangling, check_ktype, issue_ktype): Likewise.
10213 (build_overloaded_scope_ref, check_btype): Likewise.
10214 (build_mangled_template_parm_index): Likewise.
10216 * lex.c (init_cpp_parse): Add prototype.
10217 (handle_cp_pragma, handle_sysv_pragma): Likewise.
10218 (reduce_cmp, token_cmp): Likewise.
10220 * except.c (call_eh_info): Add prototype.
10221 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10222 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10224 * decl2.c (is_namespace_ancestor): Add prototype.
10225 (namespace_ancestor, add_using_namespace): Likewise.
10226 (ambiguous_decl): Likewise.
10228 * decl.c (indent): Add prototype.
10230 * call.c (add_template_candidate_real): Add prototype.
10232 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10234 * decl2.c (build_expr_from_tree): Just return a PMF.
10236 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
10238 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10239 when doing initializations.
10241 * pt.c (unify): Use comptypes to compare type args.
10243 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
10245 * decl.c (duplicate_decls): Fix check for when it's safe to free
10248 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10251 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
10253 * pt.c (build_template_parm_index): Add prototype.
10255 * search.c (my_tree_cons): Don't clear words outside the
10256 newly allocated node.
10258 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
10260 * lex.c (init_parse): Now returns char* containing the filename.
10262 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
10263 Jeff Law <law@cygnus.com>
10265 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10268 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10270 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10272 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10274 * decl.c (duplicate_decls): Don't warn for redundant decls if
10275 friend: let add_friend take care of it.
10277 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10279 * sig.c (build_signature_pointer_constructor): Don't set
10280 TREE_HAS_CONSTRUCTOR for a signature pointer.
10281 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10282 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10284 * typeck.c (build_unary_op): Only allow taking the address of a
10286 * typeck2.c (digest_init): Simplify.
10287 (store_init_value): Don't pedwarn about using { } for pmfs.
10289 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
10291 * cp-tree.h (start_decl): Update prototype.
10292 * decl.c (start_decl): Like the C version, new parameters
10293 for the attributes. Call cplus_decl_attributes here,
10294 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
10295 (grokdeclarator): Pass NULL for new start_decl arguments.
10296 * pt.c (tsubst_expr): Likewise.
10297 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
10298 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10299 * lex.c (build_lang_decl): Add lang_name_java.
10300 * class.c (push_lang_context): Add lang_name_java.
10301 * method.c (build_mangled_name): Check for is_java_type.
10303 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10305 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10306 * call.c (build_scoped_method_call): Check for TREE_CODE for
10307 VOID_TYPE instead of type == void_type_node.
10308 (build_method_call): Likewise.
10309 * decl.c (lookup_name_real): Likewise.
10310 (grokdeclarator): Likewise.
10311 (start_decl): Likewise.
10312 (grokparms): Likewise.
10313 (start_function): Likewise.
10314 (finish_function): Likewise.
10315 (start_method): Likewise.
10317 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
10319 * lex.c (finput): New variable.
10320 (init_cpp_parse): Renamed from init_parse.
10321 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
10322 (finish_parse): New function.
10323 * cp-tree.h (init_lex, init_parse): Remove declarations.
10325 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
10327 * call.c (build_call): Still evaluate the actual argument.
10328 * class.c (is_empty_class): Update for -fnew-abi.
10330 * decl2.c: -fnew-abi implies -fsquangle.
10332 * method.c (do_build_assign_ref): Don't do anything to copy
10334 (do_build_copy_constructor): Likewise.
10335 * call.c (build_over_call): Likewise.
10337 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10339 * tree.c (avoid_overlap): Return a value.
10341 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
10343 * method.c (check_btype): Add missing argument to xrealloc.
10344 (check_ktype): Likewise.
10346 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10348 Implement empty base optimization.
10349 * class.c (finish_struct_1): Add vbase fields earlier. Set
10350 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
10351 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10352 (types_overlap_p): New fn.
10353 * tree.c (avoid_overlap): New fn.
10354 (build_base_fields): Use it to avoid overlapping empty bases.
10355 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10357 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10359 Re-implement allocation of base class subobjects.
10360 * tree.c (unshare_base_binfos): New fn.
10361 (layout_basetypes): Use it. Now handles offsets of both virtual and
10362 non-virtual bases, after layout_type.
10363 (layout_vbasetypes): Remove.
10364 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10365 (build_vbase_pointer_fields): Split out from old layout_basetypes.
10366 * class.c (finish_base_struct): Lose offset handling code.
10367 Move nonvdtor warning here. Don't mess with t_binfo anymore.
10368 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
10369 * cp-tree.h: Adjust.
10371 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
10373 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10374 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10375 * class.c (duplicate_tag_error): Likewise.
10376 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10377 * tree.c (layout_vbasetypes): Update from layout_record, remove
10378 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10379 (layout_basetypes): Likewise.
10381 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
10383 * class.c, Make sure system.h is included just after config.h.
10384 Delete lingering stdio and errno references too.
10385 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10387 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
10389 * friend.c (is_friend): Fix access control for local classes.
10391 * class.c (is_empty_class): New fn.
10392 * call.c (build_call): Don't pass empty class objects to a function.
10394 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
10396 * call.c (build_over_call): Do name resolution for default
10397 arguments of function templates in the scope of the templates.
10399 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
10401 * call.c: Include system.h. Remove includes, declarations and
10402 defines provided by system.h.
10403 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10404 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10405 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10406 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10407 * typeck2.c, xref.c: Likewise.
10408 * Makefile.in: Dependencies updated as appropriate.
10409 * Make-lang.in: Likewise.
10411 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
10413 * pt.c (fn_type_unification): Allow incomplete unification without
10414 an immediate error message.
10416 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10418 * tree.c (member_p): New fn.
10419 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10420 initializing class members.
10422 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10423 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10425 * call.c (build_method_call): Handle non-scoped destructors, too.
10426 * pt.c (tsubst_copy): Likewise.
10428 * pt.c (print_template_context): Split out...
10429 (push_tinst_level): ...from here.
10431 * friend.c (is_friend): Don't pass a type to decl_function_context.
10433 * typeck.c (convert_for_initialization): Always hand off
10434 conversions to class type.
10436 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10438 * friend.c (is_friend): Local classes have the same access as the
10439 enclosing function.
10441 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
10443 * typeck.c (expand_target_expr): Delete dead function.
10445 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10447 * repo.c (save_string): Delete dead function.
10449 * method.c (thunk_printable_name): Delete dead function.
10451 * lex.c (yynextch): Delete dead function.
10453 * expr.c (tree_extract_aggr_init): #if 0 out.
10455 * except.c (do_unwind): Delete dead function.
10456 (easy_expand_asm): Likewise.
10458 * cvt.c (build_conversion_type_1): Delete dead function.
10460 * cp-tree.h (push_expression_obstack): Declare.
10462 * call.c (source_type): #if 0 out.
10464 * class.c (alter_access): Remove unused label. Add braces
10465 around empty else clause.
10467 * lex.c (yyprint): Fix argument to printf.
10469 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
10471 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10473 * pt.c (instantiate_class_template): Make sure template
10474 arguments are permanent.
10475 * init.c (resolve_offset_ref): Don't go looking around in
10478 * semantics.c: Add routines to handle expressions, and some
10479 declaration processing.
10480 * parse.y: Use them.
10481 (current_class_depth): Move declaration to cp-tree.h.
10482 * parse.c: Regenerated.
10483 * cp-tree.h: Use them.
10484 (current_class_depth): Declare.
10485 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10487 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
10489 * error.c (dump_decl): Be a bit more explicit with template
10490 type arguments, when verbose.
10492 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10494 * inc/exception: Reorder closing braces.
10496 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
10498 * pt.c (redeclare_class_template): New function.
10499 * cp_tree.h (redeclare_class_template): Declare it.
10500 * decl.c (xref_tag): Use it.
10502 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
10504 * call.c (build_over_call): Check IS_AGGR_TYPE, not
10505 TYPE_LANG_SPECIFIC.
10506 * typeck.c (convert_arguments): Likewise.
10508 * decl.c (grokdeclarator): Remove const and volatile from type after
10509 setting constp and volatilep.
10511 * class.c (finish_struct_1): Don't warn about bool bitfield larger
10514 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
10516 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10518 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
10520 * call.c (build_object_call): Complain about ambiguous operator(),
10521 rather that crashing.
10522 (build_new_op): Likewise.
10523 (build_op_delete_call): Likewise.
10525 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
10527 * cvt.c (perform_qualification_conversions): Use comp_target_types
10528 instead of comp_ptr_ttypes.
10530 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
10532 * cp-tree.h (enforce_access): Declare.
10533 * call.c (enforce_access): Make it extern, not static.
10534 * class.c (alter_access): Use enforce_access; modify code for ISO
10535 compliance, rather than ARM rules.
10537 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10539 * cp-tree.h: Fix typo.
10541 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10543 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10544 if (aggregate_value_p (type)).
10546 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10548 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
10550 * tree.c (mapcar): When dealing with a DECL, use it's constant
10552 * pt.c (lookup_template_class): Don't mangle the names of template
10553 classes whose arguments are unknown.
10555 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10557 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10559 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10561 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
10563 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10564 boolean_type_node to 1.
10566 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
10568 * error.c (dump_expr): Remove unused variable `l'.
10570 * pt.c (for_each_template_parm): New function, created by
10571 converting uses_template_parms.
10572 (tree_fn_t): New typedef.
10573 (uses_template_parms): Use it.
10574 (mark_template_parm): New function.
10575 (push_template_decl): Check that the argument list of a partial
10576 specialization uses all the template parameters.
10578 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10579 with it; we might want it for debugging.
10580 * cp-tree.h (type_unification): Change interface.
10581 * class.c (finish_struct_1): Skip nested template types, just like
10582 ordinary nested types.
10583 (instantiate_type): Use new interface to type_unification.
10584 * lex.c (init_lex): Add __sz as opname for sizeof.
10585 * method.c (build_overload_scope_ref): New function.
10586 (build_overload_int): Handle complex expressions. Set
10587 numeric_output_need_bar if necessary.
10588 (build_overload_value): Handle non-PARM_DECL nodes; this
10589 routine is now used by build_overload_int. Remove some
10590 assignments to numeric_output_need_bar. Use
10591 build_overload_scope_ref.
10592 (build_qualified_name): Note that some template mangled names end
10593 with digits, and set numeric_output_need_bar appropriately. Use
10594 build_underscore_int.
10595 * pt.c (unify): Change interface.
10596 (type_unification_real): Likewise.
10597 (determine_specialization): Use new interfaces.
10598 (tsubst): Deal gracefully with situations in which the argument
10599 vector is not fully filled.
10600 (fn_type_unification): Use new interfaces.
10601 (type_unification): Likewise. Remove NOP_EXPR hack.
10602 (type_unification_real): Likewise.
10603 (unify): Likewise. Deal with unification of complex expressions.
10605 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10607 * pt.c (complete_template_args): Initialize skip properly.
10609 * decl.c (make_typename_type): Revert.
10610 (make_implicit_typename): Remove.
10611 (lookup_name_real): Don't call it. Call lookup_field if we see a
10612 TYPE_DECL from a template base.
10613 * search.c (lookup_field): Do implicit typename stuff.
10615 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
10616 Geoff Noer <noer@cygnus.com>
10618 * Makefile.in: Various fixes for building cygwin32 native toolchains.
10619 * Make-lang.in: Likewise.
10621 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10623 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10625 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
10627 * decl.c (make_implicit_typename): Rewrite removed code.
10628 (make_typename_type): Call it if the type we look up comes from
10629 a base that uses template parms.
10631 * pt.c (complete_template_args): Rewrite.
10632 (tsubst, FUNCTION_DECL): Use it.
10634 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
10636 * semantics.c (finish_asm_stmt): Fix combine strings. Call
10637 c_expand_asm_operands () if output_operands, input_operands or
10638 clobbers is not NULL_TREE.
10640 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10642 * pt.c (complete_template_args): New function.
10643 (get_bindings): Deal with specializations of function templates
10644 with return type containing parameters from outer class
10646 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10647 substitute arguments and compose a new type.
10649 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
10651 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10654 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10656 * decl.c (make_implicit_typename): Lose useless code.
10658 * call.c (standard_conversion): Handle A* -> const A* properly.
10660 * pt.c (get_bindings_real): Rename from get_bindings. Add
10661 check_rettype parm.
10662 (get_bindings): Pass 1.
10663 (get_bindings_overload): Pass 0.
10665 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
10667 * pt.c (check_explicit_specialization): When reverting a static
10668 member function, also remove the `this' parameter from
10669 last_function_parms.
10671 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10673 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10674 a function context.
10676 * decl.c (store_bindings): Use free_binding_vecs.
10677 (pop_from_top_level): Likewise.
10679 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10681 * decl.c (make_implicit_typename): Only change the type of a
10684 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
10686 * semantics.c: New file, containing routines to perform the
10687 semantic phase of parsing.
10689 * pt.c (tsubst_expr): Likewise.
10690 * cp-tree.h: Declare the various functions in semantics.c.
10691 Provide macros to access _STMT tree nodes.
10692 * cp-tree.def: Add ASM_STMT tree node.
10693 * Makefile.in, Make-lang.in: Add dependencies on and for
10696 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
10698 * pt.c (push_template_decl): Only check primary templates.
10700 * pt.c (check_explicit_specialization): Complain about default args
10701 in explicit specialization.
10703 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10704 constructor_declarator.
10706 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
10708 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10709 has no overloaded operator ->.
10711 * call.c (build_field_call): Don't crash when presented with a
10712 field that is actually a nested type.
10714 * decl.c (pushtag): Deal with friend class injection in local
10717 * call.c (build_object_call): Don't crash if OBJ is a
10718 pointer-to-member-function.
10720 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10722 * pt.c (push_template_decl): Complain about template with C linkage,
10723 anonymous template class.
10725 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10727 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10728 * search.c: Likewise.
10730 * lex.c (do_pending_defargs): Only call
10731 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10733 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10735 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
10737 * parse.y: Deal with CONSTRUCTORS in new_initializers.
10739 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
10741 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10742 closely mimics the behavior in parse.y.
10743 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10744 into a compound statement.
10746 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10748 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10749 * pt.c (inline_needs_template_parms): New fn.
10750 (original_template): New fn.
10751 (push_inline_template_parms_recursive): New fn.
10752 (maybe_begin_member_template_processing): Use them.
10753 (maybe_end_member_template_processing): Likewise.
10754 (is_member_or_friend_template): Rename to is_member_template.
10755 Member functions of local classes are never member templates.
10757 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10759 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10760 added in the class scope to catch redefinition error.
10762 * pt.c (reduce_template_parm_level): Also copy
10763 the DECL_TEMPLATE_PARMS field.
10765 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
10767 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10768 reduced-level template type parameter.
10770 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
10772 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10773 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10774 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10775 * decl.c (duplicate_decls): Propagate it.
10776 * typeck2.c (abstract_virtuals_error): Use two loops to emit
10777 abstract virtual functions and virtual functions which need a
10778 final overrider separately.
10780 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
10782 * lang-specs.h: Properly put brackets around array elements in
10785 * typeck.c (build_binary_op_nodefault): Correctly place parens around
10786 && and || in expression.
10788 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
10790 * call.c (default_parm_conversions): Remove prototype definition.
10791 (build_method_call): Remove unused variable result.
10793 * cvt.c (ocp_convert): Remove unused variable conversion.
10795 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10797 * except.c (do_unwind): #if 0 definition of unused variables fcall
10800 * expr.c (extract_scalar_init): #if 0 prototype and function
10803 * init.c (expand_aggr_init_1): Remove unused variable init_type.
10804 (build_new_1): Remove unused variable t.
10806 * pt.c (instantiate_class_template): Remove unused variable newtag;
10807 cast called function return value to void.
10808 (do_decl_instantiation): Remove unused variables name and fn.
10810 * tree.c (get_type_decl): Add default return to shut up compiler from
10811 complaining control reaches end of non-void function.
10813 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10815 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
10817 * call.c (default_parm_conversions): Remove prototype definition.
10818 (build_method_call): Remove unused variable result.
10819 (build_over_call): Add default case in enumeration switch.
10821 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
10823 * decl2.c (lang_decode_option): Change j's type to size_t.
10825 * tree.c (layout_vbasetypes): record_align and desired_align are of
10826 type unsigned int; const_size and nonvirtual_const_size likewise.
10828 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
10830 * parse.y (new_initializer): Make sure all initializers are
10833 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
10835 * decl2.c (import_export_decl): Mark tinfo functions for
10836 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10838 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
10840 * method.c: Fix typo.
10842 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10844 * method.c: Include "system.h" to get stdlib.h, stdio.h,
10845 ctype.h, string.h, etc.
10846 (issue_nrepeats): Add default case in enumeration switch.
10847 (check_btype): Likewise.
10848 (process_overload_item): Likewise.
10850 * Makefile.in (method.o): Depend on system.h.
10852 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10854 * lex.c (do_scoped_id): Fix parenthesizing.
10856 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
10858 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10859 FLAG_RTTI is unset, initialize type info machinery and continue
10860 with FLAG_RTTI enabled.
10861 (get_typeid): Likewise.
10863 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10865 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10868 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
10870 * pt.c (finish_member_template_decl): Deal more gracefully with
10871 invalid declarations.
10873 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
10875 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10876 cp-tree.h: Clean up more old overloading code, old RTTI code, and
10877 some formatting quirks.
10879 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10880 method.c, pt.c, ptree.c, typeck.c: Remove support for
10881 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10883 * Makefile.in: Adjust.
10885 * pt.c (unify): Don't allow reduced cv-quals when strict.
10887 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10888 *type_unification* and unify.
10890 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10892 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10893 (nested_name_specifier): And add it before this use.
10894 (typename_sub0): And this use. Also add use without the keyword.
10895 (typename_sub1): Likewise.
10896 * pt.c (instantiate_class_template): Don't actually instantiate
10897 anything if our type uses template parms.
10899 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
10901 * decl.c (start_function): Don't call temporary_allocation for a
10904 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10906 * pt.c (instantiate_class_template): Don't mess with friends if
10907 our type uses template parms.
10909 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10911 * parse.y (nested_name_specifier): Use explicit_template_type.
10912 (typename_sub): Allow a template_type, an explicit_template_type,
10913 or an implicit template type at the end.
10914 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10915 * decl.c (make_typename_type): Handle template-id where the name
10916 is a TEMPLATE_DECL.
10917 * call.c (build_scoped_method_call): Handle member template
10919 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10920 destructor is represented by the type.
10922 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10923 * parse.y (nested_name_specifier): Add 'template' case.
10924 (explicit_template_type): New rule.
10925 (typename_sub): Use it.
10926 * decl.c (make_typename_type): Handle getting a template-id for NAME.
10927 * pt.c (tsubst): Likewise.
10929 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10931 * pt.c (add_to_template_args): Fix thinko.
10932 (instantiate_class_template): Call it later.
10934 * pt.c (get_class_bindings): Add outer_args parm.
10935 (most_specialized_class): Likewise.
10936 (instantiate_class_template): Pass it.
10937 (more_specialized_class): Likewise.
10938 (lookup_template_class): Get context from template if none
10940 (finish_member_template_decl): Don't do anything with a
10941 partial specialization.
10942 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10944 * class.c (finish_struct): Member class templates have already been
10945 checked for name clashes.
10946 * decl.c (pushdecl_with_scope): Handle pushing at class level.
10948 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10950 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10951 (tsubst, *_PARM): Support multiple levels of template classes.
10952 (instantiate_class_template): Look up the pattern from the
10954 (lookup_template_class): Handle getting a template for d1.
10955 (push_template_decl): Correct setting of 'primary'.
10956 (reduce_template_parm_level): Add 'levels' parm.
10957 (finish_member_template_decl): Support member class templates.
10958 (template_class_depth): Handle multiple levels.
10959 * parse.y (component_decl_1, fn.def2): Remove member template case.
10960 (component_decl): Add member template cases.
10961 * decl2.c (check_member_template): We now handle member template
10963 * decl.c (pushtag): Handle member templates.
10964 * method.c (do_inline_function_hair): Don't touch
10965 IDENTIFIER_GLOBAL_VALUE.
10966 * init.c (build_offset_ref): If name isn't an identifier, just
10968 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10970 * typeck.c (get_delta_difference): Do adjust for conversions to
10971 and from virtual base.
10973 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
10975 * typeck.c (get_delta_difference): Give hard error for conversion
10978 * cp-tree.h: Tweak formatting.
10980 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
10982 * decl.c (push_namespace): Handle redeclaration error.
10984 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10985 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10986 (NAMESPACE_BINDING): New macro.
10987 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10990 * pt.c (push_template_decl): Use innermost_args.
10992 * decl.c (get_unique_name): Tweak from earlier in the name.
10994 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10996 * cp-tree.def: Add CPLUS_BINDING node.
10997 * cp-tree.h (tree_binding): New struct.
10998 (BINDING_SCOPE, BINDING_VALUE): New macros.
10999 (current_namespace, global_namespace): Declare extern.
11000 (struct lang_decl_flags): New field in_namespace.
11001 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11002 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11003 (TREE_INDIRECT_USING): New macro.
11004 * decl2.c (current_namespace, global_namespace): Declare. The
11005 value is a NAMESPACE_DECL now, not a TREE_LIST.
11006 (is_namespace_ancestor, namespace_ancestor): New static functions.
11007 (add_using_namespace, ambiguous_decl): Likewise.
11008 (lookup_using_namespace): New support function for lookup_name.
11009 (qualified_lookup_using_namespace): New support function for
11010 do_scoped_id and lookup_namespace_name.
11011 (get_namespace_id): Mark as obsolete.
11012 (current_namespace_id): Likewise.
11013 (do_namespace_alias): Implement.
11014 (do_using_directive): Implement as call to add_using_namespace.
11015 * decl.c (binding_for_name): New function.
11016 (push_namespace, pop_namespace): Implement.
11017 (push_decl): Don't install a FUNCTION_DECL in the global branch.
11018 (lookup_namespace_name): Implement using qualified lookup.
11019 (lookup_name_real): For global scoping, lookup in
11020 global_namespace. For namespace scoping, lookup in given
11021 namespace. For unscoped lookup, iterate over namespace,
11022 considering using directives.
11023 (init_decl_processing): Initialize global_namespace.
11024 (grokvardecl): Build assembler name as static name for globals.
11025 (grokdeclarator): Remove old namespace mangling.
11026 (xref_tag): When installing a global binding for the
11027 tag, make sure we have an identifier.
11028 * method.c (build_overload_nested_name): Mangle namespaces.
11029 (build_qualified_name): Likewise.
11030 (build_decl_overload_real): Likewise.
11031 * lex.c (build_lang_decl): Set namespace for new declaration to
11033 (do_scoped_id): Find global names in global or current
11034 namespace, or using qualified namespace lookup, depending on
11036 * init.c (build_member_call): When scope is namespace, use
11037 build_x_function_call instead.
11038 (build_offset_ref): When scope is namespace, collapse processing
11039 to lookup_namespace_name instead.
11040 * error.c (dump_decl): Support NAMESPACE_DECL.
11041 * decl.c (pushdecl): Bind globals to current namespace.
11042 (push_overloaded_decl): Likewise.
11043 (lookup_tag): Likewise.
11044 (lookup_name_current_level): Likewise.
11045 (xref_tag): Likewise.
11046 (start_function): Likewise.
11047 * lex.c (do_identifier): Likewise.
11048 (identifier_typedecl_value): Likewise.
11049 (real_yylex): Likewise.
11050 * method.c (do_inline_function_hair): Likewise.
11051 * parse.y (unscoped): Likewise.
11052 * pt.c (check_explicit_specialization): Likewise.
11053 (lookup_template_class): Likewise.
11054 * rtti.c (call_void_fn): Likewise.
11055 * sig.c (build_sigtable): Likewise.
11056 * ptree.c (lang_print_xnode): New function.
11058 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
11060 * pt.c (instantiate_class_template): Don't instantiate if pedantic
11061 and the args use template parms.
11063 * pt.c (push_tinst_level): If the instantiation uses template parms,
11065 * decl.c (xref_basetypes): Do call complete_type for basetypes
11066 that involve template parameters.
11068 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
11070 * typeck2.c (process_init_constructor): Fix labeled init check.
11072 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
11074 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11075 argument to tsubst and friends.
11077 * pt.c (tsubst, FUNCTION_DECL): Tidy.
11079 * typeck.c (build_x_function_call): Handle static member function
11080 templates like non-templates. Handle friend templates like normal
11081 function templates.
11082 * pt.c (tsubst, *_PARM): Don't use orig_level.
11083 (get_bindings): Don't call add_to_template_args.
11084 (instantiate_template): Likewise.
11085 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11086 * ptree.c (print_lang_type): Print index/level for template parms.
11088 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
11090 * Make-lang.in (cc1plus): Note that cc1plus depends on
11091 cp/cp-tree.h and cp/cp-tree.def.
11093 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11094 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11095 position in a template parameter list.
11096 * cp-tree.h (template_parm_index): New structure, used as the tree
11097 structure for a TEMPLATE_PARM_INDEX.
11098 (TEMPLATE_PARM_IDX): New macro.
11099 (TEMPLATE_PARM_LEVEL): Likewise.
11100 (TEMPLATE_PARM_DESCENDANTS): Likewise.
11101 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11102 (TEMPLATE_PARM_DECL): Likewise.
11103 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11104 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11105 (TEMPLATE_TYPE_DECL): Likewise.
11106 (TEMPLATE_CONST_IDX): Remove.
11107 (TEMPLATE_CONST_LEVEL): Likewise.
11108 (TEMPLATE_CONST_SET_INFO): Likewise.
11109 (TEMPLATE_TYPE_SET_INFO): Likewise.
11110 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11112 (TEMPLATE_TYPE_LEVEL): Likewise.
11113 * decl.c (decls_match): Call comp_template_parms, rather than
11114 expanding it inline.
11115 (duplicate_decls): If two template declarations are being merged,
11116 then their TEMPLATE_INFOs should be merged as well.
11117 (grokfndecl): Save template-id information when declaring a friend
11118 with explicit template arguments. Pass arguments to
11119 check_explicit_specialization via correct convention; at some
11120 point check_explicit_specialization changed, but these call-sites
11122 (grokdeclarator): Tidy up slightly.
11123 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
11124 two template functions with the same DECL_ASSEMBLER_NAME the same,
11125 since the names are not yet mangled.
11126 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11127 TEMPLATE_CONST_PARM.
11128 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
11129 decl for a non-type parameter, rather than printing `<tparm ...>'.
11130 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11131 (do_friend): Deal with template friends.
11132 * lex.c (do_pending_inlines): Call
11133 maybe_begin_member_template_processing, rather than
11134 conditionally calling begin_member_template_processing.
11135 (process_next_inline): Likewise. Call
11136 maybe_end_member_template_processing, rather than
11137 conditionally calling end_member_template_processing.
11138 (do_pending_defargs): Likewise.
11139 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11140 TEMPLATE_CONST_PARM.
11141 * method.c (build_mangled_template_parm_index): New function.
11142 (build_overload_value): Use it.
11143 (build_overload_name): Likewise.
11144 * pt.c (finish_member_template_decl): Allow friend declarations.
11145 (template_class_depth): New function.
11146 (is_member_template): Rename, and modify, to become...
11147 (is_member_or_friend_template): New function.
11148 (end_member_template_processing): Rename, and modify, to become...
11149 (maybe_end_member_template_processing).
11150 (build_template_parm_index): New function.
11151 (reduce_template_parm_level): New function.
11152 (process_template_parm): Modify to use build_template_parm_index.
11153 (push_template_decl): Deal with friend templates.
11154 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11155 TEMPLATE_CONST_PARM.
11156 (tsubst_friend_function): New function.
11157 (instantiate_class_template): Generate the DECL_FRIENDLIST
11158 for a new instantiation by using tsubst_friend_function rather
11160 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11161 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11162 appropriate new macros. Use reduce_template_parm_level to
11163 generate lower-level template parameters. Handle tsubst'ing into
11164 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
11165 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11166 templates. Similarly for the template parameters for a new
11168 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
11169 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
11170 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11171 (get_bindings): Call add_to_template_args if necessary.
11172 (instantiate_decl): Handle instantiations of friend templates.
11173 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11174 TEMPLATE_TYPE_PARM as a list of fields; it's not!
11175 * spew.c (yylex): Do a little manual constant propagation to
11178 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
11180 * error.c: Include sys/types.h.
11182 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
11184 * method.c (build_mangled_name): Start CPP directives in column zero.
11186 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
11188 * typeck2.c (process_init_constructor): Sorry about non-trivial
11189 labeled initializers.
11190 * parse.y (initlist): Re-enable labeled initializers.
11192 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11194 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11195 all callers changed. Rely on the new parameter instead of arg
11196 being a TREE_LIST when determine whether we are working inside
11197 template template parameter. Clean up is_type test.
11199 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
11201 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11202 * typeck2.c (initializer_constant_valid_p): Allow conversions
11203 between pointers and references.
11205 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
11207 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11208 if pedantic || warn_pointer_arith.
11210 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11212 * pt.c (unify): Handle TEMPLATE_DECL.
11214 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
11216 * cp-tree.h (strip_attrs): Remove decl.
11218 1998-02-18 Doug Evans <devans@cygnus.com>
11220 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11221 Update olddecl's attributes too.
11222 (strip_attrs): Remove function.
11223 * typeck.c (common_type): Call merge_machine_type_attributes.
11225 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
11227 * parse.y (initdcl0_innards): New grammar symbol.
11228 (nomods_initdecls, nomods_initdcl0): Change type from itype to
11229 none, since the resulting value is never used.
11230 (parse_decl): New function.
11231 (datadef): Remove redundant actions.
11232 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11233 * parse.c: Regenerated.
11235 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
11237 * parse.y (simple_stmt): Use getdecls() to check for decl.
11239 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
11241 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11243 (c++.install-common): Install c++filt properly as native or as cross
11245 (c++.uninstall): Add c++filt.
11247 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11249 * call.c (standard_conversion): Fix multi-level ptr conversions.
11251 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
11253 * init.c (build_new): Propagate error_mark_node up.
11255 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
11257 * parse.y (simple_stmt): If the condition isn't a declaration,
11258 start the controlled block after the test.
11260 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11262 * call.c (build_over_call): Convert builtin abs, labs and fabs to
11264 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11267 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11269 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11271 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
11273 * cp-tree.h: Add access_protected_virtual_node.
11274 * class.c (init_class_processing): Initialize it.
11275 * decl.c (xref_basetypes): Use it.
11276 * parse.y (base_class_access_list): Likewise.
11278 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11279 (c++.install-common): Install c++filt.
11281 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11283 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11285 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
11287 * call.c (reference_binding): Use comptypes when comparing
11288 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11290 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
11292 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11293 (really_overloaded_fn): Move check here from is_overloaded_fn.
11294 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11296 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
11298 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11301 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
11303 * cp-tree.h (push_template_decl): Return the decl passed in, or an
11304 equivalent duplicate.
11305 * decl.c (pushtag): Use the return value from push_template_decl.
11306 (duplicate_decls): When duplicating a template declaration, merge
11307 the DECL_TEMPLATE_RESULTs as well.
11308 (make_implicit_typename): Don't try to dive into typename types to
11309 find a context for making a new implicit typename.
11310 (start_decl): Use the return value from push_template_decl.
11311 (grokdeclarator): Complain about declarations list `const operator
11312 int'. Since we don't correctly handle in-class initializations of
11313 non-static data members, complain about this (now illegal)
11314 practice. Issue an error for initializations of non-const statics
11315 since that is illegal as well, and since we don't handle that case
11317 (start_function): Use the return value from push_template_decl.
11318 (start_method): Likewise.
11319 * decl2.c (grokfield): Likewise. Since the change to
11320 grokdeclarator ensures that all initialized fields are in fact
11321 static, remove a redundant test for TREE_PUBLIC.
11322 * parse.y (initlist): Disable labeled initializers since they do
11323 not work as per the documentation, and since they do not use the
11324 same syntax as the C front end.
11325 * pt.c (push_template_decl): Return the decl passed in, or an
11326 equivalent duplicate.
11327 (lookup_template_class): When searching in a nested context,
11328 use the right arguments.
11329 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11330 * typeck.c (build_component_ref): Assign the correct type to the
11331 result of build_vfn_ref.
11333 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
11335 * pt.c (convert_nontype_argument): Fix typo.
11336 (check_explicit_specialization): Allow old-style specialization
11337 of class template members.
11339 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
11340 Manfred Hollstein <manfred@s-direktnet.de>
11342 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11343 when deciding to override DECL_ASSEMBLER_NAME.
11345 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
11347 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11348 * cp-tree.h (flag_do_squangling): Add declaration.
11349 * lang-options.h: Add -fsquangle and -fno-squangle.
11350 * method.c: Add macros and static variables for squangling.
11351 (build_overload_name): Rename to build_mangled_name, add logic for B
11352 compression, and split into process_modifiers and
11353 process_overload_item.
11354 (process_modifiers): New function, to handle constant, reference,
11356 (process_overload_item): New function, handles issue of type codes.
11357 (build_overload_name): New function, start squangling and call
11358 build_mangled_name.
11359 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11360 (start_squangling): New function to initialize squangling structs.
11361 (end_squangling): New function to destroy squangling structs.
11362 (nrepeats): Rename variable to Nrepeats.
11363 (issue_nrepeats): New function for issuing 'n' type repeats.
11364 (check_ktype): New function to check for type K name compression.
11365 (build_overload_nested_name): Add a check for K name compression.
11366 (build_qualified_name): Add a check for K name compression and don't
11367 use DECL_ASSEMBLER_NAME when squangling is on.
11368 (check_btype): New function, checks for B type compression.
11369 (build_static_name, build_decl_overload_real): Initiate squangling.
11370 (build_typename_overload, build_overload_with_type): Initiate
11373 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
11375 * method.c (make_thunk): Avoid name buffer overflow.
11377 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11379 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11380 don't define them yet.
11382 * parse.y (nomods_initdcl0): Add constructor_declarator case.
11384 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11386 * config-lang.in (diff_excludes): Use basename only.
11388 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
11390 * tinfo2.cc: Add tinfo for signed char.
11392 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
11394 * search.c (compute_access): Handle protected constructors in derived
11395 classes as accessible.
11397 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
11399 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11400 Call convert_from_reference sooner.
11402 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
11404 * cvt.c (ocp_convert): Obtain the constant values from constant
11405 decls even if the destination type is the same as the type of the
11408 * decl2.c (finish_file): Make sure that static inlines with
11409 definitions are not marked DECL_EXTERNAL before returning.
11411 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11413 * decl.c: Lose arg_looking_for_template.
11414 (lookup_name_real): Likewise.
11415 * parse.y: Lose processing_template_arg, template_arg1.
11416 (primary): Likewise.
11417 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11419 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11421 * error.c (dump_decl): Fix type of default arguments for template
11422 template parameters and nontype template parameters.
11423 * parse.y (template_parm): Handle invalid default template
11424 template arguments here.
11426 * parse.y (template_parm): Use template_arg instead of PTYPENAME
11427 for default template template argument.
11428 * pt.c (coerce_template_parms): Merge default template argument
11429 codes. Can treat RECORD_TYPE as template name if it is implicitly
11430 created. Fix argument index in error message.
11431 * typeck.c (comptypes): Merge template argument comparison codes in
11432 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11434 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
11436 * lex.c (file_name_nondirectory): Also check for '/'.
11438 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
11440 * parse.y (primary): Deal with statement-expressions in
11442 * pt.c (tsubst_copy): Handle BIND_EXPR.
11443 * tree.c (mapcar): Likewise.
11445 * call.c (add_template_candidate_real): Pass extra parameter to
11446 fn_type_unification.
11447 * cp-tree.h (fn_type_unification): Add parameter.
11448 * pt.c (fn_type_unification): Add additional parameter to deal with
11449 static member functions.
11450 (get_bindings): Deal with static member functions.
11452 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11453 (revert_static_member_fn): Declare.
11454 * decl.c (revert_static_member_fn): Remove declaration. Change
11455 linkage from internal to external.
11456 (cp_finish_decl): Deal with virtual functions in classes local to
11457 template functions.
11458 * decl2.c (finish_file): Don't forget to emit increment/decrement
11459 expressions in initializers for file-scope variables.
11460 * parse.y (typename_sub2): If the typename doesn't names a
11461 template, rather than a type, issue an error message.
11462 * pt.c (check_explicit_specialization): Handle specializations of
11463 static member functions.
11464 (coerce_template_parms): Handle offset references to lists of
11466 * search.c (note_debug_info_needed): Don't crash when handed a
11467 type which is being defined.
11468 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11469 that can happen with some illegal code.
11471 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11473 * call.c (user_harshness): Initialize `code' to 0.
11474 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11475 (null_ptr_cst_p): Add parentheses around && within ||.
11476 (standard_conversion): Likewise.
11477 (z_candidate): Likewise.
11478 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11479 (build_object_call): Likewise for `mem_args'.
11480 (build_new_op): Likewise for `mem_arglist'. Add `return' from
11481 default case in enumeration switch.
11483 * class.c (build_vtable_entry): Add explicit braces to avoid
11485 (build_class_init_list): Likewise.
11486 (finish_struct_1): Initialize `width' to 0.
11487 (instantiate_type): Initialize `name' to NULL_TREE. Add
11488 explicit braces to avoid ambiguous `else'.
11490 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11493 * decl.c (grok_reference_init): Eliminate unused parameter, all
11495 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11496 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11497 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11498 (grokdeclarator): Add parentheses around && within ||. Add
11499 explicit braces to avoid ambiguous `else'.
11500 (grokparms): Initialize `type' to NULL_TREE.
11501 (xref_tag): Remove unused label `just_return'.
11502 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11503 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11504 (hack_incomplete_structures): Add parentheses around assignment
11505 used as truth value.
11507 * decl2.c (coerce_delete_type): Hide definition of `e3'.
11509 * error.c: Include <stdlib.h>.
11510 (dump_expr): Change the type of `i' to size_t. Remove unused
11513 * except.c (init_exception_processing): Remove unused variable `d'.
11514 (expand_throw): Likewise for `label'.
11516 * friend.c (add_friends): Add explicit braces to avoid ambiguous
11519 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11520 (sort_base_init): Likewise for `binfo'.
11521 (expand_member_init): Likewise for `rval'.
11522 (build_member_call): Add parentheses around assignment used as
11524 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11525 (build_new): Initialize `nelts' to NULL_TREE. Initialize
11526 `old_immediate_size_expand' to 0.
11527 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11528 (build_vec_delete_1): Remove unused variable `block'.
11529 (expand_vec_init): Initialize `itype' to NULL_TREE.
11531 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
11532 declaration of `index' and `rindex' with autoconf macros.
11533 (reinit_parse_for_expr): Remove unused variables
11534 `look_for_semicolon' and `look_for_lbrac'.
11535 (cons_up_default_function): Initialize `args' to NULL_TREE.
11536 (readescape): Initialize `firstdig' to 0.
11537 (real_yylex): Add parentheses around assignment used as truth value.
11539 * method.c: Include <strings.h> if we don't have <string.h>.
11540 Protect declaration of `index' with autoconf macro.
11542 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11543 Initialize `type' to NULL_TREE.
11544 (structsp): Remove unused variable `id'.
11546 * pt.c (coerce_template_parms): Add explicit braces to avoid
11548 (lookup_template_class): Initialize `template' to NULL_TREE.
11549 (instantiate_class_template): Remove unused variable `name' and `e'.
11550 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
11551 (do_poplevel): Initialize `saved_warn_unused' to 0.
11552 (type_unification): Remove unused varable `parm'.
11553 (unify): Likewise for `j'.
11555 * repo.c (init_repo): Add parentheses around assignment used as
11557 (finish_repo): Remove unused varable `p'.
11559 * search.c (get_binfo): Initialize `type' to NULL_TREE.
11560 (get_base_distance): Likewise.
11561 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11562 and `new_v' to NULL_TREE.
11563 (lookup_fnfields): Likewise for `rval_binfo_h'.
11564 (breadth_first_search): Add parentheses around assignment used as
11566 (get_template_base): Initialize `type' to NULL_TREE.
11568 * sig.c (append_signature_fields): Initialize `last_mfptr' to
11570 (build_signature_table_constructor): Likewise for
11571 `last_rhs_field', `pfn' and `vt_off'.
11572 (build_sigtable): Likewise for `init'.
11574 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11575 (propagate_binfo_offsets): Likewise for `delta'.
11576 (hash_tree_cons): Initialize hashcode to 0.
11577 (can_free): Likewise for `size'.
11578 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11580 * typeck.c (convert_sequence): Hide prototype.
11581 (common_type): Add explicit braces to avoid ambiguous `else'.
11582 (comp_target_types): Likewise.
11583 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11584 (build_function_call_real): Add explicit braces to avoid ambiguous
11586 (convert_arguments): Initialize `called_thing' to 0.
11587 (convert_for_initialization): Initialize `savew' and `savee' to 0.
11589 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11590 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11591 (build_x_arrow): Likewise for `last_rval'.
11593 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11595 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
11597 * decl.c (init_decl_processing): Use set_sizetype.
11598 * decl2.c (sizetype): Don't declare.
11599 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11600 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11601 (build_component_addr, unary_complex_lvalue): Likewise.
11602 * rtti.c (expand_class_desc): Likewise.
11603 * class.c (get_vfield_offset): Likewise.
11605 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
11607 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11608 early to avoid bogus error. Handle overloaded function
11609 names provided as template arguments correctly.
11610 (coerce_template_parms): Don't mishandle overloaded functions when
11611 dealing with template template parameters.
11612 (lookup_template_class): Issue an error message, rather than
11613 crashing, when the TYPE_DECL provided is not a template type.
11615 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
11617 * class.c (instantiate_type): Don't just return a known type if
11620 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
11622 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11623 since that code could never be reached.
11625 * error.c (dump_decl): Avoid aborting in the midst of printing an
11626 error message about an illegal template declaration.
11628 * parse.y (structsp): Print an error message, rather than crashing,
11629 when a class-head does not name a class.
11631 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
11632 template arguments as a g++ extension.
11634 * cp-tree.def (ALIGNOF_EXPR): New tree code.
11635 * decl2.c (grok_alignof): If processing_template_decl, just store
11637 * typeck.c (c_alignof): Likewise.
11638 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11639 * error.c (dump_expr): Likewise.
11640 * pt.c (tsubst_copy): Likewise.
11641 * tree.c (cp_tree_equal): Likewise.
11642 * pt.c (uses_template_parms): Correctly determine whether or not a
11643 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11644 folding can be done.
11646 * cp-tree.h (grok_enum_decls): Remove type parameter.
11647 * decl.c (grok_enum_decls): Likewise.
11648 * decl2.c (grok_x_components): Call grok_enum_decls
11649 unconditionally, since it will do nothing if there is no
11650 current_local_enum. Use the new calling sequence.
11651 * pt.c (tsubst_enum): Use the new calling sequence for
11654 * decl.c (start_function): Make member functions of local classes
11655 in extern inline functions have comdat linkage here...
11656 (grokdeclarator): Rather than here.
11658 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
11660 * pt.c (convert_nontype_argument): Use decl_constant_value.
11662 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
11664 * call.c (add_template_candidate_real): New function.
11665 (add_template_candidate): Use it.
11666 (add_template_conv_candidate): Likewise.
11667 (joust): Pass extra argument to more_specialized.
11668 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11669 (is_local_class): Remove.
11670 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11671 * cp-tree.h (is_local_class): Remove.
11672 (perform_array_to_pointer_conversion): Likewise.
11673 (finish_member_template_decl): Add.
11674 (check_explicit_specialization): Return a tree, not an int.
11675 (more_specialized): Take additional argument.
11676 (get_bindings): Likewise.
11677 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11678 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11679 (perform_array_to_pointer_conversion): Remove.
11680 * decl.c (saved_scope): Add processing_specialization,
11681 processing_explicit_instantiation fields.
11682 (maybe_push_to_top_level): Save them.
11683 (pop_from_top_level): Restore them.
11684 (grokfndecl): Use new return value from
11685 check_explicit_specialization.
11686 (start_decl): Don't check flag_guiding_decls before pushing
11688 (cp_finish_decl): Remove previous (bogus) change.
11689 (grok_declarator): Use decl_function_context rather than
11691 * decl2.c (finish_file): Pass extra argument to get_bindings.
11692 (build_expr_from_tree): Let build_x_component_ref check
11693 validity of arguments rather than doing it here.
11694 * lex.c (cons_up_default_function): Remove code fooling with
11695 processing_specialization, processing_explicit_instantiation
11696 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11697 * method.c (build_overload_identifier): Mangle local classes in
11698 template functions correctly.
11699 * parse.y (finish_member_template_decl): Move to pt.c.
11700 * pt.c (finish_member_template_decl): Moved here from parse.y.
11701 (print_candidates): New function.
11702 (determine_specialization): Change interface. Properly look for
11703 most specialized versions of template candidates.
11704 (check_explicit_specialization): Fully process explicit
11706 (push_template_decl): Avoid looking at CLASSTYPE fields in
11708 (determine_overloaded_function): Remove.
11709 (convert_nontype_argument): Change name from
11710 convert_nontype_parameter. Use determine_overloaded_function
11711 instead of instantiate_type.
11712 (mangle_class_name_for_template): Handle type contexts as well as
11714 (classtype_mangled_name): Likewise.
11715 (lookup_template_class): Likewise.
11716 (tsubst): Likewise.
11717 (more_specialized): Take explict template arguments as a
11719 (most_specialized): Likewise.
11720 (get_bindings): Likewise. Check that return types match before
11721 proclaiming a function a match.
11722 (do_decl_instantiation): Remove code searching for function to
11723 instantiate; that is now done in check_explicit_specialization.
11724 (add_maybe_template): Pass extra argument to get_bindings.
11725 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11727 * typeck.c (build_component_ref): Check for invalid arguments.
11729 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11731 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11732 return_target and call_target are equivalent.
11734 * pt.c (type_unification_real): Just accept function parms that
11735 don't use any template parms.
11737 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11739 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11740 unset DECL_NOT_REALLY_EXTERN.
11742 * parse.y (typename_sub*): Fix std::.
11744 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11746 * error.c (dump_decl): Fix type default template args.
11747 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11749 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
11751 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11752 (file_name_nondirectory): Use.
11754 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11756 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11757 that are not really present. Substitute default arguments in
11758 template template arguments. Correctly convert TEMPLATE_DECL to
11759 TEMPLATE_TEMPLATE_PARM.
11760 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11761 are no longer treated specially here.
11762 * parse.y (template_template_parm): Fix copy error.
11763 * decl.c (grokdeclarator): Warn about missing `typename' for nested
11764 type created from template template parameters.
11765 * parse.y (bad_parm): Likewise
11767 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11768 (push_nested_class): Likewise.
11769 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11770 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11771 (copy_template_template_parm): Declare.
11772 * decl.c (arg_looking_for_template): New variable.
11773 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11774 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11775 node if arg_looking_for_template is nonzero.
11776 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11777 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11778 (grokdeclarator): Handle TEMPLATE_DECL.
11779 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11780 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11781 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11782 (dump_decl): Handle unnamed template type parameters.
11783 Handle template template parameters.
11784 (dump_function_name): Handle template template parameters.
11785 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11786 Handle TEMPLATE_TEMPLATE_PARM.
11787 * method.c (build_template_template_parm_names): New function.
11788 (build_template_parm_names): Handle TEMPLATE_DECL.
11789 (build_overload_nested_name, build_overload_name):
11790 Handle TEMPLATE_TEMPLATE_PARM.
11791 * parse.y (maybe_identifier): New nonterminal.
11792 (template_type_parm): Use it.
11793 (template_template_parm, template_arg1): New nonterminal.
11794 (template_parm): Add template_template_parm rules.
11795 (template_arg): Set processing_template_arg.
11796 (template_arg1): Rules moved from template_arg.
11797 (primary, nonnested_type): Set arg_looking_for_template if we are
11798 processing template arguments.
11799 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11800 (process_template_parm): Handle template template parameters.
11801 (coerce_template_parms, comp_template_args): Likewise.
11802 (mangle_class_name_for_template, lookup_template_class): Likewise.
11803 (uses_template_parms): Handle TEMPLATE_DECL and
11804 TEMPLATE_TEMPLATE_PARM.
11805 (current_template_args): Handle TEMPLATE_DECL.
11806 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11807 * search.c (dfs_walk, dfs_record_inheritance):
11808 Handle TEMPLATE_TEMPLATE_PARM.
11809 * tree.c (copy_template_template_parm): New function.
11810 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11811 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11813 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
11815 * decl.c (start_decl): Don't allow duplicate definitions of static
11818 * call.c (build_user_type_conversion_1): Handle user-defined
11819 template conversion operators correctly.
11821 * decl2.c (build_expr_from_tree): Issue an error message if the
11822 object in a COMPONENT_REF is a TEMPLATE_DECL.
11824 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11826 * class.c (is_local_class): New function.
11827 * cp-tree.h (is_local_class): Declare it.
11828 (last_tree): Likewise.
11829 (begin_tree): Likewise.
11830 (end_tree): Likewise.
11831 (lookup_template_class): Change prototype.
11832 * decl.c (cp_finish_decl): Check for NULL where necessary.
11833 Consider FUNCTION_DECLS to declare objects with top-level binding,
11834 when calling make_decl_rtl.
11835 (grokdeclarator): Give members of local classes internal linkage.
11836 (start_function): Remove declaration of last_tree.
11837 (finish_function): Set flag_keep_inline_functions around call to
11838 rest_of_compilation if we are processing a member function in a
11840 (start_method): Call push_template_decl for member functions of
11841 local classes in template functions.
11842 * decl2.c (import_export_decl): Don't give external linkage to
11843 instantiations of templates with internal linkage.
11844 * parse.y (last_tree): Remove declaration.
11845 (template_type): Pass extra parameter to lookup_template_class.
11846 (self_template_type): Likewise.
11847 (structsp): Move call to reset_specialization into left_curly.
11848 (left_curly): Call reset_specialization, and begin_tree.
11849 * pt.c (saved_trees): New variable.
11850 (mangle_class_name_for_template): Change prototype. Use
11851 additional function context to name local classes in templates
11853 (classtype_mangled_name): Pass the context.
11854 (push_template_decl): Handle local classes and templates, and
11855 member functions for such classes.
11856 (convert_nontype_parameter): Fix handling of pointer-to-member
11858 (lookup_template_class): Handle local classes in templates.
11859 (tsubst): Likewise. Don't assume that template instantiations
11860 have external linkage; pay attention to the template declaration.
11861 (mark_decl_instantiated): Likewise.
11862 (begin_tree): New function.
11863 (end_tree): Likewise.
11865 * decl.c (xref_basetypes): Don't call complete_type for basetypes
11866 that involve template parameters; that can lead to infinite
11867 recursion unnecessarily.
11869 * pt.c (register_specialization): Do not register specializations
11870 that aren't ready to be registered yet.
11871 (check_explicit_specialization): Handle explicit specialization of
11872 constructors and destructors.
11873 (build_template_decl): New function.
11874 (push_template_delc): Handle out-of-class specializations of
11877 * pt.c (check_explicit_specialization): Set up the template
11878 information before registering the specialization.
11879 (coerce_template_parms): Fix thinko.
11880 (tsubst): Handle specializations of member templates correctly.
11882 * class.c (finish_struct_methods): Remove calls to
11883 check_explicit_specialization from here.
11884 (finish_struct): And insert them here.
11885 * cp-tree.h (perform_qualification_conversions): New function.
11886 (perform_array_to_pointer_conversion): Likewise.
11887 (begin_explicit_instantiation): Likewise.
11888 (end_explicit_instantiation): Likewise.
11889 (determine_specialization): Renamed from
11890 determine_explicit_specialization.
11891 (comp_template_parms): New function.
11892 (processing_explicit_instantiation): New variable.
11893 * cvt.c (perform_qualification_conversions): New function.
11894 (perform_array_to_pointer_conversion): Likewise.
11895 * decl.c (duplicate_decls): Don't consider template functions
11896 alike unless they have the same parameters. Refine handling of
11897 instantiation/specialization mismatches.
11898 (start_decl): Don't call pushdecl for template specializations,
11899 since they don't affect overloading.
11900 (start_function): Likewise.
11901 (grokfndecl): Call check_explicit_specialization a little later.
11902 Don't call duplicate_decls for memberm template specializations.
11903 (grokdeclarator): Don't update template_count for classes that are
11904 themselves specializations. Remove use of `2' as parameter to
11905 grokfndecl since that value isn't used.
11906 * lex.c (cons_up_default_function): Save and restore
11907 processing_explicit_instantiation around calls to grokfield.
11908 * parse.y (finish_member_template_decl): New function.
11909 (component_decl_1): Use it.
11910 (fn.def2): Likewise.
11911 (template_arg_list_opt): New nonterminal.
11912 (template_type): Use it.
11913 (self_template_type): Likewise.
11914 (template_id): Likewise.
11915 (object_template_id): Likewise.
11916 (notype_template_declarator): Likwise.
11917 (begin_explicit_instantiation): Likewise.
11918 (end_explicit_instantiation): Likewise.
11919 (explicit_instantiation): Use them.
11920 * pt.c (coerce_template_parms): Add parameters.
11921 (processing_explicit_instantiation): New variable.
11922 (convert_nontype_parameter): New function.
11923 (determine_overloaded_function): Likewise.
11924 (begin_explicit_instantiation): Likewise.
11925 (end_explicit_instantiation): Likewise.
11926 (retrieve_specialization): Likewise.
11927 (register_specialization): Likewise.
11928 (processing_explicit_specialization): Removed.
11929 (determine_specialization): Handle specializations of member
11930 functions of template class instantiations.
11931 (check_explicit_specialization): Refine to conform to standard.
11932 (comp_template_parms): New function.
11933 (coerce_template_parms): Call convert_nontype_parameter.
11934 (tsubst): Refine handling of member templates. Use
11935 register_specialization.
11936 (instantiate_template): Use retrieve_specialization.
11937 (do_decl_instantiation): Likewise.
11938 (instantiate_decl): Likewise.
11939 (type_unification): Improve handling of explict template
11941 * tree.c (mapcar): Return error_mark_node, rather than aborting,
11942 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11943 * typeck.c (build_unary_op): Call determine_specialization, rather
11944 than determine_explicit_specialization.
11946 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
11948 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11950 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11952 * error.c (dump_decl): For enum tags, output the tag, not its value.
11954 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
11956 * decl.c (init_decl_processing): Only call init_rtti_processing
11959 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
11961 * init.c (build_new_1): Split out from build_new.
11962 (build_new): Just return a NEW_EXPR.
11963 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11965 * decl2.c (get_temp_regvar): Tweak.
11967 * cp-tree.h (TREE_CALLS_NEW): Comment out.
11968 * class.c (resolves_to_fixed_type_p): Remove use.
11969 * method.c (build_opfncall): Likewise.
11970 * call.c (build_new_op): Likewise.
11972 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11974 * exception.cc (__eh_alloc, __eh_free): New fns.
11975 (__cp_push_exception, __cp_pop_exception): Use them.
11976 (__uncatch_exception): Call terminate here if no exception.
11977 * except.c (build_terminate_handler): New fn.
11978 (expand_start_catch_block): Use it.
11979 (expand_exception_blocks): Likewise.
11980 (alloc_eh_object): New fn.
11981 (expand_throw): Use it. Protect exception init with terminate.
11982 * typeck.c (build_modify_expr): Remove code that ignores trivial
11985 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11987 * call.c (add_builtin_candidate): Add default case in enumeration
11989 (build_new_op): Likewise.
11990 (convert_like): Likewise.
11991 * cvt.c (build_expr_type_conversion): Likewise.
11992 * tree.c (real_lvalue_p): Likewise.
11993 (lvalue_p): Likewise.
11994 (cp_tree_equal): Likewise.
11995 * typeck.c (comptypes): Likewise.
11996 (build_component_ref): Likewise.
11997 (build_function_call_real): Likewise.
11998 (build_binary_op_nodefault): Likewise.
11999 (build_unary_op): Likewise.
12000 (build_modify_expr): Likewise.
12001 * typeck2.c (initializer_constant_valid_p): Likewise.
12003 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
12005 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12007 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
12009 * pt.c (coerce_template_parms): Make sure to digest_init if
12012 * decl.c (duplicate_decls): Make the newdecl virtual if the
12013 olddecl was, just as is done with other attributes of olddecl.
12015 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12017 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12018 address of an OFFSET_REF.
12020 * cp-tree.def: Add AGGR_INIT_EXPR.
12021 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12022 AGGR_INIT_EXPR where appropriate.
12023 * expr.c (cplus_expand_expr): Likewise. Simplify.
12025 * decl2.c (finish_file): Remove call to register_exception_table.
12027 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12029 * pt.c (instantiate_class_template): Don't do injection when
12030 processing_template_decl is true, as pollutes current_binding_level
12033 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
12035 * pt.c (maybe_fold_nontype_arg): Add prototype.
12037 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12039 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12040 * error.c (dump_expr): Likewise.
12042 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12044 * typeck.c (build_function_call_real): Remove "inline called before
12045 definition" pedwarn.
12047 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12049 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12051 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12053 * pt.c (type_unification_real): Change __null to type void* with
12056 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
12058 * call.c (implicit_conversion): Don't call
12059 build_user_type_conversion_1 with a NULL expr, since it will
12062 * pt.c (unify): Don't try to unify array bounds if either array is
12065 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12067 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12068 Replace extern decls with casts.
12070 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12071 Update last_parm_cleanup_insn.
12072 (store_after_parms): Remove.
12073 * cp-tree.h: Adjust.
12075 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12077 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12078 (finish_file): Check DECL_COMDAT instead of weak|one_only.
12079 (import_export_vtable): Use make_decl_one_only instead of
12080 comdat_linkage for win32 tweak.
12081 (import_export_decl): Likewise.
12082 * pt.c (mark_decl_instantiated): Likewise.
12084 * decl2.c (finish_file): Lose handling of templates in pending_statics.
12086 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12088 * decl2.c (finish_file): Lose call to expand_builtin_throw.
12089 * except.c (expand_builtin_throw): Remove.
12090 * cp-tree.h: Remove ptr_ptr_type_node.
12091 * decl.c: Likewise.
12093 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
12095 * decl.c (ptr_ptr_type_node): Define.
12096 (init_decl_processing): Initialize it.
12097 * cp-tree.h: Declare it.
12098 * exception.cc (__cp_exception_info): Use __get_eh_info.
12099 (__cp_push_exception): Likewise.
12100 (__cp_pop_exception): Likewise.
12102 From Scott Snyder <snyder@d0sgif.fnal.gov>:
12103 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12105 (init_exception_processing): Removed saved_pc initialization.
12107 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
12109 * pt.c (instantiate_decl): Defer all templates but inline functions.
12111 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12113 * init.c (expand_vec_init): Don't fold a list of parameters.
12115 * decl.c (copy_args_p): Handle copy elision for types with virtual
12117 * call.c (build_over_call): Likewise.
12119 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
12121 * pt.c (lookup_template_function): Copy the template arguments,
12122 not just the list containing them, to the permanent obstack.
12124 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12126 * except.c (expand_start_catch_block): suspend_momentary for the
12129 * error.c (dump_decl): Handle LOOKUP_EXPR.
12131 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
12133 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12134 permanent obstack if we are processing a template decl.
12135 * typeck.c (build_static_cast): Likewise.
12136 (build_const_cast): Likewise.
12137 (build_reinterpret_cast): Likewise.
12139 * pt.c (coerce_template_parms): Coerce some expressions, even
12140 when processing_template_decl.
12142 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12144 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12145 handling of pointer difference expressions.
12147 * typeck.c (comp_target_types): Comparison of function/method types
12148 is independent of nptrs.
12150 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
12152 * pt.c (tsubst): Avoid creating pointer to reference and
12153 reference to reference types.
12155 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12157 * parse.y (do_id): New nonterminal.
12158 (template_id): Use it.
12160 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12162 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12163 * spew.c (yylex): Don't do_identifier here.
12164 * decl2.c (build_expr_from_tree): Revert last change.
12166 * decl2.c (build_expr_from_tree): Expand the name for a method call.
12167 * parse.y (object_template_id): Don't try to take the DECL_NAME.
12169 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12171 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12173 * call.c (build_op_delete_call): Adjust.
12175 * except.c (expand_end_catch_block): Lose rethrow region.
12176 (expand_start_catch_block): Likewise.
12177 (expand_end_catch_block): Don't expand_leftover_cleanups.
12179 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12181 * pt.c (tsubst): Remove tree_cons call (places redundant info into
12182 DECL_TEMPLATE_INSTANTIATION).
12184 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12186 * tree.c (is_overloaded_fn): Handle getting a fn template.
12187 (really_overloaded_fn): Likewise.
12188 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12189 * pt.c (check_explicit_specialization): Tweak.
12190 (determine_explicit_specialization): Tweak.
12192 * tree.c, cp-tree.h (get_target_expr): New fn.
12194 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
12196 * pt.c (check_explicit_specialization): Fix misspelling in
12197 diagnostic: `preceeded'.
12198 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12201 1997-12-02 Mark Mitchell <mmitchell@usa.net>
12203 * pt.c (determine_explicit_specialization): Avoid an internal
12204 error for bad specializations.
12206 * method.c (build_overload_value): Handle SCOPE_REF.
12208 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
12210 * class.c (prepare_fresh_vtable): Enable even more complex MI
12213 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12215 * exception.cc (__check_eh_spec): Optimize a bit.
12217 * exception.cc (__cp_pop_exception): Lose handler arg.
12218 * except.c (do_pop_exception): Likewise.
12219 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12220 (expand_end_catch_block): Likewise.
12222 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12224 * pt.c (check_explicit_specialization): Complain about using a
12225 template-id for a non-specialization.
12227 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
12229 * repo.c: Prototype rindex only if needed.
12230 * xref.c: Likewise.
12232 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12234 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12236 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12238 * typeck.c (build_const_cast): Handle references here instead of
12239 handing off to convert_to_reference.
12241 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12242 TerminateFunctionCall.
12243 (init_exception_processing): Likewise. Terminate et al are now
12244 the fns, not ADDR_EXPRs.
12245 (various): Lose redundant assemble_external calls.
12246 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12248 * cp-tree.h (struct lang_decl_flags): Add comdat.
12249 (DECL_COMDAT): New macro.
12250 * decl.c (duplicate_decls): Propagate it.
12251 (cp_finish_decl): Handle it.
12252 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12254 * class.c: Remove static pending_hard_virtuals.
12255 (add_virtual_function): Take pointers to pending_virtuals
12256 and pending_hard_virtuals.
12257 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
12259 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12261 * decl2.c (import_export_vtable): If we support one_only but not
12262 weak symbols, mark instantiated template vtables one_only.
12263 (import_export_decl): Likewise for tinfo functions.
12264 (finish_vtable_vardecl): Also write out vtables from explicitly
12265 instantiated template classes.
12266 * pt.c (mark_class_instantiated): Revert last change.
12268 * except.c (expand_throw): Call mark_used on the destructor.
12270 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
12272 * lex.c (lang_init): Enable flag_exceptions by default if no
12273 command line switch was specified.
12275 1997-11-26 Mark Mitchell <mmitchell@usa.net>
12277 * pt.c (unify): Handle `void' template parameters in
12280 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
12282 * rtti.c (build_dynamic_cast): Handle template case here.
12283 (build_dynamic_cast_1): Not here.
12285 * typeck2.c (digest_init): Make copies where appropriate.
12287 * decl2.c (delete_sanity): resolve_offset_ref.
12289 * except.c: Call terminate without caching so many bits.
12291 * except.c (expand_start_catch_block): Fix catching a reference
12294 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12296 * init.c (build_new): Copy size to the saveable obstack.
12298 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12299 TRY_CATCH_EXPR for now.
12301 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12303 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12304 has DECL_LANG_SPECIFIC.
12306 * exception.cc (struct cp_eh_info): Add handlers field.
12307 (__cp_push_exception): Initialize it.
12308 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
12309 (__throw_bad_exception): Remove.
12310 * except.c (call_eh_info): Add handlers field.
12311 (get_eh_handlers): New fn.
12312 (push_eh_cleanup): Increment handlers.
12314 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12316 * except.c (expand_start_eh_spec): Use the try/catch code.
12317 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
12318 doing everything inline.
12319 (init_exception_processing): throw_type_match now takes
12320 const void pointers.
12321 * exception.cc (__check_eh_spec): New fn.
12322 * inc/exception: Neither terminate nor unexpected return.
12323 * decl.c: Make const_ptr_type_node public.
12324 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12326 * except.c (expand_start_catch_block): We only need the rethrow
12327 region for non-sjlj exceptions.
12328 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
12330 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
12332 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12333 (various.o): Likewise.
12334 * inc/new: Add placement deletes. Add throw specs for default new.
12335 * new.cc (set_new_handler): Move here from libgcc2.
12336 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12337 (new): Move from libgcc2. Throw bad_alloc.
12338 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12339 * decl.c (init_decl_processing): Update exception specs on new and
12342 * method.c (build_decl_overload_real): Don't mess with global
12345 * init.c (build_new): Check for null throw spec, not nothrow_t.
12347 * decl.c (duplicate_decls): Don't complain about different exceptions
12348 from an internal declaration.
12350 * call.c (build_op_delete_call): Fix check for member fns again.
12352 * decl2.c (import_export_decl): Interface hackery affects
12353 virtual synthesized methods.
12355 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12357 * decl.c (start_decl): Don't just complain about a mismatched
12360 * decl.c (make_implicit_typename): Handle case where t is not
12361 actually from context.
12362 * tree.c (get_type_decl): Lose identifier case.
12363 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12364 * parse.y (nonnested_type): Just use lookup_name.
12365 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12367 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
12369 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12370 T was built in C language context (for example, by
12371 output_func_start_profiler).
12373 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12375 * decl.c (make_implicit_typename): New fn.
12376 (lookup_name_real): Use it. Use current_class_type as the context.
12378 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
12380 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12382 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12384 * friend.c (do_friend): Warn about non-template friends in templates.
12386 * call.c (build_op_delete_call): Fix handling of inherited delete.
12388 * search.c (dfs_record_inheritance): Ignore template type parms.
12390 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
12392 * call.c (build_new_op): Fix copy error.
12393 (build_op_new_call): New fn.
12394 (build_op_delete_call): New fn.
12395 * cp-tree.h: Declare them.
12396 * init.c (build_new): Use them. Support placement delete.
12397 (build_x_delete): Use build_op_delete_call.
12398 (build_delete): Likewise.
12399 * decl2.c (delete_sanity): Likewise.
12400 (coerce_delete_type): Don't complain about placement delete.
12402 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12404 * call.c (build_new_function_call): Remove unused 'obj' parm.
12405 * cp-tree.h, typeck.c: Adjust.
12407 * init.c (build_new): Make the cleanup last longer.
12408 (expand_vec_init): Call do_pending_stack_adjust.
12410 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
12412 * pt.c (do_type_instantiation): Fix typo.
12413 (mark_class_instantiated): If we support one_only but not weak
12414 symbols, don't mark this as known.
12416 * init.c (build_new): Handle vec delete in EH cleanup.
12418 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12420 * call.c (build_method_call): Call complete_type before checking
12423 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
12425 * decl.c (add_block_current_level): Delete.
12426 * init.c (build_vec_delete_1): Delete build_block and
12427 add_block_current_level calls.
12429 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
12431 * init.c (build_new): Handle freeing allocated memory when the
12432 constructor throws.
12434 * call.c (build_new_method_call): Fix flags arg.
12436 * pt.c (do_type_instantiation): Don't try to instantiate
12438 (mark_decl_instantiated): If we support one_only but not
12439 weak symbols, mark this one_only.
12440 * decl2.c (import_export_vtable): Don't defer handling of vtables
12441 if MULTIPLE_SYMBOL_SPACES.
12443 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12445 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12447 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
12449 * except.c (do_pop_exception): Return a value.
12451 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12453 * call.c (build_new_method_call): Handle getting a
12454 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
12455 if we got template parms.
12456 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12458 * decl2.c (build_expr_from_tree): Tweak last change.
12459 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12460 (maybe_fold_nontype_arg): Split out from tsubst_copy.
12461 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12463 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12465 * pt.c (tsubst_copy): Handle explicit template arguments in
12467 * typeck.c (build_x_function_call): Likewise.
12468 * decl2.c (build_expr_from_tree): Lookup function name if it
12471 * pt.c (tsubst): Instantiate template functions properly when
12472 template parameter does not appear in function arguments and return
12474 (comp_template_args): Handle member templates required by tsubst.
12476 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12478 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12481 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12483 * pt.c (coerce_template_parms): Tweak error message.
12485 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12486 return type defaults to `int', even if there are storage-class
12489 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12491 Complete nested exception support.
12492 * except.c (do_pop_exception): Split out...
12493 (push_eh_cleanup): From here. Handle the EH region by hand.
12494 (expand_start_catch_block): Add a new level for the catch parm.
12495 Move the rethrow region outside the two cleanup regions.
12496 Protect the initializer for the catch parm with terminate.
12497 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
12498 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
12499 popping off the middle of the stack.
12500 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12501 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12502 (build_cplus_new): Only wrap CALL_EXPRs.
12503 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12504 the constructor call.
12506 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12508 * Make-lang.in (c++.distdir): Make inc subdirectory.
12510 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12512 * decl2.c (finish_file): Put back some code.
12514 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12516 * decl2.c (finish_file): Remove redundant code.
12517 * method.c (emit_thunk): Don't let the backend defer generic thunks.
12519 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12521 * except.c (call_eh_info): Split out...
12522 (push_eh_info): From here.
12523 (expand_builtin_throw): Use it.
12524 (expand_start_catch_block): Move region start back.
12526 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
12528 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12529 (real_yylex): Record wide strings using target endianness, not host.
12531 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
12533 * repo.c (rindex): Add decl unconditionally.
12534 (get_base_filename, open_repo_file): Don't cast rindex.
12535 * xref.c (rindex): Add decl unconditionally.
12536 (index): Remove unused decl.
12537 (open_xref_file): Don't cast rindex.
12539 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12541 * class.c (build_vbase_path): Propagate the result type properly.
12543 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
12545 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12546 remaining use of saved_throw_type with a call to get_eh_type.
12548 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
12550 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12551 (file_name_nondirectory): New function, doing the same as the macro.
12552 (set_typedecl_interface_info): Use it instead of the macro.
12553 (check_newline): Likewise.
12554 (handle_cp_pragma): Likewise.
12556 * repo.c (get_base_filename): Cast result of rindex to char*.
12557 (open_repo_file): Likewise.
12558 * xref.c (open_xref_file): Likewise.
12559 * error.c (dump_char): Make its arg int, not char.
12561 * except.c (push_eh_info): Pass the number of fields - 1 down, not
12562 the exact number of fields.
12564 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12566 Support for nested exceptions.
12567 * tinfo2.cc (__is_pointer): New fn.
12568 * exception.cc (struct cp_eh_info): Define.
12569 (__cp_exception_info, __uncatch_exception): New fns.
12570 (__cp_push_exception, __cp_pop_exception): New fns.
12571 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12573 (init_exception_processing): Likewise. __eh_pc is now external.
12574 (push_eh_info): New fn.
12575 (get_eh_{info,value,type,caught}): New fns.
12576 (push_eh_cleanup): Just call __cp_pop_exception.
12577 (expand_start_catch_block): Use push_eh_info. Start the eh region
12579 (expand_end_eh_spec): Use push_eh_info.
12580 (expand_throw): Call __cp_push_exception to set up the exception info.
12581 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
12583 (expand_builtin_throw): Don't refer to empty_fndecl.
12585 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12587 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12589 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
12591 * method.c (build_template_parm_names, build_decl_overload_real):
12592 Add static to definitions.
12593 * pt.c (add_to_template_args, note_template_header,
12594 processing_explicit_specialization, type_unification_real): Likewise.
12595 ({determine,check}_explicit_specialization): Use a single string for
12598 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12600 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12601 (expand_end_catch_block): Likewise.
12602 (expand_end_eh_spec): Likewise.
12604 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
12606 * decl.c (duplicate_decls): Handle template specializations
12608 * error.c (dump_function_name): Fix printing of specializations of
12609 member functions that are not member templates.
12610 * cp-tree.h (processing_specialization): Make global.
12611 * pt.c (processing_specialization): Likewise.
12612 * lex.c (cons_up_default_function): Save and restore
12613 processing_specialization to avoid confusion.
12615 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12617 * decl.c (init_decl_processing): Give null_node unknown* type.
12618 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12619 (common_type): Likewise.
12620 * error.c (args_as_string): Recognize null_node.
12622 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12624 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12625 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12627 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12629 * Make-lang.in (g++): Include prefix.o.
12631 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
12633 * pt.c (determine_explicit_specialization): Initialize "dummy"
12634 to keep Purify quiet.
12636 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12638 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12639 (build_overload_int): Not here.
12641 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
12643 * class.c (build_type_pathname): Remove.
12644 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12646 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
12648 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12649 &&label GNU extension.
12651 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
12653 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12654 so as to avoid incorrect manglings.
12655 * method.c (build_decl_overload_real): Don't mangle return types
12658 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12660 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12661 scratch_tree_cons): Define as macros for now.
12662 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12663 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12664 typeck2.c: Use them and the expression_obstack variants.
12666 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12668 * decl.c (store_return_init): Allow classes with explicit ctors to
12669 be used with the named return values extension.
12671 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
12673 * pt.c (instantiate_decl): Fix previous change.
12675 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12677 * pt.c (tsubst): Fix thinko.
12678 (instantiate_decl): Really use the original template.
12680 * call.c (build_new_method_call): Use simple constructor_name for
12683 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
12685 * method.c (build_underscore_int): Don't use ANSI specific
12688 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12690 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12691 for our key method; it might have been inlined by -O3.
12693 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
12695 * decl.c (make_typename_type): Do not try to call lookup_field for
12696 non-aggregate types.
12698 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
12700 * typeck.c (build_reinterpret_cast): Tweak.
12702 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12704 * typeck.c (build_reinterpret_cast): Converting a void pointer
12705 to function pointer with a reinterpret_cast produces a warning
12706 if -pedantic is issued.
12708 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12710 * typeck.c (c_expand_return): Don't warn about returning a
12711 reference-type variable as a reference.
12713 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12715 * method.c (build_static_name): Fix typo.
12717 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
12719 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12720 OLDDECL before we try to do DECL_USE_TEMPLATE.
12722 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12724 * decl.c (duplicate_decls): Don't warn about template instances.
12726 * typeck.c (mark_addressable): Lose ancient code that unsets
12729 * pt.c (do_decl_instantiation): Lose support for instantiating
12732 * call.c (build_new_function_call): Fix handling of null explicit
12734 (build_new_method_call): Likewise.
12736 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
12738 * method.c (build_underscore_int): Fix typo.
12740 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
12742 * tree.c (print_lang_statistics): #if 0 call to
12743 print_inline_obstack_statistics until its definition is checked in.
12745 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12747 * decl2.c (finish_file): Move dump_tree_statistics to end.
12749 * pt.c (instantiate_decl): Look for the original template.
12750 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12751 of member templates.
12753 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12755 * Makefile.in (g++FAQ.*): New rules.
12756 (CONFLICTS): Update.
12757 * g++FAQ.texi: Moved from libg++.
12759 * parse.y (PFUNCNAME): Only specify the type once.
12761 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
12763 * lex.c (real_yylex): Clean up the code to fully behave the way
12764 the c-lex.c parser does for complex and real numbers.
12766 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12768 * method.c (build_decl_overload_real): Reformat.
12770 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
12772 * method.c (synthesize_method): If at_eof, determine our linkage.
12774 1997-09-29 Paul Eggert <eggert@twinsun.com>
12776 * lex.c (real_yylex): Treat `$' just like `_', except issue a
12777 diagnostic if !dollars_in_ident or if pedantic.
12779 * lang-specs.h (@c++): -ansi no longer implies -$.
12781 * decl2.c (lang_decode_option):
12782 -traditional and -ansi now do not mess with
12785 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
12787 * Makefile.in (parse.o, decl.o): Also depend on
12788 $(srcdir)/../except.h $(srcdir)/../output.h.
12789 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12790 $(srcdir)/../except.h $(srcdir)/../output.h.
12791 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12794 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12796 * expr.c (cplus_expand_expr): Make it static.
12798 * decl2.c, init.c, typeck.c: Include "expr.h".
12799 (expand_expr): Use proper values when calling the function.
12801 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12803 * lang-options.h: New -Wold-style-cast flag.
12804 * cp-tree.h (warn_old_style_cast): New variable.
12805 * decl2.c (warn_old_style_cast): Likewise.
12806 (lang_decode_option): Support -Wold-style-cast.
12807 (reparse_absdcl_as_casts): Produce old-style-cast warning.
12809 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12811 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12812 TREE_USED, reset value based on already_used.
12814 * init.c (expand_member_init): Revert change.
12816 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12818 * cp-tree.h, decl.c, decl2.c, pt.c:
12819 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
12821 * decl2.c (lang_decode_option): Add missing ;.
12823 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12825 * friend.c (do_friend): Disable injection for all template-derived
12827 * decl2.c (lang_decode_option): Handle -fguiding-decls.
12828 * parse.y (notype_template_declarator): New nonterminal.
12829 (direct_notype_declarator): Use it.
12830 (complex_direct_notype_declarator): Likewise.
12831 (object_template_id): Accept any kind of identifier after TEMPLATE.
12832 (notype_qualified_id): Don't add template declarators here.
12834 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
12836 * call.c (add_template_candidate): Add explicit_targs parameter.
12837 (build_scoped_method_call): Use it.
12838 (build_overload_call_real): Likewise.
12839 (build_user_type_conversion_1): Likewise.
12840 (build_new_function_call): Likewise.
12841 (build_object_call): Likewise.
12842 (build_new_op): Likewise.
12843 (build_new_method_call): Likewise.
12844 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12845 (build_new_method_call): Likewise.
12847 * class.c (finish_struct_methods): Add specialization pass to
12848 determine which methods were specializing which other methods.
12849 (instantiate_type): Handle TEMPLATE_ID_EXPR.
12851 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12853 * cp-tree.h (name_mangling_version): New variable.
12854 (flag_guiding_decls): Likewise.
12855 (build_template_decl_overload): New function.
12856 (begin_specialization): Likewise.
12857 (reset_specialization): Likewise.
12858 (end_specialization): Likewise.
12859 (determine_explicit_specialization): Likewise.
12860 (check_explicit_specialization): Likewise.
12861 (lookup_template_function): Likewise.
12862 (fn_type_unification): Add explicit_targs parameter.
12863 (type_unification): Likewise.
12865 * decl.c (duplicate_decls): Add smarts for explicit
12867 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12869 (grokfndecl): Call check_explicit_specialization.
12871 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12872 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12873 (check_classfn): Handle specializations.
12875 * error.c (dump_function_name): Print specialization arguments.
12877 * friend.c (do_friend): Don't call pushdecl for template
12880 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12882 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12883 and -fno-guiding-decls.
12885 * lex.c (identifier_type): Return PFUNCNAME for template function
12888 * method.c (build_decl_overload_real): New function.
12889 (build_template_parm_names): New function.
12890 (build_overload_identifier): Use it.
12891 (build_underscore_int): New function.
12892 (build_overload_int): Use it. Add levels for template
12894 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
12895 (build_overload_nested_names): Handle template type parameters.
12896 (build_template_decl_overload): New function.
12898 * parse.y (YYSTYPE): New ntype member.
12899 (nested_name_specifier): Use it.
12900 (nested_name_specifier_1): Likewise.
12901 (PFUNCNAME): New token.
12902 (template_id, object_template_id): New non-terminals.
12903 (template_parm_list): Note specializations.
12904 (template_def): Likewise.
12905 (structsp): Likewise.
12906 (fn.def2): Handle member template specializations.
12907 (component_decl_1): Likewise.
12908 (direct_notype_declarator): Handle template-ids.
12909 (component_decl_1): Likewise.
12910 (direct_notype_declarator): Handle template-ids.
12911 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12913 * pt.c (processing_specializations): New variable.
12914 (template_header_count): Likewise.
12915 (type_unification_real): New function.
12916 (processing_explicit_specialization): Likewise.
12917 (note_template_header): Likewise.
12918 (is_member_template): Handle specializations.
12919 (end_template_decl): Call reset_specialization.
12920 (push_template_decl): Handle member template specializations.
12921 (tsubst): Likewise.
12922 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12923 (instantiate_template): Handle specializations.
12924 (instantiate_decl): Likewise.
12925 (fn_type_unification): Handle explicit_targs.
12926 (type_unification): Likewise. Allow incomplete unification
12927 without an error message, if allow_incomplete.
12928 (get_bindings): Use new calling sequence for fn_type_unification.
12930 * spew.c (yylex): Handle PFUNCNAME.
12932 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12933 (really_overloaded_fn): Likewise.
12934 (get_first_fn): Handle function templates.
12936 * typeck.c (build_x_function_call): Use really_overloaded_fn.
12937 Handle TEMPLATE_ID_EXPR.
12938 (build_x_unary_op): Likewise.
12939 (build_unary_op): Likewise.
12940 (mark_addressable): Templates whose address is taken are marked
12943 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12945 * decl.c (init_decl_processing): Declare __builtin_constant_p as
12946 accepting any kind of type, not only int.
12948 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12950 * search.c (get_matching_virtual): Notice virtual bases when sorrying
12951 about covariant returns.
12953 * parse.y (member_init): Also imply typename here. Remove ancient
12954 extension for initializing base members.
12956 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12958 Handle multi-level typenames and implicit typename in base list.
12959 * parse.y (typename_sub{,[0-2]}): New rules.
12960 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12961 (nonnested_type): New rule.
12962 (complete_type_name): Use it.
12963 (base_class.1): Use typename_sub and nonnested_type.
12964 (nested_name_specifier): Don't elide std:: here.
12965 * decl.c (make_typename_type): Handle getting a type for NAME.
12966 (lookup_name_real): Turn std:: into :: here.
12968 Rvalue conversions were removed in London.
12969 * call.c (is_subseq): Don't consider lvalue transformations.
12970 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12971 (joust): Re-enable ?: kludge.
12973 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
12975 * decl.c (start_function): Up warning of no return type to be a
12978 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12980 * init.c (expand_member_init): Don't set TREE_USED.
12981 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12982 set,don't clear TREE_USED wholesale.
12984 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
12986 * call.c (build_over_call): Do require_complete_type before
12989 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12991 * search.c (lookup_field): Call complete_type in all cases.
12993 * decl.c (finish_function): Just warn about flowing off the end.
12995 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12997 * decl.c (grokparms): Don't bash a permanent list node if we're
13000 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
13002 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13004 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13006 * call.c (build_new_op): Give better error for syntactically
13007 correct, but semantically invalid, use of undeclared template.
13009 * call.c (compare_qual): Handle pmfs.
13011 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13012 after the exception spec.
13014 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13016 * call.c (null_ptr_cst_p): Integer type, not integral type.
13018 * call.c (joust): Disable warnings until they can be moved to the
13021 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
13023 * Makefile.in, config-lang.in: Convert to autoconf.
13025 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13027 * decl.c (lookup_name_real): Add implicit 'typename' to types from
13030 * pt.c (most_specialized_class): Fix typo.
13031 (tsubst): Move constant folding to TREE_VEC case.
13033 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
13035 * pt.c (do_poplevel): Don't warn about unused local variables
13036 while processing_template_decl since we don't always know whether
13037 or not they will need constructing/destructing.
13039 * pt.c (uses_template_parms): Check the values of an enumeration
13040 type to make sure they don't depend on template parms.
13042 * decl.c (make_typename_type): Don't lookup the field if the
13043 context uses template parms, even if we're not
13044 processing_template_decl at the moment.
13046 * pt.c (coerce_template_parms): Avoid looking at the
13047 TYPE_LANG_DECL portion of a typename type, since there won't be
13049 (tsubst): Do constant folding as necessary to make sure that
13050 arguments passed to lookup_template_class really are constants.
13052 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13054 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13055 * decl2.c (finish_file): Only register exception tables if we
13058 * decl.c (init_decl_processing): Add __builtin_[fs]p.
13060 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13062 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13064 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
13066 * error.c (dump_decl): Avoid crashing when presented with a
13067 uninitialized constant, as can occur with a template parameter.
13068 (dump_expr): Make sure that there are enough levels of
13069 current_template_parms before we start diving through them.
13071 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
13073 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13076 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13078 * except.c (expand_throw): Call build_delete for all
13079 exception types, not just objects with destructors.
13081 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
13083 * decl.c (current_local_enum): Remove static.
13084 * pt.c (tsubst_enum): Save and restore value of current_local_enum
13085 in case template is expanded in enum decl.
13086 (instantiate_class_template): Use new tsubst_enum signature.
13087 (tsubst_expr): Likewise.
13089 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
13091 * pt.c (begin_member_template_processing): Take a function as
13092 argument, not a set of template arguments. Use the template
13093 parameters, rather than the arguments. Handle non-type parameters
13094 correctly. Push a binding level for the parameters so that multiple
13095 member templates using the same parameter names can be declared.
13096 (end_member_template_processing): Pop the binding level.
13097 (push_template_decl): Mark member templates as static when
13100 * lex.c (do_pending_inlines): Pass the function, not its template
13101 arguments, to begin_member_template_processing.
13102 (process_next_inline): Likewise.
13103 (do_pending_defargs): Likewise.
13105 * error.c (dump_expr): Obtain the correct declaration for a
13106 TEMPLATE_CONST_PARM.
13108 * call.c (add_template_conv_candidate): New function.
13109 (build_object_call): Handle member templates, as done in the other
13112 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
13114 * decl.c (replace_defag): Undo previous change.
13115 * lex.c (do_pending_defargs): Deal with member templates.
13117 * pt.c (is_member_template): Avoid crashing when passed a
13118 non-function argument.
13120 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13122 * class.c (grow_method): Remove check for redeclaration.
13124 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
13126 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13127 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13128 (PRIMARY_TEMPLATE_P): Use it.
13129 * call.c (build_overload_call_real): Use it.
13130 * class.c (instantiate_type): Likewise.
13131 * decl.c (decls_match): Likewise.
13132 * method.c (build_overload_identifier): Likewise.
13133 * pt.c (push_template_decl): Likewise.
13134 (classtype_mangled_name): Likewise.
13135 (lookup_template_class): Likewise.
13137 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13138 DECL_NTPARMS to conform to usage elsewhere.
13139 * call.c (add_template_candidate): Likewise.
13140 * class.c (instantiate_type): Likewise.
13141 * pt.c (instantiate_template): Likewise.
13142 (get_bindings): Likewise.
13144 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13145 is_member_template.
13147 * pt.c (unify): Undo changes to allow multiple levels of template
13149 (type_unification): Likewise.
13150 (fn_type_unification): Likewise.
13151 (get_class_bindings): Likewise.
13152 * cp-tree.h (Likewise).
13154 * decl.c (replace_defarg): Check that the type of the default
13155 parameter does not invlove a template type before complaining
13156 about the initialization.
13158 * error.c (dump_expr): Deal with template constant parameters in
13159 member templates correctly.
13161 * pt.c (is_member_template): Deal with class specializations
13163 (tsubst): Handle "partial instantiation" of member templates
13166 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
13168 * pt.c (type_unification): Change calling sequence to allow for
13169 multiple levels of template parameters.
13170 (tsubst_expr): Likewise.
13171 (tsubst): Likewise.
13172 (tsubst_copy): Likewise.
13173 (instantiate_template): Likewise.
13175 * call.c (build_overload_call_real): Use it.
13176 (add_builtin_candidate): Use it.
13177 (build_new_method_call): Use it.
13178 * class.c (instantiate_type): Use it.
13179 * decl.c (grokdeclarator): Use it.
13180 * decl2.c (finish_file): Use it.
13181 * method.c (build_overload_identifier): Use it.
13183 * call.c (add_template_candidate): Add additional parameter for
13184 the function return type. Call fn_type_unification istead of
13186 (build_user_type_conversion_1): Handle member templates.
13187 (build_new_function_call): Likewise.
13188 (build_new_op): Likewise.
13189 (build_new_method_call): Likewise.
13191 * class.c (grow_method): Don't give an error message indicating
13192 that two member templates with the same name are ambiguous.
13193 (finish_struct): Treat member template functions just like member
13196 * cp-tree.h (check_member_template): Add declaration.
13197 (begin_member_template_processing): Likewise.
13198 (end_member_template_processing): Likewise.
13199 (fn_type_unification): Likewise.
13200 (is_member_template): Likewise.
13201 (tsubst): Change prototype.
13202 (tsubst_expr): Likewise.
13203 (tsubst_copy): Likewise.
13204 (instantiate_template): Likewise.
13205 (get_bindings): Likewise.
13207 * decl.c (decls_match): Handle multiple levels of template
13209 (pushdecl): Handle template type params just like other type
13211 (push_class_level_binding): Return immediately if the
13212 class_binding_level is NULL.
13213 (grokfndecl): If check_classfn() returns a member_template, use
13214 the result of the template, not the template itself.
13216 * decl2.c (check_member_template): New function. Check to see
13217 that the entity declared to be a member template can be one.
13218 (check_classfn): Allow redeclaration of member template functions
13219 with different types; the new functions can be specializations or
13220 explicit instantiations.
13222 * error.c (dump_decl): Handle multiple levels of template
13224 (dump_function_decl): Update to handle function templates.
13226 * lex.c (do_pending_inlines): Set up template parameter context
13227 for member templates.
13228 (process_next_inline): Likewise.
13230 * method.c (build_overload_identifier): Adjust for multiple levels
13231 of template parameters.
13233 * parse.y (fn.def2): Add member templates.
13234 (component_decl_1): Likewise.
13236 * pt.c (begin_member_template_processing): New function.
13237 (end_member_template_processing): Likewise.
13238 (is_member_template): Likewise.
13239 (fn_type_unification): Likewise.
13240 (current_template_parms): Return a vector of all the template
13241 parms, not just the innermost level of parms.
13242 (push_template_decl): Deal with the possibility of member
13244 (lookup_template_class): Likewise.
13245 (uses_template_parms): Likewise.
13246 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13247 TEMPLATE_CONST_PARM to deal with multiple levels of template
13248 arguments. Add processing of TEMPLATE_DECL to produce new
13249 TEMPLATE_DECLs from old ones.
13250 (do_decl_instantiation): Handle member templates.
13252 * search.c (lookup_fnfields_1): Handle member template conversion
13255 * tree.c (cp_tree_equal): Check the levels, as well as the
13256 indices, of TEMPLATE_CONST_PARMs.
13258 * typeck.c (comptypes): Check the levels, as well as the indices,
13259 fo TEMPLATE_TYPE_PARMs.
13260 (build_x_function_call): Treat member templates like member
13263 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13265 * typeck.c (c_expand_return): Always convert_for_initialization
13266 before checking for returning a pointer to local.
13268 * pt.c (type_unification): If strict and the function parm doesn't
13269 use template parms, just compare types.
13271 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
13273 * method.c (build_overloaded_value): Replace direct call
13274 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13276 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13278 * typeck.c (convert_arguments): Don't arbitrarily choose the first
13279 of a set of overloaded functions.
13281 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13283 * lex.c (real_yylex): Don't elide __FUNCTION__.
13285 * method.c (build_overload_value): Add in_template parm.
13286 (build_overload_int): Likewise.
13287 (build_overload_identifier): Pass it.
13289 * decl.c (duplicate_decls): Don't bash a previous template
13290 definition with a redeclaration.
13292 * pt.c (unify): float doesn't match double.
13294 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13295 TYPE_DECL. Handle getting non-template types.
13296 * parse.y (explicit_instantiation): Use typespec instead of
13297 aggr template_type.
13299 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
13301 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13303 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
13305 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13306 (compare_ics): Likewise.
13308 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13310 * call.c (joust): Warn about choosing one conversion op over
13311 another because of 'this' argument when the other return type is
13313 (source_type): New fn.
13315 * call.c (build_new_op): Strip leading REF_BIND from first operand
13316 to builtin operator.
13318 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13321 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13323 * call.c (null_ptr_cst_p): Remove support for (void*)0.
13325 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
13327 * typeck.c (expand_target_expr): Make definition match declaration.
13329 * class.c (get_basefndecls): Make definition match declaration.
13331 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
13333 * input.c (sub_getch): Eventually give up and release the input file.
13335 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13338 * call.c (joust): Tweak message.
13340 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
13342 * error.c (type_as_string): Put const/volatile on template type
13343 parameters where appropriate.
13345 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
13347 * call.c (strictly_better): Make arguments unsigned ints.
13349 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
13351 * lex.c (real_yylex): Refer to __complex instead of complex.
13353 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
13355 * lex.c (real_yylex): Don't use getc directly.
13357 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13359 * call.c (is_subseq): Don't try to be clever.
13361 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13363 * parse.y, pt.c: Include "except.h".
13364 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13365 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13366 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13367 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13370 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13372 * decl2.c (mark_vtable_entries): Instead of replacing pure
13373 virtuals with a reference to __pure_virtual, copy the decl and
13376 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13378 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13380 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13382 * pt.c (instantiate_class_template): Call repo_template_used
13383 before finish_prevtable_vardecl.
13385 * call.c (is_subseq): New fn.
13386 (compare_ics): Use it.
13388 * repo.c (finish_repo): Don't crash on no args.
13390 * parse.y (named_complex_class_head_sans_basetype): Handle
13391 explicit global scope.
13392 * decl2.c (handle_class_head): New fn.
13394 * pt.c (unify): Add CONST_DECL case.
13396 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13398 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13400 * cp-tree.h (report_type_mismatch): Add prototype.
13401 * call.c (build_overload_call_real): Remove erroneous fourth
13402 argument to report_type_mismatch.
13403 (build_user_type_conversion_1): Remove erroneous second arg to
13405 (build_new_function_call): Likewise.
13406 (build_object_call): Likewise.
13407 (build_new_op): Likewise.
13408 (build_new_method_call): Likewise.
13410 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13412 * error.c (dump_decl): Don't bother processing a function with no
13413 DECL_LANG_SPECIFIC.
13415 * method.c (emit_thunk): Call init_function_start in the macro case.
13417 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13419 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13420 defined and used to set flag_vtable_thunks.
13422 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13424 * parse.y: Don't clear the inlines from their obstack until they've
13425 all been processed.
13427 * decl.c (duplicate_decls): Don't complain about exception
13428 specification mismatch if flag_exceptions is off.
13430 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
13432 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13434 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
13436 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13437 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13438 Include <stdio.h> before include files that formerly used STDIO_PROTO.
13440 * decl.c, g++spec.c, lex.c, method.c, repo.c:
13441 Include "config.h" first, as per autoconf manual.
13443 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13445 * decl.c (duplicate_decls): Tweak wording.
13446 * lex.c (do_pending_defargs): Don't die if we see a default arg
13447 that isn't a DEFAULT_ARG.
13448 * error.c (dump_expr): Handle DEFAULT_ARG.
13450 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13451 * lang-options.h: Add -fhandle-exceptions.
13453 * class.c (build_vtable): Vtables are artificial.
13454 (prepare_fresh_vtable): Likewise.
13456 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13458 * cvt.c (ocp_convert): After converting to the target type, set
13459 LOOKUP_NO_CONVERSION.
13461 * call.c (joust): Warn about potentially confusing promotion rules
13463 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13465 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
13467 * exception.cc: Declare __terminate_func with noreturn attribute.
13469 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13471 * parse.y: Break out eat_saved_input, handle errors.
13472 (function_try_block): Use compstmt instead of compstmt_or_error.
13474 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13476 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13478 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13480 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13481 existence of cc1plus check whether $(LANGUAGES) contains C++.
13483 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13485 * method.c (do_build_copy_constructor): When copying an anonymous
13486 union member loop around to handle nested anonymous unions. Use
13487 the offset of the member relative to the outer structure, not the
13490 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13492 * call.c (resolve_args): New fn.
13493 (build_new_function_call): Use it.
13494 (build_object_call): Likewise.
13495 (build_new_method_call): Likewise.
13497 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13499 * call.c (build_over_call): tsubst all default parms from templates.
13501 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13503 * decl.c (struct cp_function): Add static_labelno.
13504 (push_cp_function_context): Save it.
13505 (pop_cp_function_context): Restore it.
13507 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13509 * typeck.c (build_component_ref_1): Convert from reference.
13511 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13513 * parse.y (current_declspecs, prefix_attributes): Initialize to
13516 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13517 before we try to force it to be a TREE_LIST.
13518 (decl): Make sure $1.t is non-nil.
13520 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13522 * pt.c (uses_template_parms): Handle template first-parse codes.
13524 * decl.c (cp_finish_decl): Only warn about user-defined statics.
13526 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13528 * pt.c (unify): Handle BOOLEAN_TYPE.
13530 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13531 * pt.c (tsubst): Don't set it.
13532 * call.c (build_over_call): Use uses_template_parms.
13534 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13536 * method.c (build_overload_nested_name): Use static_labelno
13537 instead of var_labelno.
13538 (build_qualified_name): New fn.
13539 (build_overload_name): Split out from here.
13540 (build_static_name): Use build_qualified_name.
13541 * decl.c (cp_finish_decl): Statics in extern inline functions
13542 have comdat linkage.
13543 (start_function): Initialize static_labelno.
13545 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13547 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13548 before "all member functions in class [] are private".
13550 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13552 * lex.c (do_scoped_id): convert_from_reference.
13553 * init.c (build_offset_ref): Likewise.
13555 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13557 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13559 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13561 * typeck.c (get_member_function_from_ptrfunc): Promote index
13564 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13566 * tree.c (layout_basetypes): Move non-virtual destructor warning.
13567 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13569 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13571 * decl.c (grokdeclarator): Call add_defarg_fn for the function
13573 * lex.c (add_defarg_fn): Adjust.
13574 (do_pending_defargs): Adjust. Don't skip the first parm.
13576 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13578 * decl.c (build_enumerator): Global enumerators are also readonly.
13580 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13581 (build_dynamic_cast): Call it and convert_from_reference.
13583 * lex.c (add_defarg_fn): New fn.
13584 (snarf_defarg): Don't add to defarg_types.
13585 (do_pending_defargs): Lose defarg_types. All fns we process now
13587 * decl.c (grokfndecl): Call add_defarg_fn.
13589 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13590 * cp-tree.def: Add DEFAULT_ARG.
13591 * spew.c (yylex): Call snarf_defarg as appropriate.
13592 * parse.y: New tokens DEFARG and DEFARG_MARKER.
13593 (defarg_again, pending_defargs, defarg, defarg1): New rules.
13594 (structsp): Use pending_defargs.
13595 (parms, full_parm): Use defarg.
13596 * lex.c (init_lex): Initialize inline_text_firstobj.
13597 (do_pending_inlines): Never pass the obstack to feed_input.
13598 (process_next_inline): Call end_input instead of restore_pending_input.
13599 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13600 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13601 * input.c (end_input): New fn.
13602 (sub_getch): At the end of some fed input, just keep returning EOF
13603 until someone calls end_input.
13604 Remove 'obstack' field from struct input_source.
13605 * decl.c (grokparms): Handle DEFAULT_ARG.
13606 (replace_defarg): New fn.
13607 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13609 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13611 * call.c (implicit_conversion): If nothing else works, try binding
13612 an rvalue to a reference.
13614 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
13616 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13617 ifndef for Cygwin32 to include SIGSEGV.
13619 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13621 * class.c (finish_struct_1): Only complain about pointers without
13622 copy stuff if there are any constructors.
13624 * rtti.c (build_dynamic_cast): Call complete_type on the types.
13626 * decl.c (grokfndecl): If the function we chose doesn't actually
13629 * decl2.c (grokclassfn): Don't specify 'const int' for the
13630 artificial destructor parm.
13632 * pt.c (type_unification): If we are called recursively, nothing
13635 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
13637 * decl.c (init_decl_processing): Stop trying to catch signals
13638 other than SIGABRT since the Cygwin32 library doesn't support
13639 them correctly yet. This fixes a situation in which g++ causes
13640 a hang on SIGSEGVs and other such signals in our Win32-hosted
13643 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
13645 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13647 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13649 * typeck2.c (store_init_value): Always return the value if our
13650 type needs constructing.
13652 * method.c (hack_identifier): Convert class statics from
13655 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13657 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13659 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
13661 * typeck.c (c_expand_return): Make sure we clean up temporaries at
13662 the end of return x;
13664 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13666 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13668 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
13670 * except.c (expand_builtin_throw): Add support
13671 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13673 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13675 * repo.c (extract_string): Null-terminate.
13677 * cp-tree.h (TI_SPEC_INFO): New macro.
13678 (CLASSTYPE_TI_SPEC_INFO): New macro.
13679 * pt.c (push_template_decl): Correctly determine # of template parms
13682 * call.c (compare_ics): Really fix 'this' conversions.
13684 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13687 * pt.c (push_template_decl): Complain about mismatch in # of
13688 template parms between a class template and a member template.
13690 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13692 * method.c (synthesize_method): You can't call
13693 function_cannot_inline_p after finish_function.
13694 * decl.c (finish_function): Turn on flag_inline_functions and turn
13695 off DECL_INLINE before handing a synthesized method to the
13698 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13700 * method.c (synthesize_method): Remove July 30 change to never set
13701 DECL_INLINE if at_eof.
13703 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
13705 * xref.c (GNU_xref_member): Ensure that the node has a
13706 decl_lang_specific part before checking DECL_FRIEND_P.
13708 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13710 * pt.c (instantiate_class_template): Diagnose non-class types used
13713 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13715 * typeck.c (build_conditional_expr): Use convert_for_initialization
13716 instead of convert_and_check.
13718 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13720 * parse.y (typespec): Don't pedwarn for typeof.
13722 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13724 * repo.c (finish_repo): Only check changes if we would write a
13727 * call.c (compare_ics): Fix handling of 'this' conversions.
13729 * pt.c (do_decl_instantiation): Support static data too. Rename
13730 from do_function_instantiation.
13731 * cp-tree.h: Adjust.
13734 * repo.c (extract_string): New fn.
13735 (get_base_filename): Use it.
13736 (init_repo): Compare old args with current args.
13738 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
13740 * Makefile.in, Make-lang.in: Protect C-ls with a comment
13741 character, idea from Paul Eggert <eggert@twinsun.com>.
13743 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
13745 * typeck.c (c_expand_return): Be more persistent in looking for
13748 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13749 pointer to reference.
13751 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13753 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13755 * init.c (build_member_call, build_offset_ref):
13756 Use do_scoped_id instead of do_identifier.
13758 * cvt.c (convert): Remove bogosity.
13760 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13762 * cvt.c (build_up_reference): Do checks of ARGTYPE and
13763 TARGET_TYPE before trying to use get_binfo.
13765 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13767 * cvt.c (build_up_reference): Call get_binfo to get access control.
13769 * decl2.c (import_export_decl): If we don't support weaks, leave
13772 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
13774 * except.c (expand_builtin_throw): Add support for machines that
13775 cannot access globals after throw's epilogue when
13776 -fno-sjlj-exceptions is used.
13778 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13780 * parse.y: 'std::' becomes '::'.
13781 * lex.c (real_yylex): Remove 'namespace' warning.
13782 * init.c (build_member_call): Ignore 'std::'.
13783 (build_offset_ref): Likewise.
13784 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13785 (do_toplevel_using_decl): Ignore 'using std::whatever'.
13786 * decl.c (push_namespace): Just sorry.
13787 (pop_namespace): Nop.
13788 (init_decl_processing): Declare std namespace.
13790 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13792 * search.c (push_class_decls): A name which ambiguously refers to
13793 several instantiations of the same template just refers to the
13796 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
13798 * decl.c (build_enumerator): Fix problem with unsigned long
13799 enumerated values being smashed to ints, causing overflow
13800 when computing next enumerated value (for enum values around
13803 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13805 * typeck.c (build_component_ref): Only call mark_used on a decl.
13807 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13809 * typeck.c (build_c_cast): Make the check for a ptr to function
13810 more specific before possible default_conversion call.
13812 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
13814 * except.c (expand_exception_blocks): Simplify and fix and make
13815 sure we don't end a region in a sequence, as expand_end_bindings
13818 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
13820 * except.c (init_exception_processing): Mark terminate as not
13821 returning so that the optimizer can optimize better.
13823 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
13825 * cvt.c (convert): Don't do any extra work, if we can avoid it
13828 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
13830 * *.[chy]: Change cp_convert to ocp_convert, change convert to
13831 cp_convert. convert is now reserved for the backend, and doesn't
13832 have the semantics a frontend person should ever want.
13834 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13836 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13837 Lose -traditional support.
13839 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13841 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13843 * parse.y (self_reference): Do it for templates, too.
13844 * class.c (pushclass): Don't overload_template_name; the alias
13845 generated by build_self_reference serves the same purpose.
13847 * tree.c (list_hash): Make static, take more args.
13848 (list_hash_lookup): Likewise.
13849 (list_hash_add): Make static.
13850 (list_hash_canon): Lose.
13851 (hash_tree_cons): Only build a new node if one isn't already in the
13853 (hash_tree_chain): Use hash_tree_cons.
13854 * cp-tree.h: Adjust.
13855 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13856 of calling lookup_name.
13858 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13860 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13861 doesn't refer to the CONST_DECLs.
13863 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
13865 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13867 (expand_class_desc): Convert the last argument to a sizetype.
13869 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13871 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13872 __real__): Add reswords.
13873 * hash.h: Regenerate.
13874 * lex.h (rid): Add RID_COMPLEX.
13875 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13876 * lex.c (init_lex): Add building of RID_COMPLEX.
13877 (real_yylex): General cleanup in line with what c-lex.c also has,
13878 sans the cruft for traditional; add handling of SPEC_IMAG, complex
13879 types, and imaginary numeric constants.
13880 * parse.y (REALPART, IMAGPART): Add tokens.
13881 (unary_expr): Add REALPART and IMAGPART rules.
13882 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13883 * decl.c (complex_{integer,float,double,long}_type_node): Define
13885 (init_decl_processing): Set up the types.
13886 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
13887 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13888 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13889 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13890 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13892 * method.c (build_overload_name): Add handling of the different
13893 COMPLEX_TYPEs, prefixing them with `J'.
13894 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13895 as a template parm.
13896 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13897 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13898 (mapcar): Handle COMPLEX_CST.
13899 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13900 (common_type): Add code for complex types.
13901 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13902 (convert_for_assignment): Likewise.
13903 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13905 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13907 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13908 tsubst_expr, as it might try to do overload resolution.
13910 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13912 * pt.c (instantiate_class_template): Oops.
13914 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13916 * cp-tree.def: Add TAG_DEFN.
13917 * pt.c (tsubst_enum): New fn.
13918 (instantiate_class_template): Use it.
13919 (tsubst_expr): Support TAG_DEFN.
13920 (tsubst): Support local enums.
13921 (tsubst_copy): Likewise.
13922 * decl.c (finish_enum): Likewise.
13923 (start_enum): If this is a local enum, switch to permanent_obstack.
13925 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
13927 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13928 (finish_function): Put the base init code for constructors just
13929 after the parm cleanup insns.
13930 (struct cp_function): Add last_parm_cleanup_insn.
13931 (push_cp_function_context): Likewise.
13932 (pop_cp_function_context): Likewise.
13934 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13936 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13938 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13940 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13941 for THUNK_FNDECL before we switch to temporary allocation.
13943 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13945 * call.c (build_new_op): Handle null arg2 for ?:.
13947 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
13949 * except.c (expand_exception_blocks): Ensure that we flow through
13950 the end of the exception region for the exception specification.
13951 Move exception region for the exception specification in, so that
13952 it doesn't protect the parm cleanup. Remove some obsolete code.
13953 * decl.c (store_parm_decls): Likewise.
13954 (finish_function): Likewise.
13956 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13958 * init.c (build_new): Fix nothrow handling.
13960 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13962 * init.c (emit_base_init): Don't warn about the initialization
13963 list for an artificial member.
13965 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13967 * expr.c (do_case): Handle !START case for the error msg.
13969 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13971 * decl2.c, lang-options.h: New option -Weffc++.
13972 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13975 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13976 to MULTIPLE_SYMBOL_SPACES.
13978 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13980 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13982 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13984 * typeck.c (c_expand_return): Don't complain about returning void
13985 to void in an artificial function.
13986 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13987 don't set DECL_RESULT, set DECL_ARTIFICIAL.
13988 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13990 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
13992 * init.c (init_decl_processing): Add support for setjmp/longjmp based
13993 exception handling.
13994 * except.c (init_exception_processing): Likewise.
13995 (expand_end_catch_block): Likewise.
13996 (expand_exception_blocks): Likewise.
13997 (expand_throw): Likewise.
13998 * exception.cc (__default_terminate): Likewise.
14000 * init.c (perform_member_init): Use new method of expr level
14001 cleanups, instead of cleanups_this_call and friends.
14002 (emit_base_init): Likewise.
14003 (expand_aggr_vbase_init_1): Likewise.
14004 (expand_vec_init): Likewise.
14005 * decl.c (cp_finish_decl): Likewise.
14006 (expand_static_init): Likewise.
14007 (store_parm_decls): Likewise.
14008 (cplus_expand_expr_stmt): Likewise.
14009 * decl2.c (finish_file): Likewise.
14011 * Make-lang.in (exception.o): Ok to compile with -O now.
14013 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14014 we know it will be done later by the backend.
14016 * decl2.c (lang_f_options): Remove support for short temps.
14017 * lang-options.h: Likewise.
14019 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14021 * tree.c (varargs_function_p): New fn.
14022 * method.c (emit_thunk): Replace broken generic code with code to
14023 generate a heavyweight thunk function.
14025 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
14027 * pt.c (process_template_parm): pedwarn about floating-point parms.
14029 * decl.c (grokdeclarator): inline no longer implies static.
14031 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14033 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
14035 * class.c (check_for_override): The signature of an overriding
14036 function is not changed.
14038 * call.c (build_over_call): Move setting of conv into the loop.
14039 Note: this change, along with the related changes of the 18th thru
14040 the 20th of April, fix an infinite loop problem in conversions.
14042 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14044 * call.c (build_user_type_conversion_1): Really ignore rvalue
14045 conversions when looking for a REFERENCE_TYPE.
14047 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14048 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14049 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14050 (build_unary_op): Likewise.
14051 * call.c (build_over_call): See through a CONVERT_EXPR around the
14052 ADDR_EXPR for on a temporary.
14053 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14054 the ADDR_EXPR for a local variable.
14056 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
14058 * call.c (build_user_type_conversion_1): If we're trying to
14059 convert to a REFERENCE_TYPE, only consider lvalue conversions.
14060 (build_new_function_call): Print candidates.
14061 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14062 (reference_binding): Binding a temporary of a reference-related type
14065 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14067 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14068 * tinfo2.cc (type_info::before): Likewise.
14070 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
14072 * call.c (implicit_conversion): Oops.
14074 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14076 * call.c (implicit_conversion): Try to find a reference conversion
14077 before binding a const reference to a temporary.
14079 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
14081 * exception.cc (__default_unexpected): Call terminate by default,
14082 so that if the user overrides terminate, the correct function will
14085 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
14087 * parse.y (left_curly): Avoid trying to use any fields of
14088 error_mark_node, as there aren't any.
14090 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14092 * lex.c (do_identifier): Avoid breaking on overloaded methods
14093 as default arguments.
14095 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
14097 * call.c (add_template_candidate): Initialize the variable "dummy".
14099 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
14101 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14102 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14104 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14106 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14107 (debug_binfo): Delete decl, not needed.
14109 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14110 promotes_to_aggr_type): Delete fns.
14111 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14112 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14113 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14115 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14117 * friend.c (is_friend_type): Delete fn.
14118 * cp-tree.h (is_friend_type): Delete decl.
14120 * decl.c (original_result_rtx, double_ftype_double,
14121 double_ftype_double_double, int_ftype_int, long_ftype_long,
14122 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14123 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14125 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14127 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14129 * decl.c (pushdecl_nonclass_level): #if 0, unused.
14130 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14132 * lex.c (reinit_lang_specific): #if 0, unused.
14133 * cp-tree.h (reinit_lang_specific): #if 0 decl.
14135 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14136 * cp-tree.h (revert_static_member_fn): Delete decl.
14138 * class.c (root_lang_context_p): Delete fn.
14139 * cp-tree.h (root_lang_context_p): Delete decl.
14141 * decl.c (set_current_level_tags_transparency): #if 0, unused.
14142 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14144 * lex.c (set_vardecl_interface_info): Make static.
14145 * cp-tree.h (set_vardecl_interface_info): Delete decl.
14147 * call.c (find_scoped_type): Make static.
14148 * cp-tree.h (find_scoped_type): Delete decl.
14150 * search.c (convert_pointer_to_vbase): Make static.
14151 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14153 * decl.c (const_ptr_type_node): Likewise.
14154 * cp-tree.h (const_ptr_type_node): Delete decl.
14156 * typeck.c (common_base_type): Make static.
14157 * cp-tree.h (common_base_types): Delete erroneous decl.
14159 * pt.c (classtype_mangled_name): Make static.
14160 * cp-tree.h (classtype_mangled_name): Delete decl.
14162 * lex.c (check_newline): Make static.
14163 * cp-tree.h (check_newline): Delete decl.
14165 * typeck.c (build_x_array_ref): Delete fn, same idea as
14167 * cp-tree.h (build_x_array_ref): Delete decl.
14169 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14171 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14173 * class.c (build_vtable_entry): Make static.
14174 * cp-tree.h (build_vtable_entry): Delete decl.
14176 * class.c (build_vbase_pointer): Make static.
14177 * cp-tree.h (build_vbase_pointer): Delete decl.
14179 * sig.c (build_sptr_ref): Add forward decl and make static.
14180 * cp-tree.h (build_sptr_ref): Delete decl.
14182 * call.c (build_new_method_call): Add forward decl and make static.
14183 * cp-tree.h (build_new_method_call): Delete decl.
14185 * call.c (build_object_call): Make static.
14186 * class.c (check_for_override, complete_type_p, mark_overriders):
14188 * decl.c (cp_function_chain): Likewise.
14189 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14191 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14193 * tree.c (build_cplus_array_type_1): Likewise.
14194 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14195 (comp_target_parms): Likewise.
14197 * init.c (build_builtin_call): Make static.
14198 * cp-tree.h (build_builtin_call): Delete decl.
14200 * typeck.c (binary_op_error): Delete decl.
14201 * cp-tree.h (binary_op_error): Likewise.
14203 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14205 * call.c (build_method_call): Compare against error_mark_node
14206 directly, rather than the ERROR_MARK tree code.
14207 * cvt.c (cp_convert): Likewise.
14208 * decl.c (print_binding_level): Likewise.
14209 (duplicate_decls): Likewise.
14210 (grokdeclarator): Likewise.
14211 (grokdeclarator): Likewise.
14212 * init.c (expand_aggr_init_1): Likewise.
14213 (decl_constant_value): Likewise.
14214 * method.c (build_opfncall): Likewise.
14215 (hack_identifier): Likewise.
14216 * typeck.c (build_modify_expr): Likewise.
14218 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14220 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14222 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14224 * pt.c (coerce_template_parms): Add new error message.
14226 * method.c (build_overload_value): Implement name mangling for
14227 floating-point template arguments.
14229 * method.c (build_overload_int, icat, dicat): Fix mangling of template
14230 arguments whose absolute value doesn't fit in a signed word.
14232 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14234 * friend.c: New file; put all of the friend stuff in here.
14235 * init.c: Instead of here.
14236 * Makefile.in (CXX_OBJS): Add friend.o.
14237 (friend.o): Add dependencies.
14238 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14240 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
14242 * call.c (build_scoped_method_call): Complain if the scope isn't a
14245 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14247 * parse.y (left_curly): Don't crash on erroneous type.
14249 * init.c (build_delete): Fix type of ref.
14251 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14253 * search.c (get_vbase_1): Renamed from get_vbase.
14254 (get_vbase): Wrapper, now non-static.
14255 (convert_pointer_to_vbase): Now static.
14257 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14258 * init.c (build_delete): Pass one.
14259 (build_partial_cleanup_for): Use build_scoped_method_call.
14260 * decl.c (finish_function): Pass a binfo.
14262 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14264 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14266 * typeck.c (build_c_cast): Lose other reference to flag.
14268 * call.c (build_field_call): Don't look for [cd]tor_identifier.
14269 * decl2.c (delete_sanity): Remove meaningless use of
14270 LOOKUP_HAS_IN_CHARGE.
14271 * decl.c (finish_function): Use build_scoped_method_call instead
14272 of build_delete for running vbase dtors.
14273 * init.c (build_delete): Call overload resolution code instead of
14274 duplicating it badly.
14276 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
14278 * call.c (build_over_call): Call mark_used before trying to elide
14281 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14283 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14285 * typeck.c (build_modify_expr): Always pedwarn for a cast to
14286 non-reference used as an lvalue.
14288 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14290 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14292 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14294 * parse.y (handler): Fix template typo.
14296 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14298 * error.c (lang_decl_name): New fn.
14299 * tree.c (lang_printable_name): Use it.
14301 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
14303 * g++spec.c: Include config.h so that we can catch bzero #defines
14304 from the config file.
14306 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
14308 * new1.cc: Include a declaration for malloc, to avoid warning, and
14309 avoid lossing on systems that require one (ones that define malloc
14312 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14314 * decl2.c (max_tinst_depth): New variable.
14315 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14317 * pt.c (max_tinst_depth): Variable moved.
14318 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14321 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14323 * decl.c (xref_basetypes): Allow a base class that depends on
14324 template parms to be incomplete.
14326 * decl2.c (build_expr_from_tree): Support typeid(type).
14327 * rtti.c (get_typeid): Support templates.
14328 (expand_si_desc, expand_class_desc): Fix string length.
14329 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14331 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14333 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14335 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14337 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14339 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14340 smashes together template and non-template decls of the same
14343 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14345 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14347 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14349 * decl.c (duplicate_decls): Next route, pedwarn about different
14350 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14352 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14354 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14355 (struct lang_type): Delete has_default_implementation member.
14356 Increase dummy to 21.
14357 * decl.c (start_method): Delete usage.
14359 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14360 store_after_parms, start_decl_1, auto_function): Add decls.
14361 (get_arglist_len_in_bytes, declare_implicit_exception,
14362 have_exceptions_p, make_type_decl, typedecl_for_tag,
14363 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14364 build_component_type_expr, cplus_exception_name,
14365 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14366 * call.c (build_this): Make static.
14367 (is_complete): Likewise.
14368 (implicit_conversion): Likewise.
14369 (reference_binding): Likewise.
14370 (standard_conversion): Likewise.
14371 (strip_top_quals): Likewise.
14372 (non_reference): Likewise.
14373 (build_conv): Likewise.
14374 (user_harshness): Likewise.
14375 (rank_for_ideal): Likewise.
14376 * decl.c (start_decl_1): Delete forward decl.
14377 (push_decl_level): Make static.
14378 (resume_binding_level): Make static.
14379 (namespace_bindings_p): Make static.
14380 (declare_namespace_level): Make static.
14381 (lookup_name_real): Make static.
14382 (duplicate_decls): Make static. Take register off NEWDECL and
14383 OLDDECL parm decls.
14384 * decl2.c (get_sentry): Make static.
14385 (temp_name_p): Delete fn.
14386 * except.c (auto_function): Delete decl.
14387 * lex.c (handle_{cp,sysv}_pragma): Make static.
14388 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14389 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14390 * pt.c (tsubst_expr_values): Make static.
14391 * rtti.c (combine_strings): Delete decl.
14393 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
14395 * pt.c (push_template_decl): Handle getting a typedef.
14397 * call.c (build_new_function_call): Complain about void arg.
14399 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14401 * decl.c (duplicate_decls): Give pedwarn of different exceptions
14402 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14404 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
14406 * except.c (expand_throw): Don't expand the cleanup tree here,
14407 since we are not going to write the rtl out. Fixes problem with
14410 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
14412 * Make-lang.in: Add $(exeext) as necessary.
14414 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
14416 * parse.y (handler_seq): Must have at least one catch clause.
14418 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14420 * call.c (add_builtin_candidate): Restore ?: hack.
14422 * decl.c (grok_op_properties): More warnings.
14424 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14426 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14427 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14429 * decl.c (duplicate_decls): Scale back to a warning, and only do
14432 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
14434 * decl.c (duplicate_decls): pedwarn mismatched exception
14437 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
14439 * call.c (build_new_method_call): Don't display the invisible
14440 argument for controlling virtual bases.
14442 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
14444 * new: Add nothrow new and delete, bad_alloc and throw specifications
14446 * decl.c (init_decl_processing): Add throw specification for delete.
14447 * new.cc (nothrow): Define.
14448 * lex.c (real_yylex): Removing warning that throw and friends are
14450 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14451 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14452 * Make-lang.in: Add new{1,2}.{cc,o}.
14454 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14456 * lex.c (cons_up_default_function): Fix return type of synth op=.
14458 * init.c (emit_base_init): Add warnings for uninitialized members
14461 * decl.c (xref_basetypes): Add warning for non-polymorphic type
14462 with destructor used as base type.
14464 * decl.c (grok_op_properties): Add warning for op= returning void.
14465 * typeck.c (c_expand_return): Add warning for op= returning anything
14468 * class.c (finish_struct_1): Add warning for class with pointers
14469 but not copy ctor or copy op=.
14471 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14472 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14473 (instantiate_template): If -fexternal-templates, add this
14474 instantiation to pending_templates.
14476 * decl2.c (copy_assignment_arg_p): Disable old hack to support
14479 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
14481 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14483 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14485 * call.c (standard_conversion): Handle getting references. Tack
14486 on RVALUE_CONV here. Do it for non-class types, too.
14487 (reference_binding): Pass references to standard_conversion.
14488 (implicit_conversion): Likewise.
14489 (add_builtin_candidate): Disable one ?: kludge.
14490 (convert_like): Handle RVALUE_CONVs for non-class types.
14491 (joust): Disable the other ?: kludge.
14493 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14495 * decl.c (init_decl_processing): Add code to build up common
14496 function types beforehand, to avoid creation then removal of
14497 things already in the hash table.
14499 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14501 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14504 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14505 current_template_parms.
14507 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
14509 * search.c (lookup_field): Don't return a function, check want_type.
14511 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14513 * init.c (build_new): Make sure PLACEMENT has a type.
14515 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14517 * init.c (build_new): Support new (nothrow).
14519 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14521 * pt.c (instantiate_decl): Also do push_to_top_level before setting
14524 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14525 * pt.c (tsubst): Defer instantiation of default args.
14526 * call.c (build_over_call): Until here.
14528 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14530 * search.c (lookup_field): Make sure we have an
14531 IDENTIFIER_CLASS_VALUE before we try to return it.
14533 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14535 * call.c (build_method_call): Delete unused var PARM.
14536 (build_overload_call_real): Likewise.
14537 (build_object_call): Delete unused var P.
14538 (build_new_op): Likewise.
14539 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14540 var definitions, which are never used.
14541 (shadow_tag): Delete unused var FN.
14542 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14543 * init.c (build_new): Delete unused var ALLOC_TEMP.
14544 * method.c (hack_identifier): Delete unused var CONTEXT.
14545 (do_build_copy_constructor): Delete unused var NAME.
14546 (synthesize_method): Delete unused var BASE.
14547 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14548 * rtti.c (build_headof): Delete unused var VPTR.
14549 (get_typeid): Delete unused var T.
14550 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14552 (build_ptrmemfunc): Delete unused vars U and NINDEX.
14553 * typeck2.c (build_functional_cast): Delete unused var BINFO.
14555 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
14557 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14558 things in a type being defined.
14559 * decl.c (finish_enum): Reverse the values so that they are in
14562 * pt.c (instantiate_class_template): Don't initialize
14563 BINFO_BASETYPES until the vector is filled out.
14564 (unify): Don't abort on conflicting bindings, just fail.
14565 (instantiate_decl): Do push_tinst_level before any tsubsting.
14567 * method.c (build_overload_value): Handle getting a
14568 TEMPLATE_CONST_PARM for a pointer.
14570 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
14572 * init.c (expand_member_init): Don't give 'not a base' error for
14575 * pt.c (instantiate_decl): Call import_export_decl later.
14577 * pt.c (instantiate_class_template): Return a value.
14579 * parse.y (extension): New rule for __extension__.
14580 (extdef, unary_expr, decl, component_decl): Use it.
14582 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
14584 * class.c (base_binfo): Remove unused base_has_virtual member.
14585 (finish_base_struct): Likewise.
14586 (finish_struct_1): Likewise.
14588 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
14590 * search.c (expand_upcast_fixups): Fix bogus code generation
14591 problem where the generated code uses the wrong index into the
14592 runtime built vtable on the stack. Old code could clobber random
14595 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
14597 * init.c (perform_member_init): Make sure the partial EH cleanups
14598 live on the function_obstack.
14600 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
14602 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14603 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14605 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
14607 * decl.c (grokvardecl): Avoid ANSI style initialization.
14609 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14611 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14613 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14615 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14617 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14619 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14620 arguments we compare against. Start the count of I at 1, not 0,
14621 since argv[0] is still the command.
14623 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
14625 * lang-specs.h: Accept .cp as an C++ extension.
14627 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14629 * cp-tree.h (ptr_reasonably_similar): Add decl.
14631 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14633 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14634 pointer. New local SPECBITS with the parm's value.
14635 (grokdeclarator): Pass &specbits down.
14637 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14638 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14640 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14641 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14643 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14644 not an error_mark_node.
14646 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14648 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14649 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14651 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14653 * decl.c (grokdeclarator): When giving an anonymous struct a name,
14654 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14657 * typeck2.c (build_m_component_ref): If component is a pointer
14658 to data member, resolve the OFFSET_REF now.
14660 * call.c (convert_like): Don't go into infinite recursion.
14662 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14664 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14665 * tree.c (layout_basetypes): And on the vbase ptr.
14667 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14669 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14670 CHAR_TYPE_SIZE so bool is always the same size as another type.
14672 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14674 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
14676 * decl2.c (grok_x_components): Remove synthesized methods from
14677 TYPE_METHODS of an anonymous union, complain about member
14679 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14681 (finish_function): Just clear the DECL_RTL of our arguments.
14683 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14685 * decl2.c (finish_file): Emit DWARF debugging info for static data
14688 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14690 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
14692 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14695 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14697 * Make-lang.in (g++-cross$(exeext)): Fix typo.
14699 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14701 Make the g++ driver now be a standalone program, rather than one
14702 that tries to run the gcc driver after munging up the options.
14703 * Make-lang.in (g++.c, g++spec.o): New rules.
14704 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14706 (g++$(exeext)): New rule, based on xgcc rule.
14707 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14708 * g++spec.c: New file.
14709 * g++.c: Removed file.
14711 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
14713 * cvt.c (build_up_reference): Arrange for any temporary values
14714 that have been keep in registers until now to be put into memory.
14716 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14718 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14719 that make -j3 bootstrap works better.
14721 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14723 * decl.c (pushtag): Do pushdecl for anon tags.
14725 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14727 * typeck.c (c_expand_return): Fix logic.
14728 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14730 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
14732 * g++.c (main): Make sure arglist has a final NULL entry. Add
14733 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14734 stdin/stdout of the invoked program are redirected to
14737 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14739 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14741 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
14743 * init.c (resolve_offset_ref): Handle obj.vfn better.
14744 * typeck.c (build_component_ref): Set TREE_TYPE on result from
14747 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
14749 * typeck.c (convert_for_assignment): Also handle anachronistic
14750 implicit conversions from (::*)() to cv void*.
14751 * cvt.c (cp_convert_to_pointer): Likewise.
14753 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14755 * lex.c (handle_cp_pragma): Fix bogus warning.
14757 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
14759 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14760 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14762 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14764 * class.c (finish_struct_1): Support DWARF2_DEBUG.
14765 * search.c (dfs_debug_mark): Likewise.
14766 * decl2.c (finish_vtable_vardecl): Likewise.
14767 * decl.c (pushtag, finish_enum): Likewise.
14768 * lex.c (check_newline): Use debug_* instead of calling *out
14769 functions directly.
14771 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14773 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14774 on some picky hosts.
14776 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14778 * class.c (finish_struct_1): A class has a non-trivial copy
14779 constructor if it has virtual functions.
14781 * cvt.c (cp_convert): Always call a constructor.
14783 * call.c (reference_binding): Still tack on a REF_BIND
14784 for bad conversions.
14785 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14787 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14788 (c_expand_return): Likewise.
14789 * typeck2.c (digest_init): Likewise for { }.
14790 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14791 * cvt.c (cp_convert): Handle failure better.
14793 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14795 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14796 of GCC be path-relative.
14798 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14800 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14801 it does need choose-temp.o and pexecute.o.
14803 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14805 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14806 that we still use it.
14807 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14809 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14811 * init.c (expand_default_init): Avoid calling constructors to
14812 initialize reference temps.
14814 * cvt.c (convert_to_reference): Fix.
14816 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14818 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14819 (convert_to_reference): Likewise.
14820 * typeck.c (convert_for_initialization): Likewise.
14821 * init.c (expand_default_init): Likewise.
14822 (expand_aggr_init_1): Likewise.
14823 * cp-tree.h (CONV_NONCONVERTING): Lose.
14824 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14826 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14828 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
14830 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14832 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14834 * init.c (expand_aggr_init_1): Don't crash on non-constructor
14837 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14839 * g++.c: Include gansidecl.h.
14840 (VPROTO, PVPROTO, VA_START): Delete.
14841 (choose_temp_base_try, choose_temp_base, perror_exec,
14842 run_dos) [__MSDOS__]: Delete fns.
14843 (pfatal_with_name): Delete fn.
14844 (temp_filename): Declare like in gcc.c.
14845 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14846 (error_count, signal_count): Define.
14847 (error): Delete both definitions.
14848 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14849 (pfatal_pexecute): Add fn from gcc.c.
14850 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
14851 code to use the pexecute stuff also used by gcc.c.
14852 (MIN_FATAL_STATUS): Define.
14853 * Make-lang.in (g++): Add dependency on and linking with
14854 choose-temp.o and pexecute.o.
14856 * cp-tree.h: Include gansidecl.h.
14857 (STDIO_PROTO): Delete #undef/#define.
14858 * cvt.c (NULL): Delete #undef/#define.
14859 * expr.c (NULL): Likewise.
14860 * init.c (NULL): Likewise.
14861 * rtti.c (NULL): Likewise.
14862 * xref.c (NULL): Likewise.
14864 * cp-tree.h (build_user_type_conversion): Add prototype.
14865 * call.c (build_user_type_conversion): Delete prototype. Correct
14866 decl of FLAGS arg to be an int.
14867 * cvt.c (build_user_type_conversion): Likewise.
14869 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
14871 * cp-tree.def: Add TRY_BLOCK and HANDLER.
14872 * except.c (expand_start_catch_block): Support templates.
14873 * parse.y (try_block, handler_seq): Likewise.
14874 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14876 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14878 * pt.c (current_template_args): New fn.
14879 (push_template_decl): Use it.
14880 * decl.c (grokdeclarator): Use it.
14882 * decl2.c (build_expr_from_tree): Dereference ref vars.
14884 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14885 the decl-specifier-seq.
14887 * decl.c (grok_op_properties): Don't force the type of a conversion
14888 op to be complete. Don't warn about converting to the same type
14889 for template instantiations.
14891 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14894 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
14896 * typeck.c (get_delta_difference): Remove previous bogusness.
14897 Don't give errors if force is set.
14899 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14901 * decl2.c (finish_file): Don't emit debug info.
14902 * decl.c (pushdecl): Lose obsolete code.
14903 (grokdeclarator): Still do the long long thing after complaining.
14904 * search.c (note_debug_info_needed): Don't do anything if we're in a
14906 * method.c (synthesize_method): For non-local classes,
14907 push_to_top_level first.
14909 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
14911 * typeck.c (get_delta_difference): Add no_error parameter.
14912 (build_ptrmemfunc): Call get_delta_difference with no_error set;
14913 we don't want error messages when converting unrelated
14914 pointer-to-member functions.
14916 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
14918 * error.c (dump_expr): Improve the wording on error messages that
14919 involve pointer to member functions.
14921 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
14923 * cvt.c (cp_convert_to_pointer): Move code for conversions from
14924 (::*)() to void* or (*)() up a bit, so that we can convert from
14925 METHOD_TYPEs as well.
14927 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14929 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14930 There are no 'member' types.
14931 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14932 (build_x_typeid): Handle errors.
14934 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
14936 * typeck.c (convert_for_assignment): Handle anachronistic implicit
14937 conversions from (::*)() to void* or (*)().
14938 * cvt.c (cp_convert_to_pointer): Likewise.
14939 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14940 conversions from here.
14941 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14942 * lang-options.h: Likewise.
14943 * decl2.c (warn_pmf2ptr): Define.
14944 * cp-tree.h: Declare it.
14945 * typeck2.c (digest_init): Allow pmfs down into
14946 convert_for_initialization.
14948 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14950 * typeck.c (c_expand_return): Fix for returning overloaded fn.
14952 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14954 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14955 * decl.c (grok_reference_init): Pass DIRECT_BIND.
14956 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
14958 * call.c (convert_like): Don't pass INDIRECT_BIND.
14959 * typeck.c (convert_arguments): Likewise.
14960 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14962 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14964 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14965 similar code in build_up_ref.
14966 * cvt.c (build_up_reference): Drastically simplify.
14968 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
14970 * typeck.c (signed_or_unsigned_type): If the given type already
14971 as the correct signedness, then just return it.
14973 * typeck.c ({un,}signed_type): If can't do anything, call
14974 signed_or_unsigned_type.
14976 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
14978 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14979 current_class_type is NULL.
14981 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
14983 * class.c (finish_struct_1): Avoid empty structs by adding a field
14984 so layout_type gets the mode right.
14986 * typeck.c (c_expand_return): Drastically simplify.
14988 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14990 * typeck.c (decay_conversion): Handle overloaded methods.
14992 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14994 * call.c (build_over_call): A TARGET_EXPR has side-effects.
14996 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
14998 * cvt.c (convert_to_pointer_force): Add code to support pointer to
14999 member function to pointer to function conversions.
15000 * init.c (resolve_offset_ref): Add code to allow faked up objects,
15001 ignoring them if they are not used, and giving an error, if they
15003 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15004 code, and so that we can give an error, if we needed an object,
15005 and one was not provided.
15006 (build_c_cast): Don't call default_conversion when we want to
15007 convert to pointer to function from a METHOD_TYPE.
15009 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15011 * Make-lang.in (cplib2.ready): Fix logic.
15013 * decl.c (shadow_tag): Only complain about non-artificial function
15016 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15018 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
15020 * expr.c (cplus_expand_expr): Pre-tweak call_target like
15021 expand_inline_function would.
15023 * pt.c (mark_decl_instantiated): If extern_p, call
15024 mark_inline_for_output.
15026 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
15028 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15031 * typeck.c (get_delta_difference): Fix wording, as we can be used
15032 for pointer to data members.
15034 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
15036 * pt.c (tsubst): If the function decl isn't a member of this
15037 template, return a copy of the decl (including copying the
15038 lang-specific part) so we don't hose ourselves later.
15040 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15042 * class.c (finish_struct): Remove DWARF-specific tag handling.
15043 * decl.c (pushtag): Likewise.
15044 (finish_function): Always clear DECL_ARGUMENTS on function decls with
15046 * decl2.c (finish_file): Emit DWARF debugging info for static data
15049 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
15051 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15052 isn't the same as the new one before we whack it.
15054 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
15056 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15057 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15058 warn_traditional and warn_strict_prototypes; remove ancient
15059 'overload' code; remove references to flag_traditional.
15061 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
15063 * input.c (sub_getch): Handle 8-bit characters in string literals.
15065 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
15067 * tree.c (mapcar): Handle CONSTRUCTORs.
15068 (copy_to_permanent): Handle expression_obstack properly.
15070 * Make-lang.in (cplib2.txt): Also depend on the headers.
15072 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15074 (expand_class_desc): Use USItype for offset field.
15075 * tinfo.h (struct __class_type_info): Likewise.
15077 * method.c (build_overload_int): TYPE_PRECISION should be applied
15080 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15082 * call.c (build_new_op): A COND_EXPR involving void must be a
15085 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15087 * typeck.c (build_x_component_ref): New fn.
15088 (build_object_ref): Use it.
15089 * parse.y (primary): Use it.
15090 * decl2.c (build_expr_from_tree): Use it.
15091 * cp-tree.h: Declare it.
15093 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15094 * error.c (dump_type_suffix): Handle variable arrays.
15096 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15098 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15100 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15102 * decl.c (lookup_name_real): Don't try to look up anything in a
15105 * tinfo2.cc (__throw_type_match_rtti): Oops.
15107 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15109 * Make-lang.in (exception.o): Use -fno-PIC for now.
15111 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15113 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15115 (get_tinfo_fn_dynamic): Extracted from build_typeid.
15116 * tinfo2.cc (__dynamic_cast): Adjust.
15118 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15119 (build_x_typeid): Likewise.
15121 * parse.y: Call build_x_typeid instead of build_typeid.
15122 * cp-tree.def: Add TYPEID_EXPR.
15123 * pt.c (tsubst_copy): Handle typeid.
15124 * decl2.c (build_expr_from_tree): Likewise.
15125 * rtti.c (build_x_typeid): Throw bad_typeid from here.
15126 (build_typeid): Not here.
15127 * cp-tree.h: Declare build_x_typeid.
15129 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
15131 * call.c (convert_like): Pull out constant values.
15133 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15135 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15137 * decl.c (init_decl_processing): Create short int types before
15138 creating size_t in case a machine description needs to use
15139 unsigned short for size_t.
15141 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15143 * Make-lang.in (exception.o): Turn off pic.
15145 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15146 type, multi-level ptr conversions.
15148 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15149 (throw_bad_cast): Use it.
15150 (throw_bad_typeid): New fn.
15151 (build_typeid): Throw bad_typeid as needed.
15153 (synthesize_tinfo_fn): Handle functions and arrays before checking
15156 * Remove .h from standard C++ headers, add new.h, move into inc
15159 * exception*: Remove pointer from object, constructors. Add
15160 default exception::what that uses type_info::name. Add
15161 __throw_bad_typeid.
15163 * init.c (build_new): Don't add a cookie to new (void *) T[2].
15165 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15167 * Make-lang.in: Building C++ code depends on cc1plus.
15169 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15171 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15172 a HOST_WIDE_INT, not a tree.
15174 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15176 * exception.cc: Don't include <stdlib.h>.
15178 * Make-lang.in (c++.clean): Remove cplib2.*.
15180 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
15182 * parse.y (component_decl_1, component_costructor_declarator case):
15183 Pass attributes/prefix_attributes in tree list.
15185 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15187 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15189 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15191 * lex.c (do_identifier): Don't do deferred lookup in a template
15194 * typeck2.c (store_init_value): Oops.
15196 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15197 New files for C++ lang-support library.
15198 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15199 (CXX_LIB2FUNCS): Define.
15200 And rules for building the C++ lang-support code.
15201 * config-lang.in (headers): Define.
15202 (lib2funcs): Define.
15204 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15206 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15208 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15209 * typeck2.c (store_init_value): Check for initializing pmf with { }
15211 (process_init_constructor): Not here.
15213 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15215 * pt.c (begin_template_parm_list): Increment
15216 processing_template_decl here.
15217 (end_template_parm_list): Not here.
15218 (process_template_parm): No need to add 1 to it now.
15219 * *.c: Use processing_template_decl instead of current_template_parms
15220 to check for being in a template.
15222 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
15223 (tsubst_copy): Handle CONSTRUCTOR.
15224 (instantiate_decl): Set up context properly for variables.
15225 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15226 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15228 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15230 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15232 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15234 * method.c (make_thunk): Call comdat_linkage before setting the
15237 * decl2.c (comdat_linkage): Use make_decl_one_only.
15238 (import_export_decl): Likewise.
15239 * decl.c (init_decl_processing): Check supports_one_only instead of
15242 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15244 * decl2.c (grokfield): Tighten checking for access decls.
15246 * decl.c (make_typename_type): Resolve references to
15247 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
15248 (lookup_name_real): Types that depend on a template parameter get
15249 an implicit 'typename' unless they're in the current scope.
15250 (start_decl_1): We don't care about incomplete types that depend
15251 on a template parm.
15252 (grokdeclarator): Resolve 'typename's in the type specifier that
15253 refer to members of the current scope.
15255 * call.c (build_over_call): Remove 'inline called before
15256 definition' diagnostic.
15257 (build_method_call): Likewise.
15258 * decl.c (duplicate_decls): Downgrade 'used before declared
15259 inline' to a warning, only with -Winline.
15261 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
15263 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15265 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15267 * call.c (build_method_call): When calling a signature
15268 default implementation, as in other cases, let instance_ptr simply
15271 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
15273 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15275 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
15277 * except.c (expand_start_catch_block): Add a pushlevel so that -g
15278 works on hppa and SPARC.
15280 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15282 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15284 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15286 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15287 before testing whether it's a signature.
15289 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15291 * call.c (build_new_method_call): Don't complain about signature
15292 pointers and references not being an aggr type.
15293 (build_this): If a signature pointer or reference was passed in,
15295 (build_new_method_call): If instance is a signature pointer, set
15296 basetype to the signature type of instance.
15297 * sig.c (build_signature_method_call): Deleted basetype and
15298 instance parameters, they can be found as the DECL_CONTEXT of
15299 function and as the first argument passed in.
15300 * cp-tree.h: Changed declaration of build_signature_method_call.
15301 * call.c (build_method_call): Deleted first two arguments in call
15302 of build_signature_method_call.
15303 (build_over_call): Added call to build_signature_method_call.
15305 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15307 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15310 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15312 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15314 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
15316 * except.c (expand_start_try_stmts): Move to except.c in the backend.
15317 (expand_end_try_stmts): Remove.
15319 * init.c (perform_member_init): Use add_partial_entry () instead
15320 of directly manipulating lists.
15321 (emit_base_init): Likewise.
15323 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
15325 * except.c (expand_exception_blocks): Always make sure USE and
15326 CLOBBER insns that came at the end still do, the backend relies
15329 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
15331 * call.c (build_over_call): We can only use a TARGET_EXPR of the
15334 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15336 * cvt.c (convert_to_reference): Revert last change, don't complain
15337 about temp without target decl.
15339 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
15341 * decl.c (grokdeclarator): Don't core dump when void() is given.
15343 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15345 * decl.c (copy_args_p): Don't crash.
15347 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
15349 * pt.c (tsubst): And support template args inside the exception
15352 * pt.c (tsubst): Add support for exception specifications in
15353 template functions.
15355 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
15357 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15359 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15360 (start_function): Likewise.
15361 (start_method): Likewise.
15362 (grokfield): Likewise.
15363 (make_call_declarator): Add throw spec parameter.
15364 (set_quals_and_spec): Add routine.
15365 * lex.c (set_quals_and_spec): Likewise.
15366 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15367 * decl.c (shadow_tag): Eliminate the throw spec parameter to
15369 (groktypename): Likewise.
15370 (start_decl): Eliminate the throw spec parameter. Eliminate the
15371 throw spec parameter to grokdeclarator. Eliminate the throw spec
15372 field in DECL_STMT.
15373 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15374 (grokfndecl): Remove useless set of raises.
15375 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
15376 the throw spec parameter to start_decl. Pull the throw spec out
15377 of the call declarator.
15378 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15379 (start_function): Eliminate the throw spec parameter. Eliminate
15380 the throw spec parameter to grokdeclarator.
15381 (start_method): Likewise.
15382 * decl2.c (grokfield): Likewise.
15383 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15384 (grokoptypename): Likewise.
15385 (finish_file): Eliminate the throw spec parameter to
15386 start_function. Add throw spec to make_call_declarator.
15387 * except.c (init_exception_processing): Add throw spec to
15388 make_call_declarator. Eliminate the throw spec parameter to
15390 (expand_start_catch_block): Eliminate the throw spec parameter to
15392 (expand_builtin_throw): Add throw spec to make_call_declarator.
15393 Eliminate the throw spec parameter to start_function.
15394 (start_anon_func): Likewise.
15395 * lex.c (make_call_declarator): Add throw spec parameter.
15396 (set_quals_and_spec): New routine.
15397 (cons_up_default_function): Add throw spec to make_call_declarator.
15398 Eliminate the throw spec parameter to grokfield.
15399 * method.c (synthesize_method): Eliminate the throw spec parameter
15401 * pt.c (process_template_parm): Eliminate the throw spec parameter
15403 (tsubst): Add throw spec to make_call_declarator.
15404 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15405 (do_function_instantiation): Eliminate the throw spec parameter to
15406 grokdeclarator. Eliminate the throw spec parameter to
15408 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15410 * parse.y (datadef): Remove non-winning optimization.
15412 (fndef): Remove ambiguous error productions uncovered by grammar
15414 (constructor_declarator): Add exception_specification_opt here.
15415 (component_constructor_declarator): Likewise.
15416 (direct_after_type_declarator): Likewise.
15417 (complex_direct_notype_declarator): Likewise.
15418 (direct_abstract_declarator): Likewise.
15419 (fn.def1): Remove exception_specification_opt.
15420 (fn.def2): Likewise.
15421 (condition): Likewise.
15422 (initdcl0): Likewise.
15423 (initdcl): Likewise.
15424 (notype_initdcl0): Likewise.
15425 (nomods_initdcl0): Likewise.
15426 (component_decl_1): Likewise.
15427 (component_declarator): Likewise.
15428 (after_type_component_declarator0): Likewise.
15429 (after_type_component_declarator): Likewise.
15430 (notype_component_declarator): Likewise.
15432 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15434 * call.c (build_over_call): Also use an INIT_EXPR when
15435 initializing anything from an rvalue.
15437 * call.c (build_over_call): Call stabilize_reference when building
15438 an INIT_EXPR instead of calling the copy ctor.
15440 * call.c (joust): Extend the previous change to all comparisons.
15442 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15443 NO_LINKAGE_HEURISTICS.
15445 * decl2.c (finish_file): Emit any statics that weren't already.
15447 * typeck.c (build_static_cast): Implement.
15448 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15449 * decl.c (grokparms): Use can_convert_arg instead of
15450 implicit_conversion directly.
15451 (copy_args_p): New fn.
15452 * cvt.c (convert_to_reference): Don't complain about temp with
15454 (build_up_reference): Handle TARGET_EXPRs.
15455 * call.c (build_over_call): Elide unnecessary temps.
15456 (can_convert*): Use new overloading code.
15458 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15460 * call.c: Move TYPE_PTR*_MACROS ...
15461 * cp-tree.h: To here.
15462 * typeck.c (build_reinterpret_cast): Implement.
15464 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15466 (joust): If we're comparing a function to a builtin and the worst
15467 conversion for the builtin is worse than the worst conversion for the
15468 function, take the function.
15470 * typeck.c (build_const_cast): Implement.
15471 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15472 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15474 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
15476 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15477 too early. Make sure we explode if exprtype turns out to be a
15478 NULL_TREE when it shouldn't be.
15480 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
15482 * cp-tree.h: New routine make_call_declarator.
15483 * lex.c (make_call_declarator): Define it.
15484 * except.c (init_exception_processing): Use it.
15485 (expand_builtin_throw): Likewise.
15486 (start_anon_func): Likewise.
15487 * decl2.c (finish_file): Likewise.
15488 * lex.c (cons_up_default_function): Likewise.
15489 * parse.y: Likewise.
15490 * pt.c (tsubst): Likewise.
15492 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
15494 * decl2.c (groktypefield): Remove unused code.
15496 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
15498 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15499 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
15500 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
15501 nonempty_cv_qualifiers.
15504 * lex.c (make_pointer_declarator): Change type_quals into
15506 (make_reference_declarator): Likewise.
15508 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15510 * decl.c (start_function): Only check interface_* for templates
15511 with flag_alt_external_templates.
15513 * call.c (build_new_op): Check for comparison of different enum types.
15514 (build_over_call): Fix arg # output.
15516 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15518 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15520 * call.c (build_new_op): Check for erroneous args.
15522 * call.c (build_new_method_call): Add missing args to cp_error.
15524 * tree.c (error_type): Don't print reference-to-array.
15526 * typeck.c (convert_for_assignment): Don't say contravariance for
15529 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15531 * call.c (build_over_call): Diagnose bad convs for `this'.
15533 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15536 * call.c (convert_like): Handle bad convs.
15537 (build_over_call): Handle bad convs better.
15539 * decl2.c: -fansi-overloading is now the default.
15541 * call.c (build_new_method_call): Check for erroneous args.
15543 * pt.c (instantiate_class_template): Propagate
15544 TYPE_USES_MULTIPLE_INHERITANCE.
15546 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
15548 * call.c (enforce_access): Add static to routine.
15550 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15552 * call.c (build_user_type_conversion_1): Fix bad handling.
15553 (compare_ics): Likewise.
15555 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15557 * call.c (standard_conversion): Oops.
15559 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
15561 * g++.c: Update test for win32 (&& ! cygwin32).
15563 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15565 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15566 (ptr_reasonably_similar): New fn.
15567 * call.c (BAD_RANK): New rank.
15568 (ICS_BAD_FLAG): New macro.
15569 (standard_conversion): Handle almost-right pointer conversions.
15570 (reference_binding): Handle bad rvalue bindings.
15571 (add_*_candidate): Stuff.
15572 (build_over_call): Pass bad conversions to convert_for_initialization.
15573 (compare_ics): Handle bad convs.
15576 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
15578 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15579 integer_type_node when computing pointer offsets.
15581 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15583 * tree.c (lvalue_type): New fn.
15584 (error_type): New fn.
15585 * call.c (op_error): Use error_type.
15586 (add_conv_candidate): Use lvalue_type.
15587 (add_builtin_candidates): Likewise.
15588 * error.c (args_as_string): Use error_type.
15590 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15592 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15593 (tsubst): Not here.
15595 * decl.c (init_decl_processing): With -ansi, __null's type is the
15596 signed integral type with the same number of bits as a pointer.
15597 Introduce a new variable null_node for it.
15598 * cp-tree.h: Adjust.
15599 * call.c (null_ptr_cst_p): Adjust.
15601 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
15603 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15606 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15608 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15609 fns of classes without virtual functions.
15611 * call.c (add_function_candidate): Handle `this' specially.
15612 (compare_ics): Likewise.
15614 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
15616 * typeck.c (build_conditional_expr): Fix handling of __null.
15618 * decl2.c (comdat_linkage): New fn.
15619 (import_export_vtable): Use it.
15620 (import_export_decl): Use it.
15621 * method.c (make_thunk): Use it.
15623 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15625 * pt.c (end_template_decl): If we don't actually have parms, return.
15626 * parse.y (template_header): Accept 'template <>'.
15628 * errfn.c: Allow 5 args.
15630 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15632 * tree.c (make_temp_vec): New fn.
15633 * pt.c (push_template_decl): Handle partial specs.
15634 (instantiate_class_template): Likewise.
15635 (more_specialized): Use get_bindings.
15636 (more_specialized_class): New fn.
15637 (get_class_bindings): New fn.
15638 (most_specialized_class): New fn.
15639 (do_function_instantiation): List candidates for ambiguous case.
15640 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15641 (shadow_tag): Call push_template_decl for partial specializations.
15642 * parse.y: Likewise.
15643 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15644 DECL_TEMPLATE_MEMBERS.
15645 * call.c (print_z_candidates): Reduce duplication.
15647 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15649 * decl2.c (lang_decode_option): Allow -fansi-overloading.
15651 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15653 * pt.c (get_bindings): New fn.
15654 (most_specialized): Likewise.
15655 (do_function_instantiation): Use them.
15656 (add_maybe_template): New fn.
15657 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15658 * call.c (build_new_op): Handle guiding decls.
15659 (build_new_function_call): Likewise.
15660 * decl2.c (finish_file): Likewise.
15662 * decl2.c (mark_used): Do synthesis here.
15663 * call.c (build_method_call): Not here.
15664 (build_over_call): Or here.
15665 * typeck.c (build_function_call_real): Or here.
15666 * tree.c (bot_manip): Call mark_used on functions used in default
15669 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15671 * decl2.c (import_export_vtable): Delete code that disabled vtable
15672 heuristic on systems with ASM_OUTPUT_EXTERNAL.
15674 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15676 * typeck.c (build_x_function_call): Handle static call context
15679 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15680 the function, not its outer block.
15682 * call.c (build_field_call): Pass fields on to build_opfncall
15683 regardless of TYPE_OVERLOADS_CALL_EXPR.
15684 (build_method_call): Pass on to build_new_method_call sooner.
15686 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15688 * class.c (instantiate_type): Don't put a POINTER_TYPE to
15689 METHOD_TYPE on an expression. Also make a copy of rhs instead of
15692 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15694 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15695 (add_builtin_candidate): Don't take enums for ++.
15696 (build_new_method_call): Handle non-aggregates and field calls.
15697 Move new overloading code from...
15700 * decl.c (grokparms): Don't check default args in templates.
15702 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
15704 * cvt.c (build_new_op): Fix args to build_unary_op.
15705 (add_builtin_candidates): Don't call type_promotes_to on float.
15707 * decl.c (grokparms): Check the type of the default arg.
15709 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15710 returning NULL_TREE.
15712 * typeck.c (build_x_binary_op): Avoid doing extra work.
15713 (build_x_unary_op): Likewise.
15714 (build_x_conditional_expr): Likewise.
15715 * cvt.c (build_over_call): Return.
15716 (add_builtin_candidate): Fix MEMBER_REF.
15717 (build_new_op): Likewise.
15719 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
15721 * method.c (build_overload_name): Put bug fix into code but leave
15722 disabled for now so we can be bug compatible with older releases
15723 that do repeats incorrectly. In the future, we can enable it.
15725 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15727 * cvt.c (convert_like): Don't call build_cplus_new twice.
15729 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15730 Control new overloading code with -fansi-overloading.
15732 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15734 * cvt.c (build_over_call): Call build_cplus_new.
15735 * call.c (build_method_call): Likewise.
15736 * typeck.c (build_function_call_real): Likewise.
15737 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15738 the COND_EXPR in a TARGET_EXPR so they use the same slot.
15740 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15742 * typeck.c (complete_type): Propagate
15743 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15745 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15747 * cvt.c (joust): More ?: kludging. Sigh.
15748 (build_over_call): Don't try to synthesize global fns.
15750 * search.c (lookup_conversions): Use binfo marking.
15752 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
15754 * search.c (build_mi_matrix): Use the correct value of cid
15755 when determining the new mi_size.
15757 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15759 * cvt.c (add_builtin_candidates): Do consider type conversion ops
15760 for the first parms of += et al.
15761 (strip_top_quals): New fn.
15762 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15763 (implicit_conversion): Likewise.
15764 (add_builtin_candidates): Be careful about arrays.
15765 (build_new_method_call): Handle vtable optimization.
15767 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15769 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15770 * cvt.c (reference_binding): Use it.
15771 (implicit_conversion): Use it.
15772 (add_builtin_candidate, COND_EXPR): Use it.
15774 * cvt.c (build_new_function_call): Check for error args.
15776 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15778 * gxx.gperf: Add __null.
15779 * hash.h: Regenerate.
15780 * lex.h: Add RID_NULL.
15781 * lex.c (init_lex): Create null_pointer_node here, stick it in
15783 * decl.c (init_decl_processing): Still set its type here.
15784 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15785 (convert_to_pointer_force): Likewise.
15786 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15788 * call.c (convert_harshness): Use null_ptr_cst_p.
15789 * typeck.c (convert_for_assignment): Likewise. Don't produce
15792 * error.c (args_as_string): Handle lists of actual args, too.
15793 * cvt.c (null_ptr_cst): Support (void*)0 for now.
15794 (build_user_type_conversion_1): Improve diagnostics.
15795 (build_new_function_call): Likewise.
15796 (build_object_call): Likewise.
15797 (build_new_method_call): Likewise. Move call before def diagnostic...
15798 (build_over_call): Here.
15800 * cvt.c (build_new_method_call): Don't complain about no match if
15801 LOOKUP_SPECULATIVELY.
15802 (build_over_call): Fix 'this' for virtual fn.
15803 (build_new_method_call): Add diagnostic.
15805 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15807 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15808 constructors to be passed in.
15809 (build_over_call): Likewise.
15810 (build_user_type_conversion_1): Pass them in.
15811 (convert_like): Likewise.
15812 (build_object_call): Handle overloaded conversions.
15813 (build_over_call): Pass the right args to build_vfn_ref.
15814 (standard_conversion): Fix pmf convs.
15815 (joust): Handle comparing statics and non-statics.
15816 (build_new_method_call): New fn.
15817 * call.c (build_method_call): Call it if NEW_OVER.
15819 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
15821 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15824 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
15826 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15827 instead of just maybe_build_cleanup so that we deallocate the
15830 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15832 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15833 * cp-tree.h (finish_prevtable_vardecl): Add decl.
15835 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
15837 * pt.c (instantiate_class_template): Call complete_type. Also, if
15838 we're at the end of the file and we just instantiated a template
15839 class with a vtable, call finish_prevtable_vardecl.
15841 * error.c (dump_decl): Don't explode (or explode more gracefully
15842 as appropriate) if the object being dumped has a null type.
15843 (dump_expr): Likewise.
15845 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15846 by counting the number of nodes that we'll need before allocating
15848 (lookup_fnfields): Fix comment.
15849 (breadth_first_search): Fix comment.
15851 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15853 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15855 * class.c (finish_struct): Call cplus_decl_attributes here.
15856 (finish_struct_1): Not here.
15857 * cp-tree.h: Adjust.
15859 * pt.c (type_unification): New parameter STRICT.
15860 (unify): If STRICT, don't allow cv addition or base deduction.
15861 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15863 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15865 * search.c (get_template_base{_recursive}): New fns.
15866 * pt.c (more_specialized): New fn.
15867 (do_function_instantiation): Use it.
15868 (unify): Handle base deduction.
15869 * cvt.c (joust): Use more_specialized.
15870 Don't arbitrarily choose between non-builtin candidates.
15871 (build_over_call): Call require_complete_type.
15873 * decl.c (start_function): Statics are static even in a #pragma
15876 * decl2.c (import_export_vtable): Disable vtable heuristic on
15877 systems with ASM_OUTPUT_EXTERNAL.
15879 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15880 (standard_conversion): No std conv to enum type.
15882 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15885 * cvt.c (reference_binding): Bind directly to a base subobject of
15888 * cvt.c (build_new_op): Enforce access control.
15890 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
15892 * typeck2.c (process_init_constructor): When scanning the
15893 union for a named field, skip things that aren't FIELD_DECLs.
15895 * method.c (synthesize_method): Don't scan fndecl's rtl if
15896 we're at the end of the file; just assume the function can't
15899 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15901 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15904 * cvt.c (build_user_type_conversion_1): Handle overloaded
15907 * cvt.c (add_builtin_candidates): Don't consider type conversion
15908 operators for the first parameter of operator=.
15910 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
15912 * typeck.c (complete_type): Only call layout_type if we're not
15913 expanding a template.
15915 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15917 * cvt.c (compare_ics): Oops.
15919 * cvt.c (op_error): Oops.
15921 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15922 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
15923 (build_conv): Use them.
15924 (implicit_conversion): Use them.
15925 (convert_like): Handle them.
15926 (build_new_op): Handle builtin COND_EXPR again.
15927 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
15928 in lists of types for COND_EXPR.
15929 (add_builtin_candidate): Add enum candidates for COND_EXPR.
15931 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
15933 * typeck.c (build_modify_expr): Always attempt to build a call to
15934 the assignment operator, even if we're using a default one.
15935 (convert_for_initialization): Call complete_type.
15937 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15939 * cvt.c (reference_binding): A REF_BIND gets the reference type.
15940 (implicit_conversion): Likewise.
15941 (convert_like): Likewise.
15942 (compare_ics): Likewise.
15943 (compare_qual): Likewise.
15944 (print_z_candidates): Handle no candidates.
15945 (build_new_op): Don't handle builtin COND_EXPR for now.
15947 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
15949 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15951 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15953 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15955 * cvt.c (build_builtin_candidate): Oops.
15956 (build_new_op): Oops.
15958 * method.c (build_opfncall): Pass COND_EXPR on.
15959 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15960 (add_builtin_candidate{,s}): Likewise.
15961 (add_builtin_candidates): Likewise.
15962 (print_z_candidates, op_error, build_new_op): Likewise.
15963 (type_decays_to): New fn.
15964 * lex.c (init_lex): Just say ?: for COND_EXPR.
15966 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15968 * typeck.c (complete_type): Call layout_type rather than building
15971 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15972 only use ptrdiff_t.
15974 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15976 * cvt.c: Always compile the new overloading code (but don't use it).
15977 (implicit_conversion): Add a BASE_CONV when converting to
15978 the same class type.
15979 (convert_like): Handle BASE_CONV.
15981 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15983 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15984 (add_builtin_candidate): Likewise.
15987 * typeck.c (build_x_function_call): Try an operator function
15988 whenever we call an object of class type.
15989 * method.c (build_opfncall): Pass CALL_EXPRs through.
15990 * cvt.c (implicit_conversion): Do const-ref case first.
15991 (add_conv_candidate, build_object_call, op_error): New fns.
15992 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15993 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15994 builtin candidates.
15995 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
15996 Fall back on preincrement handling. Use op_error.
15998 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
15999 an error_mark_node.
16000 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16003 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
16005 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16007 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
16009 * typeck.c (build_component_ref_1): Use build_component_ref
16010 instead of open coding it here.
16012 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16014 * g++.c (main): Don't link with -lg++.
16017 * cvt.c (convert_to_reference): Don't use convert_from_reference on
16018 result of build_type_conversion.
16019 (cp_convert): Only call build_method_call for ctors if
16020 build_type_conversion failed.
16021 (ptr_complete_ob): New function.
16022 (TYPE_PTR{,OB,MEM}_P): New macros.
16023 ({add,build}_builtin_candidate{,s}): New functions.
16024 (print_z_candidates): Handle builtins.
16025 (build_user_type_conversion_1): Don't use conversion fns for
16026 converting to a base type.
16027 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16028 (build_user_type_conversion): Use convert_from_reference.
16029 (build_new_op): New function.
16030 (build_over_call): Fix handling of methods.
16031 (compare_ics): Handle AMBIG_CONV properly.
16032 * typeck2.c: Increment abort count.
16033 * method.c (build_opfncall): Forward most requests to build_new_op.
16034 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16036 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16038 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16039 invalid second argument to dump_expr_list.
16041 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
16043 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16045 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
16047 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16050 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
16052 * typeck2.c (process_init_constructor): New pedwarn for using { }
16053 to initialize a pointer to member function.
16054 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16055 we can avoid the new error.
16057 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
16059 * typeck.c (build_ptrmemfunc1): New function to hide details of
16060 pointer to member functions better.
16062 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
16064 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16065 methods into the actual method, as we know the implied object is
16068 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16070 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16071 inside a system header.
16073 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
16075 * call.c (build_method_call): Call complete_type on the
16078 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
16080 * typeck.c (build_component_ref): Always build up an OFFSET_REF
16081 for obj_ptr->func so that we can know which object to use in a
16084 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
16086 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16087 around things. Also improve maintainability.
16089 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
16091 * decl.c (grokdeclarator): Check for overflow when evaluating an
16094 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16096 * cvt.c (cp_convert): Don't check for ambiguity with constructor
16099 * typeck.c (build_x_function_call): Pass function overload
16100 questions to new overloading code if NEW_OVER.
16101 * init.c (expand_aggr_init_1): Only check for type conversion ops
16102 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16103 Don't check for ambiguity with constructor if NEW_OVER.
16104 * cvt.c (convert_to_reference): Dereference the result of a type
16105 conversion operator.
16106 (build_conv): Propagate ICS_USER_FLAG.
16107 (implicit_conversion): Call instantiate_type.
16108 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16109 (add_function_candidate): Fix cv-quals on argtype.
16110 (print_z_candidates): New function.
16111 (build_new_function_call): Call it.
16112 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16113 consider non-converting constructors.
16114 Call print_z_candidates.
16115 Return an AMBIG_CONV for an ambiguous conversion.
16116 (build_user_type_conversion): Handle AMBIG_CONV.
16117 (convert_like): Fix test for building TARGET_EXPR.
16118 Call instantiate_type.
16119 Handle AMBIG_CONV and LVALUE_CONV.
16120 (build_over_call): Handle 0 args and ellipsis.
16121 * cp-tree.def: Add AMBIG_CONV.
16123 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
16125 * decl.c (lookup_name_real): If we find mem in obj when parsing
16126 `obj->mem', make sure we return the right value.
16128 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
16130 * search.c (get_base_distance): Call complete_type.
16132 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
16134 * decl.c (store_bindings): Make static.
16136 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16138 * init.c (expand_aggr_init_1): Don't check type conversions if
16141 * cvt.c (z_candidate): Put back template field.
16142 (add_function_candidate): Set it.
16143 (add_template_candidate): Likewise.
16145 (compare_qual): Handle references and pointers to members.
16146 (compare_ics): Handle reference bindings.
16148 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16150 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
16152 * call.c (compute_conversion_costs): Call complete_type.
16154 * tree.c (vec_binfo_member): Use comptypes instead of comparing
16155 pointers, so we can handle template parameters.
16157 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
16159 * cvt.c (cp_convert_to_pointer): We have to call complete_type
16160 here; let's make it explicit instead of a side effect of an
16163 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16165 * cvt.c (z_candidate): Remove template field.
16166 (reference_binding): Handle binding to temporary.
16167 (implicit_conversion): Likewise.
16168 (add_function_candidate): Handle artificial constructor parms.
16169 Handle functions with too few parms.
16170 (add_template_candidate): New function.
16171 (build_user_type_conversion_1): Handle constructors.
16172 (convert_like): Likewise.
16173 (build_over_call): Likewise.
16174 (build_new_function_call): Support templates.
16175 (compare_ics): Fix reference, inheritance handling.
16177 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
16179 * decl.c: Add signed_size_zero_node.
16180 (init_decl_processing): Build it.
16181 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16182 when we're trying to make a negative delta.
16184 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16186 Stop doing this damn index==strchr variable name confusion.
16187 * class.c (add_virtual_function): Change local var INDEX to be
16189 (add_method): Likewise.
16190 * lex.c (print_parse_statistics): Likewise.
16191 * search.c (make_memoized_table_entry): Likewise.
16192 (lookup_fnfields_here): Likewise.
16193 (lookup_field): Likewise.
16194 (lookup_fnfields): Likewise.
16195 (get_baselinks): Likewise.
16196 * sig.c (build_signature_table_constructor): Likewise.
16197 (build_signature_method_call): Likewise.
16198 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16199 (get_member_function_from_ptrfunc): Likewise.
16200 (build_ptrmemfunc): Change local var INDEX to be IDX.
16201 (c_expand_start_case): Likewise.
16203 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16205 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16206 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16207 (convert_to_reference): Use build_type_conversion to convert to
16208 the reference type directly.
16209 (standard_conversion): Fix void* case, non-conversions.
16210 (reference_binding): Fix expr == 0 case, non-conversions.
16211 (convert_like): Support REF_BIND.
16212 (compare_qual): Split out from compare_ics.
16213 (compare_ics): Use it, handle icses with only a qual_conv.
16215 * init.c (expand_vec_init): Don't crash if decl is NULL.
16217 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
16219 * mpw-config.in: New file, configury for Mac MPW.
16220 * mpw-make.sed: New file, makefile editing for MPW.
16222 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16224 * pt.c (instantiate_class_template): Call repo_template_used.
16226 * search.c (lookup_conversions): Only lookup conversions in
16229 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16231 * cp-tree.def: Renamed from tree.def, to avoid confusion with
16233 * cp-tree.h, lex.c: Include cp-tree.def.
16234 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16236 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
16238 * init.c (build_vec_delete_1): Call complete_type.
16240 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
16242 * except.c (start_anon_func): Make sure anonymous functions are
16245 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16247 * decl.c (finish_function): If function_depth > 1, set nested.
16249 * decl2.c (grokbitfield): Revert Bob's change.
16250 * class.c (finish_struct_1): Fix handling of named bitfield widths.
16252 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
16254 * pt.c (add_pending_template): Handle types.
16255 (lookup_template_class): With -fexternal-templates, just add the class
16256 to pending_templates instead of instantiating it now.
16257 * decl2.c (finish_file): Handle types in pending_templates.
16259 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
16261 * decl2.c (grokbitfield): Handle constant decls appropriately.
16262 Give an appropriate error message now instead of spewing core
16265 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16267 * decl2.c: Don't turn on thunks by default for now.
16269 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
16271 * typeck.c (complete_type): Handle error_mark_node.
16272 (common_type, OFFSET_TYPE): Handle template_type_parms.
16274 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16276 * pt.c (instantiate_decl): If at_eof, call import_export_decl
16277 regardless of DECL_INLINE.
16279 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16281 * class.c (finish_struct_bits): Copy TYPE_SIZE.
16283 * rtti.c (build_dynamic_cast): Support templates.
16284 * tree.def: Support DYNAMIC_CAST_EXPR.
16285 * pt.c (tsubst_copy): Likewise.
16286 * decl2.c (build_expr_from_tree): Likewise.
16288 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16290 * typeck.c (build_static_cast): Support templates.
16291 (build_const_cast): Likewise.
16292 * tree.def: Support CONST/STATIC_CAST_EXPR.
16293 * pt.c (tsubst_copy): Likewise.
16294 * decl2.c (build_expr_from_tree): Likewise.
16296 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16298 * decl2.c (finish_vtable_vardecl): Don't trust
16299 TREE_SYMBOL_REFERENCED for vtables of local classes.
16301 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16303 * pt.c (tsubst_copy): Handle operator T.
16305 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16307 * init.c (build_delete): Move creation of PARMS inside test of
16308 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16310 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
16312 * typeck.c (build_conditional_expr): Don't assume that
16313 the arguments to ?: are always pointers or records.
16315 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16317 * decl2.c (import_export_decl): Still emit static/weak/comdat
16318 copies of inline template functions with -fno-implicit-templates.
16320 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
16322 * init.c (build_delete): Determine the complete basetype
16323 path to the destructor we're calling.
16325 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
16327 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16328 initialize the enum, because we really and truly don't know where
16330 (start_enum): Don't copy integer_zero_node because
16331 build_enumerator will do it.
16333 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16335 * decl.c (finish_function): Do access control on base destructors.
16337 * pt.c (tsubst, case FUNCTION_DECL): Set up
16338 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16341 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
16343 * cvt.c (build_up_reference): If we have already extended the
16344 lifetime of the temporary, don't try it again.
16345 * typeck.c (c_expand_return): Don't try and convert the return
16346 value twice when we want a reference, once is enough.
16348 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
16350 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16351 LOOKUP_ONLYCONVERTING at all for now.
16353 * search.c (add_conversions): Put the conversion function in
16354 TREE_VALUE, the basetype in TREE_PURPOSE.
16355 * cvt.c (build_type_conversion): Adjust.
16356 * cvt.c (build_expr_type_conversion): Adjust.
16357 * call.c (user_harshness): Adjust.
16359 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16361 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16364 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
16366 * except.c (expand_start_catch_block): Add a dummy region, if we
16367 get an error, so that we can avoid core dumping later.
16369 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
16371 * cp-tree.h (OFFSET_REF): Remove.
16372 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16373 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16374 * init.c (expand_aggr_init_1): Likewise.
16375 (build_new): Likewise.
16376 * typeck.c (expand_target_expr): Likewise.
16378 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16380 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16383 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
16385 * cvt.c (build_up_reference): Redo how and when temporaries are
16387 * decl.c (grok_reference_init): Don't try and be smart about
16390 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
16392 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16393 (TARGET_EXPR...), now that it has 4 arguments.
16394 * tree.c (build_cplus_new): Likewise.
16396 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16398 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16400 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16401 * decl.c (struct saved_scope): Remove named_labels,
16402 {base,member}_init_list.
16403 (maybe_push_to_top_level): Don't set them. Call
16404 push_cp_function_context if appropriate.
16405 (pop_from_top_level): Likewise.
16407 * method.c (do_build_assign_ref): Remove obsolete check of
16408 TYPE_HAS_ASSIGN_REF (basetype).
16410 * decl.c (grokfndecl): Diagnose user definition of
16411 implicitly-declared methods.
16413 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
16415 * method.c (do_build_copy_constructor): Add code to give
16416 meaningful error messages instead of crashing.
16417 (do_build_assign_ref): Don't synthesize assignment operators for
16418 classes containing reference or const members.
16420 * class.c (struct base_info): Remove cant_synth_copy_ctor
16421 and cant_synth_asn_ref.
16422 (finish_base_struct): Remove the code that tries to conditionalize
16423 synthesis of copy constructors & assignment operators based on
16424 access permissions. Instead, let it fail when it tries to
16425 synthesize the copy constructor. This will give meaningful error
16426 messages instead of silently generating code to perform a bitcopy.
16428 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
16430 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16431 determining types for constant values.
16433 * decl.c (struct named_label_list): Use instead of stuffing
16434 random items into a TREE_LIST node.
16435 (named_label_uses): Use the new struct.
16436 (poplevel): Likewise.
16437 (lookup_label): Likewise.
16438 (define_label): Add an error message to tell the user the line
16439 where the goto is located in addition to the destination of the
16441 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16443 (finish_function): Likewise.
16445 (start_decl): Complain about defining a static data member
16446 in a different type from which it was declared.
16448 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16450 * cvt.c (build_expr_type_conversion): Adjust.
16452 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16454 * call.c (build_method_call): Always convert 'this' to the
16457 * search.c (add_conversions): Put the conversion function in
16458 TREE_VALUE, the type in TREE_PURPOSE.
16459 * cvt.c (build_type_conversion): Adjust.
16460 * call.c (user_harshness): Adjust.
16462 * method.c (emit_thunk): Call temporary_allocation and
16463 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16465 * tree.c (build_cplus_array_type): Handle tweaking of
16466 TYPE_MAIN_VARIANT here.
16467 * typeck.c (common_type): Not here.
16469 * typeck.c (complete_type): Only try to complete an array type if
16472 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
16474 * decl.c (grokvardecl): Call complete_type.
16475 (grokdeclarator): Call complete_type for PARM_DECLs.
16477 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
16479 * pt.c (instantiate_class_template): Re-set
16480 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16482 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
16484 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16485 smart enough to do it right.
16486 * tree.c (cp_expand_decl_cleanup): Likewise.
16487 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16488 cp_expand_decl_cleanup.
16489 (store_parm_decls): Likewise.
16490 (hack_incomplete_structures): Likewise.
16491 * except.c (push_eh_cleanup): Likewise.
16493 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
16495 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16496 frontend to the backend where it belongs.
16497 * tree.c (unsave_expr): Likewise.
16498 (unsave_expr_now): Likewise.
16499 * tree.def (UNSAVE_EXPR): Likewise.
16500 * cp-tree.h (unsave_expr): Likewise.
16501 (unsave_expr_now): Likewise.
16503 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
16505 * init.c (emit_base_init): Make sure the partial EH cleanups live
16506 on the function_obstack.
16508 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
16510 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16511 when checking for pointer types.
16513 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16515 * pt.c (instantiate_class_template): Remove obsolete check for
16516 access declarations.
16518 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
16520 * call.c (build_overload_call): Simplify calls to
16521 build_overload_call by removing last parameter.
16522 (build_method_call): Likewise.
16523 * cp-tree.h: Likewise.
16524 * method.c (build_opfncall): Likewise.
16525 * typeck.c (build_x_function_call): Likewise.
16527 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
16529 * call.c (default_parm_conversions): Factor out common code.
16530 (build_method_call): Use it.
16531 (build_overload_call_real): Use it.
16533 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
16535 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16536 but pedwarn as the code is bogus.
16537 * typeck.c (decay_conversion): Likewise.
16538 (build_function_call_real): Use build_addr_func instead of
16539 default_conversion. Don't allow pointer-to-method functions down
16541 (build_unary_op): Use real pointer-to-member functions instead of
16543 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16544 (convert_for_assignment): Removed some obsolete code.
16545 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16546 build_x_function_call instead of current_class_ptr. Only call
16547 digest_init once on an initializer, we do this just checking
16549 (build_expr_from_tree): Pass current_class_ref to
16550 build_x_function_call instead of current_class_ptr.
16551 * init.c (build_member_call): Likewise.
16552 * pase.y: Likewise.
16553 * error.c (dump_expr): Handle OFFSET_REFs better.
16554 * pt.c (unify): Handle pointer-to-member functions better.
16555 * decl.c (finish_function): Clear out current_class_ref just like
16556 we do for current_class_ptr.
16558 * typeck.c (get_delta_difference): Handle virtual bases better.
16560 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
16562 * sig.c (build_signature_table_constructor): Use the delta for
16563 the original basetype for this virtual function with thunks.
16564 (build_signature_method_call): We still need to adjust 'this'
16567 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
16569 * call.c (build_addr_func): New routine. Used to get the `real'
16570 address of a function or a method. Needed to avoid getting a
16571 pointer-to-member function.
16572 (build_call): New routine to build CALL_EXPRs.
16573 (build_method_call): Use it.
16574 * cvt.c (convert_to_aggr): Likewise.
16575 * typeck.c (build_function_call_real): Likewise.
16576 * sig.c (build_signature_table_constructor): Use build_addr_func.
16577 * cp-tree.h (build_call, build_addr_func): Declare them.
16579 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
16581 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16582 * parse.y: Remove uses of LOOKUP_AGGR.
16584 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
16586 * *.[chy]: Rename current_class_decl to current_class_ptr, and
16587 C_C_D to current_class_ref.
16589 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16591 * call.c (convert_harshness): Tighten up pointer conversions.
16593 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
16595 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16596 (finish_file): Likewise.
16598 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16600 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16602 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16605 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16607 * decl2.c: Turn on thunks by default where supported.
16609 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
16611 * cp-tree.h (build_overload_call_maybe): Removed.
16612 * call.c (build_overload_call_real): Invert meaning of last arg to
16613 be require_complete.
16614 (build_overload_call): Likewise.
16615 * typeck.c (build_x_function_call): Use build_overload_call_real
16616 instead of build_overload_call_maybe.
16618 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16620 * decl2.c (finish_file): Don't try to emit functions that haven't
16623 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16625 * decl2.c (finish_vtable_vardecl): Oops.
16627 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16628 Also store the bindings from previous_class_values.
16629 (pop_from_top_level): Restore them.
16631 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16633 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16634 symbol has been referenced.
16635 (finish_file): Re-join synthesis/vtable loop with inline emission
16636 loop, disable inlining when an inline is output.
16638 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
16640 * except.c (init_exception_processing): Setup saved_in_catch.
16641 (push_eh_cleanup): Reset __eh_in_catch.
16642 (expand_start_catch_block): Set __eh_in_catch.
16644 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
16646 * except.c (push_eh_cleanup): Add tracking for whether or not we
16647 have an active exception object.
16648 (expand_builtin_throw): Use it to make sure a rethrow without an
16649 exception object is caught.
16651 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
16653 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16656 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16658 * decl2.c (finish_file): Also use sentries for vars with
16659 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16662 * lex.c (handle_cp_pragma): Disable #pragma
16663 interface/implementation if SUPPORTS_ONE_ONLY > 1.
16665 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16667 * method.c (emit_thunk): Wrap default case in
16668 temporary/permanent_allocation.
16670 * method.c (make_thunk): Use DECL_ONE_ONLY.
16671 (emit_thunk): Call assemble_end_function.
16673 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16675 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16676 (import_export_decl): Likewise.
16677 (finish_prevtable_vardecl): Disable vtable hack if
16678 SUPPORTS_ONE_ONLY > 1.
16680 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
16682 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16683 PREDECREMENT_EXPRs take two arguments, not one.
16685 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
16687 * class.c (build_vtable_entry): Don't build thunks for abstract
16690 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16693 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16695 * class.c (set_rtti_entry): Use size_zero_node.
16696 (build_vtable): Likewise.
16698 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
16700 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16701 (prepare_fresh_vtable): Likewise.
16703 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16705 * method.c (emit_thunk): Call mark_used on the target function.
16707 * call.c (build_method_call): Don't warn about pending templates.
16709 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16711 * decl2.c (finish_file): Fix list walking logic.
16713 * typeck2.c (check_for_new_type): Only warn if -pedantic.
16715 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
16717 * class.c (finish_struct_1): Remove old code for
16718 dont_allow_type_definitions.
16719 * cp-tree.h: Likewise.
16720 * spew.c: Make sure cp-tree.h is included before parse.h, so the
16721 definition of flagged_type_tree is found before it is used.
16723 * parse.y: Added the ftype member to the type union, and changed a
16724 number of rules to use it instead of ttype. Added calls to
16725 check_for_new_type() as appropriate.
16726 * typeck2.c (check_for_new_type): New function for checking
16727 if a newly defined type appears in the specified tree.
16728 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
16729 for check_for_new_type().
16731 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16733 * decl2.c (finish_file): Only use a sentry if the decl is public.
16735 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16736 don't pass LOOKUP_ONLYCONVERTING.
16738 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
16740 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16741 properly keeps track of const and volatile type modifiers.
16743 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16745 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16746 * pt.c (comp_template_args): Use it.
16748 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16749 assemble_external for artificial function decls.
16751 * decl.c (cp_finish_decl): Oops.
16753 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16755 * decl2.c (import_export_decl): Put static data member templates
16756 into common storage, or make them weak, depending on whether they
16757 are dynamically or statically initialized.
16758 (get_sentry): New function.
16759 (finish_file): Do import_export_decl for static data members before
16760 building the init/fini functions. Don't init/fini a variable that's
16761 EXTERNAL. Use a sentry for variables in common. Fix mismatching
16762 push/pop_temp_slots.
16763 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16764 expand_static_init thang.
16765 * method.c (get_id_2): New function.
16767 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
16769 * parse.y (empty_parms): Make sure we use C++-style prototypes
16770 when we're declaring member functions.
16772 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16774 * Makefile.in (CONFLICTS): 16 s/r conflicts.
16775 * parse.y (self_template_type): New nonterminal.
16777 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16779 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16781 * parse.y (base_class.1): Allow 'typename foo::bar'.
16783 * lex.c (check_newline): Remove #pragma code that plays with the
16784 input stream, since we now deal with tokens. Clear nextchar when
16786 (handle_cp_pragma): Use real_yylex.
16787 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
16790 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16792 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16794 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16796 * parse.y: New token SELFNAME for potential constructor.
16797 * spew.c (yylex): Handle it.
16798 * lex.c (identifier_type): Produce it.
16800 * parse.y (complete_type_name): In :: case, don't push class binding.
16801 (complex_type_name): Likewise.
16803 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
16805 * typeck.c (build_reinterpret_cast): Handle pointer to member
16808 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16810 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16812 (check_newline): Put the vtable/unit/implementation/interface pragma
16813 code into handle_cp_pragma, replacing it with a call.
16814 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16815 args. Get the next token after handling the pragma token.
16817 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16819 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16820 (convert_to_pointer_force): Likewise.
16822 * init.c (build_new): Fix array new without -fcheck-new.
16824 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16826 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16827 tree.c: Lose TYPE_NESTED_NAME.
16829 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16832 * tree.def: Add VEC_INIT_EXPR.
16833 * expr.c (cplus_expand_expr): Handle it.
16834 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16835 the extra file-scope symbol nastiness.
16837 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16839 * method.c (make_thunk): Thunks are static.
16840 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16842 * decl2.c (mark_vtable_entries): Emit thunks as needed.
16843 (finish_file): Don't emit them here.
16845 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16847 * rtti.c (build_dynamic_cast): Handle null pointers.
16848 (ifnonnull): New function.
16850 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
16852 * call.c (build_method_call): Remember the original basetype we
16853 were called with. Give an error message instead of trying
16854 (incorrectly) to call a non-static member function through a
16855 non-inherited class.
16857 * search.c (expand_upcast_fixups): Mark the new fixup as
16860 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16862 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16864 * class.c (set_rtti_entry): Fix for thunks.
16866 * decl2.c (import_export_decl): Still emit typeinfo fns for
16867 cv-variants of builtin types.
16869 * rtti.c (expand_class_desc): Set up base_info_type_node here.
16870 (init_rtti_processing): Instead of here.
16872 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16874 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16875 (build_typeid): Only complain about taking dynamic typeid without
16878 * decl2.c: flag_rtti defaults to 1.
16880 * rtti.c (get_tinfo_var): The general class case is now smaller.
16881 (init_rtti_processing): Pack the latter three fields of base_info
16884 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
16886 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16888 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
16890 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16891 (push_memoized_context): Split out code to undefer pop_type_level to
16892 (clear_memoized_cache): here.
16893 (pop_memoized_context): We can only handle one layer of deferral of
16894 pop_type_level so clear the cache, if there was a previous level.
16896 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16898 * rtti.c (init_rtti_processing): Build up base_info_type_node.
16899 (expand_class_desc): Use one pointer to an array of base_info
16900 structs, passed using a CONSTRUCTOR.
16902 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
16904 * class.c (build_vbase_path): Remove block extern for
16905 flag_assume_nonnull_objects here.
16906 (build_vfn_ref): Split out functionality into build_vtbl_ref.
16907 (build_vtbl_ref): New routine.
16908 (build_vtable): Set up rtti info here.
16909 (add_virtual_function): Note in CLASSTYPE_RTTI the best
16910 place where we can get the rtti pointers from to avoid having to
16911 search around for a place.
16912 (finish_base_struct): Likewise.
16913 (finish_struct_1): Likewise. Never create totally new vtables
16914 with totally new vtable pointers for rtti. Disable code to layout
16915 vtable pointers better until we want to break binary
16917 * rtti.c (build_headof_sub): New routine to convert down to a
16918 sub-object that has an rtti pointer in the vtable.
16919 (build_headof): Use it. Also, use build_vtbl_ref now to be more
16921 (build_dynamic_cast): Make sure we have saved it, if we need to.
16922 * search.c (dfs_init_vbase_pointers): Disable code that deals with
16923 a more efficient vtable layout, enable later.
16924 * call.c (flag_assume_nonnull_objects): Moved declaration to
16925 * cp-tree.h: here. Declare build_vtbl_ref.
16926 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16927 function calls that want a tree.
16929 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16931 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16932 other X subobjects in the most derived type. Ack.
16934 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16935 get_typeid will do it for us.
16936 (get_typeid_1): Break out call-building for expand_*_desc to use.
16937 (get_typeid): Call it.
16938 (expand_*_desc): Likewise.
16939 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16941 (init_decl_processing): Lose builtin_type_tdescs lossage.
16942 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16944 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
16946 * pt.c (tsubst): When calling set_nested_typename, use
16947 TYPE_NESTED_NAME (current_class_type) instead of
16948 current_class_name.
16950 * decl.c (pushdecl): Likewise.
16951 (pushdecl_class_level): Likewise.
16952 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16953 set_nested_typename.
16955 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16957 * rtti.c (synthesize_tinfo_fn): Handle arrays.
16959 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16961 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16963 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16964 (init_rtti_processing): Lose bad_cast_type.
16965 (build_dynamic_cast): Use throw_bad_cast.
16967 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16969 * decl2.c (finish_file): Don't synthesize artificial functions
16970 that are external and not inline.
16972 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16974 * decl2.c (finish_file): Handle having new inlines added to
16975 saved_inlines by synthesis.
16977 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16979 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16981 RTTI rewrite to initialize nodes as needed, not require that
16982 users #include <typeinfo>, complete functionality and reduce wasted
16984 * rtti.c (init_rtti_processing): New fn.
16985 (build_typeid): The vtable entry is now a function.
16986 (get_tinfo_var): New fn.
16987 (get_tinfo_fn): Likewise.
16988 (get_typeid): Use it.
16989 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16990 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16992 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16993 (synthesize_tinfo_fn): New fn.
16994 * method.c (build_t_desc_overload): Lose.
16995 (build_overload_with_type): More generic.
16996 * decl.c (init_decl_processing): Call init_rtti_processing.
16997 * class.c (set_rtti_entry): Use get_tinfo_fn.
16998 * decl2.c (mark_vtable_entries): Mark the rtti function.
16999 (finish_prevtable_vardecl): Don't build_t_desc.
17000 (import_export_decl): Handle tinfo functions.
17001 (finish_file): Likewise.
17002 * typeck.c (inline_conversion): New fn.
17003 (build_function_call_real): Use it.
17004 * cp-tree.h: Add decls.
17006 * method.c (hack_identifier): Also convert component_refs from
17009 * lex.c (cons_up_default_function): Use the type, not the name, in
17012 * decl2.c (import_export_vtable): Fix weak vtables.
17014 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
17016 * search.c (get_base_distance_recursive): Fix access checks for
17019 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17021 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17023 (convert_harshness): Add prototypes wrapped by PROTO.
17024 * decl2.c (grok_function_init): Likewise.
17025 (do_toplevel_using_decl): Change to void return type.
17026 * class.c (build_vtable_entry): Remove decl of make_thunk.
17027 (merge_overrides): Fix order of arg definitions.
17028 (finish_vtbls): Likewise.
17029 (fixup_vtable_deltas): Likewise.
17030 (modify_all_direct_vtables): Likewise.
17031 (modify_all_indirect_vtables): Likewise.
17032 * search.c (get_base_distance_recursive): Likewise.
17033 (get_abstract_virtuals_1): Likewise.
17034 (fixup_virtual_upcast_offsets): Likewise.
17035 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17036 * init.c (perform_member_init): Fix order of arg definitions.
17037 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17038 * cp-tree.h (make_thunk): Add decl.
17039 (overload_template_name, push_template_decl): Add decls.
17040 (do_toplevel_using_decl): Change to void return type.
17041 (vec_binfo_member): Add decl.
17043 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17045 * typeck.c (mark_addressable, convert_for_assignment,
17046 convert_for_initialization, pointer_int_sum, pointer_diff,
17047 unary_complex_lvalue): Add prototypes wrapped by PROTO.
17048 (convert_sequence): #if 0 fn decl, since definition also is.
17050 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
17052 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17053 cast to pointer types for type searching.
17055 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17057 * typeck.c (get_delta_difference): Use cp_error, not error, in the
17058 case where BINFO == 0.
17060 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
17062 * call.c (build_method_call): Fix wording of error messages so
17063 constructors come out right.
17065 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
17067 * decl.c (push_overloaded_decl): Don't warn about hidden
17068 constructors when both the type and the function are declared
17069 in a system header file.
17071 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
17073 * class.c (finish_struct_1): Propagate the TYPE_PACKED
17074 flag for the type to the type's fields.
17076 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17078 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17080 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
17082 * class.c (base_info, finish_base_struct): Replace
17083 needs_virtual_dtor with base_has_virtual.
17085 (finish_struct_1): Remove the old code that tried to make default
17086 destructors virtual. Use base_has_virtual when checking if we need
17087 to add a vtable entry for the rtti code.
17089 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17091 * pt.c (push_template_decl): Complain about template decl with
17092 inappropriate declaration.
17094 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
17096 * typeck.c (build_x_unary_op): Remove bogus check for taking
17097 the address of a member function.
17099 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17101 * parse.y (constructor_declarator): Only push the class if
17102 we are not already in the class.
17104 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
17106 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17107 Add additional argument to INIT_CUMULATIVE_ARGS.
17109 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
17111 * decl.c (shadow_tag): Fix error about anon union with methods.
17113 * parse.y (self_reference): Only generate a self-reference if this
17114 is a non-template class.
17115 (opt.component_decl_list): Only use it if it was generated.
17117 * parse.y (component_decl_1): Use constructor_declarator.
17118 (fn.def2): Likewise.
17119 (notype_component_declarator0): Likewise.
17121 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
17123 * typeck.c (build_x_unary_op): Add checks for taking the address
17124 of a TARGET_EXPR or of a member function, and give appropriate
17127 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17129 * pt.c (process_template_parm): Allow template type parms to be
17130 used as types for template const parms.
17132 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
17134 * init.c (expand_vec_init): Ensure the eh cleanups are on the
17137 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
17139 * decl.c (lookup_name_real): Be even more picky about the
17140 ambiguous lookup warning.
17141 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17142 * parse.y (constructor_declarator): Rather than here.
17144 * parse.y (constructor_declarator): New nonterminal.
17146 (explicit_instantiation): Likewise.
17148 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17150 Add implicit declaration of class name at class scope.
17151 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17152 * parse.y (self_reference): New nonterminal.
17153 (opt.component_decl_list): Use it.
17154 (fn.def1): Add nested_name_specifier type_name cases.
17155 * class.c (build_self_reference): New function.
17156 (finish_struct): Handle access_default later, move self-reference
17158 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17159 * cp-tree.h: Adjust.
17161 * pt.c (do_function_instantiation): Separate handling of member
17162 functions and non-member functions properly.
17164 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17166 * pt.c (process_template_parm): Improve error for 'volatile class K'.
17168 * class.c (finish_struct_1): Check the right slot for destructors.
17170 * decl.c (start_enum): Complain about enum templates.
17172 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
17174 * init.c (resolve_offset_ref): Offset pointers to member data by one.
17175 * typeck.c (unary_complex_lvalue): Likewise.
17177 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
17179 * typeck.c (c_expand_return): Check for a returned local
17180 array name, similar to the check for an ADDR_EXPR.
17182 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17184 * decl.c (cp_finish_decl): Don't build cleanups for static
17187 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
17189 * typeck.c (build_modify_expr): Fix error messages to be more
17191 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17192 assignment operators.
17193 * error.c (assop_as_string): Likewise. Add support for `%Q' for
17194 assignment operators.
17196 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
17198 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
17199 give an error if initialized. pedwarn about nested type with the
17200 same name as its enclosing class.
17202 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17204 * typeck.c (require_complete_type): Be sure to instantiate the
17205 MAIN_VARIANT of the type.
17207 * decl2.c (finish_file): Instantiate pending templates before
17208 processing static constructors and destructors.
17210 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17213 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
17215 * decl2.c (delete_sanity): If error_mark_node is passed
17216 in as an expression, quit while we're ahead.
17218 * decl.c (grokdeclarator): Give an error message if `friend'
17219 is combined with any storage class specifiers.
17221 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
17223 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17224 definition of nonexistent nested type.
17226 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17227 not to say 'typedef'.
17229 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17231 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17232 * search.c (dfs_walk, dfs_init_vbase_pointers,
17233 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17234 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17236 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17238 * except.c (build_throw): Support minimal parse.
17239 * pt.c (tsubst_copy): Support THROW_EXPR.
17240 * decl2.c (build_expr_from_tree): Likewise.
17242 * pt.c (mangle_class_name_for_template): Always allocate
17245 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
17247 * cvt.c (cp_convert_to_pointer): Give an appropriate error
17248 when trying to cast from an incomplete type.
17250 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17252 * pt.c (instantiate_class_template): Don't bother setting up
17253 CLASSTYPE_TAGS explicitly, as the nested types will add
17256 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
17258 * decl.c (shadow_tag): Remove old error check for usage of
17259 an enum without a previous declaration.
17260 (xref_tag): Add error message about usage of enums without a
17261 previous declaration.
17263 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17265 * lex.c (do_identifier): Only do name consistency check if we're
17268 * pt.c (push_template_decl): Don't crash if we get a member defn
17269 that doesn't match.
17271 * decl.c (xref_tag_from_type): New function to do an xref without
17272 always having to figure out code_type_node.
17273 * cp-tree.h: Declare it.
17274 * pt.c (instantiate_class_template): Use it for friend classes.
17275 (lookup_template_class): Use it.
17277 * typeck2.c (build_functional_cast): Pull out a single parm before
17278 passing it to build_c_cast.
17280 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
17282 * expr.c (do_case): Give an error message if a pointer is
17283 given as a case value.
17285 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
17287 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17290 * lex.c (cons_up_default_function): Really, now, interface hackery
17291 does not apply to synthesized methods.
17293 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
17295 * call.c (build_method_call): Ctors and dtors now have special names
17296 with respect to lookups.
17297 * class.c (add_method): Likewise.
17298 (grow_method): Likewise.
17299 (finish_struct_methods): Likewise.
17300 (warn_hidden): Likewise.
17301 (finish_struct_1): Likewise.
17302 * cvt.c (convert_to_reference): Likewise.
17303 (convert_to_aggr): Likewise.
17304 (cp_convert): Likewise.
17305 * decl2.c (check_classfn): Likewise.
17306 * init.c (expand_member_init): Likewise.
17307 (expand_default_init): Likewise.
17308 (expand_aggr_init_1): Likewise.
17309 (build_offset_ref): Likewise.
17310 (build_new): Likewise.
17311 (build_delete): Likewise.
17312 * lex.c (do_inline_function_hair): Likewise.
17313 * search.c (lookup_field_1): Likewise.
17314 (lookup_fnfields_here): Likewise.
17315 (lookup_field): Likewise.
17316 (lookup_fnfields): Likewise.
17317 (get_virtual_destructor): Likewise.
17318 (dfs_debug_mark): Likewise.
17319 (dfs_pushdecls): Likewise.
17320 (dfs_compress_decls): Likewise.
17321 * tree.c (layout_basetypes): Likewise.
17322 * typeck.c (build_component_ref): Likewise.
17323 (build_x_function_call): Likewise.
17324 (build_modify_expr): Likewise.
17325 (convert_for_initialization): Likewise.
17326 (build_functional_cast): Likewise.
17327 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17330 * decl.c (ctor_identifier): New.
17331 (dtor_identifier): New.
17332 (init_decl_processing): Set them.
17334 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
17336 * typeck.c (build_component_ref): Don't get confused by fields whose
17337 context has no type name, like pointer to member functions.
17339 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17341 * decl.c (grokdeclarator): Handle typedef without declarator.
17343 * pt.c (tsubst): Handle SCOPE_REF in declarator.
17345 * parse.y (bad_parm): Catch another case of missing `typename'.
17347 * lex.c (yyprint): Handle TYPE_DECLs.
17349 * decl.c (start_function): Don't try to be clever.
17351 * lex.c: Lose compiler_error_with_decl.
17352 * typeck2.c: Lose error_with_aggr_type.
17353 (incomplete_type_error): Use cp_* instead of old functions.
17354 (readonly_error): Likewise.
17355 * typeck.c (convert_arguments): Likewise.
17356 * search.c (lookup_nested_field): Likewise.
17357 * method.c (make_thunk): Likewise.
17358 * decl.c (grokparms): Likewise.
17359 * cp-tree.h: Update.
17361 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17364 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
17366 * method.c (build_opfncall): When deleting a pointer to an
17367 array, build a new pointer to the tree past any ARRAY_TYPE
17370 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17372 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17374 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
17376 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17379 * decl.c (finish_function): Don't set nested based on
17380 hack_decl_function_context.
17381 * parse.y (function_try_block): Check for nested function.
17382 (pending_inlines): Likewise.
17384 * decl2.c (build_expr_from_tree): If a unary op already has a
17385 type, just return it.
17387 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17389 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17390 (finish_file): Check the return value of walk_vtables.
17391 (finish_prevtable_vardecl): Return int.
17392 (finish_vtable_vardecl): Likewise.
17393 (prune_vtable_vardecl): Likewise.
17394 * lex.c (set_vardecl_interface_info): Likewise.
17395 * cp-tree.h: Adjust return types.
17397 * class.c (delete_duplicate_fields_1): Don't complain about
17398 duplicate nested types if they're the same type.
17399 (finish_struct): Remove check for duplicate.
17400 * decl2.c (grokfield): Don't check for typedef of anonymous type.
17402 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17404 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17406 * decl.c (grokdeclarator): Lose special handling of class-level
17407 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
17408 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17410 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17412 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17414 * search.c (compute_access): Fix handling of anonymous union
17416 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17417 from anonymous unions to their members.
17419 * typeck.c (build_x_function_call): For static member functions,
17420 hand off to build_member_call.
17422 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
17424 * typeck.c (build_component_ref): Handle OFFSET_REFs.
17426 * init.c (expand_vec_init): Fix init == 0 case.
17428 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17430 * init.c (build_new): pedwarn about init and array new.
17431 (expand_vec_init): Handle lists, use convert_for_initialization.
17433 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17434 when converting to an aggregate type.
17435 * cvt.c (cp_convert): Pass it through.
17437 * typeck.c (build_conditional_expr): Handle user-defined
17438 conversions to slightly different types.
17440 * decl.c (grokdeclarator): Force an array type in a parm to be
17443 * decl2.c (do_using_directive): Sorry.
17444 (do_namespace_alias): Likewise.
17445 * lex.c (real_yylex): Warn about using the `namespace' keyword.
17447 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17449 * parse.y (datadef): Move call to note_list_got_semicolon up.
17451 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
17453 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17455 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
17457 * decl.c (cp_finish_decl): The exception regions have to be
17458 nested, not overlapping. We start the exception region for a
17459 decl, after it has been fully built, and all temporaries for it
17460 have been cleaned up.
17462 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
17464 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17466 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
17468 * tree.def: Add RETURN_INIT.
17469 * pt.c (instantiate_decl): Handle RETURN_INIT.
17470 * decl.c (store_return_init): Handle minimal_parse_mode.
17472 * tree.c (cp_build_type_variant): Just return an error_mark_node.
17473 * decl.c (make_typename_type): Don't try to get the file and line
17475 * typeck.c (comptypes): Handle TYPENAME_TYPE.
17477 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
17479 * decl.c (poplevel): Make sure we clear out and restore old local
17480 non-VAR_DECL values by default when they go out of scope.
17482 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17484 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17485 referring to addresses of variables and functions.
17487 * error.c (dump_expr): Support SIZEOF_EXPR.
17489 * init.c (do_friend): Use the return value of check_classfn.
17491 * typeck.c (convert_arguments): Call complete_type.
17493 * method.c (hack_identifier): After giving an error, set value to
17496 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17498 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17499 lossage for local classes.
17500 * cp-tree.h: Declare it.
17501 * decl.c (lookup_name_real): Evil, painful hack for local classes.
17502 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17503 Use hack_decl_function_context.
17504 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17505 (start_function): Use hack_decl_function_context.
17506 (finish_function): Likewise.
17507 * method.c (synthesize_method): Likewise.
17508 * lex.c (process_next_inline): Likewise.
17509 (do_pending_inlines): Likewise.
17510 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17513 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
17515 * sig.c (build_signature_pointer_or_reference_type): Align
17516 signature pointers/references on 8-byte boundaries so they can be
17517 grabbed 2 words at a time on a Sparc.
17519 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
17521 * method.c (hack_identifier): Requiring a static chain is now a
17523 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17526 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17528 * init.c (build_offset_ref): Call complete_type.
17530 * decl.c (pop_from_top_level): Always pop previous_class_type.
17532 * parse.y: Handle multiple decls in a for-init-statement.
17533 * pt.c (tsubst_expr): Likewise.
17535 * pt.c (tsubst): Use tsubst_expr for the second operand of an
17538 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17539 (poplevel_class): Set it here.
17540 (pop_from_top_level): Pop it here if we're returning to class scope.
17541 * class.c (pushclass): Don't set it here.
17543 * decl.c (maybe_push_to_top_level): Save current_template_parms,
17544 and clear it if !pseudo.
17545 (pop_from_top_level): Restore it.
17547 * decl2.c (finish_file): Push the dummy each time we walk the list
17550 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17551 something for CAST_EXPR.
17553 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17555 * cvt.c (cp_convert): Warn about implicit conversion of the
17556 address of a function to bool, as it is always true.
17558 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17560 * typeck.c (c_expand_return): Fix warning for local externs returned.
17562 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
17564 * tree.c (mapcar): Propagate const and volatile properly.
17566 * typeck.c (complete_type): Be sure to instantiate the
17567 MAIN_VARIANT of the type.
17569 * method.c (synthesize_method): Class interface hackery does not
17570 apply to synthesized methods.
17572 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
17574 * pt.c (comp_template_args): Use comptypes rather than just
17575 checking for TEMPLATE_TYPE_PARM equivalence.
17577 * typeck.c (build_x_function_call): Call complete_type before
17578 checking TYPE_OVERLOADS_CALL_EXPR.
17580 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
17582 * g++.c (main): Check also for new define ALT_LIBM.
17584 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17586 * pt.c (instantiate_class_template): If we don't have a pattern
17588 (coerce_template_parms): If we see a local class, bail.
17590 * decl.c (grok_reference_init): Make sure there's a type before
17593 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17594 (push_template_decl): Likewise.
17596 * parse.y (named_class_head): Set
17597 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17599 * decl.c (xref_tag): Diagnose redeclaration of template
17600 type-parameter name.
17602 * error.c (dump_type): Handle anonymous template type parms.
17604 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17606 (coerce_template_parms): Likewise.
17608 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
17610 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17611 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17613 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17615 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17616 before trying to get its STUB_DECL.
17617 (coerce_template_parms): Likewise.
17619 * parse.y (template_type_parm): If they didn't use 'class',
17620 pretend they did after giving an error.
17622 * pt.c (coerce_template_parms): Diagnose use of local class.
17624 * decl.c (grok_reference_init): Use instantiate_type.
17626 * error.c (dump_expr): Handle TEMPLATE_DECLs.
17628 * parse.y (named_class_head): Diagnose mismatching types and tags.
17630 * decl.c (pushdecl): Type decls and class templates clash with
17631 artificial type decls, not hide them.
17633 * decl.c (redeclaration_error_message): Diagnose redefinition of
17634 templates properly.
17635 (duplicate_decls): Diagnose disallowed overloads for template
17638 * decl.c (start_decl): Call complete_type before checking for a
17641 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17643 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17645 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17647 * decl.c (grok_op_properties): Don't check for operator++(int) in
17650 * tree.c (perm_manip): Return a copy of variable and function
17651 decls with external linkage.
17653 * tree.def: Change some of the min tree codes to type "1".
17654 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17655 * method.c (build_overload_int): Emit something arbitrary for
17656 anything but an INTEGER_CST if we're in a template.
17658 * decl.c (cp_finish_decl): Call complete_type before deciding
17659 whether or not to lay out the decl.
17661 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17663 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17665 * typeck2.c (build_x_arrow): Call complete_type.
17667 * pt.c (add_pending_template): Broken out.
17668 (lookup_template_class): If -fexternal-templates, call it for all
17669 the methods of implemented types.
17670 (instantiate_class_template): Instead of instantiating them here.
17671 (instantiate_decl): Handle -fexternal-templates earlier.
17673 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17675 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17676 memoized lookup stuff inside GATHER_STATISTICS.
17678 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17680 * decl.c (start_decl): Complain about array of incomplete type
17682 (grokdeclarator): Not here.
17684 * parse.y (template_parm): Expand full_parm inline so we can set
17685 the rule's precedence.
17687 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17688 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17689 * decl2.c (grokbitfield): Don't check for integer constant here.
17690 * class.c (finish_struct_1): Check here.
17692 * decl.c (define_label): Make the min decl go on permanent_obstack.
17694 * pt.c (unify): Don't handle CONST_DECLs.
17695 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17696 (tsubst_copy): Likewise.
17698 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17699 CONST_DECL for a template parm.
17701 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
17703 * decl.c (grokdeclarator): Complain about array of incomplete type
17705 (start_decl_1): Not here.
17707 * pt.c (tsubst): Handle pointer-to-function declarators.
17709 * method.c (hack_identifier): If pedantic, diagnose local class
17710 methods that require a static chain.
17712 * decl.c (grok_op_properties): No longer static.
17713 * cp-tree.h: Declare it.
17714 * pt.c (tsubst): Call it for operators.
17715 Use tsubst_copy for TREE_VECs.
17717 * parse.y (template_arg): The expr has precedence like '>'.
17719 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
17721 * pt.c (coerce_template_parms): Don't coerce an expression using
17723 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17724 (tsubst): Don't use build_index_2_type if the max_value uses template
17726 * method.c (build_overload_int): Emit something arbitrary for an
17727 expression using template parms.
17729 * parse.y (template_close_bracket): New non-terminal to catch use
17730 of '>>' instead of '> >' in template class names.
17731 (template_type): Use it.
17732 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17734 * tree.def: Add CAST_EXPR.
17735 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17736 CONVERT_EXPR for minimal_parse_mode.
17737 * typeck.c (build_c_cast): Likewise.
17738 * pt.c (tsubst_copy): Likewise.
17739 * decl2.c (build_expr_from_tree): Likewise.
17740 * error.c (dump_expr): Likewise.
17742 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17744 * except.c (SetTerminate, SetUnexpected): Put back global vars.
17745 (init_exception_processing): Put back decl/init of
17746 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17747 fns from libstdc++.
17749 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17750 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17752 * cp-tree.h (declare_uninstantiated_type_level,
17753 uninstantiated_type_level_p): Delete prototypes.
17755 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17757 * pt.c (tsubst_expr): Add default return.
17759 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17761 * error.c (fndecl_as_string): Delete unused arg CNAME.
17762 * sig.c (build_signature_table_constructor,
17763 build_signature_method_call): Fix calls.
17765 * class.c (the_null_vtable_entry): Delete var definition.
17766 (init_class_processing): Delete tree the_null_vtable_entry init.
17767 * decl.c (no_print_{functions, builtins}): Declare as static.
17768 (__tp_desc_type_node): #if 0 var definition.
17769 (init_type_desc): #if 0 init of __tp_desc_type_node.
17770 (vb_off_identifier): Move var decl into init_decl_processing.
17771 (current_function_assigns_this): Declare as static.
17772 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17773 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17774 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17775 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17776 * init.c (BI_header_type, BI_header_size): Declare as static.
17777 * pt.c (template_classes): Delete unused var.
17778 (add_pending_template): Delete decl for non-existent fn.
17779 (lookup_template_class): Delete vars CODE and TAG_CODE.
17780 (instantiate_template): Delete unused var TARGS.
17781 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17783 (__tp_desc_type_node): #if 0 var decl.
17784 (fndecl_as_string): Fix prototype.
17786 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17788 * tree.def: Add GOTO_STMT.
17789 * pt.c (tsubst_expr): Support goto and labels.
17790 * decl.c (define_label): Support minimal parsing.
17791 * parse.y (simple_stmt): Likewise.
17793 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17795 * xref.c (GNU_xref_member): Only define/set var I if
17796 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17798 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17799 (GNU_xref_end): Fix call.
17800 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17801 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17803 * tree.c (build_exception_variant): Delete unused vars I, A, T,
17805 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17806 (mapcar): Delete unused var CODE.
17807 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17808 (break_out_cleanups): Fix call.
17809 (bot_manip): Likewise.
17810 * call.c (build_method_call): Likewise.
17811 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17813 * typeck.c (unary_complex_lvalue, build_modify_expr,
17814 convert_for_initialization): Likewise.
17815 * typeck2.c (build_functional_cast): Likewise.
17816 * cp-tree.h (build_cplus_new): Fix prototype.
17818 * repo.c (open_repo_file): Delete unused var Q.
17819 (repo_compile_flags, repo_template_declared,
17820 repo_template_defined, repo_class_defined, repo_inline_used,
17821 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17822 (repo_get_id, repo_vtable_used): Declare as static.
17823 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17826 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17828 * parse.y (pending_inlines): Add function_try_block case.
17830 * pt.c (unify): Fix for template const parms.
17832 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17834 * lex.c (extract_interface_info): Delete forward decl.
17835 (default_copy_constructor_body, default_assign_ref_body): Delete
17836 decls for non-existent functions.
17837 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17838 (init_lex): Delete setting them.
17839 (cons_up_default_function): Delete unused vars FUNC_BUF,
17840 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
17841 #if 0'd synth code.
17842 (toplevel, expression_obstack): Delete unused extern decls.
17843 (tree_node_kind): Delete unused enum.
17844 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17846 (tree_node_kind_names): Delete unused extern decl.
17847 (synth_obstack): Delete unused var.
17848 (init_lex): Don't set it.
17849 (init_parse): Add decl before use.
17850 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17851 (current_unit_{name, language}): Delete unused vars.
17852 (check_newline): Don't bother setting them, just accept the #pragma.
17853 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17854 (current_unit_{name, language}): Delete decls.
17856 * search.c: Wrap all of the memoized functions, macros, and
17857 variables inside #ifdef GATHER_STATISTICS.
17858 (lookup_field, lookup_fnfields): Likewise.
17859 (init_search_processing): Likewise.
17860 (reinit_search_statistics): Wrap whole function.
17861 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17863 * decl.c (finish_function): Only call pop_memoized_context if
17864 GATHER_STATISTICS is defined.
17865 (start_function): Likewise for push_memoized_context.
17866 * class.c (pushclass, popclass): Likewise.
17868 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17869 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17871 * cvt.c (cp_convert): Delete unused local var FORM.
17872 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17875 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17877 * pt.c (do_poplevel): Oops; really return what we get from
17878 poplevel this time.
17880 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17882 * cp-tree.h (is_aggr_type): Add prototype.
17884 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17885 * method.c ({push,pop}_cp_function_context): Delete decls.
17886 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17887 (SetUnexpected, SetTerminate): Delete unused vars.
17888 (init_exception_processing): Don't set SetUnexpected or
17889 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17890 (output_exception_table_entry): Delete unused array LABEL.
17891 (expand_internal_throw): Delete unused var PARAMS.
17892 (expand_start_catch_block): Delete unused var CLEANUP.
17893 (emit_exception_table): Delete unused var EH_NODE_DECL.
17894 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17895 GOTO_UNWIND_AND_THROW. Don't set them.
17896 (end_eh_unwinder): Add top decl.
17897 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17898 (exception_section, push_rtl_perm, do_function_call,
17899 lang_interim_eh, push_eh_cleanup, eh_outer_context,
17900 expand_end_eh_spec, end_eh_unwinder): Declare as static.
17901 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17902 throw_used): Likewise.
17903 * cp-tree.h (expand_end_eh_spec): Delete prototype.
17905 * search.c (dfs_mark, dfs_mark_vtable_path,
17906 dfs_unmark_vtable_path, dfs_mark_new_vtable,
17907 dfs_unmark_new_vtable, dfs_clear_search_slot,
17908 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17909 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17910 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17912 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17913 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17914 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17915 Only define #ifdef GATHER_STATISTICS.
17916 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17918 (vbase_decl): Delete var definition.
17919 (init_search): Delete old decl.
17920 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17921 never actually used.
17922 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17923 (get_base_distance_recursive): Delete unused fourth arg
17924 BASETYPE_PATH. Fix call .
17925 (get_base_distance): Fix call.
17926 (push_class_decls): Delete unused var ID.
17927 (make_memoized_table_entry): Declare as static.
17928 (breadth_first_search): Declare as static.
17929 (tree_has_any_destructor_p): Declare as static.
17930 (pop_class_decls): Delete unused arg pop_class_decls.
17931 * class.c (popclass): Fix call to pop_class_decls.
17932 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17933 tree_has_any_destructor_p): Delete prototypes.
17935 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17936 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
17937 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17938 (build_user_desc): Delete unused var T.
17939 (build_class_desc): Delete unused vars T and OFF.
17940 (build_t_desc): Delete unused var NAME_STRING.
17941 (build_headof): Make static.
17942 (get_bad_cast_node): Likewise.
17943 (get_def_to_follow): Likewise.
17944 * cp-tree.h (init_type_desc): Add prototype.
17945 (build_headof): Remove prototype.
17947 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17949 * pt.c (tsubst): Only look for matching decls at file scope for
17950 non-member functions.
17952 * call.c (build_scoped_method_call): Handle scoped destructor
17953 calls in templates.
17955 * decl.c (*_top_level): Also save previous_class_values.
17957 * pt.c (tsubst_expr): Support do {} while loops.
17958 * parse.y (simple_stmt): Likewise.
17959 * tree.def: Likewise.
17961 * method.c (build_overload_identifier): For a class nested in a
17962 template class, don't mangle in the template parms from our
17965 * lex.c, cp-tree.h: Remove support for template instantiations in
17966 the pending_inlines code.
17967 * pt.c: Remove dead functions and unused arguments.
17968 (uses_template_parms): TYPENAME_TYPEs always use template parms.
17969 * parse.y: Stop passing anything to end_template_decl.
17970 * tree.c (print_lang_statistics): Only print tinst info #ifdef
17973 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17975 * init.c (expand_recursive_init{,_1}): Delete decls.
17976 (sort_member_init): Delete unused var INIT.
17977 (emit_base_init): Delete unused var X.
17978 (build_offset_ref): Delete unused var CNAME.
17979 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17980 (emit_base_init): Delete unused local var BASE. Delete extern
17981 decl of IN_CHARGE_IDENTIFIER.
17982 (build_delete): Delete unused local var VIRTUAL_SIZE.
17984 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17985 (build_delete): Fix call.
17986 * decl2.c (delete_sanity): Likewise.
17987 * cp-tree.h (build_vec_delete): Update prototype.
17989 * typeck.c (common_base_type): Delete unused var TMP.
17990 (build_binary_op): Delete local var ARGS_SAVE.
17991 (build_array_ref): Delete unused var ITYPE.
17992 (c_expand_return): Delete unused var USE_TEMP.
17994 * typeck.c (compexcepttypes): Delete unused arg STRICT.
17995 (comptypes): Fix calls.
17996 * decl.c (duplicate_decls): Likewise.
17997 * cp-tree.h (compexcepttypes): Delete extra arg.
17999 * decl2.c (check_classfn): Delete unused second arg CNAME.
18000 * decl.c (start_decl, grokfndecl): Fix calls.
18001 * init.c (do_friend): Likewise.
18002 * cp-tree.h (check_classfn): Update prototype.
18004 * cp-tree.h (signature_error, import_export_vtable,
18005 append_signature_fields, id_in_current_class, mark_used,
18006 copy_assignment_arg_p): Add decls.
18007 * decl2.c (mark_used): Delete decl.
18009 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18011 * class.c (get_vtable_entry): Disable unused function.
18012 (doing_hard_virtuals): Delete unused static global var.
18013 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18014 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18015 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18016 (modify_one_vtable): Delete unused var OLD_RTTI.
18017 (finish_struct_anon): Delete unused vars OFFSET and X.
18018 (finish_struct_bits): Delete unused var METHOD_VEC.
18019 (get_basefndecls): Delete unused var PURPOSE. Delete unused
18020 for-scope local variable METHODS.
18022 * call.c (user_harshness): Delete unused/unneeded arg PARM.
18023 (ideal_candidate): Delete unused args BASETYPE and PARMS.
18024 (build_method_call): Delete unused args passed into ideal_candidate.
18025 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
18026 * cp-tree.h (synthesize_method): Add decl.
18028 * decl.c (note_level_for_for): Give void return type.
18029 (pushdecl_nonclass_level): Likewise.
18030 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18031 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18032 (suspend_binding_level): Delete unused var LEVEL.
18033 (duplicate_decls): Delete unused var CTYPE.
18034 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18035 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18037 (grokdeclarator): Delete unused var C.
18038 (grokdeclarator): Delete unused var SIZE_VARIES.
18039 (grokparms): Delete unused var SAW_VOID.
18040 (start_function): Delete unused var OLDDECL.
18041 (cplus_expand_expr_stmt): Delete unused var
18042 REMOVE_IMPLICIT_IMMEDIATELY.
18044 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18046 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18048 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18050 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18051 (build_min_nt): Likewise.
18052 * pt.c (do_pushlevel): Emit line note.
18053 (do_poplevel): Return what we get from poplevel.
18054 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18055 * parse.y: Use do_pushlevel and do_poplevel.
18056 * cp-tree.h: Declare do_poplevel.
18058 * cp-tree.h: Declare at_eof.
18059 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18060 * decl2.c (import_export_decl): Renamed from import_export_inline.
18061 (finish_file): Call it to do interface handling for statics.
18062 * pt.c (tsubst_copy): Call mark_used on variables and functions
18065 * decl2.c (finish_file): Don't emit statics we can't generate.
18066 * pt.c (instantiate_decl): Don't set interface on instantiations
18069 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18070 * tree.c (print_lang_statistics): Print max template depth.
18071 * pt.c (push_tinst_level): Dump entire instantiation context.
18072 (instantiate_class_template): Use it and pop_tinst_level.
18073 (instantiate_decl): Likewise.
18075 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18076 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18078 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18080 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18081 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18082 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18083 the new template implementation.
18085 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18087 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18089 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
18091 * decl.c (cp_finish_decl): Delay emitting the debug information for
18092 a typedef that has been installed as the canonical typedef, if the
18093 type has not yet been defined.
18095 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
18097 * decl2.c (grokfield): Still call pop_nested_class for access decls.
18099 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18101 * decl.c (lookup_label): Call label_rtx.
18103 * decl.c (make_binding_level): New function.
18104 (pushlevel, pushlevel_class): Call it instead of explicit
18105 duplicate calls to xmalloc.
18107 * decl.c (init_decl_processing): Delete useless build_pointer_type
18110 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18111 (sizet_ftype_string): Delete variable.
18112 (init_decl_processing): Add built-in functions fabsf, fabsl,
18113 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
18114 variable strlen_ftype, used for strlen.
18116 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
18118 * decl.c (push_to_top_level): Start from current_binding_level
18119 again for now; the stl hacks depend on g++ being broken in this
18120 way, and it'll be fixed in the template rewrite.
18122 * tree.def: Add USING_DECL.
18123 * decl2.c (do_class_using_decl): Implement.
18124 (grokfield): Pass access decls off to do_class_using_decl instead of
18126 * error.c (dump_decl): Handle USING_DECLs.
18127 * decl.c (grokdeclarator): Remove code for handling access decls.
18128 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18129 as access decls for now.
18130 (finish_struct): Don't check USING_DECLs for other uses of the name.
18132 * search.c (get_matching_virtual): Use cp_error_at.
18134 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18136 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18138 (self_promoting_args_p): Move the check that TYPE is non-nil
18139 before trying to look at its main variant.
18140 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18142 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18144 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18145 (do_friend): Delete call to xref_friend.
18146 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18148 * typeck.c (convert_sequence): #if 0 unused function.
18150 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18151 be in decl_in_memory_p.
18152 (decl_in_memory_p): Delete decl.
18153 * expr.c (decl_in_memory_p): Delete fn.
18154 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18156 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18158 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18160 * class.c (finish_struct_1): Check for a pure-specifier on a
18161 non-virtual function here.
18163 * decl2.c (grok_function_init): Don't check whether the function
18165 (grokfield): Don't call check_for_override here.
18167 * decl.c (push_to_top_level): Start from inner_binding_level,
18168 check class_shadowed in class levels.
18170 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
18172 * decl.c (resume_level): Ignore things that don't have names, instead
18175 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18177 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18179 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
18181 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18184 * parse.y (complete_type_name): Bind global_scope earlier.
18185 (complex_type_name): Likewise.
18186 (qualified_type_name): Remove.
18188 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
18190 * decl.c (grokfndecl): Move code that looks for virtuals in base
18192 * class.c (check_for_override): ... to a new function.
18193 (finish_struct_1): Call it.
18195 * cp-tree.h: Declare warn_sign_compare.
18197 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18198 rather than extra_warnings to decide whether to warn about
18199 comparison of signed and unsigned.
18201 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
18202 implies -Wsign-compare. -Wall doesn't imply -W.
18204 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
18206 * typeck.c (build_component_ref): Fix to handle anon unions in base
18209 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18211 * class.c (resolves_to_fixed_type_p): Delete code dealing with
18212 a WITH_CLEANUP_EXPR, since we don't generate them any more.
18213 * cvt.c (build_up_reference): Likewise.
18214 * decl.c (grok_reference_init): Likewise.
18215 (cp_finish_decl): Likewise.
18216 * error.c (dump_expr): Likewise.
18217 * tree.c (real_lvalue_p): Likewise.
18218 (lvalue_p): Likewise.
18219 (build_cplus_new): Likewise.
18220 (unsave_expr_now): Likewise.
18221 * typeck.c (unary_complex_lvalue, build_modify_expr,
18222 c_expand_return): Likewise.
18224 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18226 Make the C++ front-end pay attention to attributes for structures.
18227 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18229 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18230 Take out old round_up_size use and setting the DECL_ALIGN possibly
18231 using it. Take out setting of TYPE_ALIGN to round_up_size, which
18232 can override what the attribute set.
18233 * cp-tree.h (finish_struct): Update prototype.
18234 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18235 attributes to finish_struct.
18236 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18237 value down into finish_struct.
18238 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18240 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
18242 * decl.c (poplevel): Re-word dead for local handling.
18243 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
18244 (cp_finish_decl): If is_for_scope, check for duplicates so
18245 we can disable is_for_scope. Otherwise, preserve_temp_slots.
18247 * lex.c (do_identifier): Use global binding in preference of
18248 dead for local variable.
18250 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
18252 * init.c (initializing_context): Handle anon union changes, the
18253 context where fields of anon unions can be initialized now has to be
18254 found by walking up the TYPE_CONTEXT chain.
18256 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
18258 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18259 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18260 (obscure_complex_init): If bss is supported, always set
18261 DECL_INITIAL to error_mark_node.
18263 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18265 * init.c (is_friend): Make sure there's a context before we see if
18268 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
18270 * init.c (is_friend): Classes are not friendly with nested classes.
18272 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
18274 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18275 and record its result.
18277 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
18279 * class.c (finish_struct_anon): Switch around code to not move anon
18280 union elements around, nor mess up their contexts, nor offsets,
18281 instead we now build up the right number of COMPONENT_REFs for all
18282 the anon unions that may be present at build_component_ref time.
18283 * typeck.c (lookup_anon_field): New routine to handle field lookup
18284 on fields without names. We find them, based upon their unique type
18286 * typeck.c (build_component_ref): Allow FIELD_DECL components.
18287 Handle finding components in anonymous unions, and ensure that a
18288 COMPONENT_REF is built for each level as necessary.
18290 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
18292 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18293 code that ensures that copy ctors are used if appropriate.
18295 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18297 * init.c (build_vec_delete): Only give an error if base isn't an
18300 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
18302 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18303 (yylex): If we see `new', keep slurping.
18305 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
18307 * class.c (finish_struct_1): Move code for handling anon unions...
18308 (finish_struct_anon): to here. Fixup so that we do the offset
18309 calculations right, and so that the fields are physically moved to
18310 the containers's chain.
18312 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18314 * decl.c (grokdeclarator): Avoid trying to get an operand off an
18317 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
18319 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18320 POINTER_SIZE to agree with expr.c.
18322 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
18324 * search.c (lookup_field): Don't report ambiguities if protect is 0,
18325 instead return NULL_TREE.
18327 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
18329 * class.c (finish_struct_1): Call warn_hidden if we want warnings
18330 about overloaded virtual functions.
18331 (warn_hidden): New routine to warn of virtual functions that are
18332 hidden by other virtual functions, that are not overridden.
18333 (get_basefndecls): New routine, used by warn_hidden.
18334 (mark_overriders): New routine, used by warn_hidden.
18335 * search.c (get_matching_virtual): Remove old warning that just
18338 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18340 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18342 * typeck.c (null_ptr_cst_p): Delete unused fn.
18343 (build_function_call_maybe): Delete unused fn.
18345 * expr.c (extract_init): #if 0 the code after unconditional return 0
18348 Delete old cadillac code.
18349 * edsel.c: Remove file.
18350 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18351 * Makefile.in (CXX_OBJS): Delete edsel.o.
18352 (edsel.o): Delete rule.
18353 * cp-tree.h (flag_cadillac): Delete var decl.
18354 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18355 * decl2.c (flag_cadillac): Delete var definition.
18356 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18357 (grokfield): Delete code depending on flag_cadillac.
18358 (finish_anon_union): Likewise.
18359 * class.c (finish_struct_1): Likewise.
18360 (pushclass): Likewise.
18361 (popclass): Likewise.
18362 (push_lang_context): Likewise.
18363 (pop_lang_context): Likewise.
18364 * decl.c (init_decl_processing): Likewise.
18365 (start_decl): Likewise.
18366 (cp_finish_decl): Likewise.
18367 (xref_tag): Likewise.
18368 (finish_enum): Likewise.
18369 (start_function): Likewise.
18370 (finish_function): Likewise.
18371 (finish_stmt): Likewise.
18372 * lex.c (lang_init): Likewise.
18373 (check_newline): Likewise.
18375 * lex.c (do_pending_inlines): Delete synthesized method kludge.
18377 Delete defunct, ancient garbage collection implementation.
18378 * rtti.c: New file with the RTTI stuff from gc.c.
18379 * gc.c: Removed file (moved the remaining stuff into rtti.c).
18380 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18381 (rtti.o): New rule, replacing gc.o.
18382 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18383 * cp-tree.h: Delete gc-related fn decls.
18384 (DECL_GC_OFFSET): Delete macro.
18385 (flag_gc): Delete extern decl.
18386 * decl.c (current_function_obstack_index): Delete var decl.
18387 (current_function_obstack_usage): Delete var decl.
18388 (start_function): Delete clearing of current_function_obstack_index
18389 and current_function_obstack_usage.
18390 (init_decl_processing): Delete code relying on -fgc.
18391 Delete call to init_gc_processing.
18392 (cp_finish_decl): Delete calls to build_static_gc_entry and
18393 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
18394 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18395 and to expand_expr of a __gc_main call.
18396 (maybe_gc_cleanup): Delete var decl.
18397 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18398 * decl2.c (flag_gc): Delete var decl.
18399 (lang_f_options): Delete offering of -fgc.
18400 (lang_decode_option): Delete -fgc and -fno-gc handling.
18401 (get_temp_regvar): Delete gc code.
18402 * init.c (build_new): Delete gc code.
18403 * lex.c (init_lex): Delete checking of flag_gc.
18405 * typeck.c (convert_arguments): Delete gc code.
18406 (build_component_addr): Delete -fgc warning.
18407 (build_modify_expr): Delete gc code.
18409 * decl2.c (build_push_scope): Delete fn.
18410 * cp-tree.h (build_push_scope): Delete decl.
18412 * search.c (clear_search_slots): Delete fn.
18413 * cp-tree.h (clear_search_slots): Delete decl.
18415 * search.c (tree_needs_constructor_p): Delete fn.
18416 * cp-tree.h (tree_needs_constructor_p): Delete decl.
18418 * tree.c (id_cmp): Delete fn.
18420 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18421 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18423 * tree.c (decl_value_member): Delete fn.
18424 * cp-tree.h (decl_value_member): Delete decl.
18426 * tree.c (list_hash_lookup_or_cons): Delete fn.
18427 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18429 * method.c (cplus_exception_name): Delete fn.
18430 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18432 * spew.c (shift_tokens): Delete fn.
18434 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18436 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18438 * parse.y: Likewise.
18440 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18442 * tree.c (build_cplus_staticfn_type): Delete function definition;
18444 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18446 * tree.c (virtual_member): Delete function definition; never used.
18447 * cp-tree.h (virtual_member): Delete decl.
18449 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
18451 * typeck.c (build_component_ref): Handle getting vbase pointers
18452 out of complex multiple inheritance better.
18454 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
18456 * typeck.c (build_object_ref): Make sure we use the real type, not
18457 any reference type.
18459 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
18461 * tree.c (build_exception_variant): Don't create new types if we
18462 don't have to, also build new types on the right obstack.
18464 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18466 * decl.c (store_bindings): Split out from push_to_top_level.
18467 (push_to_top_level): Call it for b->type_shadowed on class binding
18470 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
18472 * search.c (expand_upcast_fixups): Fix so that offsets stored in
18473 vbase_offsets are always right. Fixes a problem where virtual base
18474 upcasting and downcasting could be wrong during conversions on this
18475 during virtual function dispatch at ctor/dtor time when dynamic
18476 vtable fixups for deltas are needed. This only sounds easier than
18478 (fixup_virtual_upcast_offsets): Change to reflect new calling
18479 convention for expand_upcast_fixups.
18481 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18483 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18484 check that it's usable as the bitfield width.
18486 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18488 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18489 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18490 only ever used for functions in it.
18492 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18494 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18495 (nested_type): Likewise.
18496 (nested_name_specifier): Use lastiddecl.
18498 * decl.c (grokdeclarator): Adjust accordingly.
18499 * init.c (expand_member_init): Likewise.
18500 * parse.y (base_class): Likewise.
18501 * typeck2.c (build_functional_cast): Likewise.
18503 * typeck2.c (build_functional_cast): Fill in name after we've
18504 checked for non-aggr type.
18506 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
18508 * decl2.c (warn_pointer_arith): Default to on.
18510 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18512 * lex.c (is_rid): New function.
18513 * decl.c (grokdeclarator): Diagnose reserved words used as
18516 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18518 * tree.c (get_decl_list): Don't lose cv-quals.
18520 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18521 typespecs used as declarator-ids.
18523 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
18525 * decl.c (poplevel): When poping a level, don't give a warning for
18526 any subblocks that already exist.
18528 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18530 * typeck.c (build_object_ref): Finish what I started.
18532 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18534 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18536 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18539 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18541 * decl.c (xref_tag): Handle passing a type in directly.
18543 * parse.y (qualified_type_name): Pull out the type.
18544 (nested_type): Likewise.
18545 Take types directly instead of as identifiers.
18546 * call.c (build_scoped_method_call): Take types directly instead of
18548 * decl.c (xref_basetypes): Likewise.
18549 * init.c (expand_member_init): Likewise.
18550 (build_member_call): Likewise.
18551 (build_offset_ref): Likewise.
18552 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18553 * method.c (do_build_assign_ref): Likewise.
18554 * decl.c (grokdeclarator): Handle a type appearing as the
18555 declarator-id for constructors.
18556 * method.c (do_build_copy_constructor): current_base_init_list now
18557 uses the types directly, not their names.
18558 * init.c (sort_base_init): Likewise.
18559 (expand_member_init): Likewise.
18560 * init.c (is_aggr_type): New function, like is_aggr_typedef.
18562 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
18564 * tree.c (layout_basetypes): Call build_lang_field_decl instead
18565 of build_lang_decl if first arg is a FIELD_DECL.
18567 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18569 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18571 * except.c (expand_start_catch_block): Set TREE_USED to avoid
18572 warnings about the catch handler.
18574 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
18576 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18577 expand_target_expr.
18579 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18581 Fix access control to use trees rather than integers.
18582 * class.c (access_{default, public, protected, private,
18583 default_virtual, public_virtual, private_virtual}_node): Add
18585 (init_class_processing): Do creation of those nodes.
18586 * cp-tree.h (access_type): Delete enum decl.
18587 (access_{default, public, protected, private, default_virtual,
18588 public_virtual, private_virtual}_node): Add decls.
18589 (compute_access): Change return type.
18590 * search.c (compute_access): Have tree return type, instead of enum.
18591 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18592 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18593 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18594 * parse.y (VISSPEC): Make ttype rather than itype.
18595 (base_class_access_list): Likewise.
18596 * *.[cy]: Change all refs of `access_public' to `access_public_node',
18598 * call.c (build_method_call): Make ACCESS be a tree.
18599 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18600 * cvt.c (convert_to_aggr): Likewise.
18601 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18603 * method.c (hack_identifier): Likewise.
18604 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18606 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
18608 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18609 frontend, and make it more consistent with respect to
18610 warn_pointer_arith.
18612 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
18614 * decl.c (pushdecl): Check for duplicate parameter names.
18616 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
18618 * decl.c (expand_static_init): Call assemble_external for atexit.
18620 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
18622 * except.c (do_unwind): Remove some generated dead code.
18623 (eh_outer_context): New routine, factor out some common code from
18624 expand_builtin_throw and end_eh_unwinder. Add code to do return
18625 address masking for the PA.
18626 (expand_builtin_throw): Use eh_outer_context instead of open coding
18628 (end_eh_unwinder): Likewise.
18630 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
18632 * except.c (expand_throw): Call assemble_external for __empty, if we
18635 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
18637 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18638 NORMAL_RETURN_ADDR_OFFSET.
18639 (end_eh_unwinder): Likewise.
18641 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
18643 * gc.c (build_dynamic_cast): Make sure we don't cast away const
18644 when dealing with references, and make sure we handle dynamic
18645 casting to a cv qualified reference.
18647 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
18649 * except.c (struct eh_context): New structure top hold eh context
18651 (push_eh_context): New routine.
18652 (pop_eh_context): Likewise.
18653 * decl.c (push_cp_function_context): Use them.
18654 (pop_cp_function_context): Likewise.
18656 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
18658 * decl2.c (finish_file): Also prune uninteresting functions in the
18659 inline emission loop.
18661 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
18663 * sig.c (build_signature_table_constructor): Mark functions
18664 in the signature as referenced.
18666 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
18668 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18669 the inline emission stuff.
18671 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
18673 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18675 * lang-options.h: Add -f{no-,}weak.
18676 * decl.c (init_decl_processing): If the target does not support weak
18677 symbols, don't use them.
18678 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18680 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18682 * init.c (expand_member_init): warning for base init after members.
18684 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
18686 * cvt.c (build_expr_type_conversion): Don't convert to a reference
18689 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
18691 * method.c (report_type_mismatch): Improve wording for volatile
18694 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
18696 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18697 expand_assignment, as the later doesn't handle things that have
18698 copy constructors well. The compiler would do bitwise copying,
18699 instead of ctor calling in some cases.
18701 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
18703 * g++.c (my_strerror): Return "cannot access" if errno is 0.
18704 (pfatal_with_name, perror_exec): Don't assume that
18705 the returned value from my_strerror contains no '%'s.
18707 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18709 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
18711 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18712 TYPE_METHODS/TREE_CHAIN mean what they used to.
18713 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18714 instead of TYPE_METHODS.
18715 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18716 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18717 * cp-tree.h (CLASSTYPE_METHODS): Lose.
18718 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18720 (struct lang_decl): Lose next_method field.
18721 (DECL_NEXT_METHOD): Lose.
18722 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18723 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18725 (finish_struct_methods): Don't mess with the TREE_CHAINs in
18728 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18731 * call.c (build_method_call): Synthesize here even when not inlining.
18732 * typeck.c (build_function_call_real): Likewise.
18734 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
18736 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18737 == DBX_DEBUG, call dbxout_start_new_source_file and
18738 dbxout_resume_previous_source_file when appropriate.
18740 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
18742 * except.c (start_anon_func): Push to the top level.
18743 (end_anon_func): Pop from the top level.
18745 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
18747 * cp-tree.h (build_cleanup): New routine to build cleanups.
18748 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18749 call at ctor time and use atexit to run it later.
18750 * decl2.c (build_cleanup): New routine, taken from finish_file.
18751 (finish_file): Use build_cleanup instead, and don't put function
18752 local statics in global dtor list.
18754 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
18756 * except.c (expand_throw): Ensure that we have cleanups, if we try
18757 and expand cleanups.
18759 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
18761 * except.c (expand_throw): Add logic to manage dynamic cleanups for
18763 (expand_end_catch_block): Use the magic of expand_goto, instead of
18764 emit_jump so that we get the cleanup for any catch clause parameter
18765 and the cleanup for the exception object. Update to reflect label
18767 (push_eh_cleanup): New routine to register a cleanup for an
18769 (empty_fndecl): Used to default cleanup actions to
18771 (init_exception_processing): Setup empty_fndecl. Setup
18773 (expand_start_catch_block): Update to reflect label changes. Call
18774 push_eh_object to register the cleanup for the EH object.
18775 (start_anon_func): New routine to start building lambda expressions
18777 (end_anon_func): New routine to end them.
18778 (struct labelNode): Change so that we can use tree labels, or rtx
18780 (saved_cleanup): Object to check for dynamic cleanups for the
18781 exception handling object.
18782 (push_label_entry): Change so that we can use tree labels, or rtx
18784 (pop_label_entry): Likewise.
18785 (top_label_entry): Likewise.
18786 (expand_start_all_catch): Use tree label instead of rtx label, so
18787 that we can get the magic of expand_goto.
18788 (expand_end_all_catch): Update to reflect label changes.
18790 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18792 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18793 building_cleanup logic, as we now use UNSAVE_EXPRs.
18794 * cp-tree.h (unsave_expr): Declare it.
18795 * decl.c (building_cleanup): Remove.
18796 (maybe_build_cleanup): Remove building_cleanup logic, and use
18797 UNSAVE_EXPR instead.
18799 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
18801 * gc.c (build_t_desc): Update error message to say <typeinfo>.
18803 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18805 * decl.c (pushdecl): Only warn about shadowing a local variable if
18806 warn_shadow is true.
18808 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18810 * typeck.c (build_binary_op_nodefault): Added warning about
18811 comparisons between different enum types with -Wall, unless
18812 -fenum-int-equiv set.
18814 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
18816 * class.c (finish_struct_1): Skip down to the inner type in
18817 multidimensional arrays. Ensures ctors will be made for types that
18820 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
18822 * decl.c (last_dtor_insn): New to track the last compiler generated
18824 (store_parm_decls): Set it.
18825 (finish_function): Use it to see if the dtor is empty. Avoid doing
18826 vtable setup all the time, if we can.
18827 (struct cp_function): Add last_dtor_insn.
18828 (push_cp_function_context): Save it.
18829 (pop_cp_function_context): Restore it.
18831 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
18833 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18836 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
18838 * typeck.c (expand_target_expr): Make sure targets get put into the
18839 current temp_slot_level, so that the free_temp_slots call will reuse
18842 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
18844 * class.c (finish_struct_1): Delay delta fixups for virtual bases
18845 until after we have done the hard virtuals, to avoid a bogus `every
18846 virtual function must have a unique final overrider' for virtual
18847 functions that are only overridden by hard virtuals.
18849 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18851 * pt.c (do_function_instantiation): Don't try to find a file-scope
18852 template for a member function.
18854 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
18856 * g++.c (main): Add handling of -nodefaultlibs.
18858 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
18860 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18861 distinguish between direct bindings of reference variables, and
18862 indirect bindings of reference variables.
18863 * cvt.c (build_up_reference): Use it.
18864 * typeck.c (convert_arguments): Use it to indicate this is an
18866 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18867 as they are unused.
18868 (expand_static_init): Likewise.
18869 (cplus_expand_expr_stmt): Likewise.
18870 * decl2.c (finish_file): Likewise.
18871 * init.c (perform_member_init): Likewise.
18872 (emit_base_init): Likewise.
18873 (expand_aggr_vbase_init_1): Likewise.
18875 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18877 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18878 get a DECL_LANG_SPECIFIC node.
18879 * cp-tree.h (lang_decl_flags): Add new member `level'.
18880 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18881 decl_flags level member.
18883 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18885 * call.c (build_method_call): Make sure instance has a
18886 TYPE_LANG_SPECIFIC node before we dive into it.
18888 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
18890 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18892 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
18894 * decl.c (duplicate_decls): When smashing decls, smash staticness in
18897 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
18899 * decl.c (poplevel): Handle the merging of subblocks of cleanups
18900 when finishing blocks that have already been created (usually due to
18901 the fixup goto code). Fixes bad debugging information.
18903 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
18905 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18906 that's not a list of overloaded functions.
18908 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18910 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18911 before trying to use DECL_ABSTRACT_VIRTUAL_P.
18913 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
18915 * decl2.c (mark_used): New function for hooking into setting of
18916 TREE_USED on decls.
18917 * call.c (build_method_call): Use it.
18918 * class.c (instantiate_type): Likewise.
18919 * init.c (build_offset_ref): Likewise. Don't call assemble_external
18920 for all like-named functions.
18921 * method.c (hack_identifier): Likewise.
18922 (emit_thunk): Don't call assemble_external.
18923 (make_thunk): Create thunk as a FUNCTION_DECL so that it
18924 gets the right mode and ENCODE_SECTION_INFO works.
18926 * parse.y: Use mark_used. Pass operator names to do_identifier.
18927 * lex.c (do_identifier): Handle operator names.
18929 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18931 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18933 * errfn.c: Include stdio.h.
18934 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18936 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
18938 * typeck2.c (digest_init): Always convert initializers to the
18941 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
18943 * init.c (member_init_ok_or_else): Don't allow member initializers
18944 for indirect members, as it is invalid.
18946 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18948 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18950 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
18952 * parse.y (for.init.statement): Catch compound statements inside for
18953 initializations, if we're being pedantic.
18955 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
18957 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18960 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
18962 * error.c (dump_expr): Don't core dump when a boolean expression is
18963 used as a default argument.
18965 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18967 * class.c (finish_struct_bits): Check aggregate_value_p instead of
18970 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
18972 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18973 BLKmode type that would otherwise be returned in registers.
18975 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18977 * g++.c (WITHLIBC): New macro.
18978 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
18979 saw_libc and pass it at the end if it was set.
18981 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18983 * parse.y (fn.def1): Call split_specs_attrs in
18984 declmods notype_declarator case.