ChangeLog revision 48743
1Thu Aug 22 23:47:38 1997 H.J. Lu (hjl@gnu.ai.mit.edu) 2 3 * Version 2.7.2.3 released. 4 5Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com> 6 7 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C 8 frontend. 9 10Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 11 12 * errfn.c: Include stdio.h. 13 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*. 14 15Mon Nov 20 14:06:28 1995 Mike Stump <mrs@cygnus.com> 16 17 * Version 2.7.2 released. 18 19Mon Nov 20 14:05:00 1995 Mike Stump <mrs@cygnus.com> 20 21 * g++.c (pfatal_with_name): Add missing third argument to concat. 22 23Thu Oct 26 13:59:54 1995 Mike Stump <mrs@cygnus.com> 24 25 * init.c (expand_aggr_init): Handle cv qualifiers on the object's 26 type. 27 28Sun Nov 12 18:09:35 1995 Mike Stump <mrs@cygnus.com> 29 30 * Version 2.7.1 released. 31 32Thu Nov 2 17:02:47 1995 Jason Merrill <jason@yorick.cygnus.com> 33 34 * call.c (convert_harshness): Handle references to arrays. 35 36Fri Oct 27 14:20:21 1995 Jason Merrill <jason@yorick.cygnus.com> 37 38 * typeck.c (comp_target_types): Check multi-level pointer 39 conversions in both directions. 40 41Tue Oct 17 21:39:05 1995 Jason Merrill <jason@yorick.cygnus.com> 42 43 * parse.y (explicit_instantiation): Fix 'extern template' with no 44 return type. 45 46Mon Oct 16 14:35:20 1995 Jason Merrill <jason@yorick.cygnus.com> 47 48 * parse.y (explicit_instantiation): Support automatic instantiation 49 of constructors. 50 (named_class_head_*): Support out-of-class definition of nested 51 types. 52 53Wed Oct 11 12:20:56 1995 Mike Stump <mrs@cygnus.com> 54 55 * search.c (envelope_add_decl): New routine. Fix so that 56 methods are hidden in the same way that other members are. 57 (dfs_pushdecls): Cleanup and move functionality out of line, 58 into envelope_add_decl. 59 60Tue Oct 10 15:46:01 1995 Mike Stump <mrs@cygnus.com> 61 62 * typeck.c (mark_addressable): Only call assemble_external if we 63 have started the output file. 64 65Tue Oct 10 11:27:18 1995 Jason Merrill <jason@yorick.cygnus.com> 66 67 * decl.c (start_function): Fix earlier cv-quals change. 68 69Mon Oct 9 23:53:05 1995 Mike Stump <mrs@cygnus.com> 70 71 * parse.y (complex_direct_notype_declarator): Only push the class if 72 we are not already in the class. 73 74Mon Oct 9 11:22:03 1995 Doug Evans <dje@canuck.cygnus.com> 75 76 * decl.c (duplicate_decls): Call merge_machine_decl_attributes. 77 Update olddecl's attributes too. 78 (grokdeclarator): #if 0 out call to build_decl_attribute_variant. 79 * typeck.c (common_type): Call merge_machine_type_attributes. 80 81Fri Oct 6 14:44:27 1995 Mike Stump <mrs@cygnus.com> 82 83 * typeck.c (mark_addressable): Add missing call to 84 assemble_external. 85 86Wed Oct 4 22:05:23 1995 Jeff Law (law@hurl.cygnus.com 87 88 * cp/decl.c (deplicate_decls): Merge in deferred output 89 status for variables. 90 * cp/tree.c (tree_copy_lang_decl_for_deferred_output): New 91 function to copy the g++ specific parts of a DECL node. 92 (tree_copy_lang_type_for_deferred_output): Similarly for 93 TYPE nodes. 94 95Wed Oct 4 15:06:39 1995 Mike Stump <mrs@cygnus.com> 96 97 * decl.c (store_parm_decls): Make sure the unwinder start comes 98 before the exception specification start. 99 * except.c (expand_exception_blocks): Make sure the unwinder end 100 comes after the terminate protected catch clause region and after 101 the end of the exception specification region. 102 103Wed Oct 4 12:47:02 1995 Jason Merrill <jason@yorick.cygnus.com> 104 105 * lex.c (real_yylex): Fix identifier case for linemode. 106 (handle_sysv_pragma): Don't abort when we see a pragma we don't 107 recognize. 108 109Tue Oct 3 14:09:46 1995 Mike Stump <mrs@cygnus.com> 110 111 * decl.c (store_parm_decls): Add a call to start_eh_unwinder. 112 * except.c (init_exception_processing): __throw doesn't take any 113 arguments. 114 (expand_builtin_throw): Ditto. Always use Pmode, instead of SImode 115 for all pointers. Use expand_builtin_return_addr to unwind the 116 first level off the stack. 117 (do_unwind): Always use Pmode, instead of SImode for all pointers. 118 (expand_exception_blocks): Add a call to end_eh_unwinder. 119 (start_eh_unwinder, end_eh_unwinder): New routines to build machine 120 independent stack unwinders for function/method calls. 121 122Mon Oct 2 17:20:42 1995 Mike Stump <mrs@cygnus.com> 123 124 * tree.c (unsave_expr_now): Make sure we process the argument list 125 of any called functions. Fixes incorrect code generation for 126 cleanups. 127 128Mon Oct 2 13:04:16 1995 Mike Stump <mrs@cygnus.com> 129 130 * typeck.c (get_member_function_from_ptrfunc): Save function if it 131 needs it. Cures core dump on things like (this->*(f()))(). 132 133Sat Sep 23 22:51:25 1995 Jason Merrill <jason@phydeaux.cygnus.com> 134 135 * decl.c (start_function): Conform to gcc cv-quals convention (no 136 expression has a cv-qualified type) in RESULT_DECLs. 137 * method.c (make_thunk): Ditto. 138 139Fri Sep 22 10:21:13 1995 Mike Stump <mrs@cygnus.com> 140 141 * decl.c (pushtag): Add in the namespace name for the tag. 142 143Thu Sep 21 13:11:13 1995 Mike Stump <mrs@cygnus.com> 144 145 * parse.y (maybe_base_class_list, base_class_list, base_class, 146 base_class_access_list): Make sure we see the typenames for base 147 classes. 148 * lex.c (see_typename): Instead of failing to see a typename when 149 there is no next token, perfer a typename, and get the next token. 150 151Wed Sep 20 12:35:27 1995 Michael Meissner <meissner@cygnus.com> 152 153 * decl.c (init_decl_processing): Add __builtin_expect. 154 155Tue Sep 19 16:48:11 1995 Mike Stump <mrs@cygnus.com> 156 157 * cvt.c (cp_convert_to_pointer): Don't allow leftover conversions to 158 or from pointer to member functions, they must all be handled before 159 this point. 160 161Fri Sep 15 17:14:47 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 162 163 * init.c (resolve_offset_ref): Fix wording of non-static member 164 being referenced as a static. 165 166Fri Sep 15 12:39:11 1995 Jason Merrill <jason@phydeaux.cygnus.com> 167 168 * typeck.c (build_indirect_ref): Only bash pointer if we actually 169 call build_expr_type_conversion. 170 171Thu Sep 14 18:24:56 1995 Jason Merrill <jason@deneb.cygnus.com> 172 173 * cvt.c (build_expr_type_conversion): Handle conversion from 174 reference. 175 * typeck.c (build_indirect_ref): Avoid infinite recursion. 176 177Thu Sep 14 17:23:28 1995 Mike Stump <mrs@cygnus.com> 178 179 * decl.c (expand_start_early_try_stmts): New routine to start a try 180 block at the start of the function, for function-try-blocks. 181 * cp-tree.h (expand_start_early_try_stmts): Declare it. 182 * parse.y (function_try_block): Use it, instead of doing it here, as 183 we don't want to include rtl.h here, as that conflicts with RETURN 184 in the parser. 185 186Wed Sep 13 18:32:24 1995 Mike Stump <mrs@cygnus.com> 187 188 * lex.c (reinit_parse_for_block): Support saving inline 189 function-try-blocks, uses peekyylex. 190 * parse.y (eat_saved_input): New rule, permit the parser to see that 191 END_OF_SAVED_INPUT is ok, as it can see this when parsing the 192 handlers of a function-try-block. 193 (fndef): Use it. 194 (component_decl): Make sure TRY and RETURN can come after fn.def2. 195 * spew.c (peekyylex): New routine to peek at what will come next. 196 197Wed Sep 13 16:52:06 1995 Jason Merrill <jason@phydeaux.cygnus.com> 198 199 * typeck.c (comptypes): Tighten up comparisons of template type 200 parms. 201 202 * decl.c (duplicate_decls): Turn off whining about virtual functions 203 redeclared inline for now. 204 205Wed Sep 13 11:13:40 1995 Mike Stump <mrs@cygnus.com> 206 207 * decl.c (store_in_parms): New routine to put things before we 208 put base inits. 209 * cp-tree.h (store_in_parms): Declare it. 210 * decl.c (store_parm_decls): Use it to makr sure the starting of the 211 eh spec comes before base inits. 212 (finish_function): Use sequences instead of the obsolete 213 reorder_insns. 214 * parse.y (fndef): Enhance readability and maintainability. Update 215 to include function_try_block syntax. 216 (function_try_block): Add. 217 218Tue Sep 12 17:43:07 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 219 220 * call.c (convert_harshness): Use comptypes, not ==, to check if 221 TYPE and PARMTYPE are equivalent on a function type. 222 223Tue Sep 12 17:31:33 1995 Douglas Rupp (drupp@cs.washington.edu) 224 225 * Make-lang.in (cc1plus) : Removed unnecessary $(exeext). 226 227Mon Sep 11 23:24:07 1995 Mike Stump <mrs@cygnus.com> 228 229 * except.c (expand_throw): Never allocate storage for thrown pointer 230 to objects. 231 232Mon Sep 11 19:36:45 1995 Mike Stump <mrs@cygnus.com> 233 234 * except.c (expand_start_catch_block): Pointers to objects come 235 back from catch matching already dereferenced, don't dereference 236 again. 237 238Mon Sep 11 15:46:28 1995 Mike Stump <mrs@cygnus.com> 239 240 * except.c (expand_throw): Only decay the throw expression, don't do 241 any default conversions. This is so that one can throw and catch 242 characters, and not have them match integers. 243 244Mon Sep 11 13:46:45 1995 Mike Stump <mrs@cygnus.com> 245 246 * error.c (dump_aggr_type): Deal with anonymous unions that don't 247 have a TYPE_NAME. 248 249Fri Sep 8 20:40:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 250 251 * lex.c (handle_sysv_pragma): Deal with getting a comma from yylex. 252 253Fri Sep 8 15:51:41 1995 Mike Stump <mrs@cygnus.com> 254 255 * except.c (expand_end_eh_spec): Handle empty EH specifications. 256 257Fri Sep 8 15:27:22 1995 Mike Stump <mrs@cygnus.com> 258 259 * cp-tree.h (expand_start_eh_spec): Declare new routine. 260 (expand_end_eh_spec): Ditto. 261 * decl.c (store_parm_decls): Call expand_start_eh_spec to process 262 exception specifications. 263 * except.c (expand_leftover_cleanups): Remove unused parameter. 264 (expand_end_catch_block): Ditto. 265 (expand_exception_blocks): Ditto. 266 (expand_start_eh_spec): New routine to mark the start of an 267 exception specification region. 268 (expand_end_eh_spec): New routine to mark the end of an exception 269 specification region. 270 (expand_exception_blocks): Call expand_end_eh_spec to process 271 exception specifications. 272 273Fri Sep 8 14:40:48 1995 Per Bothner <bothner@kalessin.cygnus.com> 274 275 * lex.c (do_identifier): Use global binding in preference of 276 dead for local variable. 277 278Wed Sep 6 19:32:59 1995 Mike Stump <mrs@cygnus.com> 279 280 * cp-tree.h (build_exception_variant): Remove used first argument. 281 * decl.c (duplicate_decls): Ditto. 282 (grokfndecl): Ditto. 283 (revert_static_member_fn): Ditto. 284 * decl2.c (grok_method_quals): Ditto. 285 * tree.c (build_exception_variant): Ditto. 286 * typeck.c (common_type): Ditto. 287 * decl2.c (grokclassfn): After changing the type, call 288 build_exception_variant, if necessary. 289 290Tue Sep 5 15:56:27 1995 Mike Stump <mrs@cygnus.com> 291 292 * except.c (expand_throw): Run cleanups for the throw expression. 293 294Wed Aug 30 15:24:38 1995 Stephen L. Favor (sfavor@tigger.intecom.com) 295 296 * except.c (expand_builtin_throw): Moved gen_label_rtx calls beyond 297 the store_parm_decls call which does initialization in the emit_* 298 code concerning label numbering. 299 300Thu Aug 31 09:01:07 1995 Mike Stump <mrs@cygnus.com> 301 302 * except.c (expand_internal_throw): Let the frontend be responsible 303 for managing all frontend EH parameters, the backend routine only 304 needs to deal with backend values. type and value are no longer 305 passed to __throw. 306 (init_exception_processing): Ditto. 307 (expand_start_all_catch): Ditto. 308 (expand_end_all_catch): Ditto. 309 (expand_leftover_cleanups): Ditto. 310 (expand_end_catch_block): Ditto. 311 (expand_builtin_throw): Ditto. 312 (expand_throw): Ditto. 313 314Tue Aug 29 15:04:36 1995 Jason Merrill <jason@phydeaux.cygnus.com> 315 316 * cp-tree.h (DECL_REAL_CONTEXT): Give the real declaration context 317 for a decl. 318 * decl.c (cp_finish_decl): Use it. 319 320Tue Aug 29 10:30:27 1995 Mike Stump <mrs@cygnus.com> 321 322 * except.c (expand_internal_throw): Oops, almost forgot type and 323 value are now trees. 324 325Mon Aug 28 17:57:45 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 326 327 Fix the attribute handling to make sure they get noted before we 328 create the function's RTL, in case they can affect that. 329 * decl.c (grokfndecl): New arg ATTRLIST. Run 330 cplus_decl_attributes before creating the decl's rtl. 331 (grokdeclarator): New arg ATTRLIST, passed down into grokfndecl. 332 (shadow_tag, groktypename, start_decl, start_method): Pass a 333 NULL_TREE to grokdeclarator's new last arg. 334 * decl2.c (grokfield): New arg ATTRLIST, passed into grokdeclarator. 335 (grokbitfield, grokoptypename): Pass a NULL_TREE to 336 grokdeclarator's new last arg. 337 * except.c (expand_start_catch_block): Likewise. 338 * pt.c (process_template_parm, end_template_decl, 339 do_function_instantiation): Likewise. 340 * cp-tree.h (grokfield): Add arg. 341 (grokdeclarator): Move the prototype from here... 342 * decl.h: ...to here. 343 * lex.c (cons_up_default_function): Pass NULL_TREE to grokfield 344 ATTRLIST argument. 345 * parse.y: Create a list for the grokfield arg where appropriate, 346 and pass it down instead of calling cplus_decl_attributes. 347 348Mon Aug 28 15:07:24 1995 Mike Stump <mrs@cygnus.com> 349 350 * except.c: Always allow turning on exception handling. Allow cross 351 compilations to use EH. 352 353Thu Aug 24 17:39:24 1995 Mike Stump <mrs@cygnus.com> 354 355 * except.c (saved_pc, saved_throw_type, saved_throw_value): Use 356 trees, instead of rtxs, and don't depend on using special machine 357 dependent registers. 358 (expand_internal_throw): Ditto. 359 (init_exception_processing): Ditto. 360 (expand_start_all_catch): Ditto. 361 (expand_end_all_catch): Ditto. 362 (expand_start_catch_block): Ditto. 363 (expand_leftover_cleanups): Ditto. 364 (expand_end_catch_block): Ditto. 365 (expand_builtin_throw): Ditto. 366 (expand_throw): Ditto. 367 368Wed Aug 23 17:25:51 1995 Jason Merrill <jason@phydeaux.cygnus.com> 369 370 * cvt.c (build_expr_type_conversion): Handle conversions to 371 reference types. 372 373Wed Aug 23 15:33:59 1995 Mike Stump <mrs@cygnus.com> 374 375 * except.c (do_unwind): Work around backend bug with -fpic. 376 377Tue Aug 22 17:20:07 1995 Per Bothner <bothner@kalessin.cygnus.com> 378 379 * decl2.c (flag_new_for_scope): Add a new mode that follows ANSI 380 for-scoping, but supports (and warns about) old programs. 381 Make the new mode (with value 1) the default. 382 (lang_f_options): The on-value for flag_new_for_scope is now 2. 383 * cp-tree.h (DECL_DEAD_FOR_LOCAL, DECL_ERROR_REPORTED): New macros 384 (DECL_SHADOWED_FOR_VAR): Likewise. 385 * decl.c (struct binding_level): New fields dead_vars_from_for 386 and is_for_scope. 387 (note_level_for_for): New function. 388 (poplevel): Special processing if is_for_scope. 389 (pushdecl): Warn if for-scope variable shadows local. 390 * lex.c (do_identifier): Handle old (non-ANSI) for scoping, 391 and warn if conflicts. 392 * parse.y (FOR): Call note_level_for_for. 393 394Mon Aug 21 10:28:31 1995 Jason Merrill <jason@deneb.cygnus.com> 395 396 * decl2.c (import_export_inline): Class interface hackery does not 397 apply to synthesized methods. 398 399Sun Aug 20 16:29:00 1995 Mike Stump <mrs@cygnus.com> 400 401 * search.c (virtual_context): Find the right context more often. 402 Solves a `recoverable compiler error, fixups for virtual function' 403 problem. 404 405Sun Aug 20 13:53:24 1995 Mike Stump <mrs@cygnus.com> 406 407 * except.c (expand_start_all_catch): Ensure that we always transfer 408 control to the right EH handler, by rethrowing the end label on the 409 region, instead of hoping we are nested and falling through. 410 (expand_leftover_cleanups): Ditto. 411 (end_protect): Since we now rethrow the end label, put a 412 nop after it, so that outer regions are recognized. 413 * init.c (build_vec_delete_1): New routine to handle most of vector 414 deleting, all code moved here from build_vec_delete. 415 (build_array_eh_cleanup): Use build_vec_delete_1 to do all the real 416 work. 417 (expand_vec_init): If the array needs partial destructing, setup an 418 EH region to handle it. 419 (build_vec_delete): Move lots of code to build_vec_delete_1, use 420 build_vec_delete_1 to do the grunt work. 421 422Sat Aug 19 14:25:33 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 423 424 Handle decl attributes properly for function definitions without 425 previous attribute-loaded declarations. 426 * decl.c (start_function): New arg ATTRS. Add a call to 427 cplus_decl_attributes with it before we create the RTL. 428 * cp-tree.h (start_function): Update prototype. 429 * parse.y (fn.def1): Pass ATTRS into start_function instead of 430 trying to call cplus_decl_attributes too late. Pass a NULL_TREE 431 for other use. 432 * decl2.c (finish_file): Pass NULL_TREE as fourth arg to 433 start_function. 434 * method.c (synthesize_method): Likewise. 435 * except.c (expand_builtin_throw): Likewise for start on __throw. 436 437Sat Aug 19 13:36:08 1995 Mike Stump <mrs@cygnus.com> 438 439 * class.c (set_rtti_entry): Turn on -fvtable-thunk -frtti support. 440 This changes -fvtable-thunks vtable layout, so a recompile will be 441 necessary, if you use -fvtable-thunks. 442 (get_vtable_entry): Use n, instead of i to be consistent with the 443 rest of the compiler. 444 (get_vtable_entry_n): Ditto. 445 (add_virtual_function): Add a slot for the tdesc, if -fvtable-thunks 446 are being used. 447 (finish_struct_1): Ditto. 448 (skip_rtti_stuff): New routine to collapse similar code from many 449 different parts of the compiler. I think I got them all. 450 (modify_one_vtable): Use it. 451 (fixup_vtable_deltas1): Ditto. 452 (override_one_vtable): Ditto. 453 * decl2.c (mark_vtable_entries): Ditto. 454 * tree.c (debug_binfo): Ditto. 455 * search.c (expand_upcast_fixups): Ditto. 456 (get_abstract_virtuals_1): Ditto. Use virtuals, instead of tmp to 457 consistent with the rest of the compiler. 458 (get_abstract_virtuals): Ditto. 459 * cp-tree.h (skip_rtti_stuff): New routine, declare it. 460 * gc.c (build_headof): Support -fvtable-thunk and -frtti together. 461 (build_typeid): Ditto. 462 (build_classof): Remove old style way of doing rtti. Remove support 463 for `classof' and `headof'. 464 * gxx.gperf: Ditto. 465 * hash.h: Ditto. 466 * parse.y: Ditto. 467 468Fri Aug 18 17:31:58 1995 Jason Merrill <jason@deneb.cygnus.com> 469 470 * decl.c (start_function): Clear ctor_label and dtor_label. 471 472 * class.c (finish_struct_1): Fix handling of access decls. 473 474Tue Aug 15 19:21:54 1995 Jason Merrill <jason@phydeaux.cygnus.com> 475 476 * class.c (finish_struct): Only do minimal processing here, so it 477 can be used for class template definitions, as well. 478 (finish_struct_1): New function with the rest of the code. 479 480Tue Aug 15 09:46:16 1995 Mike Stump <mrs@cygnus.com> 481 482 * class.c (prepare_fresh_vtable): On second though, always build the 483 offset (see Aug 10 change), unless -fvtable-thunks is given. It 484 does this by calling the new routine set_rtti_entry. 485 (finish_struct): Ditto. 486 (set_rtti_entry): New routine to update the rtti information at the 487 start of the vtable. 488 489Mon Aug 14 12:21:22 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 490 491 * error.c (dump_decl, case IDENTIFIER_NODE): Only work on a dtor 492 if it's declared in the C++ language spec. 493 (dump_function_decl): Likewise. 494 (dump_function_name): Likewise. 495 (ident_fndecl): Make sure we got something back from lookup_name. 496 * decl.c (start_function): Likewise. 497 498Fri Aug 11 16:52:15 1995 Jason Merrill <jason@phydeaux.cygnus.com> 499 500 * call.c (build_method_call): Don't call build_new when calling a 501 constructor without an instance. 502 503Thu Aug 10 20:00:17 1995 Mike Stump <mrs@cygnus.com> 504 505 * class.c (prepare_fresh_vtable): Always build the offset to the 506 complete object, as it doesn't cost much. This allows dynamic_cast 507 to void * to work when -frtti isn't given. 508 (finish_struct): Ditto. 509 510Thu Aug 10 16:31:28 1995 Mike Stump <mrs@cygnus.com> 511 512 * except.c (build_eh_type): Split out some functionality to new 513 routine named build_eh_type_type. 514 (build_eh_type_type): New routine. 515 (expand_start_catch_block): Use build_eh_type_type, as we never want 516 the dynamic type of the catch parameter, just the static type. 517 Fixes core dumps when -frtti is used and one catchs pointers to 518 classes. 519 520Thu Aug 10 14:55:29 1995 Mike Stump <mrs@cygnus.com> 521 522 * except.c (expand_builtin_throw): Since we now use normal calling 523 conventions for __throw, we have to remove the first layer off the 524 stack, so that the next context we search for handlers is the outer 525 context instead of the context that had the call to __throw, if we 526 don't immediately find the desired context. 527 528Tue Aug 8 17:44:23 1995 Jason Merrill <jason@phydeaux.cygnus.com> 529 530 * tree.c (cp_expand_decl_cleanup): Returns int, not tree. 531 * cp-tree.h: Update. 532 533 * parse.y (template_type_parm): Add support for `typename'. 534 535Tue Aug 8 12:06:31 1995 Mike Stump <mrs@cygnus.com> 536 537 * except.c (expand_internal_throw): New internal routine to throw a 538 value. 539 (expand_end_all_catch, expand_leftover_cleanups): All throwers 540 changed to use `expand_internal_throw' instead of jumping to throw 541 label. 542 (expand_end_catch_block, expand_throw): Ditto. 543 (throw_label): Removed. 544 (expand_builtin_throw): Changed so that EH parameters are passed by 545 normal function call conventions. Completes Aug 4th work. 546 547Fri Aug 4 17:17:08 1995 Mike Stump <mrs@cygnus.com> 548 549 * cp-tree.h (expand_builtin_throw): Declare it. 550 * decl2.c (finish_file): Call expand_builtin_throw. 551 * except.c (make_first_label): Remove. 552 (init_exception_processing): Don't use a LABEL_REF for throw_label, 553 instead use a SYMBOL_REF, this is so that we don't use LABEL_REFs in 554 other functions that don't really appear in those functions. This 555 solves a problem where cc1plus consumed exponential amounts of 556 memory when -Wall was used. 557 (expand_end_all_catch, expand_leftover_cleanups, 558 expand_end_catch_block, expand_throw): Change all uses of 559 throw_label to match new style. 560 (do_unwind): Rename parameter to inner_throw_label, as it is now 561 different from throw_label. Also, assume that our caller will wrap 562 the passed label with a LABEL_REF, if needed. 563 (expand_builtin_throw): Make external, change so that the generated 564 throw is now a real function. 565 (expand_exception_blocks): Never generate throw code inside another 566 function. 567 568Fri Aug 4 12:20:02 1995 Mike Stump <mrs@cygnus.com> 569 570 * decl.c (grokdeclarator): Move checking of mutable const objects 571 and mutable static objects down, as we might decide during parsing 572 to unset staticp or constp (for example, when const is part of the 573 object being pointed to). 574 575Thu Aug 3 17:13:43 1995 Mike Stump <mrs@cygnus.com> 576 577 * except.c (output_exception_table_entry): Enhance portability to 578 weird machines. 579 (emit_exception_table): Ditto. 580 581Thu Aug 3 16:41:38 1995 Mike Stump <mrs@cygnus.com> 582 583 * typeck.c (build_ptrmemfunc): Handle casting of pointer to 584 non-virtual member functions. 585 586Wed Aug 2 11:58:25 1995 Mike Stump <mrs@cygnus.com> 587 588 * gc.c (build_typeid): Strip cv qualifiers so that const T&, T&, T 589 and const T all match. 590 591Wed Aug 2 11:25:33 1995 Mike Stump <mrs@cygnus.com> 592 593 * except.c (build_eh_type): Strip cv qualifiers so that const T&, 594 T&, T and const T all match. 595 596Tue Aug 1 14:20:16 1995 Mike Stump <mrs@cygnus.com> 597 598 * except.c: Fix up comments, cleanup code and eliminate exceptNode, 599 exceptStack, exceptstack, push_except_stmts, pop_except_stmts, 600 new_except_stack, push_last_insn, pop_last_insn, insn_save_node and 601 InsnSave. Also, numerous speed improvements, and correctness 602 improvements. Double faulting in all situations should now be 603 handled correctly. 604 (expand_start_all_catch): Instead of having many terminate protected 605 regions, just have one. 606 (expand_start_catch_block): No longer have to protect 607 false_label_rtx, as it isn't used for EH region marking. 608 (expand_end_catch_block): Expand out EH cleanups here by using 609 expand_leftover_cleanups. 610 (expand_end_all_catch): Use sequences instead of playing with insn 611 links directly. 612 (expand_exception_blocks): Ditto. Also protect all catch clauses 613 with one terminate region. 614 615Mon Jul 31 13:24:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> 616 617 * method.c (report_type_mismatch): Don't talk about an object 618 parameter for non-methods. 619 620Sun Jul 30 13:13:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 621 622 * class.c (finish_struct): Catch private and protected members of 623 anonymous unions here. 624 * decl2.c (finish_anon_union): And here. 625 * parse.y: Instead of here. 626 627 * errfn.c (ARGSLIST): Support passing four args. 628 * error.c (cv_as_string): New function. 629 (cp_printers): Add it. 630 * call.c (build_method_call): Report 'const' at end of pseudo-decl. 631 632 * method.c (report_type_mismatch): Deal with a bad_arg of 0. 633 634 * init.c (expand_aggr_init): Handle volatile objects, too. 635 636Sat Jul 29 13:42:03 1995 Jason Merrill <jason@phydeaux.cygnus.com> 637 638 * decl.c (struct binding_level): Keep list of incomplete decls. 639 (print_binding_level): Use list_length to count them. 640 (pushdecl): Build up the list. 641 (hack_incomplete_structures): Walk it and prune completed decls. 642 643Fri Jul 28 15:26:44 1995 Jason Merrill <jason@phydeaux.cygnus.com> 644 645 * typeck.c (comp_target_types): Don't check const and volatile for 646 function types. 647 (comp_ptr_ttypes_real): Ditto. 648 649Thu Jul 27 15:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> 650 651 * typeck.c (comp_target_types): Fix. 652 653Thu Jul 27 15:10:48 1995 Mike Stump <mrs@cygnus.com> 654 655 * cp-tree.h (unsave_expr_now, build_unsave_expr, 656 cp_expand_decl_cleanup): Declare new routines. 657 * decl.c (cp_finish_decl, store_parm_decls, 658 hack_incomplete_structures): Change all cals from 659 expand_decl_cleanup to cp_expand_decl_cleanup. 660 * gc.c (protect_value_from_gc): Ditto. 661 * expr.c (cplus_expand_expr): Handle UNSAVE_EXPRs. 662 * tree.c (unsave_expr): New routine to build an UNSAVE_EXPR. 663 (unsave_expr_now): Backend routine used by tree expander. 664 (cp_expand_decl_cleanup): Wrap second argument in an UNSAVE_EXPR to 665 work around a limitation in the backend. The backend uses the 666 cleanups multiple times, on disjoint control flows, so we cannot 667 pass unsaved SAVE_EXPRs to the backend. 668 * tree.def (UNSAVE_EXPR): New tree code. 669 * typeck.c (c_expand_return): Move goto/return code up inside 670 conditional, as we don't always want to do this, we only want to do 671 this when we don't otherwise finish with this control flow. 672 673Thu Jul 27 10:38:43 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 674 675 * parse.y (typespec): Only complain about typeof if we're not 676 getting it from a system header. 677 678Thu Jul 27 10:26:23 1995 Doug Evans <dje@canuck.cygnus.com> 679 680 Clean up prefix attribute handling. 681 * parse.y (reserved_declspecs): Link prefix attributes with declspecs. 682 (declmods): Likewise. 683 (all rules that reference typed_declspecs and declmods): Call 684 split_specs_attrs or strip_attrs to separate declspecs and attrs. 685 (lang_extdef): Delete resetting of prefix_attributes. 686 (template_def, notype_declarator rule): Use NULL_TREE for 687 prefix_attributes. 688 (condition): Use NULL_TREE for prefix_attributes. 689 (setattrs): Deleted. 690 (nomods_initdcl0): Set prefix_attributes to NULL_TREE. 691 (component_decl): Delete resetting of prefix_attributes. 692 (component_decl_1, notype_components rule): Use NULL_TREE for 693 prefix_attributes. 694 (simple_stmt): Delete resetting of prefix_attributes. 695 696Mon Jul 24 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com> 697 698 * call.c (convert_harshness): Deal with reference conversions before 699 others. Actually do array->pointer decay. Call comp_target_types 700 with pointer types rather than their targets. 701 702 * typeck.c (comp_target_types): Avoid assigning D const * to B *. 703 704Mon Jul 24 08:54:46 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 705 706 * pt.c (to_be_restored): Move decl to global scope. 707 708Sat Jul 22 12:22:11 1995 Jason Merrill <jason@phydeaux.cygnus.com> 709 710 * decl.c (start_decl): Put back clearing of DECL_IN_AGGR_P. 711 712Fri Jul 21 17:09:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 713 714 * decl.c (grokdeclarator): Downgrade error about 'extern int A::i' 715 to pedwarn. 716 717 * pt.c (instantiate_template): Also avoid instantiation if the 718 function has already been declared to be a specialization. 719 720 * decl2.c (check_classfn): Ignore cname argument, and return the 721 matching function. 722 723 * decl.c (start_decl): Handle declarations of member functions 724 outside of the class (i.e. specialization declarations). 725 726Thu Jul 20 10:34:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> 727 728 * class.c (finish_struct): Don't mess with the type of bitfields. 729 730 * various.c: s/TYPE_POINTER_TO/build_pointer_type/. 731 732Thu Jul 20 01:43:10 1995 Mike Stump <mrs@cygnus.com> 733 734 * init.c (expand_aggr_init): Assume LOOKUP_ONLYCONVERTING if init 735 is not a parameter list (TREE_LIST). 736 (expand_default_init): If LOOKUP_ONLYCONVERTING is set, then set 737 LOOKUP_NO_CONVERSION so that we don't allow two-level conversions, 738 but don't set it otherwise. 739 740Wed Jul 19 20:32:01 1995 Mike Stump <mrs@cygnus.com> 741 742 * init.c (expand_default_init): Don't allow two-level conversions 743 during construction. 744 745Wed Jul 19 18:06:37 1995 Mike Stump <mrs@cygnus.com> 746 747 * gc.c (build_headof): The type of dyncasting to a pointer to cv 748 void, should be pointer to cv void. 749 750Wed Jul 19 17:25:43 1995 Mike Stump <mrs@cygnus.com> 751 752 * gc.c (build_dynamic_cast): Allow casting in const. 753 754Wed Jul 19 16:34:27 1995 Mike Stump <mrs@cygnus.com> 755 756 * typeck.c (build_const_cast): If we are passed error_mark_node, 757 return it. 758 759Wed Jul 19 15:24:48 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 760 761 * class.c (push_nested_class): Make sure TYPE is non-nil. 762 763 * cvt.c (type_promotes_to): Watch for error_mark_node on the 764 incoming TYPE. 765 766Wed Jul 19 13:23:12 1995 Gerald Baumgartner <gb@alexander.cs.purdue.edu> 767 768 * cp-tree.h (SIGTABLE_VT_OFF_NAME): Renamed from SIGTABLE_OFFSET_NAME. 769 (SIGTABLE_VB_OFF_NAME): New macro. 770 (vt_off_identifier): Renamed from offset_identifier. 771 (vb_off_identifier): Added extern declaration. 772 773 * decl.c (vt_off_identifier): Renamed from offset identifier. 774 (vb_off_identifier): New variable to hold the identifier for the 775 sigtable field vb_off. 776 (init_decl_processing): Initialize vb_off_identifier. 777 Renamed vt_off_identifier from offset_identifier. 778 * sig.c (build_signature_method_call): Renamed offset_identifier and 779 local variable offset to vt_off_identifer and vt_off, respecitively. 780 * sig.c (build_signature_table_constructor): Renamed offset to vt_off. 781 782 * decl.c (init_decl_processing): Add vb_off field to 783 sigtable_entry_type. Reorder fields so that pfn gets properly 784 aligned at a 64 bit boundary on the Alpha. 785 * sig.c (build_signature_table_constructor): Build the constructor 786 according to the new layout. Set the vb_off field to -1 for now. 787 788 * decl.c (init_decl_processing): Align sigtable_entry_type on word 789 boundaries instead of double word boundaries to save space. 790 791Tue Jul 18 16:58:37 1995 Mike Stump <mrs@cygnus.com> 792 793 * cvt.c (cp_convert): Always call build_cplus_new for a ctor. 794 795Tue Jul 18 14:24:53 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 796 797 * parse.y (opt.component_decl_list): Only forbid private/protected 798 in anonymous unions. We need to make this know when the type is 799 defined for an object, to not give the error. 800 801Mon Jul 17 14:22:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 802 803 * parse.y (opt.component_decl_list): Don't allow access control 804 as private or protected for union members. 805 806Sun Jul 16 14:01:00 1995 Jim Wilson <wilson@chestnut.cygnus.com> 807 808 * lex.c (check_newline): For 'p' case, move goto skipline line to 809 before end brace for 'pragma'. 810 811Fri Jul 7 13:55:58 1995 Mike Stump <mrs@cygnus.com> 812 813 * g++.1: Tiny updates. 814 815Fri Jul 7 13:05:20 1995 Mike Stump <mrs@cygnus.com> 816 817 * decl.c (cp_finish_decl): Only destruct local static variables if 818 they are constructed, and only construct the first time control 819 passes completely through its declaration (if not initialized with a 820 constant-expression). 821 (expand_static_init): Ditto. 822 823Wed Jul 5 14:05:04 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 824 825 * typeck.c (comptypes, case OFFSET_REF): If either offset basetype 826 is a TEMPLATE_TYPE_PARM, give a match. 827 828Mon Jul 3 15:17:20 1995 Steve Chamberlain <sac@slash.cygnus.com> 829 830 * g++.c (sys/file.h): Remove change of Jun 28. 831 832Fri Jun 30 15:42:57 1995 Mike Stump <mrs@cygnus.com> 833 834 * method.c (build_overload_value): Handle encoding of null pointer 835 constants (or any pointer with a constant numeric value) for 836 templates. 837 838Fri Jun 30 13:45:51 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 839 840 * call.c (convert_harshness): Add QUAL_CODE when we're faced with 841 const vs non-const for void conversions. 842 843Fri Jun 30 10:19:52 1995 Mike Stump <mrs@cygnus.com> 844 845 * except.c (expand_start_all_catch): Fix problem with finding an 846 outer nested try block when there is no code to separate it from an 847 inner try block. 848 849Fri Jun 30 02:22:26 1995 Mike Stump <mrs@cygnus.com> 850 851 * search.c (dfs_pushdecls): Consume 2 or 3 orders of magnitude less 852 memory please when virtual bases are used. 853 854Thu Jun 29 19:03:47 1995 Mike Stump <mrs@cygnus.com> 855 856 * class.c (build_vbase_path): Avoid testing things that cannot be 857 null to see if they are null. 858 * cvt.c (convert_pointer_to_vbase): Remove code that doesn't work. 859 * decl.c (finish_function): Pass a type into the new 860 convert_pointer_to_vbase instead of a binfo. 861 * search.c (convert_pointer_to_vbase): Rewritten to use get_vbase 862 and convert_pointer_to_real. 863 (expand_indirect_vtbls_init): Use convert_pointer_to_vbase instead 864 of the more cryptic call to get_vbase. 865 866Thu Jun 29 09:35:05 1995 Mike Stump <mrs@cygnus.com> 867 868 * decl.c (BOOL_TYPE_SIZE): Fix broken SLOW_BYTE_ACCESS check. 869 870Thu Jun 29 03:43:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 871 872 * pt.c (instantiate_template): Don't strip 'this' twice. 873 874 * pt.c (coerce_template_parms): Allow null pointer constants. 875 876 * decl.c (revert_static_member_fn): But only if DECL_ARGUMENTS is 877 set. 878 879Wed Jun 28 23:34:58 1995 Steve Chamberlain <sac@slash.cygnus.com> 880 881 * g++.c (pfatal_with_name): Use my_strerror to get error 882 string. 883 (sys/file.h): Include if HAVE_FILE_H defined. 884 885Wed Jun 28 18:39:03 1995 Jason Merrill <jason@phydeaux.cygnus.com> 886 887 * decl.c (revert_static_member_fn): Also remove 'this' from 888 DECL_ARGUMENTS. 889 * decl2.c (check_classfn): Don't revert this function until we get a 890 match. 891 892Wed Jun 28 14:07:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 893 894 * parse.y (component_decl): Clear PREFIX_ATTRIBUTES here. 895 896Wed Jun 28 11:05:13 1995 Mike Stump <mrs@cygnus.com> 897 898 * decl2.c (finish_file): Handle global vector news. 899 * init.c (build_new): Encode vector news so that later we will know 900 how many elements there are. 901 902Mon Jun 26 13:38:06 1995 Jason Merrill <jason@phydeaux.cygnus.com> 903 904 * expr.c (cplus_expand_expr): Don't mess with temp slots. 905 906 * decl2.c (warn_if_unknown_interface): Don't crash if tinst_for_decl 907 returns null. 908 909 * decl2.c (check_classfn): Use revert_static_member_fn. 910 * decl.c (revert_static_member_fn): Diagnose static member functions 911 declared const or volatile. 912 913 * decl2.c (grokfield): Check for missing default args here, too. 914 (check_default_args): Function to do the checking. 915 * decl.c (pushdecl): Use it. 916 917 * decl.c (pushdecl): Don't warn about shadowing a member of `this' 918 if there is no `this'. 919 920Sun Jun 25 11:34:25 1995 Jason Merrill <jason@phydeaux.cygnus.com> 921 922 * call.c (build_method_call): Downgrade 'called before definition' 923 to a warning, as it ought to go away after Monterey. 924 925Sat Jun 24 14:18:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> 926 927 * pt.c (coerce_template_parms): Don't do extra checking on pointer 928 to member arguments. 929 930 * class.c (finish_struct): const and reference members don't prevent 931 a class from being an aggregate. 932 933 * class.c (finish_struct): Signatures are always aggregates. 934 935Fri Jun 23 17:20:29 1995 Jason Merrill <jason@phydeaux.cygnus.com> 936 937 * decl2.c (check_classfn): Improve error message. 938 939 * pt.c (tsubst): Handle PROMOTE_PROTOTYPES. 940 941Thu Jun 22 01:50:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> 942 943 * typeck.c (comptypes): Don't ignore method quals. 944 945 * class.c (finish_struct): Non-abstract virtuals are always USED. 946 947 * decl.c (build_ptrmemfunc_type): The underlying union type isn't 948 IS_AGGR_TYPE, either. 949 * class.c (finish_struct): Use CLASSTYPE_NON_AGGREGATE instead. 950 * cp-tree.h: Ditto. 951 952 * cp-tree.h (lang_type): Add aggregate. 953 (CLASSTYPE_AGGREGATE): New macro. 954 (TYPE_NON_AGGREGATE_CLASS): Ditto. 955 * class.c (finish_struct): Determine whether a class is an 956 aggregate. 957 * decl.c (cp_finish_decl): Check TYPE_NON_AGGREGATE_CLASS instead of 958 TYPE_NEEDS_CONSTRUCTING. 959 * typeck2.c (digest_init): Check TYPE_NON_AGGREGATE_CLASS for 960 subobjects, too. 961 962 * pt.c (tsubst, PARM_TYPE): Propagate DECL_ARTIFICIAL. 963 964 * decl.c (start_function): For pre-parsed functions, layout all of 965 the parm decls again. 966 (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not 967 DECL_EXTERNAL. 968 969 * pt.c (coerce_template_parms): Improve checking for invalid 970 template parms. 971 972Wed Jun 21 12:01:16 1995 Brendan Kehoe <brendan@lisa.cygnus.com> 973 974 * decl.c (grokdeclarator): Forbid declaration of a static member 975 with the same name as its enclosing class. 976 977Mon Jun 19 10:28:14 1995 Jason Merrill <jason@phydeaux.cygnus.com> 978 979 * decl.c (finish_function): Clear current_class_decl. 980 981 * typeck.c (build_conditional_expr): Use convert (boolean_type_node 982 instead of truthvalue_conversion. 983 984 * class.c (finish_struct): A data member with the same name as the 985 class doesn't suppress constructors. 986 987Fri Jun 16 18:11:39 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu) 988 989 * decl.c (start_function): If current_class_decl is a signature 990 pointer, don't dereference it but set C_C_D to current_class_decl. 991 992Fri Jun 16 17:06:28 1995 Jason Merrill <jason@phydeaux.cygnus.com> 993 994 * decl.c (duplicate_decls): Complain about virtual functions 995 redeclared to be inline. 996 997Fri Jun 16 13:20:38 1995 Mike Stump <mrs@cygnus.com> 998 999 * decl.c (get_unique_name): New routine to name unnamed namespaces. 1000 (push_namespace): Use get_unique_name for naming unnamed namespaces. 1001 1002Fri Jun 16 15:07:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) 1003 1004 * Make-lang.in (DEMANGLER_PROG): Add LIBS. 1005 1006Thu Jun 15 15:00:41 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1007 1008 * decl.c (define_function): Don't set DECL_INTERFACE_KNOWN. 1009 1010 * parse.y: Call cplus_decl_attributes with prefix_attributes where 1011 appropriate. 1012 1013Wed Jun 14 19:24:49 1995 Mike Stump <mrs@cygnus.com> 1014 1015 * search.c (get_vbase): New routine to switch hierarchies from the 1016 CLASSTYPE_VBASECLASSES to the normal one. 1017 (expand_indirect_vtbls_init): Use get_vbase to figure out how we 1018 want to convert to a vbase pointer. 1019 1020Mon Jun 12 17:50:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1021 1022 * pt.c (instantiate_class_template): Add the new instantiation to 1023 template_classes. 1024 (do_pending_expansions): Call instantiate_member_templates on all of 1025 the classes in template_classes. 1026 1027Mon Jun 12 12:36:59 1995 Mike Stump <mrs@cygnus.com> 1028 1029 * decl.c (complete_array_type): Fill in the TYPE_DOMAIN of our 1030 TYPE_MAIN_VARIANT if it is not filled in. 1031 * init.c (build_delete): If the TYPE_DOMAIN is not set, give an 1032 error instead of core dumping. 1033 1034Mon Jun 12 10:41:40 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1035 1036 * call.c (can_convert): Also check for distance > 0. 1037 (can_convert_arg): Ditto. 1038 (user_harshness): Ditto. 1039 1040Fri Jun 9 19:17:21 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1041 1042 * g++.c (MATH_LIBRARY): Provide default. 1043 (main): Always link with the math library if we link with libstdc++. 1044 1045 * decl.c (start_function): Complain about redefinition of a function 1046 even when the pending_inline version is compiled after the other 1047 version. 1048 1049Thu Jun 8 15:44:38 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1050 1051 * gc.c (build_dynamic_cast): Build up a reference to a parameter of 1052 aggregate type. 1053 1054Wed Jun 7 20:00:31 1995 Mike Stump <mrs@cygnus.com> 1055 1056 * *.[chy]: Change all callers of finish_decl to cp_finish_decl. 1057 * decl.c (finish_decl): New routine to handle call backs from the 1058 mid end (declare_hidden_char_array). 1059 1060Wed Jun 7 19:02:50 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1061 1062 * decl.c (start_function): Handle setting C_C_D here. 1063 (set_C_C_D): Removed. 1064 (struct saved_scope): Remove class_decl. 1065 (push_to_top_level): Don't save current_class_decl. 1066 (pop_from_top_level): Don't restore current_class_decl or C_C_D. 1067 (struct cp_function): Add C_C_D. 1068 (push_cp_function_context): Save C_C_D. 1069 (pop_cp_function_context): Restore C_C_D. 1070 1071Wed Jun 7 15:31:57 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1072 1073 * init.c (build_vec_delete): Resolve an offset ref before we try to 1074 use it. 1075 1076Wed Jun 7 14:19:32 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1077 1078 * typeck.c (build_modify_expr): If the class lacks a constructor or 1079 assignment operator, return error_mark_node. 1080 (common_type): Use build_cplus_array_type. 1081 1082Tue Jun 6 09:41:27 1995 Mike Stump <mrs@cygnus.com> 1083 1084 * class.c (dont_allow_type_definitions): New variable set when types 1085 cannot be defined. 1086 (finish_struct): Use it. 1087 * cp-tree.h (dont_allow_type_definitions): Define it. 1088 * parse.y (primary, handler_seq): Set it. 1089 1090Mon Jun 5 18:49:38 1995 Mike Stump <mrs@cygnus.com> 1091 1092 * method.c (build_opfncall): Use DECL_CHAIN, not TREE_CHAIN for 1093 results from lookup_fnfields. Always give warning/error on bad 1094 code. 1095 1096Mon Jun 5 11:39:37 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1097 1098 * init.c (member_init_ok_or_else): Don't allow initialization of 1099 an ancestor's member from within a constructor. 1100 1101Mon Jun 5 11:20:34 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu) 1102 1103 * sig.c (build_signature_table_constructor): Use DECL_CONTEXT 1104 instead of DECL_CLASS_CONTEXT for calculating the vfield offset so 1105 abstract virtual functions are handled correctly. 1106 1107 * sig.c (build_signature_table_constructor): Store the correct 1108 delta in signature table entries. It does not yet work for 1109 classes with virtual base classes as implementations of signatures. 1110 (build_signature_method_call): Add the delta to the object_ptr 1111 before generating the function call. 1112 1113 * call.c (build_method_call): Make instance_ptr the signature 1114 pointer itself instead of dereferencing the optr. 1115 * sig.c (build_signature_method_call): Dereference the optr for the 1116 direct and virtual calls. 1117 1118 * sig.c (build_signature_table_constructor): Make the tag for 1119 default implementations -1 instead of 2. 1120 (build_signature_method_call): Change the generated conditional 1121 expression correspondingly. 1122 1123 * sig.c (build_signature_pointer_constructor): Deleted the sorry 1124 message that said we can't handle multiple inheritance for 1125 implementations of signatures 1126 (build_signature_method_call): Use the offset from the sigtable 1127 entry instead of the vptr field from the signature pointer for 1128 building a virtual function call. 1129 1130 * class.c (build_vfn_ref): Deleted signature specific code, we don't 1131 call this function anymore from build_signature_method_call. 1132 1133 * cp-tree.h (SIGNATURE_VPTR_NAME): Deleted. We use the right vptr 1134 field in the object now instead of in the signature pointer/ref. 1135 (build_vptr_ref): Deleted extern declaration. 1136 * sig.c (build_vptr_ref): Deleted. 1137 (build_signature_pointer_or_reference_type): Deleted construction of 1138 the vptr field. 1139 (build_signature_pointer_constructor): Deleted initialization of/ 1140 assignment to the vptr field. 1141 1142 * sig.c (build_signature_table_constructor): Convert the signature 1143 table entry fields to their correct types. 1144 1145 * sig.c (build_signature_table_constructor): Don't call digest_init 1146 for the fields of a sigtable entry, it's wasted time. 1147 1148 * sig.c (build_signature_table_constructor): Correctly set the 1149 offset and index fields of a sigtable entry. Build the constructor 1150 the way digest_init does, digest_init can't handle initializing an 1151 anonymous union inside a struct. 1152 (build_signature_method_call): Use the index field instead of the 1153 delta field to get the vtable index. 1154 1155 * decl.c (init_decl_processing): Fix number of fields for building 1156 sigtable_entry_type. 1157 1158 * cp-tree.h (tag_identifier, offset_identifier): Added extern decls. 1159 (SIGTABLE_CODE_NAME): Renamed to SIGTABLE_TAG_NAME. 1160 (SIGTABLE_PFN_NAME): Deleted, we'll use VTABLE_PFN_NAME instead. 1161 * decl.c (tag_identifier, offset_identifier): New variables to 1162 hold the identifiers for the sigtable fields tag and offset. 1163 (init_decl_processing): Initialize these variables. 1164 (init_decl_processing): Use these variables to build the 1165 sigtable_entry_type structure. Rename the code and offset fields 1166 to tag and delta, respectively; add offset and index fields. Changed 1167 types of fields from short_integer_type_node to delta_type_node. 1168 * sig.c (build_signature_table_constructor): Rename code and offset 1169 to tag and delta, respectively. 1170 (build_signature_method_call): Ditto. Use above variables. 1171 1172Fri Jun 2 11:05:58 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1173 1174 * decl.c (set_C_C_D): New function. suspend_momentary before 1175 building C_C_D. 1176 (pop_from_top_level): Call it. 1177 (start_function): Ditto. 1178 (pop_cp_function_context): Ditto. 1179 1180 * class.c, cp-tree.h, decl.c, decl2.c, parse.y: Lose all references 1181 to current_vtable_decl, CLASSTYPE_INST_VAR and CLASSTYPE_VTBL_PTR. 1182 1183 * decl.c (push_cp_function_context): Save current_class_decl. 1184 (pop_cp_function_context): Restore current_class_decl and set C_C_D. 1185 (pop_from_top_level): Don't use CLASSTYPE_INST_VAR to set C_C_D. 1186 (start_function): Ditto. 1187 1188 * class.c (popclass): Don't mess with current_class_decl, 1189 current_vtable_decl, or C_C_D. 1190 1191Mon May 29 12:45:10 1995 Paul Eggert <eggert@twinsun.com> 1192 1193 * Make-lang.in (c++.mostlyclean): Remove $(DEMANGLER_PROG). 1194 1195Thu Jun 1 17:03:51 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1196 1197 * decl.c (lookup_name_real): Don't try to look anything up in an 1198 erroneous object. 1199 1200Fri Jun 2 10:30:14 1995 Mike Stump <mrs@cygnus.com> 1201 1202 * method.c (build_overload_int): New routine. Break out 1203 functionality from build_overload_value so we can reuse it. 1204 (build_overload_value): Handle pointer to member functions as value 1205 parameters for templates. 1206 (build_overload_identifier): Since template parameters are shared 1207 among all instantiations, we have to substitute in the real types 1208 in TREE_TYPE (parm). 1209 pt.c (coerce_template_parms): Ditto. 1210 (push_template_decls): Ditto. 1211 (grok_template_type): Deleted as template parameters are shared 1212 among all instantiations. 1213 1214Wed May 31 19:10:32 1995 Mike Stump <mrs@cygnus.com> 1215 1216 * decl.c (grokdeclarator): Always give errors on constant overflow 1217 for array indices. 1218 1219Wed May 31 11:39:43 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1220 1221 * typeck.c (commonparms): Don't abort if simple_cst_equal returns < 0. 1222 (build_c_cast): Don't tack on a NON_LVALUE_EXPR when casting to 1223 reference type. 1224 (build_indirect_ref): Fix check for *&. 1225 1226Wed May 24 15:55:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) 1227 1228 * decl.c (duplicate_decls): Check simple_cst_equal result against 0. 1229 * decl2.c (finish_anon_union): Likewise. 1230 * method.c (largest_union_member): Likewise. 1231 1232Wed May 24 14:41:11 1995 H.J. Lu (hjl@nynexst.com) 1233 1234 * Make-lang.in (cxxmain.o): Replace single quotes with backslashes. 1235 1236Mon May 22 17:38:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) 1237 1238 * Make-lang.in (g++, g++-cross, cc1plus, DEMANGLER_PROG): 1239 Use $@ instead of output name so works even if have .exe. 1240 (cxxmain.o): Use cp if ln -s fails. 1241 (c++.install-man): Use $(exeext) in executable names. 1242 (c++.mostlyclean, stage[1-4]): Use $(objext) in object file names. 1243 * Makefile.in (../cc1plus): Use $(exeext) in name of executable. 1244 1245Wed May 24 01:39:03 1995 Jason Merrill <jason@deneb.cygnus.com> 1246 1247 * call.c (build_method_call): parms can be null, duh. 1248 1249Tue May 23 01:32:09 1995 Jason Merrill <jason@deneb.cygnus.com> 1250 1251 * call.c (build_method_call): If convert_arguments failed, just bail. 1252 1253Fri May 19 10:31:11 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1254 1255 * cvt.c (convert_force): Pass LOOKUP_NORMAL to cp_convert. 1256 1257 * tree.c (copy_to_permanent): Oops. 1258 1259Fri May 19 10:01:07 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1260 1261 * cp-tree.h (break_out_target_exprs): Add decl. 1262 1263Thu May 18 13:02:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1264 1265 * decl.c (start_function): Move *all* interface handling stuff after 1266 the pushdecl. 1267 1268 * tree.c (mapcar): Renamed from make_deep_copy and generalized. 1269 (perm_manip): Return t if permanent, otherwise 0. 1270 (copy_to_permanent): Use them. 1271 (bot_manip): Helper for break_out_target_exprs. 1272 (break_out_target_exprs): New function. Uses mapcar. 1273 1274 * typeck.c (convert_arguments): Use it. 1275 1276 * method.c (hack_identifier): Use convert_from_reference to 1277 dereference a reference. 1278 1279Wed May 17 17:54:54 1995 Mike Stump <mrs@cygnus.com> 1280 1281 * call.c (convert_harshness): Move reference bashing before pointer 1282 to member bashing. 1283 1284Wed May 17 16:57:53 1995 Mike Stump <mrs@cygnus.com> 1285 1286 * cvt.c (convert_to_reference): Only complain, if complaints are 1287 wanted. 1288 * typeck.c (build_function_call_real): Ditto. If LOOKUP_SPECULATIVELY 1289 is set and something won't work, return NULL_TREE. 1290 * cvt.c (cp_convert): Ditto. Pass flags down to build_method_call. 1291 (convert): Pass LOOKUP_NORMAL to cp_convert. 1292 * typeck.c (convert_for_assignment): Ditto. 1293 (convert_force): Pass LOOKUP_COMPLAIN to cp_convert. 1294 (convert_arguments): Get out early if we get an error_mark_node. 1295 (convert_for_initialization): Use cp_convert instead of convert so 1296 that we can pass flags down. 1297 * cp-tree.h (LOOKUP_SPECULATIVELY): Added documentation. 1298 1299Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1300 1301 * typeck2.c (store_init_value): Don't take the MAIN_VARIANT of the 1302 decl type. 1303 1304 * class.c (finish_struct): Don't complain about a class with no 1305 user-defined constructors but with a member that has no default 1306 constructor, as this is OK for aggregates. 1307 1308 * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit 1309 constructor call, mark slot addressable. 1310 1311Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu) 1312 1313 * g++.c: Changed WINNT to _WIN32. 1314 1315Tue May 16 12:40:16 1995 Jason Merrill <jason@lisa.cygnus.com> 1316 1317 * lex.c (handle_sysv_pragma): Don't use token_buffer. 1318 1319Tue May 16 12:05:26 1995 Mike Stump <mrs@cygnus.com> 1320 1321 * call.c (resolve_scope_to_name): Add initial semantic support for 1322 namespaces. 1323 * class.c (finish_struct): Ditto. 1324 * cp-tree.h (NAMESPACE_LEVEL): Ditto. 1325 * cvt.c (build_up_reference, convert_to_reference): Ditto. 1326 * decl.c (binding_level::namespace_p, suspend_binding_level): Ditto. 1327 (resume_binding_level, toplevel_bindings_p): Ditto 1328 (namespace_bindings_p, declare_namespace_level): Ditto. 1329 (resume_level, push_namespace, pop_namespace): Ditto. 1330 (pop_everything, pushtag, duplicate_decls, pushdecl): Ditto. 1331 (implicitly_declare, lookup_namespace_name, lookup_name_real): Ditto. 1332 (start_decl, make_temporary_for_reference), Ditto. 1333 (obscure_complex_init, finish_decl, expand_static_init): Ditto. 1334 (grokvardecl, grokdeclarator, parmlist_is_exprlist): Ditto. 1335 (store_parm_decls, hack_incomplete_structures): Ditto. 1336 * decl2.c (get_temp_name, finish_anon_union, current_namespace): Ditto. 1337 (push_namespace, pop_namespace, do_namespace_alias): Ditto. 1338 (do_toplevel_using_decl, do_class_using_decl): Ditto. 1339 * error.c (dump_decl): Ditto. 1340 * init.c (build_member_call, build_offset_ref): Ditto. 1341 * lex.c (identifier_type): Ditto. 1342 * parse.y (lang_extdef, using_decl, extdef, component_decl_1): Ditto. 1343 (nested_name_specifier_1): Ditto. 1344 * spew.c (yylex): Ditto. 1345 * tree.def (NAMESPACE_DECL): Ditto. 1346 1347Tue May 16 11:55:35 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1348 1349 * decl.c (push_overloaded_decl): Return the new decl even if it 1350 can't be pushed. 1351 1352Tue May 16 11:00:37 1995 Jason Merrill <jason@lisa.cygnus.com> 1353 1354 * typeck.c (decay_conversion): Split out from default_conversion. 1355 (default_conversion): Call it. 1356 (build_binary_op): Ditto. 1357 (build_binary_op_nodefault): Use decay_conversion for truth ops. 1358 1359Mon May 15 12:47:56 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1360 1361 * decl.c (warn_extern_redeclared_static): This is a pedwarn. 1362 (duplicate_decls): Always use the old decl's linkage info. Don't 1363 play with linkage of consts. 1364 (pushdecl): Don't play with linkage of consts. 1365 (redeclaration_error_message): Don't complain about an old public 1366 decl and a new non-public decl here. 1367 (grokvardecl): Handle linkage of consts here. 1368 (grokdeclarator): An 'extern inline' is public. Pass constp to 1369 grokvardecl. 1370 (start_function): Wait until after the pushdecl to do some linkage 1371 stuff. 1372 1373 * decl2.c (import_export_vtable): Make duplicates weak rather than 1374 static if supported. 1375 (import_export_inline): Ditto. 1376 * pt.c (do_pending_expansions): Ditto. 1377 1378 * class.c (build_vbase_path): flag_assume_nonnull_objects only 1379 affects reference conversion. 1380 1381 * init.c (emit_base_init): Build up an RTL_EXPR and add it to 1382 rtl_expr_chain. 1383 * decl.c, decl2.c: s/base_init_insns/base_init_expr/. 1384 1385Tue May 16 07:06:28 1995 Paul Eggert <eggert@twinsun.com> 1386 1387 * method.c (numeric_output_need_bar): Renamed from misspelling. 1388 1389 * typeck.c (build_ptrmemfunc): Fix misspellings in messages. 1390 1391Sun May 14 10:26:22 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 1392 1393 * lang-options.h, lang-specs.h: New files. 1394 1395Thu May 11 00:31:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1396 1397 * typeck.c (default_conversion): Don't check for BLKmode before 1398 pulling out the decl_constant_value. 1399 1400 * decl.c (start_function): Clear named_labels and shadowed_labels. 1401 1402 * typeck.c (build_function_call_real): Also synthesize methods here. 1403 1404Wed May 10 00:55:59 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1405 1406 * decl2.c (finish_file): Synthesize exported methods before the 1407 reconsider loop. 1408 1409 * parse.y: Move declaration of flag_new_for_scope to file scope. 1410 1411Tue May 9 19:10:33 1995 Mike Stump <mrs@cygnus.com> 1412 1413 * decl2.c: Add flag_new_for_scope for new -ffor-scope flag. 1414 * parse.y (FOR): Conditionalize the pushing and poping of scope for 1415 the for-init-statement upon the new flag_new_for_scope. 1416 * parse.y (try_block): Simplify and use compstmt. 1417 1418Mon May 8 12:41:52 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1419 1420 * decl.c (define_function): Mark function decl artificial. 1421 1422Sun May 7 00:51:28 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1423 1424 * parse.y (simple_stmt, FOR): Put back push/pop for condition scope. 1425 1426 * decl2.c (grokclassfn): DECLs don't have cv-qualified types. 1427 * tree.c (build_cplus_method_type): Ditto. 1428 1429 * cp-tree.h (SET_DECL_ARTIFICIAL): Just set DECL_ARTIFICIAL to 1. 1430 1431 * typeck.c (build_function_call_real): If convert_arguments failed, 1432 just bail. 1433 (convert_arguments): If one of the arguments is error_mark_node, 1434 just bail. 1435 1436Sat May 6 02:39:41 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1437 1438 * decl.c (duplicate_decls): Don't check DECL_NOT_REALLY_EXTERN for 1439 decls that don't include it. 1440 1441Fri May 5 14:23:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1442 1443 * decl.c (duplicate_decls): Decls that have DECL_INTERFACE_KNOWN or 1444 DECL_NOT_REALLY_EXTERN set aren't extern decls. 1445 1446 * typeck.c (build_indirect_ref): Don't call default_conversion for a 1447 parameter of reference_type. 1448 * cvt.c (convert_from_reference): Just use build_indirect_ref. 1449 1450 * pt.c (do_type_instantiation): Only instantiate member functions 1451 that actually come from templates. 1452 1453Fri May 5 09:46:05 1995 Mike Stump <mrs@cygnus.com> 1454 1455 * parse.y: Generalized cleanup of poplevels, and compound statements 1456 and compound statements in try blocks. Rewritten `for' rule so that 1457 the scope of variables declared in the for clause is shortened to 1458 span just to the end of the statement, instead of the whole 1459 containing block. 1460 1461Fri May 5 00:37:14 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1462 1463 * call.c (convert_harshness): Handle pointers to members better. 1464 1465Thu May 4 16:00:26 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1466 1467 * decl2.c (delete_sanity): Do access control here. 1468 * init.c (build_delete): Instead of here. 1469 1470 * Make-lang.in: Build c++filt. 1471 1472Wed May 3 02:59:53 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1473 1474 * decl2.c (cplus_decl_attributes): If we just modified a TYPE_DECL, 1475 update our IDENTIFIER_TYPE_VALUE. 1476 1477Fri Apr 28 07:58:41 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1478 1479 * lex.c (cons_up_default_function): Fix linkage of #pragma 1480 implemented functions. 1481 1482Thu Apr 27 16:56:24 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1483 1484 * method.c (build_overload_name): Simplify and fix repeated type 1485 folding. 1486 1487 * decl.c (grokdeclarator): Prohibit pointers to void or reference 1488 members. 1489 1490Thu Apr 27 09:49:07 1995 Mike Stump <mrs@cygnus.com> 1491 1492 * typeck2.c (process_init_constructor): Make sure initializers are 1493 fully digested. 1494 1495Thu Apr 27 01:11:55 1995 Jason Merrill <jason@python.cygnus.com> 1496 1497 * lex.c (cons_up_default_function): Always defer synthesis. 1498 1499Thu Apr 27 00:20:37 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1500 1501 * decl2.c (mark_inline_for_output): Don't play with pending_inline 1502 stuff. 1503 1504Wed Apr 26 17:48:24 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1505 1506 * call.c (user_harshness): New function; like build_type_conversion, 1507 but doesn't actually build anything. 1508 (compute_conversion_costs): Use it instead of build_type_conversion. 1509 1510Wed Apr 26 17:11:25 1995 Jason Merrill <jason@deneb.cygnus.com> 1511 1512 * typeck.c (build_function_call_real): Improve error message for 1513 calling a non-function. 1514 1515 * method.c (hack_identifier): Lose check for calling a data member. 1516 1517Wed Apr 26 16:59:13 1995 Mike Stump <mrs@cygnus.com> 1518 1519 * typeck2.c (build_functional_cast): Remove very old cruft. 1520 Seems like good code is generated without it. 1521 1522Wed Apr 26 00:47:16 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1523 1524 * method.c (do_build_assign_ref): Fix handling of anonymous unions. 1525 (do_build_copy_constructor): Ditto. 1526 1527 * parse.y (simple_stmt, SWITCH): Call {push,pop}_switch. 1528 1529 * decl.c (push_switch): New function. 1530 (pop_switch): Ditto. 1531 (define_case_label): Check for jumping over initialization. 1532 1533 * call.c (build_method_call): Check for an inline function being 1534 called before its definition has been seen. 1535 * typeck.c (build_function_call_real): Ditto. 1536 1537 * decl.c (duplicate_decls): Check for a function being redeclared 1538 inline after its address has been taken. 1539 1540 * typeck.c (build_conditional_expr): Handle related class lvalues. 1541 1542Tue Apr 25 13:20:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1543 1544 * pt.c (do_pending_expansions): Don't expand unused templates. 1545 1546 * parse.y (component_decl): Accept a lone semicolon. 1547 1548Tue Apr 25 00:25:56 1995 Jason Merrill <jason@rtl.cygnus.com> 1549 1550 * call.c (build_method_call): Don't allow an RTL_EXPR to serve as the 1551 object parameter anymore. 1552 1553 * expr.c (cplus_expand_expr): Don't create RTL_EXPRs with no insns. 1554 1555Mon Apr 24 12:35:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1556 1557 * parse.y (simple_stmt, decl case): Clear prefix_attributes. 1558 (lang_extdef): Ditto. 1559 1560 * parse.y (maybe_parmlist): New rule for use in declarators where 1561 this could either be a list of expressions or parameters. Calls 1562 suspend_momentary before deciding which. 1563 (direct_after_type_declarator): Use it. 1564 (complex_direct_notype_declarator): Use it. 1565 1566 * pt.c (tsubst): Propagate attributes const and noreturn. 1567 1568 * typeck.c (build_modify_expr): If warn_synth, call build_opfncall 1569 before doing the default thing. 1570 1571Thu Apr 27 21:49:36 1995 Doug Evans <dje@cygnus.com> 1572 1573 * typeck.c (common_type): Call lookup_attribute instead of 1574 value_member. 1575 1576Tue Apr 25 18:07:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) 1577 1578 * Make-lang.in: Change "realclean" to "maintainer-clean". 1579 1580Sun Apr 23 12:32:38 1995 Mike Stump <mrs@cygnus.com> 1581 1582 * decl2.c (finish_file): Fix broken linked list handling. 1583 1584Fri Apr 21 18:08:43 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1585 1586 * class.c (finish_base_struct): Don't set TYPE_HAS_COMPLEX_*_REF 1587 as often. 1588 (finish_struct): Ditto. 1589 1590 * various: Use TYPE_HAS_TRIVIAL_* instead of TYPE_HAS_COMPLEX_*. 1591 1592 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): New macro. 1593 (TYPE_HAS_TRIVIAL_ASSIGN_REF): New macro. 1594 1595Fri Apr 21 15:52:22 1995 Jason Merrill <jason@python.cygnus.com> 1596 1597 * typeck.c (c_expand_return): Only expand a returned TARGET_EXPR if 1598 it is of the same type as the return value. 1599 1600Fri Apr 21 03:01:46 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1601 1602 * decl2.c (finish_file): Reconsider if synthesizing a method wrote 1603 out its assembly. 1604 1605 * typeck.c (convert_for_initialization): Don't call a trivial copy 1606 constructor. 1607 1608 * typeck2.c (store_init_value): Only abort if the type has a 1609 non-trivial copy constructor. 1610 1611 * typeck.c (c_expand_return): If we're returning in a register and 1612 the return value is a TARGET_EXPR, expand it. Only do 1613 expand_aggr_init if we're returning in memory. 1614 (expand_target_expr): Function to expand a TARGET_EXPR. 1615 (build_modify_expr): Use it. 1616 1617 * tree.c (build_cplus_new): Layout the slot. 1618 1619 * expr.c (cplus_expand_expr): Use expand_call to expand the call 1620 under a NEW_EXPR, so the target is not discarded. 1621 1622Thu Apr 20 14:59:31 1995 Mike Stump <mrs@cygnus.com> 1623 1624 * gc.c (build_dynamic_cast): Tighten error checking. 1625 1626Thu Apr 20 11:23:54 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1627 1628 * expr.c (cplus_expand_expr): Only abort if the returned target is 1629 different from what we expected if the type has a non-trivial copy 1630 constructor. 1631 1632 * decl2.c (cplus_decl_attributes): Attributes applied to a template 1633 really apply to the template's result. 1634 1635 * tree.c (lvalue_p): Check IS_AGGR_TYPE instead of TREE_ADDRESSABLE 1636 to decide whether to consider a CALL_EXPR an lvalue. 1637 1638 * class.c (finish_struct_bits): Only set TREE_ADDRESSABLE if the 1639 type has a non-trivial copy constructor. 1640 1641 * decl.c (start_function): If interface_known, unset 1642 DECL_NOT_REALLY_EXTERN on the function. 1643 1644Wed Apr 19 16:53:13 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1645 1646 * pt.c (do_function_instantiation): Handle explicit instantiation of 1647 member functions. 1648 (do_type_instantiation): Handle 'inline template class foo<int>', 1649 meaning just spit out the vtable. 1650 1651 * lex.c (cons_up_default_function): Set DECL_NOT_REALLY_EXTERN on 1652 the consed functions. 1653 1654 * decl2.c (import_export_inline): Set DECL_INTERFACE_KNOWN. 1655 1656Wed Apr 19 16:28:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1657 1658 * call.c, class.c, decl2.c, gc.c, init.c, parse.y, pt.c, search.c, 1659 typeck.c: Include output.h. 1660 1661Wed Apr 19 14:57:21 1995 Gerald Baumgartner (gb@alexander.cs.purdue.edu) 1662 1663 * call.c (build_method_call): Allow a signature member functions to 1664 be called from a default implementation. 1665 1666Wed Apr 19 10:21:17 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1667 1668 * repo.c (finish_repo): Remember what directory we are in. 1669 1670 * search.c (expand_upcast_fixups): Don't mess with abort_fndecl. 1671 1672 * repo.c: Use obstacks instead of fixed-size buffers. Don't spit 1673 out the second copy of the symbol name. Don't remember COLLECT_GCC. 1674 1675Wed Apr 19 02:32:40 1995 Mike Stump <mrs@cygnus.com> 1676 1677 * search.c (virtual_context): New function to get the virtual 1678 context of a function. 1679 (expand_upcast_fixups): New function to generate runtime vtables. 1680 (fixup_virtual_upcast_offsets): Ditto. 1681 (expand_indirect_vtbls_init): Use fixup_virtual_upcast_offsets to 1682 ensure that the this offsets for upcasts from virtual bases into 1683 other virtual bases or non-virtual bases are correct at construction 1684 time and destruction time. 1685 * class.c (fixup_vtable_deltas): Modify to fixup all offsets in all 1686 vtables in all virtual bases, instead of just one vtable in each 1687 virtual base. 1688 (fixup_vtable_deltas1): Ditto. 1689 1690Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com) 1691 1692 * Makefile.in (lex.o): Add dependency on c-pragma.h. 1693 1694 * lex.c (handle_sysv_pragma): Use NULL_PTR and NULL_TREE as 1695 appropriate, instead of 0. 1696 1697Mon Apr 17 12:28:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1698 1699 * decl.c (pushdecl): Use decls_match, not duplicate_decls, for 1700 comparing local and global decls. 1701 1702Fri Apr 14 01:46:52 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1703 1704 * typeck.c (convert_arguments): Only prohibit passing to ... of 1705 types with non-trivial copy constructors. 1706 1707 * repo.c (repo_template_used): Don't try to mess with no id. 1708 1709Fri Apr 14 23:32:50 1995 Per Bothner <bothner@rtl.cygnus.com> 1710 1711 * decl.c (duplicate_decls): Use cp_warning_at for redundant-decls. 1712 1713Thu Apr 13 15:37:42 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1714 1715 * cp-tree.h (current_tinst_level): Delete declaration, since it's 1716 static inside pt.c. 1717 1718 * typeck.c (build_modify_expr): Catch incompatible array assignment. 1719 1720 * parse.y (attribute_list, attrib): Rewrite actions to feed the 1721 right stuff to decl_attributes. 1722 1723Thu Apr 13 11:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1724 1725 * search.c (dfs_debug_mark): Check for magic virtual like 1726 import_export_vtable. 1727 1728 * typeck.c (build_binary_op_nodefault): Don't call cp_pedwarn with 1729 four args. 1730 1731Wed Apr 12 12:02:57 1995 Jason Merrill <jason@deneb.cygnus.com> 1732 1733 * decl2.c (finish_file): Move prevtable pass before needs_messing_up 1734 decision. 1735 1736Tue Apr 11 11:20:27 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1737 1738 * decl.c (finish_decl): If we're writing out a static data member of 1739 a class, we want the debug info for that class. 1740 1741 * gc.c (build_t_desc): Check linkage of a class properly. 1742 1743 * class.c (finish_struct): Set the 'headof' offset for the main 1744 vtable properly. 1745 (prepare_fresh_vtable): Fix typeinfo pointer here. 1746 (modify_one_vtable): Instead of here. 1747 1748Mon Apr 10 12:15:59 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1749 1750 * repo.c (repo_get_id): New function to return the interesting 1751 identifier for a repo entity. 1752 (repo_template_used): Use it. 1753 (repo_template_instantiated): Mark the id as chosen. 1754 (init_repo): Record whether or not the id was chosen. 1755 (finish_repo): Note if an id was newly chosen. 1756 1757 * pt.c (do_function_instantiation): Call repo_template_instantiated. 1758 (do_type_instantiation): Ditto. Don't diagnose multiple 1759 instantiation. 1760 1761 * decl2.c (finish_file): Use DECL_NOT_REALLY_EXTERN when deciding 1762 whether or not to synthesize a method. 1763 1764 Undo these changes: 1765 * class.c (finish_vtbls): build more vtables if flag_rtti is on. 1766 * class.c (modify_all_direct_vtables): ditto. 1767 * init.c (expand_direct_vtbls_init): expand more vtables if 1768 flag_rtti is on. 1769 1770Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com> 1771 1772 * gc.c (build_headof): Use ptrdiff_type_node instead of 1773 integer_type_node on pointer arithmetic. 1774 1775Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1776 1777 * typeck.c (build_modify_expr): Undo previous change. 1778 1779Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1780 1781 * Makefile.in (compiler): Remove ../cc1plus before rebuilding it. 1782 1783 * repo.c (get_base_filename): Put the .rpo file in the directory 1784 with the object file, not the source. 1785 1786 * typeck.c (build_conditional_expr): Handle pmf's better. 1787 1788 * repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out 1789 the name of the symbol. 1790 1791Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1792 1793 * repo.c (open_repo_file): Make repo filename DOS-compliant. 1794 (*): Also write a new repo file if some previously-used 1795 templates are no longer used. Only remember the identifier. 1796 1797 * lex.c (cons_up_default_function): If this function belongs to a 1798 template class, call repo_template_used for it. 1799 1800 * repo.c (repo_template_used): Using a class means using its vtable, 1801 if any. 1802 (finish_repo): Ditto. 1803 1804 * typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs 1805 if the type has a complex copy constructor. 1806 1807 * decl2.c (lang_decode_option): -frepo implies 1808 -fno-implicit-templates. 1809 1810 * decl.c (start_function): Clear current_{base,member}_init_list. 1811 1812 * lex.c (init_lex): Also unset *_eq if ! flag_operator_names. 1813 1814Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1815 1816 * decl.c (struct cp_function): Add {base,member}_init_list. 1817 (push_cp_function_context): Save current_{base,member}_init_list. 1818 (pop_cp_function_context): Restore them. 1819 1820Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1821 1822 * repo.c (get_base_filename): Take filename parm, fix logic bug. 1823 1824 * typeck.c (build_compound_expr): Do not warn about a compound expr 1825 in which the first expression has no side effects. 1826 (build_x_compound_expr): Warn here instead. 1827 (build_conditional_expr): Don't warn about a conditional expression 1828 between an enum and the type it promotes to. 1829 1830 * init.c (build_new): Handle initialization of arrays of builtins 1831 properly. 1832 1833Mon Apr 3 15:08:04 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1834 1835 * repo.c: Include config.h to get definitions of bcopy and rindex 1836 on systems that don't have them (e.g., SVR4). 1837 1838Mon Apr 3 14:41:55 1995 Mike Stump <mrs@cygnus.com> 1839 1840 * decl2.c (finish_table): Pass NULL_TREE instead of init to 1841 finish_decl so that it won't try and do error checking on the 1842 initializer. 1843 1844Mon Apr 3 10:45:50 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1845 1846 * repo.c (get_base_filename): Analyze COLLECT_GCC_OPTIONS to 1847 determine whether this compile used -c -o. 1848 (open_repo_file): Use get_base_filename. Remove the extension. 1849 (finish_repo): Spit out the values of main_input_filename, 1850 COLLECT_GCC and COLLECT_GCC_OPTIONS. 1851 1852 * parse.y (structsp): Add TYPENAME_KEYWORD complex_type_name. 1853 1854Sun Apr 2 23:43:51 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1855 1856 * search.c (compute_access): Don't try to do access control on 1857 nested types. 1858 1859Fri Mar 31 10:14:23 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1860 1861 * repo.c: New file to handle things repo. 1862 1863 * pt.c (instantiate_template): Call repo_template_used if the 1864 definition is accessible. 1865 (mark_function_instantiated): Split out from 1866 do_function_instantiation. 1867 (mark_class_instantiated): Split out from do_type_instantiation. 1868 1869 * parse.y (template_instantiate_once): Call repo_template_used. 1870 1871 * lex.c (lang_init): Call init_repo. 1872 1873 * decl2.c: Handle flag_use_repository. 1874 (finish_file): Call finish_repo. 1875 1876 * decl.c (start_method): Call repo_template_used if this is a 1877 template method. 1878 1879 * Makefile.in (CXX_OBJS): Add repo.o. 1880 (repo.o): Add dependencies. 1881 1882 * Make-lang.in (CXX_SRCS): Add repo.c. 1883 1884 * decl.c (start_function): If DECL_INTERFACE_KNOWN and 1885 DECL_NOT_REALLY_EXTERN are both set, unset DECL_EXTERNAL. 1886 1887 * typeck.c (build_binary_op_nodefault): Identify the invalid operand 1888 types used. 1889 1890 * decl.c (duplicate_decls): Propagate DECL_NOT_REALLY_EXTERN. 1891 1892Thu Mar 30 17:54:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1893 1894 * typeck.c (build_binary_op_nodefault): Tidy up use of build_type 1895 and result_type. When checking for comparison between signed 1896 and unsigned, use result_type rather than the (possibly shortened) 1897 type of op0. Also, don't warn about equality comparison of a 1898 signed operand to an unsigned constant that fits in the signed 1899 type. 1900 1901 * method.c (do_build_copy_constructor): Reverse 1902 current_base_init_list after we've built it up. 1903 1904Thu Mar 30 14:35:18 1995 Mike Stump <mrs@cygnus.com> 1905 1906 * except.c (build_throw): Never warn about the value of throw not 1907 being used. 1908 1909Thu Mar 30 13:16:54 1995 Mike Stump <mrs@cygnus.com> 1910 1911 * except.c (expand_start_catch_block): Check for bad catch parameter 1912 declarations. 1913 1914Thu Mar 30 13:06:11 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1915 1916 * decl.c (finish_function): Only set DECL_NOT_REALLY_EXTERN if 1917 DECL_EXTERNAL is not already set. 1918 1919Thu Mar 30 11:26:24 1995 Mike Stump <mrs@cygnus.com> 1920 1921 * method.c (emit_thunk): Let poplevel know that the last level is 1922 for a function so it can create a BLOCK_NODE and set DECL_INITIAL. 1923 1924Thu Mar 30 11:15:06 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1925 1926 * decl2.c (import_export_inline): Don't set DECL_NOT_REALLY_EXTERN 1927 here. 1928 1929 * decl.c (grokdeclarator): OK, don't abort if we see a decl with 1930 METHOD_TYPE. 1931 (finish_function): Set DECL_EXTERNAL and DECL_NOT_REALLY_EXTERN on 1932 all deferred inlines. 1933 1934Wed Mar 29 19:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1935 1936 * cp-tree.h (DECL_THIS_INLINE): New macro. 1937 (DECL_NOT_REALLY_EXTERN): New macro. 1938 (DECL_THIS_STATIC): New macro. 1939 1940 * decl.c: Lose all references to current_extern_inline. Break 1941 inline semantics into DECL_INLINE for actual inlining and 1942 DECL_THIS_INLINE for the linkage wierdness. Use DECL_THIS_STATIC. 1943 * decl2.c: Use DECL_NOT_REALLY_EXTERN to indicate that we want to 1944 emit an inline here. Associated changes. 1945 * lex.c: Ditto. 1946 * pt.c: Ditto. 1947 * typeck.c: Ditto. 1948 1949 * call.c (build_method_call): Don't bother trying to handle inlines 1950 specially. 1951 * cvt.c (convert_to_aggr): Ditto. 1952 1953 * pt.c (do_function_instantiation): Handle instantiation of 1954 public inlines, too. 1955 1956Wed Mar 29 16:04:25 1995 Mike Stump <mrs@cygnus.com> 1957 1958 * except.c (init_exception_processing): Change the interface for 1959 __throw_type_match and add decl for new rtti matching routine 1960 __throw_type_match_rtti. 1961 (build_eh_type): New routine to build a run time descriptor for the 1962 expression given. 1963 (expand_start_catch_block): Update to use new calling convention for 1964 the matcher. 1965 (expand_throw): Update to use build_eh_type. 1966 1967Mon Mar 27 07:14:33 1995 Warner Losh <imp@village.org> 1968 1969 * g++.c: Removed __NetBSD__ from conditional. 1970 Declare strerror if HAVE_STRERROR is defined; otherwise 1971 declare sys_errlist and sys_nerr. 1972 (my_strerror): New function. 1973 1974Tue Mar 28 14:16:35 1995 Jason Merrill <jason@phydeaux.cygnus.com> 1975 1976 * search.c (get_binfo): Don't try to be so clever. 1977 1978 * tree.c (copy_to_permanent): Also suspend_momentary(). 1979 1980 * cvt.c (cp_convert_to_pointer): Hand off to convert_fn_pointer even 1981 if the types are the same. 1982 1983 * decl.c (start_function): Handle extern inlines more like C++ says 1984 we should. 1985 1986 * init.c (build_member_call): Hand constructor calls off to 1987 build_functional_cast. 1988 1989 * typeck2.c (build_functional_cast): Use DECL_NESTED_TYPENAME to get 1990 the name of the type. 1991 1992Tue Mar 28 13:13:56 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1993 1994 * decl.c (grokdeclarator): Check for the decl returned by 1995 grokfndecl to be null before using build_decl_attribute_variant. 1996 1997Mon Mar 27 18:04:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 1998 1999 * init.c (build_new): Use build_pointer_type instead of 2000 TYPE_POINTER_TO. 2001 2002Fri Mar 24 12:11:24 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2003 2004 * typeck.c (build_conditional_expr): Handle pmfs. 2005 (convert_for_assignment): Fix pmf support. 2006 2007 * cvt.c (convert_fn_ptr): Support !flag_vtable_thunks. 2008 (cp_convert_to_pointer): Handle pmfs. 2009 (cp_convert): Pass pmfs to cp_convert_to_pointer. 2010 2011 * typeck.c (common_type): Handle inheritance for pmfs. 2012 2013 * typeck2.c (build_m_component_ref): Do access control. 2014 2015 * typeck.c (comp_target_types): Check for conversion to void * 2016 before checking trickier conversions. 2017 2018 * decl.c (duplicate_decls): Propagate DECL_ABSTRACT_VIRTUAL_P. 2019 2020 * pt.c (push_tinst_level): Complain if template instantiation depth 2021 is greater than max_tinst_depth. 2022 2023 * typeck.c (common_type): Assume that we can call common_type to 2024 unify the target type of a pointer. 2025 2026Thu Mar 23 00:48:44 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2027 2028 * decl2.c (finish_file): Don't synthesize methods at 2029 finish_vtable_prevardecl time. Do synthesize methods that are not 2030 used, but are public and not external. 2031 2032 * cvt.c (build_type_conversion): Only give an error if for_sure. 2033 2034 * typeck.c (comp_target_types): Only support pointer conversions if 2035 nptrs > 0. 2036 2037Wed Mar 22 19:30:15 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2038 2039 * init.c (build_new): Catch use of an initializer list where it 2040 shouldn't be. 2041 2042Wed Mar 22 16:21:07 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2043 2044 * init.c (build_new): Wrap alloc_expr in an RTL_EXPR if nelts is 2045 non-constant. 2046 2047 * decl2.c: temp_name_counter is now public. 2048 2049 * decl.c (struct cp_function): Add temp_name_counter field. 2050 (push_cp_function_context): Save it. 2051 (pop_cp_function_context): Restore it. 2052 2053 * typeck.c (common_type): Handle unifying function types, and unify 2054 unmatched things to void* with a compiler_error, rather than 2055 silently like before. 2056 2057Wed Mar 22 15:10:34 1995 Mike Stump <mrs@cygnus.com> 2058 2059 * decl2.c (finish_prevtable_vardecl, finish_vtable_vardecl): Revert 2060 Brendan's last change and fix latent problem that causes TD entries 2061 to not come out when the things that need them has yet to be 2062 expanded. 2063 2064Wed Mar 22 15:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2065 2066 * typeck.c (build_binary_op_nodefault, comparison ops): Update type0 2067 and type1, since we might have changed op0 or op1. 2068 2069Wed Mar 22 13:33:45 1995 Jason Merrill <jason@python.cygnus.com> 2070 2071 * typeck.c (common_type): Don't mess up templates. 2072 2073Wed Mar 22 04:56:00 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2074 2075 * typeck.c (common_type): Handle ptms properly. Also handle 2076 T* -> void*. 2077 (build_binary_op_nodefault): New variable build_type controls what 2078 type is given to the expression when it is created. Set this to 2079 boolean_type_node for comparison ops instead of using result_type. 2080 (comp_target_types): Allow T * -> void *. 2081 2082 * cvt.c (cp_convert_to_pointer): Do access control when converting 2083 ptms, too. 2084 2085Tue Mar 21 17:25:06 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2086 2087 * parse.y (extern_lang_string): Catch use of linkage specs that 2088 aren't all naming the same language. 2089 2090 * class.c (finish_struct): Delete accidental duplicate code. 2091 2092Tue Mar 21 14:00:57 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2093 2094 * typeck.c (build_binary_op_nodefault): Disable pedwarns about 2095 comparing functions and incomplete types. 2096 2097 * decl.c (finish_function): Only unset current_function_decl if 2098 !nested. 2099 (duplicate_decls): Last change went too far; we only want to stop 2100 checking for value/reference ambiguity. 2101 2102Tue Mar 21 01:26:39 1995 Mike Stump <mrs@cygnus.com> 2103 2104 * gc.c (build_generic_desc): Zap the DECL_SIZE so that we can lay it 2105 out fresh, as the new type may be larger. 2106 2107Mon Mar 20 19:01:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2108 2109 * expr.c (extract_init): Try to expand the RTL for the 2110 initialization and figure out what it will look like so we can avoid 2111 run-time initialization. Disabled for now. 2112 (extract_scalar_init): Helper for scalar initialization. 2113 (extract_aggr_init): Helper for aggregate initialization. 2114 2115 * decl.c (duplicate_decls): Don't complain about ambiguous 2116 declarations. 2117 (obscure_complex_init): Now returns a tree. Call extract_init if 2118 we're optimizing and this is a toplevel decl. 2119 (finish_decl): Update accordingly. 2120 2121 * lex.c (check_newline): If we're just changing files (not pushing 2122 or popping), update input_file_stack->name. 2123 2124Mon Mar 20 17:55:04 1995 Mike Stump <mrs@cygnus.com> 2125 2126 * pt.c (type_unification): Only TEMPLATE_DECLs are handled right now 2127 in the transitive unification code. 2128 2129Mon Mar 20 16:07:50 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2130 2131 * decl.c (shadow_tag): Don't allow inline, virtual, or explicit on 2132 non-functions. 2133 (grokdeclarator): Don't allow friends to be defined in local classes. 2134 2135Sat Mar 18 04:03:33 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2136 2137 * decl2.c (finish_prevtable_vardecl): Use DECL_DECLARED_STATIC 2138 rather than DECL_SAVED_INSNS to decide whether or not this method 2139 was declared inline. 2140 2141 * method.c (synthesize_method): Turn off DECL_INLINE if 2142 function_cannot_inline_p thinks we're too large. 2143 2144 * typeck.c (build_indirect_ref): Use build_expr_type_conversion. 2145 2146Fri Mar 17 17:47:36 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2147 2148 * class.c (instantiate_type): Handle pmfs. 2149 2150 * typeck.c (convert_for_assignment): Check types when assigning one 2151 pmf to another. 2152 2153 * decl.c (define_label): Fix logic for printing out the name of the 2154 label in an error message. 2155 2156 * error.c (dump_expr): Support ARRAY_REF. 2157 2158Fri Mar 17 17:43:02 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2159 2160 * decl2.c (finish_vtable_vardecl): Call build_t_desc here. 2161 (finish_prevtable_vardecl): Instead of here. 2162 2163Fri Mar 17 14:40:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2164 2165 * decl.c (expand_static_init): Also use expand_aggr_init if the 2166 initializer is a TREE_LIST. 2167 (grokdeclarator): Only pedwarn about extra qualification if -pedantic. 2168 2169 * pt.c (unify): Fix unification of return type. 2170 2171 * expr.c (fixup_result_decl): Use store_expr, rather than 2172 emit_move_insn, to move the return value into the place where 2173 callers will expect it. 2174 2175Thu Mar 16 22:05:25 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2176 2177 * init.c (build_offset_ref): Call assmble_external on functions. 2178 * typeck.c (build_component_ref): Ditto. 2179 2180Thu Mar 16 20:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2181 2182 * decl.c (struct saved_scope): Add members base_init_list and 2183 member_init_list. 2184 (push_to_top_level): Save current_base_init_list and 2185 current_member_init_list to them. 2186 (pop_from_top_level): Put it back. 2187 2188Thu Mar 16 19:21:14 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2189 2190 * pt.c (instantiate_template): Call assemble_external. 2191 2192Thu Mar 16 18:07:54 1995 Brendan Kehoe (brendan@phydeaux.cygnus.com) 2193 2194 * class.c: Include rtl.h, to get NULL_RTX. 2195 (finish_struct): Also zero out DECL_SAVED_INSNS, to avoid problems 2196 on hosts with different sizes for each part of the union. 2197 * tree.c: Also include rtl.h. 2198 (layout_basetypes): Same change for DECL_SAVED_INSNS. 2199 2200Thu Mar 16 13:57:36 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2201 2202 * pt.c (unify): Fix array domain unification for 64-bit targets. 2203 2204 * decl2.c (finish_file): Push bizarre type decl before walking the 2205 vtables the first time. 2206 (walk_vtables): OK, don't set prev to vars if the vardecl_fn messed 2207 with TREE_CHAIN (prev). 2208 2209 * init.c (emit_base_init): Use convert_pointer_to_real instead of 2210 convert_pointer_to when converting to a direct base. 2211 2212Wed Mar 15 20:26:29 1995 Mike Stump <mrs@cygnus.com> 2213 2214 * pt.c (type_unification): Handle transitive unification better. 2215 2216Wed Mar 15 13:56:16 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2217 2218 * decl2.c (walk_vtables): Always set prev to vars. 2219 (mark_vtable_entries): Call assemble_external on the vtable entries. 2220 2221 * class.c (finish_struct): Set the vtable's size to NULL_TREE before 2222 calling layout_decl, so that it gets updated properly. 2223 2224 Finally re-enable dynamic synthesis. This time it works. 2225 * method.c (synthesize_method): Pass decl_function_context (fndecl) 2226 to {push,pop}_cp_function_context. 2227 * decl.c (push_cp_function_context): Now takes a tree argument. 2228 (pop_cp_function_context): Ditto. 2229 * call.c (build_method_call): Enable synthesis. 2230 * lex.c (cons_up_default_function): Ditto. 2231 2232Tue Mar 14 19:14:19 1995 Doug Evans <dje@chestnut.cygnus.com> 2233 2234 * parse.y (setattrs): Chain onto prefix_attributes rather than 2235 setting it. 2236 2237Wed Mar 15 13:00:00 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2238 2239 * decl.c (pushdecl): Check if the type of the VAR_DECL is an 2240 error_mark_node before trying to read TYPE_LANG_SPECIFIC. 2241 2242Mon Mar 13 21:00:28 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2243 2244 * decl.c (grokdeclarator, case ARRAY_REF): Wrap the exp with fold, 2245 and convert the size and integer_one_node to the index type. 2246 2247Mon Mar 13 08:01:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2248 2249 * typeck.c (get_member_function_from_ptrfunc): Save the instance 2250 argument, and tack it onto the front of the COND_EXPR to make the 2251 semantics come out right. Grab the instance argument from 2252 '*instance_ptrptr', rather than having it passed in separately. 2253 2254 * various: Change various consed-up comparison operations to have 2255 boolean type. Remove the instance argument in calls to 2256 get_member_function_from_ptrfunc. 2257 2258 * error.c (dump_expr): Dump true and false as "true" and "false". 2259 2260 * decl2.c (finish_file): Also set DECL_STATIC_FUNCTION_P on the 2261 global init function. 2262 2263 * decl.c (finish_function): Only set DECL_EXTERNAL here if the 2264 inline function is public. 2265 2266Sat Mar 11 00:58:03 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2267 2268 * init.c (is_friend): Be more careful about checking 2269 DECL_CLASS_CONTEXT on non-member functions. 2270 2271 * decl2.c (finish_vtable_vardecl): Don't bother calling 2272 assemble_external here. 2273 (prune_vtable_vardecl): New function that just splices out the 2274 vtable decl from the top-level decls. 2275 (import_export_inline): Unset DECL_EXTERNAL at first. 2276 (finish_file): Don't bother calling assemble_external here. Do 2277 splice out all of the vtables. 2278 2279Fri Mar 10 14:42:29 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2280 2281 * decl.c (finish_function): If we're not emitting the function yet, 2282 call assemble_external for it. 2283 2284 * decl2.c (finish_prevtable_vardecl): Don't call mark_vtable_entries 2285 here. 2286 (finish_vtable_vardecl): Don't do the linkage deduction thing here. 2287 Also don't splice out the current vtable if it is unused. 2288 (finish_file): Move the second walk_vtables and the synthesis check 2289 inside the 'reconsider' loop. Move thunk emission after the 2290 'reconsider' loop. 2291 2292Thu Mar 9 16:28:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2293 2294 * pt.c (tsubst): Don't bother calling cp_build_type_variant, since it 2295 was passing bogus values for readonly and volatile from the original 2296 template decl, not the resultant type of the tsubst call. 2297 2298 * class.c (duplicate_tag_error): Use cp_error_at to point out the 2299 previous definition of the tag. 2300 2301Thu Mar 9 10:46:17 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2302 2303 * decl.c (start_function): Clear base_init_insns and protect_list. 2304 (struct cp_function): Add base_init_insns field. 2305 (push_cp_function_context): Also save base_init_insns. 2306 (pop_cp_function_context): Also restore base_init_insns. 2307 2308Wed Mar 8 13:31:44 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2309 2310 * init.c (member_init_ok_or_else): Check for initializing a static 2311 member here. 2312 (emit_base_init): Instead of here. 2313 2314Tue Mar 7 16:03:26 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2315 2316 * call.c (build_method_call): Disable synthesis as needed. 2317 * lex.c (cons_up_default_function): Ditto. 2318 2319Tue Mar 7 10:14:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2320 2321 * parse.y: New rules to allow attributes in a prefix position. 2322 (prefix_attributes): New variable. Pass it into cplus_decl_attributes. 2323 (setattr): New rule. 2324 (reserved_declspecs, declmods): Catch attributes here. 2325 * decl2.c (cplus_decl_attributes): Add PREFIX_ATTRIBUTES argument. 2326 * decl.c (duplicate_decls): Pass DECL_MACHINE_ATTRIBUTES to 2327 descendent typedef. 2328 (grokdeclarator): Added code to support machine attributes. 2329 * Makefile.in (stamp-parse): Expect 5 shift/reduce failures. 2330 2331Mon Mar 6 15:07:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2332 2333 * call.c (build_method_call): Don't synthesize methods outside of a 2334 function. 2335 2336 Make base initialization more re-entrant so that synthesis on the 2337 fly will work (and, eventually, template instantation on the fly). 2338 * init.c (sort_member_init): Don't bother with members that can't be 2339 initialized. Reorganize a bit. Don't initialize base members here. 2340 (sort_base_init): New function, like sort_member_init, but for base 2341 classes. Steals some code from emit_base_init. 2342 (emit_base_init): Simplify. Call sort_{member,base}_init before 2343 doing any initialization, so we don't have to save 2344 current_{member,base}_init_list in push_cp_function_context. 2345 (expand_aggr_vbase_init_1): Adjust for sort_base_init. 2346 (expand_aggr_vbase_init): Simplify. 2347 * decl.c (struct cp_function): Add protect_list field. 2348 (push_cp_function_context): Also save protect_list. 2349 (pop_cp_function_context): Also restore protect_list. 2350 * call.c (build_method_call): Enable synthesis at point of call. 2351 * lex.c (cons_up_default_function): Ditto. 2352 2353 * parse.y: Turn -ansi checks back into -pedantic checks. 2354 2355 * init.c (build_new): Fix -fcheck-new for array new. 2356 2357Sat Mar 4 15:55:42 1995 Fergus Henderson <fjh@cs.mu.oz.au> 2358 2359 * typeck.c (build_compound_expr): warn if left-hand operand of 2360 comma expression has no side-effects. 2361 2362Fri Mar 3 15:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2363 2364 * parse.y (primary): Change 'object qualified_id *' rules to 'object 2365 overqualified_id *'. 2366 2367Fri Mar 3 12:48:17 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2368 2369 * parse.y (unary_expr): Catch doing sizeof an overloaded function. 2370 Make the error look the same as the one we issue in c_sizeof. 2371 2372 * typeck.c (build_binary_op_nodefault): Give an error for trying 2373 to compare a pointer-to-member to `void *'. 2374 2375Fri Mar 3 11:28:50 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2376 2377 * typeck.c (build_unary_op): Handle bool increment with smoke and 2378 mirrors here, rather than in expand_increment where it belongs, 2379 because Kenner doesn't agree with me. 2380 2381Fri Mar 3 00:08:10 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2382 2383 * decl.c (grokparms): Catch a PARM_DECL being used for a default 2384 argument as well. 2385 2386Thu Mar 2 20:05:54 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2387 2388 * init.c (build_new): Don't allow new on a function type. 2389 2390 * parse.y (primary): Avoid a crash when seeing if the arg is of 2391 the same type as that given for the typespec in an explicit dtor call. 2392 2393Thu Mar 2 00:49:38 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2394 2395 * decl.c (finish_function): Change test for calling 2396 mark_inline_for_output. 2397 2398Wed Mar 1 11:23:46 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2399 2400 * typeck.c (build_modify_expr): Complain if 2401 build_default_binary_type_conversion fails. 2402 2403 * init.c (expand_default_init): Handle arguments of unknown type 2404 properly. 2405 2406 * cvt.c (build_expr_type_conversion): Only complain about ambiguity 2407 if 'complain'. 2408 * various: Pass 'complain'. 2409 2410 * typeck.c (comptypes): Be more picky about comparing UPTs. 2411 2412Wed Mar 1 11:03:41 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2413 2414 * decl.c (grokdeclarator): If declarator is null, say that the 2415 type used has an incomplete type. 2416 2417Wed Mar 1 10:06:20 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2418 2419 * pt.c (instantiate_template): Copy the template arguments to the 2420 permanent_obstack. Also use simple_cst_equal to compare them when 2421 looking for a previous instantiation. 2422 2423 * tree.c (make_deep_copy): Support copying INTEGER_TYPEs (assuming 2424 they are array domain types). 2425 2426Tue Feb 28 23:24:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2427 2428 * cp-tree.h: Define WANT_* constants for passing to 2429 build_expr_type_conversion. 2430 * cvt.c (build_expr_type_conversion): New function to build 2431 conversion to one of a group of suitable types. 2432 (build_default_binary_type_conversion): Use it. 2433 * decl2.c (grok_array_decl): Ditto. 2434 * typeck.c (build_unary_op): Ditto. 2435 (build_array_ref): Tidy up a bit. 2436 (build_binary_op): Ditto. 2437 2438Tue Feb 28 19:57:31 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2439 2440 * decl.c (grokdeclarator): Don't allow decl of an argument as `void'. 2441 2442Tue Feb 28 17:23:36 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2443 2444 * parse.y (typed_declspecs1): Add 'typespec reserved_typespecquals 2445 reserved_declspecs' rule. 2446 2447 * parse.y (expr_or_declarator): Remove notype_qualified_id rule. 2448 (direct_notype_declarator): Ditto. 2449 (complex_direct_notype_declarator): Add notype_qualified_id rule. 2450 2451 * lex.c (real_yylex): Handle :> digraph properly. 2452 2453Tue Feb 28 12:26:29 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2454 2455 * decl.c (grokdeclarator): Check if it's a friend, not if it's 2456 non-virtual, that's being initialized. Move the check up to 2457 before FRIENDP would get cleared. Catch an unnamed var/field 2458 being declared void. Say just `field' instead of `structure field' 2459 in the error message. Only go for the operator name if DECLARATOR 2460 is non-null. 2461 2462Tue Feb 28 00:08:01 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2463 2464 * decl.c (start_function): Complain about abstract return type. 2465 (grokdeclarator): Complain about declaring constructors and 2466 destructors to be const or volatile. Complain about declaring 2467 destructors to be static. 2468 2469 * pt.c (uses_template_parms): Handle pmfs. 2470 2471 * decl.c (grokdeclarator): Don't call variable_size for array bounds 2472 that only depend on template constant parameters. 2473 2474Mon Feb 27 15:38:16 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2475 2476 * error.c (dump_decl): Only look to see if it's a vtable if we 2477 actually have a name to check out. 2478 2479Mon Feb 27 13:37:53 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2480 2481 * cvt.c (convert_to_aggr): Lose misleading shortcut. 2482 2483Sun Feb 26 17:27:32 1995 Doug Evans <dje@canuck.cygnus.com> 2484 2485 * decl.c (set_nested_typename): Always set DECL_IGNORED_P, 2486 not just for dwarf. 2487 2488Sun Feb 26 00:10:18 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2489 2490 * decl.c (grokdeclarator): Don't allow a static member to be 2491 declared `register'. 2492 2493 * init.c (make_friend_class): Move up to a pedwarn for the warning 2494 about a class declaring friends with itself. 2495 2496 * decl.c (grokdeclarator): You can't do `volatile friend class foo' 2497 or `inline friend class foo'. Only try to make a friend out of 2498 TYPE if we didn't already reset it to integer_type_node. 2499 2500Sat Feb 25 22:32:03 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2501 2502 * decl.c (grokdeclarator): Don't allow initialization of a 2503 non-virtual function. 2504 2505 * decl.c (start_function): Do a pedwarn if we're changing `main' 2506 to have an int return type. 2507 2508Sat Feb 25 00:02:05 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2509 2510 * typeck.c (build_modify_expr): Handle simple assignment from 2511 TARGET_EXPRs by building up an RTL_EXPR to force expansion. Whew. 2512 2513Fri Feb 24 18:27:14 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2514 2515 * decl.c (grokdeclarator): Also don't allow virtual outside of a 2516 class decl for a scope method definition performed at global binding. 2517 2518 * init.c (build_offset_ref): Don't allow creation of an OFFSET_REF 2519 of a bitfield. 2520 2521 * decl.c (grokdeclarator): Don't allow a const to be declared mutable. 2522 2523 * typeck.c (build_binary_op): Return an error_mark_node if either 2524 one of the args turned into an error_mark_node when we tried to 2525 use default_conversion. 2526 2527 * typeck.c (build_unary_op): Forbid using postfix -- on a bool. 2528 2529 * decl.c (grokdeclarator): Allow `signed' and `unsigned' to be 2530 used on `__wchar_t'. 2531 2532Fri Feb 24 13:59:53 1995 Mike Stump <mrs@cygnus.com> 2533 2534 * except.c (end_protect_partials): Do it the right way. 2535 2536Wed Feb 22 15:42:56 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2537 2538 * typeck.c (build_binary_op_nodefault): Upgrade warning about 2539 comparing distinct pointer types to pedwarn. 2540 2541 * typeck2.c (digest_init): Cope with extra braces. 2542 2543 * typeck.c (build_binary_op_nodefault): Use tree_int_cst_sgn instead 2544 of INT_CST_LT (..., interger_zero_node). 2545 2546Wed Feb 22 14:45:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2547 2548 * except.c [!TRY_NEW_EH] (end_protect_partials): Define dummy 2549 function for systems that don't have EH. 2550 2551Tue Feb 21 19:18:31 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2552 2553 * call.c (can_convert_arg): Like can_convert, but takes an arg as 2554 well. 2555 2556 * pt.c (type_unification): Allow implicit conversions for parameters 2557 that do not depend on template parameters. 2558 2559Tue Feb 21 18:43:48 1995 Douglas Rupp (drupp@cs.washington.edu) 2560 2561 * Make-lang.in, config-lang.in: ($exeext): New macro. 2562 * Make-lang.in: Try a "cp" if "ln" fails. 2563 * cp-tree.h (decl_attributes): Added argument. 2564 * decl2.c (cplus_decl_attribute): Add arg to decl_attributes. 2565 * cp/g++.c: Added #ifdefs for sys/file.h and process.h for NT. 2566 Modified spawnvp to have to correct number of arguments for OS/2, NT. 2567 2568Tue Feb 21 18:36:55 1995 Mike Stump <mrs@cygnus.com> 2569 2570 * decl.c (finish_function): Add calls to end_protect_partials to end 2571 the exception region that protects constructors so that partially 2572 constructed objects can be partially destructed when the constructor 2573 throws an exception. 2574 * init.c (perform_member_init, sort_member_init, emit_base_init): 2575 Added support for partially constructed objects. 2576 * init.c (build_partial_cleanup_for): New routine to do partial 2577 cleanups of a base class. 2578 * decl2.c (finish_file): Move the emitting of the exception table 2579 down, after we emit all code that might have exception regions in 2580 them. 2581 * except.c (end_protect_partials, might_have_exceptions_p): New 2582 routines. 2583 (emit_exception_table): Always output table if called. 2584 * cp-tree.h (protect_list, end_protect_partials, 2585 might_have_exceptions_p, emit_exception_table): Added. 2586 2587Tue Feb 21 16:05:59 1995 Brendan Kehoe (brendan@lisa.cygnus.com) 2588 2589 * gc.c (build_typeid): Pass a NULL_TREE, not the bogus, unused 2590 address of a local variable. 2591 * class.c (build_vfn_ref): Only try to build the PLUS_EXPR if we 2592 were given a non-null PTR_TO_INSTPTR. 2593 2594Tue Feb 21 01:53:18 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2595 2596 * decl.c (duplicate_decls): Always lay out the merged decl. 2597 2598 * decl2.c (finish_vtable_vardecl): Don't do vtable hack on templates. 2599 (finish_prevtable_vardecl): Ditto. 2600 2601 * method.c (synthesize_method): Set interface_{unknown,only} 2602 according to the settings for our class, not the file where it comes 2603 from. 2604 2605Sat Feb 18 12:26:48 1995 Mike Stump <mrs@cygnus.com> 2606 2607 * except.c: Handle systems that define __i386__ but not __i386. 2608 2609Fri Feb 17 15:31:31 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2610 2611 * decl2.c (reparse_decl_as_expr): Support being called without a 2612 type argument. 2613 2614 * parse.y (primary): Add '(' expr_or_declarator ')'. Adds 4 r/r 2615 conflicts. Sigh. 2616 2617Fri Feb 17 12:02:06 1995 Mike Stump <mrs@cygnus.com> 2618 2619 * parse.y (template_def, fndef, fn.def1, return_init, condition, 2620 initdcl0, initdcl, notype_initdcl0, nomods_initdcl0, 2621 component_decl_1, after_type_component_declarator0, 2622 notype_component_declarator0, after_type_component_declarator, 2623 notype_component_declarator, after_type_component_declarator, 2624 full_parm, maybe_raises, exception_specification_opt): Fix up, 2625 include exception_specification_opt maybeasm maybe_attribute and 2626 maybe_init if missing. Rename maybe_raises to 2627 exception_specification_opt to match draft wording. Use maybe_init 2628 to simplify rules. 2629 2630Fri Feb 17 01:54:46 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2631 2632 * init.c (build_new): Set TREE_NO_UNUSED_WARNING on COMPOUND_EXPRs 2633 built for news of scalar types. 2634 2635Thu Feb 16 17:48:28 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2636 2637 * typeck.c (build_binary_op_nodefault): Update code for warning 2638 about signed/unsigned comparisons from C frontend. Realize that the 2639 code in the C frontend is, if anything, even more bogus. Fix it. 2640 (build_binary_op): Undo default_conversion if it wasn't useful. 2641 2642 * typeck.c (build_unary_op, ADDR_EXPR): Lose bogus special case for 2643 PRE*CREMENT_EXPR. 2644 2645 * decl2.c (import_export_vtable): Don't try the vtable hack 2646 if the class doesn't have any real non-inline virtual functions. 2647 (finish_vtable_vardecl): Don't bother trying to find a non-inline 2648 virtual function in a non-polymorphic class. 2649 (finish_prevtable_vardecl): Ditto. 2650 2651 * decl2.c (import_export_vtable): Use and set DECL_INTERFACE_KNOWN. 2652 2653 * cp-tree.h (DECL_INTERFACE_KNOWN): Use DECL_LANG_FLAG_5. 2654 2655 * init.c (expand_virtual_init): Always call assemble_external. 2656 2657 * class.c (build_vfn_ref): Always call assemble_external. 2658 (build_vtable): Always call import_export_vtable. 2659 (prepare_fresh_vtable): Ditto. 2660 (add_virtual_function): Don't bother setting TREE_ADDRESSABLE. 2661 2662Thu Feb 16 03:28:49 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2663 2664 * class.c (finish_struct): Use TYPE_{MIN,MAX}_VALUE to determine 2665 whether an enumerated type fits in a bitfield. 2666 2667Wed Feb 15 15:38:12 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2668 2669 * class.c (grow_method): Update method_vec after growing the class 2670 obstack. 2671 2672Wed Feb 15 13:42:59 1995 Mike Stump <mrs@cygnus.com> 2673 2674 * parse.y (handler_seq): Push a level for the catch parameters. 2675 2676Wed Feb 15 12:42:57 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2677 2678 * init.c (emit_base_init): Update BINFO_INHERITANCE_CHAIN on my 2679 bases, in case they've been clobbered. 2680 2681Wed Feb 15 12:07:29 1995 Mike Stump <mrs@cygnus.com> 2682 2683 * class.c (finish_base_struct): Set up BINFO_INHERITANCE_CHAIN here, 2684 so that one day it will always be valid. 2685 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto. 2686 2687 * cp-tree.h (copy_binfo): Removed, unused. 2688 * tree.c (copy_binfo): Ditto. 2689 2690Wed Feb 15 00:05:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2691 2692 * init.c (build_new): Save the allocation before calling 2693 expand_vec_init on it. 2694 2695 * decl.c (finish_enum): The TYPE_PRECISION of the enum type mush 2696 match the TYPE_PRECISION of the underlying type for constant folding 2697 to work. 2698 2699Tue Feb 14 15:31:25 1995 Mike Stump <mrs@cygnus.com> 2700 2701 * except.c (push_eh_entry, expand_start_all_catch, 2702 expand_leftover_cleanups, expand_end_catch_block): Keep track of 2703 the context in which the exception region occurs. 2704 (build_exception_table): If the region was not output, don't output 2705 the entry in the eh table for it. 2706 2707Tue Feb 14 02:15:43 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2708 2709 * init.c (expand_default_init): Only use a previous constructor call 2710 if it's a call to our constructor. Does the word "Duh" mean 2711 anything to you? 2712 2713 * decl.c (grokparms): Fine, just don't call 2714 convert_for_initialization at all. OK? Happy now? 2715 2716Mon Feb 13 02:23:44 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2717 2718 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Make sure that the class 2719 method vector has a second element before returning it. 2720 2721 * decl.c (grokparms): Don't strip REFERENCE_TYPE before calling 2722 convert_for_initialization. 2723 2724Sun Feb 12 03:57:06 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2725 2726 * typeck.c (build_modify_expr): Compare function name to 2727 constructor_name (current_class_type) instead of current_class_name. 2728 2729 * decl.c (grokparms): Don't do anything with the return value of 2730 convert_for_initialization. 2731 2732 * error.c (dump_decl): Also dump_readonly_or_volatile on the decl. 2733 2734 * decl.c (duplicate_decls): Tweak error message. 2735 2736 * typeck.c (build_const_cast): Implement checking. 2737 (build_reinterpret_cast): Implement some checking. 2738 2739 * cp-tree.h (CONV_FORCE_TEMP): Require a new temporary when 2740 converting to the same aggregate type. 2741 (CONV_STATIC_CAST): Include it. 2742 (CONV_C_CAST): Ditto. 2743 * cvt.c (convert_force): Use CONV_C_CAST instead of CONV_OLD_CONVERT. 2744 (cp_convert): Only force a new temporary if CONV_FORCE_TEMP. 2745 2746Fri Feb 10 16:18:52 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2747 2748 * typeck.c (build_c_cast): Use non_lvalue to tack something on 2749 where necessary. 2750 2751 * decl.c (auto_function): Now a function. 2752 * except.c (init_exception_processing): terminate, unexpected, 2753 set_terminate, and set_unexpected have C++ linkage. 2754 2755 * typeck.c (build_unary_op, TRUTH_NOT_EXPR): Use convert instead of 2756 truthvalue_conversion for converting to bool, as it handles 2757 user-defined conversions properly. 2758 (condition_conversion): Ditto. 2759 2760 * except.c (expand_throw): Don't call convert_to_reference. 2761 Pass the correct parameters to build_new. 2762 2763 * method.c (do_build_assign_ref): Don't use access control when 2764 converting to a base reference here. 2765 (do_build_copy_constructor): Or here. 2766 2767 * init.c (build_new): Unset TREE_READONLY on the dereferenced 2768 pointer before assigning to it. 2769 2770 * decl.c (maybe_build_cleanup): Don't bother stripping const here. 2771 2772 * decl2.c (delete_sanity): You can now delete pointer to const. 2773 2774Fri Feb 10 13:28:38 1995 Jason Merrill <jason@python.cygnus.com> 2775 2776 * decl.c (finish_function): Don't rely on actual parameters being 2777 evaluated left-to-right. 2778 * except.c (expand_end_catch_block): Ditto. 2779 2780Fri Feb 10 00:52:04 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2781 2782 * tree.c (real_lvalue_p): Like lvalue_p, but class temps aren't 2783 considered lvalues. 2784 * cvt.c (convert_to_reference): Use real_lvalue_p instead of 2785 lvalue_p. 2786 2787 * cvt.c (build_type_conversion_1): Don't call convert on aggregate 2788 types. 2789 (convert_to_reference): Fix erroneous text substitution. 2790 2791 * typeck2.c (initializer_constant_valid_p): Update from C frontend. 2792 Add new argument to all callers. 2793 2794 * typeck.c (convert_arguments): Check for error_mark_node before 2795 trying to do anything with the actual parameter. 2796 2797 * typeck.c (condition_conversion): Build up a CLEANUP_POINT_EXPR and 2798 fold it. 2799 (bool_truthvalue_conversion): Remove. Fix all callers to call 2800 truthvalue_conversion instead. 2801 (various): Fold CLEANUP_POINT_EXPRs. 2802 2803 * parse.y (conditions): Call condition_conversion rather than 2804 building up a CLEANUP_POINT_EXPR. 2805 2806 * pt.c (end_template_decl): Don't warn_if_unknown_interface here 2807 under -falt-external-templates. 2808 2809Thu Feb 9 05:24:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2810 2811 * init.c (build_new): Complain about new of const type without 2812 initializer. Other cleanup. 2813 2814 * call.c (compute_conversion_costs): Don't call 2815 build_type_conversion with a reference type; convert to the target 2816 type and check its lvaluetude. 2817 * cvt.c (convert_to_reference): Ditto. 2818 2819 * cvt.c (build_type_conversion_1): There will never be any need to 2820 dereference references here now. 2821 2822Thu Feb 9 00:37:47 1995 Mike Stump <mrs@cygnus.com> 2823 2824 * except.c (expand_builtin_throw): Make sure we only `use' the 2825 value of return_val_rtx. 2826 2827Wed Feb 8 15:45:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2828 2829 * parse.y (structsp): Don't complain about declaring a type being 2830 defined to be a friend. 2831 2832 * decl2.c (warn_if_unknown_interface): Note the template in question 2833 and the point of instantiation, for -falt-external-templates. 2834 * lex.c (reinit_parse_for_method): Pass the decl to 2835 warn_if_unknown_interface. 2836 * pt.c (instantiate_template): Ditto. 2837 (end_template_decl): Ditto. 2838 2839 * decl.c (set_nested_typename): Set IDENTIFIER_TYPE_VALUE on the 2840 nested name again, to make local classes work a bit better. 2841 2842 * typeck.c (build_function_call_real): Dereference reference after 2843 checking for incomplete type. 2844 2845 * init.c (build_new): Accept new of const and volatile types. 2846 2847Wed Feb 8 14:04:16 1995 Jason Merrill <jason@deneb.cygnus.com> 2848 2849 * decl.c (grokdeclarator): Fix error message. 2850 2851Wed Feb 8 03:16:15 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2852 2853 * typeck.c (convert_for_initialization): Do bash arrays when 2854 converting to a reference to non-array. 2855 2856Tue Feb 7 15:50:33 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2857 2858 * cvt.c (cp_convert): Don't call convert_to_reference, or 2859 automatically dereference references. Do pass reference conversions 2860 to cp_convert_to_pointer. 2861 (cp_convert_to_pointer): Support references. 2862 2863 * call.c (build_method_call): Don't build up a reference to the 2864 parameter here; let build_overload_call handle that. 2865 2866 * typeck.c (build_c_cast): Call convert_to_reference directly if 2867 converting to a reference type. 2868 * method.c (do_build_copy_constructor): Ditto. 2869 * method.c (do_build_copy_constructor): Ditto. 2870 (do_build_assign_ref): Ditto. 2871 2872 * call.c (build_method_call): Dereference a returned reference. 2873 * typeck.c (build_function_call_real): Ditto. 2874 2875 * decl.c (xref_basetypes): Check for unions with basetypes here. 2876 (xref_tag): Instead of here. 2877 2878 * pt.c (process_template_parm): Template type parm decls are 2879 artificial. 2880 2881Mon Feb 6 04:32:09 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2882 2883 * parse.y (typed_declspecs): Add missing semicolon. 2884 (do_xref_defn): Resurrect. 2885 (named_class_head_sans_basetype): Move template specialization 2886 definition cases to named_class_head_sans_basetype_defn. 2887 2888 * decl2.c (grokfield): Call pushdecl_class_level after setting the 2889 TYPE_NAME, not before. 2890 2891Sun Feb 5 02:50:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2892 2893 * call.c (convert_harshness): Don't call sorry here. Don't allow 2894 conversions between function pointer types if pedantic. 2895 2896 * pt.c (overload_template_name): Pass globalize=1 to xref_tag. 2897 2898 * lex.c (cons_up_default_function): Use the full name for the return 2899 type of op=. 2900 2901 * decl.c (set_nested_typename): Don't worry about anonymous types, 2902 as they already have a unique name. 2903 (pushdecl): Remove redundant set_nested_typename 2904 (xref_tag): Split out base handling into xref_basetypes. 2905 2906 * cp-tree.h (TYPE_INCOMPLETE): New macro; TEMPLATE_TYPE_PARMs are 2907 not considered incomplete even though their definition is unknown. 2908 2909 * decl.c (xref_defn_tag): Lose. 2910 (xref_tag): xref_next_defn = ! globalize. 2911 (pushdecl): Don't set DECL_NESTED_TYPENAME on artificial decls. The 2912 ones that should have it set will have it set by pushtag. 2913 (pushdecl_class_level): Ditto. 2914 (pushtag): Tidy up a bit. 2915 (set_nested_typename): Push a decl for the nested typename from 2916 here, rather than from xref_defn_tag. 2917 2918 * parse.y (do_xref): Lose. 2919 (named_class_head): If we see 'class foo:' we know it's a 2920 definition, so don't worry about base lists for non-definitions. 2921 2922 * pt.c (push_template_decls): Template parm decls are artificial. 2923 2924 * decl.c (duplicate_decls): Restore check for qualifier 2925 disagreement for non-functions. 2926 (decls_match): Remove check for qualifier disagreement. 2927 2928Fri Feb 3 14:58:58 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2929 2930 * decl.c (grok_reference_init): Convert initializer from 2931 reference. 2932 * typeck.c (convert_for_initialization): Ditto. 2933 2934 * decl.c (duplicate_decls): Propagate DECL_NESTED_TYPENAME. 2935 2936 * cvt.c (cp_convert): Don't convert to the same class type by just 2937 tacking on a NOP_EXPR. 2938 (convert_to_reference): Use comp_target_types instead of comptypes 2939 so that we don't allow conversions two levels down. 2940 2941Thu Feb 2 15:07:58 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2942 2943 * class.c (build_vbase_path): Bash types to make the backend happy. 2944 * cvt.c (build_up_reference): Bash the types bashed by 2945 build_vbase_path to be reference types instead of pointer types. 2946 (convert_to_reference): Ditto. 2947 2948 * typeck.c (build_c_cast): Don't strip NOPs if we're converting to a 2949 reference type. 2950 2951 * parse.y (structsp): Put back error for 'struct B: public A;'. 2952 2953Wed Feb 1 23:02:06 1995 Mike Stump <mrs@cygnus.com> 2954 2955 * except.c: Add support for mips systems that don't define __mips 2956 but do define mips, like Ultrix. 2957 2958Wed Feb 1 22:39:07 1995 Mike Stump <mrs@cygnus.com> 2959 2960 * except.c: Add support for exception handling on the Alpha. 2961 2962Wed Feb 1 10:12:14 1995 Mike Stump <mrs@cygnus.com> 2963 2964 * decl2.c (finish_file): Fix bug in Jan 31st change. 2965 2966Tue Jan 31 16:59:15 1995 Gerald Baumgartner (gb@lorenzo.cs.purdue.edu) 2967 2968 * sig.c (build_signature_pointer_or_reference_type): Don't set 2969 IS_AGGR_TYPE for signature pointers/reference so expand_default_init 2970 doesn't expect to find a copy constructor. 2971 * call.c (build_method_call): Treat signature pointers/reference 2972 as if IS_AGGR_TYPE were set. 2973 2974Tue Jan 31 13:28:56 1995 Mike Stump <mrs@cygnus.com> 2975 2976 * gc.c (get_typeid): Pawn off error messages to build_t_desc. 2977 (build_t_desc): Inform the user here if they try and build 2978 with -frtti and don't include <typeinfo.h>. 2979 2980 * decl2.c (finish_prevtable_vardecl): Support rescanning. 2981 (finish_file): Move finish_prevtable_vardecl up to before the global 2982 initializers are done as tdecls are initialized in the global 2983 initializer. Also Pick up any new tdecls or vtables needed by 2984 synthesized methods. 2985 2986 * class.c (finish_struct): Simplify. We have to do rtti scanning at 2987 end, so we might as well do all of it there. 2988 2989Tue Jan 31 05:35:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> 2990 2991 * call.c (build_method_call): Fix -fthis-is-variable for 32-bit 2992 targets, too. 2993 2994Tue Jan 31 00:11:04 1995 Mike Stump <mrs@cygnus.com> 2995 2996 * decl2.c (finish_prevtable_vardecl): New routine, mostly split from 2997 finish_vtable_vardecl. It has the first half functionality from 2998 that routine. 2999 * decl2.c (finish_vtable_vardecl): Update to not include stuff not 3000 in finish_prevtable_vardecl. 3001 * decl2.c (finish_file): Call finish_prevtable_vardecl. 3002 * gc.c (build_generic_desc): Allow it to be called when not at the 3003 global binding layer, but behave as if we were. 3004 (build_t_desc): Rearrange a bit so that it really works and is 3005 easier to follow. 3006 * class.c (finish_struct): Don't decide on tdecls here, as we have 3007 to wait until the end of the file in general to decide whether or 3008 not they come out. 3009 3010Mon Jan 30 01:00:40 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3011 3012 * init.c (build_delete): Check access to operator delete before 3013 calling the destructor. 3014 * method.c (build_opfncall, DELETE_EXPR): build_method is allowed to 3015 return error_mark_node. 3016 * call.c (build_method_call): Use the one-argument op delete even if 3017 it's an error. 3018 3019 * init.c (build_new): Fix -fthis-is-variable support. 3020 * call.c (build_method_call): Ditto. 3021 3022 * call.c (convert_harshness): Make conversion from a pointer to bool 3023 worse than conversion to another pointer. 3024 3025Sat Jan 28 16:46:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3026 3027 * init.c (build_new): Check new return value if -fcheck-new. 3028 3029 * lex.c (check_newline): Clear end_of_file when we're done, too. 3030 3031Sat Jan 28 10:38:39 1995 Mike Stump <mrs@cygnus.com> 3032 3033 * decl2.c (finish_vtable_vardecl): Make rtti TD tables follow 3034 vtables whereever they go. 3035 3036 * gc.c (build_t_desc): Remove old way of setting it up, as it wasn't 3037 right. 3038 3039Sat Jan 28 09:10:44 1995 Mike Stump <mrs@cygnus.com> 3040 3041 * decl2.c (finish_vtable_vardecl): Now set the 3042 interface/implementation of vtables on the first virtual function, 3043 if one exists, otherwise we use the old method. This is a major win 3044 in terms of cutting down the size of objects and executables in 3045 terms of text space and data space. Now most of the savings that 3046 #pragma interface/implementation gives is automatic in a fair number 3047 of cases. 3048 3049Sat Jan 28 04:57:33 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3050 3051 * decl.c (grokdeclarator): Discard the template parameters in a 3052 template constructor declaration so that the function is always 3053 named constructor_name (ctype). 3054 3055 * lex.c (check_newline): Use ungetc to put back the character before 3056 calling HANDLE_PRAGMA. 3057 3058Fri Jan 27 17:23:47 1995 Mike Stump <mrs@cygnus.com> 3059 3060 * decl2.c (check_classfn): If the cname is T<int> and fn_name is T, 3061 make sure we still match them. 3062 3063Fri Jan 27 16:32:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3064 3065 * parse.y: Add END_OF_LINE token. 3066 3067 * lex.c (check_newline): Set linemode when we see a # directive, and 3068 unset it when we're done. Turn all 'return's into 'goto skipline'. 3069 Fix all uses of '\n', since we won't see it anymore. Put back the 3070 character we read before checking for a sysv or target pragma. 3071 (real_yylex): If we see an EOF in linemode, return END_OF_LINE. 3072 (handle_sysv_pragma): Don't look at the input stream; quit when we 3073 see an END_OF_LINE token. 3074 3075 * input.c (getch): Return EOF if we're in line mode and at the end 3076 of a line. 3077 (put_back): Don't put back an EOF. 3078 3079Thu Jan 26 19:26:34 1995 Mike Stump <mrs@cygnus.com> 3080 3081 * except.c (expand_throw): Do the newing of the exception object 3082 before we load the type descriptor or the address so that we don't 3083 wipe any of the values out. 3084 3085Thu Jan 26 19:20:00 1995 Mike Stump <mrs@cygnus.com> 3086 3087 * except.c (init_exception_processing): Don't use r12 on the rs6000. 3088 3089Tue Jan 24 16:36:31 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3090 3091 * decl.c (grokparms): Don't try to build up a reference at this point. 3092 3093 * typeck2.c (build_functional_cast): Don't assume that a NOP_EXPR 3094 will suffice to convert from integer_zero_node. 3095 3096Wed Jan 25 15:02:09 1995 David S. Miller (davem@nadzieja.rutgers.edu) 3097 3098 * class.c (instantiate_type): Change error message text. 3099 * typeck2.c (store_init_value): Likewise. 3100 3101Mon Jan 23 21:57:14 1995 Mike Stump <mrs@cygnus.com> 3102 3103 * pt.c (tsubst): When we copy a node, don't forget to copy 3104 TREE_CHAIN, we use it later. 3105 3106Mon Jan 23 03:33:47 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3107 3108 * typeck.c (convert_for_assignment): Initialize variable before use. 3109 3110Fri Jan 20 01:17:59 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3111 3112 * g++.c (main): Link with both libstdc++ and libg++ if called as 3113 something ending with "g++", otherwise only libstdc++. Move -lm to 3114 the end of the line. 3115 3116Thu Jan 19 15:43:11 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3117 3118 * call.c (build_method_call): Don't mess with 'this' before calling 3119 compute_conversion_costs. 3120 3121Wed Jan 18 15:40:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3122 3123 * search.c (get_matching_virtual): Give line number for previous 3124 declaration. 3125 3126 * call.c (convert_harshness): Handle conversions to references 3127 better. 3128 3129 * cvt.c (build_up_reference): OK, handle {MIN,MAX}_EXPR *properly*. 3130 3131Wed Jan 18 15:21:38 1995 Mike Stump <mrs@cygnus.com> 3132 3133 * class.c (instantiate_type): Use DECL_CHAIN to walk lists instead, 3134 as the TREE_CHAIN for methods will take us to the next differently 3135 named function, DECL_CHAIN won't. 3136 3137Wed Jan 18 14:26:59 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3138 3139 * tree.c (lvalue_p): Handle {MIN,MAX}_EXPR. 3140 3141 * decl2.c (lang_decode_option): -Wall implies -Wparentheses. 3142 warn_parentheses defaults to 0. 3143 3144 * decl.c (grokparms): Put back call to require_instantiated_type. 3145 3146Tue Jan 17 19:56:15 1995 Mike Stump <mrs@cygnus.com> 3147 3148 * except.c (exception_section): Use the data section on the rs6000. 3149 Change calling convention for named_section. 3150 3151Wed Jan 17 18:20:57 1994 Fergus Henderson <fjh@munta.cs.mu.oz.au> 3152 3153 * cp-tree.h : Make if (x=0) warn with wall 3154 * parse.y : Make if (x=0) warn with wall 3155 3156Tue Jan 17 14:12:00 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3157 3158 * decl.c (BOOL_TYPE_SIZE): BITS_PER_WORD if SLOW_BYTE_ACCESS, 3159 BITS_PER_UNIT otherwise. 3160 3161 * search.c (get_matching_virtual): Don't check the binfo if the 3162 types are the same. 3163 3164 * cvt.c (cp_convert): Just call truthvalue_conversion to convert to 3165 bool. 3166 3167Mon Jan 16 13:28:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3168 3169 * various: Use boolean_type_node, boolean_true_node, 3170 boolean_false_node. 3171 3172 * search.c (get_matching_virtual): Allow covariant returns that 3173 don't require pointer adjustment. 3174 3175 * typeck.c (build_conditional_expr): Don't call default_conversion 3176 on ifexp. 3177 3178 * cvt.c (build_up_reference): Handle MIN_EXPR and MAX_EXPR. 3179 3180 * decl.c (grokdeclarator): Upgrade warning about &const to pedwarn. 3181 3182Sun Jan 15 22:17:32 1995 dcb@lovat.fmrco.COM (David Binderman) 3183 3184 * pt.c (do_function_instantiation): Free targs once we're done. 3185 3186Sun Jan 15 22:17:32 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3187 3188 * decl.c (BOOL_TYPE_SIZE): Defaults to BITS_PER_WORD. 3189 (init_decl_processing): Use BOOL_TYPE_SIZE instead of CHAR_TYPE_SIZE 3190 for bool. 3191 3192Sat Jan 14 05:33:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3193 3194 * decl2.c (finish_file): We need to mess up if there are any 3195 variables in the list, not just if there is one with a constructor. 3196 3197Fri Jan 13 14:42:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3198 3199 * decl.c (duplicate_decls): Propagate DECL_STATIC_{CON,DE}STRUCTOR. 3200 (finish_function): Handle DECL_STATIC_{CON,DE}STRUCTOR. 3201 (finish_function): Trust rest_of_compilation. 3202 3203 * decl2.c (finish_file): Also call functions designated as static 3204 constructors/destructors. 3205 3206 * decl.c (grokdeclarator): Allow access decls of operator functions. 3207 (grokparms): Only do convert_for_initialization if the initializer 3208 has a type. 3209 (duplicate_decls): Put back push_obstacks_nochange call. 3210 3211 * lex.c (real_yylex): Downgrade complaint about the escape sequence 3212 being too large from pedwarn to warning. 3213 3214 * decl.c (grokdeclarator): Don't complain about long long in system 3215 headers. 3216 3217 * lex.c (real_yylex): Handle digraphs. 3218 3219Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3220 3221 * decl.c (init_decl_processing): -f{no-,}strict-prototype only 3222 affects C linkage declarations now. 3223 3224 * typeck.c (comp_target_types): Grok simple contravariant conversions. 3225 (common_type): t1 and t2 are interchangeable. 3226 3227 * various: Test return value of comp_target_types differently in 3228 different places; it now returns -1 for a contravariant conversion 3229 (which is fine in symmetric cases). 3230 3231 (common_type): Prefer long double to double even when 3232 they have the same precision. 3233 3234 * decl.c (grokparms): Call convert_for_initialization to check 3235 default arguments. 3236 3237 * init.c (build_new): void_type_node has a size (of 0). 3238 3239 * decl.c (decls_match): Also check for agreement of TREE_READONLY 3240 and TREE_THIS_VOLATILE. 3241 (push_class_level_binding): Properly handle shadowing of 3242 nested tags by fields. 3243 3244 * search.c (dfs_pushdecls): Ditto. 3245 3246 * decl2.c (finish_file): Don't second-guess self-initialization. 3247 3248 * cvt.c (convert_to_reference): Work with expr directly, rather than 3249 a copy. 3250 3251 * decl.c (push_overloaded_decl): Only shadow artificial TYPE_DECLs. 3252 3253 * init.c (add_friend): Downgrade duplicate friend message from 3254 pedwarn to warning. 3255 3256 * decl.c (duplicate_decls): Push obstacks before calling common_type. 3257 3258Thu Jan 12 17:15:21 1995 Michael Ben-Gershon <mybg@cs.huji.ac.il> 3259 3260 * except.c (push_eh_entry): set LABEL_PRESERVE_P flag for 3261 exception table labels. 3262 (expand_start_all_catch): Ditto. 3263 (expand_leftover_cleanups): Ditto. 3264 (expand_end_catch_block): Ditto. 3265 * except.c (make_first_label): new function. 3266 (expand_start_all_catch): add a call to make_first_label() before 3267 using a label as a jump destination. 3268 (expand_end_all_catch): Ditto. 3269 (expand_leftover_cleanups): Ditto. 3270 (expand_end_catch_block): Ditto. 3271 (expand_builtin_throw): Ditto. 3272 (expand_throw): Ditto. 3273 * except.c: Add ARM processor support for exception handling. 3274 3275Thu Jan 12 12:17:24 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3276 3277 (complete_array_type): Copy code from C frontend. 3278 3279 * lex.c (real_yylex): Don't multiply the length of a wide string 3280 literal by WCHAR_BYTES. 3281 3282 * decl.c (pushdecl): Check for redeclaration of wchar_t here. 3283 (duplicate_decls): Instead of here. 3284 (define_label): Complain about a label named wchar_t. 3285 (grokdeclarator): Complain about declarations of 3286 operator-function-ids as non-functions. 3287 3288 * typeck.c (unary_complex_lvalue): Also wrap prefix -- and ++ in 3289 COMPOUND_EXPRs. 3290 (build_unary_op): Wrap unary plus in a NON_LVALUE_EXPR. 3291 3292 * lex.c (real_yylex): Don't skip whitespace when reading the next 3293 character after ->. 3294 3295Wed Jan 11 16:32:49 1995 Mike Stump <mrs@cygnus.com> 3296 3297 * except.c: Allow cc1plus to be built with native compiler on rs6000. 3298 (expand_start_all_catch): Add assemble_external calls for various 3299 routines we call. 3300 (expand_leftover_cleanups): Ditto. 3301 (expand_start_catch_block): Ditto. 3302 (do_unwind): Ditto. 3303 (expand_builtin_throw): Ditto. 3304 3305Wed Jan 11 01:05:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3306 3307 * decl.c (pushtag): Only look for a previous decl in the current 3308 binding level. Use explicit global scope in DECL_NESTED_TYPENAME. 3309 3310 * gxx.gperf: Add __signature__ and __sigof__ keywords. 3311 3312 * decl2.c (lang_decode_option): -ansi does not set flag_no_asm. It 3313 does set flag_no_gnu_keywords and flag_operator_names. 3314 3315 * lex.c (init_lex): 'overload' is not a keyword unless -traditional. 3316 Unset extension keywords if -fno-gnu-keywords. 3317 Allow operator names ('bitand') if -foperator-names. 3318 Never unset 'asm'; -fno-asm only affects 'typeof'. 3319 3320 * decl.c (lookup_name_real): The got_object special lookup only 3321 applies to types. 3322 3323Tue Jan 10 18:07:51 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3324 3325 * spew.c (yylex): Also use DECL_NESTED_TYPENAME if got_object is set. 3326 3327 * parse.y (primary): Unset got_object after all rules that use the 3328 'object' nonterminal. 3329 (object): Set got_object. 3330 3331 * lex.h: Declare got_object. 3332 3333 * decl.c (lookup_name_real): Also lookup names in the context of an 3334 object specified. 3335 3336Tue Jan 10 14:30:30 1995 Mike Stump <mrs@cygnus.com> 3337 3338 * typeck.c (get_member_function_from_ptrfunc): Use ptrdiff_type_node 3339 for things that have to be added to pointers, not size_type. Cures 3340 problems with pointer to members on Alphas. 3341 (build_binary_op_nodefault): Ditto. 3342 (get_delta_difference_: Ditto. 3343 (build_ptrmemfunc): Ditto. 3344 3345Tue Jan 10 01:49:25 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3346 3347 * decl.c (pushtag): Stick the new decl in TYPE_NAME before pushing 3348 it. 3349 3350 * typeck.c (build_component_ref): Don't build up a COMPONENT_REF 3351 when dealing with overloaded member functions; just act like 3352 build_offset_ref. 3353 (commonparms): Remove misleading comment. 3354 3355 * decl.c (duplicate_decls): Complain about repeated default 3356 arguments here. 3357 (redeclaration_error_message): Instead of here. 3358 (pushdecl): Complain about missing default arguments here. 3359 (grokparms): Instead of here. 3360 (lookup_name_current_level): Also match on DECL_ASSEMBLER_NAME. 3361 (grok_reference_init): Do not complain about missing initializer if 3362 declared 'extern'. 3363 3364 * search.c (lookup_field): Don't return a TYPE_DECL if there is a 3365 function alternative and want_type is not set. 3366 3367Mon Jan 9 18:16:23 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3368 3369 * decl.c (pushtag): Don't set TYPE_NAME to an identifier. Do push 3370 the decl when the type has no TYPE_NAME. 3371 (lookup_nested_type): Don't assume that type has TYPE_NAME set. 3372 (lookup_name_real): Call lookup_field with want_type = 3373 prefer_type. 3374 3375 * search.c (lookup_field): Handle want_type properly in the presence 3376 of fields with the same name. 3377 3378 * decl.c (set_nested_typename): Set nested name for file-scope types 3379 to include leading ::. 3380 (pushdecl): Set the nested typename if the decl doesn't have one, 3381 rather than if the type's canonical decl doesn't have one. 3382 3383Mon Jan 9 16:48:16 1995 Steve Chamberlain (sac@jonny.cygnus.com) 3384 3385 * typeck.c (pointer_int_sum): Use offset size when calculating 3386 index expression. 3387 3388Mon Jan 9 03:44:33 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3389 3390 * typeck.c (convert_for_assignment): Complain about contravariance 3391 violation here. 3392 (comp_target_types): Instead of here. 3393 (build_unary_op): resolve_offset_ref before checking for a valid 3394 type. 3395 3396 * spew.c (yylex): Decrement looking_for_typename after we see a 3397 _DEFN. 3398 3399 * decl.c (pushdecl): Don't install an artificial TYPE_DECL in 3400 IDENTIFIER_LOCAL_VALUE if we already have a decl with that name. 3401 3402 * typeck.c (convert_for_assignment): Converting pointers to bool 3403 does not need a cast. 3404 3405Sun Jan 8 18:16:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3406 3407 * class.c (instantiate_type): Initialize nsubsts parm. 3408 3409 * pt.c (do_function_instantiation): Ditto. 3410 3411Sat Jan 7 14:37:05 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3412 3413 * pt.c (tsubst): Use TREE_STATIC instead of DECL_INLINE && 3414 DECL_SAVED_INSNS to determine whether or not we've seen a definition 3415 of this function. 3416 (instantiate_template): Ditto. 3417 3418 * call.c (convert_harshness): Allow const reference binding when 3419 called from the overloading code, but not when called from 3420 can_convert (since it isn't a conversion). 3421 (convert_harshness): Put back some disabled code. 3422 3423Fri Jan 6 14:10:57 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3424 3425 * call.c (convert_harshness): There is no implicit conversion from 3426 void* to other pointer types (unless the parameter is (void*)0). 3427 (convert_harshness): Non-lvalues do not convert to reference types. 3428 3429 * class.c (finish_struct_methods): Still set 3430 TYPE_HAS_{INT,REAL}_CONVERSION. 3431 3432 * call.c (can_convert): Don't use aggregate initialization. 3433 3434 * cp-tree.h: Declare lookup_conversions. 3435 3436Thu Jan 5 21:08:00 1995 Mike Stump <mrs@cygnus.com> 3437 3438 * parse.y (simple_stmt): Fix duplicate case value error messages to 3439 be more readable. 3440 3441Wed Jan 4 16:44:19 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3442 3443 * cvt.c (build_type_conversion): Total rewrite to use 3444 convert_harshness instead of reproducing conversion logic here. Now 3445 much shorter. 3446 3447 * call.c (convert_harshness): Support conversions to bool. 3448 (can_convert): Checks whether a conversion is less harsh 3449 than USER_CODE, for build_type_conversion. 3450 3451 * search.c (add_conversions): Function for passing to dfs_walk which 3452 adds all the type conversion operators in the current type to a list. 3453 (lookup_conversions): Calls dfs_walk with add_conversions and return 3454 the list. 3455 (dfs_walk): Don't require a qfn. 3456 3457 * cp-tree.h: Lose CLASSTYPE_CONVERSIONS hackery. 3458 (CLASSTYPE_FIRST_CONVERSION): Points to elt 1 of CLASSTYPE_METHOD_VEC. 3459 3460 * class.c (finish_struct_bits): Lose CLASSTYPE_CONVERSIONS hackery. 3461 (grow_method): A separate function for building onto the growing 3462 method vector. 3463 (finish_struct_methods): Use it. Put all type conversion operators 3464 right after the constructors. Perhaps we should sort the methods 3465 alphabetically? 3466 3467Mon Jan 2 14:42:58 1995 Jason Merrill <jason@phydeaux.cygnus.com> 3468 3469 * call.c (build_method_call): Lose another misleading shortcut. 3470 3471Fri Dec 30 17:57:30 1994 Mike Stump <mrs@cygnus.com> 3472 3473 * gc.c (build_bltn_desc): Handle bool as a built-in type. 3474 3475Fri Dec 30 14:20:21 1994 Mike Stump <mrs@cygnus.com> 3476 3477 * tree.c (layout_vbasetypes): Ensure that we don't loose alignment 3478 on the complete type because of small virtual bases. 3479 3480Fri Dec 30 12:22:29 1994 Mike Stump <mrs@cygnus.com> 3481 3482 * decl.c (n_incomplete): Bump n_incomplete up to int to match C 3483 front end. 3484 (pushdecl): Also count decls pushed that are of a type being defined 3485 as incomplete things. 3486 * class.c (finish_struct): Move hack_incomplete_structures up to 3487 just after we set it as not being defined, so that the decls we 3488 build for RTTI don't count as incomplete. 3489 3490Thu Dec 29 18:20:57 1994 Mike Stump <mrs@cygnus.com> 3491 3492 * pt.c (tsubst): Fix problem with defining constructors in templated 3493 classes with virtual bases. 3494 3495Wed Dec 28 08:31:00 1994 Mike Stump <mrs@cygnus.com> 3496 3497 * parse.y (TYPEID): Strip top-level cv-qualifiers on typeid 3498 expressions. 3499 * gc.c (build_typeid): Ditto. 3500 3501Thu Dec 22 17:26:33 1994 Mike Stump <mrs@cygnus.com> 3502 3503 * cvt.c (build_up_reference): Fix breakage introduced on Nov 29, 3504 don't assert on complex AGGR inits. 3505 3506Thu Dec 22 14:32:31 1994 Mike Stump <mrs@cygnus.com> 3507 3508 * method.c (build_overload_value): Handle pointer to members as 3509 template arguments. 3510 3511Thu Dec 22 13:09:07 1994 Mike Stump <mrs@cygnus.com> 3512 3513 * typeck.c (unary_complex_lvalue): Don't call sorry if we know how 3514 to do take the address of a data member for a pointer to data 3515 member. 3516 3517Thu Dec 22 10:04:19 1994 Mike Stump <mrs@cygnus.com> 3518 3519 * decl.c (grokdeclarator): Use the typedef name for linkage if the 3520 type doesn't otherwise have a name. 3521 3522 * decl2.c (grokfield): Ditto. 3523 3524 * class.c (finish_struct): Since we reuse the TYPE_DECL for the 3525 DECL_NAME of enums, structs and classes, we have to avoid trying to 3526 put it in the TYPE_FIELDS again. 3527 3528Wed Dec 21 11:07:05 1994 Mike Stump <mrs@cygnus.com> 3529 3530 * decl2.c (check_classfn): Ignore this parameter on static functions 3531 when checking to see if we match. 3532 3533Tue Dec 20 17:47:02 1994 Mike Stump <mrs@cygnus.com> 3534 3535 * typeck.c (unary_complex_lvalue): Handle address of non-left most 3536 pointers to members by calling get_delta_difference. 3537 3538Mon Dec 19 22:40:53 1994 Mike Stump <mrs@cygnus.com> 3539 3540 * decl2.c (check_classfn): Don't use decls_match yet, as it modifies 3541 static functions to early. 3542 3543Thu Dec 19 22:37:48 1994 Mike Stump <mrs@cygnus.com> 3544 3545 * method.c (make_thunk): Handle encoding of positive thunk offsets. 3546 3547Sat Dec 17 13:29:50 1994 Doug Evans <dje@canuck.cygnus.com> 3548 3549 * Make-lang.in (.PHONY): Tell GNU make C++ and c++ are phony targets. 3550 3551Thu Dec 15 16:32:12 1994 Mike Stump <mrs@cygnus.com> 3552 3553 * decl2.c (check_classfn): Use decls_match to check if this has 3554 already been declared, as the DECL_ASSEMBLER_NAME may have been 3555 changed via asm("new_name"). 3556 * decl.c (decls_match): Make public. 3557 3558Thu Dec 15 15:17:55 1994 Mike Stump <mrs@cygnus.com> 3559 3560 * *.[chy] (expand_aggr_init) Add fourth argument to handle 3561 distinction between = init and (init) style of initializations. 3562 * *.[chy] (finish_decl): Add fifth argument to to handle 3563 distinction between = init and (init) style of initializations. 3564 3565Tue Dec 13 19:16:05 1994 Mike Stump <mrs@cygnus.com> 3566 3567 Fix some random `explicit' bugs. 3568 3569 * cvt.c (convert_to_reference): Add third parameter to 3570 convert_force. 3571 (convert_force): Ditto. 3572 * call.c (build_method_call): Ditto. 3573 * decl2.c (setup_vtbl_ptr): Ditto. 3574 * init.c (expand_virtual_init): Ditto. 3575 (build_member_call): Ditto. 3576 (build_delete): Ditto. 3577 (build_vbase_delete): Ditto. 3578 * typeck.c (build_component_addr): Ditto. 3579 (build_c_cast): Ditto. 3580 (build_modify_expr): Ditto. 3581 * cp-tree.h (CONV_NONCONVERTING): Ditto. Add so that we can 3582 distinguish the context in which the conversion appears. Add thrid 3583 argument to build_c_cast. 3584 * cvt.c (cp_convert): Pass whether or not we want to consider 3585 non-converting constructors down to build_method_call. 3586 * decl2.c (reparse_absdcl_as_casts): Add third argument to 3587 build_c_cast. 3588 * gc.c (build_m_desc): Ditto. 3589 * init.c (build_new): Ditto. 3590 * parse.y (expr_no_commas): Ditto. 3591 (primary): Ditto. 3592 * typeck.c (build_x_function_call): Ditto. 3593 (build_static_cast): Ditto. 3594 (build_reinterpret_cast): Ditto. 3595 (build_const_cast): Ditto. 3596 (build_c_cast): Ditto. 3597 (build_ptrmemfunc): Ditto. 3598 * typeck2.c (build_functional_cast): Ditto. 3599 * init.c (expand_aggr_init): Added LOOKUP_ONLYCONVERTING to 3600 expand_aggr_init_1 as inits are converted to the destination type. 3601 3602Tue Dec 13 16:18:57 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3603 3604 * Make-lang.in (cc1plus): Depends on c-pragma.o. 3605 3606 * Makefile.in (OBJ{DEP,}S): Add ../c-pragma.o. 3607 3608 * lex.c (check_newline): If the #pragma is not recognized by g++, 3609 try machine-specific ones too. 3610 (handle_sysv_pragma): Copied from c-lex.c. 3611 3612Mon Dec 12 23:53:06 1994 Mike Stump <mrs@cygnus.com> 3613 3614 * except.c (expand_throw): Fix Dec 6th change, build_new likes a 3615 reference better. 3616 3617Mon Dec 12 18:01:00 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3618 3619 * typeck.c (build_binary_op): Lose checks on TYPE_PTRMEMFUNC_P with 3620 IS_AGGR_TYPE, since now they will not both be set on the same type. 3621 3622 * pt.c (do_pending_expansions): Don't clear TREE_PUBLIC on 3623 instantiations controlled by -fexternal-templates. 3624 3625 * decl.c (duplicate_decls): Don't complain about different values of 3626 __attribute__ ((const)) and ((noreturn)). 3627 3628Fri Dec 9 18:17:37 1994 Doug Evans <dje@cygnus.com> 3629 3630 * Makefile.in (BISONFLAGS): Delete --yacc. 3631 (PARSE_H): Depend on $(PARSE_C), for parallel makes. 3632 (PARSE_C): Undo last patch. 3633 3634Fri Dec 2 10:44:36 1994 Mike Stump (mrs@wombat.gnu.ai.mit.edu) 3635 3636 * Makefile.in (BISONFLAGS): Add --yacc so that output winds up in 3637 y.tab.c. 3638 3639Thu Dec 8 17:39:46 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3640 3641 * decl.c (finish_decl): Don't call obscure_complex_init for decls 3642 of indeterminate size. 3643 3644Wed Dec 7 16:49:22 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3645 3646 * decl.c (obscure_complex_init): Function to tweak the decl to 3647 prevent expand_decl from tring to initialize it. 3648 (finish_decl): Use it rather than writing the same code in three 3649 different places. 3650 3651 * parse.y (bad_parm): Stop trying to support parms without types. 3652 3653Wed Dec 7 12:06:56 1994 Mike Stump <mrs@cygnus.com> 3654 3655 * decl2.c (grokfield): Make asm specs on static member functions 3656 work. 3657 3658Tue Dec 6 15:43:20 1994 Mike Stump <mrs@cygnus.com> 3659 3660 * except.c (expand_throw): Make a copy of the thrown object. 3661 3662Tue Dec 6 14:16:34 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3663 3664 * parse.y: : has lower precedence than =. 3665 3666Tue Dec 6 12:46:17 1994 Mike Stump <mrs@cygnus.com> 3667 3668 * decl.c (pushdecl): Use DECL_NAME of VAR_DECLs to avoid namespace 3669 manglings. 3670 (grokvardecl): Add namespace into variable name. 3671 3672Tue Dec 6 11:26:55 1994 Mike Stump <mrs@cygnus.com> 3673 3674 * decl2.c (current_namespace_id): New routine to transform a simple 3675 name into a name in a namespace. 3676 * decl.c (grokdeclarator): Use it. 3677 * decl2.c (get_namespace_id): Find the name of the current 3678 namespace. 3679 (push_namespace, pop_namespace): Complete out missing 3680 functionality. 3681 3682Mon Dec 5 17:11:51 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3683 3684 * class.c (finish_struct): Don't use LONG_LONG_TYPE_SIZE, as it may 3685 not be defined. Fix warning message for enums and restore warning 3686 for non-enums. 3687 3688 * decl2.c (push_namespace): Dummy function. 3689 (pop_namespace): Ditto. 3690 (do_namespace_alias): Ditto. 3691 (do_using_decl): Ditto. 3692 (do_using_directive): Ditto. 3693 3694 * parse.y: New token NSNAME for namespace names. 3695 (extdef): Add namespace, using definitions. 3696 (using_decl): New rule for using declarations. 3697 (any_id): New rule for identifiers with any degree of scoping. 3698 (identifier): Add NSNAME. 3699 (notype_identifier): Ditto. 3700 (component_decl): Add using_decl. 3701 (nested_name_specifier): Add NSNAME SCOPE. 3702 3703 * typeck.c (convert_for_assignment): Handle conversions between 3704 enums and bool. 3705 3706 * decl.c (duplicate_decls): Only propagate DECL_MAIN_VARIANT on 3707 FUNCTION_DECLs. 3708 3709Mon Dec 5 13:03:16 1994 Mike Stump <mrs@cygnus.com> 3710 3711 * class.c (finish_struct): Give an error if one tries to declare a 3712 bit-field's size greater than a long long, as the backend will dump. 3713 It is not an error to declare an enum bit-field greater than its 3714 precision. Warn if an enum bit-field is too small to hold all 3715 its values. 3716 3717Mon Dec 5 11:41:50 1994 Mike Stump <mrs@cygnus.com> 3718 3719 * typeck.c (convert_for_assignment): Use cp_convert instead of 3720 convert so that we don't get static casts. 3721 3722Sun Dec 4 11:59:01 1994 Mike Stump <mrs@cygnus.com> 3723 3724 * cvt.c (cp_convert): Don't complain about int->enum conversion if 3725 we are doing static casts. 3726 3727Fri Dec 2 18:32:41 1994 Mike Stump <mrs@cygnus.com> 3728 3729 * error.c (dump_expr): Do something more intelligent with SAVE_EXPRs 3730 when dumping expressions in error messages. 3731 3732Fri Dec 2 17:04:27 1994 Mike Stump <mrs@cygnus.com> 3733 3734 * gc.c (build_dynamic_cast): Change interface to libg++, ensure that 3735 the return type is the right type, and make references work. 3736 3737Fri Dec 2 16:36:43 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3738 3739 * decl.c (poplevel): Don't be confused by function-scope 3740 declarations of non-nested functions. 3741 (duplicate_decls): Propagate DECL_MAIN_VARIANT. 3742 (pushdecl): Use duplicate_decls to copy info from old decl into new 3743 function-scope one rather than doing it here. 3744 3745 * decl2.c (mark_inline_for_output): Deal with the DECL_MAIN_VARIANT 3746 of this decl, in case this is a function-scope declaration. 3747 3748 * decl.c (finish_enum): Make sure that the type has the right 3749 precision when we call fixup_*_type. 3750 3751Tue Nov 29 19:12:07 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3752 3753 * cvt.c (build_up_reference): Strip superfluous NOP_EXPRs; we do 3754 want to build up references to rvalues if possible. 3755 (cp_convert): Stick on a NOP_EXPR when converting to the same type. 3756 3757Tue Nov 29 11:28:59 1994 Mike Stump <mrs@cygnus.com> 3758 3759 * parse.y (maybe_raises): Handle throw (). 3760 * parse.y (ansi_raise_identifier): grok type-ids in exception 3761 specifications. 3762 * tree.c (build_exception_variant): Use list compare to check if 3763 two exception specifications match. 3764 * decl.c (duplicate_decls, bad_specifiers): Enhance wording on error 3765 messages. 3766 * call.c (build_method_call): Remove TREE_RAISES. 3767 * cvt.c (convert_to_aggr): Ditto. 3768 * typeck.c (build_function_call_real, convert_arguments): Ditto. 3769 * init.c (expand_aggr_init_1): Ditto. 3770 3771Tue Nov 29 09:50:39 1994 Mike Stump <mrs@cygnus.com> 3772 3773 * except.c: Add support for m68k and mips exception handling 3774 support. 3775 3776Tue Nov 29 08:48:33 1994 Mike Stump <mrs@cygnus.com> 3777 3778 * except.c (expand_end_all_catch): Throw into outer context, if we 3779 fall off end of catch handlers. 3780 3781Mon Nov 28 16:44:41 1994 Mike Stump <mrs@cygnus.com> 3782 3783 * Makefile.in: Make is easier to decide where parse.[ch] will be 3784 built. 3785 3786Thu Nov 17 20:11:24 1994 Doug Evans <dje@cygnus.com> 3787 3788 * cp/Make-lang.in (CXX_INSTALL_NAME) Use program_transform_name. 3789 (GXX_INSTALL_NAME) Likewise. 3790 (CXX_CROSS_NAME) Use program_transform_cross_name. 3791 (GXX_CROSS_NAME) Likewise. 3792 (c++.install-man): Use program_transform_name on g++.1. 3793 (c++.uninstall): Likewise. 3794 3795Thu Nov 3 18:48:19 1994 Paul Eggert <eggert@twinsun.com> 3796 3797 * Makefile.in (spew.o, lex.o, pt.o): 3798 Depend on $(srcdir)/parse.h, not parse.h. 3799 3800Mon Nov 28 13:53:03 1994 Mike Stump <mrs@cygnus.com> 3801 3802 * parse.y (THROW): Fix precedence of throw expressions. 3803 3804Mon Nov 28 13:15:16 1994 Mike Stump <mrs@cygnus.com> 3805 3806 * typeck.c (build_unary_op): Allow promotions from bool to int on 3807 unary ~. 3808 3809Sun Nov 27 00:16:21 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3810 3811 * method.c (build_overload_name): Use DECL_ASSEMBLER_NAME for 3812 classes when appropriate. 3813 (build_overload_nested_name): When dealing with a function context, 3814 use ASM_FORMAT_PRIVATE_NAME to tweak the name of the function to 3815 avoid conflicts between local classes of the same name. 3816 3817Wed Nov 23 17:59:42 1994 Mike Stump <mrs@cygnus.com> 3818 3819 * gxx.gperf, parse.y, lex.h, hash.h, lex.c (init_lex), delc.c 3820 (duplicate_decls, grokdeclarator), cp-tree.h: Add support for 3821 `explicit'. 3822 * cvt.c (convert_to_reference, cp_convert, build_type_conversion_1, 3823 build_type_conversion): Use LOOKUP_ONLYCONVERTING in 3824 build_method_calls so that non-converting constructors are not used. 3825 * call.c (build_method_call): If we shouldn't use a non-converting 3826 constructor, then don't. 3827 3828Wed Nov 23 14:46:56 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3829 3830 * call.c (build_method_call): Don't try to synthesize methods yet. 3831 3832Tue Nov 22 12:45:21 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3833 3834 * pt.c (push_template_decls): Create CONST_DECLs for template 3835 constant parameters, not VAR_DECLs. 3836 3837Sat Nov 19 15:28:31 1994 Jim Wilson (wilson@chestnut.cygnus.com) 3838 3839 * typeck.c (build_binary_op_nodefault): Can shorten shift only if 3840 shift count is less than size in bits of arg0. 3841 3842Thu Nov 17 15:30:50 1994 Mike Stump <mrs@cygnus.com> 3843 3844 * gxx.gperf, hash.h, lex.c (init_lex, real_yylex), parse.y: Add new 3845 ANSI keywords and, and_eq, bitand, bitor, explicit, namespace, not, 3846 not_eq, or, or_eq, typename, using, xor, xor_eq to g++. Still need 3847 to add support for explicit, namespace, typename, and using, support 3848 for the rest is already in. 3849 3850Thu Nov 17 10:56:50 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3851 3852 * typeck2.c (build_m_component_ref): Check the basetype of the 3853 member pointer against the main variant of the object type. 3854 3855Mon Nov 14 14:21:52 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3856 3857 * cvt.c (convert_to_reference): Make sure that the original expr 3858 gets its type back when converting a reference. 3859 3860 * method.c (build_overload_name): Clear numeric_outputed_need_bar here. 3861 (build_decl_overload): Instead of here. 3862 3863Tue Nov 8 17:11:24 1994 Jason Merrill <jason@phydeaux.cygnus.com> 3864 3865 * cvt.c (cp_convert): Don't build a TARGET_EXPR if we're not in a 3866 function. 3867 3868 * typeck.c (convert_for_initialization): Handle initialization from 3869 a TARGET_EXPR. 3870 3871Sun Nov 6 01:34:24 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3872 3873 * pt.c (lookup_nested_type_by_name): Fix list-walking logic. 3874 (tsubst): When replacing a TEMPLATE_TYPE_PARM, propagate 3875 TYPE_READONLY and TYPE_VOLATILE from the argument. 3876 (unify): When unifying with a TEMPLATE_TYPE_PARM, remove cv-quals 3877 present in parm from arg. 3878 (type_unification): Strip REFERENCE_TYPE from the argument type. 3879 (unify): Don't strip REFERENCE_TYPE from the argument type. 3880 3881Sat Nov 5 22:42:15 1994 Greg McGary (gkm@magilla.cichlid.com) 3882 3883 * pt.c (do_type_instantiation): Check to see if there's a 3884 IDENTIFIER_TEMPLATE on a class before calling 3885 instantiate_member_templates(). 3886 3887Fri Nov 4 19:04:18 1994 Mike Stump <mrs@cygnus.com> 3888 3889 * gc.c (get_bad_cast_node): New routine to support compile time 3890 throws of bad_cast. 3891 * gc.c (build_dynamic_cast): Support throwing of bad_cast at compile 3892 time. 3893 3894Fri Nov 4 11:12:00 1994 Mike Stump <mrs@cygnus.com> 3895 3896 * except.c: Add hppa support. 3897 3898Fri Nov 4 10:50:50 1994 Mike Stump <mrs@cygnus.com> 3899 3900 * except.c: Add rs6000 support. 3901 3902Thu Nov 3 14:24:23 1994 Mike Stump <mrs@cygnus.com> 3903 3904 * except.c (do_unwind): Add i[34]86 support. 3905 3906Thu Nov 3 00:10:46 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3907 3908 * pt.c (do_pending_expansions): Unset TREE_PUBLIC on implicit 3909 instantiations. 3910 3911Wed Nov 2 15:08:24 1994 Kung Hsu (kung@mexican.cygnus.com) 3912 3913 * decl.c (finish_function): emit types used in method parameters 3914 into symbol table. 3915 3916Wed Nov 2 15:05:47 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3917 3918 * pt.c (process_template_parm): Allow pointer to member function 3919 template parameter types. 3920 (uses_template_parms): Handle pointer to member function 3921 CONSTRUCTORs. 3922 3923 * g++.c (main): Cast first argument of bzero to (char *). 3924 Pass -lstdc++ instead of -lg++ unless we are invoked as 'g++'. 3925 3926Mon Oct 31 14:50:48 1994 Kung Hsu (kung@mexican.cygnus.com) 3927 3928 * gc.c (build_dynamic_cast): rewrite to make it work. 3929 * class.c (finish_vtbls): build more vtables if flag_rtti is on. 3930 * class.c (modify_all_direct_vtables): ditto. 3931 * init.c (expand_direct_vtbls_init): expand more vtables if 3932 flag_rtti is on. 3933 * decl.c (init_type_desc): add default return. 3934 3935Tue Oct 25 17:13:09 1994 Kung Hsu (kung@mexican.cygnus.com) 3936 3937 * tree.c (debug_binfo): get rid of the initial size entry of 3938 vtable. 3939 * cp-tree.h: change flag_dossier to flag rtti, define type 3940 descriptor type nodes. 3941 * decl.c (init_type_desc): new function to initialize type 3942 descriptor type nodes. 3943 * decl.c (record_builtin_type): change flag_dossier to flag_rtti. 3944 * lex.c (init_lex): ditto. 3945 * decl.c : change variable flag_dossier to flag_rtti. 3946 * decl.c (duplicate_decls): get rid initial size entry of vtable. 3947 * decl.c (hack_incomplete_structures): take out assert 164. 3948 * search.c (get_abstract_virtuals_1): ditto. 3949 * search.c (dfs_init_vbase_pointers): change CLASSTYPE_DOSSIER to 3950 CLASSTYPE_RTTI. 3951 * parse.y: ditto. 3952 * class.c (prepare_fresh_vtable): for virtual bases, get right 3953 offset. 3954 * class.c (add_virtual_function): change flag_dossier to 3955 flag_rtti. 3956 * class.c (modify_one_vtable): modify the right rtti entry. 3957 * class.c (override_one_vtable): get rid of size entry. 3958 * class.c (finish_struct): change flag_dossier to flag_rtti, and 3959 build extra vtables, build type descriptors for polymorphic 3960 classes. 3961 * gc.c (build_headof): make headof() works correctly with new 3962 rtti. 3963 * gc.c (build_typeid): make this function work with new rtti. 3964 * gc.c (get_typeid): make this function work with new rtti. 3965 * gc.c (build_bltn_desc): new function for new rtti. 3966 * gc.c (build_user_desc): ditto. 3967 * gc.c (build_class_desc): ditto. 3968 * gc.c (build_ptr_desc): ditto. 3969 * gc.c (build_attr_desc): ditto. 3970 * gc.c (build_func_desc): ditto. 3971 * gc.c (build_ptmf_desc): ditto. 3972 * gc.c (build_ptmd_desc): ditto. 3973 * gc.c (build_t_desc): ditto. 3974 * gc.c : comment out old build_t_desc, build_i_desc, build_m_desc. 3975 3976Tue Oct 25 13:37:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3977 3978 * call.c (convert_harshness): Check for TREE_UNSIGNED differences 3979 after checking for integral conversions. 3980 3981Sun Oct 23 13:19:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3982 3983 * decl2.c: Declare flag_access_control. 3984 (struct lang_f_options): Add access-control. 3985 * expr.c (cplus_expand_expr, NEW_EXPR): Unset flag_access_control 3986 for the call to expand_aggr_init to copy the object out of the 3987 pcc_struct_return slot. 3988 * search.c (compute_access): if (!flag_access_control) return 3989 access_public. 3990 3991Fri Oct 21 00:32:54 1994 Jason Merrill (jason@phydeaux.cygnus.com) 3992 3993 * lex.c (cons_up_default_function): Don't try to defer method 3994 synthesis now. 3995 3996 * decl.c (init_decl_processing): Use __pure_virtual for abort_fndecl 3997 instead of abort, since the OSF/1 dynamic linker doesn't like to see 3998 relocation entries for abort. 3999 4000 * tree.c (array_type_nelts_total): Use sizetype, not 4001 integer_type_node. 4002 (array_type_nelts_top): Ditto. 4003 4004Thu Oct 20 15:48:27 1994 Mike Stump <mrs@cygnus.com> 4005 4006 * decl.c (grokdeclarator): Added handling for catch parameters 4007 (CATCHPARM). 4008 * except.c (expand_start_catch_block): Use the new CATCHPARM context 4009 instead of NORMAL. 4010 * except.c (expand_throw): Don't let convert_to_reference complain 4011 about what we are doing. 4012 4013Thu Oct 20 12:55:24 1994 Jim Wilson (wilson@cygnus.com) 4014 4015 * method.c (emit_thunk): Call instantiate_virtual_regs. 4016 4017Wed Oct 19 14:15:33 1994 Mike Stump <mrs@cygnus.com> 4018 4019 * except.c (expand_exception_blocks): Make sure throw code doesn't 4020 get put in function that won't be output. 4021 4022Mon Oct 17 18:03:15 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4023 4024 * decl.c (init_decl_processing): Make alloca a builtin. 4025 4026Thu Oct 27 21:10:25 1994 Craig Burley (craig@burley) 4027 4028 * g++.c (main): Only decrement "added" and set "library" to 4029 NULL when "library" != NULL (just like 940829 fix). 4030 4031Mon Oct 17 15:56:11 1994 Mike Stump <mrs@cygnus.com> 4032 4033 * except.c (expand_start_catch_block): Make sure the false label 4034 gets onto the permanent obstack, as it is used for the exception 4035 table. 4036 4037Fri Oct 14 18:54:48 1994 Mike Stump <mrs@cygnus.com> 4038 4039 * class.c (modify_one_vtable): Since the DECL_CONTEXT of fndecl can 4040 be set just below, use current_fndecl instead. 4041 4042Fri Oct 14 15:12:22 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4043 4044 * init.c (expand_aggr_vbase_init_1): Don't call expand_aggr_init_1 4045 with LOOKUP_SPECULATIVELY. 4046 (expand_default_init): Abort if build_method_call returns NULL_TREE. 4047 4048 * typeck.c (build_modify_expr): Don't just build a MODIFY_EXPR if 4049 the rhs is a TARGET_EXPR. 4050 4051 * parse.y (left_curly): Anonymous types are not affected by #pragma 4052 interface/implementation. 4053 4054 * method.c (synthesize_method): Don't call setup_vtbl_ptr for the 4055 default constructor if it isn't needed. 4056 4057 * lex.c (cons_up_default_function): Do synthesize methods for 4058 anonymous types if necessary. 4059 4060Thu Oct 13 17:44:55 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4061 4062 * method.c (build_decl_overload): Set numeric_outputed_need_bar to 0. 4063 4064Wed Oct 12 13:27:57 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4065 4066 * typeck.c (build_modify_expr): Understand how to copy an aggregate. 4067 4068 * init.c (expand_default_init): Ditto. Also remove some of the 4069 crufty code that assumes methods will not be synthesized properly. 4070 4071 * lex.c (cons_up_default_function): If the containing type has no 4072 name, these functions should never need to be called, so just 4073 declare them. 4074 4075 * lex.c (real_yylex): Use HOST_BITS_PER_WIDE_INT to determine the 4076 bitmask for lexing character constants. 4077 4078 * call.c (build_method_call): Disable code that tries to do tricky 4079 stuff with a default parameter that is a constructor call, but 4080 actually does other tricky stuff that breaks things. 4081 4082Wed Oct 12 16:14:01 1994 Benoit Belley <belley@cae.ca> 4083 4084 * decl.c (finish_enum): Disable code which forces enums to be signed, 4085 since this conflicts with their use as bitfields. type_promotes_to 4086 handles promotion of enums of underlying unsigned types to signed 4087 integer types. 4088 4089Wed Oct 12 13:24:03 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4090 4091 * cvt.c (type_promotes_to): Also promote enums to long if 4092 appropriate. 4093 4094 * typeck.c (default_conversion): Don't expect type_promotes_to to 4095 return a main variant. 4096 4097Wed Oct 12 12:19:45 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4098 4099 * call.c (build_scoped_method_call): Don't lose side effects in the 4100 object expression when calling a non-existent destructor. 4101 4102Fri Sep 2 19:05:21 1994 Rohan Lenard (rjl@iassf.easams.com.au) 4103 4104 * call.c (build_scoped_method_call): Remove erroneous error message 4105 when destructor call is written as a scoped call. 4106 4107Tue Oct 11 23:48:31 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4108 4109 * various: Cast pointer arguments to bzero and bcopy to char *. 4110 4111Tue Oct 11 19:34:32 1994 Mike Stump <mrs@cygnus.com> 4112 4113 * class.c (get_derived_offset): Added a type parameter to limit how 4114 far up the CLASSTYPE_VFIELD_PARENT chain we search. 4115 * class.c (modify_one_vtable, fixup_vtable_deltas): When forming the 4116 offset to put into the vtable for the this parameter, make sure we 4117 don't offset from a parent of the DECL_CONTEXT of the function. 4118 4119Tue Oct 11 16:10:52 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4120 4121 * pt.c (do_function_instantiation): Set DECL_EXTERNAL and 4122 TREE_STATIC when setting DECL_INTERFACE_KNOWN. 4123 (do_type_instantiation): Ditto. 4124 4125 * lex.c (cons_up_default_function): Set DECL_INTERFACE_KNOWN, 4126 DECL_EXTERNAL and TREE_STATIC as appropriate. 4127 4128 * decl2.c (finish_file): Also synthesize methods that don't have 4129 DECL_EXTERNAL set. Set interface_unknown before doing so. 4130 4131 * decl.c (start_function): If DECL_INTERFACE_KNOWN is set on the 4132 function decl, don't muck with TREE_PUBLIC and DECL_EXTERNAL. 4133 4134Mon Oct 10 00:56:53 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4135 4136 * lex.c (cons_up_default_function): Mark methods in a template class 4137 as template instances. Store the values of interface_unknown and 4138 interface_only for do_pending_inlines. 4139 (do_pending_inlines): Use them. 4140 4141 * decl2.c (finish_file): If we haven't seen a definition of a 4142 function declared static, make the decl non-PUBLIC so compile_file 4143 can give an error. 4144 4145Sun Oct 9 02:42:29 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4146 4147 * method.c (do_build_copy_constructor): Handle anonymous unions. 4148 (do_build_assign_ref): Ditto. 4149 (largest_union_member): Move from lex.c. 4150 4151Sat Oct 8 14:59:43 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4152 4153 Re-implement g++'s vague linkage independent of TREE_PUBLIC. 4154 * pt.c (instantiate_member_templates): Lose redundant 4155 -fexternal-templates handling. 4156 (tsubst): Set TREE_PUBLIC and DECL_EXTERNAL on new decls. Don't set 4157 TREE_STATIC or DECL_INTERFACE_KNOWN. 4158 (do_pending_expansions): Predicate on DECL_INTERFACE_KNOWN instead 4159 of DECL_EXTERNAL for explicit instantiations. 4160 (do_function_instantiation): Do the new thing. 4161 (do_type_instantiation): Ditto. 4162 (instantiate_template): Deal with member templates defined in a .cc 4163 file with -fexternal-templates. 4164 * except.c (expand_exception_blocks): Use DECL_LINKAGE_KNOWN to 4165 decide whether to stick builtin_throw here. 4166 * decl2.c (import_export_inline): Predicate on DECL_INTERFACE_KNOWN 4167 rather than TREE_PUBLIC. Generally fix rules. 4168 (finish_file): Use DECL_INITIAL to determine whether or not a method 4169 has been synthesized, rather than TREE_ASM_WRITTEN. 4170 * decl.c (warn_extern_redeclared_static): Use DECL_PUBLIC instead of 4171 TREE_PUBLIC. 4172 (pushdecl): Ditto. 4173 (duplicate_decls): Ditto. Deal with DECL_DECLARED_STATIC and 4174 DECL_INTERFACE_KNOWN. 4175 (redeclaration_error_message): Fix checking for conflicting linkage. 4176 (define_function): Set DECL_INTERFACE_KNOWN. 4177 (grokfndecl): Function decls are PUBLIC until we are sure about 4178 their linkage. Set DECL_DECLARED_STATIC as needed. 4179 (start_function): Deal with linkage. Move pushdecl after linkage 4180 magic. 4181 (finish_function): Don't set TREE_ASM_WRITTEN on discarded inlines. 4182 * cp-tree.h (lang_decl_flags): Add interface_known and 4183 declared_static. 4184 (DECL_INTERFACE_KNOWN): New macro. 4185 (DECL_DECLARED_STATIC): New macro. 4186 (DECL_PUBLIC): New macro. 4187 4188 Clean up bogus use of TREE_PUBLIC. 4189 * class.c (alter_access): Fix mistaken use of TREE_PUBLIC (it 4190 doesn't correspond to TREE_PROTECTED and TREE_PRIVATE). 4191 * init.c (do_friend): Don't arbitrarily set TREE_PUBLIC. 4192 4193Wed Oct 5 13:44:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4194 4195 * call.c (build_overload_call_real): Don't immediately do 4196 array->pointer conversion. 4197 4198 * pt.c (type_unification): If not passing to a reference, strip 4199 cv-quals. Also handle array->pointer conversion. 4200 4201Tue Oct 4 17:45:37 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4202 4203 * decl.c (grokdeclarator): Don't warn about applying const to a 4204 const typedef or template type parameter. 4205 4206 * decl2.c (finish_file): Also synthesize methods after walking the 4207 vtables. Ugly ugly ugly. 4208 4209Mon Oct 3 15:02:41 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4210 4211 * various: Remove lingering remnants of old exception handling code. 4212 4213 * decl2.c (finish_file): Synthesize methods before walking the 4214 vtables, so that the vtables get emitted as needed. 4215 4216 * decl.c (shadow_tag): Remove obsolete code for pushing tags and 4217 dealing with exceptions. 4218 4219Mon Oct 3 13:05:27 1994 Ian Lance Taylor <ian@sanguine.cygnus.com> 4220 4221 * Make-lang.in (g++-cross): Depend upon version.o and $(LIBDEPS). 4222 4223Mon Oct 3 02:59:28 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4224 4225 * decl2.c (finish_file): Fix inline handling. 4226 4227Sun Oct 2 00:21:56 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4228 4229 * decl.c (grokdeclarator): Handle redundant scope even better. 4230 ({push,pop}_cp_function_context): Take toplev parameter. 4231 4232 * method.c (synthesize_method): Pass toplev parameter to 4233 {push,pop}_cp_function_context depending on decl_function_context 4234 (fndecl). 4235 4236 * typeck.c (build_x_unary_op): Unary & on OFFSET_REFs is always the 4237 built-in version. 4238 4239 * method.c (synthesize_method): Don't be confused by __in_chrg 4240 parameter. 4241 4242 * class.c (popclass): Set C_C_D like start_function does. 4243 4244 * decl.c (grokdeclarator): Handle redundant scope better. 4245 4246 * parse.y (expr_or_declarator): Add '(' expr_or_declarator ')' rule. 4247 (direct_notype_declarator): Ditto. 4248 (complex_direct_notype_declarator): Remove it here. 4249 4250Sat Oct 1 21:42:18 1994 Jason Merrill (jason@deneb.cygnus.com) 4251 4252 * init.c (resolve_offset_ref): Fix types used in resolving .* 4253 expressions. 4254 4255Sat Oct 1 15:18:49 1994 Jason Merrill (jason@phydeaux.cygnus.com) 4256 4257 Beginnings of work to synthesize methods only when needed. 4258 * call.c (build_method_call): Synthesize methods as necessary 4259 (currently never necessary). 4260 * class.c (popclass): Don't try to set C_C_D here, as it'll end up 4261 on the wrong obstack. 4262 * decl.c (push_cp_function_context): Mostly copied from 4263 push_c_function_context. 4264 (pop_cp_function_context): Similarly. 4265 (finish_function): Reverse order of poplevel and pop_nested_class so 4266 that current_class_decl is restored properly. 4267 (start_function): Ditto. 4268 (finish_function): Add parameter 'nested'. Don't call 4269 permanent_allocation if (nested). 4270 * various: Pass extra parameter to finish_function. 4271 * decl2.c (finish_file): Reorganize end-of-file inline handling, 4272 synthesizing methods as necessary. 4273 * lex.c (cons_up_default_function): Call mark_inline_for_output. 4274 Only synthesize methods immediately if #pragma implementation 4275 (currently disabled). 4276 (do_pending_inlines): Call synthesize_method. 4277 * method.c (synthesize_method): New function; all method synthesis 4278 goes through here. Calls do_build_assign_ref and 4279 do_build_copy_constructor. 4280 (build_default_constructor): Remove. 4281 (build_dtor): Ditto. 4282 (build_assign_ref): Rename to do_build_assign_ref and remove stuff 4283 done by synthesize_method. 4284 (build_copy_constructor): Similarly. 4285 4286Thu Sep 29 16:58:52 1994 Mike Stump <mrs@cygnus.com> 4287 4288 * typeck.c (c_expand_return): Use magic so the backend can fixup the 4289 assignment into the return register, so cleanups won't clobber it. 4290 4291Thu Sep 29 13:08:50 1994 Jason Merrill (jason@deneb.cygnus.com) 4292 4293 * method.c (hack_identifier): Don't call assemble_external for 4294 template decls. 4295 4296 * decl.c (finish_decl): Also end temporary allocation if the decl in 4297 question has a type of error_mark_node. 4298 4299Wed Sep 28 21:45:00 1994 Mike Stump <mrs@cygnus.com> 4300 4301 * typeck.c (build_modify_expr): When optimizing ?: on lhs, make sure 4302 that if the ?: was a reference type, that the subparts will be also. 4303 4304Wed Sep 28 16:14:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4305 4306 * except.c (register_exception_table): Use Pmode, not PTRmode. 4307 4308Fri Sep 23 13:54:27 1994 Jason Merrill (jason@deneb.cygnus.com) 4309 4310 * lex.c (do_pending_inlines): Do method synthesis after the 4311 pending_inlines have been reversed. 4312 4313Thu Sep 22 12:53:03 1994 Per Bothner (bothner@kalessin.cygnus.com) 4314 4315 * decl2.c (finish_file): Fix Brendan's fix: Only call 4316 register_exception_table if there is a non-empty exception table. 4317 4318Thu Sep 22 12:03:46 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4319 4320 * decl2.c (finish_file): Only do register_exception_table if 4321 -fhandle-exceptions is being used. 4322 4323Wed Sep 21 19:01:51 1994 Per Bothner (bothner@kalessin.cygnus.com) 4324 4325 * except.c (output_exception_table_entry): Simplify 4326 by using assemble_integer. 4327 (build_exception_table): Change to return a count. 4328 Cleanup to use standard macros, instead of hard-wired 4329 sparc asm format. Don't make __EXCEPTION_TABLE__ global. 4330 (register_exception_table): New function. Generate call to builtin. 4331 * decl2.c (finish_file): Call register_exception_table. 4332 * cp-tree.h (build_exception_table): Fix prototype. 4333 4334Wed Sep 21 13:20:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4335 4336 * tree.c (break_out_calls): Don't try to duplicate the DECL_INITIAL. 4337 4338 * decl2.c (delete_sanity): Give an error at trying to delete a 4339 function. 4340 4341Wed Sep 21 11:47:10 1994 Jason Merrill (jason@deneb.cygnus.com) 4342 4343 * lex.c (cons_up_default_function): Mark synthesized destructors 4344 inline. 4345 4346 * decl.c (duplicate_decls): Ignore redeclarations of wchar_t as 4347 something other than __wchar_t, complaining if -pedantic and not in 4348 a system header. 4349 4350Tue Sep 20 09:43:28 1994 Jason Merrill (jason@deneb.cygnus.com) 4351 4352 * decl.c (xref_tag): Set up BINFO_INHERITANCE_CHAIN on base binfos 4353 here. 4354 4355 * typeck.c (build_modify_expr): Require complete type after checking 4356 for error_mark_node. 4357 4358 * call.c (build_method_call): Print parmtypes when complaining of 4359 ambiguous call. 4360 4361 * typeck.c (build_modify_expr): Handle assignment to array from 4362 non-array. 4363 4364 * decl.c (lookup_name_real): Deal with got_scope == error_mark_node. 4365 4366 * call.c (build_method_call): Don't bother with the exact match. 4367 4368Mon Sep 19 00:51:39 1994 Jason Merrill (jason@deneb.cygnus.com) 4369 4370 * init.c (expand_aggr_init): If we munge the type of the variable, 4371 also munge the type of the initializer. 4372 4373 * decl.c (grokdeclarator): Use <= when comparing to RID_LAST_MODIFIER. 4374 (init_decl_processing): Push artificial declaration of wchar_t so 4375 people don't have to declare it before they can use it. 4376 4377 * error.c (cp_line_of): return lineno in lieu of 0. 4378 4379 * typeck.c (convert_for_assignment): Handle conversion of pmfs to 4380 int and bool. 4381 (build_component_ref): Fold the COMPONENT_REF in case it can be 4382 reduced. 4383 4384 * typeck2.c (store_init_value): Don't pedwarn about non-constant 4385 bracketed initializers for automatic variables. 4386 4387Sun Sep 18 10:12:12 1994 Jason Merrill (jason@deneb.cygnus.com) 4388 4389 * error.c (dump_decl): Don't say `typedef enum foo foo'. 4390 4391 * decl.c (start_decl): Don't set TREE_PUBLIC on template decls just 4392 because they're affected by #pragma i/i. We'll deal with that when 4393 they get instantiated. 4394 4395 * typeck.c (build_unary_op): Clean up cruft in ADDR_EXPR case. 4396 4397 * class.c (instantiate_type): Set TREE_CONSTANT on instantiated 4398 ADDR_EXPRs if appropriate. 4399 4400 * decl.c (build_ptrmemfunc_type): Unset IS_AGGR_TYPE on pmf types. 4401 4402 * typeck.c (build_ptrmemfunc): Handle &overloaded_method as an 4403 initializer properly. 4404 * typeck2.c (digest_init): Ditto. 4405 4406 * tree.c (cp_build_type_variant): Like c_build_type_variant, except 4407 it uses build_cplus_array_type. 4408 * *.c: Use cp_build_type_variant instead of c_build_type_variant. 4409 4410 * pt.c (do_type_instantiation): Don't try to instantiate nested 4411 enums. 4412 4413Tue Sep 13 10:56:58 1994 Jason Merrill (jason@deneb.cygnus.com) 4414 4415 * cvt.c (build_up_reference): Handle preincrement and predecrement 4416 properly. 4417 4418Tue Sep 13 09:51:59 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4419 4420 * decl.c (finish_decl): Only lay out the rtl for DECL if it is, in 4421 fact, static. 4422 4423Mon Sep 12 14:40:30 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4424 4425 * decl.c (finish_decl): Lay out the rtl for DECL before doing 4426 grok_reference_init, in case it's static. 4427 4428Mon Sep 12 12:45:38 1994 Jason Merrill (jason@deneb.cygnus.com) 4429 4430 * class.c (finish_struct): Don't synthesize constructors if the 4431 class has a field with the same name as the class. Don't die on 4432 classes with no constructors or destructors. Don't die if the head 4433 and tail of the class are in different files. 4434 4435 * decl.c (grokdeclarator): Don't treat a function pointer field 4436 with the same name as the class as a constructor. 4437 4438Fri Sep 9 13:17:00 1994 Jason Merrill (jason@deneb.cygnus.com) 4439 4440 * typeck.c (build_c_cast): Pull constant values out of their 4441 variables here. 4442 4443 * decl.c (duplicate_decls): Only propagate DECL_CHAIN in 4444 FUNCTION_DECLs and TEMPLATE_DECLs. 4445 4446Thu Sep 8 10:07:48 1994 Jason Merrill (jason@deneb.cygnus.com) 4447 4448 * decl.c (duplicate_decls): Propagate DECL_CHAIN in all DECLs that 4449 have it. 4450 4451 * pt.c (unify): REALs and INTEGERs only unify with their own genus. 4452 (instantiate_member_templates): Don't muck with DECL_EXTERNAL and 4453 TREE_PUBLIC unless -fexternal-templates. 4454 4455Wed Sep 7 13:17:10 1994 Jason Merrill (jason@deneb.cygnus.com) 4456 4457 * pt.c (do_type_instantiation): Call instantiate_member_templates. 4458 Deal with specializations. 4459 (tsubst): Don't stick the mangled name in DECL_NAME for function 4460 instantiations. Don't push them, either. 4461 4462 * decl2.c (grokfield): Move code for generating the 4463 DECL_ASSEMBLER_NAME for static members from here. 4464 * method.c (build_static_name): To here. 4465 * decl.c (grokvardecl): Call build_static_name. 4466 (duplicate_decls): Keep old DECL_ASSEMBLER_NAME. 4467 4468Mon Sep 5 12:49:18 1994 Jason Merrill (jason@deneb.cygnus.com) 4469 4470 * call.c (build_method_call): if -Wsynth, warn when selecting 4471 synthesized op= over user-supplied one cfront would select. 4472 * decl2.c (lang_decode_option): Handle -Wsynth. 4473 4474Fri Sep 2 15:11:59 1994 Jason Merrill (jason@deneb.cygnus.com) 4475 4476 * decl.c (finish_enum): Overhaul to fix several bugs. 4477 (start_enum): Disable useless code. 4478 4479Thu Sep 1 16:04:54 1994 Jason Merrill (jason@deneb.cygnus.com) 4480 4481 * typeck.c (c_expand_return): Warn about returning a reference to a 4482 temporary. 4483 (convert_arguments): Increment argument counter when using default 4484 arguments, too. 4485 4486Wed Aug 31 14:29:22 1994 Jason Merrill (jason@deneb.cygnus.com) 4487 4488 * decl.c (finish_decl): If the type of decl is error_mark_node, 4489 don't bother trying to do anything. 4490 4491 * typeck.c (convert_for_initialization): If the rhs contains a 4492 constructor call, pretend the lhs type needs to be constructed. 4493 4494 * init.c (expand_default_init): If we stick the object inside the 4495 initializer, mark the initializer used. 4496 4497Tue Aug 30 13:50:18 1994 Jason Merrill (jason@deneb.cygnus.com) 4498 4499 * method.c (build_assign_ref): return *this; 4500 (build_assign_ref): Fix base assignment order. 4501 (build_copy_constructor): Fix member init order. 4502 4503Mon Aug 29 13:54:39 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4504 4505 * g++.c (main): Remember to clear out SAW_SPECLANG after we see 4506 its argument. 4507 4508Sat Aug 27 09:36:03 1994 Jason Merrill (jason@deneb.cygnus.com) 4509 4510 * method.c (build_copy_constructor): Also copy virtual bases. 4511 4512Fri Aug 26 17:05:15 1994 Jason Merrill (jason@deneb.cygnus.com) 4513 4514 * lex.c (do_pending_inlines): Clear out pending_inlines before doing 4515 any synthesis. Also first set deja_vu on all pending_inlines. 4516 4517 * method.c (build_assign_ref): Use build_member_call to invoke base 4518 operator=, rather than build_modify_expr. And use 4519 build_reference_type instead of TYPE_REFERENCE_TO. 4520 (build_copy_constructor): Use TYPE_NESTED_NAME to identify the 4521 basetype. 4522 4523 * decl2.c (grokfield): Don't complain about undefined local class 4524 methods. 4525 4526 * class.c (finish_struct): Don't try to synthesize methods here. 4527 * lex.c (do_pending_inlines): Instead, synthesize them here. 4528 (init_lex): Initialize synth_obstack. 4529 (cons_up_default_function): Stick synthesis request on 4530 pending_inlines. 4531 4532Fri Aug 26 12:24:14 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4533 4534 * call.c (build_method_call) [PCC_STATIC_STRUCT_RETURN]: Also 4535 accept an RTL_EXPR in what we're about to use for the instance, 4536 since anything which would end up with pcc_struct_return set 4537 inside cplus_expand_expr. 4538 4539 * cp-tree.h (cons_up_default_function): Note change of prototype. 4540 4541Thu Aug 25 23:05:30 1994 Gerald Baumgartner (gb@cs.purdue.edu) 4542 4543 * class.c (finish_struct): Undid change from Aug 21 testing 4544 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. 4545 * parse.y (left_curly): Ditto, undid change from Aug 21. 4546 * decl.c (xref_tag): Undid change from Aug 21, set 4547 CLASSTYPE_INTERFACE correctly, and added comments. 4548 4549Thu Aug 25 00:36:31 1994 Jason Merrill (jason@deneb.cygnus.com) 4550 4551 Rework approach to synthesized methods; don't go through the parser 4552 anymore. 4553 * class.c (finish_struct): Use new synthesis approach. 4554 * lex.c (cons_up_default_function): Now just creates declaration, 4555 not code. 4556 (largest_union_member): #if 0 out. 4557 (default_assign_ref_body): Ditto. 4558 (default_copy_constructor_body): Ditto. 4559 * method.c (build_default_constructor): New function to synthesize X(). 4560 (build_copy_constructor): Synthesize X(X&). 4561 (build_assign_ref): Synthesize X::operator=(X&). 4562 (build_dtor): Synthesize ~X(). 4563 4564 * error.c (cp_line_of): If we're dealing with an artificial 4565 TYPE_DECL, look at the type instead. 4566 4567Wed Aug 24 11:11:50 1994 Jason Merrill (jason@deneb.cygnus.com) 4568 4569 * init.c (sort_member_init): Check warn_reorder. 4570 * decl2.c (lang_decode_option): Handle -W{no-,}reorder. 4571 4572 * cp-tree.h (CLASSTYPE_SOURCE_LINE): New macro. 4573 * error.c (cp_line_of): Use CLASSTYPE_SOURCE_LINE for aggregates. 4574 * class.c (finish_struct): Set CLASSTYPE_SOURCE_LINE. 4575 4576Tue Aug 23 09:28:35 1994 Mike Stump <mrs@cygnus.com> 4577 4578 * error.c (dump_decl): Improve wording, so that error messages 4579 dont't read template<, class foo>... 4580 4581Mon Aug 22 15:30:51 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4582 4583 * parse.y (label_colon): Also match a TYPENAME as a label name, 4584 since they may have declared a class by that name but have also 4585 tried to have a local label under the same name. 4586 4587 * pt.c (coerce_template_parms): Call cp_error, not cp_error_at, 4588 for the message so they know at what point it was instantiated. 4589 4590Sun Aug 21 23:07:35 1994 Gerald Baumgartner (gb@cs.purdue.edu) 4591 4592 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and 4593 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures up to left_curly time. 4594 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and 4595 CLASSTYPE_VTABLE_NEEDS_WRITING for signatures down to left_curly time. 4596 * parse.y (left_curly): New final resting place for setting 4597 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING for signatures. 4598 4599 * class.c (finish_struct): Don't test for function/field name 4600 conflicts in signatures, since all the fields are compiler-constructed. 4601 4602Fri Aug 19 14:04:47 1994 Kung Hsu (kung@mexican.cygnus.com) 4603 4604 * method.c (build_overload_nested_name): in qualified name 4605 mangling, the template with value instantiation will have numeric 4606 at end and may mixed with the name length of next nested level. 4607 Add a '_' in between. 4608 * method.c (build_overload_name): ditto. 4609 * method.c (build_overload_identifier): ditto. 4610 4611Thu Aug 18 16:24:43 1994 Mike Stump <mrs@cygnus.com> 4612 4613 * error.c (dump_decl): Handle NULL args. 4614 4615Thu Sep 29 16:15:36 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu> 4616 4617 * g++.c: Rework last change so it's done like collect.c (and 4618 gcc.c). 4619 4620Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu> 4621 4622 * g++.c: Include <sys/errno.h> in case `errno' is a macro 4623 as permitted by ANSI C. 4624 4625Thu Aug 18 12:48:09 1994 Mike Stump <mrs@cygnus.com> 4626 4627 * class.c (finish_struct): Move setting of CLASSTYPE_INTERFACE and 4628 CLASSTYPE_VTABLE_NEEDS_WRITING up to left_curly time. 4629 * decl.c (xref_tag): Move setting of CLASSTYPE_INTERFACE and 4630 CLASSTYPE_VTABLE_NEEDS_WRITING down to left_curly time. 4631 * parse.y (left_curly): New final resting place for setting 4632 CLASSTYPE_INTERFACE and CLASSTYPE_VTABLE_NEEDS_WRITING. 4633 4634Thu Aug 11 11:32:42 1994 H.J. Lu (hjl@nynexst.com) 4635 4636 * g++.c (main): Only decrement "added" and set "library" to 4637 NULL when "library" != NULL. 4638 4639Sat Aug 13 00:14:52 1994 Jason Merrill (jason@deneb.cygnus.com) 4640 4641 * decl.c (grokdeclarator): Don't set TREE_PUBLIC on a function decl 4642 just because its class has a known interface. 4643 (decls_match): Deal with new format of template parms. 4644 4645 * lex.c (cons_up_default_function): Don't play with TREE_PUBLIC and 4646 DECL_EXTERNAL here. 4647 4648Fri Aug 12 01:55:15 1994 Jason Merrill (jason@deneb.cygnus.com) 4649 4650 * decl.c (pushtag): SET_DECL_ARTIFICIAL on gratuitous typedefs. 4651 (xref_defn_tag): Ditto. 4652 (pushdecl): Only allow artificial typedefs to be shadowed. 4653 4654 * init.c (emit_base_init): Pass the right binfos to 4655 expand_aggr_init_1. 4656 4657 * class.c (delete_duplicate_fields_1): Make it work right. 4658 (finish_struct): Catch function/field name conflict. 4659 4660 * decl2.c (check_classfn): Pass the function to cp_error, not just 4661 the name. 4662 4663 * init.c (sort_member_init): Warn when order of member initializers 4664 does not match order of member declarations. 4665 (emit_base_init): Call expand_aggr_init_1 with LOOKUP_PROTECT. 4666 4667 * error.c (dump_expr): Handle lists of functions. 4668 4669 * decl.c (start_function): #pragma interface only affects functions 4670 that would otherwise be static. 4671 (finish_decl): Don't warn about an unused variable if it has both 4672 constructor and destructor, since the 'resource allocation is 4673 initialization' idiom is relatively common. 4674 4675 * typeck.c (comp_target_types): Don't handle TEMPLATE_TYPE_PARMs. 4676 (comp_target_parms): Ditto. 4677 (compparms): Never consider default parms. 4678 (common_base_type): Don't choose a virtual baseclass if there is a 4679 more derived class in common. 4680 (build_conditional_expr): If pedantic, pedwarn about conversion to 4681 common base in conditional expr. 4682 4683 * class.c (instantiate_type): Handle template instantiation better. 4684 4685 * typeck.c (convert_arguments): Don't try to get tricky and convert 4686 to int directly when PROMOTE_PROTOTYPES is set, as it breaks 4687 user-defined conversions. 4688 4689 * lex.c (check_for_missing_semicolon): Also give error at end of 4690 file. 4691 4692 * call.c (build_method_call): Don't promote arrays to pointers here. 4693 4694 * typeck.c (convert_arguments): Don't require the actual parameter 4695 to be of a complete type if the formal parameter is a reference. 4696 4697Thu Aug 11 15:21:40 1994 Jason Merrill (jason@deneb.cygnus.com) 4698 4699 * decl.c (grokdeclarator): Soften 'static' on member function error 4700 to pedwarn. 4701 4702 * init.c (build_new): Don't automatically save rval. 4703 (build_offset_ref): Do field lookup with proper basetype_path. 4704 4705Thu Aug 11 12:46:54 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 4706 4707 * errfn.c (cp_silent): Declare to mark when we should avoid 4708 emitting warnings and errors. 4709 (cp_error): Check it. 4710 (cp_warning): Likewise. 4711 (cp_pedwarn): Likewise. 4712 (cp_compiler_error): Likewise. 4713 (cp_error_at): Likewise. 4714 (cp_warning_at): Likewise. 4715 (cp_pedwarn_at): Likewise. 4716 * call.c (compute_conversion_costs): Set CP_SILENT when we start 4717 out, and make sure we turn it off before we leave. 4718 4719Thu Aug 11 00:02:54 1994 Jason Merrill (jason@deneb.cygnus.com) 4720 4721 * decl2.c (grok_array_decl): Try computing *(A+B) if neither 4722 argument is obviously an array. 4723 4724Wed Aug 10 15:32:04 1994 Jason Merrill (jason@deneb.cygnus.com) 4725 4726 * typeck.c (c_expand_start_case): Do cleanups here. 4727 4728 * parse.y (xcond): Do bool conversion here, too. 4729 (simple_stmt, SWITCH case): Don't do cleanups here. 4730 4731 * decl.c (duplicate_decls): Don't treat builtins that have been 4732 explicitly declared specially. 4733 4734Tue Aug 9 01:16:09 1994 Jason Merrill (jason@deneb.cygnus.com) 4735 4736 * tree.c (make_deep_copy): Support copying pointer, reference, 4737 function, array, offset and method types. 4738 4739 * decl.c (init_decl_processing): Mark exit and abort as 4740 BUILT_IN_NONANSI so that duplicate_decls is kinder about 4741 redeclaration. 4742 (duplicate_decls): Don't give two errors for redeclaring a C 4743 function with the same parms but a different return type. 4744 4745 * parse.y (paren_cond_or_null): Do cleanup and bool conversion here. 4746 (condition): Instead of here. 4747 (simple_stmt, SWITCH case): Also do cleanup here. 4748 4749 * decl2.c (finish_anon_union): Only break out FIELD_DECLs. 4750 4751 * call.c (build_method_call): Don't throw away the side effects of 4752 the object in a call to a non-existent constructor. 4753 * parse.y (primary): Ditto. 4754 4755 * method.c (build_decl_overload): Oop. 4756 4757 * decl2.c (lang_decode_option): Deal with flag_no_nonansi_builtin, 4758 warn about uselessness of specifying -fansi-overloading. 4759 4760 * method.c (build_decl_overload): Treat any non-member new with one 4761 parameter as __builtin_new. 4762 4763 * decl.c (init_decl_processing): Setup built-in meanings of exit, 4764 _exit and abort. 4765 4766Mon Aug 8 15:03:30 1994 Jason Merrill (jason@deneb.cygnus.com) 4767 4768 * error.c (dump_readonly_or_volatile): Put a space between const and 4769 volatile if both apply. 4770 4771 * init.c (perform_member_init): Clean up after this initialization. 4772 (emit_base_init): Clean up after each base init, not after all have 4773 been done. 4774 (expand_aggr_vbase_init_1): Clean up after this init. 4775 4776Sun Aug 7 14:55:05 1994 Jason Merrill (jason@deneb.cygnus.com) 4777 4778 * call.c (build_method_call): Deal with destroying references. 4779 4780 * parse.y (condition): Do bool_truthvalue_conversion here. 4781 (paren_expr_or_null): And here. 4782 (simple_if): Not here. 4783 (simple_stmt): Or here. 4784 4785Sat Aug 6 22:29:45 1994 Jason Merrill (jason@deneb.cygnus.com) 4786 4787 * parse.y (paren_expr_or_null): Wrap the expression in a 4788 CLEANUP_POINT_EXPR. 4789 (condition): Ditto. 4790 4791Sat Aug 6 19:46:37 1994 Rohan Lenard (rjl@easams.com.au) 4792 4793 * call.c (build_scoped_method_call): Fix error message when 4794 destructor call refers to a nonexistent type. 4795 4796Sat Apr 16 22:43:30 1993 Gerald Baumgartner (gb@cs.purdue.edu) 4797 4798 * lex.h (rid): Deleted RID_RAISES, it's never used. 4799 Moved RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, RID_EXCEPTION, 4800 RID_TEMPLATE and RID_SIGNATURE to the end of the enumeration, 4801 they don't need to be touched in `grokdeclarator.' 4802 (RID_LAST_MODIFIER): Defined macro to be RID_MUTABLE. 4803 4804 * decl.c (grokdeclarator): Use RID_LAST_MODIFIER instead of 4805 RID_MAX as loop limit for finding declaration specifiers. 4806 4807Sat Apr 3 21:59:07 1993 Gerald Baumgartner (gb@cs.purdue.edu) 4808 4809 * lex.c (debug_yytranslate): Moved to parse.y since it needs to 4810 access `yytname,' which is static in parse.c. 4811 4812Fri Apr 2 23:36:57 1993 Gerald Baumgarnter (gb@cs.purdue.edu) 4813 4814 * cp-tree.h (GNU_xref_ref): Fixed typo in extern declaration, it 4815 was `GNU_xref_def' instead of `GNU_xref_ref.' 4816 4817Fri Aug 5 14:20:16 1994 Jason Merrill (jason@deneb.cygnus.com) 4818 4819 * pt.c (do_function_instantiation): Don't set TREE_PUBLIC and 4820 DECL_EXTERNAL on 'extern' instantiations; wait until EOF to do that. 4821 (do_type_instantiation): Ditto. 4822 4823 * decl2.c (import_export_inline): Decides at EOF what an inline's 4824 linkage should be. 4825 (finish_file): Call it. 4826 4827 * decl.c (start_function): Don't rely on the settings of TREE_PUBLIC 4828 and DECL_EXTERNAL from do_*_instantiation. Only set 4829 DECL_DEFER_OUTPUT on inlines whose linkage might actually change. 4830 (finish_function): Use DECL_DEFER_OUTPUT to decide which inlines to 4831 mark for later consideration, rather than DECL_FUNCTION_MEMBER_P. 4832 4833Fri Aug 5 01:12:20 1994 Mike Stump <mrs@cygnus.com> 4834 4835 * class.c (get_class_offset_1, get_class_offset): New routine to 4836 find the offset of the class where a virtual function is defined, 4837 from the complete type. 4838 * class.c (modify_one_vtable, fixup_vtable_deltas): Use 4839 get_class_offset instead of virtual_offset as get_class_offset will 4840 always provide the right answer. 4841 * tree.c (virtual_offset): Remove. It only ever worked some of the 4842 time. 4843 4844Tue Aug 2 12:44:21 1994 Jason Merrill (jason@deneb.cygnus.com) 4845 4846 * call.c (build_method_call): Put back unary_complex_lvalue call 4847 that I thought was redundant. 4848 4849 * typeck.c (c_expand_return): Fix a case I missed before. 4850 4851Sun Jul 31 17:54:02 1994 Jason Merrill (jason@deneb.cygnus.com) 4852 4853 * pt.c (unify): Strip cv-quals from template type arguments (when 4854 'const T*' is matched to 'const char*', that does not mean that T is 4855 'const char'). 4856 4857Fri Jul 29 01:03:06 1994 Jason Merrill (jason@deneb.cygnus.com) 4858 4859 * pt.c (do_type_instantiation): Instantiate nested TAGS, not 4860 typedefs. Third time's the charm? 4861 4862 * parse.y (template_parm): Support default template parms. 4863 * pt.c (process_template_parm): Ditto. 4864 (end_template_parm_list): Ditto. 4865 (coerce_template_parms): Ditto. 4866 (mangle_class_name_for_template): Ditto. 4867 (push_template_decls): Ditto. 4868 (unify): Ditto. 4869 * method.c (build_overload_identifier): Ditto. 4870 * error.c (dump_decl): Ditto. 4871 4872Wed Jul 27 17:47:00 1994 Jason Merrill (jason@deneb.cygnus.com) 4873 4874 * pt.c (do_type_instantiation): Only instantiate nested *classes*. 4875 4876Tue Jul 26 13:22:40 1994 Jason Merrill (jason@deneb.cygnus.com) 4877 4878 * search.c (note_debug_info_needed): Also emit debugging information 4879 for the types of fields. 4880 4881Mon Jul 25 00:34:44 1994 Jason Merrill (jason@deneb.cygnus.com) 4882 4883 * pt.c (lookup_template_class): Pass 'template' to 4884 coerce_template_parms instead of 'in_decl', since it's a more 4885 meaningful context. 4886 4887 * typeck.c (c_expand_return): Make sure any cleanups for the return 4888 expression get run. 4889 (build_c_cast): Use CONVERT_EXPR for conversion to void. 4890 4891 * pt.c (do_type_instantiation): Also instantiate nested types. 4892 4893 * typeck.c (convert_for_assignment): Don't die when comparing 4894 pointers with different levels of indirection. 4895 4896 * decl.c (grokdeclarator): The sub-call to grokdeclarator for 4897 class-local typedefs sets DECL_ARGUMENTS, so we need to clear it 4898 out. 4899 4900 * decl2.c (finish_anon_union): Don't die if the union has no 4901 members. 4902 4903 * decl.c (grokdeclarator): Undo changes to declspecs when we're done 4904 so that 'typedef int foo, bar;' will work. 4905 4906 * decl2.c (finish_file): Don't call expand_aggr_init for 4907 non-aggregates. 4908 4909Mon Jul 25 00:03:10 1994 Teemu Torma (tot@trema.fi) 4910 4911 * decl.c (finish_function): We can't inline constructors and 4912 destructors under some conditions with -fpic, but don't unset 4913 DECL_INLINE. 4914 4915Mon Jul 25 00:03:10 1994 Jason Merrill (jason@deneb.cygnus.com) 4916 4917 * typeck.c (build_object_ref): Make sure 'datum' is a valid object. 4918 4919Sun Jul 24 14:19:31 1994 Jason Merrill (jason@deneb.cygnus.com) 4920 4921 * class.c (finish_struct): Don't set DECL_FIELD_BITPOS on 4922 non-fields. 4923 (finish_struct_methods): Use copy_assignment_arg_p. 4924 4925 * cvt.c (cp_convert): If expr is an OFFSET_REF, resolve it instead 4926 of giving an error. 4927 4928 * typeck.c (build_binary_op_nodefault): Don't set result_type if we 4929 don't know how to compare the operands. 4930 4931 * decl.c (grokdeclarator): Avoid seg fault when someone uses '__op' 4932 as a declarator-id in their program. Like the Linux headers do. 4933 Arrgh. 4934 4935 * tree.c (lvalue_p): Treat calls to functions returning objects by 4936 value as lvalues again. 4937 4938 * typeck.c (build_component_addr): Use convert_force to convert the 4939 pointer in case the component type is also a private base class. 4940 4941 * search.c (get_matching_virtual): Fix bogus warning of overloaded 4942 virtual. 4943 4944 * pt.c (overload_template_name): Set DECL_ARTIFICIAL on the created 4945 TYPE_DECL to fix bogus shadowing warnings. 4946 4947Fri Jul 22 01:15:32 1994 Jason Merrill (jason@deneb.cygnus.com) 4948 4949 * init.c (expand_aggr_init_1): const and volatile mismatches do not 4950 prevent a TARGET_EXPR from initializing an object directly. 4951 4952Tue Jul 19 17:55:37 1994 Jason Merrill (jason@deneb.cygnus.com) 4953 4954 * cvt.c (build_up_reference): Allow building up references to 4955 `this', don't warn about making references to artificial variables 4956 (like `this'). 4957 4958 * tree.c (lvalue_p): `this' is not an lvalue. 4959 4960 * call.c (build_method_call): Accept using a typedef name (or 4961 template type parameter) for explicit destructor calls. 4962 4963Wed Jul 13 03:57:54 1994 Jason Merrill (jason@deneb.cygnus.com) 4964 4965 * method.c (hack_identifier): Put back old code so lists of 4966 non-functions will be handled properly. 4967 4968 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): #if 0 out; this macro is now 4969 defined in the language-independent tree.h. 4970 4971 * tree.c (count_functions): Avoid bogus warning when compiling this 4972 function. 4973 4974Mon Jul 11 18:37:20 1994 Jason Merrill (jason@deneb.cygnus.com) 4975 4976 * decl.c (grok_reference_init): Always save the initializer of a 4977 reference. 4978 4979Fri Jul 8 17:41:46 1994 Mike Stump <mrs@cygnus.com> 4980 4981 * decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside 4982 CLEANUP_POINT_EXPRs so that the stack slots can be reused. 4983 (disabled for now) 4984 4985Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com) 4986 4987 * method.c (hack_identifier): Fix for new overloading. 4988 4989 * typeck.c (build_binary_op_nodefault): Don't mess with division by 4990 zero. 4991 4992Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu) 4993 4994 * decl2.c (finish_file): Only call walk_sigtables, if 4995 flag_handle_signatures is turned on, don't waste time otherwise. 4996 4997Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com) 4998 4999 * decl.c (push_overloaded_decl): Don't create overloads of one when 5000 shadowing a class type. 5001 * typeck.c (build_x_function_call): Complain about overloads of one. 5002 5003 * decl.c (grokdeclarator): Don't try to treat a char* as a tree. 5004 (grokdeclarator): Fix setting of TREE_STATIC. 5005 (start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls. 5006 5007Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com) 5008 5009 * cp-tree.h (walk_sigtables): Created extern declaration. 5010 * decl2.c (walk_sigtables): Created function, patterned after 5011 walk_vtables, even though we only need it to write out sigtables. 5012 (finish_sigtable_vardecl): Created function. 5013 (finish_vtable_vardecl): Changed 0 to NULL_PTR. 5014 (finish_file): Call walk_sigtables. 5015 5016 * sig.c (build_signature_table_constructor): Mark class member 5017 function pointed to from signature table entry as addressable. 5018 5019Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com) 5020 5021 * decl.c (start_decl): Check new decl of static member variable 5022 against the declaration in the class here. 5023 (grokvardecl): Instead of here. 5024 5025 * class.c (prepare_fresh_vtable): Call import_export_vtable if not 5026 -fvtable-thunks. 5027 (build_vtable): Ditto. 5028 5029 * decl2.c (import_export_vtable): Move logic for deciding the 5030 interface of a template class from here. 5031 (import_export_template): To here. 5032 (finish_vtable_vardecl): Call import_export_template before 5033 import_export_vtable. 5034 5035Wed Jul 6 20:25:48 1994 Mike Stump <mrs@cygnus.com> 5036 5037 * except.c (init_exception_processing): Setup interim_eh_hook to 5038 call lang_interim_eh. 5039 * except.c (do_unwind): Propagate throw object value across 5040 stack unwinding. 5041 * except.c (saved_throw_value): Used to hold the value of the object 5042 being thrown. It is always a reference to the real value. 5043 * except.c (expand_start_catch_block): Add handling for the 5044 value of the exception object. 5045 * except.c (expand_start_catch_block): Add handler for the handler, 5046 so that throws inside the handler go to the outer block. 5047 * except.c (expand_end_catch_block): Ditto. 5048 * parse.y (handler_args): Use parm instead, as the other doesn't yet 5049 handle references correctly. 5050 5051Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com) 5052 5053 * decl2.c (mark_vtable_entries): If -ftable-thunks, set the 5054 vtable entry properly to abort. 5055 5056Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com) 5057 5058 * typeck.c (build_binary_op_nodefault): Downgrade division by zero 5059 errors to warnings. 5060 5061 * call.c (build_overload_call_real): Handle fnname being a list of 5062 functions. 5063 * typeck.c (build_x_function_call): Pass list of functions to 5064 build_overload_call, not just the name. 5065 * tree.c (count_functions): Complain when called for invalid 5066 argument. 5067 5068 * decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC 5069 and DECL_EXTERNAL on static members and initialized const members. 5070 * decl2.c (grokfield): Reflect this change. 5071 5072Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com) 5073 5074 * parse.y (init): ANSI C++ does not forbid { }. 5075 5076Thu Jun 30 00:35:22 1994 Jason Merrill (jason@deneb.cygnus.com) 5077 5078 * decl2.c (lang_decode_option): Set warn_nonvdtor along with -Wall. 5079 warn_nonvdtor defaults to off. 5080 5081 * class.c (instantiate_type): Use comptypes rather than relying on 5082 types to satisfy ==. 5083 5084 * decl.c (start_function): Set DECL_DEFER_OUTPUT on all inlines that 5085 might be static. 5086 5087 * tree.c (build_cplus_new): Never build WITH_CLEANUP_EXPRs. 5088 5089 * decl.c (grok_reference_init): Deal with ADDR_EXPRs of TARGET_EXPRs. 5090 5091 * cvt.c (cp_convert): Pass 0 to with_cleanup_p arg of 5092 build_cplus_new. 5093 5094Wed Jun 29 22:31:09 1994 Jason Merrill (jason@deneb.cygnus.com) 5095 5096 * decl2.c (finish_file): Maybe consider static inlines multiple 5097 times, in case they reference each other. 5098 5099Tue Jun 28 11:58:38 1994 Gerald Baumgartner (gb@cs.purdue.edu) 5100 5101 * class.c (finish_struct): Don't `cons_up_default_function's 5102 for signatures. 5103 (finish_struct): Handle an empty method_vec correctly. 5104 5105 * decl.c (grokdeclarator): Don't warn about a signature being 5106 empty in a signature pointer declaration if we only saw a 5107 forward declaration of the signature. Changed `warning's into 5108 `cp_warning's. 5109 5110 * sig.c (build_sigtable): Don't die if a null signature table 5111 constructor is returned. 5112 (build_signature_pointer_constructor): If the signature table 5113 constructor is null, the _sptr field is set to a null pointer 5114 and cast to the appropriate type. Make copies of all null 5115 pointers so that the type null_pointer_node doesn't get changed. 5116 (build_signature_table_constructor): Added comments. 5117 5118 * sig.c (build_signature_pointer_constructor): Complain if we 5119 try to assign to/initialize a signature pointer/reference of 5120 an undefined signature. 5121 5122Mon Jun 27 14:05:16 1994 Gerald Baumgartner (gb@cs.purdue.edu) 5123 5124 * typeck2.c (store_init_value): Don't be pedantic about 5125 non-constant initializers of signature tables/pointers/references. 5126 5127Fri Jun 24 16:49:41 1994 Gerald Baumgartner (gb@cs.purdue.edu) 5128 5129 * decl.c (grokdeclarator): If we are grokking an opaque typedef 5130 in a signature, don't complain about it begin static. 5131 5132Wed Jun 29 16:44:45 1994 Mike Stump <mrs@cygnus.com> 5133 5134 Fixes a problem of the this pointer being wrong in virtual calls to 5135 methods that are not overridden in more derived classes. 5136 5137 * class.c (fixup_vtable_delta): New routine. It will fixup the 5138 delta entries in vtables, wheever they need updating. 5139 * class.c (finish_struct): Call the new routine for all virtual 5140 bases, as they can have different offsets, than those used in base 5141 classes that we derive our vtable from. 5142 5143Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com) 5144 5145 * typeck.c (build_binary_op): Use the types before default 5146 conversions in the error message. 5147 5148 * *.c: Use c_build_type_variant instead of build_type_variant where 5149 the type might be an array. 5150 5151 * call.c (build_method_call): Call build_type_variant and 5152 build_reference_type in the right order. 5153 * decl.c (record_builtin_type): Ditto. 5154 5155Wed Jun 29 16:58:53 1994 Jason Merrill (jason@deneb.cygnus.com) 5156 5157 * call.c (build_method_call): Call build_type_variant and 5158 build_reference_type in the right order. 5159 * decl.c (record_builtin_type): Ditto. 5160 5161Tue Jun 28 23:49:28 1994 Jason Merrill (jason@deneb.cygnus.com) 5162 5163 * typeck.c (build_binary_op): Use the types before default 5164 conversions in the error message. 5165 5166 * *.c: Use c_build_type_variant instead of build_type_variant where 5167 the type might be an array. 5168 5169Sat Jun 25 11:50:54 1994 Jason Merrill (jason@deneb.cygnus.com) 5170 5171 * cvt.c (convert_to_reference): Try UDC's before doing the 5172 reinterpret_cast thang, though. 5173 5174Fri Jun 24 01:24:01 1994 Jason Merrill (jason@deneb.cygnus.com) 5175 5176 * typeck.c (c_expand_return): Don't USE the return value location 5177 after we've expanded the jump. 5178 5179 * decl2.c (finish_file): Make sure DECL_SAVED_INSNS is not 0 before 5180 trying to write out an inline. 5181 5182 * cvt.c (build_up_reference): Also do address adjustment when the 5183 target type uses MI. 5184 (convert_to_reference): Try UDCs only after built-in conversions. 5185 (build_type_conversion_1): Don't play games with the argument to the 5186 method. 5187 (build_type_conversion): #if 0 out code for binding to reference. 5188 5189Thu Jun 23 00:22:28 1994 Jason Merrill (jason@deneb.cygnus.com) 5190 5191 * decl2.c (finish_file): Use TREE_SYMBOL_REFERENCED to decide 5192 whether to emit inlines. 5193 5194 * decl.c (grokdeclarator): Set explicit_int for decls that just 5195 specify, say, 'long'. 5196 5197 * init.c (do_friend): Do overload C functions (or call pushdecl, 5198 anyaway). 5199 5200Wed Jun 22 13:40:49 1994 Jason Merrill (jason@deneb.cygnus.com) 5201 5202 * cvt.c (build_up_reference): Don't call readonly_error. 5203 (convert_to_reference): Propagate const and volatile from expr to 5204 its type. 5205 5206 * tree.c (lvalue_p): Random CALL_EXPRs are not lvalues. 5207 5208 * cvt.c (build_up_reference): Break out WITH_CLEANUP_EXPR when 5209 creating a temporary. 5210 (convert_to_reference): Lose excessive and incorrect trickiness. 5211 (cp_convert): Call build_cplus_new with with_cleanup_p set. 5212 5213 * typeck2.c (build_functional_cast): Ditto. 5214 5215Tue Jun 21 17:38:38 1994 Jason Merrill (jason@deneb.cygnus.com) 5216 5217 * decl.c (grokdeclarator): signed, unsigned, long and short all 5218 imply 'int'. 5219 5220 * decl.c (grokdeclarator): Allow "this is a type" syntax. 5221 (grok_reference_init): Simplify and fix. 5222 5223Sun Jun 19 17:08:48 1994 Jason Merrill (jason@deneb.cygnus.com) 5224 5225 * decl.c (grokdeclarator): pedwarn about a typedef that specifies no 5226 type. 5227 5228Sat Jun 18 04:16:50 1994 Jason Merrill (jason@deneb.cygnus.com) 5229 5230 * decl.c (start_function): Move TREE_PUBLIC and DECL_EXTERNAL 5231 tinkering to after call to pushdecl. 5232 5233Fri Jun 17 14:48:28 1994 Jason Merrill (jason@deneb.cygnus.com) 5234 5235 * call.c (build_method_call): Handle destructors for non-aggregate 5236 types properly. 5237 5238Thu Jun 16 16:48:05 1994 Jason Merrill (jason@deneb.cygnus.com) 5239 5240 * call.c (build_method_call): Make sure that the name given for the 5241 destructor matches the constructor_name of the instance. 5242 5243 * pt.c (do_function_instantiation): A non-extern instantiation 5244 overrides a later extern one. 5245 (do_type_instantiation): Ditto. 5246 5247Wed Jun 15 19:34:54 1994 Jason Merrill (jason@deneb.cygnus.com) 5248 5249 * init.c (expand_aggr_init): Use TYPE_MAIN_VARIANT to get the 5250 unqualified array type. 5251 5252 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Tests whether NODE is a 5253 CONSTRUCTOR with no elements. 5254 5255 * decl.c (various): Lose empty_init_node. 5256 (finish_decl): Use EMPTY_CONSTRUCTOR_P, do the empty CONSTRUCTOR 5257 thing depending on the value of DECL_COMMON instead of 5258 flag_conserve_space, do the empty CONSTRUCTOR thing for types that 5259 don't have constructors, don't treat a real empty CONSTRUCTOR 5260 specially. 5261 5262 * typeck2.c (process_init_constructor): Don't treat empty_init_node 5263 specially. 5264 5265Wed Jun 15 19:05:25 1994 Mike Stump <mrs@cygnus.com> 5266 5267 * class.c (override_one_vtable): Don't forget to merge in an old 5268 overrider when we wanted to reuse a vtable, but couldn't. 5269 5270Wed Jun 15 15:03:16 1994 Jason Merrill (jason@deneb.cygnus.com) 5271 5272 * decl.c (start_decl): Put statics in common again. 5273 5274 * decl.c (grokdeclarator): Return NULL_TREE for an error rather than 5275 setting the type to error_mark_node. 5276 5277 * typeck.c (build_modify_expr): Build up a COMPOUND_EXPR for enum 5278 bitfield assignments. 5279 5280Tue Jun 14 12:23:38 1994 Jason Merrill (jason@deneb.cygnus.com) 5281 5282 * decl.c (grok_op_properties): Const objects can be passed by value. 5283 5284Mon Jun 13 03:10:59 1994 Jason Merrill (jason@deneb.cygnus.com) 5285 5286 * decl2.c (import_export_vtable): Force implicit instantiations to 5287 be interface_only when -fno-implicit-templates. 5288 5289 * decl.c (duplicate_decls): Redeclaring a class template name is an 5290 error. 5291 5292 * pt.c (end_template_decl): Call GNU_xref_decl for class templates. 5293 * xref.c (GNU_xref_decl): Support templates. 5294 5295Sat Jun 11 17:09:05 1994 Jason Merrill (jason@deneb.cygnus.com) 5296 5297 * decl.c (grok_op_properties): Split out checking for whether this 5298 function should suppress the default assignment operator. 5299 * decl2.c (grok_function_init): Ditto. 5300 (copy_assignment_arg_p): New function do do just that. 5301 Now considers virtual assignment operators that take a base as an 5302 argument to count as copy assignment operators. 5303 5304 * search.c (dfs_debug_mark): Lose checks for DWARF_DEBUG and 5305 TREE_ASM_WRITTEN, as they are redundant. 5306 5307 * pt.c (end_template_decl): Don't try to set DECL_CLASS_CONTEXT on a 5308 decl that has no LANG_SPECIFIC part. 5309 (do_type_instantiation): Force the debugging information for this 5310 type to be emitted. 5311 5312 * decl.c (start_decl): Clear up uses of various types of templates 5313 (say sorry for static data members, rather than "invalid template"). 5314 (expand_static_init): Fix initialization of static data members of 5315 template classes. 5316 5317Fri Jun 10 00:41:19 1994 Jason Merrill (jason@deneb.cygnus.com) 5318 5319 * decl.c (grokdeclarator): Set DECL_CONTEXT on static data members. 5320 5321 * g++.c (main): Use -xc++-cpp-output for .i files. 5322 5323 * pt.c (tsubst): Give meaningful error about declaring template for 5324 a copy constructor which was not declared in the class template. 5325 (do_type_instantiation): Explicit instantiation before the class 5326 template is an error. 5327 (instantiate_template): Don't die if tsubst returns error_mark_node. 5328 5329Thu Jun 9 19:04:59 1994 Jason Merrill (jason@deneb.cygnus.com) 5330 5331 Don't synthesize the copy assignment operator if the one in a base 5332 class is pure virtual. 5333 * cp-tree.h (TYPE_HAS_ABSTRACT_ASSIGN_REF): New macro to indicate 5334 whether the type has a pure virtual copy assignment operator. 5335 * class.c (finish_base_struct): Don't generate the copy assignment 5336 operator if a base class has a pure virtual one. 5337 * decl.c (grok_op_properties): Add disabled code to set 5338 TYPE_HAS_ABSTRACT_ASSIGN_REF with comment pointing to where it is 5339 actually set. 5340 * decl2.c (grok_function_init): Set TYPE_HAS_ABSTRACT_ASSIGN_REF. 5341 5342 * decl2.c (import_export_vtable): Always treat template 5343 instantiations as if write_virtuals >= 2, and treat implicit 5344 instantiations as external if -fno-implicit-templates. 5345 (finish_file): Output all pending inlines if 5346 flag_keep_inline_functions. 5347 5348Wed Jun 8 20:48:02 1994 Mike Stump <mrs@cygnus.com> 5349 5350 * tree.c (layout_vbasetypes): Align virtual base classes inside 5351 complete objects, so that we don't core dump on machines such as 5352 SPARCs when we access members that require larger than normal 5353 alignments, such as a double. Also, we bump up the total alignment 5354 on the complete type, as necessary. 5355 5356Wed Jun 8 16:18:14 1994 Jason Merrill (jason@deneb.cygnus.com) 5357 5358 * gxxint.texi (Free Store): New section with code for examining 5359 cookie. 5360 (Limitations of g++): Remove operator delete entry, since it is no 5361 longer accurate. Fix access control entry. 5362 5363 * typeck.c (build_unary_op): Pedwarn about taking the address of or 5364 incrementing a cast to non-reference type. 5365 (build_modify_expr): Use convert instead of convert_force again. 5366 5367 * search.c (get_base_distance): Use IS_AGGR_TYPE_CODE to check for 5368 class type, not == RECORD_TYPE. 5369 5370 * decl.c (grokdeclarator): Cope with grokfndecl returning NULL_TREE. 5371 5372 * typeck2.c (report_case_error): #if 0 out. 5373 * lex.c (real_yylex): Lose RANGE. 5374 * parse.y: Ditto. 5375 5376Tue Jun 7 18:17:35 1994 Jason Merrill (jason@deneb.cygnus.com) 5377 5378 * parse.y (simple_stmt, case ranges): Use ELLIPSIS instead of RANGE. 5379 5380Mon Jun 6 19:39:57 1994 Jason Merrill (jason@deneb.cygnus.com) 5381 5382 * typeck.c (build_c_cast): Don't shortcut conversions to the same 5383 type. Don't replace consts with their values here, since that's now 5384 done in cp_convert. 5385 5386 * cvt.c (cp_convert): When converting to bool, take 5387 integer_zero_node to false_node and all other INTEGER_CSTs to 5388 true_node. 5389 (build_type_conversion): Don't complain about multiple conversions 5390 to float if we're not really converting. 5391 5392Fri Jun 3 02:10:56 1994 Jason Merrill (jason@deneb.cygnus.com) 5393 5394 Implement 'extern template class A<int>;' syntax for suppressing 5395 specific implicit instantiations. 5396 * cp-tree.h: Update prototypes for do_*_instantiation. 5397 * pt.c (do_pending_expansions): Don't compile 'extern' explicit 5398 instantiations. 5399 (do_function_instantiation): Set DECL_EXTERNAL on 'extern' explicit 5400 instantiations. 5401 (do_type_instantiation): Ditto. 5402 * parse.y (explicit_instantiation): Support 'extern template class 5403 A<int>;' syntax. 5404 * decl.c (start_function): Don't modify the settings of TREE_PUBLIC 5405 and DECL_EXTERNAL on explicit instantiations. 5406 5407 * cvt.c (cp_convert): Replace constants with their values before 5408 converting. 5409 (cp_convert): Consistently use 'e' instead of 'expr'. 5410 5411Thu Jun 2 03:53:30 1994 Jason Merrill (jason@deneb.cygnus.com) 5412 5413 * typeck2.c (build_x_arrow): Resolve OFFSET_REFs first. 5414 5415Wed Jun 1 18:57:35 1994 Jason Merrill (jason@deneb.cygnus.com) 5416 5417 * typeck2.c (digest_init): Handle initializing a pmf with an 5418 overloaded method. 5419 * typeck.c (build_ptrmemfunc): Handle overloaded methods. 5420 5421 * decl.c (pushtag): Use build_decl to make TYPE_DECLs. 5422 (xref_defn_tag): Ditto. 5423 * pt.c (process_template_parm): Ditto. 5424 (lookup_template_class): Ditto. 5425 (push_template_decls): Ditto. 5426 (instantiate_class_template): Ditto. 5427 (create_nested_upt): Ditto. 5428 * class.c (finish_struct): Don't try to set DECL_CLASS_CONTEXT on 5429 TYPE_DECLs. 5430 5431 * typeck.c (convert_arguments): Make sure type is not NULL before 5432 checking its TREE_CODE. 5433 5434Wed Jun 1 17:40:39 1994 Mike Stump <mrs@cygnus.com> 5435 5436 * class.c (get_derived_offset): New routine. 5437 * class.c (finish_base_struct): Make sure we set BINFO_VTABLE and 5438 BINFO_VIRTUALS when we choose a new base class to inherit from. 5439 * class.c (modify_one_vtable): Use get_derived_offset to get the 5440 offset to the most base class subobject that we derived this binfo 5441 from. 5442 * class.c (finish_struct): Move code to calculate the 5443 DECL_FIELD_BITPOS of the vfield up, as we need might need it for 5444 new calls to get_derived_offset in modify_one_vtable. 5445 5446Wed Jun 1 16:50:59 1994 Jason Merrill (jason@deneb.cygnus.com) 5447 5448 * init.c (build_member_call): Use build_pointer_type instead of 5449 TYPE_POINTER_TO. 5450 5451Wed Jun 1 11:11:15 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 5452 5453 * decl.c (grokdeclarator): Make sure we have a DNAME set before we 5454 try to use it in an error. 5455 5456Wed Jun 1 09:48:49 1994 Mike Stump <mrs@cygnus.com> 5457 5458 * typeck.c (convert_arguments, convert_for_initialization): Don't 5459 strip NOP_EXPRs, when we are converting to a reference. 5460 5461Wed Jun 1 01:11:38 1994 Jason Merrill (jason@deneb.cygnus.com) 5462 5463 * typeck.c (build_modify_expr): Don't dereference references when 5464 initializing them. 5465 5466 * decl2.c (grokfield): Don't check for grokdeclarator returning 5467 error_mark_node any more. 5468 5469 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. 5470 (start_method): Return void_type_node instead of error_mark_node. 5471 5472 * typeck.c (build_modify_expr): Resolve offset refs earlier. 5473 5474Tue May 31 16:06:58 1994 Jason Merrill (jason@deneb.cygnus.com) 5475 5476 * call.c (build_method_call): Resolve OFFSET_REFs in the object. 5477 5478 * typeck.c (build_modify_expr): Dereference references before trying 5479 to assign to them. 5480 5481 * call.c (build_method_call): Don't confuse type conversion 5482 operators with constructors. 5483 * typeck2.c (build_functional_cast): Just call build_c_cast if there 5484 was only one parameter. 5485 * method.c (build_typename_overload): Don't set 5486 IDENTIFIER_GLOBAL_VALUE on these identifiers. 5487 * decl.c (grok_op_properties): Warn about defining a type conversion 5488 operator that converts to a base class (or reference to it). 5489 * cvt.c (cp_convert): Don't try to use a type conversion operator 5490 when converting to a base class. 5491 (build_type_conversion_1): Don't call constructor_name_full on an 5492 identifier. 5493 * cp-tree.h (DERIVED_FROM_P): Should be self-explanatory. 5494 5495 * decl.c (start_decl): Don't complain that error_mark_node is an 5496 incomplete type. 5497 (finish_decl): Check for type == error_mark_node. 5498 5499Mon May 30 23:38:55 1994 Jason Merrill (jason@deneb.cygnus.com) 5500 5501 * decl.c (start_function): Set DECL_DEFER_OUTPUT on implicit 5502 instantiations and inline members. 5503 5504 * spew.c (yylex): Set looking_for_template if the next token is a '<'. 5505 5506 * lex.h: Declare looking_for_template. 5507 5508 * decl.c (lookup_name_real): Use looking_for_template to arbitrate 5509 between type and template interpretations of an identifier. 5510 5511Sat May 28 04:07:40 1994 Jason Merrill (jason@deneb.cygnus.com) 5512 5513 * pt.c (instantiate_template): Zero out p if we found a 5514 specialization. 5515 5516 * decl.c (grokdeclarator): Elucidate warning. 5517 (grokdeclarator): If pedantic AND -ansi, complain about long long. 5518 5519 Make explicit instantiation work reasonably. It is now appropriate 5520 to deprecate the use of -fexternal-templates. 5521 * pt.c (instantiate_template): Set DECL_TEMPLATE_SPECIALIZATION or 5522 DECL_IMPLICIT_INSTANTIATION on fndecl as appropriate. 5523 (end_template_instantiation): Reflect changes in USE_TEMPLATE 5524 semantics. 5525 (do_pending_expansions): if (!flag_implicit_templates) DECIDE(0); 5526 (do_function_instantiation): Don't set EXPLICIT_INST if 5527 flag_external_templates is set. Do set TREE_PUBLIC and DECL_EXTERN 5528 appropriately otherwise. 5529 (do_type_instantiation): Set interface info for class. Set 5530 TREE_PUBLIC and DECL_EXTERN for methods. Do none of this if 5531 flag_external_templates is set. 5532 * parse.y: Reflect changes in USE_TEMPLATE semantics. 5533 * decl2.c: New flag flag_implicit_templates determines whether or 5534 not implicit instantiations get emitted. This flag currently 5535 defaults to true, and must be true for -fexternal-templates to work. 5536 (finish_file): Consider flag_implement_inlines when 5537 setting DECL_EXTERNAL. Consider flag_implicit_templates when 5538 deciding whether or not to emit a static copy. 5539 * decl.c (start_function): Set TREE_PUBLIC and DECL_EXTERNAL 5540 properly for template instantiations. 5541 (start_method): Set DECL_IMPLICIT_INSTANTIATION on methods of a 5542 template class. 5543 * cp-tree.h (CLASSTYPE_USE_TEMPLATE): Change semantics. 5544 (DECL_USE_TEMPLATE): Parallel macro for FUNCTION and VAR_DECLs. 5545 (various others): Accessor macros for the above. 5546 5547Fri May 27 13:57:40 1994 Jason Merrill (jason@deneb.cygnus.com) 5548 5549 * typeck.c (build_binary_op_nodefault): Division by constant zero is 5550 an error. 5551 5552Fri May 27 13:50:15 1994 Mike Stump <mrs@cygnus.com> 5553 5554 * class.c (override_one_vtable): Don't modify things we don't own. 5555 5556Fri May 27 01:42:58 1994 Jason Merrill (jason@deneb.cygnus.com) 5557 5558 * decl.c (finish_decl): Don't postpone processing the initializer of 5559 a decl with DECL_EXTERNAL set, and do call rest_of_compilation for a 5560 PUBLIC const at toplevel. 5561 (grokdeclarator): pedwarn about initializing non-const or 5562 non-integral statics in the class body. 5563 5564 * decl.c (pushtag): Don't try to set DECL_CLASS_CONTEXT on a 5565 TYPE_DECL. 5566 5567 * call.c (convert_harshness): Dereference reference on rhs before 5568 proceeding, properly grok passing const things to non-const 5569 references. 5570 5571 * typeck.c (build_unary_op): Soften error about taking the address 5572 of main() to a pedwarn. 5573 5574 * lex.c (default_copy_constructor_body): Unambiguously specify base 5575 classes (i.e. A((const class ::A&)_ctor_arg) ). 5576 (default_assign_ref_body): Ditto. 5577 5578Thu May 26 13:13:55 1994 Gerald Baumgartner (gb@mexican.cygnus.com) 5579 5580 * decl2.c (grokfield): Don't complain about local signature 5581 method declaration without definition. 5582 5583 * call.c (convert_harshness): If `type' is a signature pointer 5584 and `parmtype' is a pointer to a signature, just return 0. We 5585 don't really convert in this case; it's a result of making the 5586 `this' parameter of a signature method a signature pointer. 5587 5588 * call.c (build_method_call): Distinguish calling the default copy 5589 constructor of a signature pointer/reference from a signature 5590 member function call. 5591 5592Thu May 26 12:56:25 1994 Jason Merrill (jason@deneb.cygnus.com) 5593 5594 * decl2.c (grokfield): Don't set TREE_PUBLIC on member function 5595 declarations. 5596 5597 * decl.c (duplicate_decls): A previous function declaration as 5598 static overrides a subsequent non-static definition. 5599 (grokdeclarator): Don't set TREE_PUBLIC on inline method 5600 declarations. 5601 5602Wed May 25 14:36:38 1994 Jason Merrill (jason@deneb.cygnus.com) 5603 5604 * decl.c (grokdeclarator): Handle initialization of static const 5605 members. 5606 (finish_decl): Ditto. 5607 5608 * decl2.c (grokfield): Allow initialization of static const members 5609 even when pedantic. 5610 5611 * decl2.c (grokfield): Deal with grokdeclarator returning 5612 error_mark_node. 5613 5614 * decl.c (grok_ctor_properties): Return 0 for A(A) constructor. 5615 (grokfndecl): Check the return value of grok_ctor_properties. 5616 (start_method): Ditto. 5617 5618 * parse.y (absdcl): Expand type_quals inline. 5619 5620Tue May 24 19:10:32 1994 Jason Merrill (jason@deneb.cygnus.com) 5621 5622 * decl.c (pushtag): Use IS_AGGR_TYPE rather than checking for a 5623 RECORD_TYPE. 5624 5625Tue May 24 18:09:16 1994 Per Bothner (bothner@kalessin.cygnus.com) 5626 5627 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks, 5628 always use "__vt_%s". 5629 * decl2.c (finish_vtable_vardecl): Don't consider abstract virtuals 5630 when looking for a "sentinal" method (to decide on emitting vtables). 5631 * decl2.c (finish_file): Scan all decls for thunks that need 5632 to be emitted. 5633 * decl2.c (finish_vtable_vardecl): Don't bother calling emit_thunk. 5634 * method.c (make_thunk): Use a more meaningful label. If there 5635 exists a matching top-level THUNK_DECL re-use it; otherwise 5636 create a new THUNK_DECL (and declare it). 5637 * method.c (emit_thunk): Make thunk external/public depending 5638 on the underlying method. 5639 5640Tue May 24 00:22:04 1994 Jason Merrill (jason@deneb.cygnus.com) 5641 5642 * pt.c (tsubst): Use lookup_name_nonclass to find guiding decls, not 5643 lookup_name. 5644 5645 * call.c (build_overload_call_real): Don't immediately pick a 5646 function which matches perfectly. 5647 5648 * decl.c (grokdeclarator): Use c_build_type_variant for arrays. 5649 (grokdeclarator): Warn about, and throw away, cv-quals attached to a 5650 reference (like 'int &const j'). 5651 5652 * typeck.c (convert_arguments): Don't mess with i for methods. 5653 * call.c (build_method_call): Pass the function decl to 5654 convert_arguments. 5655 5656 * typeck.c (comp_ptr_ttypes_real): New function. Implements the 5657 checking for which multi-level pointer conversions are allowed. 5658 (comp_target_types): Call it. 5659 (convert_for_assignment): Check const parity on the ultimate target 5660 type, too. And make those warnings pedwarns. 5661 5662Mon May 23 14:11:24 1994 Jason Merrill (jason@deneb.cygnus.com) 5663 5664 * error.c (dump_char): Use TARGET_* for character constants. 5665 5666Mon May 23 13:03:03 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 5667 5668 * tree.c (debug_no_list_hash): Make static. 5669 5670 * decl.c (decls_match): Say the types don't match if newdecl ends up 5671 with a null type, after we've checked if olddecl does. 5672 (pushdecl): Check if the decls themselves match before looking for 5673 an extern redeclared as static, to avoid inappropriate and incorrect 5674 warnings. 5675 5676Fri May 20 14:04:34 1994 Jason Merrill (jason@deneb.cygnus.com) 5677 5678 * decl.c (grokdeclarator): Make warning about duplicate short, etc. 5679 a pedwarn. 5680 5681 * typeck.c (build_c_cast): Casting to function or method type is an 5682 error. 5683 5684 * class.c (finish_struct): Make warning for anonymous class with no 5685 instances a pedwarn. 5686 5687 * Makefile.in (stamp-parse): Expect a s/r conflict. 5688 5689 * typeck.c (build_modify_expr): pedwarn about using a non-lvalue 5690 cast as an lvalue. 5691 5692Thu May 19 12:08:48 1994 Jason Merrill (jason@deneb.cygnus.com) 5693 5694 * cvt.c (type_promotes_to): Make sure bool promotes to int rather 5695 than unsigned on platforms where sizeof(char)==sizeof(int). 5696 5697Wed May 18 14:27:06 1994 Jason Merrill (jason@deneb.cygnus.com) 5698 5699 * typeck.c (build_c_cast): Tack on a NOP_EXPR when casting to 5700 another variant. 5701 (build_modify_expr): Don't strip NOP_EXPRs, and don't get tricky 5702 and treat them as lvalues. 5703 5704 * decl.c (shadow_tag): Do complain about forward declarations of 5705 enums and empty declarations. 5706 * parse.y: Don't complain about forward declarations of enums and 5707 empty declarations. 5708 5709 * typeck.c (convert_for_assignment): Complain about changing 5710 the signedness of a pointer's target type. 5711 5712 * parse.y (stmt): Move duplicated code for checking case values from 5713 here. 5714 * decl2.c (check_cp_case_value): To here. And add a call to 5715 constant_expression_warning. 5716 5717 * typeck.c (convert_for_assignment): Don't complain about assigning 5718 a negative value to bool. 5719 5720 * decl.c (init_decl_processing): Make bool unsigned. 5721 5722 * class.c (finish_struct): Allow bool bitfields. 5723 5724Wed May 18 12:35:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) 5725 5726 * Make-lang.in (c++.install-man): Get g++.1 from $(srcdir)/cp. 5727 5728Wed May 18 03:28:35 1994 Jason Merrill (jason@deneb.cygnus.com) 5729 5730 * cvt.c (build_type_conversion): Lose special handling of 5731 truthvalues. 5732 5733 * search.c (dfs_pushdecls): Improve shadowing warning. 5734 5735Tue May 17 13:34:46 1994 Jason Merrill (jason@deneb.cygnus.com) 5736 5737 * init.c (build_delete): Throw away const and volatile on `this'. 5738 5739 * decl.c (finish_enum): Put the constants in TYPE_VALUES again, 5740 rather than the enumerators. 5741 (pushtag): s/cdecl/c_decl/g 5742 5743Mon May 16 23:04:01 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) 5744 5745 * cp/typeck.c (common_type): Attribute merging. 5746 (comp_types): Utilise COMP_TYPE_ATTRIBUTES macro. 5747 5748 * cp/parse.y: Revamp attribute parsing. 5749 5750Mon May 16 01:40:34 1994 Jason Merrill (jason@deneb.cygnus.com) 5751 5752 * decl.c (shadow_tag): Also check for inappropriate use of auto and 5753 register. 5754 5755 * method.c (build_overload_name): Clarify that the illegal case is a 5756 pointer or reference to array of unknown bound. 5757 5758 * error.c (dump_type_prefix): Print references to arrays properly. 5759 5760 * typeck.c (various): Be more helpful in pointer 5761 comparison diagnostics. 5762 5763 * tree.c (lvalue_p): MODIFY_EXPRs are lvalues again. Isn't this 5764 fun? 5765 5766 * parse.y: Also catch an error after valid stmts. 5767 5768 * search.c (dfs_init_vbase_pointers): Don't abort because `this' is 5769 const. 5770 5771 * typeck.c (convert_for_initialization): If call to 5772 convert_to_reference generated a diagnostic, print out the parm 5773 number and function decl if any. 5774 5775 * errfn.c (cp_thing): Check atarg1 to determine whether or not we're 5776 specifying a line, not atarg. 5777 5778 * tree.c (build_cplus_method_type): Always make `this' const. 5779 5780 * decl2.c (grokclassfn): If -fthis-is-variable and this function is 5781 a constructor or destructor, make `this' non-const. 5782 5783 * typeck.c (build_modify_expr): Don't warn specially about 5784 assignment to `this' here anymore, since it will be caught by the 5785 usual machinery. 5786 5787 * various: Disallow specific GNU extensions (variable-size arrays, 5788 etc.) when flag_ansi is set, not necessarily when pedantic is set, 5789 so that people can compile with -pedantic-errors for tighter const 5790 checking and such without losing desirable extensions. 5791 5792 * typeck2.c (build_functional_cast): Call build_method_call with 5793 LOOKUP_PROTECT. 5794 (process_init_constructor): Only process FIELD_DECLs. 5795 5796 * decl.c (finish_decl): Also force static consts with no explicit 5797 initializer that need constructing into the data segment. 5798 5799 * init.c (build_delete): Undo last patch, as it interferes with 5800 automatic cleanups. 5801 5802Sat May 14 01:59:31 1994 Jason Merrill (jason@deneb.cygnus.com) 5803 5804 * call.c, class.h, cp-tree.h, cvt.c, decl2.c: Lose old overloading 5805 code. 5806 5807 * init.c (build_delete): pedwarn about using plain delete to delete 5808 an array. 5809 5810Fri May 13 16:45:07 1994 Jason Merrill (jason@deneb.cygnus.com) 5811 5812 * typeck.c (comp_target_types): Be more helpful in contravariance 5813 warnings, and make them pedwarns. 5814 5815 * decl.c (grokdeclarator): Use decl_context to decide whether or not 5816 this is an access declaration. 5817 5818 * class.c (finish_struct_bits): Set TYPE_HAS_INT_CONVERSION if it 5819 has a conversion to enum or bool, too. 5820 5821Fri May 13 16:31:27 1994 Mike Stump <mrs@cygnus.com> 5822 5823 * method.c (emit_thunk): Make declaration for 5824 current_call_is_indirect local (needed for hppa). 5825 5826Fri May 13 16:16:37 1994 Jason Merrill (jason@deneb.cygnus.com) 5827 5828 * pt.c (uses_template_parms): Grok BOOLEAN_TYPE. 5829 (tsubst): Ditto. 5830 5831Fri May 13 16:23:32 1994 Mike Stump <mrs@cygnus.com> 5832 5833 * pt.c (tsubst): If there is already a function for this expansion, 5834 use it. 5835 * pt.c (instantiate_template): Ditto. 5836 5837Fri May 13 10:30:42 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 5838 5839 * parse.y (implicitly_scoped_stmt, simple_stmt case): Use 5840 kept_level_p for MARK_ENDS argument to expand_end_bindings, to avoid 5841 generating debug info for unemitted symbols on some systems. 5842 5843 * cp-tree.h (build_static_cast, build_reinterpret_cast, 5844 build_const_cast): Add declarations. 5845 5846Fri May 13 09:50:31 1994 Mike Stump <mrs@cygnus.com> 5847 5848 * search.c (expand_indirect_vtbls_init): Fix breakage from Apr 27 5849 fix. We now try get_binfo, and if that doesn't find what we want, 5850 we go back to the old method, which still sometimes fails. 5851 5852Fri May 13 01:43:18 1994 Jason Merrill (jason@deneb.cygnus.com) 5853 5854 * parse.y (initdcl): Call cplus_decl_attributes on the right 5855 variable. 5856 * decl2.c (cplus_decl_attributes): Don't call decl_attributes for 5857 void_type_node. 5858 5859 * typeck.c (build_binary_op_nodefault): Change result_type for 5860 comparison ops to bool. 5861 (build_binary_op): Convert args of && and || to bool. 5862 * cvt.c (build_default_binary_type_conversion): Convert args of && 5863 and || to bool. 5864 (build_default_unary_type_conversion): Convert arg of ! to bool. 5865 (type_promotes_to): bool promotes to int. 5866 5867Fri May 13 01:43:18 1994 Mike Stump <mrs@cygnus.com> 5868 5869 Implement the new builtin `bool' type. 5870 * typeck.c (build_binary_op_nodefault): Convert args of && and || to 5871 bool. 5872 (build_unary_op): Convert arg of ! to bool. 5873 * parse.y: Know true and false. Use bool_truthvalue_conversion. 5874 * method.c (build_overload_value): Know bool. 5875 (build_overload_name): Ditto. 5876 * lex.c (init_lex): Set up RID_BOOL. 5877 * gxx.gperf: Add bool, true, false. 5878 * error.c (*): Know bool. 5879 * decl.c (init_decl_processing): Set up bool, true, false. 5880 * cvt.c (cp_convert): Handle conversion to bool. 5881 (build_type_conversion): Ditto. 5882 * *.c: Accept bool where integers and enums are accepted (use 5883 INTEGRAL_CODE_P macro). 5884 5885Thu May 12 19:13:54 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk) 5886 5887 * g++.c: Use #ifdef for __MSDOS__, not #if. 5888 5889Thu May 12 18:05:18 1994 Mike Stump <mrs@cygnus.com> 5890 5891 * decl2.c (lang_f_options): Handle -fshort-temps. -fshort-temps 5892 gives old behavior , and destroys temporaries earlier. Default 5893 behavior now conforms to the ANSI working paper. 5894 5895Thu May 12 14:45:35 1994 Jason Merrill (jason@deneb.cygnus.com) 5896 5897 * typeck.c (build_modify_expr): Understand MODIFY_EXPR as an lvalue. 5898 Use convert_force to convert the result of a recursive call when we 5899 are dealing with a NOP_EXPR. Don't automatically wrap MODIFY_EXPRs 5900 in COMPOUND_EXPRs any more. 5901 (various): Lose pedantic_lvalue_warning. 5902 (unary_complex_lvalue): Understand MODIFY_EXPR. 5903 5904 * cvt.c (convert_to_reference): Allow DECL to be error_mark_node if 5905 we don't know what we're initializing. 5906 5907Wed May 11 01:59:36 1994 Jason Merrill (jason@deneb.cygnus.com) 5908 5909 * cvt.c (convert_to_reference): Modify to use convtype parameter. 5910 Only create temporaries when initializing a reference, not when 5911 casting. 5912 (cp_convert): New main function. 5913 (convert): Call cp_convert. 5914 * cvt.c, decl.c, typeck.c: Fix calls to convert_to_reference. 5915 * cp-tree.h (CONV_*): New constants used by conversion code for 5916 selecting conversions to perform. 5917 5918 * tree.c (lvalue_p): MODIFY_EXPRs are no longer lvalues. 5919 5920 * typeck.c (build_{static,reinterpret,const_cast): Stubs that just 5921 call build_c_cast. 5922 * parse.y: Add {static,reinterpret,const}_cast. 5923 * gxx.gperf: Ditto. 5924 5925 * typeck.c (common_type): Allow methods with basetypes of different 5926 UPTs. 5927 (comptypes): Deal with UPTs. 5928 (build_modify_expr): Wrap all MODIFY_EXPRs in a COMPOUND_EXPR. 5929 5930 * pt.c (end_template_decl): Check for multiple definitions of member 5931 templates. 5932 5933 * call.c (build_method_call): Complain about calling an abstract 5934 virtual from a constructor. 5935 5936 * typeck.c (pointer_int_sum): Check for the integer operand being 0 5937 after checking the validity of the pointer operand. 5938 5939 * typeck2.c (digest_init): Pedwarn about string initializer being 5940 too long. 5941 5942Tue May 10 12:10:28 1994 Jason Merrill (jason@deneb.cygnus.com) 5943 5944 * decl.c (push_overloaded_decl): Only throw away a builtin if the 5945 decl in question is the artificial one. 5946 5947 * parse.y (simple_stmt, switch): Use implicitly_scoped_stmt because 5948 expand_{start,end}_case cannot happen in the middle of a block. 5949 5950 * cvt.c (build_type_conversion_1): Use convert again. 5951 5952Tue May 10 11:52:04 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 5953 5954 * typeck2.c (digest_init): Make sure we check for signed and 5955 unsigned chars as well when warning about string initializers. 5956 5957 * init.c (emit_base_init): Check if there's a DECL_NAME on the 5958 member before trying to do an initialization for it. 5959 5960Tue May 10 11:34:37 1994 Mike Stump <mrs@cygnus.com> 5961 5962 * except.c: Don't do anything useful when cross compiling. 5963 5964Tue May 10 03:04:13 1994 Jason Merrill (jason@deneb.cygnus.com) 5965 5966 * decl.c (duplicate_decls): Fix up handling of builtins yet again. 5967 (push_overloaded_decl): Ditto. 5968 5969 * cvt.c (convert): Don't look for void type conversion. 5970 5971Mon May 9 18:05:41 1994 Jason Merrill (jason@deneb.cygnus.com) 5972 5973 * init.c (do_friend): Only do a pushdecl for friends, not 5974 pushdecl_top_level. 5975 5976Mon May 9 13:36:34 1994 Jim Wilson (wilson@sphagnum.cygnus.com) 5977 5978 * decl.c (lookup_name_current_level): Put empty statement after 5979 the label OUT to make the code valid C. 5980 5981Mon May 9 12:20:57 1994 Jason Merrill (jason@deneb.cygnus.com) 5982 5983 * typeck.c (build_binary_op_nodefault): Only complain about 5984 comparing void * and a function pointer if void * is smaller. 5985 5986Sun May 8 01:29:13 1994 Jason Merrill (jason@deneb.cygnus.com) 5987 5988 * decl.c (lookup_name_current_level): Move through temporary binding 5989 levels. 5990 5991 * parse.y (already_scoped_stmt): Revive. 5992 (simple_stmt): Use it again. 5993 5994 * decl.c (poplevel): Always call poplevel recursively if we're 5995 dealing with a temporary binding level. 5996 5997Sat May 7 10:52:28 1994 Mike Stump <mrs@cygnus.com> 5998 5999 * decl.c (finish_decl): Make sure we run cleanups for initial values 6000 of decls. Cures memory leak. 6001 * decl.c (expand_static_init): Ditto for static variables. 6002 * decl2.c (finish_file): Ditto for globals. 6003 6004Sat May 7 03:57:44 1994 Jason Merrill (jason@deneb.cygnus.com) 6005 6006 * typeck.c (commonparms): Don't complain about redefining default 6007 args. 6008 6009 * decl.c (duplicate_decls): Don't complain twice about conflicting 6010 function decls. 6011 (decls_match): Don't look at default args. 6012 (redeclaration_error_message): Complain about redefining default 6013 args. 6014 6015 * call.c (build_overload_call_real): Also deal with guiding 6016 declarations coming BEFORE the template decl. 6017 6018 * pt.c (unify): Allow different parms to have different 6019 cv-qualifiers. 6020 (unify): Allow trivial conversions on non-template parms. 6021 6022Fri May 6 03:53:23 1994 Jason Merrill (jason@deneb.cygnus.com) 6023 6024 * pt.c (tsubst): Support OFFSET_TYPEs. 6025 (unify): Ditto. 6026 6027 * decl2.c (finish_decl_parsing): Call push_nested_class with a type. 6028 6029 * init.c (build_offset_ref): Fix error message. 6030 * search.c (lookup_field): Ditto. 6031 6032 * call.c (build_scoped_method_call): Pass binfo to 6033 build_method_call. 6034 * typeck.c (build_object_ref): Ditto. 6035 6036 * typeck2.c (binfo_or_else): Don't return a _TYPE. 6037 6038 * class.c (finish_struct): Don't complain about re-use of inherited 6039 names or shadowing of type decls. 6040 * decl.c (pushdecl_class_level): Ditto. 6041 6042 * decl.c (finish_enum): Set the type of all the enums. 6043 6044 * class.c (finish_struct): Don't get confused by access decls. 6045 6046 * cp-tree.h (TYPE_MAIN_DECL): New macro to get the _DECL for a 6047 _TYPE. You can stop using TYPE_NAME for that now. 6048 6049 * parse.y: Lose doing_explicit (check $0 instead). 6050 * gxx.gperf: 'template' now has a RID. 6051 * lex.h (rid): Ditto. 6052 * lex.c (init_lex): Set up the RID for 'template'. 6053 6054 * parse.y (type_specifier_seq): typed_typespecs or 6055 nonempty_type_quals. Use it. 6056 (handler_args): Fix bogus syntax. 6057 (raise_identifier{,s}, optional_identifier): Lose. 6058 * except.c (expand_start_catch_block): Use grokdeclarator to parse 6059 the catch variable. 6060 (init_exception_processing): The second argument to 6061 __throw_type_match is ptr_type_node. 6062 6063 Fri May 6 07:18:54 1994 Chip Salzenberg (chip@fin) 6064 6065 [ change propagated from c-decl.c of snapshot 940429 ] 6066 * cp/decl.c (finish_decl): Setting asmspec_tree should not 6067 zero out the old RTL. 6068 6069Fri May 6 01:25:38 1994 Mike Stump <mrs@cygnus.com> 6070 6071 Add alpha exception handling support to the compiler. 6072 Quick and dirty backend in except.c. 6073 6074 * cp/*: Remove most remnants of old exception handling support. 6075 * decl.c (finish_function): Call expand_exception_blocks to put 6076 the exception hanlding blocks at the end of the function. 6077 * dec.c (hack_incomplete_structures): Make sure expand_decl_cleanup 6078 comes after expand_decl_init. 6079 * except.c: Reimplementation. 6080 * expr.c (cplus_expand_expr): Handle THROW_EXPRs. 6081 * lex.c (init_lex): Always have catch, try and throw be reserved 6082 words, so that we may always parse exception handling. 6083 * parse.y: Cleanup to support new interface into exception handling. 6084 * tree.def (THROW_EXPR): Add. 6085 6086Thu May 5 17:35:37 1994 Jason Merrill (jason@deneb.cygnus.com) 6087 6088 * parse.y (simple_stmt, for loops): Use implicitly_scoped_stmt. 6089 (various): Lose .kindof_pushlevel and partially_scoped_stmt. 6090 6091Thu May 5 16:17:27 1994 Kung Hsu (kung@mexican.cygnus.com) 6092 6093 * parse.y (already_scoped_stmt): move expand_end_binding() to 6094 fix the unmatched LBB/LBE in stabs. 6095 6096Thu May 5 14:36:17 1994 Jason Merrill (jason@deneb.cygnus.com) 6097 6098 * decl.c (set_nested_typename): Set TREE_MANGLED on the new 6099 identifiers. 6100 (pushdecl): Check TREE_MANGLED. 6101 (xref_tag): Ditto. 6102 * cp-tree.h (TREE_MANGLED): This identifier is a 6103 DECL_NESTED_TYPENAME (named to allow for future use to denote 6104 mangled function names as well). 6105 6106 Implement inconsistency checking specified in [class.scope0]. 6107 * decl.c (lookup_name_real): Don't set ICV here after all. 6108 (finish_enum): Also set the type of the enumerators themselves. 6109 (build_enumerator): Put the CONST_DECL in the list instead of its 6110 initial value. 6111 (pushdecl_class_level): Check inconsistent use of a name in the 6112 class body. 6113 * class.c (finish_struct): Check inconsistent use of a name in the 6114 class body. Don't set DECL_CONTEXT on types here anymore. 6115 * parse.y (qualified_type_name): Note that the identifier has now 6116 been used (as a type) in the class body. 6117 * lex.c (do_identifier): Note that the identifier has now been used 6118 (as a constant) in the class body. 6119 * error.c (dump_decl): Print type and enum decls better. 6120 6121Thu May 5 09:35:35 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 6122 6123 * typeck.c (build_modify_expr): Warn about assignment to `this'. 6124 6125Wed May 4 15:55:49 1994 Jason Merrill (jason@deneb.cygnus.com) 6126 6127 * init.c (build_delete): Use the global operator delete when 6128 requested. 6129 6130 * decl.c (lookup_name_real): If we find the type we're looking in a 6131 base class while defining a class, set IDENTIFIER_CLASS_VALUE for 6132 the type. 6133 6134 * class.c (finish_struct): Remove a couple of dependencies on 6135 language linkage. 6136 6137 * decl.c (pushtag): Classes do nest in extern "C" blocks. 6138 (pushdecl): Only set DECL_NESTED_TYPENAME on the canonical one for 6139 the type. 6140 (pushtag): Remove another dependency on the language linkage. 6141 6142 * lex.c (cons_up_default_function): Don't set DECL_CLASS_CONTEXT to 6143 a const-qualified type. 6144 6145 * decl.c (push_overloaded_decl): Throw away built-in decls here. 6146 (duplicate_decls): Instead of here. 6147 6148Wed May 4 15:27:40 1994 Per Bothner (bothner@kalessin.cygnus.com) 6149 6150 * typeck.c (get_member_function_from_ptrfunc): Do The Right 6151 Thing (I hope) if we're using thunks. 6152 6153Wed May 4 13:52:38 1994 Jason Merrill (jason@deneb.cygnus.com) 6154 6155 * parse.y (specialization): aggr template_type_name ';'. 6156 (named_class_head_sans_basetype): Use it. 6157 (explicit_instantiation): Ditto. 6158 (tmpl.2): Revert. 6159 6160 * cvt.c (build_type_conversion_1): Use convert_for_initialization, 6161 rather than convert, to do conversions after the UDC. 6162 6163 * cp-tree.h (SHARED_MEMBER_P): This member is shared between all 6164 instances of the class. 6165 6166 * search.c (lookup_field): If the entity found by two routes is the 6167 same, it's not ambiguous. 6168 6169Wed May 4 12:10:00 1994 Per Bothner (bothner@kalessin.cygnus.com) 6170 6171 * decl.c (lookup_name_real): Check for a NULL TREE_VALUE, 6172 to prevent the compiler from crashing ... 6173 6174Wed May 4 11:19:45 1994 Jason Merrill (jason@deneb.cygnus.com) 6175 6176 * call.c (build_method_call): If we don't have an object, check 6177 basetype_path to figure out where to look up the function. 6178 6179 * typeck.c (convert_for_initialization): Pass TYPE_BINFO (type) to 6180 build_method_call in case exp is NULL_TREE. 6181 6182Tue May 3 16:02:53 1994 Per Bothner (bothner@kalessin.cygnus.com) 6183 6184 Give a vtable entries a unique named type, for the sake of gdb. 6185 * class.c (build_vtable_entry): The addres of a thunk now has 6186 type vtable_entry_type, not ptr_type_node. 6187 * method.c (make_thunk): Fix type of THUNK_DECL. 6188 * class.c (add_virtual_function, override_one_vtable): Use 6189 vfunc_ptr_type_node, instead of ptr_type_node. 6190 * cp-tree.h (vfunc_ptr_type_node): New macro. 6191 * decl.c (init_decl_processing): Make vtable_entry_type 6192 be a unique type of pointer to a unique function type. 6193 6194Tue May 3 09:20:44 1994 Jason Merrill (jason@deneb.cygnus.com) 6195 6196 * parse.y (do_explicit): Sets doing_explicit to 1. 6197 (explicit_instantiation): Use do_explicit rather than TEMPLATE 6198 directly, add "do_explicit error" rule. 6199 (datadef): Set doing_explicit to 0 after an explicit instantiation. 6200 (tmpl.2): Don't instantiate if we see a ';' unless we're doing an 6201 explicit instantiation. 6202 (named_class_head_sans_basetype): Remove aggr template_type_name 6203 ';' again. 6204 6205Mon May 2 23:17:21 1994 Jason Merrill (jason@deneb.cygnus.com) 6206 6207 * search.c (lookup_nested_tag): Lose. 6208 6209 * decl2.c (grokfield): Set DECL_CONTEXT on TYPE_DECLs. 6210 (lookup_name_nonclass): Lose. 6211 6212 * decl.c (poplevel_class): Add force parameter. 6213 (lookup_name_real): Fix handling of explicit scoping which specifies 6214 a class currently being defined. Add 'nonclass' argument. 6215 (lookup_name, lookup_name_nonclass): Shells for lookup_name_real. 6216 6217 * class.c (finish_struct): Don't unset IDENTIFIER_CLASS_VALUEs here. 6218 (popclass): Force clearing of IDENTIFIER_CLASS_VALUEs if we're being 6219 called from finish_struct. 6220 6221Mon May 2 19:06:21 1994 Per Bothner (bothner@kalessin.cygnus.com) 6222 6223 * decl.c (init_decl_processing), cp-tree.h: Removed memptr_type. 6224 (It seeems redundant, given build_ptrmemfunc_type.) 6225 * typeck.c (get_member_function_from_ptrfunc), gc.c (build_headof, 6226 build_classof): Use vtable_entry_type instead of memptr_type. 6227 * method.c (emit_thunk): Call poplevel with functionbody==0 6228 to prevent DECL_INITIAL being set to a BLOCK. 6229 6230Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com) 6231 6232 * parse.y (named_class_head_sans_basetype): Add "aggr 6233 template_type_name ';'" rule for forward declaration of 6234 specializations. 6235 6236Mon May 2 15:02:11 1994 Jason Merrill (jason@deneb.cygnus.com) 6237 6238 * class.c (instantiate_type): Deal with pmf's. 6239 6240 * Make-lang.in (cc1plus): Don't depend on OBJS or BC_OBJS, since 6241 stamp-objlist does. 6242 6243 * Makefile.in (../cc1plus): Depend on OBJDEPS. 6244 (OBJDEPS): Dependency version of OBJS. 6245 6246Mon May 2 12:51:31 1994 Kung Hsu (kung@mexican.cygnus.com) 6247 6248 * search.c (dfs_debug_mark): unmark TYPE_DECL_SUPPRESS_DEBUG, not 6249 DECL_IGNORED_P. 6250 6251Fri Apr 29 12:29:56 1994 Jason Merrill (jason@deneb.cygnus.com) 6252 6253 * class.c (finish_struct): Clear out memory of local tags. And 6254 typedefs. 6255 6256 * decl2.c (grokclassfn): Don't set DECL_CONTEXT to a cv-qualified 6257 type. 6258 * search.c (get_matching_virtual): Be more helpful in error message. 6259 6260 * *: Use DECL_ARTIFICIAL (renamed from DECL_SYNTHESIZED). 6261 6262 * lex.c (default_assign_ref_body): Expect TYPE_NESTED_NAME to work. 6263 (default_copy_constructor_body): Ditto. 6264 6265 * class.c (finish_struct): Don't gratuitously create multiple decls 6266 for nested classes. 6267 6268Thu Apr 28 23:39:38 1994 Jason Merrill (jason@deneb.cygnus.com) 6269 6270 Avoid clobbering the arg types of other functions when reverting 6271 static member functions. 6272 * decl.c (revert_static_member_fn): Rearrange arguments, don't 6273 require values for 'fn' and 'argtypes', add warning to comment 6274 above. 6275 (decls_match): Rearrange arguments in call to rsmf. 6276 (grok_op_properties): Don't pass values for fn and argtypes. 6277 * pt.c (instantiate_template): Don't pass values for fn and argtypes. 6278 6279Thu Apr 28 16:29:11 1994 Doug Evans (dje@canuck.cygnus.com) 6280 6281 * Make-lang.in (cc1plus): Depend on stamp-objlist. 6282 * Makefile.in (BC_OBJS): Delete. 6283 (OBJS): Cat ../stamp-objlist to get language independent files. 6284 Include ../c-common.o. 6285 (../cc1plus): Delete reference to BC_OBJS. 6286 6287Thu Apr 28 02:12:08 1994 Jason Merrill (jason@deneb.cygnus.com) 6288 6289 * search.c (compute_access): No really, deal with static members 6290 properly. Would I lie to you? 6291 6292 Implement lexical hiding of function declarations. 6293 * pt.c (tsubst): Use lookup_name to look for function decls to guide 6294 instantiation. 6295 * method.c (build_opfncall): Use lookup_name_nonclass to look for 6296 non-member functions. 6297 * init.c (do_friend): Use lookup_name_nonclass to look for 6298 functions. 6299 * error.c (ident_fndecl): Use lookup_name to look for functions. 6300 * decl2.c (lookup_name_nonclass): New function, skips over 6301 CLASS_VALUE. 6302 * decl.c (struct binding_level): Lose overloads_shadowed field. 6303 (poplevel): Don't deal with overloads_shadowed. 6304 (push_overloaded_decl): Do lexical hiding for functions. 6305 * class.c (instantiate_type): Don't check non-members if we have 6306 members with the same name. 6307 * call.c (build_method_call): Use lookup_name_nonclass instead of 6308 IDENTIFIER_GLOBAL_VALUE to check for non-member functions. 6309 (build_overload_call_real): Ditto. 6310 6311 * decl.c (duplicate_decls): Check for ambiguous overloads here. 6312 (push_overloaded_decl): Instead of here. 6313 6314 * decl.c (pushdecl): Back out Chip's last change. 6315 6316 * decl.c (grok_op_properties): operators cannot be static members. 6317 6318 * cp-tree.h (DECL_SYNTHESIZED): DECL_SOURCE_LINE == 0 6319 (SET_DECL_SYNTHESIZED): DECL_SOURCE_LINE = 0 6320 * lex.c (cons_up_default_function): Use SET_DECL_SYNTHESIZED. 6321 6322 * method.c (do_inline_function_hair): Don't put friends of local 6323 classes into global scope, either. 6324 6325 * typeck2.c (build_functional_cast): Don't look for a function call 6326 interpretation. 6327 6328Thu Apr 28 15:19:46 1994 Mike Stump <mrs@cygnus.com> 6329 6330 * cp-tree.h: disable use of backend EH. 6331 6332Wed Apr 27 21:01:24 1994 Doug Evans (dje@canuck.cygnus.com) 6333 6334 * Make-lang.in (c++.distdir): mkdir tmp/cp first. 6335 * Makefile.in (INCLUDES): Move definition to same place as 6336 parent makefile. 6337 (ALLOCA): Define. 6338 (OLDAR_FLAGS): Delete. 6339 (OLDCC): Define. 6340 (DIR): Delete. 6341 (CLIB): Define. 6342 (####site): Delete. 6343 (SUBDIR_USE_ALLOCA): Don't use ALLOCA if compiling with gcc. 6344 6345Wed Apr 27 19:10:04 1994 Kung Hsu (kung@mexican.cygnus.com) 6346 6347 * decl.c (xref_tag): not to use strstr(), it's not available on 6348 all platforms. 6349 6350Wed Apr 27 18:10:12 1994 Jason Merrill (jason@deneb.cygnus.com) 6351 6352 * class.c (finish_struct): Resolve yet another class/pmf confusion. 6353 6354 * call.c (build_overload_call_real): Don't take the single-function 6355 shortcut if we're dealing with an overloaded operator. 6356 6357Wed Apr 27 17:35:37 1994 Mike Stump <mrs@cygnus.com> 6358 6359 * search.c (get_base_distance): Search the virtual base class 6360 binfos, incase someone wants to convert to a real virtual base 6361 class. 6362 * search.c (expand_indirect_vtbls_init): Use convert_pointer_to_real 6363 instead of convert_pointer_to, as it now will work. 6364 6365Wed Apr 27 15:36:49 1994 Jason Merrill (jason@deneb.cygnus.com) 6366 6367 * cvt.c (convert_to_reference): Don't complain about casting away 6368 const and volatile. 6369 6370 * typeck.c (build_unary_op): References are too lvalues. 6371 6372Wed Apr 27 13:58:05 1994 Mike Stump <mrs@cygnus.com> 6373 6374 * class.c (override_one_vtable): We have to prepare_fresh_vtable 6375 before we modify it, not after, also, we cannot reuse an old vtable, 6376 once we commit to a new vtable. Implement ambiguous overrides in 6377 virtual bases as abstract. Hack until we make the class 6378 ill-formed. 6379 6380Wed Apr 27 01:17:08 1994 Jason Merrill (jason@deneb.cygnus.com) 6381 6382 * parse.y (unary_expr): Expand new_placement[opt] and 6383 new_initializer[opt] inline. 6384 6385 * search.c (lookup_fnfields): Don't throw away the inheritance 6386 information here, either. 6387 (compute_access): Handle static members properly. 6388 6389 * init.c (build_member_call): Always set basetype_path, and pass it 6390 to lookup_fnfields. 6391 6392 * search.c (lookup_field): Deal properly with the case where 6393 xbasetype is a chain of binfos; don't throw away the inheritance 6394 information. 6395 (compute_access): protected_ok always starts out at 0. 6396 6397 * init.c (resolve_offset_ref): Don't cast `this' to the base type 6398 until we've got our basetype_path. 6399 6400 * cp-tree.h (IS_OVERLOAD_TYPE): aggregate or enum. 6401 6402 * cvt.c (build_up_reference): Use build_pointer_type rather than 6403 TYPE_POINTER_TO. 6404 6405 * call.c (convert_harshness_ansi): Call type_promotes_to for reals 6406 as well. 6407 6408 * cvt.c (type_promotes_to): Retain const and volatile, add 6409 float->double promotion. 6410 6411 * decl.c (grokdeclarator): Don't bash references to arrays into 6412 references to pointers in function parms. Use type_promotes_to. 6413 6414Tue Apr 26 23:44:36 1994 Mike Stump <mrs@cygnus.com> 6415 6416 Finish off Apr 19th work. 6417 6418 * class.c (finish_struct_bits): Rename has_abstract_virtuals to 6419 might_have_abstract_virtuals. 6420 * class.c (strictly_overrides, override_one_vtable, 6421 merge_overrides): New routines to handle virtual base overrides. 6422 * class.c (finish_struct): Call merge_overrides to handle overrides 6423 in virtual bases. 6424 6425Tue Apr 26 12:45:53 1994 Jason Merrill (jason@deneb.cygnus.com) 6426 6427 * typeck.c (build_function_call): Call build_function_call_real with 6428 LOOKUP_NORMAL. 6429 6430 * *: Don't deal with TYPE_EXPRs. 6431 6432 * tree.c (lvalue_p): If the type of the expression is a reference, 6433 it's an lvalue. 6434 6435 * cvt.c (convert_to_reference): Complain about passing const 6436 lvalues to non-const references. 6437 (convert_from_reference): Don't arbitrarily throw away const and 6438 volatile on the target type. 6439 6440 * parse.y: Simplify and fix rules for `new'. 6441 6442 * decl.c (grok_op_properties): operator void is illegal. 6443 6444Mon Apr 25 02:36:28 1994 Jason Merrill (jason@deneb.cygnus.com) 6445 6446 * parse.y (components): Anonymous bitfields can still have declspecs. 6447 6448 * decl.c (pushdecl): Postpone handling of function templates like we 6449 do C functions. 6450 6451 * search.c (expand_indirect_vtbls_init): Fix infinite loop when 6452 convert_pointer_to fails. 6453 6454 * call.c (compute_conversion_costs_ansi): A user-defined conversion 6455 by itself is better than that UDC followed by standard conversions. 6456 Don't treat integers and reals specially. 6457 6458 * cp-tree.h: Declare flag_ansi. 6459 6460 * typeck.c (c_expand_return): pedwarn on return in void function 6461 even if the expression is of type void. 6462 (build_c_cast): Don't do as much checking for casts to void. 6463 (build_modify_expr): pedwarn about array assignment if this code 6464 wasn't generated by the compiler. 6465 6466 * tree.c (lvalue_p): A comma expression is an lvalue if its second 6467 operand is. 6468 6469 * typeck.c (default_conversion): Move code for promoting enums and 6470 ints from here. 6471 * cvt.c (type_promotes_to): To here. 6472 * call.c (convert_harshness_ansi): Use type_promotes_to. Also fix 6473 promotion semantics for reals. 6474 6475Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com) 6476 6477 * Make-lang.in (c++.install-common): Check for g++-cross. 6478 * Makefile.in: Remove Cygnus cruft. 6479 (config.status): Delete. 6480 (RTL_H): Define. 6481 (TREE_H): Use complete pathname, some native makes have minimal 6482 VPATH support. 6483 (*.o): Use complete pathname to headers in parent dir. 6484 (doc, info, dvi): Delete. 6485 6486Sun Apr 24 16:52:51 1994 Doug Evans (dje@canuck.cygnus.com) 6487 6488 * Make-lang.in (c++.install-common): Check for g++-cross. 6489 * Makefile.in: Remove Cygnus cruft. 6490 (config.status): Delete. 6491 (RTL_H): Define. 6492 (TREE_H): Use complete pathname, some native makes have minimal 6493 VPATH support. 6494 (*.o): Use complete pathname to headers in parent dir. 6495 (doc, info, dvi): Delete. 6496 6497Sun Apr 24 00:47:49 1994 Jason Merrill (jason@deneb.cygnus.com) 6498 6499 * decl.c (pushdecl): Avoid redundant warning on redeclaring function 6500 with different return type. 6501 (decls_match): Compare return types strictly. 6502 6503Fri Apr 22 12:55:42 1994 Jason Merrill (jason@deneb.cygnus.com) 6504 6505 * cvt.c (build_type_conversion): Do try to convert through other 6506 pointers. This will fail if the class defines multiple pointer 6507 conversions. 6508 6509 * error.c (dump_type_prefix): Print out pointers to arrays properly. 6510 (dump_type_suffix): Ditto. (was 'int *[]', now 'int (*)[]') 6511 6512 * typeck.c (build_unary_op): Disallow ++/-- on pointers to 6513 incomplete type. 6514 6515 * decl.c (duplicate_decls): Check mismatched TREE_CODES after 6516 checking for shadowing a builtin. If we're redeclaring a builtin 6517 function, bash the old decl to avoid an ambiguous overload. 6518 6519 * cvt.c (convert_to_reference): Don't force arrays to decay here. 6520 6521 * tree.c (lvalue_p): A MODIFY_EXPR is an lvalue. 6522 6523 * decl.c (duplicate_decls): Don't assume that the decls will have 6524 types. 6525 6526 Mon Apr 18 11:35:32 1994 Chip Salzenberg (chip@fin.uucp) 6527 6528 [ cp/* changes propagated from c-* changes in 940318 snapshot ] 6529 * c-decl.c (pushdecl): Warn if type mismatch with another external decl 6530 in a global scope. 6531 6532 Fri Apr 22 06:38:56 1994 Chip Salzenberg (chip@fin.uucp) 6533 6534 * cp/typeck2.c (signature_error): Use cp_error for "%T". 6535 6536 Mon Apr 18 11:59:59 1994 Chip Salzenberg (chip@fin.uucp) 6537 6538 [ cp/* changes propagated from c-* changes in 940415 snapshot ] 6539 * cp/decl.c (duplicate_decls, pushdecl, builtin_function): 6540 Use DECL_FUNCTION_CODE instead of DECL_SET_FUNCTION_CODE. 6541 6542 Mon Apr 18 11:55:18 1994 Chip Salzenberg (chip@fin.uucp) 6543 6544 [ cp/* changes propagated from c-* changes in 940409 snapshot ] 6545 * cp/decl.c (duplicate_decls): Put new type in same obstack as 6546 old ones, or permanent if old ones in different obstacks. 6547 6548 Mon Apr 18 11:48:49 1994 Chip Salzenberg (chip@fin.uucp) 6549 6550 [ cp/* changes propagated from c-* changes in 940401 snapshot ] 6551 * cp/parse.y (attrib): Handle string args as expressions, 6552 merging the two rules. `mode' attribute now takes a string arg. 6553 Delete the rule for an identifier as arg. 6554 6555 Mon Apr 18 11:24:00 1994 Chip Salzenberg (chip@fin.uucp) 6556 6557 [ cp/* changes propagated from c-* changes in 940312 snapshot ] 6558 * cp/typeck.c (pointer_int_sum): Multiplication should be done signed. 6559 (pointer_diff): Likewise the division. 6560 6561 Sun Mar 6 19:43:39 1994 Chip Salzenberg (chip@fin.uucp) 6562 6563 [ cp/* changes propagated from c-* changes in 940304 snapshot ] 6564 * cp/decl.c (finish_decl): Issue warning for large objects, 6565 if requested. 6566 6567 Sat Feb 19 22:20:32 1994 Chip Salzenberg (chip@fin.uucp) 6568 6569 [ cp/* changes propagated from c-* changes in 940218 snapshot ] 6570 * cp/parse.y (attrib): Handle attribute ((section ("string"))). 6571 * cp/decl.c (duplicate_decls): Merge section name into new decl. 6572 6573 Tue Feb 8 09:49:17 1994 Chip Salzenberg (chip@fin.uucp) 6574 6575 [ cp/* changes propagated from c-* changes in 940206 snapshot ] 6576 * cp/typeck.c (signed_or_unsigned_type): Check for any 6577 INTEGRAL_TYPE_P not just INTEGER_TYPE. 6578 6579 Mon Dec 6 13:35:31 1993 Norbert Kiesel (norbert@i3.INformatik.rwth-aachen.DE) 6580 6581 * cp/decl.c (finish_enum): Start from 0 when determining precision 6582 for short enums. 6583 6584 Fri Dec 3 17:07:58 1993 Ralph Campbell (ralphc@pyramid.COM) 6585 6586 * cp/parse.y (unary_expr): Look at $1 for tree_code rather than 6587 casting $$. 6588 6589 Wed Nov 17 19:22:09 1993 Chip Salzenberg (chip@fin.uucp) 6590 6591 * cp/typeck.c (build_binary_op_nodefault): Propagate code 6592 from C front-end to optimize unsigned short division. 6593 (build_conditional_expr): Fix bug in "1 ? 42 : (void *) 8". 6594 6595 Wed Nov 17 19:17:18 1993 Chip Salzenberg (chip@fin.uucp) 6596 6597 * cp/call.c (convert_harshness_ansi): Given an (e.g.) char 6598 constant, prefer 'const char &' to 'int'. 6599 6600 Wed Feb 3 13:11:48 1993 Chip Salzenberg (chip@fin.uucp) 6601 6602 * cp/class.c (finish_struct_methods): Handle multiple 6603 constructors in fn_fields list. 6604 6605Fri Apr 22 12:48:10 1994 Kung Hsu (kung@mexican.cygnus.com) 6606 6607 * class.c (finish_struct): use TYPE_DECL_SUPPRESS_DEBUG to flag 6608 types not to be dumped in stabs, like types in #pragma interface. 6609 * decl.c (init_decl_processing): use TYPE_DECL_SUPPRESS_DEBUG to 6610 mark unknown type. 6611 6612Fri Apr 22 03:27:26 1994 Doug Evans (dje@cygnus.com) 6613 6614 * Language directory reorganization. 6615 See parent makefile. 6616 6617Thu Apr 21 18:27:57 1994 Per Bothner (bothner@kalessin.cygnus.com) 6618 6619 * cp-tree.h (THUNK_DELTA): It is normally negative, so 6620 use signed .i variant of frame_size rather than unsigned .u. 6621 * cp-tree.h (VTABLE_NAME_FORMAT): If flag_vtable_thunks, 6622 use "VT" rather than "vt" due to binary incompatibility. 6623 * class.c (get_vtable_name): Use strlen of VTABLE_NAME_FORMAT, 6624 rather than sizeof, since it is now an expression. 6625 * class.c (modify_one_vtable): Modify to skip initial element 6626 containing a count of the vtable. 6627 6628Thu Apr 21 00:09:02 1994 Jason Merrill (jason@deneb.cygnus.com) 6629 6630 * lex.c (check_newline): Force interface_unknown on main input file. 6631 6632 * pt.c (do_pending_expansions): Always emit functions that have been 6633 explicitly instantiated. 6634 (do_function_instantiation): Set DECL_EXPLICITLY_INSTANTIATED. 6635 (do_type_instantiation): Set CLASSTYPE_VTABLE_NEEDS_WRITING and 6636 DECL_EXPLICITLY_INSTANTIATED on all my methods. 6637 * parse.y (explicit_instantiation): Call do_type_instantiation for 6638 types. 6639 * decl2.c (finish_vtable_vardecl): Call import_export_vtable. 6640 * decl.c (start_function): Don't set DECL_EXTERNAL on a function 6641 that has been explicitly instantiated. 6642 * cp-tree.h (DECL_EXPLICITLY_INSTANTIATED): Alias for 6643 DECL_LANG_FLAG_4. 6644 * class.c: Move import_export_vtable to decl2.c, and comment out all 6645 uses. 6646 6647Wed Apr 20 16:51:06 1994 Jason Merrill (jason@deneb.cygnus.com) 6648 6649 * lex.c (process_next_inline): Don't muck with DECL_INLINE. 6650 (do_pending_inlines): Ditto. 6651 6652Tue Apr 19 22:25:41 1994 Mike Stump <mrs@cygnus.com> 6653 6654 Reimplement vtable building, and most vtable pointer setting. 6655 Allows for earier maintenance, easier understandability, and most 6656 importantly, correct semantics. 6657 6658 * class.c (build_vtable): Removed unneeded 6659 SET_BINFO_VTABLE_PATH_MARKED. 6660 * class.c (prepare_fresh_vtable): Ditto. Added argument. 6661 * class.c (modify_vtable_entry): General cleanup. 6662 * class.c (related_vslot, is_normal, modify_other_vtable_entries, 6663 modify_vtable_entries): Removed. 6664 * class.c (add_virtual_function): General cleanup. 6665 * class.c (finish_base_struct): Setup BINFO_VTABLE and 6666 BINFO_VIRTUALS as early as we can, so that modify_all_vtables can 6667 work. 6668 * class.c (finish_vtbls): New routine, mostly from 6669 unmark_finished_struct. 6670 * class.c (overrides): New routine. 6671 * class.c (modify_one_vtable): New routine, mostly from 6672 modify_other_vtable_entries and modify_vtable_entries. 6673 * class.c (modify_all_direct_vtables, modify_all_indirect_vtables, 6674 modify_all_vtables): New routines. 6675 * class.c (finish_struct): Added arguemnt to prepare_fresh_vtable 6676 call. General cleanup on how pending_hard_virtuals are handled. 6677 General cleanup on modifying vtables. Use finish_vtbls, instead of 6678 unmark_finished_struct. 6679 * cp-tree.h (init_vtbl_ptrs, expand_direct_vtbls_init, 6680 get_first_matching_virtual, get_matching_virtual, 6681 expand_vbase_vtables_init, expand_indirect_vtbls_init): Update. 6682 * cvt.c (convert_pointer_to_real): cleanup error message. 6683 * decl.c (grokfndecl): General cleanup. 6684 * decl.c (finish_function): Change init_vtbl_ptrs call to 6685 expand_direct_vtbls_init. Change expand_vbase_vtables_init call to 6686 expand_indirect_vtbls_init. 6687 * init.c (expand_virtual_init): Remove unneeded argument. 6688 * init.c (init_vtbl_ptrs): Rename to expand_direct_vtbls_init, added 6689 two arguments to make more general. Made more general. Now can be 6690 used for vtable pointer initialization from virtual bases. 6691 * init.c (emit_base_init): Change expand_vbase_vtables_init call to 6692 expand_indirect_vtbls_init. Change init_vtbl_ptrs call to 6693 expand_direct_vtbls_init. 6694 * init.c (expand_virtual_init): General cleanup. 6695 * init.c (expand_default_init): Change expand_vbase_vtables_init 6696 call to expand_indirect_vtbls_init. 6697 * init.c (expand_recursive_init_1): Change expand_vbase_vtables_init 6698 call to expand_indirect_vtbls_init. 6699 * init.c (expand_recursive_init): Change expand_vbase_vtables_init 6700 call to expand_indirect_vtbls_init. 6701 * search.c (get_first_matching_virtual): Rename to 6702 get_matching_virtual. General cleanup and remove setting of 6703 DECL_CONTEXT. That is now done in a cleaner way in 6704 modify_vtable_entry and add_virtual_function. 6705 * search.c (expand_vbase_vtables_init): Rename to 6706 expand_indirect_vtbls_init. General cleanup. Use 6707 expand_direct_vtbls_init to do hard work. Ensures that _all_ vtable 6708 pointers from virtual bases are set up. 6709 * search.c (bfs_unmark_finished_struct, unmark_finished_struct): 6710 Removed. 6711 6712 * *.[chy]: Remove support for VTABLE_USES_MASK. 6713 6714Tue Apr 19 12:51:59 1994 Jason Merrill (jason@deneb.cygnus.com) 6715 6716 * cvt.c (convert_to_reference): Use NOP_EXPRs to switch between 6717 reference and pointer types instead of bashing the types directly. 6718 6719 * call.c (build_overload_call_real): Use the TREE_CODE to determine 6720 whether the function is overloaded or not, rather than 6721 TREE_OVERLOADED. 6722 * *: Remove all uses of TREE_OVERLOADED. 6723 6724 * decl.c (grokdeclarator): Only complain about initializing const 6725 fields when -ansi or -pedantic. 6726 6727Tue Apr 19 12:42:42 1994 Doug Evans (dje@canuck.cygnus.com) 6728 6729 * cp-tree.h (THUNK_DELTA): frame_size is now a union. 6730 6731Mon Apr 18 00:17:13 1994 Jason Merrill (jason@deneb.cygnus.com) 6732 6733 Do overloading on a block-by-block basis, not function-by-function. 6734 * decl.c: Lose overloads_to_forget. 6735 (struct binding_level): Add overloads_shadowed field. 6736 (poplevel): Restore overloads_shadowed. 6737 (push_overloaded_decl): Use overloads_shadowed instead of 6738 overloads_to_forget. 6739 (finish_function): Don't look at overloads_to_forget. 6740 6741 Copy enum_overflow logic from c-decl.c. 6742 * decl.c (start_enum): Initialize enum_overflow. 6743 (build_enumerator): Use enum_overflow. Also use current_scope(). 6744 6745 * search.c (current_scope): Move Brendan's comment from 6746 build_enumerator here. 6747 6748 * typeck.c (convert_for_assignment): Change warnings to pedwarns for 6749 discarding const/volatile. 6750 6751Sat Apr 16 01:18:21 1994 Jason Merrill (jason@deneb.cygnus.com) 6752 6753 * typeck.c (comp_target_parms): Accept TEMPLATE_TYPE_PARMs on the rhs. 6754 (comp_target_types): Ditto. 6755 6756 * decl.c (lookup_name): Don't unset got_scope here. 6757 6758 * spew.c (yylex): Only replace yylval with the TYPE_NESTED_NAME if 6759 got_scope != NULL_TREE. 6760 6761Fri Apr 15 16:36:33 1994 Jason Merrill (jason@deneb.cygnus.com) 6762 6763 Horrible kludge to prevent templates from being instantiated by 6764 their base classes. 6765 * parse.y (template_instantiate_once): Unset TYPE_BEING_DEFINED 6766 before we get to left_curly. 6767 * pt.c (instantiate_class_template): Set TYPE_BEING_DEFINED. 6768 6769 * error.c (dump_decl): If it's a typedef, print out the name of the 6770 decl, not just the underlying type. 6771 6772 * decl.c (pushdecl): If the old duplicate decl was a TYPE_DECL, 6773 update the IDENTIFIER_TYPE_VALUE of its name. 6774 6775 * decl2.c (finish_file): When processing the initializer for a 6776 static member, pretend that the dummy function is a member of the 6777 same class. 6778 6779Fri Apr 15 15:56:35 1994 Kung Hsu (kung@mexican.cygnus.com) 6780 6781 * class.c (build_vtable_entry): revert Apr 4 change. 6782 * decl2.c (mark_vtable_entries): replace pure virtual function 6783 decl with abort's. 6784 6785Fri Apr 15 13:49:33 1994 Jason Merrill (jason@deneb.cygnus.com) 6786 6787 * typeck.c (build_conditional_expr): Pedwarn on pointer/integer 6788 mismatch, and don't pedwarn on 0/function pointer mismatch. 6789 6790 * typeck2.c (digest_init): Lose code for special handling of unions. 6791 (process_init_constructor): Since they're handled just fine here. 6792 Pedwarn on excess elements. 6793 6794 * decl2.c (grokfield): Complain about local class method declaration 6795 without definition. 6796 6797Fri Apr 15 13:19:40 1994 Per Bothner (bothner@kalessin.cygnus.com) 6798 6799 * method.c (emit_thunk): Add extern declaration for 6800 current_call_is_indirect (needed for hppa). 6801 6802Thu Apr 14 16:12:31 1994 Jason Merrill (jason@deneb.cygnus.com) 6803 6804 Improve local class support; allow classes in different blocks to 6805 have the same name. 6806 * decl.c (pushtag): Support local classes better. 6807 (pushdecl_nonclass_level): New function for pushing mangled decls of 6808 nested types into the appropriate scope. 6809 (xref_defn_tag): Use pushdecl_nonclass_level instead of 6810 pushdecl_top_level. 6811 (grokfndecl): Don't mess with IDENTIFIER_GLOBAL_VALUE for local 6812 class methods. 6813 * method.c (do_inline_function_hair): Ditto. 6814 6815 * class.c (finish_struct): It is legal for a class with no 6816 constructors to have nonstatic const and reference members. 6817 6818Thu Apr 14 07:15:11 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 6819 6820 * decl.c (push_overloaded_decl): Avoid giving errors about 6821 built-ins, since duplicate_decls will have given warnings/errors 6822 for them. 6823 6824Thu Apr 14 03:45:12 1994 Jason Merrill (jason@deneb.cygnus.com) 6825 6826 * cvt.c (convert_to_reference): Warn about casting pointer type to 6827 reference type when this is probably not what they wanted. 6828 6829Wed Apr 13 13:12:35 1994 Per Bothner (bothner@kalessin.cygnus.com) 6830 6831 * decl.c (finish_decl): Don't mindlessly set TREE_USED for 6832 static consts any more (toplev.c has now been modified to 6833 not emit warnings if they are unused). 6834 6835Wed Apr 13 00:22:35 1994 Jason Merrill (jason@deneb.cygnus.com) 6836 6837 * decl.c (grok_op_properties): If op new/delete get here with 6838 METHOD_TYPEs, do a revert_static_member_fn. 6839 6840 * cp-tree.h (IDENTIFIER_CLASS_TYPE_VALUE): Lose. 6841 * init.c (is_aggr_typedef): Don't look at 6842 IDENTIFIER_CLASS_TYPE_VALUE. 6843 (get_aggr_from_typedef): Ditto. 6844 (get_type_value): Ditto. 6845 * call.c (build_scoped_method_call): Don't rely on overloaded 6846 template names having IDENTIFIER_CLASS_VALUE set. 6847 6848 * parse.y (component_decl_1, fn.def2): Revert rules for 6849 constructors. 6850 (component_decl_1, fn.def2): Use $1 instead of $$, since $$ is being 6851 clobbered. 6852 6853 * decl.c (start_function): Only warn about `void main()' if pedantic 6854 || warn_return_type. 6855 6856Tue Apr 12 02:14:17 1994 Jason Merrill (jason@deneb.cygnus.com) 6857 6858 Clean up overloading of the template name. 6859 * class.c (pushclass): overload the template name whenever pushing 6860 into the scope of a template class, not just if it is 6861 uninstantiated. 6862 (popclass): Correspondingly. 6863 * search.c (push_class_decls): Don't overload_template_name. 6864 * pt.c (overload_template_name): Don't set IDENTIFIER_LOCAL_VALUE or 6865 DECL_CONTEXT on things. 6866 * parse.y (left_curly): Don't overload_template_name. 6867 * class.c (finish_struct): Don't undo_template_name_overload. 6868 6869 * method.c (build_opfncall): Only pass one argument to global op 6870 delete. 6871 6872 * call.c (build_method_call): Use TYPE_VEC_DELETE_TAKES_SIZE to 6873 decide how many arguments to use for vec delete. 6874 6875 * decl.c (grok_op_properties): Be consistent in modifying 6876 current_class_type. 6877 (grokdeclarator): Only complain about function decls with no return 6878 type if we're being pedantic. 6879 6880Mon Apr 11 00:10:53 1994 Jason Merrill (jason@deneb.cygnus.com) 6881 6882 Add support for operator new [] and operator delete []. 6883 6884 * tree.def: Add VEC_NEW_EXPR and VEC_DELETE_EXPR. 6885 * ptree.c (print_lang_type): Indicate vec new/delete. 6886 * parse.y: Support vec new/delete. 6887 * method.c (build_decl_overload): Deal with vec new/delete. 6888 (build_opfncall): Ditto. 6889 * lex.c (init_lex): Set up values of ansi_opname and opname_tab for 6890 vec new/delete. vec new uses "__vn", and vec delete uses "__vd". 6891 * init.c (init_init_processing): Set up BIVN and BIVD. 6892 (do_friend): Don't clean up after mistaken setting of TREE_GETS_NEW, 6893 since it doesn't happen any more. 6894 (build_new): Support vec new. Always call something. 6895 (build_x_delete): Support vec delete. 6896 (build_vec_delete): Lose dtor_dummy argument, add use_global_delete, 6897 and pass it to build_x_delete. 6898 * decl2.c (delete_sanity): Don't change behavior by whether or not 6899 the type has a destructor. Pass use_global_delete to 6900 build_vec_delete. 6901 (coerce_delete_type): Make sure that the type returned has a first 6902 argument of ptr_type_node. 6903 * decl.c (init_decl_processing): Also declare the global vec 6904 new/delete. 6905 (grokdeclarator): Also force vec new/delete to be static. 6906 (grok_op_properties): Note presence of vec new/delete, and play with 6907 their args. If vec delete takes the optional size_t argument, set 6908 TYPE_VEC_DELETE_TAKES_SIZE. 6909 * cp-tree.h (TYPE_GETS_{REG,VEC}_DELETE): New macros to simplify 6910 checking for one delete or the other. 6911 (lang_type): gets_new and gets_delete are now two bits long. The 6912 low bit is for the non-array version. Lose gets_placed_new. 6913 (TYPE_VEC_DELETE_TAKES_SIZE): New macro indicating that the vec 6914 delete defined by this class wants to know how much space it is 6915 deleting. 6916 (TYPE_VEC_NEW_USES_COOKIE): New macro to indicate when vec new must 6917 add a header containing the number of elements in the vector; i.e. 6918 when the elements need to be destroyed or vec delete wants to know 6919 the size. 6920 * class.c (finish_struct_methods): Also check for overloading vec 6921 delete. 6922 * call.c (build_method_call): Also delete second argument for vec 6923 delete. 6924 6925 * decl.c (grokdeclarator): Correct complaints again. 6926 (grokdeclarator): Fix segfault on null declarator. 6927 (decls_match): Also accept redeclaration with no arguments if both 6928 declarations were in C context. Bash TREE_TYPE (newdecl) here. 6929 (duplicate_decls): Instead of here. 6930 6931 * parse.y (nested_name_specifier_1): Lose rules for dealing with 6932 syntax errors nicely, since they break parsing of 'const i;'. 6933 6934 * decl.c (lookup_name): if (got_scope == current_class_type) 6935 val = IDENTIFIER_CLASS_VALUE (name). 6936 6937 * search.c (lookup_nested_tag): Look in enclosing classes, too. 6938 6939 * spew.c (yylex): Only look one character ahead when checking for a 6940 SCOPE. 6941 6942 * lex.c (check_newline): Read first nonwhite char before 6943 incrementing lineno. 6944 6945 * decl.c (grokdeclarator): Don't claim that typedefs are variables 6946 in warning. 6947 6948 * parse.y: Divide up uses of unqualified_id into 6949 notype_unqualified_id and unqualified_id, so that TYPENAME can be 6950 used as an identifier after an object. 6951 6952 * class.c (push_nested_class): Don't push into non-class scope. 6953 6954 * decl.c (grokdeclarator): If an identifier could be a type 6955 conversion operator, but has no associated type, it's not a type 6956 conversion operator. 6957 6958 * pt.c (unify): Check for equality of constants better. 6959 6960 * decl.c (grokdeclarator): Don't complain about access decls. 6961 6962Sun Apr 10 02:39:55 1994 Jason Merrill (jason@deneb.cygnus.com) 6963 6964 * decl.c (grokdeclarator): pedwarn about data definitions without 6965 types here. 6966 6967 * parse.y (datadef): Don't pedwarn about decls without types here, 6968 since that is valid for functions. 6969 (fn.def2, component_decl): Support constructors with declmods again. 6970 (nomods_initdecls): For decls without any mods, so that we don't try 6971 to get declspecs from some arbitrary $0. 6972 6973 * search.c (lookup_field): Use cp_error. 6974 6975 * parse.y (nested_name_specifier_1): Don't check aggr/non-aggr type 6976 here; it breaks destructors for non-aggr types. 6977 6978 * decl.c (lookup_name): Only look for TYPE_DECLs in base classes of 6979 a type being defined, like the comment says. 6980 If got_scope is not an aggregate, just return NULL_TREE. 6981 6982 * pt.c (create_nested_upt): Kung's code for creating types nested 6983 within uninstantiated templates now lives here (it used to live in 6984 hack_more_ids). It needs to be expanded. 6985 6986 * parse.y: Stop calling see_typename so much. 6987 6988 * decl.c (lookup_name): Deal with TTPs and UPTs. 6989 6990 * lex.c (real_yylex): Don't set looking_for_typename just because we 6991 saw a 'new'. 6992 (dont_see_typename): #if 0 out. 6993 6994 * spew.c (yylex): Increment looking_for_typename if the next 6995 character is SCOPE, rather than setting it to 1; this way, the value 6996 from seeing an aggr specifier will not be lost. This kinda relies 6997 on looking_for_typename never being < 0, which is now true. 6998 6999 * parse.y (nested_name_specifier_1): Accept TEMPLATE_TYPE_PARMs, 7000 too. 7001 (named_class_head_sans_basetype): Accept template types, too. Oops. 7002 7003Fri Apr 8 16:39:35 1994 Jason Merrill (jason@deneb.cygnus.com) 7004 7005 * decl2.c (reparse_decl_as_expr1): Handle SCOPE_REFs. 7006 7007 * parse.y: Lose START_DECLARATOR. 7008 7009 * search.c (lookup_nested_tag): New function to scan CLASSTYPE_TAGS 7010 for a class. 7011 7012 * parse.y: Simplify fn.def2 and component_decl. Support 'enum 7013 A::foo' syntax. Catch invalid scopes better. 7014 7015 * parse.y, lex.c: lose TYPENAME_COLON. 7016 7017 * decl2.c (groktypefield): #if 0 out. 7018 7019 * decl.c (lookup_name): If the type denoted by got_scope is 7020 currently being defined, look in CLASSTYPE_TAGS rather than FIELDS. 7021 7022 * class.c (push_nested_class): Don't try to push into 7023 error_mark_node. 7024 7025Fri Apr 8 07:26:36 1994 Brendan Kehoe (brendan@lisa.cygnus.com) 7026 7027 * Makefile.in (stamp-parse): Update count of conflicts to 33. 7028 7029Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com) 7030 7031 A saner implementation of nested types that treats template types 7032 no differently from non-template types. There are still some 7033 shortcomings of our system; most notably, it is difficult to look 7034 for a nested type that is hidden by another name, because of the way 7035 we keep track of hidden types. But this shouldn't be a problem for 7036 just about anyone. Perhaps lookup_field should be fixed up a bit. 7037 7038 * spew.c: Moved handling of nested types/scoping from the lexer 7039 into the parser. Removed variable template_type_seen_before_scope. 7040 Removed functions frob_identifier, hack_more_ids, and various cruft 7041 that was #if 0'd out in the past, reducing the size of the file from 7042 1146 lines to 450 lines. We can't quite do away with spew.c yet, 7043 though; we still need it for do_aggr () and checking for SCOPE after 7044 the current identifier. And setting lastiddecl. 7045 7046 * parse.y: Moved handling of nested types/scoping from the lexer 7047 into the parser, using a new global variable `got_scope'. Reduced 7048 the number of states by 53. Implemented all uses of explicit global 7049 scope. Removed terminals SCOPED_TYPENAME and SCOPED_NAME. Removed 7050 nonterminals tmpl.1, scoped_base_class, id_scope, typename_scope, 7051 scoped_typename. Added nonterminals nested_type, 7052 qualified_type_name, complete_type_name, qualified_id, ptr_to_mem, 7053 nested_name_specifier, global_scope, overqualified_id, type_name. 7054 Changed many others. Added 9 new reduce/reduce conflicts, which are 7055 nested type parallels of 9 that were already in the grammar for 7056 non-nested types. Eight of the now 33 conflicts should be removed 7057 in the process of resolving the late binding between variable and 7058 function decls. 7059 7060 * gxxint.texi (Parser): Update. 7061 7062 * cp-tree.h (IS_AGGR_TYPE_CODE): Add UNINSTANTIATED_P_TYPE. 7063 7064 * lex.h: Add decl for got_scope. 7065 7066 * lex.c (see_typename): Claim to be the lexer when calling 7067 lookup_name. 7068 7069 * decl.c (lookup_name): When called from the lexer, look at 7070 got_scope and looking_at_typename; otherwise don't. 7071 7072Thu Apr 7 22:05:47 1994 Mike Stump <mrs@cygnus.com> 7073 7074 31th Cygnus<->FSF merge. 7075 7076Thu Apr 7 17:47:53 1994 Jason Merrill (jason@deneb.cygnus.com) 7077 7078 * decl2.c (mark_vtable_entries): Call this to mark all the 7079 entries in the vtable addressable. 7080 (finish_decl_parsing): Handle SCOPE_REFs. 7081 7082 * decl.c (decls_match): Always call compparms with strict == 1. 7083 Handle the special case of C function redecl here. 7084 (duplicate_decls): Only keep the old type if the new decl takes no 7085 arguments. 7086 7087 * typeck.c (compparms): Also allow t1 to be ... if strict == 0. 7088 7089Thu Apr 7 16:17:50 1994 Mike Stump <mrs@cygnus.com> 7090 7091 * class.c (build_vtable_entry): Fix breakage introduced Apr 5 7092 17:48:41. 7093 7094Wed Apr 6 16:05:10 1994 Per Bothner (bothner@kalessin.cygnus.com) 7095 7096 * init.c (build_virtual_init), search.c (build_vbase_vtables_init), 7097 ch-tree.h: Every place these functions were called, the result was 7098 immediately passed to expand_expr_stmt. Reduce redundancy by 7099 calling expand_expr_init *inside* these functions. These 7100 makes for a simpler interface, and we don't have to build 7101 compound expressions. Hence, rename these function to: 7102 expand_virtual_init and expand_vbase_vtables_init respectively. 7103 * init.c, decl.c: Change callers of these functions. 7104 * init.c, cp-tree.h (expand_virtual_init): Make static. 7105 7106 * decl2.c (finish_file): Check TREE_PUBLIC||TREE_ADDRESSABLE 7107 rather than DECL_SAVED_INSNS before emitting inlines. 7108 7109Wed Apr 6 13:06:39 1994 Jason Merrill (jason@deneb.cygnus.com) 7110 7111 * spew.c (init_spew): #if 0 out stuff used by arbitrate_lookup. 7112 7113 * decl.c (duplicate_decls): If this is a new declaration of an 7114 extern "C" function, keep the type (for the argtypes). 7115 (redeclaration_error_message): Don't check DECL_LANGUAGE here. 7116 (decls_match): Call compparms with a value of strict dependent on 7117 the value of strict_prototypes for DECL_LANGUAGE (oldecl). 7118 7119 * typeck.c (compparms): ... is only equivalent to non-promoting 7120 parms if we're not being strict. 7121 7122 * parse.y (empty_parms): Don't check flag_ansi || pedantic here. 7123 7124 * decl.c (init_decl_processing): if (flag_ansi || pedantic) 7125 strict_prototypes_lang_c = strict_prototypes_lang_cplusplus; 7126 7127 * decl2.c (grok_function_init): Don't set DECL_INITIAL on pure 7128 virtuals. 7129 7130Tue Apr 5 17:48:41 1994 Per Bothner (bothner@kalessin.cygnus.com) 7131 7132 Support for implementing vtables with thunks. 7133 * tree.def (THUNK_DECL): New TREE_CODE. 7134 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY), tree.c 7135 (fnaddr_from_vtable_entry): Handle flag_vtable_thunks case. 7136 * cp-tree.h (memptr_type): New variable. 7137 * class.c (build_vtable_entry): Build thunk if necessary. 7138 * class.c (build_vfn_ref): If using thunks, don't need 7139 to add delta field from vtable (there is none!). 7140 * decl.c: Add memptr_type as well as vtable_entry_type. 7141 If using thunks, the latter is just ptr_type_node. 7142 * gc.c, typeck.c: Use memptr_typeChange, not vtable_entry_type. 7143 * decl2.c (finish_vtable_vardecl): Handle thunks. 7144 * expr.c (cplus_expand_expr): Support THUNK_DECL. 7145 7146 * decl.c (grokdeclarator): Set DECL_THIS_EXTERN if "extern". 7147 * decl.c (start_function): Set current_extern_inline based on 7148 DECL_THIS_EXTERN, not TREE_PUBLIC. 7149 * decl.c (finish_function): Call mark_inline_for_output if needed, 7150 7151 Improve intelligence about when to emit inlines. 7152 * cp-tree.h (lang_decl_flags): New field saved_inline. 7153 * cp-tree.h (DECL_SAVED_INLINE): New macro. 7154 * class.c (add_virtual_function): Don't set TREE_ADDRESSABLE. 7155 * decl.h, decl.c (pending_addressable_inlines): Removed. 7156 * decl2.c (pending_addressable_inlines): Renamed to saved_inlines. 7157 * decl2.c (mark_inline_for_output): Do nothing if 7158 DECL_SAVED_INLINE; otherwise set it (and add to saved_inlines list). 7159 * decl2.c (finish_vtable_vardecl): SET_CLASSTYPE_INTERFACE_KNOWN 7160 and set CLASSTYPE_INTERFACE_ONLY if there is a non-inline virtual. 7161 * decl2.c (finish_file): Writing out inlines later, so we can 7162 also handle the ones needed for vtbales. 7163 * decl2.c (write_vtable_entries, finish_vtable_typedecl): Removed. 7164 7165 * cp-tree.h, class.c, decl2.c, search.c: Remove -fvtable-hack 7166 and flag_vtable_hack. Use -fvtable-thunks and flag_vtable_thunks 7167 instead. (The rationale is that these optimizations both break binary 7168 compatibility, but should become the default in a future release.) 7169 7170Wed Apr 6 10:53:56 1994 Mike Stump <mrs@cygnus.com> 7171 7172 * class.c (modify_vtable_entries): Never reset the DECL_CONTEXT 7173 of a fndecl, as we might not be from that vfield. 7174 7175Tue Apr 5 17:43:35 1994 Kung Hsu (kung@mexican.cygnus.com) 7176 7177 * class.c (add_virtual_function): fix bug for pure virtual, so 7178 that DECL_VINDEX of the dummy decl copied won't be error. 7179 (see also Apr 4 change) 7180 7181Tue Apr 5 17:23:45 1994 Per Bothner (bothner@kalessin.cygnus.com) 7182 7183 * typeck.c (c_expand_return): Before checking that we're not 7184 returning the address of a local, make sure it's a VAR_DECL. 7185 (And don't worry about it being a TREE_LIST.) 7186 7187Tue Apr 5 13:26:42 1994 Jason Merrill (jason@deneb.cygnus.com) 7188 7189 * parse.y (YYDEBUG): Always define. 7190 * lex.c (YYDEBUG): Ditto. 7191 7192Mon Apr 4 11:28:17 1994 Kung Hsu (kung@mexican.cygnus.com) 7193 7194 * class.c (finish_struct): backup out the change below, put the 7195 new change for the same purpose. The change below breaks code. 7196 7197 * class.c (finish_struct): if pure virtual, copy node and make 7198 RTL point to abort, then put in virtual table. 7199 * decl2.c (grok_function_iit): reinstate Mar 31 change. 7200 7201Sat Apr 2 03:12:58 1994 Jason Merrill (jason@deneb.cygnus.com) 7202 7203 * init.c (build_new): pedwarn about newing const and volatile 7204 types. 7205 7206 * tree.c (get_identifier_list): Only do the special handling 7207 thing if we're dealing with the main variant of the record type. 7208 7209 * cvt.c (convert_to_reference): When converting between 7210 compatible reference types, use the pointer conversion machinery. 7211 Don't just blindly overwrite the old type. 7212 7213Fri Apr 1 17:14:42 1994 Jason Merrill (jason@deneb.cygnus.com) 7214 7215 * call.c (build_method_call): When looking at global functions, 7216 be sure to use instance_ptr for the first argument, not some version 7217 of it that has been cast to a base class. Also do this before 7218 comparing candidates. 7219 7220Thu Mar 31 19:50:35 1994 Jason Merrill (jason@deneb.cygnus.com) 7221 7222 * call.c (build_method_call): Constructors can be called for 7223 const objects. 7224 7225Thu Mar 31 16:20:16 1994 Kung Hsu (kung@mexican.cygnus.com) 7226 7227 * decl2.c (grok_func_init): do not abort as rtl for pur virtual 7228 fucntions. They can be defined somewhere else. 7229 7230Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) 7231 7232 * decl.c (init_decl_processing): Declare __builtin_return_address 7233 and __builtin_frame_address for C++ as well. 7234 7235Thu Mar 31 12:35:49 1994 Mike Stump <mrs@cygnus.com> 7236 7237 * typeck2.c (store_init_value): Integral constant variables are 7238 always constant, even when doing -fpic. 7239 7240Sat Jan 23 23:23:26 1994 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) 7241 7242 * decl.c (redeclaration_error_message): Pass the types to 7243 comptypes. 7244 7245Wed Mar 30 21:29:25 1994 Mike Stump <mrs@cygnus.com> 7246 7247 Cures incorrect errors about pure virtuals in a class, when they 7248 have been overridden in a derived class. 7249 7250 * search.c (get_abstract_virtuals): Reimplement. 7251 * search.c (get_abstract_virtuals_1): New routine. 7252 7253Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com) 7254 7255 * pt.c (push_template_decls): Make the pushed level pseudo 7256 global. 7257 7258 * parse.y (extdefs): Don't pop everything if the current binding 7259 level is pseudo_global. 7260 7261 * decl.c (pop_everything): Stop on reaching a pseudo-global 7262 binding level. 7263 7264 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Change to more reliable test. 7265 7266 * decl.c (duplicate_decls): Only copy DECL_SOURCE_{FILE_LINE} if 7267 the old decl actually had an initializer. 7268 7269 * {various}: Clean up gcc -W complaints. 7270 7271 * cp-tree.h (DECL_FUNCTION_MEMBER_P): Currently defined to be 7272 (DECL_CONTEXT (NODE) != NULL_TREE). 7273 7274 * parse.y (lang_extdef): Call pop_everything if necessary. 7275 7276 * decl.c (pop_everything): New function for popping binding 7277 levels left over after a syntax error. 7278 (pushdecl): Use DECL_FUNCTION_MEMBER_P to decide whether or not 7279 a function is a member. 7280 7281Wed Mar 30 14:20:50 1994 Mike Stump <mrs@cygnus.com> 7282 7283 Cures calling a more base base class function, when a more derived 7284 base class member should be called in some MI situations. 7285 7286 * search.c (make_binfo): Use more the more specialized base 7287 binfos from the binfo given as the second argument to make_binfo, 7288 instead of the unspecialized ones from the TYPE_BINFO. 7289 * class.c (finish_base_struct): Ditto, update callers. 7290 * search.c (dfs_get_vbase_types): Ditto. 7291 * tree.c (propagate_binfo_offsets, layout_vbasetypes): Ditto. 7292 * decl.c (xref_tag): Use NULL_TREE instead of 0. 7293 * lex.c (make_lang_type): Ditto. 7294 7295Wed Mar 30 14:10:04 1994 Jason Merrill (jason@deneb.cygnus.com) 7296 7297 * decl.c (pushdecl): If pushing a C-linkage function, only do a 7298 push_overloaded_decl. 7299 (duplicate_decls): Standard overloading does not shadow built-ins. 7300 7301Tue Mar 29 00:54:18 1994 Jason Merrill (jason@deneb.cygnus.com) 7302 7303 * pt.c (end_template_decl): Don't call push_overloaded_decl. 7304 7305 * init.c (do_friend): Don't call push_overloaded_decl. 7306 7307 * decl.c (pushdecl): Call push_overloaded_decl for functions and 7308 function templates. 7309 (duplicate_decls): functions and function templates are not 7310 duplicates, but don't complain about calling this function to 7311 compare them. 7312 (push_overloaded_decl): Don't deal with linkage. Call 7313 duplicate_decls. 7314 (redeclaration_error_message): Deal with linkage. 7315 7316 * decl.c (start_function): If push_overloaded_decl returns an 7317 older version of the function, deal with it. 7318 7319 * decl.c (start_function): Be sure only to push_overloaded_decl 7320 for non-members. 7321 7322 * decl.c (grokfndecl): Put back clearing of DECL_CHAIN for 7323 methods. 7324 (start_function): Lose broken and redundant code for checking old 7325 decl. 7326 7327 * init.c (add_friend): Give line numbers of both friend decls 7328 when warning about re-friending. 7329 7330 * pt.c (tsubst): Use comptypes rather than == to compare the 7331 types of the method as declared and as defined, since default 7332 parameters may be different. 7333 7334 * call.c (build_method_call): Use brendan's candidate printing 7335 routine. 7336 7337 * decl.c (start_method): Methods defined in the class body are 7338 inline whether or not it's a template class. 7339 7340Mon Mar 28 16:39:26 1994 Jason Merrill (jason@deneb.cygnus.com) 7341 7342 * parse.y (initdcl0): Add "extern" to current_declspecs if 7343 have_extern_spec && ! used_extern_spcec. 7344 7345 * tree.c (really_overloaded_fn): A fn with more than one 7346 overload. 7347 7348 * pt.c (end_template_decl): Use really_overloaded_fn. 7349 7350 * decl.c (duplicate_decls): When smashing a decl into a previous 7351 definition, keep the old file and line. 7352 Don't deal with overloaded functions. 7353 Lose old code for checking arg types of functions. 7354 Check for overloaded C functions. 7355 (pushdecl): Deal with overloaded functions. 7356 (start_decl): Expect pushdecl to return an appropriate function decl. 7357 (start_function): Ditto. 7358 (push_overloaded_decl): Don't check for overloaded C functions. 7359 7360 * *.c: Stop using DECL_OVERLOADED, it being archaic. 7361 TREE_OVERLOADED should probably go, too. 7362 7363Mon Mar 28 14:00:45 1994 Ron Guilmette (rfg@netcom.com) 7364 7365 * typeck.c (comp_target_types): Call comp_target_parms with 7366 strict == 1. 7367 7368Sun Mar 27 00:07:45 1994 Jason Merrill (jason@deneb.cygnus.com) 7369 7370 * parse.y (empty_parms): Don't parse () as (...) in extern "C" 7371 sections if we're compiling with -ansi or -pedantic. 7372 7373 * decl.c (decls_match): Don't treat (int) and (int&) as matching. 7374 7375 * decl2.c (grokfield): Don't pedwarn twice about initializing 7376 field. 7377 7378 * decl.c (push_overloaded_decl): Warn about shadowing 7379 constructor. 7380 (redeclaration_error_message): Don't allow 'int a; int a;' 7381 7382 * cvt.c (build_up_reference): Only check for valid upcast if 7383 LOOKUP_PROTECT is set, not just any flag. 7384 7385Fri Mar 25 01:22:31 1994 Jason Merrill (jason@deneb.cygnus.com) 7386 7387 * lex.c (check_newline): When we see a #pragma implementation, 7388 also set it for the main input file. 7389 7390 * init.c (build_new): Convert array size argument to size_t. 7391 7392 * parse.y (primary): If we're doing a parenthesized type-id, call 7393 groktypename before passing it to build_new. 7394 7395 * call.c (build_method_call): Deal properly with const and 7396 volatile for instances of reference type. 7397 7398 * decl.c (store_return_init): Change 'if (pedantic) error' to 'if 7399 (pedantic) pedwarn'. 7400 7401 * decl.c (grokdeclarator): Don't complain about putting `static' 7402 and `inline' on template function decls. 7403 7404Thu Mar 24 23:18:19 1994 Jason Merrill (jason@deneb.cygnus.com) 7405 7406 * call.c (build_method_call): Preserve const & volatile on 7407 `this'. 7408 7409Thu Mar 24 16:21:52 1994 Mike Stump <mrs@cygnus.com> 7410 7411 * init.c (build_new, build_vec_delete): Use global new and delete 7412 for arrays. 7413 * decl2.c (delete_sanity): Ditto. 7414 7415Thu Mar 24 02:10:46 1994 Jason Merrill (jason@deneb.cygnus.com) 7416 7417 * cvt.c (convert_to_reference): If i is an lvalue, 7418 (int &)i -> *(int*)&i, as per 5.2.8p9 of the latest WP. 7419 (convert_force): Call convert_to_reference with LOOKUP_COMPLAIN. 7420 7421Wed Mar 23 17:45:37 1994 Jason Merrill (jason@deneb.cygnus.com) 7422 7423 * decl.c (duplicate_decls): Also propagate DECL_TEMPLATE_MEMBERS 7424 and DECL_TEMPLATE_INSTANTIATIONS. 7425 7426 * init.c (build_new): Handle array typedefs properly. 7427 7428Wed Mar 23 18:23:33 1994 Mike Stump <mrs@cygnus.com> 7429 7430 30th Cygnus<->FSF merge. 7431 7432Wed Mar 23 00:46:24 1994 Mike Stump <mrs@cygnus.com> 7433 7434 * class.c (modify_vtable_entries): Avoid running off the end of the 7435 virtuals list when processing a virtual destructor. 7436 * class.c (get_vtable_entry): Ditto. 7437 7438Wed Mar 23 00:23:59 1994 Jason Merrill (jason@deneb.cygnus.com) 7439 7440 * decl.c (duplicate_decls): If two template decls don't match, 7441 just return 0. 7442 7443Tue Mar 22 23:49:41 1994 Jason Merrill (jason@deneb.cygnus.com) 7444 7445 * typeck.c (convert_for_assignment): Don't pedwarn about 7446 converting function pointer to void *. 7447 7448Tue Mar 22 22:23:19 1994 Mike Stump <mrs@cygnus.com> 7449 7450 Major revamp of pointer to member functions. Cures major 7451 nonfunctionality when used in casts, and MI situations. 7452 7453 * cvt.c (convert_force): Update call site of build_ptrmemfunc. 7454 * typeck.c (convert_for_assignment): Ditto. 7455 * typeck2.c (digest_init): Ditto. 7456 * typeck2.c (process_init_constructor): Simplify by moving code into 7457 digest_init. 7458 * typeck2.c (digest_init): Do default_conversions on init value, if 7459 we are processing pointer to member functions. 7460 * class.c (get_vfield_offset): Now non-static. Convert bit offset 7461 into byte offset. 7462 * cp-tree.h (get_vfield_offset): Ditto. 7463 * typeck.c (get_member_function_from_ptrfunc): Convert down to right 7464 instance, before fetching vtable pointer. 7465 * typeck.c (get_delta_difference): New routine. 7466 * typeck.c (build_ptrmemfunc): Revamp to handle casting better, also 7467 get vtable pointer out of right subobject. 7468 7469Tue Mar 22 17:56:48 1994 Mike Stump <mrs@cygnus.com> 7470 7471 * search.c (get_binfo): Return NULL instead of aborting, when 7472 passed a UNION_TYPE. 7473 7474Tue Mar 22 12:44:54 1994 Jason Merrill (jason@deneb.cygnus.com) 7475 7476 These patches implement handling of redefinition/redeclaration of 7477 templates. 7478 7479 * typeck.c (comptypes): Simplify. All TEMPLATE_TYPE_PARMs are 7480 considered compatible. 7481 7482 * parse.y (template_def): Pass defn argument to end_template_decl. 7483 7484 * pt.c (end_template_decl): Add defn argument. Check for 7485 redefinition. Simplify. 7486 7487 * error.c (OB_UNPUT): New macro, to remove mistakes. 7488 (aggr_variety): Subroutine of dump_aggr_type. 7489 7490 * decl.c (decls_match): Support templates. 7491 (duplicate_decls): No longer static. Don't try to lay out template 7492 decls. 7493 (pushdecl): Simplify. 7494 7495 * cp-tree.h (DECL_TEMPLATE_MEMBERS): Use DECL_SIZE instead of 7496 DECL_INITIAL. 7497 7498Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com) 7499 7500 * error.c (dump_decl): Support class template decls. 7501 (dump_type): Don't adorn template type parms. 7502 7503 * decl.c (duplicate_decls): Save DECL_TEMPLATE_INFO from old decl 7504 if it was a definition. 7505 (redeclaration_error_message): Do the cp_error thang, and reject 7506 redefinition of templates. 7507 7508Mon Mar 21 19:36:06 1994 Per Bothner (bothner@kalessin.cygnus.com) 7509 7510 * decl.c (grokdeclarator): Set TREE_PUBLIC for METHOD_TYPE 7511 in FIELD context, when appropriate. Also, 7512 CLASSTYPE_INTERFACE_ONLY is irrelevant to setting TREE_PUBLIC. 7513 Also, simplify check for bogus return specifiers. 7514 7515Mon Mar 21 11:46:55 1994 Jason Merrill (jason@deneb.cygnus.com) 7516 7517 * parse.y (after_type_declarator1): Expand type_quals. 7518 (notype_declarator1): Ditto. 7519 (absdcl1): Ditto. 7520 7521Sat Mar 19 01:05:17 1994 Jason Merrill (jason@deneb.cygnus.com) 7522 7523 * decl.c (grokdeclarator): Treat class-local typedefs like static 7524 members; i.e. 'typedef int f();' means that f is a function type, 7525 not a method type. 7526 7527 * parse.y (decl): Change direct_* back to *. 7528 (type_id): Change direct_abstract_declarator to absdcl. 7529 (direct_declarator, direct_initdecls, direct_initdcl0): Remove again. 7530 7531Fri Mar 18 12:47:59 1994 Jason Merrill (jason@deneb.cygnus.com) 7532 7533 These two patches fix crashes on instantiating a template inside a 7534 function with C linkage or containing labels. 7535 7536 * class.c (current_lang_stacksize): No longer static. 7537 7538 * decl.c (struct saved_scope): Add lang_base, lang_stack, 7539 lang_name, lang_stacksize, and named_labels. 7540 (push_to_top_level): Save them. 7541 (pop_from_top_level): Restore them. 7542 7543 * gxxint.texi (Parser): Update. 7544 7545 These two patches finish moving the task of expr/declarator 7546 ambiguity resolution from the lexer to the parser, and add one more 7547 r/r conflict. START_DECLARATOR can now be nuked. 7548 7549 * parse.y (decl): Add "direct_" in typespec X rules. 7550 (direct_declarator): New nonterminal for 7551 direct_after_type_declarator and direct_notype_declarator. 7552 (direct_initdecls): Like initdecls, but uses direct_initdcl0. 7553 (direct_initdcl0): Like initdcl0, but uses direct_declarator. 7554 (named_parm): Add typespec direct_declarator rule. 7555 7556 * spew.c (yylex): #if 0 out START_DECLARATOR insertion. 7557 7558 These two patches disable some excessive cleverness on the part of 7559 g++; a non-class declaration always hides a class declaration in the 7560 same scope, and g++ was trying to unhide it depending on the 7561 enclosing expression. 7562 7563 * spew.c (arbitrate_lookup): #if 0 out. 7564 7565 * decl.c (lookup_name): Never call arbitrate_lookup. 7566 7567 * parse.y (complex_notype_declarator1): Add '*' 7568 complex_notype_declarator1 and '&' complex_notype_declarator1 rules. 7569 7570 * parse.y (complex_direct_notype_declarator): Restore id_scope 7571 see_typename TYPENAME rule, remove all other rules beginning with 7572 those tokens. 7573 (notype_unqualified_id): Add '~' see_typename IDENTIFIER rule. 7574 7575Thu Mar 17 17:30:01 1994 Jason Merrill (jason@deneb.cygnus.com) 7576 7577 These changes fix the compiler's handling of the functional cast/ 7578 object declaration ambiguities in section 6.8 of the ARM. They also 7579 add 11 reduce/reduce conflicts. Sigh. 7580 7581 * parse.y: Add precedence decls for OPERATOR and '~'. 7582 (notype_unqualified_id): New nonterminal, encompasses all of the 7583 ANSI unqualified-id nonterminal except TYPENAMEs. 7584 (expr_or_declarator): New nonterminal to delay parsing of code like 7585 `int (*a)'. 7586 (primary): Use notype_unqualified_id. 7587 (decl): Add typespec initdecls ';' and typespec declarator ';' 7588 rules. 7589 (initdcl0): Deal with the above. 7590 (complex_notype_declarator1): A notype_declarator that is not also 7591 an expr_or_declarator. 7592 (complex_direct_notype_declarator): A direct_notype_declarator that 7593 doesn't conflict with expr_or_declarator. Use 7594 notype_unqualified_id. Remove id_scope see_typename TYPENAME rule. 7595 (functional_cast): New nonterminal, for the three functional cast 7596 rules. So that they can be moved after 7597 complex_direct_notype_declarator. 7598 (see_typename): Don't accept type_quals any more. 7599 7600 * decl2.c (reparse_decl_as_expr): New function to deal with parse 7601 nodes for code like `int (*a)++;'. 7602 (reparse_decl_as_expr1): Recursive subroutine of the above. 7603 (finish_decl_parsing): New function to deal with parse nodes for 7604 code like `int (*a);'. See the difference? 7605 7606Thu Mar 17 12:16:10 1994 Mike Stump <mrs@cygnus.com> 7607 7608 These changes break binary compatibility in code with classes 7609 that use virtual bases. 7610 7611 * search.c (dfs_get_vbase_types): Simplify and correct to make 7612 sure virtual bases are initialized in dfs ordering. 7613 * search.c (get_vbase_types): Simplify and make readable. 7614 7615Thu Mar 17 12:01:10 1994 Jason Merrill (jason@deneb.cygnus.com) 7616 7617 * parse.y: s/ typename / type_id /g 7618 7619Wed Mar 16 17:42:52 1994 Kung Hsu (kung@mexican.cygnus.com) 7620 7621 * parse.y (typespec): add SCOPE TYPENAME for global scoped 7622 type. e.g. ::B x. 7623 7624 * decl.c (complete_array_type): fix a bug that in -pendantic 7625 mode even there's no initializer, it will continue to build 7626 default index. 7627 7628Wed Mar 16 17:43:07 1994 Jason Merrill (jason@deneb.cygnus.com) 7629 7630 * parse.y (direct_notype_declarator): Add PTYPENAME rule, remove 7631 all of the scoped PTYPENAME rules. 7632 7633Wed Mar 16 16:39:02 1994 Mike Stump <mrs@cygnus.com> 7634 7635 * init.c (build_offset_ref): The value of A::typedef_name is 7636 always the TYPE_DECL, and never an error. 7637 7638Tue Mar 15 20:02:35 1994 Jason Merrill (jason@deneb.cygnus.com) 7639 7640 * search.c (get_base_distance_recursive): Two binfos can only 7641 represent the same object if they are both via_virtual. 7642 7643 * class.c (finish_base_struct): Check vbases for ambiguity, too. 7644 7645 * search.c (get_vbase_types): Accept binfo argument, too. 7646 7647Tue Mar 15 19:22:05 1994 Kung Hsu (kung@mexican.cygnus.com) 7648 7649 * decl.c (complete_array_type): complete TYPE_DOMAIN of the 7650 initializer also, because back-end requires it. 7651 7652Tue Mar 15 15:33:31 1994 Jason Merrill (jason@deneb.cygnus.com) 7653 7654 * error.c (dump_expr): Support member functions (which show up as 7655 OFFSET_REFs). 7656 7657Mon Mar 14 16:24:36 1994 Mike Stump <mrs@cygnus.com> 7658 7659 * init.c (build_new): Set the return type of multidimensional 7660 news correctly. 7661 7662Fri Mar 11 15:35:39 1994 Kung Hsu (kung@mexican.cygnus.com) 7663 7664 * call.c (build_method_call): if basetype not equal to type 7665 of the instance, use the type of the instance in building 7666 destructor. 7667 7668Thu Mar 10 17:07:10 1994 Kung Hsu (kung@mexican.cygnus.com) 7669 7670 * parse.y (direct_notype_declarator): add push_nested_type for 7671 'template_type SCOPED_NAME' rule. 7672 7673Tue Mar 8 00:19:58 1994 Jason Merrill (jason@deneb.cygnus.com) 7674 7675 * parse.y (parm): Add typed_declspec1 {absdcl, epsilon} rules. 7676 7677Sat Mar 5 04:47:48 1994 Jason Merrill (jason@deneb.cygnus.com) 7678 7679 * parse.y (regcast_or_absdcl): New nonterminal to implement late 7680 reduction of constructs like `int ((int)(int)(int))'. 7681 (cast_expr): Use it. 7682 (sub_cast_expr): Everything that can come after a cast. 7683 (typed_declspecs1): typed_declspecs that are not typed_typespecs. 7684 (direct_after_type_declarator): Lose PAREN_STAR_PAREN rule. 7685 (direct_abstract_declarator): Replace '(' parmlist ')' rule with 7686 '(' complex_parmlist ')' and regcast_or_absdcl. 7687 (parmlist): Split 7688 (complex_parmlist): Parmlists that are not also typenames. 7689 (parms_comma): Enabler. 7690 (named_parm): A parm that is not also a typename. Use declarator 7691 rather than dont_see_typename abs_or_notype_decl. Expand 7692 typed_declspecs inline. 7693 (abs_or_notype_decl): Lose. 7694 (dont_see_typename): Comment out. 7695 (bad_parm): Break out abs_or_notype_decl into two rules. 7696 7697Fri Mar 4 18:22:39 1994 Jason Merrill (jason@deneb.cygnus.com) 7698 7699 * decl2.c (reparse_decl_as_casts): New function to change parse 7700 nodes for `(int)(int)(int)' from "function taking int and returning 7701 function taking int and returning function taking int" to "... cast 7702 to int, cast to int, cast to int". 7703 7704 * decl2.c (reparse_decl_as_expr): Recursive function to change 7705 parse nodes for `A()()' from "function returning function returning 7706 A" to "A().operator()". 7707 7708 * parse.y (primary): Replace `typespec LEFT_RIGHT' rule with 7709 `typespec fcast_or_absdcl' rule. 7710 (fcast_or_absdcl): New nonterminal to implement late reduction of 7711 constructs like `A()()()()'. 7712 (typename): Replace `typespec absdcl1' rule with 7713 `typespec direct_abstract_declarator' rule. 7714 (direct_abstract_declarator): Replace `LEFT_RIGHT type_quals' rule 7715 with `fcast_or_absdcl type_quals' rule. 7716 7717Fri Mar 4 16:18:03 1994 Mike Stump <mrs@cygnus.com> 7718 7719 * tree.c (lvalue_p): Improve OFFSET_REF handling, so that it 7720 matches Section 5.5. 7721 7722Fri Mar 4 14:01:59 1994 Jason Merrill (jason@deneb.cygnus.com) 7723 7724 * error.c (dump_type_prefix): Don't print basetype twice for 7725 pmfs. 7726 7727Fri Mar 4 13:24:33 1994 Mike Stump <mrs@cygnus.com> 7728 7729 * typeck.c (convert_arguments): Handle setHandler(A::handlerFn) 7730 so that it is like setHandler(&A::handlerFn). Cures an `invalid 7731 lvalue in unary `&''. 7732 7733Fri Mar 4 11:15:59 1994 Jason Merrill (jason@deneb.cygnus.com) 7734 7735 * gxxint.texi (Copying Objects): New section discussing default 7736 op= problems with virtual inheritance. 7737 7738 * decl2.c (grokoptypename): Just does grokdeclarator and 7739 build_typename_overload, since the parser can't call grokdeclarator 7740 directly. 7741 7742 * method.c (build_typename_overload): Set IDENTIFIER_GLOBAL_VALUE 7743 and TREE_TYPE on generated identifiers. 7744 7745 * decl.c (grokdeclarator): Don't deal with TYPE_EXPRs anymore. 7746 7747 * parse.y (parm): Convert `const char *' to `__opPCc' here. 7748 7749 * error.c (dump_decl): Say sorry rather than my_friendly_aborting 7750 if we can't figure out what to do. 7751 (dump_type*): Ditto. 7752 7753 * typeck2.c (build_m_component_ref): 'component' is an expr, not 7754 a decl. Also move the IS_AGGR_TYPE check after the stripping of 7755 REFERENCE_TYPE. 7756 7757Fri Mar 4 04:46:05 1994 Mike Stump <mrs@cygnus.com> 7758 7759 * call.c (build_method_call): Handle b->setHandler(A::handlerFn) 7760 so that it is like b->setHandler(&A::handlerFn). Cures an `invalid 7761 lvalue in unary `&''. 7762 7763Thu Mar 3 12:38:15 1994 Jason Merrill (jason@deneb.cygnus.com) 7764 7765 * parse.y: Add precedence specification for START_DECLARATOR. 7766 (type_quals): Move before primary. 7767 (typename): Move before typed_declspecs, add 'typespec absdcl1' rule. 7768 7769 * decl2.c (grokoptypename): Lose. 7770 7771 * decl.c (grokdeclarator): Parse TYPE_EXPRs in the initial scan, 7772 rather than waiting until later. 7773 7774Wed Mar 2 14:12:23 1994 Jason Merrill (jason@deneb.cygnus.com) 7775 7776 * parse.y (unary_expr): Use 'typename' in 'new' rules, rather 7777 than expanding it inline. 7778 (typename): Expand empty option of (former) absdcl inline. 7779 (abs_or_notype_decl): Ditto. 7780 (absdcl): Lose empty rule. 7781 (conversion_declarator): New nonterminal for 'typename' of 'operator 7782 typename'. 7783 (operator_name): Use it instead of absdcl. 7784 7785 * parse.y: Add precedence declarations for SCOPED_TYPENAME, 7786 TYPEOF, and SIGOF. 7787 (typed_declspecs): Accept typed_typespecs, rather than typespec 7788 directly. Add rules with reserved_typespecquals. 7789 (reserved_declspecs): Don't accept typespecqual_reserved at the 7790 beginning of the list. The typed_declspecs rule will deal with this 7791 omission. 7792 (declmods): Accept nonempty_type_quals, rather than TYPE_QUAL 7793 directly. 7794 7795 * parse.y (direct_notype_declarator, 7796 direct_after_type_declarator, direct_abstract_declarator): Split up 7797 the declarator1 nonterminals to match the draft standard and avoid 7798 ambiguities. 7799 (new_type_id, new_declarator, direct_new_declarator, 7800 new_member_declarator): New nonterminals to implement the subset of 7801 'typename' allowed in new expressions. 7802 (unary_expr): Use new_type_id instead of typename. 7803 (after_type_declarator1, absdcl1): Fix semantics of member pointers. 7804 (abs_member_declarator, after_type_member_declarator): Lose. 7805 7806 * parse.y (absdcl1): Don't require parens around 7807 abs_member_declarator. 7808 (abs_member_declarator): Lose see_typename from rules. 7809 (after_type_member_declarator): Ditto. 7810 7811 * tree.c (get_identifier_list): New function, containing code 7812 previously duplicated in get_decl_list and list_hash_lookup_or_cons. 7813 (get_decl_list): Use it. 7814 (list_hash_lookup_or_cons): Ditto. 7815 7816 * parse.y (typed_declspecs, declmods): It's not necessary to hash 7817 the declspecs on class_obstack, so don't. This way typed_typespecs 7818 can reduce to typed_declspecs. 7819 7820Wed Mar 2 14:29:18 1994 Jason Merrill (jason@cygnus.com) 7821 7822 * cvt.c (build_up_reference): If we aren't checking visibility, 7823 also allow base->derived conversions. 7824 7825Mon Feb 28 15:14:29 1994 Per Bothner (bothner@kalessin.cygnus.com) 7826 7827 * typeck.c (build_c_cast): Remove bogus hack when converting 7828 to a reference type. 7829 7830 * cp-tree.h (lang_decl::vbase_init_list, DECL_VBASE_INIT_LIST): 7831 Removed, not used. 7832 (lang_stype::methods, lang_decl::next_method): New fields. 7833 (CLASSTYPE_METHODS, DECL_NEXT_METHOD): New macros. 7834 * decl.c (duplicate_decls): Preserve DECL_NEXT_METHOD. 7835 7836 * cp-tree.h, decl2.c (flag_vtable_hack): New flag. 7837 * decl2.c (finish_vtable_vardecl): If flag_vtable_hack, 7838 and !CLASSTYPE_INTERFACE_KNOWN, try to use the presence of 7839 a non-inline virtual function to control emitting of vtables. 7840 * class.c (finish_struct): Build CLASSTYPE_METHODS list. 7841 * search.c (build_vbase_vtables_init): Don't assemble_external 7842 (yet) if flag_vtable_hack. 7843 * class.c (build_vfn_ref): Ditto. 7844 7845Mon Feb 28 14:54:13 1994 Jason Merrill (jason@deneb.cygnus.com) 7846 7847 * parse.y (component_decl): Don't include "typed_declspecs 7848 declarator ';'" speedup, since it breaks enums. 7849 7850Fri Feb 25 15:43:44 1994 Per Bothner (bothner@kalessin.cygnus.com) 7851 7852 * class.c (finish_struct): Minor optimization for building 7853 fn_fields list. 7854 7855Fri Feb 25 15:23:42 1994 Jason Merrill (jason@deneb.cygnus.com) 7856 7857 * decl.c (start_function): Fix detection of function overloading. 7858 7859Thu Feb 24 22:26:19 1994 Mike Stump <mrs@cygnus.com> 7860 7861 * lex.c (check_newline): #pragma interface can take a string 7862 argument, just like #pragma implementation. #pragma implementation 7863 checks for garbage on the line, line #pragma interface does. Main 7864 input files do not auto implement like named files, #pragma 7865 implementation must be used explicitly. 7866 7867Thu Feb 24 17:09:01 1994 Jason Merrill (jason@deneb.cygnus.com) 7868 7869 * parse.y (components): Handle list of one again. 7870 (notype_components): Ditto. 7871 (after_type_declarator1): Take maybe_raises out again. 7872 7873 * gxxint.texi (Parser): Document additional r/r conflict. 7874 7875Wed Feb 23 14:42:55 1994 Jason Merrill (jason@deneb.cygnus.com) 7876 7877 * gxxint.texi (Parser): Add node. 7878 7879 * Makefile.in (stamp-parse): Update expected conflict count. 7880 7881 * parse.y (various): Replace "declmods declarator" with "declmods 7882 notype_declarator". The comment saying that "declmods declarator ';'" 7883 corresponds to "int i;" was wrong; it corresponds to "const i;". 7884 (component_decl): Add "typed_declspecs declarator ';'" rule; this 7885 *does* correspond to "int i;". Change "declmods components" to 7886 "declmods notype_components". 7887 (components): Don't deal with a list of one anymore. 7888 (notype_components): New nonterminal, corresponds to notype_declarator. 7889 ({after_,no}type_component_decl{,0}): More new nonterminals. 7890 ({after_,no}type_declarator): Fold in START_DECLARATOR token. 7891 Eliminates four reduce/reduce conflicts. 7892 7893 (expr): Depend on nontrivial_exprlist instead of nonnull_exprlist. 7894 (nontrivial_exprlist): New nonterminal: A list of at least two 7895 expr_no_commas's. 7896 (nonnull_exprlist): Depend on nontrival_exprlist. 7897 Eliminates four reduce/reduce conflicts. 7898 7899 (named_class_head): Move intermediate code block into separate 7900 nonterminal so that we can stick %prec EMPTY on it. 7901 7902 Add more %prec EMPTY's to eliminate remaining shift/reduce 7903 conflicts. 7904 7905 (after_type_declarator): Add maybe_raises to fndecl rules. 7906 (after_type_declarator_no_typename): Remove. 7907 For correctness. 7908 7909 Document remaining reduce/reduce conflicts. 7910 7911Tue Feb 22 12:10:32 1994 Jason Merrill (jason@deneb.cygnus.com) 7912 7913 * search.c (get_base_distance): Only bash BINFO_INHERITANCE_CHAIN 7914 (TYPE_BINFO (type)) if we care about the path. 7915 7916 * tree.c (lvalue_p): A COND_EXPR is an lvalue if both of the 7917 options are. 7918 7919Mon Feb 21 19:59:40 1994 Mike Stump <mrs@cygnus.com> 7920 7921 * Makefile.in (mostlyclean): lex.c is a source file, don't 7922 remove. 7923 7924Sat Feb 19 01:27:14 1994 Jason Merrill (jason@deneb.cygnus.com) 7925 7926 * parse.y: Eliminate 20 shift/reduce conflicts. 7927 7928Fri Feb 18 11:49:42 1994 Jason Merrill (jason@deneb.cygnus.com) 7929 7930 * pt.c (type_unification): Add subr argument; if set, it means 7931 that we are calling ourselves recursively, so a partial match is OK. 7932 (unify): Support pointers to methods and functions. 7933 (tsubst): Support method pointers. 7934 * decl.c (build_ptrmemfunc_type): No longer static, so that 7935 tsubst can get at it. 7936 7937 * init.c (is_aggr_typedef): Pretend template type parms are 7938 aggregates. 7939 * decl2.c (build_push_scope): If cname refers to a template type 7940 parm, just grin and nod. 7941 7942 * call.c (build_overload_call_real): Pass subr argument to 7943 type_unification. 7944 * pt.c (do_function_instantiation): Ditto. 7945 * class.c (instantiate_type): Ditto. 7946 7947 * search.c (get_base_distance): If BINFO is a binfo, use it and 7948 don't mess with its BINFO_INHERITANCE_CHAIN. 7949 7950 * cvt.c (convert_to_reference): Fix temporary generation. 7951 If ambiguous, return error_mark_node. 7952 7953 * init.c (build_new): Put back some necessary code. 7954 7955Thu Feb 17 15:39:47 1994 Jason Merrill (jason@deneb.cygnus.com) 7956 7957 * init.c (build_new): Deal with array types properly. 7958 7959 * search.c (get_binfo): Become a shell for get_base_distance. 7960 (get_binfo_recursive): Lose. 7961 (get_base_distance_recursive): Find the path to the via_virtual base 7962 that provides the most access. 7963 (get_base_distance): Ditto. 7964 7965 * parse.y (explicit_instantiation): Syntax is 'template class 7966 A<int>', not 'template A<int>'. 7967 7968 * typeck.c (convert_for_initialization): Remove bogus warning. 7969 7970 * parse.y (datadef): Revert patch of Oct 27. 7971 7972Thu Feb 17 15:12:29 1994 Per Bothner (bothner@kalessin.cygnus.com) 7973 7974 * class.c (build_vfn_ref): Cast delta field to ptrdiff_type_node, 7975 rather than integer_type_node. Does wonders for the Alpha. 7976 7977Thu Feb 17 13:36:21 1994 Jason Merrill (jason@deneb.cygnus.com) 7978 7979 * decl.c (build_ptrmemfunc_type): Make sure that the pmf type 7980 goes onto the same obstack as its target type. 7981 7982Wed Feb 16 00:34:46 1994 Jason Merrill (jason@deneb.cygnus.com) 7983 7984 * cvt.c (convert_to_reference): If converting via constructor 7985 on local level, go back to build_cplus_new approach. 7986 7987 * tree.c (build_cplus_new): If with_cleanup_p, set cleanup slot 7988 to error_mark_node to prevent expand_expr from building a cleanup 7989 for this variable. 7990 7991 * lex.c (default_assign_ref_body): Return *this from the memcpy 7992 version, too. 7993 7994 * decl.c (grok_reference_init): Just return if called with 7995 error_mark_node, don't worry about initializing non-const reference 7996 with temporary. 7997 7998 * cvt.c (convert_to_reference): Do the right thing for 7999 non-aggregate reference conversions, pedwarn when generating a 8000 non-const reference to a temporary. 8001 8002 * class.c (finish_struct): TYPE_HAS_COMPLEX_{INIT,ASSIGN}_REF and 8003 TYPE_NEEDS_CONSTRUCTING all depend on TYPE_USES_VIRTUAL_BASECLASSES 8004 again. 8005 8006Tue Feb 15 19:47:19 1994 Jason Merrill (jason@deneb.cygnus.com) 8007 8008 * decl.c (grok_reference_init): Pawn off a lot of the work on 8009 convert_to_reference. Generally do the right thing. 8010 8011 * cvt.c (convert_to_reference): Conform to the initial comment; 8012 i.e. don't create temps if decl != error_mark_node. Handle 8013 cleanups better for temps that do get created. Don't pretend 8014 that we can use an 'A' to initialize a 'const double &' just by 8015 tacking on a NOP_EXPR. Support LOOKUP_SPECULATIVELY. 8016 8017 * call.c (build_method_call): Set TREE_HAS_CONSTRUCTOR on 8018 constructor calls. 8019 8020Mon Feb 14 14:50:17 1994 Jason Merrill (jason@deneb.cygnus.com) 8021 8022 * decl.c (grok_reference_init): Make a temporary for initializing 8023 const reference from constant expression. 8024 8025Mon Feb 14 11:31:31 1994 Per Bothner (bothner@kalessin.cygnus.com) 8026 8027 * cp-tree.h, decl.c (set_identifier_local_value): Deleted function. 8028 * decl.c (pushdecl): Define decl in correct binding_level 8029 (which isn't always the inner_binding_level). 8030 8031 * cvt.c (build_up_reference): Don't ever call expand_aggr_init. 8032 It's ugly, and I don't think it's the right thing to do. 8033 8034 * cp-tree.h, class.c, decl.c, decl2.c, sp/search.c: 8035 Remove NEW_CLASS_SCOPING, assuming it is always 1. 8036 * decl.c (pop_decl_level): Removed; manually inlined. 8037 8038Sun Feb 13 19:04:56 1994 Jason Merrill (jason@deneb.cygnus.com) 8039 8040 * class.h (candidate): Add basetypes field. 8041 8042 * call.c (build_method_call): Do access checking after choosing a 8043 function, not before. 8044 8045 * Makefile.in (cvt.o, call.o, method.o): Depend on class.h. 8046 (mostlyclean): Remove ../cc1plus. 8047 8048Fri Feb 11 11:52:26 1994 Jason Merrill (jason@deneb.cygnus.com) 8049 8050 * class.c (finish_struct): Don't allow adjusting access to a field 8051 of a base class if a local field has the same name. 8052 8053 * error.c (dump_type_prefix): Output basetype for METHOD_TYPEs. 8054 8055hu Jan 13 17:55:51 EST 1994 Gnanasekaran Swaminathan (gs4t@virginia.edu) 8056 8057 * cp-tree.h (DESTRUCTOR_NAME_P): do not confuse AUTO_TEMP names 8058 with destructor names when either NO_DOLLAR_IN_LABEL or 8059 NO_DOT_IN_LABEL are not defined. 8060 8061 Now `template <class T, T f(T&), const T*> class A {...}' works. 8062 8063 * pt.c (grok_template_type): substitute template parm types 8064 with actual types in complex type as well. 8065 (coerce_template_parms): update the grok_template_type () 8066 function call. 8067 8068 * pt.c (tsubst): Traverse method list using DECL_CHAIN. 8069 8070 * decl.c (grok_op_properties): Allow operator++/-- to have 8071 default arguments. 8072 8073 * typeck2.c (store_init_value): Don't abort when called to 8074 initialize a type that needs constructing with a CONSTRUCTOR. 8075 8076 * init.c (expand_aggr_init_1, CONSTRUCTOR case): If 8077 store_init_value fails, build and expand an INIT_EXPR. If 8078 store_init_value succeeds, call expand_decl_init. 8079 8080Fri Feb 11 02:49:23 1994 Mike Stump <mrs@cygnus.com> 8081 8082 * class.c (build_vbase_path): Use complete_type_p instead of 8083 resolves_to_fixed_type_p to determine if the virtual bases are in 8084 their right place for the type of expr. Cures problem of thinking a 8085 virtual base class is one place, when it is in fact someplace else. 8086 8087Fri Feb 11 00:26:46 1994 Mike Stump <mrs@cygnus.com> 8088 8089 * init.c (resolve_offset_ref): Make sure we first convert to 8090 intermediate type, if given, when dealing with members off `this'. 8091 Solves an incorrrect `type `foo' is not a base type for type 8092 `multiple'' when it is infact, a base type. 8093 8094Thu Feb 10 21:49:35 1994 Mike Stump <mrs@cygnus.com> 8095 8096 * class.c (modify_other_vtable_entries): Use get_binfo, instead 8097 of binfo_value. Solves problem with compiler giving a `base class 8098 `B' ambiguous in binfo_value (compiler error)' on complex MI 8099 herarchies, when a virtual function is first defied in a virtual 8100 base class. 8101 8102Thu Feb 10 17:19:32 1994 Mike Stump <mrs@cygnus.com> 8103 8104 * class.c (build_vbase_path): Don't complain about ambiguous 8105 intermediate conversion when converting down to a virtual base 8106 class, even if they might seem to be ambiguous. 8107 8108Thu Feb 10 12:18:26 1994 Jason Merrill (jason@deneb.cygnus.com) 8109 8110 * typeck2.c (build_functional_cast): #if 0 out constructor 8111 inheritance code, improve error messages. 8112 8113 * class.c (finish_base_struct): Complain about base with only 8114 non-default constructors in derived class with no constructors. 8115 8116 * decl.c (grokdeclarator): Fix detection of virtual new/delete. 8117 8118Wed Feb 9 22:02:32 1994 Mike Stump <mrs@cygnus.com> 8119 8120 * search.c (build_mi_virtuals, add_mi_virtuals, 8121 report_ambiguous_mi_virtuals): Removed unneeded code. 8122 * class.c (finish_struct_bits): Ditto. 8123 8124Wed Feb 9 11:27:17 1994 Jason Merrill (jason@deneb.cygnus.com) 8125 8126 * pt.c (end_template_instantiation): Push decl before 8127 pop_from_top_level. 8128 8129 * typeck2.c (build_m_component_ref): Make sure datum is of 8130 aggregate type. 8131 8132 * init.c (get_type_value): New function, returns 8133 IDENTIFIER_TYPE_VALUE or IDENTIFIER_CLASS_TYPE_VALUE or NULL_TREE. 8134 8135 * call.c (build_method_call): Don't die on call to destructor for 8136 non-type. 8137 8138 * decl.c (grokdeclarator): Complain about virtual op new and op 8139 delete, make static virtuals unvirtual instead of unstatic. 8140 8141 * typeck.c (build_c_cast): Also call default_conversion on 8142 methods. 8143 8144 * decl.c (grokdeclarator): Don't complain about anonymous 8145 bitfields. 8146 8147 * parse.y (simple_stmt, for loops): Move the continue point after 8148 the cleanups. 8149 8150 * class.c (finish_struct): Fix setting of 8151 TYPE_HAS_COMPLEX_INIT_REF. 8152 8153Tue Feb 8 13:21:40 1994 Jason Merrill (jason@deneb.cygnus.com) 8154 8155 * init.c (build_new): Deal with `new double (1)'. 8156 8157 * class.c (finish_struct): TYPE_HAS_COMPLEX_*_REF are supersets of 8158 TYPE_HAS_REAL_*_REF, but TYPE_HAS_COMPLEX_INIT_REF is independent of 8159 TYPE_NEEDS_CONSTRUCTING. 8160 8161 * decl.c (duplicate_decls): Propagate access decls. 8162 8163 * typeck2.c (process_init_constructor): Accept empty_init_node 8164 for initializing unions. 8165 8166 * class.c, lex.c, cp-tree.h: Use 8167 TYPE_HAS_COMPLEX_ASSIGN_REF where TYPE_HAS_REAL_ASSIGN_REF was used 8168 before, use TYPE_HAS_COMPLEX_INIT_REF for TYPE_NEEDS_CONSTRUCTING in 8169 some places. 8170 8171 * decl.c (finish_decl): Don't complain about uninitialized const 8172 if it was initialized before. 8173 8174Mon Feb 7 18:12:34 1994 Jason Merrill (jason@deneb.cygnus.com) 8175 8176 * lex.c (default_assign_ref_body): Don't deal with vbases for 8177 now. 8178 8179 * decl.c (finish_decl): Fix reversed logic for objects and other 8180 things that need to be constructed but have no initializer. 8181 8182 * class.c (finish_struct): Don't set TYPE_HAS_* flags that are 8183 set by grok_op_properties or finish_decl. 8184 8185 * decl.c: Don't warn about extern redeclared inline unless 8186 -Wextern-inline is given. 8187 * decl2.c (lang_decode_option): Ditto. 8188 * cp-tree.h: Ditto. 8189 8190Mon Feb 7 17:29:24 1994 Per Bothner (bothner@kalessin.cygnus.com) 8191 8192 * decl.c (pushdecl_with_scope): Fix thinko. Add forward 8193 declaration. 8194 8195 * decl.c (pushdecl_with_scope): New function. 8196 * decl.c (pushdecl_top_level): Use new function. 8197 * decl.c (pushtag): Initialize newdecl. 8198 * decl.c (pushtag): Push new type decl into correct scope. 8199 8200Mon Feb 7 14:42:03 1994 Jason Merrill (jason@deneb.cygnus.com) 8201 8202 * call.c, cvt.c, init.c, search.c, cp-tree.h: 8203 Eradicate LOOKUP_PROTECTED_OK. 8204 8205Mon Feb 7 13:57:19 1994 Per Bothner (bothner@kalessin.cygnus.com) 8206 8207 * decl.c (pushtag, xref_tag), cp-tree.h: Add extra parameter 8208 'globalize' to signify implicit declarations. 8209 * decl.c (globalize_nested_type, maybe_globalize_type): Removed. 8210 * decl.c (set_identifier_type_value_with_scope): New function. 8211 * decl.c (set_identifier_local_value): Simplify. 8212 * spew.c (yylex, do_addr): Modify to return a _DEFN if a 8213 forward declaration (followed by ';' and not preceded by 'friend'). 8214 * class.c, decl.c, except.c, init.c, parse.y, 8215 pt.c, search.c: Add new argument to calls to xref_tag and 8216 pushtag. 8217 8218Mon Feb 7 00:22:59 1994 Jason Merrill (jason@deneb.cygnus.com) 8219 8220 * cp-tree.h (ACCESSIBLY_UNIQUELY_DERIVED_P): New macro, means what 8221 ACCESSIBLY_DERIVED_FROM_P meant before. 8222 (ACCESSIBLY_DERIVED_FROM_P): Now disregards ambiguity. 8223 8224 * cvt.c (build_up_reference): Call get_binfo with PROTECT == 1. 8225 8226 * search.c (get_base_distance_recursive): Members and friends of 8227 a class X can implicitly convert an X* to a pointer to a private or 8228 protected immediate base class of X. 8229 (get_binfo_recursive): Ditto. 8230 (get_base_distance): Ignore ambiguity if PROTECT < 0. 8231 (get_binfo): Lose multiple values of PROTECT. 8232 (compute_access): Protected is OK if the start of the 8233 search is an accessible base class of current_class_type. 8234 8235 * method.c (build_opfncall): Do check access on operator new here. 8236 8237 * decl.c (finish_function): Don't check access on operator new 8238 here. 8239 8240Sun Feb 6 14:06:58 1994 Jason Merrill (jason@deneb.cygnus.com) 8241 8242 * decl.c (xref_tag): The base of a derived struct is NOT always 8243 public. Duh. 8244 8245 * pt.c (do_explicit_instantiation): New function, called from 8246 parser to do explicit function instantiation. 8247 (type_unification): Allow the args list to be terminated with 8248 void_list_node. 8249 (do_pending_expansions): Look at i->interface for non-member 8250 templates. 8251 8252 * parse.y (datadef): Move explicit_instantiation here. 8253 (structsp): From here. 8254 (datadef): Complain about `int;'. 8255 8256Sun Feb 6 12:33:18 1994 Per Bothner (bothner@kalessin.cygnus.com) 8257 8258 * pt.c (end_template_instantiation), cp-tree.h: Remove unused 8259 second parameter, and simplify first from a TREE_LIST where 8260 we only care about its TREE_VALUE to just the value (an IDENTIFIER). 8261 * pt.c (instantiate_member_templates): Simplify argument list 8262 from a TREE_LIST to just an IDENTIFIER. 8263 * lex.c (yyprint): PRE_PARSED_CLASS_DECL is now just an IDENTIFIER. 8264 * parse.y (template_instantiate_once): Simplify accordingly. 8265 * decl.c (inner_binding_level): New. Use various places to 8266 simplify. 8267 8268Sun Feb 6 02:49:37 1994 Jason Merrill (jason@deneb.cygnus.com) 8269 8270 * typeck2.c (build_functional_cast): int() -> int(0). 8271 8272Sat Feb 5 00:53:21 1994 Jason Merrill (jason@deneb.cygnus.com) 8273 8274 * class.c (finish_struct): Don't do a bitwise copy for op= if the 8275 class has a virtual function table. 8276 8277 * typeck.c (convert_for_initialization): Restore warnings about 8278 not using defined op=. Should really be my_friendly_aborts, I 8279 s'pose. 8280 8281Fri Feb 4 14:21:00 1994 Jason Merrill (jason@deneb.cygnus.com) 8282 8283 * class.c (finish_struct): Tidy up conditions for doing bitwise 8284 copies of objects. 8285 8286 * decl.c (build_default_constructor): #if 0 out. 8287 8288 * *: Eradicate TYPE_GETS_{ASSIGNMENT,ASSIGN_REF,CONST_ASSIGN_REF, 8289 CONST_INIT_REF}, TYPE_HAS_REAL_CONSTRUCTOR. 8290 8291 * decl.c (grokdeclarator): Don't return void_type_node for 8292 friends being defined here. 8293 8294 * init.c (perform_member_init): Only do the init if it's useful. 8295 8296 * lex.c (default_copy_constructor_body): If we don't need to do 8297 memberwise init, just call __builtin_memcpy. 8298 (default_assign_ref_body): Ditto. 8299 8300 * decl.c (grokdeclarator): If friendp && virtualp, friendp = 0. 8301 8302Fri Feb 4 13:02:56 1994 Mike Stump <mrs@cygnus.com> 8303 8304 * lex.c (reinit_parse_for_method, cons_up_default_function): 8305 Don't give warn_if_unknown_interface warning when it came from a 8306 system header file. 8307 * pt.c (end_template_decl, instantiate_template): Ditto. 8308 * decl.c (start_decl): Ditto. 8309 8310Fri Feb 4 00:41:21 1994 Jason Merrill (jason@deneb.cygnus.com) 8311 8312 * decl.c (grokdeclarator): Don't try to set TYPE_WAS_ANONYMOUS on 8313 enums. 8314 8315 * decl2.c (constructor_name_full): Use IS_AGGR_TYPE_CODE instead of 8316 IS_AGGR_TYPE, since we don't know it's a type. 8317 8318Thu Feb 3 11:36:46 1994 Jason Merrill (jason@deneb.cygnus.com) 8319 8320 * decl.c (grokdeclarator): Don't complain about anonymous unions. 8321 8322 * cp-tree.h (TYPE_WAS_ANONYMOUS): This struct was originally 8323 anonymous, but had a name given to it by a typedef. 8324 8325 * decl.c (grokdeclarator): When renaming an anonymous struct, set 8326 TYPE_WAS_ANONYMOUS. 8327 8328 * decl2.c (constructor_name_full): Use TYPE_WAS_ANONYMOUS. 8329 8330 * cp-tree.h (DECL_UNDEFINED_FRIENDS): #if 0 out. 8331 8332 * init.c (xref_friend): Don't set up DECL_UNDEFINED_FRIENDS. 8333 (embrace_waiting_friends): Don't use DECL_UNDEFINED_FRIENDS. 8334 8335 * decl.c (grokdeclarator): Set TYPE_NESTED_NAME properly on nested 8336 anonymous structs that get typedef'd. 8337 8338 * decl.c (grokdeclarator): Always return void_type_node for 8339 friends. 8340 8341 * error.c (dump_function_decl): Don't use DECL_CLASS_CONTEXT for 8342 friends. 8343 (dump_function_decl): Don't print out default args for 8344 a function used in an expression. 8345 8346 * decl.c (grokdeclarator): Give error on abstract declarator used 8347 in an invalid context (i.e. `void (*)();'). 8348 8349 * error.c (cp_line_of): Support _TYPE nodes. 8350 (cp_file_of): Ditto. 8351 8352 * cvt.c (build_up_reference): Don't abort if passed a SAVE_EXPR; 8353 it can happen for the RHS of an assignment stmt where the LHS is 8354 a COND_EXPR. 8355 8356 * init.c (expand_aggr_init_1): Deal with bracketed initializer 8357 lists properly. 8358 8359 * class.c (finish_struct): Deal with enumerators and typedefs 8360 again. 8361 8362Wed Feb 2 11:30:22 1994 Jason Merrill (jason@deneb.cygnus.com) 8363 8364 * class.c (finish_struct): Tidy up loop over fields. 8365 8366 * errfn.c (cp_thing): Don't advance twice after a format. 8367 8368 * class.c (finish_struct): Complain about needing a constructor 8369 if a member has only non-default constructors, and don't try to 8370 generate a default constructor. 8371 8372 * decl.c (finish_decl): Also do the constructor thing if 8373 TYPE_NEEDS_CONSTRUCTING is set (for arrays). 8374 8375 * search.c (unuse_fields): New function: mark all fields in this 8376 type unused. 8377 (dfs_unuse_fields): Helper function. 8378 8379 * class.c (pushclass): If the new class is the same as the old 8380 class, still unuse the fields. 8381 (unuse_fields): Move to search.c. 8382 8383 * decl.c (grok_op_properties): Add friendp argument. 8384 (grokfndecl): Pass it. 8385 (start_method): Ditto. 8386 8387 * decl2.c (delete_sanity): Add use_global_delete parameter to catch 8388 ::delete calls. 8389 8390 * parse.y (unary_expr): Pass new parameter to delete_sanity. 8391 8392 * lex.c (default_copy_constructor_body): Don't choke if the union 8393 has no fields. 8394 (default_assign_ref_body): Ditto. 8395 8396 * call.c (compute_conversion_costs_ansi): Do the right thing for 8397 ellipsis matches. 8398 8399 * decl.c (push_to_top_level): Optimize. 8400 8401 * decl.c (start_function): Look for the lexical scope of a friend 8402 in DECL_CLASS_CONTEXT. 8403 8404 * init.c (do_friend): Set DECL_CLASS_CONTEXT on global friends. 8405 8406Tue Feb 1 15:59:24 1994 Jason Merrill (jason@deneb.cygnus.com) 8407 8408 * cp-tree.h (TREE_GETS_PLACED_NEW): New macro. 8409 8410 * init.c (init_init_processing): Don't assign BIN/BID to the 8411 IDENTIFIER_GLOBAL_VALUEs of their respective operators. 8412 (build_new): Check TREE_GETS_PLACED_NEW. 8413 8414 * decl.c (grok_op_properties): Don't set TREE_GETS_NEW for a decl of 8415 op new with placement, set TREE_GETS_PLACED_NEW. 8416 8417 * cp-tree.h (ANON_UNION_P): New macro. Applies to decls. 8418 8419 * class.c (finish_struct): Don't treat anonymous unions like 8420 other aggregate members. Do synthesize methods for unions without 8421 a name, since they may or may not be "anonymous unions". 8422 8423 * decl2.c (grok_x_components): Wipe out memory of synthesized methods 8424 in anonymous unions. 8425 8426 * lex.c (default_copy_constructor_body): Support unions. 8427 (default_assign_ref_body): Ditto. 8428 8429Mon Jan 31 12:07:30 1994 Jason Merrill (jason@deneb.cygnus.com) 8430 8431 * cp-tree.h: Fix documentation of LOOKUP_GLOBAL, add prototypes. 8432 8433 * error.c (args_as_string): New function (%A), like type_as_string 8434 except NULL_TREE -> "..." 8435 8436 * call.c (build_overload_call_real): Fix for new overloading. 8437 8438 * decl.c (grok_op_properties): Set all of the TYPE_OVERLOADS_* flags 8439 here. 8440 8441 * parse.y (operator_name): Instead of here. 8442 8443 * typeck2.c (build_functional_cast): Treat a TREE_LIST as a list 8444 of functions. 8445 8446 * call.c (build_overload_call_real): Support LOOKUP_SPECULATIVELY. 8447 8448 * method.c (build_opfncall): Don't need to massage return value 8449 any more, call build_overload_call with all flags. 8450 8451 * typeck.c (build_x_binary_op): Put back speculative call to 8452 build_opfncall. 8453 (build_x_unary_op): Ditto. 8454 (build_x_conditional_expr): Ditto. 8455 8456Mon Jan 31 10:00:30 1994 Mike Stump <mrs@cygnus.com> 8457 8458 * cvt.c (build_type_conversion_1): Change call to pedwarn into 8459 warning, and conditionalize upon warn_cast_qual. 8460 8461Fri Jan 28 11:48:15 1994 Jason Merrill (jason@deneb.cygnus.com) 8462 8463 * search.c (lookup_field): If xbasetype is a binfo, copy it to 8464 avoid clobbering its inheritance info. 8465 8466 * call.c (build_method_call): Don't overwrite basetype_path with 8467 TYPE_BINFO (inst_ptr_basetype) if they have the same type. 8468 8469 * search.c (compute_access): Fix handling of protected inheritance 8470 and friendship with the enclosing class. 8471 8472 * typeck2.c (store_init_value): Allow passing of TREE_CHAIN for 8473 initialization of arbitrary variable. 8474 8475 * typeck2.c (build_functional_cast): Only try calling a method if 8476 one exists. 8477 8478 * decl.c (grokdeclarator): Move handling of constructor syntax 8479 initialization into first loop for generality. 8480 (parmlist_is_random): Lose. 8481 8482 * lex.c (cons_up_default_function): Set TREE_PARMLIST on arguments 8483 to default function. 8484 8485Thu Jan 27 19:26:51 1994 Jason Merrill (jason@deneb.cygnus.com) 8486 8487 * decl.c (grokparms): Abort if we get called with something we don't 8488 expect. 8489 8490Thu Jan 27 17:37:25 1994 Mike Stump <mrs@cygnus.com> 8491 8492 * call.c (build_overload_call_real): Change argument complain to 8493 flags to match style of rest of code. Pass it down to 8494 build_function_call_real as necessary. 8495 * call.c (build_overload_call, build_overload_call_maybe): Change 8496 argument complain to flags to match style of rest of code. 8497 * cp-tree.h (build_function_call_real): Added fourth flags 8498 argument. 8499 * cvt.c (convert_to_reference): Only give warning messages, if 8500 LOOKUP_COMPLAIN is set. 8501 * typeck.c (build_x_function_call): Change simple complain 8502 argument to build_overload_call_maybe and build_overload_call, to 8503 LOOKUP_COMPLAIN to match style of rest of code. 8504 * typeck2.c (build_functional_cast): Ditto. 8505 * typeck.c (build_function_call_real): Add flags, so that we can 8506 not complain, if we don't want to complain. Complain about 8507 arguments, if we are complaining, otherwise don't. 8508 * typeck.c (build_function_call, build_function_call_maybe): 8509 Stick in flags argument. 8510 * typeck.c (build_x_binary_op, build_x_unary_op, 8511 build_x_conditional_expr, build_x_compound_expr): Follow style of 8512 build_x_indirect_ref, as it is more correct and more common. 8513 8514Thu Jan 27 14:36:20 1994 Jason Merrill (jason@deneb.cygnus.com) 8515 8516 * call.c (build_method_call): Don't check for being called with 8517 a pointer. 8518 8519 * decl2.c (finish_file): Don't play with DECL_CLASS_CONTEXT for the 8520 static initializer function. 8521 8522 * init.c (build_member_call): Use convert_force here, too. 8523 8524 * search.c (compute_access): Only treat static members specially 8525 if they are referenced directly. 8526 8527Wed Jan 26 18:28:14 1994 Jason Merrill (jason@deneb.cygnus.com) 8528 8529 * gxxint.texi (Access Control): New node. 8530 8531 * search.c (current_scope): New function; returns whichever of 8532 current_class_type and current_function_decl is the most nested. 8533 (compute_access): Total overhaul to make it clearer and more 8534 correct. Don't use the cache for now; in the only situation where 8535 it was used before, it gained nothing. This frees up three of the 8536 DECL_LANG_FLAGs for possible other use! 8537 8538 * cp-tree.h: #if 0 out DECL_PUBLIC & friends. 8539 8540 * typeck.c (build_component_ref_1): Don't check DECL_PUBLIC. 8541 8542 * call.c (build_method_call): Use convert_force to cast `this' -- 8543 rely on the access checking for the method itself. 8544 8545 * init.c (is_friend): Do the nesting thing, handle types. I am 8546 my own friend. 8547 (is_friend_type): Become a shell for is_friend. 8548 (add_friend): Never stick in ctype. 8549 Why are the friendship functions in init.c, anyway? 8550 8551Wed Jan 26 17:50:00 1994 Mike Stump <mrs@cygnus.com> 8552 8553 * cvt.c (build_type_conversion_1): Don't conditionalize call to 8554 pedwarn upon pedantic. 8555 8556Wed Jan 26 17:20:46 1994 Mike Stump <mrs@cygnus.com> 8557 8558 * cvt.c (convert_to_reference): Add 8.4.3 checking so that one 8559 gets a warning if one tries to initialize a non-const & from a 8560 non-lvalue. 8561 * cvt.c (convert_to_reference): Use %P format for argument 8562 numbers in warnings. 8563 8564Wed Jan 26 14:35:06 1994 Mike Stump <mrs@cygnus.com> 8565 8566 * init.c (build_delete): Follow style in call.c to construct the 8567 virtual call to the desctructor, as that code is right. Fixes a 8568 problem of the compiler saying a pointer conversion is ambiguous. 8569 8570Wed Jan 26 11:28:14 1994 Jason Merrill (jason@deneb.cygnus.com) 8571 8572 * cp-tree.h (VTABLE_NAME_P): Change other occurrence of 8573 VTABLE_NAME_FORMAT to VTABLE_NAME. 8574 8575 * *: s/visibility/access/g 8576 8577Tue Jan 25 18:39:12 1994 Jason Merrill (jason@deneb.cygnus.com) 8578 8579 * typeck.c (build_modify_expr): Don't smash references if INIT_EXPR. 8580 8581Tue Jan 25 13:54:29 1994 Mike Stump <mrs@cygnus.com> 8582 8583 * init.c (build_delete): Back out Jan 17th & 18th pacthes, as 8584 they break libg++. 8585 8586Tue Jan 25 13:11:45 1994 Jason Merrill (jason@deneb.cygnus.com) 8587 8588 * decl.c (duplicate_decls): Fix pointer arithmetic. 8589 8590Mon Jan 24 15:50:06 1994 Chip Salzenberg (chip@fin.uucp) 8591 8592 [ cp-* changes propagated from c-* changes in 940114 snapshot ] 8593 * cp-parse.y (maybe_attribute): Allow multiple __attribute__ 8594 clauses on a declaration. 8595 8596Mon Jan 24 17:06:23 1994 Jason Merrill (jason@deneb.cygnus.com) 8597 8598 * class.c (finish_struct): Do synthesize methods for anon 8599 structs, just not unions. 8600 8601Mon Jan 24 13:50:13 1994 Kung Hsu (kung@mexican.cygnus.com) 8602 8603 * decl.c (xref_tag): handle anonymous nested type. 8604 * decl.c (globalize_nested_type): add no globalize bit check. 8605 * spew.c (hack_more_ids) : templated nested decl not push top 8606 level. 8607 8608 * parse.y : get rid of 'goto do_components'. It is much better 8609 for debugging. 8610 8611 * decl.c (is_anon_name): get rid of the function and use the 8612 macro ANON_AGGRNAME_P. 8613 * pt.c : ditto. 8614 8615Fri Jan 21 14:06:02 1994 Jason Merrill (jason@deneb.cygnus.com) 8616 8617 * class.c (finish_struct): Don't synthesize any methods for 8618 anonymous structs/unions. 8619 8620 * typeck.c (build_modify_expr): Don't treat pmf's as class objects. 8621 8622Thu Jan 20 18:56:46 1994 Jason Merrill (jason@deneb.cygnus.com) 8623 8624 * method.c (build_opfncall): Call build_indirect_ref on 8625 synthesized instance for operator delete. 8626 8627 * pt.c (type_unification): Don't abort if called with a list of 8628 types in ARGS. 8629 8630 * class.c (instantiate_type): Deal with function templates. 8631 8632Thu Jan 20 16:55:35 1994 Jim Wilson (wilson@sphagnum.cygnus.com) 8633 8634 * Makefile.in (CC): Default to cc not gcc. 8635 8636Thu Jan 20 13:47:54 1994 Jason Merrill (jason@deneb.cygnus.com) 8637 8638 * typeck.c (build_modify_expr): Call constructor if appropriate. 8639 8640 * decl.c (push_to_top_level): Clear out class-level bindings cache. 8641 8642Wed Jan 19 13:51:22 1994 Jason Merrill (jason@deneb.cygnus.com) 8643 8644 * call.c (resolve_scope_to_name): Work recursively (previously only 8645 looked down one level). 8646 8647 * lex.c (do_pending_inlines): If we're still dealing with the last 8648 batch of inlines, don't start working on a new one. 8649 8650 * Makefile.in (stamp-parse): Update conflict count. 8651 (TAGS): Fix. 8652 8653 * parse.y (explicit_instantiation): New rule; implements 8654 'template A<int>' syntax (though not 'template foo(int)' yet). 8655 (structsp): Add explicit_instantiation. 8656 8657Tue Jan 18 13:53:05 1994 Jason Merrill (jason@deneb.cygnus.com) 8658 8659 * class.c (finish_struct, etc.): Simplify decision to synthesize 8660 a destructor. 8661 8662 * call.c, class.c, cp-tree.h, decl.c, init.c, 8663 ptree.c, search.c, typeck.c, typeck2.c: Nuke 8664 TYPE_NEEDS_CONSTRUCTOR (change all calls to TYPE_NEEDS_CONSTRUCTING). 8665 * init.c (expand_aggr_init_1): Don't try non-constructor methods 8666 of initializing objects. 8667 (build_new): Don't try other methods if the constructor lookup fails. 8668 8669 * class.c (finish_base_struct): Set cant_have_default_ctor and 8670 cant_synth_copy_ctor properly. 8671 (finish_struct): Ditto. 8672 8673Mon Jan 17 13:58:18 1994 Jason Merrill (jason@deneb.cygnus.com) 8674 8675 * typeck.c (build_modify_expr_1): #if 0 out again. 8676 (build_modify_expr): #if 0 out memberwise init code again. 8677 8678 * lex.c (default_copy_constructor_body): Be const-correct. 8679 (default_assign_ref_body): Ditto. 8680 8681 * init.c (perform_member_init): Use TYPE_HAS_CONSTRUCTOR to decide 8682 whether or not to use it, rather than TYPE_NEEDS_CONSTRUCTING. 8683 (expand_aggr_init): Disable silent conversion from initializer list 8684 to list of args for a constructor. 8685 8686 * class.c (base_info): Lose needs_default_ctor. 8687 (finish_base_struct): Ditto. 8688 (finish_struct): Ditto. 8689 8690 * decl.c (init_decl_processing): Don't turn off flag_default_inline 8691 just because flag_no_inline is on. 8692 (finish_decl): Use TYPE_HAS_CONSTRUCTOR to decide to use 8693 constructor. 8694 8695 * class.c (finish_struct): Synthesize default ctor whenever 8696 allowed. 8697 8698 * Makefile.in (TAGS): Don't try to run etags on cp-parse.y. 8699 8700Sat Jan 15 18:34:33 1994 Mike Stump <mrs@cygnus.com> 8701 8702 * Makefile.in, configure: Handle the C++ front-end in a 8703 subdirectory. 8704 * cp-*: Move C++ front-end to cp/*. 8705 8706Fri Jan 14 14:09:37 1994 Jason Merrill (jason@deneb.cygnus.com) 8707 8708 * cp-typeck.c (build_function_call_real): Modify to match other 8709 instances of taking the address of the function. 8710 8711 * cp-class.c (finish_struct): Set TYPE_HAS_REAL_CONSTRUCTOR to 1 if 8712 there are non-synthesized constructors. 8713 Only set TYPE_NEEDS_CONSTRUCTOR if TYPE_HAS_REAL_CONSTRUCTOR. 8714 Always generate copy constructor if possible. 8715 8716 * cp-tree.h (lang_type): Add has_real_constructor bitfield. 8717 (TYPE_HAS_REAL_CONSTRUCTOR): Define. 8718 8719 * cp-lex.c (default_copy_constructor_body): Use init syntax 8720 for all bases. 8721 8722 * cp-type2.c (store_init_value): Only give error for initializer list 8723 if TYPE_HAS_REAL_CONSTRUCTOR. 8724 8725Thu Jan 13 15:38:29 1994 Jason Merrill (jason@deneb.cygnus.com) 8726 8727 * cp-tree.h (DECL_SYNTHESIZED): Add defn. 8728 (lang_decl): Add synthesized bitfield to decl_flags. 8729 8730 * cp-lex.c (cons_up_default_function): Use DECL_SYNTHESIZED to mark 8731 artificial methods, rather than a line # of 0. 8732 8733Fri Jan 14 18:25:29 1994 Kung Hsu (kung@mexican.cygnus.com) 8734 8735 * cp-decl (xref_tag): fix a bug in conflict type. 8736 * cp-parse.y : add SCOPED_NAME for uninstantiated template nested 8737 type reference. 8738 * cp-spew.c (yylex) : generated SCOPED_NAME token. 8739 * cp-lex.c (yyprint): handle SCOPED_NAME. 8740 8741Fri Jan 14 17:00:29 1994 Mike Stump <mrs@cygnus.com> 8742 8743 * cp-decl.c (pushdecl): Revert patch from Jan 11 19:33:03, as it is 8744 not right. 8745 8746Thu Jan 13 14:00:35 1994 Kung Hsu (kung@mexican.cygnus.com) 8747 8748 * cp-decl2.c (grok_x_components): fix a bug that enum type does not 8749 have type_flags. 8750 8751Thu Jan 13 11:39:34 1994 Mike Stump <mrs@cygnus.com> 8752 8753 Ensure that all vtable pointers are initialized with all the right 8754 values. 8755 8756 * cp-class.c (is_normal): Changed to reflect new meaning of 8757 CLASSTYPE_VFIELD_PARENT. 8758 * cp-class.c (maybe_fixup_vptrs): Use of 8759 CLASSTYPE_NEEDS_VIRTUAL_REINIT here is misguided. Use 8760 BINFO_MODIFIED instead. 8761 * cp-class.c (finish_struct): Changed to reflect new meaning of 8762 CLASSTYPE_VFIELD_PARENT. 8763 * cp-decl.c (get_binfo_from_vfield): Removed, unneeded now. 8764 * cp-decl.c (finish_function): Use init_vtbl_ptrs, instead of open 8765 coding it here. 8766 * cp-init.c (init_vfields): Changed name to init_vtbl_ptrs, and 8767 re-implement. 8768 * cp-init.c (emit_base_init): Use new name init_vtbl_ptrs. 8769 * cp-tree.h (vfield_parent): Changed to integer. 8770 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Changed docs to reflect new 8771 meaning. 8772 * cp-tree.h (init_vtbl_ptrs): Added init_vtbl_ptrs. 8773 8774Wed Jan 12 18:24:16 1994 Kung Hsu (kung@mexican.cygnus.com) 8775 8776 * cp-decl.c (xref_tag): re-implement globalize nested type. 8777 * cp-decl2.c (grok_x_components): ditto. 8778 * cp-parse.y: ditto. 8779 * cp-tree.h (lang_type): add no_globalize bit in type_flags. 8780 8781Wed Jan 12 14:08:09 1994 Jason Merrill (jason@deneb.cygnus.com) 8782 8783 * cp-decl.c (grokdeclarator): Don't set TREE_PUBLIC on friend 8784 decls with a definition attached. 8785 8786 * cp-typeck.c (build_modify_expr): Undo previous change in the case 8787 of INIT_EXPRs. 8788 8789Tue Jan 11 19:33:03 1994 Jason Merrill (jason@deneb.cygnus.com) 8790 8791 * cp-typeck.c (build_modify_expr): Replace code for generating 8792 assignment semantics for classes with an error. 8793 (build_modify_expr_1): #if 0 out. 8794 8795 * cp-decl.c (pushdecl): Patch bogus design of pushdecl 8796 behavior for overloaded functions (it doesn't push anything). 8797 8798 * cp-class.c (finish_struct): When generating default op=, 8799 set TYPE_HAS_ASSIGNMENT. 8800 8801Mon Jan 10 18:48:06 1994 Mike Stump <mrs@cygnus.com> 8802 8803 * cp-cvt.c (convert): Make {double, clashing enum} -> enum 8804 invalid. 8805 * cp-typeck.c (convert_for_assignment): Simplify. 8806 * cp-decl2.c (warn_enum_clash): Removed. 8807 * invoke.texi (-Wenum-clash): Removed. 8808 * toplev.c (-Wenum-clash): Removed. 8809 8810Mon Jan 10 17:48:37 1994 Kung Hsu (kung@mexican.cygnus.com) 8811 8812 * cp-decl.c (finish_decl): fix incorrect popclass call. 8813 8814 * cp-decl.c (is_anon_name): new function, check whether the name 8815 is anonymous name generated by compiler. 8816 * cp-decl.c (grokdeclarator): allow nested SCOPE_REF 8817 * cp-spew.c (hack_more_ids): handle nested type in template. 8818 * cp-parse.y : handle nested type reference in uninstantiated 8819 template. 8820 * cp-call.c (build_method_call): handle uninstantiated template 8821 case. 8822 * cp-pt.c (search_nested_type_in_tmpl): new function, search nested 8823 type in template. 8824 * cp-pt.c (lookup_nested_type_by_name): new function, lookup nested 8825 type by name. 8826 * cp-pt.c (tsubst): handle nested type search by name. 8827 8828Mon Jan 10 14:32:18 1994 Jason Merrill (jason@deneb.cygnus.com) 8829 8830 * cp-init.c (build_member_call): Propagate qualifiers to new type. 8831 8832 * cp-call.c (build_method_call): Count functions the new way. 8833 8834Fri Jan 7 19:03:26 1994 Jason Merrill (jason@deneb.cygnus.com) 8835 8836 * cp-decl.c (pushtag): Set DECL_ASSEMBLER_NAME for nested classes, 8837 too. 8838 8839Tue Jan 4 16:45:51 1994 Kung Hsu (kung@cirdan.cygnus.com) 8840 8841 * cp-parse.y: change to handle whether to globalize nested class. 8842 * cp-decl.c(xref_tag, maybe_globalize_type): Ditto. 8843 8844Mon Jan 3 22:22:32 1994 Gerald Baumgartner (gb@cygnus.com) 8845 8846 * Makefile.in cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c 8847 cp-error.c cp-init.c cp-lex.c cp-lex.h cp-method.c cp-parse.y 8848 cp-spew.c cp-tree.c cp-tree.h cp-type2.c cp-typeck.c cp-xref.c 8849 gplus.gperf toplev.c: Incorporated C++ signature extension. 8850 * cp-sig.c: New file, contains most of signature processing. 8851 * cp-hash.h: Regenerated from gplus.gperf. 8852 8853 * gcc.1 g++.1: Added explanation for the `-fhandle-signatures' 8854 and `-fno-handle-signatures' command line flags. 8855 8856 * gcc.texi: Changed the last-modification date. 8857 * invoke.texi: Added `-fhandle-signatures' in the list of 8858 C++ language options. Added explanation for this option. 8859 8860Tue Dec 28 21:10:03 1993 Mike Stump <mrs@cygnus.com> 8861 8862 * cp-init.c (expand_vec_init): Remove comptypes test, as it is too 8863 harsh here. 8864 8865Tue Dec 28 13:42:22 1993 Mike Stump <mrs@cygnus.com> 8866 8867 * cp-pt.c (do_pending_expansions): Decide to expand a template 8868 member function, based upon it's class type, not the class type of 8869 the first place it was declared. 8870 8871Tue Dec 28 05:42:31 1993 Mike Stump <mrs@cygnus.com> 8872 8873 * cp-class.c (is_normal): New routine, use to determine when the 8874 given binfo is the normal one. (The one that should have the simple 8875 vtable name.) 8876 * cp-class.c (modify_other_vtable_entries): Use DECL_ASSEMBLER_NAME 8877 to check if two fndecls are `the same'. Sometimes this routine can 8878 modify the main vtable, and normal should be 1, in that case, so use 8879 is_normal() to determine if this is the main vtable for the class. 8880 Don't recurse down virtual bases, as they are shared, and we take 8881 care of them elsewhere. 8882 * cp-class.c (modify_vtable_entries): If we have already updated the 8883 vtable with the new virtual, don't do it again. 8884 * cp-class.c (finish_struct): Set CLASSTYPE_VFIELD_PARENT as 8885 appropriate. Do virtual function overriding in virtual bases, after 8886 normal overriding, so that the base function list in DECL_VINDEX is 8887 not overridden, before we have a chance to run through the list. 8888 Use DECL_ASSEMBLER_NAME to check if two fndecls are `the same'. 8889 Make sure we pass the right address into modify_vtable_entries. 8890 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): New field to indicate which 8891 binfo is the one that has the vtable that we based our vtable on. 8892 8893Fri Dec 24 09:40:52 1993 Michael Tiemann (tiemann@blues.cygnus.com) 8894 8895 * cp-typeck.c (c_expand_start_case): Use default_conversion to 8896 convert expression from reference type if necessary. 8897 8898Wed Dec 22 17:58:43 1993 Jason Merrill (jason@deneb.cygnus.com) 8899 8900 * cp-typeck.c (build_unary_op): Make sure that it's a TREE_LIST before 8901 trying to read its TREE_VALUE. 8902 8903 * cp-class.c (finish_struct_methods): Clear DECL_IN_AGGR_P here. 8904 (finish_struct): Instead of here. 8905 8906Tue Dec 21 14:34:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8907 8908 * cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't 8909 have TYPE_PTRMEMFUNC_P set before we try to build its 8910 CLASSTYPE_ID_AS_LIST. 8911 (get_decl_list): Likewise, when trying to read it. 8912 8913 * cp-tree.h (VTABLE_NAME): No def with NO_{DOLLAR,DOT} defined. 8914 (VTABLE_NAME_P): Use it instead of VTABLE_NAME_FORMAT. 8915 8916Mon Dec 20 13:35:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8917 8918 * cp-typeck.c (rationalize_conditional_expr): New function. 8919 (unary_complex_lvalue): Use it. 8920 (build_modify_expr): Use it, since trying to do an ADDR_EXPR of it 8921 with build_unary_op won't cut it. Don't wrap the COND_EXPR with a 8922 SAVE_EXPR either. 8923 8924 * cp-decl2.c (explicit_warn_return_type): Deleted variable. 8925 (lang_decode_option): Set warn_return_type, not explicit_*, for 8926 -Wreturn-type and -Wall. This is what rest_of_compilation uses to 8927 decide if it should go into jump_optimize or not. 8928 * cp-tree.h (explicit_warn_return_type): Deleted. 8929 * cp-decl.c (grokdeclarator): Use warn_return_type, not explicit_*. 8930 (finish_function): Also complain about no return in a non-void fn if 8931 we're being pedantic (don't rely on use of -Wreturn-type). 8932 8933Fri Dec 17 15:45:46 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8934 8935 * cp-decl.c (grokdeclarator): Forbid declaration of a function as 8936 static if it's being done inside another function. 8937 8938 * cp-search.c (compute_visibility): Check for friendship both ways. 8939 8940Fri Dec 17 14:28:25 1993 Jason Merrill (jason@deneb.cygnus.com) 8941 8942 * cp-cvt.c (build_default_binary_type_conversion): Make error 8943 messages more helpful. 8944 8945 * cp-error.c (op_as_string): New function, returns "operator ==" 8946 given EQ_EXPR or suchlike. 8947 8948Fri Dec 17 13:28:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8949 8950 * cp-call.c (print_n_candidates): New function. 8951 (build_overload_call_real): Use it when we complain about a call 8952 being ambiguous. 8953 8954Fri Dec 17 12:41:17 1993 Jason Merrill (jason@deneb.cygnus.com) 8955 8956 * cp-call.c (build_method_call): Fix checking for static call 8957 context. 8958 8959 * cp-method.c (build_opfncall): Call build_indirect_ref on argument 8960 to operator new. 8961 8962 * cp-init.c (build_new): Don't mess with rval when building 8963 indirect ref. 8964 8965Thu Dec 16 16:48:05 1993 Kung Hsu (kung@cirdan.cygnus.com) 8966 8967 * cp-lex.c (default_assign_ref_body): add check when TYPE_NESTED_ 8968 NAME(type) may not be exist. It's not a problem for old compiler. 8969 8970Thu Dec 16 14:46:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8971 8972 * cp-tree.h (CLASSTYPE_ALTERS_VISIBILITIES_P): Delete macro, it's 8973 never used for anything. 8974 (struct lang_type, member type_flags): Delete field 8975 `alters_visibility', and up `dummy' by 1. 8976 * cp-class.c (finish_base_struct): Delete code that copies the 8977 setting of CLASSTYPE_ALTERS_VISIBILITIES_P. 8978 (finish_struct): Delete code that sets it. 8979 8980Thu Dec 16 14:44:39 1993 Jason Merrill (jason@deneb.cygnus.com) 8981 8982 * cp-decl.c, cp-init.c, cp-typeck.c: Fix arguments to 8983 build_method_call that I messed up before. 8984 8985 * cp-search.c (get_base_distance): If protect > 1, allow immediate 8986 private base. 8987 8988 * cp-class.c (finish_base_struct): Set cant_synth_* correctly. 8989 (finish_struct): Ditto. Well, nigh-correctly; it won't deal 8990 properly with the case where a class contains an object of an 8991 ambiguous base class which has a protected op=. Should be fixed 8992 when the access control code gets overhauled. 8993 (finish_struct_methods): Set TYPE_HAS_NONPUBLIC_* correctly. 8994 8995Thu Dec 16 12:17:06 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 8996 8997 * cp-lex.c (real_yylex): Turn the code back on that deals with 8998 __FUNCTION__ and __PRETTY_FUNCTION__. Don't use lookup_name, to 8999 avoid the ambiguity problems that led to it being turned off in the 9000 first place. 9001 9002 * cp-method.c (hack_identifier): Also check for a TYPE_PTRMEMFUNC_P 9003 to see if something is a method. 9004 9005Wed Dec 15 18:35:58 1993 Mike Stump <mrs@cygnus.com> 9006 9007 * cp-typeck.c (build_modify_expr): Avoid error messages on small 9008 enum bit fields. 9009 * cp-typeck.c (convert_for_assignment): Add missing argument to 9010 cp_warning and cp_pedwarn calls. 9011 9012Wed Dec 15 18:25:32 1993 Jason Merrill (jason@deneb.cygnus.com) 9013 9014 * cp-parse.y (member_init): ANSI C++ doesn't forbid old-style base 9015 initializers; it's just anachronistic. 9016 9017 * cp-decl.c (finish_decl): Don't require external-linkage arrays 9018 to have a complete type at declaration time when pedantic. 9019 9020Tue Dec 14 11:37:23 1993 Jason Merrill (jason@deneb.cygnus.com) 9021 9022 * cp-decl.c (pushdecl): Don't set DECL_CONTEXT if it's already set. 9023 9024 * cp-call.c (build_method_call): Don't dereference pointer given 9025 as instance. 9026 9027 * cp-decl.c (finish_function): Don't pass pointer to 9028 build_method_call. 9029 (finish_function): Ditto. 9030 9031 * cp-typeck.c (build_x_function_call): Ditto. 9032 9033 * cp-method.c (build_component_type_expr): Ditto. 9034 9035 * cp-init.c (build_member_call): Ditto. 9036 (build_new): Ditto. 9037 9038Mon Dec 13 18:04:33 1993 Kung Hsu (kung@cirdan.cygnus.com) 9039 9040 * cp-decl.c (xref_tag): fix regression created by changes made 9041 in Dec. 7 1993. 9042 * cp-decl.c (xref_defn_tag): fix parallel nested class problem. 9043 9044Fri Dec 10 12:40:25 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9045 9046 * cp-call.c (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print 9047 out the final evaluation of the function, so we can see if ELLIPSIS, 9048 USER, and EVIL were set at the end. 9049 9050 * cp-call.c (convert_harshness_ansi): When the parm isn't an lvalue, 9051 only go for setting TRIVIAL_CODE if we are dealing with types that 9052 are compatible. 9053 9054Thu Dec 9 18:27:22 1993 Mike Stump <mrs@cygnus.com> 9055 9056 * cp-decl.c (flag_huge_objects): New flag to allow large objects. 9057 * toplev.c (lang_options): Ditto. 9058 * cp-decl2.c (flag_huge_objects, lang_f_options): Ditto. 9059 * cp-decl.c (delta_type_node): New type for delta entries. 9060 * cp-tree.h (delta_type_node): Ditto. 9061 * cp-decl.c (init_decl_processing): Setup delta_type_node. 9062 * cp-decl.c (init_decl_processing, build_ptrmemfunc_type): Use 9063 delta_type_node instead of short_integer_type_node. 9064 * cp-class.c (build_vtable_entry): Ditto. 9065 9066Thu Dec 9 16:19:05 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9067 9068 * cp-tree.h (OPERATOR_TYPENAME_P): Define outside of 9069 NO_{DOLLAR,DOT} macro checks, so it always gets defined. 9070 (VTABLE_NAME_P): Define for NO_DOT && NO_DOLLAR_IN_LABEL. 9071 9072Wed Dec 8 17:38:06 1993 Mike Stump <mrs@cygnus.com> 9073 9074 * cp-decl.c (finish_decl): Make sure things that can go into 9075 "common", do go into common, if -fcommon is given. 9076 9077Wed Dec 8 13:01:54 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9078 9079 * cp-call.c (print_harshness) [DEBUG_MATCHING]: New function. 9080 (compute_conversion_costs_ansi) [DEBUG_MATCHING]: Print out 9081 argument matching diagnostics to make instantly clear what the 9082 compiler is doing. 9083 9084 * cp-call.c (convert_harshness_ansi): If the parm isn't an lvalue, 9085 then check to see if the penalty was increased due to 9086 signed/unsigned mismatch, and use a TRIVIAL_CODE if it wasn't. 9087 9088Tue Dec 7 18:29:14 1993 Kung Hsu (kung@cirdan.cygnus.com) 9089 9090 * cp-decl.c (xref_tag, pushtag): Fix nested class search/resolution 9091 problem. 9092 9093Tue Dec 7 16:09:34 1993 Jason Merrill (jason@deneb.cygnus.com) 9094 9095 * cp-class.c (finish_struct): Before synthesizing methods, if no 9096 methods have yet been declared then set nonprivate_method. Don't 9097 set non_private method after synthesizing a method. 9098 9099 * cp-lex.c (extract_interface_info): If flag_alt_external_templates 9100 is set, tie emitted code to the location of template instantiation, 9101 rather than definition. 9102 9103 * cp-tree.h: Declare flag_alt_external_templates. 9104 9105 * cp-decl2.c (lang_decode_option): Support -falt-external-templates. 9106 9107 * toplev.c (lang_options): Ditto. 9108 9109 Mon Oct 4 12:50:02 1993 Chip Salzenberg (chip@fin.uucp) 9110 9111 [changes propagated from 930810 snapshot] 9112 * cp-decl.c (init_decl_processing): Make long long available for use 9113 as SIZE_TYPE and PTRDIFF_TYPE. 9114 (finish_decl): Allow file-scope static incomplete array. 9115 (grokdeclarator): Don't pass on const and volatile fron function 9116 value type to function type. 9117 Warn here for volatile fn returning non-void type. 9118 * cp-parse.y (attrib): Accept attributes `volatile' with alias 9119 `noreturn', and `const'. 9120 * cp-typeck.c (default_conversion): Don't lose const and volatile. 9121 (build_binary_op_nodefault): Generate pedantic warning for comparison 9122 of complete pointer type with incomplete pointer type. 9123 (build_c_cast): Be careful that null pointer constant be INTEGER_CST. 9124 9125Tue Dec 7 10:46:48 1993 Jason Merrill (jason@deneb.cygnus.com) 9126 9127 * cp-init.c (expand_vec_init): When creating a temporary for copying 9128 arrays, use the type of the source, not the target. 9129 9130 * cp-cvt.c (convert): Pass an argument for errtype to 9131 convert_to_reference. 9132 9133 * cp-error.c (dump_expr, COMPONENT_REF & CALL_EXPR): Deal with 9134 methods, -> and `this'. 9135 9136Mon Dec 6 17:12:33 1993 Jason Merrill (jason@deneb.cygnus.com) 9137 9138 * cp-error.c (parm_as_string): New function; returns `this' or arg 9139 number. Corresponds to %P. 9140 (dump_expr): Deal with method calls. 9141 9142 * cp-cvt.c (convert_to_reference): Stop using warn_for_assignment. 9143 * cp-typeck.c (convert_for_assignment): Ditto. 9144 (warn_for_assignment): Lose. 9145 9146Mon Dec 6 11:33:35 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9147 9148 * cp-call.c (ideal_candidate_ansi): Delete code that was never 9149 doing anything useful. Instead, sort once, and DO NOT wipe 9150 out any codes with EVIL_CODE, since that's what we use as a 9151 marker for the end of the list of candidates. 9152 9153 * cp-cvt.c (convert_to_aggr): Make sure to always set H_LEN. 9154 9155Mon Dec 6 12:49:17 1993 Jason Merrill (jason@deneb.cygnus.com) 9156 9157 * cp-init.c (get_aggr_from_typedef): New function, like 9158 is_aggr_typedef but returns the _TYPE. 9159 9160 * cp-call.c, cp-init.c, cp-method.c: Eradicate err_name. 9161 9162Sun Dec 5 18:12:48 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9163 9164 * cp-lex.c (readescape): Pedwarn when a hex escape is out of range. 9165 9166Thu Nov 25 23:50:19 1993 Chip Salzenberg (chip@fin.uucp) 9167 9168 Delay language context change until beginning of next decl. 9169 9170 * cp-lex.h (c_header_level): Removed. 9171 (pending_lang_change): Declared. 9172 * cp-lex.c (c_header_level): Renamed from in_c_header, made static. 9173 (pending_lang_change): Defined. 9174 (check_newline): Rework code that recognizes line number and 9175 filename changes. Instead of pushing and popping lang context, 9176 increment and decrement pending_lang_change. 9177 (do_pending_lang_change): Push and pop lang context according 9178 to value of pending_lang_change. 9179 * cp-parse.y (extdefs): Use lang_extdef instead of extdef. 9180 (extdef): Same as extdef, but call do_pending_lang_change() first. 9181 9182Mon Nov 15 15:39:15 1993 Chip Salzenberg (chip@fin.uucp) 9183 9184 * cp-typeck.c (build_binary_op_nodefault): Warn for ordered 9185 compare of ptr with 0 only if pedantic in both cases. 9186 9187Thu Nov 25 13:31:37 1993 Chip Salzenberg (chip@fin.uucp) 9188 9189 Reinstate the below patch, which got lost in the Cygnus merge: 9190 Tue Nov 23 13:59:24 1993 Hallvard B Furuseth (hbf@durin.uio.no) 9191 * cp-parse.y (maybe_type_qual): Don't fail to set $$. 9192 9193Wed Nov 17 19:03:30 1993 Chip Salzenberg (chip@fin.uucp) 9194 9195 * cp-parse.y (attrib): Allow "ident(ident)" like the C front end. 9196 9197Fri Oct 22 20:43:37 1993 Paul Eggert (eggert@twinsun.com) 9198 9199 * cp-lex.c (real_yylex): Diagnose floating point constants 9200 that are too large. 9201 9202Wed Nov 17 19:10:37 1993 Chip Salzenberg (chip@fin.uucp) 9203 9204 * cp-type2.c (build_functional_cast): ARM page 16: When a class 9205 and an object, function or enumerator are declared in the same 9206 scope with the same name, the class name is hidden. 9207 9208Wed Nov 17 19:07:18 1993 Chip Salzenberg (chip@fin.uucp) 9209 9210 * cp-call.c (convert_harshness_ansi): Distinguish float, double, 9211 and long double from each other when overloading. 9212 (compute_conversion_costs_{ansi,old}, build_method_call, 9213 build_overlay_call_real, convert_to_aggr): Always set and 9214 always use H_LEN member of candidate structure. 9215 9216Mon Oct 11 23:10:53 1993 Chip Salzenberg (chip@fin.uucp) 9217 9218 * cp-decl.c (duplicate_decls): Note redeclarations of library 9219 functions, and generate distinct warnings for them. 9220 9221Mon Oct 4 12:26:49 1993 Chip Salzenberg (chip@fin.uucp) 9222 9223 Support format warnings in G++. 9224 9225 * cp-tree.h: Protect against multiple inclusion. 9226 Declare all public functions in c-common.c (copy from c-tree.h). 9227 (STDIO_PROTO): Define. 9228 (warn_format): Declare. 9229 (record_format_info): Remove declaration. 9230 * cp-decl.c (init_decl_processing): Call init_function_format_info. 9231 * cp-decl2.c (lang_decode_option): Make "-Wall" include warn_format. 9232 * cp-typeck.c (build_function_call_real): Call check_function_format. 9233 (record_format_info): Remove -- obsolete stub. 9234 9235Sat Jul 24 12:04:29 1993 Chip Salzenberg (chip@fin.uucp) 9236 9237 * cp-decl.c (duplicate_decls): Don't warn for non-extern var decl 9238 following an extern one (for -Wredundant-decls). 9239 * cp-parse.y (primary): In statement expression case, if compstmt 9240 returns something other than a BLOCK, return it unchanged. 9241 9242Thu Dec 2 20:44:58 1993 Chip Salzenberg (chip@fin.uucp) 9243 9244 * cp-decl.c (warn_extern_redeclared_static): New function made 9245 from code extracted from pushdecl. 9246 (duplicate_decls, pushdecl): Call new function. 9247 (lookup_name_current_level): Allow for IDENTIFIER_GLOBAL_VALUE 9248 to be a TREE_LIST when function is declared in 'extern "C" {}'. 9249 9250Fri Dec 3 16:01:10 1993 Jason Merrill (jason@deneb.cygnus.com) 9251 9252 * cp-class.c (duplicate_tag_error): Use cp_error. 9253 (finish_base_struct): Check for ambiguity with direct base, and don't 9254 generate op= or copy ctor if it exists. 9255 9256Fri Dec 3 15:32:34 1993 Kung Hsu (kung@cirdan.cygnus.com) 9257 9258 * cp-init.c (expand_member_init): when initializer name is null, 9259 don't try to build it now because emit_base_init will handle it. 9260 9261Fri Dec 3 12:28:59 1993 Jason Merrill (jason@deneb.cygnus.com) 9262 9263 * cp-lex.c (init_lex): Initialize input_filename to "<internal>" for 9264 code such as ExceptionHandler::operator=. 9265 9266Fri Dec 3 10:32:08 1993 Jason Merrill (jason@deneb.cygnus.com) 9267 9268 * cp-decl.c (grokdeclarator): Don't try to print out dname when 9269 complaining about arrays of references if decl_context==TYPENAME, 9270 since it will be null. 9271 9272 * cp-decl2.c: Default to flag_ansi_overloading. 9273 9274Thu Dec 2 18:05:56 1993 Kung Hsu (kung@cirdan.cygnus.com) 9275 9276 * cp-call.c (build_method_call): use binfo from instance if it's 9277 different from binfo (basetype_path) passed from above. 9278 9279Thu Dec 2 12:48:36 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9280 9281Wed Nov 17 19:14:29 1993 Chip Salzenberg (chip@fin.uucp) 9282 9283 cp-error.c (dump_expr): Use unsigned chars to output a 9284 TREE_REAL_CST in hex. 9285 9286Thu Dec 2 11:05:48 1993 Jason Merrill (jason@deneb.cygnus.com) 9287 9288 * cp-class.c (finish_struct): Fix typo in setting 9289 cant_synth_asn_ref. 9290 9291 * cp-tree.h (TYPE_NESTED_NAME): New macro, does 9292 DECL_NESTED_TYPENAME (TYPE_NAME (NODE)). 9293 9294 * cp-lex.c (default_copy_constructor_body): Change 9295 DECL_NAME (TYPE_NAME (btype)) to TYPE_NESTED_NAME (btype). 9296 (default_assign_ref_body): Ditto. 9297 (default_copy_constructor_body): Call operator= explicitly for 9298 base classes that have no constructor. 9299 9300Thu Dec 2 10:47:15 1993 Michael Tiemann (tiemann@blues.cygnus.com) 9301 9302 * cp-call.c (build_method_call): If the instance variable is 9303 converted to error_mark_node when we're trying to convert it to the 9304 base type of a method we're looking up, return error_mark_node. 9305 9306Thu Dec 2 10:41:16 1993 Torbjorn Granlund (tege@cygnus.com) 9307 9308 * cp-typeck.c (build_binary_op_nodefault): In *_DIV_EXPR *_MOD_EXPR 9309 cases, tests for unsigned operands by peeking inside a NOP_EXPR. 9310 9311Wed Dec 1 13:33:34 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9312 9313 * cp-call.c (compute_conversion_costs_ansi): Use the size of struct 9314 harshness_code, not the size of short, for clearing out the 9315 ansi_harshness. 9316 9317 * cp-call.c (print_candidates): New function. 9318 (build_method_call): When we had some candidates, but didn't get a 9319 usable match, don't report that we got an error with the first 9320 candidate. Instead, say there were no matches, and list the 9321 candidates with print_candidates. In the second pass, make sure we 9322 clear out ever_seen, so we can accurately count the number of 9323 functions that qualified. 9324 9325Wed Dec 1 09:53:59 1993 Torbjorn Granlund (tege@cygnus.com) 9326 9327 * cp-typeck.c (build_binary_op_nodefault): Shorten for *_MOD_EXPR 9328 only if op1 is known to be != -1. 9329 (build_binary_op_nodefault): Handle *_DIV_EXPR likewise. 9330 9331Tue Nov 30 14:07:26 1993 Brendan Kehoe (brendan@lisa.cygnus.com) 9332 9333 * cp-method.c (hack_identifier): If the field itself is private, and 9334 not from a private base class, say so. 9335 9336Mon Nov 29 03:00:56 1993 Jason Merrill (jason@deneb.cygnus.com) 9337 9338 * cp-decl.c (grokdeclarator): Always warn on initialization of 9339 const member. 9340 9341Wed Nov 24 00:49:35 1993 Jason Merrill (jason@deneb.cygnus.com) 9342 9343 * cp-class.c (finish_struct): Set TYPE_GETS_CONST_* properly. 9344 (finish_base_struct): Set cant_synth_asn_ref properly. 9345 9346 * cp-lex.c (cons_up_default_function): Add section for operator=. 9347 (default_assign_ref_body): New function, mostly cribbed from 9348 default_copy_constructor_body. 9349 9350 * cp-class.c (base_info): Add members cant_synth_copy_ctor, 9351 cant_synth_asn_ref, no_const_asn_ref. 9352 (finish_base_struct): Update no_const_asn_ref, note that you should 9353 update cant_synth_*, propagate TYPE_GETS_ASSIGN_REF. 9354 (finish_struct): Add decls for cant_synth_*, no_const_asn_ref, and 9355 initialize them properly. Set no_const_asn_ref properly. Set 9356 cant_synth_* in some of the situations where they should be set. 9357 Propagate TYPE_GETS_ASSIGN_REF. Use cant_synth_copy_ctor. Add call 9358 to cons_up_default_function for operator=. 9359 9360Tue Nov 23 20:24:58 1993 Mike Stump <mrs@cygnus.com> 9361 9362 * cp-cvt.c (convert_force): Add code to perform casting of pointer 9363 to member function types. 9364 * cp-typeck.c (build_ptrmemfunc): Add FORCE parameter to indicate 9365 when the conversion should be done, regardless. 9366 * cp-tree.h (build_ptrmemfunc): Ditto. 9367 * cp-type2.c (digest_init): Ditto. 9368 * cp-typeck.c (convert_for_assignment): Ditto. 9369 9370Tue Nov 23 18:06:58 1993 Jason Merrill (jason@deneb.cygnus.com) 9371 9372 * cp-error.c (dump_expr): Do the right thing for variables of 9373 reference type. 9374 9375 * cp-decl.c (grok_op_properties): Set TYPE_HAS_ASSIGN_REF 9376 and its kin properly. 9377 (xref_tag): Propagate TYPE_GETS_ASSIGN_REF. 9378 9379Tue Nov 23 12:26:13 1993 Mike Stump <mrs@cygnus.com> 9380 9381 * cp-method.c (build_opfncall): Don't count pointer to member 9382 functions as aggregates here, as we don't want to look up methods in 9383 them. The compiler would core dump if we did, as they don't have 9384 normal names. 9385 * cp-typeck.c (build_indirect_ref): Improve wording on error 9386 message. 9387 9388Mon Nov 22 14:22:23 1993 Jason Merrill (jason@deneb.cygnus.com) 9389 9390 * cp-decl.c (grok_op_properties): Allow operator?: with pedwarn 9391 (since it's supported in other compiler bits). 9392 9393 * cp-method.c (report_type_mismatch): Use cp_error; ignore err_name 9394 argument. 9395 9396 * cp-error.c (dump_function_decl): Don't print return type for 9397 constructors and destructors. 9398 9399 * cp-cvt.c (cp_convert_to_pointer): Import code from 9400 convert_to_pointer so we can return error_mark_node in the case of an 9401 error, and to allow more meaningful error messages. 9402 (build_type_conversion): Don't go through void* when trying 9403 to convert to a pointer type. 9404 9405 * cp-decl.c (grokfndecl): Move call to grok_op_properties back 9406 after grokclassfn so that it's dealing with the right decl. 9407 (grok_op_properties): Don't assert !methodp for op new and op delete. 9408 9409 * cp-init.c (build_delete): Don't use TYPE_BUILT_IN (there are now 9410 no uses of it in the compiler). 9411 9412 * cp-call.c (build_scoped_method_call): Fix for destructors of simple 9413 types. 9414 (build_method_call): Ditto. 9415 9416Fri Nov 19 12:59:38 1993 Jason Merrill (jason@deneb.cygnus.com) 9417 9418 * cp-tree.c (count_functions): Abstraction function. 9419 9420 * cp-call.c (build_overload_call_real): Deal with new overloading 9421 properly, remove dead code. 9422 9423 * gcc.c (default_compilers): Generate and use .ii files in the 9424 intermediate stage of compiling C++ source. 9425 9426Fri Nov 19 11:26:09 1993 Jim Wilson (wilson@sphagnum.cygnus.com) 9427 9428 * cp-expr.c (cplus_expand_expr): Make call_target a valid memory 9429 address before using it, so it can be later safely compared. 9430 9431Fri Nov 12 15:30:27 1993 Jason Merrill (jason@deneb.cygnus.com) 9432 9433 * cp-pt.c (tsubst): Deal with new overloading. 9434 9435 * cp-typeck.c (fntype_p): is the arg function type? 9436 (comp_target_parms): pedwarn on conversion from (anything) to (...). 9437 (build_x_function_call): Deal with new overloading. 9438 9439 * cp-tree.c (decl_list_length): Deal with new overloading. 9440 (decl_value_member): Like value_member, but for DECL_CHAINs. 9441 9442 * cp-decl.c (duplicate_decls): Deal with new overloading. 9443 (start_decl): Ditto. 9444 9445 * cp-class.c (instantiate_type): Deal with new overloading. 9446 9447 * cp-call.c (convert_harshness_ansi): Deal with new overloading. 9448 (convert_harshness_old): Deal with new overloading. 9449 (build_overload_call_real): Ditto. 9450 9451Mon Nov 8 13:50:49 1993 Jason Merrill (jason@deneb.cygnus.com) 9452 9453 * cp-tree.c (get_unique_fn): New function; returns FUNCTION_DECL 9454 if unambiguous, NULL_TREE otherwise. 9455 (get_first_fn): Returns the first appropriate FUNCTION_DECL. 9456 (is_overloaded_fn): Returns whether or not the passed tree is 9457 a function or list of functions. 9458 9459 * cp-init.c (init_init_processing): use `get_first_fn' to find 9460 the FUNCTION_DEFN for new and delete. 9461 9462 * cp-decl.c (push_overloaded_decl): Use new overloading strategy, cut 9463 code size in half (I spit on special cases). 9464 9465Tue Sep 7 20:03:33 1993 Jason Merrill (jason@deneb.cygnus.com) 9466 9467 * cp-decl.c: Allow references and template type parameters as well 9468 9469Local Variables: 9470eval: (auto-fill-mode) 9471left-margin: 8 9472fill-column: 76 9473End: 9474