]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
t-crtstuff: New target makefile fragment.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
21b3d0ba
MM
12002-11-27 Mark Mitchell <mark@codesourcery.com>
2
3 * class.c (build_base_field): Make sure we get the canonical base
4 when descending through primary bases.
5
a16f2357
GK
62002-11-26 Geoffrey Keating <geoffk@apple.com>
7
8 * decl.c (check_initializer): Don't error on initialisation of
9 a scalar with a brace-enclosed expression.
10
688f6688
NS
112002-11-26 Nathan Sidwell <nathan@codesourcery.com>
12
13 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
14 (template_parms_equal): Remove prototype.
15 * typeck.c (buuld_indirect_ref): Reformat.
16
b82ddab4
MM
172002-11-25 Mark Mitchell <mark@codesourcery.com>
18
2003cd37
MM
19 * tree.c (cp_build_qualified_type_real): Correct handling of
20 array types.
21 * class.c (walk_subobject_offsets): Fix thinko.
22 (build_base_field): Record offsets of empty bases in primary
23 virtual bases.
24 (layout_class_type): Record offsets of empty bases in fields.
25
b82ddab4
MM
26 * search.c (is_subobject_of_p_1): Fix thinko.
27 (lookup_field_queue_p): Likewise.
28
8a874cb4
MM
292002-11-24 Mark Mitchell <mark@codesourcery.com>
30
31 * class.c (layout_class_type): Reuse tail padding when laying out
32 virtual bases.
33
05abed76
MM
342002-11-22 Mark Mitchell <mark@codesourcery.com>
35
36 * rtti.c (qualifier_flags): Fix thinko.
37
1c83ea9f
GN
382002-11-21 Glen Nakamura <glen@imodulo.com>
39
40 PR c++/8342
41 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
42 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
43 of the branches of a COND_EXPR.
44
ad2ae3b2
MM
452002-11-19 Mark Mitchell <mark@codesourcery.com>
46
47 * pt.c (for_each_template_parm): Free allocated memory.
48 * search.c (is_subobject_of_p_1): New function.
49 (is_subobject_of_p): Avoid walking virtual bases multiple times.
50
f3226a90
JT
512002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
52
53 * g++spec.c (lang_specific_spec_functions): New.
54
90024bdc
KH
552002-11-15 Kazu Hirata <kazu@cs.umass.edu>
56
57 * ChangeLog: Follow spelling conventions.
58 * class.c: Likewise.
59 * decl2.c: Likewise.
60
fa7b533b
ZW
612002-11-14 Zack Weinberg <zack@codesourcery.com>
62
63 * search.c (dfs_push_decls): Do not try to reorder elements
64 3..n of method_vec if method_vec has only two elements.
65 Reverse order of two tests to avoid accessing unallocated
66 memory.
67
95675950
MM
682002-11-14 Mark Mitchell <mark@codesourcery.com>
69
70 * class.c (dfs_find_final_overrider): Adjust so that the most
71 derived object is a binfo, rather than a class type.
72 (find_final_overrider): Likewise.
73 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
74 (add_vcall_offset): Likewise.
75
5c74d5b0
KL
762002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
77
78 PR c++/8389
79 * pt.c (instantiate_template): Push class scope for member
80 functions.
81 (get_mostly_instantiated_function_type): Likewise. Don't call
82 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
83 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
84 * mangle.c (write_encoding, write_unqualified_name): Adjust.
85
4f2c9d7e
MM
862002-11-07 Mark Mitchell <mark@codesourcery.com>
87
e6a66567
MM
88 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
89 vcall offfsets. Split out ...
90 (add_vcall_offset): ... new function.
91
4f2c9d7e
MM
92 PR c++/8338
93 * pt.c (for_each_template_parm): Add htab parameter.
94 (process_partial_specialization): Adjust call.
95 (push_template_decl_real): Likewise.
96 (pair_fn_data): Add visited.
97 (for_each_template_parm_r): Avoid walking duplicates more than
98 once.
99 (uses_template_parms): Adjust call to for_each_template_parm.
100
f72ab53b
MM
1012002-11-07 Mark Mitchell <mark@codesourcery.com>
102
103 * class.c (add_implicitly_declared_members): Put implicitly
104 declared functions at the end of TYPE_METHODs when -fabi-version
105 is at least 2.
106
0a288b9a
GK
1072002-11-05 Geoffrey Keating <geoffk@apple.com>
108
109 * decl2.c (finish_file): Correct spelling.
110
548502d3
MM
1112002-11-03 Mark Mitchell <mark@codesourcery.com>
112
113 * call.c (build_special_member_call): Do not try to lookup VTTs by
114 name.
115 * class.c (vtbl_init_data): Add generate_vcall_entries.
116 (get_vtable_decl): Do not look up virtual tables by name.
117 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
118 (set_primary_base): Do not set CLASSTYPE_RTTI.
119 (determine_primary_base): Likewise.
120 (get_matching_virtual): Remove.
121 (get_vcall_index): New function.
122 (update_vtable_entry_for_fn): Do not try to use virtual thunks
123 when they are not required. Assign vcall indices at this point.
124 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
125 Do update dynamic_classes.
126 (build_vtt): Do not add VTTs to the symbol table.
127 (build_ctor_vtbl_group): Likewise.
128 (build_vtbl_initializer): Simplify handling of vcall indices.
129 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
130 for the most derived class.
131 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
132 the vtable.
133 * cp-tree.h (dynamic_classes): New macro.
134 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
135 (CLASSTYPE_RTTI): Remove.
136 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
137 (CLASSTYPE_VCALL_INDICES): New macro.
138 (CLASSTYPE_VTABLES): Likewise.
139 (BV_USE_VCALL_INDEX_P): Remove.
140 (build_vtable_path): Remove.
141 * decl2.c (finish_vtable_vardecl): Remove.
142 (key_method): Remove #if 0'd code.
143 (finish_vtable_vardecl): Rename to ...
144 (maybe_emit_vtables): ... this.
145 (finish_file): Use it.
146 * search.c (look_for_overrides_here): Update comment.
147
04d57dd5
ZW
1482002-11-01 Zack Weinberg <zack@codesourcery.com>
149
150 PR c/7353 redux
151 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
152
bab076f7
JM
1532002-10-30 Jason Merrill <jason@redhat.com>
154
155 PR c++/8186
156 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
157 * call.c (convert_for_arg_passing): Set it.
158 * except.c (stabilize_throw_expr): Recurse for such an arg.
159
14b4829d
MM
1602002-10-31 Mark Mitchell <mark@codesourcery.com>
161
162 * cp-tree.h (lang_decl_flags): Remove init_priority.
163 (lang_decl): Add delta.
164 (GLOBAL_INIT_PRIORITY): Remove.
165 (THUNK_DELTA): Revise definition.
166 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
167 * dump.c (cp_dump_tree): Don't dump it.
168
8c081e84
MM
1692002-10-30 Mark Mitchell <mark@codesourcery.com>
170
171 PR c++/8160
172 * typeck2.c (process_init_constructor): Call complete_array_type.
173
174 PR c++/8149
175 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 176
7088fca9
KL
1772002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
178
179 Core issue 287, PR c++/7639
180 * cp-tree.h (lang_type_class): Add decl_list field.
181 (CLASSTYPE_DECL_LIST): New macro.
182 (maybe_add_class_template_decl_list): Add declaration.
183 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
184 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
185 (maybe_add_class_template_decl_list): New function.
186 (add_implicitly_declared_members): Use it.
187 * decl.c (maybe_process_template_type_declaration): Likewise.
188 (pushtag): Likewise.
189 * friend.c (add_friend): Likewise.
190 (make_friend_class): Likewise.
191 * semantics.c (finish_member_declaration): Likewise.
192 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
193 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
194 to process members and friends in the order of declaration.
195
5633b37c
MM
1962002-10-29 Mark Mitchell <mark@codesourcery.com>
197
198 PR c++/8287
199 * decl.c (finish_destructor_body): Create the label to jump to
200 when returning from a destructor here.
201 (finish_function_body): Rather than here.
202
f65e1183
ZW
2032002-10-25 Zack Weinberg <zack@codesourcery.com>
204
205 PR c++/7266
206 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
207 SCOPE_REF is not null before dereferencing it.
208
bb5e8a7f
MM
2092002-10-25 Mark Mitchell <mark@codesourcery.com>
210
e93ee644
MM
211 * call.c (build_over_call): Use DECL_CONTEXT, not
212 DECL_VIRTUAL_CONTEXT.
213 * class.c (modify_vtable_entry): Don't mess with
214 DECL_VIRTUAL_CONTEXT.
215 (set_vindex): Remove.
216 (set_primary_base): Remove vfuns_p parameter.
217 (determine_primary_base): Likewise.
218 (modify_all_vtables): Likewise.
219 (layout_class_type): Likewise. Adjust calls to other functions
220 accordingly.
221 (finish_struct_1): Adjust calls to modified functions. Set
222 DECL_VINDEX here.
223 * cp-tree.h (lang_type_class): Remove vsize.
224 (CLASSTYPE_VSIZE): Remove.
225 (lang_decl): Remove thunks.
226 (DECL_THUNKS): Adjust.
227 (DECL_VIRTUAL_CONTEXT): Remove.
228 (duplicate_decls): Don't copy it.
229 * pt.c (build_template_decl): Don't set it.
230 (tsubst_decl): Likewise.
231 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 232
bb5e8a7f
MM
233 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
234 (build_vtable_entry): Remove.
235 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
236 (lang_decl): Add thunks.
237 (DECL_THUNKS): New macro.
238 * decl.c (duplicate_decls): Copy it.
239 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
240 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 241
6eb35968
DE
2422002-10-24 David Edelsohn <edelsohn@gnu.org>
243
244 PR c++/7228
245 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
246 lang_type structure exists before accessing field.
247 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
248 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
249 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
250 * class.c (check_field_decls): Use new macros.
251 * typeck2.c (process_init_constructor): Remove redundant check for
252 existence of lang_type structure.
253
0cee073d
MM
2542002-10-24 Mark Mitchell <mark@codesourcery.com>
255
ba9a991f
MM
256 * class.c (end_of_base): New method.
257 (end_of_class): Use it. Check indirect virtual bases.
258
0cee073d
MM
259 * class.c (check_field_decls): Fix typo.
260
e6f052b7
MM
2612002-10-23 Mark Mitchell <mark@codesourcery.com>
262
6b607ffd
MM
263 PR c++/8067
264 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
265 related variables.
266
e6f052b7
MM
267 PR c++/7679
268 * spew.c (next_token): Do not return an endless stream of
269 END_OF_SAVED_INPUT tokens.
270 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
271 the cached token stream.
272 (snarf_defarg): Likewise.
273
8bcefb43
ZW
2742002-10-23 Zack Weinberg <zack@codesourcery.com>
275
276 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
277 variably_modified_type_p.
278 * cp-tree.h: Remove prototype of variably_modified_type_p.
279 * tree.c (variably_modified_type_p): Remove; now implemented
280 in language-independent code.
281
ad4f9910
MM
2822002-10-22 Mark Mitchell <mark@codesourcery.com>
283
284 PR c++/6579
285 * spew.c (snarf_parenthesized_expression): New function.
286 (snarf_block): Use it.
287
3961e8fe
RH
2882002-10-22 Richard Henderson <rth@redhat.com>
289
290 * method.c (use_thunk): Always compute vcall_value; assert that
291 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
292 for vcall thunks as well.
293
5ec1192e
MM
2942002-10-21 Mark Mitchell <mark@codesourcery.com>
295
7ba539c6
MM
296 * class.c (empty_base_at_nonzero_offset_p): New function.
297 (layout_nonempty_base_or_field): Do not check for conflicts when
298 laying out a virtual base using the GCC 3.2 ABI.
299 (build_base_field): Correct checking for presence of empty classes
90024bdc 300 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 301
e3ccdd50
MM
302 * class.c (include_empty_classes): Use normalize_rli.
303 (layout_class_type): Likewise.
304
42328048
MM
305 * decl.c (reshape_init): Tweak handling of character arrays.
306
5ec1192e
MM
307 PR c++/8218
308 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
309 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
310 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
311 (check_field_decls): Likewise.
312 (layout_class_type): Likewise.
313 (finish_struct_1): Initialize it.
314 (walk_subobject_offsets): Use it to prune searches.
315
eb0424da
MM
3162002-10-20 Mark Mitchell <mark@codesourcery.com>
317
318 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
319 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
320 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 321
4a7510cb
ZW
3222002-10-18 Zack Weinberg <zack@codesourcery.com>
323
324 * decl.c (start_decl): Point users of the old initialized-
325 typedef extension at __typeof__.
326
483ab821
MM
3272002-10-18 Mark Mitchell <mark@codesourcery.com>
328
329 * Make-lang.in (method.o): Depend on TARGET_H.
330 * method.c (target.h): Include it.
331 (use_thunk): Use target hooks. Use vcall thunks, if available.
332
e4f4feba
MM
3332002-10-18 Mark Mitchell <mark@codesourcery.com>
334
335 * class.c (base_derived_from): Make sure return value is a bool.
336
9368208b
MM
3372002-10-18 Mark Mitchell <mark@codesourcery.com>
338
339 * class.c (find_final_overrider_data_s): Remove overriding_fn and
340 overriding_base.
341 (dfs_base_derived_from): New function.
342 (base_derived_from): Likewise.
343 (dfs_find_final_overrider): Use base_derived_from.
344 (find_final_overrider): Adjust.
345
5275f2bf
JM
3462002-10-18 Jason Merrill <jason@redhat.com>
347
348 PR c++/8080
349 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
350 with condition decls in a template.
351
8a188e24
NS
3522002-10-17 Nathan Sidwell <nathan@codesourcery.com>
353
354 * class.c (add_method): Compare template parms too.
355
b216f69b
MM
3562002-10-17 Mark Mitchell <mark@codesourcery.com>
357
982216be
MM
358 PR c++/7584
359 * class.c (handle_using_decl): Allow the declaration used to be
360 from an ambiguous base.
361
d768a589
MM
362 * pt.c (convert_template_argument): Revert this change:
363 2002-10-16 Mark Mitchell <mark@codesourcery.com>
364 * pt.c (convert_template_argument): Do not fold non-type
365 template rguments when inside a template.
366
b216f69b
MM
367 * init.c (expand_default_init): Handle brace-enclosed initializers
368 correctly.
369
2303a079
MM
3702002-10-16 Mark Mitchell <mark@codesourcery.com>
371
d3133e68
MM
372 * mangle.c (write_expression): Correct handling of enumeration
373 constants.
374 (write_template_arg): Likewise.
375 * pt.c (convert_template_argument): Do not fold non-type template
376 arguments when inside a template.
377
2303a079
MM
378 PR c++/7478
379 * cvt.c (convert_to_reference): Allow references as the incoming
380 type.
381
451c0899
MM
3822002-10-16 Mark Mitchell <mark@codesourcery.com>
383
384 PR c++/7524
385 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
386 build_qualified_type.
387
da6eec72
RH
3882002-10-15 Richard Henderson <rth@redhat.com>
389
390 * error.c (dump_expr): Use real_to_decimal directly, and with
391 the new arguments.
392
3fa3c4bd
MM
3932002-10-15 Mark Mitchell <mark@codesourcery.com>
394
395 * decl.c (reshape_init): Fix typo.
396
397 * cp-tree.h (operator_name_info_t): Add arity.
398 * lex.c (init_operators): Initialize it.
399 * mangle.c (write_conversion_operator_name): New function.
400 (write_unqualified_name): Use it.
401 (write_template_args): Accept template arguments as a TREE_LIST.
402 (write_expression): Adjust handling of qualified names to match
403 specification.
404
1a55127d
JM
4052002-10-15 Jason Merrill <jason@redhat.com>
406
407 * call.c (call_builtin_trap): New fn.
408 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
409 (build_call): Don't set current_function_returns_abnormally outside
410 a function.
411
58731fd1
MM
4122002-10-14 Mark Mitchell <mark@codesourcery.com>
413
414 * class.c (check_field_decls): Remove empty_p parameter. Instead,
415 clear CLASSTYPE_EMPTY_P.
416 (build_base_field): Likewise.
417 (build_base_fields): Likewise.
418 (check_bases_and_members): Likewise.
419 (create_vtbl_ptr): Likewise.
420 (layout_class_type): Likewise. Ensure that empty classes have
421 size zero when used as base classes in the 3.2 ABI.
422 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
423 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
424 parameter.
425 (is_empty_class): Correct definition when using post-3.2 ABI.
426 * cp-tree.h (lang_type_class): Add empty_p.
427 (CLASSTYPE_EMPTY_P): New macro.
428
6742d92b
NS
4292002-10-12 Nathan Sidwell <nathan@codesourcery.com>
430
431 * init.c (build_delete): Do not apply save_expr for arrays.
432 (build_vec_delete): Likewise.
433
77631fa7
MM
4342002-10-14 Mark Mitchell <mark@codesourcery.com>
435
4a7510cb 436 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
437 whose type is an array with unspecified bounds.
438
77631fa7
MM
439 PR c++/7176
440 * lex.c (do_identifier): Add another option for the parsing
441 parameter.
442 * parse.y (do_id): Use it.
443
2ee366b5
GDR
4442002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
445
446 PRs C++/6803, C++/7721 and C++/7803
447 * decl.c (grokdeclarator): Gracefully handle template-name as
448 decl-specifier.
449
01c3fb15
JM
4502002-10-11 Jason Molenda <jmolenda@apple.com>
451
452 * init.c (build_field_list): Provide uses_unions_p with a default
453 value.
454
8e3df2de
MM
4552002-10-11 Mark Mitchell <mark@codesourcery.com>
456
dac45b5c
MM
457 PR c++/5661
458 * cp-tree.h (variably_modified_type_p): New function.
459 (grokdeclarator) Tighten check for variably modified types as
460 fields.
461 * pt.c (convert_template_argument): Do not allow variably modified
462 types as template arguments.
4a7510cb 463 * tree.c (variably_modified_type_p): New function.
dac45b5c 464
8e3df2de
MM
465 * NEWS: Document removal of "new X = ..." extension.
466 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
467 brace-enclosed initializers.
468 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
469 (initialize_local_var): Remove declaration.
470 (expand_static_init): Likewise.
471 * decl.c (next_initializable_field): New function.
472 (reshape_init): Likewise.
473 (check_initializer): Use them. Build dynamic initializer for
474 aggregates here too.
475 (initialize_local_var): Simplify, and incorporate cleanup
476 insertion code as well.
477 (destroy_local_var): Remove.
478 (cp_finish_decl): Tidy.
479 (expand_static_init): Fold checks for whether or not a variable
480 needs initialization into this function. Simplify.
481 * decl2.c (do_static_initialization): Simplify.
482 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
483 be done for us automatically.
484 (expand_default_init): Handle brace-enclosed initializers
485 correctly.
486 (expand_aggr_init_1): Remove RTL-generation code.
487 (build_vec_init): Remove "new X = ..." support.
488 * parse.y (new_initializer): Likewise.
489 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
490 brace-enclosed initializer.
491 (create_pseudo_type_info): Likewise.
492 * typeck2.c (store_init_value): Don't try to handle digest_init
493 being called more than once.
494 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 495
7bdfd72e
KG
4962002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
497
498 * decl.c (typename_hash): Use htab_hash_pointer.
499
e89fe41c
JW
5002002-10-10 Jim Wilson <wilson@redhat.com>
501
502 * decl.c (duplicate_decls): Don't call decl_attributes.
503
95f79357
ZW
5042002-10-09 Zack Weinberg <zack@codesourcery.com>
505
85cd7be8 506 PR c/7353
95f79357
ZW
507 * decl.c (start_decl): Unconditionally issue error for
508 'typedef foo = bar'.
509 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
510 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
511
10a38dba
KG
5122002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
513
514 * decl2.c (prune_vtable_vardecl): Delete unused function.
515
edebf865
MM
5162002-10-03 Mark Mitchell <mark@codesourcery.com>
517
518 PR c++/7754
519 * decl2.c (finish_anon_union): Do not expand anonymous unions when
520 procesing template functions.
521 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
522 type. Call layout_decl.
523 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
524
01f4137f
RH
5252002-10-07 Richard Henderson <rth@redhat.com>
526
527 * decl2.c, pt.c: Revert c++/7754 fix.
528
eb55ce4b
KL
5292002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
530
531 PR c++/7804
532 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
533
bd9bb3d2
MM
5342002-10-03 Mark Mitchell <mark@codesourcery.com>
535
536 PR c++/7931
537 * pt.c (for_each_template_parm_r): Handle BASELINKs.
538
539 PR c++/7754
540 * decl2.c (finish_anon_union): Do not expand anonymous unions when
541 procesing template functions.
542 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
543 type. Call layout_decl.
544 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
545
6397d80b
MM
5462002-10-03 Mark Mitchell <mark@codesourcery.com>
547
548 PR c++/8006
549 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
550 template parameters.
551 (globals): Add entity and need_abi_warning.
552 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
553 CLASSTYPE_TEMPLATE_INFO.
554 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
555 TYPE_TI_TEMPLATE.
556 (write_prefix): Handle typename types correctly.
557 (write_template_prefix): Handle template template parameters
558 correctly.
559 (start_mangling): Add entity parameter.
560 (finish_mangling): Warn about names whose mangling will change.
561 (mangle_decl_string): Adjust.
562 (mangle_type_string): Likewise.
563 (mangle_special_for_type): Likewise.
564 (mangle_ctor_vtbl_for_type): Likewise.
565 (mangle_thunk): Likewise.
566 (mangle_guard_variable): Likewise.
567 (mangle_ref_init_variable): Likewise.
568
2282d28d
MM
5692002-10-02 Mark Mitchell <mark@codesourcery.com>
570
571 PR c++/7188.
572 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
573 * cp-tree.h (emit_base_init): Rename to ....
574 (emit_mem_initializers): ... this.
575 (expand_member_init): Change prototype.
576 * init.c (perform_member_init): Compute explicit, rather than
577 requiring it as a parameter.
578 (sort_member_init): Rename to ...
579 (sort_mem_initializers): ... this. Process bases and data members
580 together.
581 (sort_base_init): Remove.
582 (emit_base_init): Rename to ...
583 (emit_mem_initializers): ... this.
584 (expand_aggr_vbase_init_1): Remove.
585 (construct_virtual_bases): Rename to ...
586 (construct_virtual_base): ... this.
587 (expand_member_init): Rework handling of base initializers.
588 * method.c (do_build_copy_constructor): Use
589 finish_mem_initializers.
590 * parse.y (member_init): Adjust calls to expand_member_init.
591 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
592 (tsubst_initializer_list): Use expand_member_init.
593 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
594
5952002-10-02 Matt Austern <austern@apple.com>
596 * decl.c (walk_vtables_r): Fixed typo that caused result to
597 never get a nonzero value.
95f79357 598
f963b5d9
RS
5992002-10-02 Roger Sayle <roger@eyesopen.com>
600
601 PR optimization/6627
602 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
603 from here, and move it to tree.h.
604 * decl.c (cxx_init_decl_processing): If storing the vbit
605 in function pointers, ensure that force_align_functions_log
606 is atleast one.
607
69788039
MA
6082002-10-02 Matt Austern <austern@apple.com>
609
610 * class.c (check_field_decls): Changed warning about const member
611 variables so that it doesn't get issued for a class aggregate.
95f79357 612
d881ff25
MM
6132002-10-01 Mark Mitchell <mark@codesourcery.com>
614
615 * decl.c (cp_finish_decl): Make sure array types are laid out,
616 even if the array bounds are unknown.
617
2e88ae22
SE
6182002-10-01 Steve Ellcey <sje@cup.hp.com>
619
d881ff25 620 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
621 to build1.
622
b4c20e52
MM
6232002-10-01 Mark Mitchell <mark@codesourcery.com>
624
d881ff25
MM
625 * decl.c (cp_finish_decl): Make sure array types are laid out,
626 even if the array bounds are unknown.
627
b4c20e52
MM
628 * decl.c (cp_finish_decl): Correct check for dynamic
629 initialization of thread-local storage.
630
5a9a1961
NS
6312002-09-30 Nathan Sidwell <nathan@codesourcery.com>
632
633 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
634 overloaded.
635
7befdb9f
SE
6362002-09-30 Steve Ellcey <sje@cup.hp.com>
637
638 * class.c (build_vtbl_initializer): Add cast.
639 (add_vcall_offset_vtbl_entries_1):
640 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
641
17bbb839
MM
6422002-09-30 Mark Mitchell <mark@codesourcery.com>
643
644 * class.c (walk_subobject_offsets): Correct the calculation of
645 offsets for virtual bases. Correct the counting of array
646 elements.
647 (layout_nonempty_base_or_field): Simplify. Correct the
648 calculation of offsets to be propagated through the binfo
649 hierarchy.
650 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
651 Add the FIELD_DECL to TYPE_FIELDS.
652 (build_base_fields): Adjust accordingly.
653 (layout_virtual_bases): Use build_base_field.
654 (end_of_class): Return a tree, not an integer.
655 (warn_about_ambiguous_direct_bases): Rename to ...
656 (warn_about_ambiguous_bases): ... this.
657 (include_empty_classes): New function.
658 (layout_class_type): Create an alternative version of the type to
659 be used when as a base class type. Do not call
660 finish_record_layout until we are done laying out the class.
661 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
662 as_base.
663 (CLASSTYPE_SIZE): Reimplement.
664 (CLASSTYPE_SIZE_UNIT): Likewise.
665 (CLASSTYPE_ALIGN): Likweise.
666 (CLASSTYPE_USER_ALIGN): Likewise.
667 (CLASSTYPE_AS_BASE): New macro.
668 (DECL_INITIALIZED_P): Likewise.
669 (extract_init): Remove prototype.
670 (build_forced_zero_init): Rename to ...
671 (build_zero_init): ... this.
672 (force_store_init_value): Remove.
673 * decl.c (obscure_complex_init): Remove.
674 (duplicate_decls): Copy DECL_INITIALIZED_P.
675 (check_initializer): Do not leave junk in DECL_INITIAL.
676 (cp_finish_decl): Handle zero-initialization of entities with
677 static storage duration.
678 * expr.c (extract_init): Remove.
679 * init.c (build_forced_zero_init): Remove.
680 (build_zero_init): New function.
681 (build_default_init): Use it.
682 (build_field_list): Skip FIELD_DECLs for base subobjects.
683 (push_base_cleanups): Likewise.
684 * method.c (do_build_assign_ref): Likewise.
685 (synthesize_exception_spec): Likewise.
686 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
687 (regenerate_decl_from_template): To not set DECL_INITIAL for a
688 static data member whose initialization took place in its class.
689 (instantiate_decl): Do not pass an initializer to cp_finish_decl
690 in that situation.
691 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
692 (dfs_unuse_fields): Likewise.
693 * tree.c (pod_type_p): Handle error_mark_node.
694 (zero_init_p): Likewise.
95f79357 695 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
696 subobjects.
697 * typeck2.c (store_init_value): Remove #if 0'd code.
698 (force_store_init_value): Remove.
699 (process_init_constructor): Use build_zero_init.
95f79357 700
03357c23
NS
7012002-09-29 Nathan Sidwell <nathan@codesourcery.com>
702
703 PR c++/7788
704 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
705
27631dae
KH
7062002-09-29 Kazu Hirata <kazu@cs.umass.edu>
707
708 * cp-tree.h: Fix comment typos.
709 * decl.c: Likewise.
710 * pt.c: Likewise.
711
956d9305
MM
7122002-09-25 Mark Mitchell <mark@codesourcery.com>
713
714 * cp/class.c (contains_empty_class_p): New method.
715 (walk_subobject_offsets): Correct computation of field offset.
716 (layout_empty_base): Correct placement of emtpy base classes.
717 (layout_class_type): Warn about ABI changes.
718
2d3e278d
MM
7192002-09-23 Mark Mitchell <mark@codesourcery.com>
720
721 * cp/class.c (layout_virtual_bases): Do not round the size of the
722 type to a multiple of the alignment before laying out virtual bases.
723 (layout_class_type): Correct handling of bit-fields that are wider
724 than their type inside unions. Round the size of the type to a
725 even number of bytes when computing the size without virtual
726 bases.
727 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 728
838dfd8a
KH
7292002-09-21 Kazu Hirata <kazu@cs.umass.edu>
730
731 * ChangeLog: Follow spelling conventions.
732 * ChangeLog.2: Likewise.
733 * call.c: Likewise.
734 * class.c: Likewise.
735 * cp-tree.h: Likewise.
736 * cvt.c: Likewise.
737 * decl.c: Likewise.
738 * decl2.c: Likewise.
739 * except.c: Likewise.
740 * friend.c: Likewise.
741 * g++spec.c: Likewise.
742 * init.c: Likewise.
743 * lex.c: Likewise.
744 * mangle.c: Likewise.
745 * method.c: Likewise.
746 * operators.def: Likewise.
747 * optimize.c: Likewise.
748 * pt.c: Likewise.
749 * rtti.c: Likewise.
750 * search.c: Likewise.
751 * semantics.c: Likewise.
752 * spew.c: Likewise.
753 * tree.c: Likewise.
754 * typeck.c: Likewise.
755
9ced0328
DP
7562002-09-18 Devang Patel <dpatel@apple.com>
757
758 * cp/cp-tree.h: New prototype for walk_vtabls().
759 * cp/decl.c (walk_vtables_r): New function.
760 (struct cp_binding_level): Add new members, namespaces,
761 names_size and vtables.
762 (add_decl_to_level): Add decl in namespaces or vtables
763 chain, if conditions match.
764 (walk_vtables): New function.
765 (walk_namespaces_r): Travers separate namespace chain
766 for namespace decls.
767 (wrapup_globals_for_namespace): Use names_size instead
768 of list_length().
769 * cp/decl2.c (finish_file): Use walk_vtables() instead of
770 walk_globals() to walk vtable decls.
771
dd29188b
NS
7722002-09-18 Nathan Sidwell <nathan@codesourcery.com>
773
774 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
775 ICE with invalid pointers & references.
776
f989ed67
ZW
7772002-09-17 Zack Weinberg <zack@codesourcery.com>
778
779 * Make-lang.in: Remove all references to the demangler.
780 * cxxfilt.c: Moved to binutils.
781
171d2f50
NS
7822002-09-16 Nathan Sidwell <nathan@codesourcery.com>
783
3ec83083
NS
784 PR c++/7718
785 * pt.c (tsubst_decl): Remove assert.
786
171d2f50
NS
787 Remove DR 295 implementation.
788 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
789 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
790 about ignoring volatile qualifiers.
791
792 * search.c (lookup_member): Correct documentation.
793
36a5eadd
GK
7942002-09-16 Geoffrey Keating <geoffk@apple.com>
795
796 * cp-tree.h (union lang_tree_node): Add chain_next option.
797
28c56d25
NS
7982002-09-16 Nathan Sidwell <nathan@codesourcery.com>
799
7979434d
NS
800 * parse.y (parse_finish_call_expr): Check lookup_member result.
801
28c56d25
NS
802 PR c++/7015
803 * semantic.c (finish_asm_stmt): Fix operand/output_operands
804 thinko.
805 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
806
3baab484
NS
8072002-09-15 Nathan Sidwell <nathan@codesourcery.com>
808
809 PR c++/7919
810 * call.c (build_over_call): Convert this pointer for fns found by
811 using decls.
812
d30d6e7a
KH
8132002-09-15 Kazu Hirata <kazu@cs.umass.edu>
814
815 * ChangeLog: Follow spelling conventions.
816 * ChangeLog.1: Likewise.
817
c8460010
NS
8182002-09-14 Nathan Sidwell <nathan@codesourcery.com>
819
820 PR c++/7768
821 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
822
c6002625
KH
8232002-09-14 Kazu Hirata <kazu@cs.umass.edu>
824
825 * error.c: Fix comment formatting.
826 * except.c: Likewise.
827 * expr.c: Likewise.
828 * friend.c: Likewise.
829 * g++spec.c: Likewise.
830 * init.c: Likewise.
831 * lex.c: Likewise.
832 * mangle.c: Likewise.
833 * method.c: Likewise.
834 * optimize.c: Likewise.
835 * pt.c: Likewise.
836 * rtti.c: Likewise.
837 * search.c: Likewise.
838 * semantics.c: Likewise.
839 * spew.c: Likewise.
840 * tree.c: Likewise.
841 * typeck.c: Likewise.
842 * typeck2.c: Likewise.
843
46dd3884
GDR
8442002-09-13 Matt Austern <austern@apple.com>
845
4a7510cb 846 PR C++/7828
46dd3884
GDR
847 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
848 * cp/call.c: Change call-by-const-reference mechanism to use
849 non_cast_lvalue_p when deciding whether the create a temporary.
850 We need a temporary when passing, e.g. (long) x by const ref.
851
712467a4
NS
8522002-09-13 Nathan Sidwell <nathan@codesourcery.com>
853
854 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
855
a1c65f9f
KH
8562002-09-13 Kazu Hirata <kazu@cs.umass.edu>
857
858 * decl.c: Fix comment formatting.
859 * decl2.c: Likewise.
860
00a17e31
KH
8612002-09-12 Kazu Hirata <kazu@cs.umass.edu>
862
863 * call.c: Fix comment formatting.
864 * class.c: Likewise.
865 * cp-lang.c: Likewise.
866 * cp-tree.h: Likewise.
867 * cvt.c: Likewise.
868
3fd9d606
ZW
8692002-09-11 Zack Weinberg <zack@codesourcery.com>
870
871 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
872 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
873 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
874 minor adjustments (use version_string, eliminate yet another
875 duplicate of xmalloc)
876
2515a7ea
KG
8772002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
878
879 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
880
5aa3396c
JM
8812002-09-05 Jason Merrill <jason@redhat.com>
882
883 * typeck2.c (add_exception_specifier): Only pedwarn for an
884 incomplete type.
885 (require_complete_eh_spec_types): New fn.
886 (cxx_incomplete_type_diagnostic): Also support pedwarning.
887 * typeck.c (complete_type_or_diagnostic): Likewise.
888 * call.c (build_call): Call require_complete_eh_spec_types.
889 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
890 on an incomplete type.
891
23ccd1f3
JJ
8922002-09-04 Jakub Jelinek <jakub@redhat.com>
893
894 * decl.c (start_cleanup_fn): Clear interface_only before
895 start_function, restore it afterwards.
896
d99f015c
JM
8972002-08-31 Jason Merrill <jason@redhat.com>
898
899 * cp-lang.c (cp_expr_size): Allow initialization from a
900 CONSTRUCTOR.
901
8a3c9180
RH
9022002-08-30 Richard Henderson <rth@redhat.com>
903
c9989d09 904 PR opt/7515
8a3c9180
RH
905 * tree.c: Include target.h.
906 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
907 don't bind locally.
908 * Makefile.in (tree.o): Update.
909
eca7f13c
MM
9102002-08-27 Mark Mitchell <mark@codesourcery.com>
911
912 * class.c (layout_virtual_bases): Warn about bugs in G++ that
913 result in incorrect object layouts.
914 (layout_class_type): Likewise.
f989ed67 915
13d3f0b6
MA
9162002-08-24 Matt Austern <austern@apple.com>
917
918 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
919 are allowable.
920 (real_lvalue_p): Update caller.
921 (lvalue_p): Ditto.
922 (non_cast_lvalue_or_else): New.
923 * tree.h: Declare it.
f989ed67 924 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 925
5b770a96
MM
9262002-08-22 Mark Mitchell <mark@codesourcery.com>
927
928 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
929 and COND_EXPR specially; fix error message output.
930
d65b1d77
JM
9312002-08-22 Jason Merrill <jason@redhat.com>
932
933 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
934 * semantics.c (nullify_returns_r): Likewise.
935
8a5f4379
GDR
9362002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
937
938 Fix PR/7621
939 * typeck.c (finish_class_member_access_expr): Diagnose cases where
940 name lookup finds nothing.
941
5d764395
JM
9422002-08-15 Jason Merrill <jason@redhat.com>
943
944 * semantics.c (finish_then_clause): Remove redundant assignment.
945 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
946 extra binding level outside the if/switch statement.
947 (finish_while_cond, finish_for_cond): Rewrite complex condition
948 into the loop body.
949
c01b9ec8
AO
9502002-08-15 Alexandre Oliva <aoliva@redhat.com>
951
952 * parse.y (sizeof, alignof, typeof): New non-terminals to
953 increment skip_evaluation. Replace terminals with them and
954 decrement skip_evaluation at the end of rules using them.
955 * decl2.c (mark_used): Don't assemble_external if
956 skipping evaluation.
957
e8fe46d4
GDR
9582002-08-15 Gabriel Dos Reis <gdr@nerim.net>
959
960 Fix PR/7504
961 * parse.y (parse_finish_call_expr): Handle incomplete
962 type used to name a scope.
963
eac5ce6c
NS
9642002-08-15 Nathan Sidwell <nathan@codesourcery.com>
965
966 PR c++/7598
967 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
968 regression caused by my 2002-08-08 patch.
969
22eadedb
MM
9702002-08-13 Mark Mitchell <mark@codesourcery.com>
971
972 * decl.c (pushdecl_class_level): Honor requests to bind names to
973 OVERLOADs.
974
e65e6212
KG
9752002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
976
977 * decl2.c (build_call_from_tree): Fix uninitialized variable.
978 * parse.y (parse_finish_call_expr): Likewise.
979 * repo.c (old_args, old_dir, old_main): Const-ify.
980
3e72ec9a
GDR
9812002-08-11 Gabriel Dos Reis <gdr@nerim.net>
982
983 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
984 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
985 * optimize.c (maybe_clone_body): Likewise.
986 * pt.c (tsubst_enum): Likewise.
987 (lookup_template_class): Likewise.
988 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
989
f749a36b
NB
9902002-08-10 Neil Booth <neil@daikokuya.co.uk>
991
992 * lang-specs.h: Remove -ansi.
993
3ebf5204
NS
9942002-08-10 Nathan Sidwell <nathan@codesourcery.com>
995
996 * tree.c (maybe_dummy_object): Replace // with /* */
997
9e259dd1
MM
9982002-08-09 Mark Mitchell <mark@codesourcery.com>
999
1000 * call.c (standard_conversion): Use build_ptrmem_type.
1001 * cp-tree.h (build_ptrmem_type): New function.
1002 (adjust_result_of_qualified_name_lookup): Likewise.
1003 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1004 static data members.
1005 (build_ptrmem_type): New function.
1006 (grokdeclarator): Do not use build_offset_type when encountering a
1007 qualified name.
1008 * parse.y (parse_finish_call_expr): Use
1009 adjust_result_of_qualified_name_lookup.
1010 * search.c (adjust_result_of_qualified_name_lookup): New function.
1011 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1012 accessing OFFSET_TYPEs directly.
f989ed67 1013
0e339752
MS
10142002-08-08 Mike Stump <mrs@apple.com>
1015
1016 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1017 (type_decays_to): Likewise.
1018 * class.c (find_final_overrider): Likewise.
1019 (maybe_note_name_used_in_class): Likewise.
1020 * decl.c (current_tmpl_spec_kind): Likewise.
1021 (add_binding): Likewise.
1022 (push_class_binding): Likewise.
1023 (duplicate_decls): Likewise.
1024 (layout_var_decl): Likewise.
1025 (grokfndecl): Likewise.
1026 (grokdeclarator): Likewise.
1027 (check_default_argument): Likewise.
1028 * decl2.c (handle_class_head): Likewise.
1029 * error.c (dump_template_decl): Likewise.
1030 * init.c (build_offset_ref): Likewise.
1031 * pt.c (check_specialization_scope): Likewise.
1032 (determine_specialization): Likewise.
1033 (check_explicit_specialization): Likewise.
1034 (maybe_check_template_type): Likewise.
1035 (process_partial_specialization): Likewise.
1036 (check_default_tmpl_args): Likewise.
1037 (push_template_decl_real): Likewise.
1038 (convert_template_argument): Likewise.
1039 (try_class_unification): Likewise.
1040 (get_bindings_real): Likewise.
1041 (do_decl_instantiation): Likewise.
1042 * semantics.c (begin_function_definition): Likewise.
1043 (finish_member_declaration): Likewise.
1044 (check_multiple_declarators): Likewise.
1045 * typeck.c (comp_array_types): Likewise.
1046 (comptypes): Likewise.
1047 (expr_sizeof): Likewise.
1048 (build_binary_op): Likewise.
1049 (dubious_conversion_warnings): Likewise.
1050 (check_return_expr): Likewise.
b6ce26ac 1051
a6f5b2d3
MM
10522002-08-08 Mark Mitchell <mark@codesourcery.com>
1053
1054 * typeck.c (build_class_member_access_expr): Do not return
1055 error_mark_node when no error has occurred.
b6ce26ac 1056
c93a26f5
NS
10572002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1058
1059 * typeck.c (build_component_addr): Remove.
1060 (build_unary_op): Just check it's not a bitfield, and then build
1061 an ADDR_EXPR.
1062
5bfc90de
NS
10632002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1064
1065 * class.c (convert_to_base): Correct check for error_mark_node.
1066 (create_vtable_ptr): Remove unused VFUNS_P parm.
1067
22aa533e
NS
10682002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1069
1070 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1071
50ad9642
MM
10722002-08-07 Mark Mitchell <mark@codesourcery.com>
1073
1074 Rework build_component_ref.
1075 * call.c (build_vfield_ref): Do not go through build_component_ref.
1076 (build_field_call): Use build_class_member_access_expr.
1077 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1078 (build_object_call): Likewise.
1079 * class.c (convert_to_base): New function.
1080 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1081 (instantiate_type): Handle BASELINKs.
1082 * cp-tree.def (BASELINK): New tree code.
1083 * cp-tree.h (BASELINK_P): Reimplement.
1084 (SET_BASELINK_P): Remove.
1085 (BASELINK_BINFO): Reimplement.
1086 (BASELINK_FUNCTIONS): Likewise.
1087 (BASELINK_ACCESS_BINFO): Likewise.
1088 (BASELINK_OPTYPE): Likewise.
1089 (convert_to_base): New function.
1090 (name_p): Likewise.
1091 (build_object_ref): Remove.
1092 (build_component_ref_1): Likewise.
1093 (build_component_ref): Likewise.
1094 (build_x_component_ref): Likewise.
1095 (build_class_member_access_expr): New function.
1096 (finish_class_member_access_expr): Likewise.
1097 (build_ptrmemfunc_access_expr): Likewise.
1098 * decl.c (grokdeclarator): Handle BASELINKs.
1099 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
1100 finish_class_member_access_expr.
1101 (arg_assoc): Handle BASELINKs.
1102 (do_class_using_decl): Likewise.
1103 * error.c (dump_decl): Likewise.
1104 (dump_expr): Use build_ptrmemfunc_access_expr.
1105 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
1106 destructors.
1107 (build_throw): Use BASELINK_FUNCTIONS.
1108 * init.c (perform_member_init): Use
1109 build_class_member_access_expr.
1110 (build_offset_ref): Handle BASELINKs. Use
1111 build_class_member_access_expr.
1112 * method.c (hack_identifier): Likewise.
1113 * parse.y (do_id): Use BASELINK, not TREE_LIST.
1114 (primary): Remove uses of build_object_ref.
1115 * pt.c (lookup_template_function): Handle BASELINKs.
1116 (resolve_overloaded_unification): Likewise.
1117 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
1118 (lookup_field): Use BASELINK, not TREE_LIST.
1119 (lookup_fnfiels): Likewise.
1120 (setup_class_bindings): Likewise.
1121 * semantics.c (finish_object_call_expr): Do not use
1122 build_method_call when we already know what function is being
1123 called.
1124 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1125 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
1126 TREE_CHAIN.
1127 (name_p): New function.
1128 * typeck.c (build_object_ref): Remove.
1129 (build_component_ref_1): Likewise.
1130 (build_x_component_ref): Likewise.
1131 (build_class_member_access_expr): New function.
1132 (finish_class_member_access_expr): Likewise.
1133 (build_ptrmemfunc_access_expr): Likewise.
1134 (get_member_function_from_ptrfunc): Use
1135 build_ptrmemfunc_access_expr.
1136 (build_binary_op): Likewise.
1137 (build_unary_op): Likewise.
1138 (build_ptrmemfunc): Likewise.
1139 (pfn_from_ptrmemfunc): Likewise.
1140 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 1141
0b6f2917
NB
11422002-08-07 Neil Booth <neil@daikokuya.co.uk>
1143
1144 * Make-lang.in (CXX_C_OBJS): Update.
1145 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
1146 * cp-tree.h (cxx_decode_option): Remove.
1147 * decl2.c (compare_options, lang_f_options, unsupported_options,
1148 cxx_decode_option): Remove.
1149
1e14c7f0
GDR
11502002-08-06 Gabriel Dos Reis <gdr@nerim.net>
1151
1152 * typeck.c (build_x_unary_op): Handle pointer-to-member.
1153
b3426eb9
GK
11542002-08-05 Geoffrey Keating <geoffk@redhat.com>
1155
1156 * class.c: Don't include obstack.h.
b6ce26ac 1157 (popclass):
b3426eb9
GK
1158 * decl2.c: Delete bogus comment.
1159 * error.c: Don't include obstack.h.
1160 * except.c: Likewise.
1161 (dump_type): Correct comment.
1162 * method.c: Don't include obstack.h.
1163 * tree.c: Likewise.
1164
201fbb7f
GDR
11652002-08-04 Gabriel Dos Reis <gdr@nerim.net>
1166
1167 Fix PR/2213
1168 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1169 expressions to pointer-to-data-member of pointer-to-member-functions.
1170
6d9f628e
GK
11712002-08-04 Geoffrey Keating <geoffk@redhat.com>
1172
1173 * cvt.c (ocp_convert): Delete obsolete code.
1174 * parse.y (permanent_obstack): Delete declaration.
1175 * pt.c (permanent_obstack): Delete declaration.
1176 * repo.c (permanent_obstack): Delete declaration.
1177 (open_repo_file): Use xmalloc instead of permanent_obstack.
1178 (init_repo): Use xstrdup instead of permanent_obstack.
1179
dd98e14f
NS
11802002-08-04 Nathan Sidwell <nathan@codesourcery.com>
1181
1182 * cp-tree.h (VF_DERIVED_VALUE): Remove.
1183 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
1184
e6858a84
NS
11852002-08-03 Nathan Sidwell <nathan@codesourcery.com>
1186
1187 PR 7470.
1188 C++ ABI change - vfunc ordering.
1189 * class.c (add_virtual_function): Remove.
1190 (dfs_modify_all_vtables): Take list of all declared
1191 virtuals. Assign all that are not in primary base.
1192 (check_for_override): Adjust comments.
1193 (create_vtable_ptr): Take single list of virtuals. Build chain
1194 of declared virtuals here.
1195 (layout_class_type): Take single list of virtuals. Adjust.
1196 (finish_struct_1): Keep virtuals on single list. Adjust.
1197
55765de4
MM
11982002-08-02 Mark Mitchell <mark@codesourcery.com>
1199
1200 * init.c (build_member_call): Use build_new_method_call, not
1201 build_method_call.
1202
d0067571
KW
12032002-08-02 Krister Walfridsson <cato@df.lth.se>
1204
1205 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
1206
4a34e0e8
MM
12072002-08-02 Mark Mitchell <mark@codesourcery.com>
1208
1209 * call.c (build_method_call): Issue a more helpful error message
1210 about ambiguous method names.
1211
41ab2ae2
NS
12122002-08-02 Nathan Sidwell <nathan@codesourcery.com>
1213
1214 * tree.c (build_shared_int_cst): Make cache file scope, and
1215 GTY it.
1216
367aa585
JM
12172002-08-02 Jason Merrill <jason@redhat.com>
1218
a77a9a18
JM
1219 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
1220 (cp_expr_size): New fn.
1221 * call.c (build_over_call): Lose empty class hackery.
1222 (convert_arg_to_ellipsis): Promote non-POD warning to error.
1223 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
1224
367aa585
JM
1225 * semantics.c (expand_body): Do tree optimization in the function
1226 context, too.
1227
4078b403
NB
12282002-08-01 Neil Booth <neil@daikokuya.co.uk>
1229
1230 * cp-tree.h: Move all warning and flag declarations to c-common.h.
1231 * decl.c: Move all warning and flag variables to c-common.c.
1232 * decl2.c: Move all warning and flag variables to c-common.c.
1233 * lex.c (flag_digraphs): Remove.
1234 (warn_traditional): Now in c-common.c.
1235
4ba126e4
MM
12362002-07-31 Mark Mitchell <mark@codesourcery.com>
1237
1238 * call.c (build_field_call): Do not look up the field by name.
1239 (build_method_call): Simplify.
1240 (struct z_candidate): Add access_path and conversion_path. Remove
1241 basetype_path.
1242 (convert_class_to_reference): Adjust use of
1243 add_function_candidate.
1244 (add_candidate): Add conversion_path argument.
1245 (add_function_candidate): Use it.
1246 (add_conv_dndidate): Likewise.
1247 (build_builtin_candidate): Likewise.
1248 (add_template_candidate_real): Add conversion_path argument.
1249 (add_template_conv_candidate): Likewise.
1250 (add_template_candidate): Likewise.
1251 (build_user_type_conversion_1): Use it.
1252 (build_new_function_call): Remove name lookup code. Adjust use of
1253 add_template_candidate and add_function_candidate.
1254 (build_new_op): Likewise.
1255 (convert_like_real): Use build_special_member_call.
1256 (build_over_call): Use cand->conversion_path.
1257 (build_special_member_call): New method.
1258 (build_new_method_call): Remove name lookup code.
1259 * cp-tree.def (OFFSET_REF): Update documentation.
1260 (TEMPLATE_ID_EXPR): Likewise.
1261 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
1262 (BASELINK_OPTYPE): Likewise.
1263 (build_new_method_call): Adjust prototype.
1264 (build_special_member_call): New method.
1265 (build_baselink): New method.
1266 (build_offset_ref_call_from_tree): Likewise.
1267 (build_call_from_tree): Likewise.
1268 (finish_qualified_call_expr): Remove.
1269 (finish_call_expr): Adjust prototype.
1270 (build_x_function_call): Remove.
1271 * cvt.c (ocp_convert): Use build_special_member_call.
1272 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
1273 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
1274 CALL_EXPR.
1275 (build_offset_ref_call_from_tree): New function.
1276 (build_call_from_tree): Likewise.
1277 * init.c (expand_cleanup): Use build_special_member_call.
1278 (expand_default_init): Likewise.
1279 (build_member_call): Use finish_call_expr.
1280 (build_new_1): Use build_special_member_call.
1281 (push_base_cleanups): Likewise.
1282 * method.c (do_build_assign_ref): Likewise.
1283 * parse.y (template_id): Do not pass a COMPONENT_REF to
1284 lookup_template_function.
1285 (primary): Use parse_finish_call_epxr, not finish_call_expr.
1286 (parse_finish_call_expr): New function.
1287 * pt.c (lookup_template_function): Add assertions.
1288 * search.c (lookup_base): Allow T to be a binfo.
1289 (build_baselink): New function.
1290 (lookup_member): Use it.
1291 * semantics.c (finish_call_expr): Do not do name lookup.
1292 (finish_object_call_expr): Remove #if 0'd code.
1293 (finish_qualified_call_expr): Remove.
1294 * typeck.c (build_x_function_call): Remove.
1295 (build_static_case): Use build_special_member_call.
1296 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 1297
60b8aa94
FS
12982002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1299
1300 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
1301
8a4a7242
GDR
13022002-07-30 Gabriel Dos Reis <gdr@nerim.net>
1303
1304 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
1305
03fc215c
NS
13062002-07-30 Nathan Sidwell <nathan@codesourcery.com>
1307
1308 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
1309 documentation.
1310
3f16a8f3
AM
13112002-07-29 Alan Modra <amodra@bigpond.net.au>
1312
1313 * cp-tree.h: Comment typo fix.
1314
c03d566f
RE
13152002-07-29 Richard Earnshaw <rearnsha@arm.com>
1316
1317 * spew.c (space_for_token): Allocate zeroed memory for a new token
1318 chunk.
1319
c2ef6d34
RS
13202002-07-27 Roger Sayle <roger@eyesopen.com>
1321
1322 * decl.c (builtin_function_1): No need to explicitly mark
1323 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
1324
a3926fe1
RS
13252002-07-27 Roger Sayle <roger@eyesopen.com>
1326
1327 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
1328
8e51619a
JM
13292002-07-26 Jason Merrill <jason@redhat.com>
1330
1331 * call.c (build_over_call): Likewise.
1332 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
1333 (convert_for_arg_passing): New fn.
1334 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
1335 (type_passed_as): New fn.
1336 * pt.c (tsubst_decl): Use it.
1337 * decl2.c (cp_build_parm_decl): New fn.
1338 (build_artificial_parm): Use it.
1339 (start_static_storage_duration_function): Likewise.
1340 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
1341 (grokparms): Don't mess with DECL_ARG_TYPE.
1342 * typeck.c (convert_arguments): Use convert_for_arg_passing.
1343 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1344 Define.
1345 * cp-tree.h: Declare new fns.
b6ce26ac 1346
c372b0fa
NB
13472002-07-26 Neil Booth <neil@daikokuya.co.uk>
1348
1349 * cp-tree.h (flag_operator_names): Remove.
1350 * decl2.c (flag_operator_names): Remove.
1351 (lang_f_options): Remove operator-names.
1352 * lex.c (D_OPNAME): Remove.
1353 (reswords): Remove operator names.
1354 (rid_to_yy): Remove operator names.
1355 (init_reswords): No need to handle D_OPNAME.
1356 * spew.c (read_process_identifier): There are no operator
1357 names.
1358
558ee214
JM
13592002-07-26 Jason Merrill <jason@redhat.com>
1360
1361 * dump.c (cp_dump_tree): Call c_dump_tree.
1362 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1363
81a1552d
NB
13642002-07-25 Neil Booth <neil@daikokuya.co.uk>
1365
1366 * error.c (print_whitespace): Remove.
1367 * g++spec.c (LIBUNWIND): Move.
1368 * mangle.c (mangled_position, write_signed_number): Remove.
1369
cad2c6b6
NB
13702002-07-25 Neil Booth <neil@daikokuya.co.uk>
1371
1372 * decl2.c (cxx_decode_option): Similarly.
1373
ea793912
GDR
13742002-07-25 Gabriel Dos Reis <gdr@nerim.net>
1375
1376 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
1377 (cxx_sizeof_or_alignof_type): Take a third argument.
1378 (cxx_sizeof): Adjust definition.
1379 (cxx_alignof): Likewise.
1380 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
1381 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
1382 complaining.
1383 (c_sizeof_nowarn): Remove definition.
1384 (build_unary_op): Use cxx_sizeof_nowarn.
1385
3cfab7ec
GK
13862002-07-24 Geoffrey Keating <geoffk@redhat.com>
1387
1388 * tree.c (cp_build_qualified_type_real): When copying
1389 pointer-to-method types, unshare the record that holds
1390 the cached pointer-to-member-function type.
1391
c0667597
NB
13922002-07-23 Neil Booth <neil@daikokuya.co.uk>
1393
1394 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
1395
fa72b064
GDR
13962002-07-23 Gabriel Dos Reis <gdr@nerim.net>
1397
1398 Fix PR/7363:
1399 * typeck.c (cxx_sizeof_or_alignof_type): New function.
1400 (c_sizeof): Remove definition.
1401 (expr_sizeof): Use cxx_sizeof.
1402 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
1403 * decl.c (finish_destructor_body): Use cxx_sizeof.
1404 * semantics.c (finish_alignof): Likewise.
1405 (finish_alignof): Use cxx_alignof.
1406 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
1407 (cxx_sizeof_or_alignof_type): Declare.
1408 (my_friendly_assert): Move to ../c-common.h.
1409
4fa31c2a
NB
14102002-07-23 Neil Booth <neil@daikokuya.co.uk>
1411
1412 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
1413
0e902d98
KL
14142002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1415
1416 PR c++/7347, c++/7348
1417 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
1418 * decl.c (make_typename_type): Use it.
1419 (make_unbound_class_template): Likewise.
1420 (lookup_name_real): Don't call type_access_control if scope is
1421 template parameter dependent.
1422 * parse.y (template_arg): Call make_unbound_class_template with
1423 tf_parsing set.
1424 (nest_name_specifier): Call make_typename_type with tf_parsing set.
1425 (typename_sub0): Likewise.
1426 (typename_sub1): Likewise.
1427 (instantiate_decl): Push class scope.
1428 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
1429 for both static variable and member function template.
1430 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
1431 and arguments.
1432 * search.c (type_access_control): Do type access for TEMPLATE_DECL
1433 too.
1434
b886c620
RS
14352002-07-20 Roger Sayle <roger@eyesopen.com>
1436
1437 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
1438 test by using positive_option. Make whitespace consistent.
1439
7a561142
GDR
14402002-07-20 Gabriel Dos Reis <gdr@nerim.net>
1441
fa72b064 1442 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
1443 members with 'locus'. Adjust use throughout.
1444 (struct feed): Likewise.
1445 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
1446 Adjust use.
1447 (snarf_defarg): Use error(), not error_with_file_and_line().
1448
059ba716
CD
14492002-07-19 Chris Demetriou <cgd@broadcom.com>
1450
1451 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
1452 cpp_options is included.
1453
d955f6ea
KL
14542002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1455
1456 PR c++/2862, c++/2863
1457 * pt.c (determine_specialization): Compare the length of
1458 TYPE_ARG_TYPES. Tidy.
1459
d03d18e8
KL
14602002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1461
1462 PR c++/3797
1463 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 1464 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
1465 instantiation olddecl.
1466
ba59df78
KL
14672002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1468
1469 PR c++/4802, c++/5387
1470 * decl.c (make_typename_type): Use enforce_access.
1471
58f05188
SS
14722002-07-17 Scott Snyder <snyder@fnal.gov>
1473
1474 PR c++/7320
1475 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
1476
04ec0065
MM
14772002-07-12 Mark Mitchell <mark@codesourcery.com>
1478
1479 * class.c (add_method): Correct handling of conversion operators.
1480
f0ab6bf2
MM
14812002-07-11 Mark Mitchell <mark@codesourcery.com>
1482
1483 PR c++/7224
1484 * class.c (add_method): Simplify.
1485
34902e16
JM
14862002-07-11 Jason Merrill <jason@redhat.com>
1487
1488 PR c++/7279
1489 * tree.c (cp_copy_res_decl_for_inlining): Also copy
1490 TREE_ADDRESSABLE.
1491
6e04241f
GS
14922002-07-10 Graham Stott <graham.stott@btinternet.com>
1493
1494 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 1495 Pass depth as int pointer.
6e04241f 1496
8ac9d31f
TJ
14972002-07-11 Tim Josling <tej@melbpc.org.au>
1498
b6ce26ac 1499 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
1500
1501 * config-lang.in (gtfiles): Add files needed for this front end.
1502
15c7fb9c
MM
15032002-07-10 Mark Mitchell <mark@codesourcery.com>
1504
1505 * cp-tree.h (unqualified_name_lookup_error): Declare it.
1506 (begin_function_definition): Adjust prototype.
1507 * lex.c (unqualified_name_lookup_error): New function, split out
1508 from ...
1509 (do_identifier): ... here.
1510 * parse.y (parse_begin_function_definition): New function.
1511 (fn.def1): Use it.
1512 * semantics.c (begin_function_definition): Accept decl-specifiers
1513 and attributes as separate parameters.
1514
abf92e26
JM
15152002-07-10 Jason Merrill <jason@redhat.com>
1516
1517 PR c++/6255
1518 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
1519 modifying the old one.
1520
8ba658ee
MM
15212002-07-09 Mark Mitchell <mark@codesourcery.com>
1522
1523 * cp-tree.h (constructor_name_p): Declare it.
1524 (check_template_template_default_arg): Likewise.
1525 * class.c (handle_using_decl): Use constructor_name_p.
1526 * decl.c (grokdeclarator): Likewise.
1527 * decl2.c (constructor_name_p): Define it.
1528 * init.c (build_member_call): Use constructor_name_p.
1529 * parse.y (template_parm): Use check_template_template_default_arg.
1530 * pt.c (check_explicit_specialization): Use constructor_name_p.
1531 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 1532
d5372501
KL
15332002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1534
1535 * pt.c (can_complete_type_without_circularity): Add static to
1536 function definition.
1537
594bb0e7
MM
15382002-07-08 Mark Mitchell <mark@codesourcery.com>
1539
1540 * cp-tree.h (have_extern_spec): Declare it
1541 * decl.c (have_extern_spec): Define it.
1542 (start_decl): Eliminate use of used_extern_spec.
1543 (start_function): Likewise.
1544 * parse.y (have_extern_spec): Remove declaration.
1545 (used_extern_spec): Likewise.
1546 (frob_specs): Eliminate use of used_extern_spec.
1547 (.hush_warning): Likewise.
1548
eb8845be
MM
15492002-07-07 Mark Mitchell <mark@codesourcery.com>
1550
1551 * Make-lang.in (cp/parse.o): Depend on decl.h.
1552 * cp-tree.h (do_decl_instantiation): Change prototype.
1553 * parse.y: Include decl.h.
1554 (parse_decl_instantiation): New function.
1555 (explicit_instantiation): Use it.
1556 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
1557 and DECLSPECS.
b6ce26ac 1558
78abea27
RS
15592002-07-07 Roger Sayle <roger@eyesopen.com>
1560
1561 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
1562 constructor and destructor tests when passed a TEMPLATE_DECL.
1563
98c07d7b
JM
15642002-07-05 Jason Merrill <jason@redhat.com>
1565
212e17fd
JM
1566 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
1567 pointers.
1568
98c07d7b
JM
1569 PR optimization/7145
1570 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
1571
c6f553d1
NS
15722002-07-05 Nathan Sidwell <nathan@codesourcery.com>
1573
1574 Repair damage on weak-impared targets caused by my previous patch.
1575 * cp-tree.h (import_export_tinfo): Add parameter.
1576 * decl2.c (import_export_tinfo): Add parameter, post adjust
1577 DECL_COMDAT.
1578 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
1579 import_export_tinfo.
1580
b2153b98
KL
15812002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1582
1583 PR c++/6944
1584 * init.c (build_aggr_init): Remove qualifiers of init before calling
1585 build_vec_init.
1586 (build_vec_init): Flatten multi-dimensional array during cleanup.
1587 (build_vec_delete_1): Abort if the type of each element is array.
1588
492ff760
GS
15892002-07-03 Graham Stott <graham.stott@btinternet.com>
1590
1591 * pt.c (instantiate_class_template): Fix typo.
1592
04c4491d
KL
15932002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1594
06728f70
KL
1595 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
1596 by CVS conflict in my last patch.
04c4491d 1597
17f29637
KL
15982002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1599
1600 PR c++/6716
1601 * pt.c (can_complete_type_without_circularity): New function.
1602 (instantiate_class_template): Use it.
06728f70
KL
1603 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
1604 message due to incomplete fields.
17f29637 1605
5d69ba1f
MM
16062002-07-01 Mark Mitchell <mark@codesourcery.com>
1607
1608 PR c++/7112
1609 * mangle.c (write_expression): Add mangling for sizeof when
1610 applied to a type.
1611 * operators.def: Remove stale comment.
1612
d689a8f1
NS
16132002-06-30 Nathan Sidwell <nathan@codesourcery.com>
1614
1615 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
1616 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
1617 (tinfo_decl_type): Replace with ...
1618 (type_info_ptr_type): ... this.
1619 (import_export_tinfo): Declare.
1620 (tinfo_decl_p): Rename to ...
1621 (unemitted_tinfo_decl_p): ... this.
1622 * decl2.c (import_export_decl): Break out tinfo handling into ...
1623 (import_export_tinfo): ... here. New function.
1624 (finish_file): Adjust.
1625 * rtti.c (TINFO_REAL_NAME): New macro.
1626 (init_rtti_processing): Create the tinfo types.
1627 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
1628 (get_tinfo_decl): Adjust.
1629 (get_tinfo_ptr): New function.
1630 (get_type_id): Use it.
1631 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
1632 (ptr_initializer): Use get_tinfo_ptr.
1633 (ptm_initializer): Likewise.
1634 (synthesize_tinfo_var): Break into ...
1635 (get_pseudo_ti_init): ... this. Just create the initializer.
1636 (get_pseudo_ti_desc): .. and this.
1637 (create_real_tinfo_var): Remove.
1638 (create_pseudo_type_info): Don't create the vtable decl here.
1639 (get_vmi_pseudo_type_info): Remove.
1640 (create_tinfo_types): Adjust.
1641 (tinfo_decl_p): Rename to ...
1642 (unemitted_tinfo_decl_p): ... here. Adjust.
1643 (emit_tinfo_decl): Adjust. Create the initializer.
1644
5ce49b4b
MM
16452002-06-27 Mark Mitchell <mark@codesourcery.com>
1646
1647 PR c++/6695
1648 * pt.c (tsubst_friend_class): Substitute into the context of the
1649 friend before using it.
1650
88e5899c
MM
16512002-06-26 Mark Mitchell <mark@codesourcery.com>
1652
1653 * cp-tree.h (xref_tag): Change prototype.
1654 (handle_class_head): Likewise.
1655 (build_x_component_ref): Likewise.
1656 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
1657 (xref_tag): Take attributes as a separate parameter.
1658 (xref_tag_from_type): Adjust call to xref_tag.
1659 * decl2.c (build_expr_from_tree): Adjust call to
1660 build_x_component_ref.
1661 (handle_class_head): Take attributes as a separate parameter.
1662 * parse.y (parse_xref_tag): New function.
1663 (parse_handle_class_head): Likewise.
1664 (primary): Use parse_xref_tag.
1665 (class_head_decl): Use parse_handle_class_head.
1666 (class_head_defn): Likewise.
1667 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
1668 (build_dynamic_cast_1): Likewise.
1669 (create_pseudo_type_info): Likewise.
1670 (emit_support_tinfos): Likewise.
1671 * typeck.c (build_object_ref): Adjust call to
1672 build_x_component_ref.
1673 (build_x_component_ref): Remove protect parameter.
b6ce26ac 1674
da15dae6
MM
16752002-06-25 Mark Mitchell <mark@codesourcery.com>
1676
1677 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
1678 * class.c (handle_using_decl): Likewise.
1679 (instantiate_type): Likewise.
1680 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
1681 (xref_basetypes): Change prototype.
1682 (begin_mem_initializers): New function.
1683 (get_overloaded_fn): Likewise.
1684 * decl.c (xref_basetypes): Simplify.
1685 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
1686 * init.c (build_offset_ref): Likewise.
1687 * parse.y (base_init): Use begin_mem_initializers().
1688 (structsp): Adjust call to xref_basetypes.
1689 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
1690 (instantiate_class_template): Adjust call to xref_basetypes.
1691 * semantics.c (begin_mem_initializers): New function.
1692 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
1693 (really_overlaoded_fn): Likewise.
1694 (get_overloaded_fn): New function.'
1695 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 1696
5f261ba9
MM
16972002-06-24 Mark Mitchell <mark@codesourcery.com>
1698
1699 * cp-tree.h (SCALAR_TYPE_P): New macro.
1700 (check_for_out_of_scope_variable): New function.
1701 (at_class_scope_p): Likewise.
1702 (finish_fname): Likewise.
1703 * class.c (finish_struct): Use at_function_scope_p.
1704 * decl.c (check_for_out_of_scope_variable): New function, split
1705 out from do_identifier.
1706 (finish_enum): Use at_function_scope_p.
1707 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
1708 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
1709 (primary): Use at_function_scope_p.
1710 * search.c (at_class_scope_p): New function.
1711 * semantics.c (finish_fname): Likewise.
1712 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 1713
80b1331c
MM
17142002-06-23 Mark Mitchell <mark@codesourcery.com>
1715
1716 * parse.y (parse_scoped_id): New function.
1717 (primary): Use it.
1718 * cp-tree.h (do_scoped_id): Adjust declaration.
1719 * lex.c (do_scoped_id): Remove call to yylex.
1720 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
1721 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
1722 expanding it inline.
b6ce26ac 1723
08c7ae5a
MT
17242002-06-23 Matt Thomas <matt@3am-software.com>
1725
1726 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
1727 "#if VMS_TARGET".
1728
eb6b51b9
KG
17292002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1730
1731 * mangle.c (integer_type_codes): Const-ify.
1732
aa8dea09
RH
17332002-06-20 Richard Henderson <rth@redhat.com>
1734
1735 PR c++/6747
f989ed67
ZW
1736 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
1737 Call put_var_into_stack.
aa8dea09 1738
62c71f4b
KG
17392002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1740
1741 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
1742 array size calculation.
1743
aa16c0fa
KL
17442002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1745
1746 PR c++/6892
1747 * pt.c (tsubst_expr): Handle FILE_STMT.
1748
342cea95
KL
17492002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1750
1751 PR c++/6723
1752 * pt.c (lookup_template_class): Don't build complete argument of
1753 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
1754 argument.
1755
84d901be
AD
17562002-06-19 Akim Demaille <akim@epita.fr>
1757
1758 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
1759 decl.h's TYPENAME.
1760 * spew.c, lex.c: Adjust.
1761 * parse.y (explicit_instantiation): Add empty action to override
1762 the default $$ = $1 where it introduces a type clash.
1763
83b14b88
JM
17642002-06-14 Jason Merrill <jason@redhat.com>
1765
18ba380b
JM
1766 * semantics.c (begin_for_stmt): Push the 'for' scope before
1767 adding the FOR_STMT.
1768
83b14b88
JM
1769 C++ ABI changes.
1770 * class.c (build_base_field): Set DECL_PACKED.
1771 (layout_class_type): Don't use tail padding of PODs.
1772 * mangle.c (write_unqualified_name): Fix template conversion op
1773 mangling.
1774
fd852454
RH
17752002-06-16 Richard Henderson <rth@redhat.com>
1776
1777 PR opt/6793
1778 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
1779 after template instantiation.
1780
750491fc
RH
17812002-06-16 Richard Henderson <rth@redhat.com>
1782
1783 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
1784
f7d3c5f0
GDR
17852002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
1786
1787 * cp-tree.h (compiler_error): Remove declaration.
1788 * lex.c (compiler_error): Remove definition.
1789
893a047c
SE
17902002-06-14 Steve Ellcey <sje@cup.hp.com>
1791
1792 * g++spec.c (LIBUNWIND): New.
1793 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
1794
a6f5e048
RH
17952002-06-13 Jessica Han <jessica@cup.hp.com>
1796
1797 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
1798 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
1799 (build_vbase_offset_vtbl_entries): Likewise.
1800 * rtti.c (build_headof): Likewise.
1801 (get_tinfo_decl_dynamic): Likewise.
1802 (create_pseudo_type_info): Likewise.
1803
e4dadd2a
SS
18042002-06-12 Stan Shebs <shebs@apple.com>
1805
1806 * mpw-config.in: Remove file, no longer used.
1807 * mpw-make.sed: Ditto.
1808
09e77dee
ZW
18092002-06-07 Zack Weinberg <zack@codesourcery.com>
1810
1811 * decl2.c: Update call to cpp_handle_option.
1812
4bafaa6f
L
18132002-06-07 H.J. Lu (hjl@gnu.org)
1814
1815 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
1816
3cb8660c
GDR
18172002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1818
1819 * error.c (cp_error_at): Fix typo.
1820
47b69537
GDR
18212002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
1822
1823 * error.c (cp_diagnostic_starter): Adjust call.
1824 (maybe_print_instantiation_context): Change prototype to take a
1825 'diagnostic_info *'.
1826 (print_instantiation_full_context): Likewise.
1827 (print_instantiation_partial_context): Likewise.
1828 (cp_diagnostic_starter): Likewise.
1829 (cp_diagnostic_finalizer): Likewise.
1830 (cp_print_error_function): Likewise.
1831 (cp_printer): Take a secondary parameter as a 'text_info *'.
1832 Remove output_state savings. Adjust calls.
1833
e2500fed
GK
18342002-06-03 Geoffrey Keating <geoffk@redhat.com>
1835
1836 * pt.c (inline_parm_levels): Mark for GC.
1837
1838 * mangle.c (start_mangling): Allocate G.substitutions here...
1839 (init_mangle): ... rather than here.
1840 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
1841 * spew.c (yylexstring): Don't use VARRAY_FREE.
1842 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
1843 * decl2.c (pending_statics): Use gengtype to mark.
1844 (deferred_fns): Likewise.
1845 (ssdf_decls): Likewise.
1846 (init_decl2): Delete.
1847 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
1848 (cxx_init_decl_processing): Don't call init_decl2.
1849 (cxx_pop_function_context): Don't use VARRAY_FREE.
1850 * cp-tree.h (struct saved_scope): No need for special marking
1851 of varrays.
1852 (struct language_function): Likewise.
1853 (local_classes): Use gengtype to mark.
1854 (init_decl2): Delete prototype.
1855 * class.c (init_class_processing): Don't use
1856 ggc_add_tree_varray_root.
1857 (build_vtbl_initializer): Don't use VARRAY_FREE.
1858
1859 * decl.c (typename_compare): Don't use same_type_p.
1860
1861 * decl.c: Include hashtab.h instead of hash.h.
1862 (typename_hash): Update to use htab_h.
1863 (typename_compare): Likewise.
1864 (typename_htab): Use gengtype to mark.
1865 (build_typename_type): Update to use htab_h.
1866 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
1867
1868 * Make-lang.in (gt-cp-tree.h): New rule.
1869 (cp/tree.o): Depend on gt-cp-tree.h.
1870 * config-lang.in (gtfiles): Add cp/tree.c.
1871 * tree.c: Include gt-cp-tree.h.
1872 (list_hash_table): Use gengtype to mark.
1873 (init_tree): Use gengtype to mark trees.
1874
1875 * Make-lang.in (cp/decl.o): Add debug.h dependency.
1876 * call.c (struct z_candidate): Use gengtype.
1877 (USER_CONV_CAND): Use WRAPPER_ZC.
1878 (convert_class_to_reference): Use build_zc_wrapper.
1879 (build_type_conversion_1): Likewise.
1880 (build_over_call): Use WRAPPER_ZC.
1881 (add_warning): Use build_zc_wrapper.
1882 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
1883 * cp-tree.h (struct lang_identifier): Use gengtype.
1884 (struct template_parm_index_s): Likewise.
1885 (struct ptrmem_cst): Likewise.
1886 (struct tree_binding): Likewise.
1887 (struct tree_overload): Likewise.
1888 (struct tree_srcloc): Likewise.
1889 (struct tree_wrapper): Likewise. Also modify to have a pointer
1890 to struct z_candidate rather than void.
1891 (enum cp_tree_node_structure_enum): New.
1892 (union lang_tree_node): New.
1893 (cxx_mark_tree): Delete prototype.
1894 (cp_tree_node_structure): New prototype.
1895 (build_ptr_wrapper): Delete prototype.
1896 (build_int_wrapper): Delete prototype.
1897 (build_zc_wrapper): New prototype.
1898 * decl.c: Include debug.h
1899 (cxx_mark_tree): Delete.
1900 (cp_tree_node_structure): New.
1901 * tree.c (build_ptr_wrapper): Delete.
1902 (build_int_wrapper): Delete.
1903 (build_zc_wrapper): New.
1904
1905 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1906 Correct typo. Patch from k_fukui@highway.ne.jp.
1907
1908 * semantics.c (current_stmt_tree): Update for change to
1909 struct language_function.
1910 (finish_mem_initializers): Likewise.
1911 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1912 * cp-tree.h (struct language_function): Rename from
1913 cp_language_function. Change all uses.
1914 (cp_function_chain): Don't need to cast.
1915
1916 * class.c (duplicate_tag_error): Reset discriminator.
1917 (check_bases_and_members): Update for data structure changes.
1918 * cp-tree.h (struct lang_id2): Use gengtype.
1919 (flagged_type_tree): Likewise.
1920 (SET_LANG_ID): Use GGC on struct lang_id2.
1921 (struct cp_language_function): Use gengtype. Remove field
1922 'x_vcalls_possible_p'.
1923 (current_vcalls_possible_p): Delete.
1924 (struct lang_type_header): New.
1925 (struct lang_type_class): Rename from struct lang_type. Include
1926 struct lang_type_header.
1927 (struct lang_type_ptrmem): New.
1928 (struct lang_type): New.
1929 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
1930 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
1931 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1932 (struct lang_decl_flags): Use gengtype. Add discriminators.
1933 (struct lang_decl): Use gengtype. Add and use discriminators.
1934 Update the macros that reference moved fields.
1935 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
1936 (SET_DECL_THUNK_P): Set discriminator too.
1937 (clear_inline_text_obstack): Delete prototype.
1938 (finish_inline_definitions): Delete prototype.
1939 (mark_pending_inlines): Delete prototype.
1940 (lang_check_failed): New prototype.
1941 * decl.c (struct named_label_use_list): Use gengtype.
1942 (struct named_label_list): Likewise.
1943 (mark_binding_level): Delete.
1944 (mark_named_label_lists): Delete.
1945 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1946 (cxx_init_decl_processing): Use generated marker routine.
1947 (begin_destructor_body): Delete dead set to
1948 current_vcalls_possible_p.
1949 (mark_lang_function): Delete.
1950 (mark_cp_function_context): Delete.
1951 (lang_mark_tree): Use generated marker routines.
1952 * decl2.c (start_objects): Set discriminator when setting
1953 GLOBAL_INIT_PRIORITY.
1954 * lex.c (retrofit_lang_decl): Set discriminators.
1955 (copy_lang_type): Update for changes to lang_type structure.
1956 (cp_make_lang_type): Set discriminator.
1957 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
1958 * search.c: Include ggc.h.
1959 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1960 (finish_inline_definitions): Delete.
1961 * spew.c (struct token): Use gengtype.
1962 (struct token_chunk): New.
1963 (struct unparsed_text): Use gengtype. Store tokens in chunks.
1964 (struct feed): Use gengtype.
1965 (feed_obstack): Delete.
1966 (feed): Mark as GC root.
1967 (pending_inlines): Mark as GC root.
1968 (pending_inlines_tail): Likewise.
1969 (processing_these_inlines): Likewise.
1970 (token_obstack): Make static.
1971 (first_token): Likewise.
d30d6e7a 1972 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
1973 (clear_inline_text_obstack): Delete.
1974 (feed_input): Use GC for struct feed. Update for changes to
1975 struct unparsed_text.
1976 (mark_pending_inlines): Delete.
1977 (next_token): Rename from add_token. Change all callers. Update
1978 for changes to struct unparsed_text.
1979 (space_for_token): New.
1980 (remove_last_token): New.
1981 (alloc_unparsed_text): New.
1982 (snarf_block): Take an unparsed_text. Update for changes to struct
1983 unparsed_text.
1984 (snarf_method): Update for changes to struct unparsed_text.
1985 (snarf_defarg): Update for changes to struct unparsed_text.
1986 * tree.c (lang_check_failed): New.
1987
1988 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
1989 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
1990 (cp/spew.o): Add dependency on gt-<filename>.h.
1991 (cp/decl2.o): Add dependency on gt-<filename>.h.
1992 (cp/call.o): Add dependency on gt-<filename>.h.
1993 (cp/pt.o): Add dependency on gt-<filename>.h.
1994 (cp/repo.o): Add dependency on gt-<filename>.h.
1995 (cp/parse.o): Add dependency on gt-<filename>.h.
1996 * call.c: Use gengtype for roots.
1997 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
1998 decl2.c parse.y pt.c repo.c spew.c.
1999 * cp-tree.h: Use gengtype for roots.
2000 (struct saved_scope): Use GGC, gengtype.
2001 (cp_parse_init): Delete prototype.
2002 (init_pt): Delete prototype.
2003 * decl.c: Use gengtype for roots.
2004 (mark_saved_scope): Delete.
2005 (cxx_init_decl_processing): Don't call deleted initilisation
2006 routines.
2007 (signed_size_zero_node): Delete, unused.
2008 * decl.h: Use gengtype for roots.
2009 * decl2.c: Use gengtype for roots.
2010 * lex.h: Use gengtype for roots.
2011 * parse.y: Use gengtype for roots.
2012 (cp_parse_init): Delete.
2013 * pt.c: Use gengtype for roots.
2014 (init_pt): Delete.
2015 * repo.c: Use gengtype for roots.
2016 * spew.c: Use gengtype for roots.
2017
2018 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
2019 (cp/decl.o): Add dependency on gtype-cp.h.
2020 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2021 Include gtype-cp.h. Allow for filename changes.
2022
2023 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2024 (cp/decl.o): Add cp/gt-decl.h dependency.
2025 * config-lang.in (gtfiles): New.
2026 * tree.h: Rename struct binding_level to struct cp_binding_level.
2027 * decl.c: Rename struct binding_level to struct cp_binding_level.
2028 Include cp/gt-decl.h.
2029 (struct cp_binding_level): Use gengtype.
2030 (make_binding_level): Use GGC on struct cp_binding_level.
2031 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2032 (cxx_init_decl_processing): Mark free_binding_level as
2033 deletable.
2034
2035 * decl.c (mark_cp_function_context): Update calling sequence.
2036
2037 * decl.c (start_function): Don't free 'struct
2038 cp_language_function'.
2039 (pop_cp_function_context): Likewise.
2040 (save_function_data): Allocate it using GC.
2041 * semantics.c (genrtl_start_function): Don't free 'struct
2042 cp_language_function'.
2043
8b968bd1
MW
20442002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
2045
2046 * lang-specs.h: Use cpp_debug_options.
2047
11ad4784
ZW
20482002-05-28 Zack Weinberg <zack@codesourcery.com>
2049
2050 * mangle.c, tree.c: Include real.h.
2051 * Make-lang.in: Update dependency lists.
2052
81a75f0f
NB
20532002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
2054
2055 * lex.c: Don't include c-lex.h.
2056 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2057
a97d1398
NB
20582002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
2059
2060 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2061
6f001fdf
RH
20622002-05-22 Richard Henderson <rth@redhat.com>
2063
2064 * decl.c (obscure_complex_init): Check for VAR_DECL
2065 before using DECL_THREAD_LOCAL.
2066
7a1f3f5f
RH
20672002-05-22 Richard Henderson <rth@redhat.com>
2068
2069 * decl.c (check_tag_decl): Handle RID_THREAD.
2070 (obscure_complex_init): Reject run-time init of tls.
2071 (grokvardecl, grokdeclarator): Handle RID_THREAD.
2072 * lex.c (reswords): Add __thread.
2073 (rid_to_yy): Map RID_THREAD to SCSPEC.
2074
e5f3b786
NB
20752002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
2076
2077 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2078 * cp-tree.h (cxx_post_options): Kill.
2079 * cp-lex.c (cxx_post_options): Kill.
2080
3d78f2e9
RH
20812002-05-21 Richard Henderson <rth@redhat.com>
2082
2083 * lex.c (rid_to_yy): Add RID_THREAD.
2084
c8a3d889
AO
20852002-05-21 Alexandre Oliva <aoliva@redhat.com>
2086
2087 * init.c (build_vec_init): Test for trivial copy-assignment when
2088 copy-assigning arrays.
2089
500abaa8
AJ
20902002-05-20 Andreas Jaeger <aj@suse.de>
2091
2092 * init.c (build_default_init): Remove unused variable.
2093
ecc42c14
AO
20942002-05-20 Alexandre Oliva <aoliva@redhat.com>
2095
2096 * call.c (any_strictly_viable): New.
2097 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2098
4e664ef1
KL
20992002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2100
2101 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2102
07782718
KL
21032002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2104
2105 PR c++/186, DR 259
2106 * pt.c (do_decl_instantiation): Don't complain explicit
2107 instantiation after explicit specialization.
2108 (do_type_instantiation): Likewise.
2109
23b4deba
AO
21102002-05-19 Alexandre Oliva <aoliva@redhat.com>
2111
2112 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
2113 renamed from...
2114 (complete_type_or_else): ... this. Redefined as macro.
2115 (cxx_incomplete_type_diagnostic): Declare.
2116 (cxx_incomplete_type_error): Define as macro.
2117 * init.c (build_delete): Warn about incomplete types other than
2118 void, and use the built-in operator delete for them.
2119 * typeck.c (complete_type_or_diagnostic): Renamed from
2120 complete_type_or_else. Added warn_only argument, passed to...
2121 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
2122 warnings or errors depending on new warn_only argument. Renamed
2123 from...
2124 (cxx_incomplete_type_error): ... this. New implementation in
2125 terms of cxx_incomplete_type_diagnostic.
2126
b41d214e
JM
21272002-05-18 Jason Merrill <jason@redhat.com>
2128
98c07d7b 2129 PR c++/6611
b41d214e
JM
2130 * decl2.c (import_export_decl): If we clear
2131 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2132
e2005c8d
KL
21332002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2134
2135 PR c++/6620
2136 * pt.c (verify_class_unification): Don't check if PARM is template
2137 parameter dependent. Simplify.
2138 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
2139 parameter dependent expression.
2140
ff48be5c
JM
21412002-05-14 Jason Merrill <jason@redhat.com>
2142
2143 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
2144 Do set DECL_COMDAT.
2145 (synthesize_tinfo_var): Take the public decl.
2146 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
2147 (emit_tinfo_decl): Adjust. Call import_export_decl.
2148 * decl2.c (import_export_decl): Simplify tinfo decl handling.
2149
94e6e4c4
AO
21502002-05-14 Alexandre Oliva <aoliva@redhat.com>
2151
2152 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 2153 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
2154 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
2155 * class.c (check_field_decls): Test non_zero_init.
2156 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
2157 zero-to-NULL conversions.
2158 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
2159 type that needs zero-initialization without zeros.
2160 (check_initializer_decl): Compute zero-initializer for types
2161 that require a non-trivial one.
2162 * init.c (build_forced_zero_init): New function.
2163 (build_default_init): Use it.
2164 * tree.c (zero_init_p): New function.
2165 * typeck2.c (force_store_init_value): New function.
2166 (process_init_constructor): Create non-trivial zero-initializers
2167 for array members and class fields.
2168
e5f5feea
NB
21692002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
2170
2171 * lang-specs.h: Remove redundant -lang-c++.
2172
f63ab951
JM
21732002-05-13 Jason Merrill <jason@redhat.com>
2174
2175 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
2176 (fixed_type_or_null): See through reference vars.
2177 (build_base_path): Vtable contents are constant.
2178 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2179
0d08ea48
JM
21802002-05-12 Jason Merrill <jason@redhat.com>
2181
2182 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
2183 structs are safe.
2184
3df89291
NB
21852002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
2186
2187 * cp-tree.h (flag_ansi): Remove.
2188 * decl2.c (flag_ansi): Remove.
2189 (cxx_decode_option): Set flag_iso and flag_undef.
2190
c87978aa
JM
21912002-05-09 Jason Merrill <jason@redhat.com>
2192
2193 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
2194 Use subtraction rather than a bitmask to get the index.
2195 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
2196
2197 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
2198
a5a49440
NB
21992002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
2200
2201 * Make-lang.in (decl2.o): Update.
2202 * cp-tree.h (warn_multichar): Remove.
2203 * decl2.c: Include c-common.h.
2204 (warn_multichar): Remove.
2205
609688f3
JM
22062002-05-03 Jason Merrill <jason@redhat.com>
2207
0abc082a
JM
2208 * tree.c (build_cplus_array_type): Only const and volatile get
2209 special handling.
2210
609688f3
JM
2211 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
2212
8b16faa2
MM
22132002-04-30 Mark Mitchell <mark@codesourcery.com>
2214
394ab947 2215 ABI change, returning simple classes from functions.
8b16faa2
MM
2216 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
2217 TYPE_HAS_TRIVIAL_INIT_REF is false or
2218 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
2219
ac905924
JM
22202002-04-30 Jason Merrill <jason@redhat.com>
2221
2cb008af 2222 PR debug/6436
ac905924
JM
2223 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
2224 anonymous class with a typedef if there are attributes.
2225
e6e81f1c 22262002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 2227
e6e81f1c 2228 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 2229
3a73bffb
JJ
22302002-04-29 Jakub Jelinek <jakub@redhat.com>
2231
2232 PR c++/6477
2233 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
2234 non-NULL first.
2235
33dd07ee
MM
22362002-04-29 Mark Mitchell <mark@codesourcery.com>
2237
2238 PR c++/6492
2239 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
2240 enter that scope before name lookup.
2241
2242 PR c++/6486
2243 * method.c (do_build_copy_constructor): Avoid building
2244 cv-qualified reference types.
500abaa8 2245
4bd7c270
NS
22462002-04-29 Nathan Sidwell <nathan@codesourcery.com>
2247
2248 PR c++/5719
500abaa8 2249 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
2250 by value. operator% should.
2251
45806a3f
FS
22522002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2253
2254 PR c/6343
2255 * decl.c (duplicate_decls): Call merge_weak.
2256
94a50397
RH
22572002-04-26 Richard Henderson <rth@redhat.com>
2258
2259 * parse.y (malloced_yyss, malloced_yyvs): New.
2260 (yyoverflow): Re-add. Set them.
2261 (free_parser_stacks): New.
2262
7d793e9b
MM
22632002-04-26 Mark Mitchell <mark@codesourcery.com>
2264
2265 PR c++/6497
2266 * method.c (do_build_assign_ref): Pass a derivation to
2267 build_method_call when calling base class assignment operators.
2268
bde3c0c0
RH
22692002-04-26 Richard Henderson <rth@redhat.com>
2270
2271 * parse.y (yyoverflow): Revert.
2272
b84a3874
RH
22732002-04-26 Richard Henderson <rth@redhat.com>
2274
2275 PR c/3581
2276 * parse.y (string): Remove. Update all uses to use STRING
2277 instead, and not call combine_strings.
2278 * rtti.c (tinfo_name): Use fix_string_type.
2279 * semantics.c (finish_asm_stmt): Don't call combine_strings.
2280 * spew.c (yylexstring): New.
2281 (read_token): Use it.
2282
6052bef0
RH
22832002-04-25 Richard Henderson <rth@redhat.com>
2284
2285 PR c/2161
2286 * parse.y (yyoverflow): New.
2287
8d1f0f67
JM
22882002-04-25 Jason Merrill <jason@redhat.com>
2289
2290 PR c++/5607
2291 * search.c (check_final_overrider): No longer static.
2292 * class.c (update_vtable_entry_for_fn): Call it.
2293 * cp-tree.h: Adjust.
2294
ff45c01e
NB
22952002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
2296
2297 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2298 * cp-tree.h (cxx_set_yydebug): Die.
2299 * lex.c (YYDEBUG): Get from c-lex.h.
2300 (cxx_set_yydebug): Remove.
2301 * parse.y: Include c-lex.h.
2302 (YYDEBUG): Get from c-lex.h.
2303
a62d375f
MM
23042002-04-24 Mark Mitchell <mark@codesourcery.com>
2305
2306 PR c++/6438.
2307 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
2308 void.
2309
349ae713
NB
23102002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
2311
2312 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
2313 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
2314 Redefine.
2315 * cp-tree.h (cp_attribute_table): Rename.
2316 * decl.c (lang_attribute_table): Remove declaration.
2317 (cxx_init_decl_processing): Don't set it.
2318 * tree.c (cp_attribute_table): Rename.
2319
b602511f
JM
23202002-04-24 Jason Merrill <jason@redhat.com>
2321
985723ce
JM
2322 PR c++/6331
2323 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
2324 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
2325 The pedwarn for array assignment is now unconditional.
2326 * tree.c (build_cplus_array_type_1): Still process simple array types
2327 normally in templates.
985723ce 2328
b602511f
JM
2329 PR c++/6395
2330 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
2331 stuff for comdats.
2332
29cece2e
JJ
23332002-04-23 Jakub Jelinek <jakub@redhat.com>
2334
2335 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
2336 node with attributes.
2337
515387dc
DB
23382002-2-23 David O'Brien <obrien@FreeBSD.org>
2339
2340 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
2341 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
2342
77adef84
MM
23432002-04-23 Mark Mitchell <mark@codesourcery.com>
2344
2345 PR c++/6256:
2346 * pt.c (tsubst_friend_class): Handle templates with explicit
2347 nested names.
2348
2349 PR c++/6331:
2350 * typeck.c (merge_types): Remember the cv-qualification of pointer
2351 types when merging them.
2352
b03e38e1
NB
23532002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
2354
2355 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
2356 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
2357 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
2358 cxx_mark_function_context): New.
2359 * decl.c (push_cp_function_context, pop_cp_function_context,
2360 mark_cp_function_context): Rename for consistency.
2361 (cxx_init_decl_processing): Don't set old hooks.
2362
ab393bf1
NB
23632002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
2364
2365 * call.c (convert_type_from_ellipsis): Rename, update.
2366 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
2367 * cp-tree.h (convert_type_from_ellipsis): Rename.
2368 * decl.c (cxx_init_decl_processing): Don't set hook.
2369
7a228918
NB
23702002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
2371
2372 * call.c (build_new_method_call): Update.
2373 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
2374 * cp-tree.h (cxx_incomplete_type_error): New.
2375 * decl.c (grokdeclarator, grokparms): Update.
2376 * decl2.c (check_classfn): Update.
2377 * pt.c (tsubst): Update.
2378 * typeck.c (complete_type_or_else, expr_sizeof,
2379 decay_conversion): Update.
2380 * typeck2.c (incomplete_type_error): Rename.
2381 (add_exception_specifier): Update.
2382
8152c320
JM
23832002-04-18 Jason Merrill <jason@redhat.com>
2384
2385 PR c++/5658
2386 * search.c (setup_class_bindings): A class template qualifies as a
2387 type binding.
2388
32121b96
JJ
23892002-04-17 Jakub Jelinek <jakub@redhat.com>
2390
2391 PR c++/6316
2392 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
2393 before expanding.
2394
b2123dc0
MM
23952002-04-16 Mark Mitchell <mark@codesourcery.com>
2396
2397 * init.c (begin_init_stmts): Remove commented out code.
2398 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
2399 * semantics.c (begin_gobal_stmt_expr): Adjust call to
2400 expand_start_stmt_expr.
500abaa8 2401
0f268005
MM
24022002-04-15 Mark Mitchell <mark@codesourcery.com>
2403
2404 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
2405 dso_handle itself, to __cxa_atexit.
2406
bd6bec6b
GDR
24072002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2408
2409 * error.c (cxx_print_error_function): Adjust call to macros.
2410
0f490a2b
JJ
24112002-04-14 Jakub Jelinek <jakub@redhat.com>
2412
2413 * class.c (layout_virtual_bases): Do all dsize computation on trees.
2414
85b7def6
JM
24152002-04-14 Jason Merrill <jason@redhat.com>
2416
2417 * typeck.c (get_member_function_from_ptrfunc): Don't do
2418 gratuitious division and multiplication on
2419 ptrmemfunc_vbit_in_delta targets.
2420
0481bc21
MM
24212002-04-12 Mark Mitchell <mark@codesourcery.com>
2422
2423 PR c++/5373.
2424 * semantics.c (finish_expr_stmt): Remember the type of the
2425 expression before any conversions are performed.
2426
9928a3d5
MM
24272002-04-12 Mark Mitchell <mark@codesourcery.com>
2428
2429 PR c++/5189.
2430 * call.c (add_template_candidate_real): Do not treat member
2431 templates as copy constructors.
2432
c740732f
MM
24332002-04-12 Mark Mitchell <mark@codesourcery.com>
2434
2435 * decl.c (duplicate_decls): Do not copy the RTL for a variable
2436 declaration if the old variable had an incomplete type and the new
2437 variable does not.
2438 (complete_vars): Do not call layout_decl for completed variables.
2439
4782bd5b
RS
24402002-04-12 Richard Sandiford <rsandifo@redhat.com>
2441
2442 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
2443 with an explicit one.
2444 (follow_tag_typedef): New.
2445 (lookup_tag): Use it to extract the tag of an explicit typedef.
2446 (xref_tag): Likewise.
2447
2f4d058f
AH
24482002-04-11 Andrew Haley <aph@redhat.com>
2449
2450 * typeck.c (type_after_usual_arithmetic_conversions):
2451 If two types have the same variant, return immediately.
500abaa8 2452 When two floating-point operands are the same precision:
2f4d058f
AH
2453 convert to float if one of the operands is float;
2454 if neither operand is one of the standard types, return the type
2455 of the first operand.
500abaa8 2456
ba3307c0
NS
24572002-04-10 Nathan Sidwell <nathan@codesourcery.com>
2458
2459 PR c++/5507
2460 * decl.c (make_typename_type): Remove implicit typenameness.
2461
cd6af0c1
JM
24622002-04-09 Jason Merrill <jason@redhat.com>
2463
edf5cd1d
JM
2464 PR optimization/6189
2465 * semantics.c (genrtl_start_function): Don't free
2466 DECL_SAVED_FUNCTION_DATA for inline functions.
2467
cd6af0c1
JM
2468 * init.c (build_member_call): For now, don't convert to
2469 intermediate base if it would cause an error.
2470
224e6091
PC
24712002-04-08 Paolo Carlini <pcarlini@unitus.it>
2472
2473 * parse.y (namespace_qualifier, maybe_identifier,
2474 begin_explicit_instantiation, end_explicit_instantiation,
2475 apparent_template_type, .finish_template_type,
2476 do_id, maybe_init, defarg_again, component_decl_1):
2477 Add ending ';', in accordance with POSIX.
2478
0154eaa8
MM
24792002-04-06 Mark Mitchell <mark@codesourcery.com>
2480
2481 PR c++/5571
2482 * class.c (layout_class_type): Remember incomplete static
2483 variables.
2484 (finish_struct_1): Call complete_vars, not
2485 hack_incomplete_structures.
2486 * cp-tree.h (hack_incomplete_structures): Rename to ...
2487 (complete_vars): ... this.
2488 (struct saved_scope): Remove incomplete.
2489 (namespace_scope_incomplete): Remove.
2490 * decl.c (struct binding_level): Remove incomplete.
2491 (incomplete_vars): New variable.
2492 (mark_binding_level): Don't mark incomplete.
2493 (print_binding_level): Don't print it.
2494 (mark_saved_scope): Don't mark incomplete.
2495 (pushdecl): Use maybe_register_incopmlete_var.
2496 (cxx_init_decl_processing): Register incomplete_vars for GC.
2497 (start_decl_1): Clarify error message.
2498 (hack_incomplete_vars): Remove.
2499 (maybe_register_incomplete_var): New function.
2500 (complete_vars): Likewise.
2501
f62ea157
JM
25022002-04-06 Jason Merrill <jason@redhat.com>
2503
03da5286
JM
2504 PR c++/4934
2505 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
2506 set before checking it.
2507
a29e1034
JM
2508 PR c++/525
2509 * init.c (build_member_call): Use build_scoped_ref.
2510 (resolve_offset_ref): Likewise.
2511 * call.c (build_scoped_method_call): Likewise.
500abaa8 2512 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
2513 wrong.
2514 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
2515 * cp-tree.h: Adjust.
500abaa8 2516
a29e1034
JM
2517 * init.c (push_base_cleanups): Just use build_scoped_method_call.
2518
f62ea157 2519 PR c++/6179
500abaa8 2520 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
2521 synthesize_exception_spec.
2522
78ef5b89
NB
25232002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
2524
2525 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2526 * cvt.c: Update comment.
2527 * init.c (expand_cleanup_for_base): Update.
2528 * semantics.c (finish_parenthesized_expr): Update.
2529 * typeck.c (cp_truthvalue_conversion): Update.
2530
dffa4176
JM
25312002-04-04 Jason Merrill <jason@redhat.com>
2532
659e5a7a
JM
2533 * semantics.c (finish_eh_cleanup): New fn.
2534 * cp-tree.h: Add prototype.
500abaa8 2535 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
2536 finish_eh_cleanup.
2537 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
2538 * cp-tree.h: Remove references.
2539 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
2540 * dump.c (cp_dump_tree): Likewise.
2541 * pt.c (tsubst_expr): Likewise.
2542 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
2543 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
2544 * tree.c (cp_statement_code_p): Likewise.
2545
2546 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
2547
2548 PR c++/5636
2549 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
2550 cleanup for nrv.
2551
dffa4176
JM
2552 PR c++/5104
2553 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
2554 specifiers.
2555 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
2556
ef4f94ac
RH
25572002-04-03 Richard Henderson <rth@redhat.com>
2558
2559 * cp-lang.c (cxx_warn_unused_global_decl): New.
2560 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
2561
599bba86
NB
25622002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
2563
2564 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
2565 * tree.c (init_tree): Don't set hook.
2566
cba2004a
RS
25672002-04-03 Roger Sayle <roger@eyesopen.com>
2568
2569 PR c++/5998:
2570 * decl.c (duplicate_decls): Don't mess with assembler names when
2571 redeclaring builtin functions as static.
2572
dffd7eb6
NB
25732002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2574
2575 * call.c (build_addr_func): Update.
2576 * class.c (resolve_address_of_overloaded_function): Update.
2577 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2578 * cp-tree.h (cxx_mark_addressable): New.
2579 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
2580 * decl2.c (build_cleanup): Update.
2581 * except.c (build_throw): Update.
2582 * init.c (resolve_offset_ref): Update.
2583 * pt.c (convert_nontype_argument): Update.
2584 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
2585 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
2586 unary_complex_lvalue): Update.
2587 (mark_addressable): Rename.
2588
04a9d080
RS
25892002-04-01 Roger Sayle <roger@eyesopen.com>
2590
2591 PR c++/5998:
2592 * decl.c (duplicate_decls): Overwrite the RTL when (and only
2593 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
2594 but follow the SET_DECL_RTL idiom used elsewhere in the function.
2595
ceef8ce4
NB
25962002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2597
2598 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2599 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2600 * decl.c (grokdeclarator): Update.
2601 * mangle.c (write_integer_cst): Update.
2602 * typeck.c (build_binary_op): Update.
2603
48a7a235
NB
26042002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
2605
2606 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
2607 * lex.c (cxx_init): Don't set hook.
2608
7cb32822
NB
26092002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
2610
2611 * Make-lang.in (error.o): Update.
2612 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2613 * cp-tree.h (struct diagnostic_context): Predeclare.
2614 (cxx_print_error_function): New.
2615 * error.c: Include langhooks-def.h.
2616 (lang_print_error_function): Rename. Update.
2617 (init_error): Don't set hook.
2618
b0c48229
NB
26192002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
2620
2621 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
2622 Redefine.
2623 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
2624 * decl.c (finish_enum): Similarly.
2625 * error.c (dump_type): Similarly.
2626 * lex.c (cxx_init): Similarly.
2627 * mangle.c (write_builtin_type): Similarly.
2628 * typeck.c (comptypes): Similarly.
2629
d52e4867
RS
26302002-03-28 Roger Sayle <roger@eyesopen.com>
2631
2632 PR c++/5998:
2633 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
2634 in the g++ front-end.
2635 (duplicate_decl): Allow redefinition of anticipated built-ins.
2636 Fix inlining problem by over-writing the old DECL_RTL.
2637 (lookup_namespace_name): Fail to find an identifier in the
2638 specified namespace if its still anticipated.
2639 (builtin_function_1): New function split out from builtin_function
2640 to create a builtin in the current namespace with given context.
2641 (builtin_function): Call builtin_function_1 to define the
2642 appropriate builtins in both the std and global namespaces.
2643 (select_decl): Don't test for anticipated decls here.
2644 (unqualified_namespace_lookup): Instead ignore them whilst
2645 searching through scopes and namespaces.
2646 * decl2.c (do_nonmember_using_decl): If a using declaration
2647 specifies an anticipated built-in function, mark it as no longer
2648 anticipated in that scope.
2649 (ambiguous_decl): Avoid resolving to an anticipated decl.
2650 * lex.c (do_scoped_id): Fail to find an identifier in the global
2651 namespace if its still anticipated.
2652
f1e639b1
NB
26532002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
2654
2655 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
2656 * cp-tree.h (cp_make_lang_type): Rename.
2657 * lex.c (cp_make_lang_type): Rename.
2658 (make_aggr_type): Update.
2659 * tree.c (init_tree): Don't set make_lang_type_fn.
2660
c7f4981a
JJ
26612002-03-29 Jakub Jelinek <jakub@redhat.com>
2662
2663 PR c++/6073
2664 * class.c (finish_struct_1): Update static field's DECL_MODE even
2665 if its type is a variant of t.
2666
7ffb4fd2
NB
26672002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
2668
2669 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
2670 * cp-tree.h (cxx_insert_default_attributes): New.
2671 * decl.c (insert_default_attributes): Rename.
2672
cd4e8331
MM
26732002-03-27 Mark Mitchell <mark@codesourcery.com>
2674
2675 PR c++/4884
2676 * call.c (build_op_delete_call): Allow for the fact the placement
2677 may be a COMPOUND_EXPR.
500abaa8 2678
c9d892a8
NB
26792002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
2680
2681 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
2682 * cp-tree.h (init_cplus_expand): Remove.
2683 (cxx_expand_expr): New.
2684 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
2685 fix prototype.
2686 (init_cplus_expand): Remove.
2687 * lex.c (cxx_init): Don't call init_cplus_expand.
2688
46ff5047
MM
26892002-03-26 Mark Mitchell <mark@codesourcery.com>
2690
2691 PR c++/4884.
2692 * init.c (build_new_1): Allow for the fact the result of
2693 build_function_call may be a COMPOUND_EXPR.
2694
6d4c57a0
NS
26952002-03-26 Nathan Sidwell <nathan@codesourcery.com>
2696
2697 PR c++/5682
2698 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
2699 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
2700 (dfs_skip_nonprimary_vbases_markedp): Remove.
2701 * search.c (get_shared_vbase_if_not_primary): Remove.
2702 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
2703 (dfs_skip_nonprimary_vbases_markedp): Remove.
2704 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
2705 (dfs_marked_real_bases_queue_p): Likewise.
2706
4f0ade92
NB
27072002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
2708
2709 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2710 * cp-tree.h (cxx_mark_tree): New.
2711 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
2712
c88770e9
NB
27132002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
2714
2715 * cp-tree.h (cxx_maybe_build_cleanup): New.
2716 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
2717 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
2718 * tree.c (build_target_expr): Update.
7b3e5198 2719 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 2720
aaf93206
NB
27212002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
2722
2723 * decl2.c (cxx_decode_option): Handle -E.
2724 * lang-specs.h (default_compilers): Preprocess with cc1plus.
2725 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
2726
e756a7da
JJ
27272002-03-23 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR c++/6037
2730 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
2731
ea9264e9
GDR
27322002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2733
2734 * error.c (dump_type): Be careful about implicit typenames.
2735
acb044ee
GDR
27362002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2737
2738 PR C++/3656
2739 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 2740 classes.
acb044ee 2741
b216cd4a
ZW
27422002-03-22 Zack Weinberg <zack@codesourcery.com>
2743
2744 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
2745 REAL_IS_NOT_DOUBLE.
2746
9181f8db
JK
27472002-03-22 Jeff Knaggs <jknaggs@redhat.com>
2748
cd6af0c1
JM
2749 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
2750 an index into the vtable_entry array regardless of
9181f8db
JK
2751 TARGET_PTRMEMFUNC_VBIT_LOCATION.
2752
e019cf95
AH
27532002-03-21 Aldy Hernandez <aldyh@redhat.com>
2754
84d901be 2755 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 2756
43577e6b
NB
27572002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
2758
2759 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
2760 insert_block, getdecls, global_bindings_p): New.
2761
8c152bad
NS
27622002-03-20 Nathan Sidwell <nathan@codesourcery.com>
2763
2764 PR c++/4361
2765 * mangle.c (struct globals) Add internal_mangling_p member.
2766 (write_template_param): Do internal mangling, if needed.
2767 (mangle_conv_op_name_for_type): Request internal mangling.
2768
e3fe84e5
JM
27692002-03-20 Jason Merrill <jason@redhat.com>
2770
2771 PR c++/2136
2772 * init.c (build_delete): Check access for a member op delete here.
2773 * decl2.c (delete_sanity): Not here.
2774
ea122333
JM
27752002-03-19 Jason Merrill <jason@redhat.com>
2776
2777 PR c++/5118
2778 * class.c (get_vfield_name): Use the constructor_name.
2779
7afff7cf
NB
27802002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
2781
2782 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
2783 * cp-tree.h (lang_printable_name): Rename.
2784 * error.c (lang_decl_name): Use new hook.
2785 * lex.c (cxx_init): Remove old hook.
2786 * pt.c (tsubst_decl): Use new hook.
2787 * tree.c (lang_printable_name): Rename.
2788
ff77ac85
EB
27892002-03-18 Eric Botcazou <ebotcazou@multimania.com>
2790
2791 PR c++/3882
2792 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
2793 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
2794 only after recording the declaration.
2795
ffd696af
JM
27962002-03-18 Jason Merrill <jason@redhat.com>
2797
097955f2
JM
2798 PR c++/2039
2799 * init.c (resolve_offset_ref): Hand off to build_component_ref.
2800
b663bcf3
JM
2801 PR c++/4222, c++/5995
2802 * call.c (build_over_call): Fix empty class logic.
2803
0f4237c2
JM
2804 PR c++/3870
2805 * cp-tree.h (struct saved_scope): Add last_parms field.
2806 * decl.c (maybe_push_to_top_level): Save last_function_parms.
2807 (pop_from_top_level): Restore it.
2808
001ad76c
JM
2809 PR c++/4377
2810 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
2811 NON_LVALUE_EXPRs.
2812
2813 PR c++/4003
ed2fa432
JM
2814 * pt.c (tsubst_friend_function): Use decl_namespace_context.
2815
ffd696af
JM
2816 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
2817 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
2818 type with a nontrivial destructor.
2819
f2606a97
JM
28202002-03-17 Jason Merrill <jason@redhat.com>
2821
2822 PR c++/4460
2823 * class.c (build_base_path): Virtual base layout is fixed in
2824 in-charge [cd]tors.
2825
52dabb6c
NB
28262002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
2827
2828 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2829 * parse.y (yyparse): Remove macro.
2830
beb9c8a2
JM
28312002-03-17 Jason Merrill <jason@redhat.com>
2832
2833 PR c++/5757
2834 * init.c (build_new_1): Pass the right pointer to op delete.
2835
5dd236e2
NS
28362002-03-16 Nathan Sidwell <nathan@codesourcery.com>
2837
2838 PR c++/4361
2839 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
2840 conversion operators go.
2841 (struct lang_decl_flags): Add template_conv_p and unused
2842 bitfields.
2843 (DECL_TEMPLATE_CONV_FN_P): New macro.
2844 * call.c (build_user_type_conversion_1): Don't check second type
2845 conversion of overload set first.
2846 * class.c (add_method): Make sure templated conversion operators
2847 all end up on slot 2.
2848 * lex.c (do_identifier): A conversion operator token might be
2849 satisfied by a templated conversion operator.
5dd236e2
NS
2850 * pt.c (check_explicit_specialization): Use
2851 CLASSTYPE_FIRST_CONVERSION_SLOT.
2852 (template_parm_this_level_p): New function.
2853 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 2854 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
2855 the first slot.
2856 * typeck.c (build_component_ref): Preserve the type of an
2857 conversion operator name on the overload type.
2858 (build_x_function_call): Retrieve the conversion operator name.
2859
0ba20759
RH
28602002-03-15 Richard Henderson <rth@redhat.com>
2861
2862 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2863
6e4ae815
MM
28642002-03-15 Mark Mitchell <mark@codesourcery.com>
2865
2866 * cp-tree.h (CLEANUP_DECL): Remove.
2867 (CLEANUP_EXPR): Likewise.
2868 * decl.c (destroy_local_var): Simplify.
2869 (maybe_build_cleanup): Tidy.
2870 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
2871 * semantics.c (cp_expand_stmt): Likewise.
2872 * cp/tree.c (cp_statement_code_p): Likewise.
2873
5cc90635
JM
28742002-03-15 Jason Merrill <jason@redhat.com>
2875
6da794e8
JM
2876 PR c++/5857
2877 * decl.c (duplicate_decls): Use merge_types instead of common_type.
2878 * typeck.c (common_type): Just hand off to
2879 type_after_usual_arithmetic_conversions and
2880 composite_pointer_type.
2881 (merge_types): New fn.
2882 (commonparms): Use it instead of common_type.
2883 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
2884 (composite_pointer_type): Also handle attributes.
2885 * cp-tree.h: Declare merge_types.
2886
5cc90635
JM
2887 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
2888 variables.
2889 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
2890
ecb0eece
RH
28912002-03-14 Richard Henderson <rth@redhat.com>
2892
2893 * decl.c: Include c-pragma.h.
2894 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
2895 * Make-lang.in: Update dependencies.
2896
d3f129b3
JJ
28972002-03-14 Jakub Jelinek <jakub@redhat.com>
2898
f6562b37 2899 PR c++/5908
d3f129b3
JJ
2900 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2901 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2902
049e6879
RS
29032002-03-12 Richard Sandiford <rsandifo@redhat.com>
2904
2905 * mangle.c (write_builtin_type): Handle 128-bit integers even if
2906 they are not a standard integer type.
2907
872c9284
RS
29082002-03-12 Richard Sandiford <rsandifo@redhat.com>
2909
2910 * cp-tree.h (init_init_processing): Remove declaration.
2911 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2912 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2913
2f9834e8
KG
29142002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2915
2916 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2917 Define.
2918 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2919 tree_code_length.
2920 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2921 cplus_tree_code_name): Delete.
2922 (cxx_init): Don't call add_c_tree_codes, instead set
2923 lang_unsafe_for_reeval. Don't try to copy into the various
2924 tree_code arrays.
2925
df867456
NS
29262002-03-12 Nathan Sidwell <nathan@codesourcery.com>
2927
2928 PR c++/5659
2929 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2930 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2931 definitions.
2932
ab04e34b
NS
29332002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2934
2935 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
2936 DR209 is now not a defect.
2937 * cp-tree.h (skip_type_access_control): Remove.
2938 * decl.c (grokdeclarator): Do type access control for friend
2939 declarations.
2940 * semantics.c (decl_type_access_control): Don't reset
2941 current_type_lookups.
2942 (save_type_access_control): Always save the lookups.
2943 (skip_type_access_control): Remove.
2944 (finish_class_definition): Don't change type_lookups.
2945
999cc24c
NS
29462002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2947
2948 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
2949 It is incorrect.
2950 * typeck.c (build_static_cast): Compare non-qualified types
2951 with pointer to member conversions.
2952
61eece67
DN
29532002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
2954 Daniel Berlin <dan@dberlin.org>
2955
2956 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2957 (cxx_get_alias_set): Use it.
2958
644d28d4
KG
29592002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2960
2961 * cp-tree.h (stabilize_expr): Prototype.
2962
7e326356
CR
29632002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
2964
2965 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2966 conditional return void.
2967
24965e7a
NB
29682002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
2969
2970 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2971 * cp-tree.h (cxx_unsave): New.
2972 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2973 (init_tree): Update.
2974
ca7558fc
KG
29752002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2976
2977 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2978 explicit sizeof/sizeof.
2979 * decl2.c (cxx_decode_option): Likewise.
2980 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2981
fd87b7a7
NS
29822002-03-02 Nathan Sidwell <nathan@codesourcery.com>
2983
2984 PR c++/775
2985 * decl.c (lookup_tag): Only reject enum/class mismatch, not
2986 class/union mismatch.
2987 * parse.y (check_class_key): New function.
2988 (structsp): Call it.
2989
bfba94bd
MM
29902002-03-01 Michael Matz <matz@suse.de>
2991
2992 * typeck.c (cp_pointer_int_sum): Complete inner type which is
2993 used later by size_in_bytes().
2994
fdc9bf29
PE
29952002-03-01 Phil Edwards <pme@gcc.gnu.org>
2996
2997 * cp-tree.h: Require __GNUC__ to be #defined.
2998 (build_init): Add missing prototype.
2999
6f30f1f1
JM
30002002-03-01 Jason Merrill <jason@redhat.com>
3001
3002 * except.c: Don't include decl.h or obstack.h. Do include
3003 tree-inline.h.
3004 (build_throw): Destroy temporaries from the thrown
500abaa8 3005 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
3006 temporary directly into the exception object.
3007 (stabilize_throw_expr): New function.
3008 (wrap_cleanups_r): New function.
3009 * tree.c (stabilize_expr): New function.
3010 * init.c (build_init): New function.
3011 * Make-lang.in (cp/except.o): Adjust .h deps.
3012
46cfb101
JM
30132002-02-28 Jason Merrill <jason@redhat.com>
3014
07f521fc
JM
3015 * search.c (lookup_base_r): Don't clear is_non_public just because
3016 we found a friendly scope.
3017
46cfb101
JM
3018 * decl.c (finish_function): Only warn about missing return
3019 statement with -Wreturn-type.
3020
63e1b1c4
NB
30212002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
3022
3023 * class.c (build_clone): Update.
3024 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3025 * cp-tree.h (cxx_dup_lang_specific_decl): New.
3026 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3027 (copy_decl): Update.
3028 * method.c (make_thunk): Update.
3029
f458d1d5
ZW
30302002-02-27 Zack Weinberg <zack@codesourcery.com>
3031
3032 * decl2.c: Delete traditional-mode-related code copied from
3033 the C front end but not used, or used only to permit the
3034 compiler to link.
3035
500abaa8 30362002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
3037
3038 PR c++/4093
3039 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3040 to void.
3041
25c8b645
JJ
30422002-02-22 Jakub Jelinek <jakub@redhat.com>
3043
3044 PR other/5746
3045 * semantics.c (finish_switch_cond): Don't call get_unwidened
3046 if error_mark_node.
3047
4f2b0fb2
NS
30482002-02-22 Nathan Sidwell <nathan@codesourcery.com>
3049
3050 PR c++/2645, DR 295
3051 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3052 tf_keep_type_decl.
3053 (make_typename_type): Use tsubst_flags_t.
3054 * decl.c (make_typename_type): Adjust. Return non-artificial
3055 TYPE_DECLs, if required.
3056 (grokdeclarator): Simplify CVR qualification handling. Allow bad
3057 qualifiers on typedef types.
3058 * decl2.c (handle_class_head): Adjust make_typename_type call.
3059 * parse.y (nested_name_specifier): Likewise.
3060 (typename_sub0): Likewise.
3061 (typename_sub1): Likewise.
3062 * pt.c (convert_template_argument): Adjust make_typename_type
3063 return value.
3064 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 3065 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
3066 on template type parms.
3067 (instantiate_decl): Recheck substitutions to give warnings on bad
3068 qualifications.
3069 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3070
8fc2ba41
AH
30712002-02-21 Aldy Hernandez <aldyh@redhat.com>
3072
84d901be 3073 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 3074
84d901be
AD
3075 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3076 unless DECL_ALWAYS_INLINE.
8fc2ba41 3077
7552da58
JJ
30782002-02-20 Jakub Jelinek <jakub@redhat.com>
3079
3080 * typeck.c (cp_pointer_int_sum): Renamed from
3081 pointer_int_sum, call pointer_int_sum.
3082
00fae85d
JJ
30832002-02-20 Jakub Jelinek <jakub@redhat.com>
3084
3085 * decl.c (duplicate_decls): Return 0 if issued error about
3086 redeclaration.
3087
6ea868b7
JM
30882002-02-19 Jason Merrill <jason@redhat.com>
3089
500abaa8 3090 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
3091 M1AKFvvE, not MK1AFvvE.
3092 * mangle.c (write_function_type): Write cv-quals for member
3093 function type here.
3094 (write_pointer_to_member_type): Not here.
3095
c02f5e29
JM
30962002-02-18 Jason Merrill <jason@redhat.com>
3097
3098 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3099 (do_decl_instantiation): Likewise.
3100
624a5800
CR
31012002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
3102
3103 PR c++/5685
3104 * decl.c (duplicate_decls): Make warning unconditional
3105 if duplicate default argument declarations are present.
3106
f6f8ada3
JJ
31072002-02-17 Jakub Jelinek <jakub@redhat.com>
3108
3109 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3110 shortening.
3111
8d6e459d
NS
31122002-02-15 Nathan Sidwell <nathan@codesourcery.com>
3113
3114 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
3115 remove incorrect comment. Move #if 0'd code to common path. Use
3116 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
3117
ca4feb54
JM
31182002-02-13 Jason Merrill <jason@redhat.com>
3119
57d5032b
JM
3120 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3121 (finish_function): Don't warn if current_function_returns_null.
3122
bb26522d
JM
3123 * typeck2.c (digest_init): Do handle values of vector type.
3124
ca4feb54
JM
3125 * typeck2.c (digest_init, process_init_constructor): Treat vectors
3126 like arrays.
3127
e6b9638b
JM
31282002-02-11 Jason Merrill <jason@redhat.com>
3129
3130 * parse.y (reserved_declspecs): Don't handle attributes.
3131 (reserved_typespecquals): Handle them here.
3132 * Make-lang.in (parse.c): Adjust expected conflicts.
3133
1cf537c5
JJ
31342002-02-08 Jakub Jelinek <jakub@redhat.com>
3135
3136 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
3137 instead of compstmt.
3138 (compstmt_or_stmtexpr): Renamed from compstmt.
3139 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
3140
c2ea3a40
NS
31412002-02-07 Nathan Sidwell <nathan@codesourcery.com>
3142
3143 Rename instantiate_type_flags to tsubst_flags_t & expand use.
3144 * cp-tree.h (instantiate_type_flags): Rename to ...
3145 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
3146 add tf_warning flag.
3147 (instantiate_type): Adjust prototype.
3148 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
3149 do_type_instantiation, cp_build_qualified_type_real): Likewise.
3150 cp_build_qualified_type: Adjust.
3151 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
3152 tf_*.
3153 * call.c (standard_conversion): Rename itf_* to tf_*.
3154 (reference_binding): Likewise.
3155 (convert_like_real): Likewise.
3156 * cvt.c (cp_convert_to_pointer): Likewise.
3157 (convert_to_reference): Likewise.
3158 * decl.c (lookup_namespace_name): Use tf_* flags.
3159 (make_typename_type): Likewise.
3160 (grokdeclarator): Likewise.
3161 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
3162 (coerce_template_template_parms, convert_template_argument,
3163 coerce_template_parms, maybe_get_template_decl_from_type_decl,
3164 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
3165 instantiate_class_template, tsubst_template_arg_vector,
3166 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 3167 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 3168 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 3169 instantiate_template, fn_type_unification,
500abaa8
AJ
3170 resolve_overloaded_unification, verify_class_unification,
3171 unify, get_bindings_real, do_type_instantiation,
3172 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
3173 tsubst_initializer_list, tsubst_enum,
3174 get_mostly_instantiated_function_type,
3175 invalid_nontype_parm_type_p): Likewise.
3176 * tree.c (cp_build_qualified_type_real): Likewise.
3177 * typeck.c (build_binary_op): Rename itf_* to tf_*.
3178 (build_ptrmemfunc): Likewise.
3179 (convert_for_assignment): Likewise.
3180
d5614afb
NS
31812002-02-07 Nathan Sidwell <nathan@codesourcery.com>
3182
3183 PR c++/109
3184 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 3185 dependent types.
d5614afb
NS
3186 * decl2.c (handle_class_head): Don't push into template parm contexts.
3187 * pt.c (push_template_decl_real): Template parm contexts are never
3188 being defined.
3189
1af6141b
AO
31902002-02-05 Alexandre Oliva <aoliva@redhat.com>
3191
3192 * class.c: Include target.h.
3193 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
3194 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
3195 bit-field layout.
3196 * Make-lang.in: Adjust deps.
3197
d8a6f584
JM
31982002-02-05 Jason Merrill <jason@redhat.com>
3199
3200 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
3201
6f9fdf4d
JJ
32022002-02-04 Jakub Jelinek <jakub@redhat.com>
3203
3204 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
3205 (finish_switch_cond): Set SWITCH_TYPE.
3206
14691f8d
RH
32072002-02-04 Richard Henderson <rth@redhat.com>
3208
3209 * method.c (use_thunk): Always initialize the block tree. Reindent.
3210 * semantics.c (expand_body): Emit thunks after function, not before.
3211
e89a6075
JM
32122002-02-04 Jason Merrill <jason@redhat.com>
3213
3214 * decl.c (start_function): Call cplus_decl_attributes immediately
3215 after grokdeclarator.
3216
3217 * decl.c (start_function): Combine DECL_RESULT handling code.
3218
9780c24f
JM
32192002-02-03 Jason Merrill <jason@redhat.com>
3220
3221 * xref.c: Remove.
3222 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
3223 (cp/xref.o): Remove dependencies.
3224 * class.c (finish_struct_1, check_methods): Don't call xref fns.
3225 (finish_struct_1): Likewise.
3226 * friend.c (make_friend_class): Likewise.
3227 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
3228 * spew.c (read_process_identifier): Likewise.
3229
65f36ac8
JM
32302002-02-01 Jason Merrill <jason@redhat.com>
3231
efe49da0 3232 PR c++/4872
500abaa8 3233 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
3234 no return statement and no abnormal exit.
3235 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
3236 (current_function_returns_abnormally): New macro.
3237 * call.c (build_call): Set it.
3238
f2d9afec
JM
3239 * typeck.c (build_component_ref): Always complain about offsetof
3240 constructs on non-PODs. Only make it an error for members of
3241 virtual bases.
3242
65f36ac8
JM
3243 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
3244 (dump_function_decl): Always dump parms.
3245
3246 * decl2.c (finish_static_data_member_decl): Complain about a local
3247 class with a static data member.
3248
3249 PR c++/4286
3250 * search.c (lookup_field_1): Don't xref a static data member
3251 just because we looked it up.
3252
98884b26
JM
32532002-01-31 Jason Merrill <jason@redhat.com>
3254
b88c0704
JM
3255 * Make-lang.in (parse.c): Handle .output file.
3256
a588fe25
JM
3257 PR c++/3395
3258 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
3259 not TREE_TYPE.
3260 * semantics.c (finish_class_definition): Adjust.
3261
98884b26
JM
3262 Allow attributes in parms and casts.
3263 * parse.y (named_parm): Don't strip attrs.
3264 (declmods): Remove 'attributes' production.
3265 (nonempty_cv_qualifiers): Accept attributes.
3266 (ATTRIBUTE): Give precedence.
3267 * decl.c (groktypename): Handle attributes.
3268 (grokparms): Likewise.
3269
ffdeea47
JJ
32702002-01-29 Jakub Jelinek <jakub@redhat.com>
3271
3272 * decl2.c (cxx_decode_option): Pass 0 as last argument to
3273 cpp_handle_option.
3274 * lang-specs.h: Use cpp_unique_options instead of cpp_options
3275 when used together with cc1_options.
3276
b8b98c66
NS
32772002-01-29 Nathan Sidwell <nathan@codesourcery.com>
3278
3279 PR c++/5132
3280 * typeck2.c (digest_init): Make sure non-array core type is
3281 instantiated.
3282 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
3283 constructor, rather than build a new one.
3284 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
3285 PURPOSE of constructor elts.
3286
7437519c
ZW
32872002-01-23 Zack Weinberg <zack@codesourcery.com>
3288
3289 * Make-lang.in (parse.c): Adjust expected number of
3290 shift-reduce conflicts.
3291 (decl.o): Depend on diagnostic.h.
3292 * decl.c: Include diagnostic.h.
3293 (grokdeclarator): Check for null pointer.
3294 (finish_function): Don't abort when
3295 current_binding_level->parm_flag != 1, if errors have
3296 occurred; throw away the statement tree and extra binding
3297 levels, and continue.
3298 * lex.c (note_list_got_semicolon): Check for null pointer.
3299 * method.c (hack_identifier): Just return error_mark_node if
3300 value is error_mark_node.
3301 * parse.y (primary: TYPEID(type_id)): No need to use
3302 TYPE_MAIN_VARIANT here.
3303 (handler_seq): Accept an empty list of catch clauses and
3304 generate a fake handler block to avoid later crashes.
3305 (ansi_raise_identifier): Accept the error token too.
3306 * semantics.c (begin_class_definition,
3307 finish_class_definition): Check for error_mark_node.
3308
c588e52b
ZW
33092002-01-23 Zack Weinberg <zack@codesourcery.com>
3310
3311 * typeck2.c (friendly_abort): Delete definition.
3312 * cp-tree.h (friendly_abort): Don't prototype.
3313 (my_friendly_assert): Use fancy_abort.
3314
d55ecaa4
CR
33152002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
3316
3317 * cp-tree.h (my_friendly_abort): Remove.
3318
0a01c261
JJ
33192002-01-23 Jakub Jelinek <jakub@redhat.com>
3320
3321 * spew.c (pending_inlines, pending_inlines_tail,
3322 processing_these_inlines): Make static.
3323 (mark_pending_inlines): Remove static.
3324 (begin_parsing_inclass_inline): If in function, save pi
3325 for GC to cp_function_chain->unparsed_inlines instead.
3326 (process_next_inline): Likewise.
3327 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
3328 (mark_pending_inlines): Add prototype.
3329 * decl.c (spew_debug): Remove unused extern.
3330 (mark_lang_function): Call mark_pending_inlines.
3331
a98facb0
CR
33322002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
3333
c588e52b
ZW
3334 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
3335 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
3336 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
3337 Change my_fancy_abort() to abort().
3338
f893c16e
JM
33392002-01-23 Jason Merrill <jason@redhat.com>
3340
608afcc5
JM
3341 PR c++/5453
3342 * class.c (fixed_type_or_null): Fix thinko.
3343
f893c16e
JM
3344 PR c++/3331
3345 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 3346
b2115575
JM
3347 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
3348
f893c16e
JM
33492002-01-22 Jason Merrill <jason@redhat.com>
3350
b5856475
JM
3351 * parse.y (function_body): Suppress the block for the outermost
3352 curly braces.
3353 * decl.c (pushdecl): Don't try to skip it.
3354 (begin_function_body): Keep the block we create, not the next one.
3355 * init.c (emit_base_init): Don't mess with keep_next_level.
3356
6bc34b14
JM
3357 * class.c (build_base_path): Tweak formatting.
3358
3807621a
NS
33592002-01-19 Nathan Sidwell <nathan@codesourcery.com>
3360
3361 Fix regression introduced with patch for c++/775
3362 * parse.y (class_head_defn): Check for template specializations
3363 with a different class-key.
3364
cdd2559c
JM
33652002-01-17 Jason Merrill <jason@redhat.com>
3366
3367 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
3368 (begin_function_body): Call them and keep_next_level.
3369 * init.c (emit_base_init): Call keep_next_level.
3370 * semantics.c (setup_vtbl_ptr): Lose.
3371 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
3372 (vtbls_set_up_p): Lose.
3373 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
3374 * method.c (do_build_copy_constructor): Likewise.
3375 (synthesize_method): Call finish_mem_initializers.
3376 * parse.y (nodecls): Likewise.
ad6b1795
JM
3377
3378 * error.c (dump_type_suffix): Print the exception specs before
3379 recursing.
3380 (dump_function_decl): Here, too.
3381
3382 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
3383
195a5def
IR
33842002-01-10 Ira Ruben <ira@apple.com>
3385
6bc34b14 3386 PR c++/907
195a5def
IR
3387 * decl.c (start_method): Handle attrlist.
3388
f21ee879
JJ
33892002-01-10 Jakub Jelinek <jakub@redhat.com>
3390
3391 * decl2.c (max_tinst_depth): Increase default limit to 500.
3392
33932002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
3394
3395 * spew.c (YYCHAR): Uppercase macro parameter and add
3396 parenthesis.
3397 (YYCODE): Likewise.
3398 (NAME): Uppercase macro parameter.
3399
c3af729a
GS
34002002-01-09 Graham Stott <grahams@redhat.com>
3401
6bc34b14 3402 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 3403
c3af729a
GS
3404 * semantics.c (FINISH_COND): Uppercase macro paramaters and
3405 add parenthesis.
3406
91800747
GS
34072002-01-08 Graham Stott <grahams@redhat.com>
3408
3409 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
3410 (PALLOC): Uppercase macro parameter and whitespace.
3411 (SALLOC): Uppercase macro parameter.
3412 (SFREE): Uppercase macros parameter, add parenthese and
3413 whitespace.
3414 (STREQL): Uppercase macro parameter and whitespace.
3415 (STRNEQ): Likewise.
3416 (STRLSS): Likewise.
3417 (STRLEQ): Likewise.
3418 (STRGTR): Likewise.
3419 (STRGEQ): Likewise.
3420
3421 * call.c (convert_like): Add parenthesis and wrap.
3422 (convert_like_with_context): Likewise.
3423 (ICS_RANK): Whitespace.
3424 (NEED_TEMPORARY_P): Remove parenthesis.
3425
3426 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
3427 whitespace.
3428 (VTT_MARKED_BINFO_P): Likewise.
3429
3430 * decl.c (BINDING_LEVEL): Add parenthesis.
3431 (DEF_OPERATOR): Likewise.
3432
91800747
GS
3433 * mangle.c (MANGLE_TRACE): Add parenthesis.
3434 (MANGLE_TRACE_TREE): Likewise.
3435 (write_signed_number): Likewise.
3436 (write_unsigned_number): Likewise.
3437
3438 * pt.c (ccat): Uppercase macro parameter.
3439 (cat): Likewise
3440
3441 * search.c (SET_BINFO_ACCESS): Add parenthesis.
3442
15eb1e43
JM
34432002-01-07 Jason Merrill <jason@redhat.com>
3444
3445 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
3446 to pedwarn.
3447
6bc34b14 3448 PR c++/3536
15eb1e43
JM
3449 * method.c (make_thunk): If !flag_weak, give the thunk the
3450 function's linkage.
3451 (use_thunk): Here, too.
3452
b34c06e3
GS
34532002-01-07 Graham Stott <grahams@redhat.com>
3454
6bc34b14
JM
3455 * error.c: Update copyright date.
3456 (print_scope_operator): Add parenthesis.
3457 (print_left_paren): Likewise.
3458 (print_right_paren): Likewise.
3459 (print_left_bracket): Likewise.
3460 (print_right_bracket): Likewise.
3461 (print_template_argument_list_start): Likewise.
3462 (print_template_argument_list_end): Likewise.
3463 (print_non_consecutive_character): Likewise.
3464 (print_tree_identifier): Likewise.
3465 (print_identifier): Likewise.
3466 (NEXT_CODE): Uppercase macro parameter.
3467 (ident_fndecl): Delete unused.
3468 (GLOBAL_THING): Likewise.
b34c06e3 3469
98e40e83
GS
34702002-01-06 Graham Stott <grahams@redhat.com>
3471
3472 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
3473 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
3474 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
3475 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
3476 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
3477 (C_IS_RESERVED_WORD): Uppercase macro parameter.
3478 (C_RID_YYCODE) Likewise.
3479 (ptrmem_cst): Use rtx.
3480 (LOCAL_BINDING_P): Add whitespace.
3481 (INHERITED_VALUE_BINDING_P): Likewise.
3482 (BINDING_SCOPE): Wrap long line.
3483 (BINDING_HAS_LEVEL_P): Remove parenthesis.
3484 (BINDING_VALUE): Wrap long line.
3485 (BINDING_TYPE): Whitespace.
3486 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
3487 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 3488 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
3489 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
3490 (same_type_p): Uppercase macro parameters.
3491 (same_type_ignoring_top_level_qualifiers_p): Likewise.
3492 (OVL_FUNCTION): Wrap long line.
3493 (OVL_CHAIN): Whitespace.
b34c06e3 3494 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
3495 (OVL_NEXT): Whitespace.
3496 (OVL_USED): Likewise.
3497 (IDENTIFIER_TYPE_VALUE): Likewise.
3498 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
3499 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
3500 (LANG_ID_FIELD): Whitespace.
3501 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
3502 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
3503 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
3504 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
3505 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
3506 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
3507 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
3508 (IDENTIFIER_VIRTUAL_P): Likewise.
3509 (IDENTIFIER_OPNAME_P): Likewise.
3510 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
3511 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
3512 (C_SET_EXP_ORIGINAL_CODE): Likewise.
3513 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
3514 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3515 (IS_AGGR_TYPE): Uppercase macro parameter.
3516 (CLASS_TYPE_P): Likewise.
3517 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
3518 (IS_AGGR_TYPE_2): Whitespace.
3519 (TAGGED_TYPE_P): Uppercase macro parameter.
3520 (TYPE_BUILT_IN): Whitespace.
3521 (TYPE_FOR_JAVA): Likewise.
3522 (FUNCTION_ARG_CHAIN): Remove parenthesis.
3523 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
3524 (FUNCTION_FIRST_USER_PARAM): Likewise.
3525 (PROMOTES_TO_AGGR_TYPE): Whitespace.
3526 (DERIVED_FROM_P): Add parenthesis and wrap.
3527 (UNIQUELY_DERIVED_FROM_P): Likewise.
3528 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
3529 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3530 (CLASSTYPE_USE_TEMPLATE): Whitespace.
3531 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
3532 (TYPE_GETS_DELETE): Add parenthesis.
3533 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
3534 (TYPE_HAS_ASSIGN_REF): Likewise,
3535 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
3536 (TYPE_HAS_INIT_REF): Likewise.
3537 (TYPE_HAS_CONST_INIT_REF): Likewise.
3538 (TYPE_BEING_DEFINED): Likewise.
3539 (TYPE_LANG_SPECIFIC): Likewise.
3540 (CLASSTYPE_RTTI): Likewise.
3541 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
3542 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
3543 (TYPE_OVERLOADS_ARROW): Likewise.
3544 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
3545 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
3546 (CLASSTYPE_METHOD_VEC): Likewise.
3547 (CLASSTYPE_MARKED_N): Likewise.
3548 (CLASSTYPE_MARKED): Likewise.
3549 (CLASSTYPE_MARKED2): Likewise.
3550 (CLASSTYPE_MARKED3): Likewise.
3551 (CLASSTYPE_MARKED4): Likewise.
3552 (CLASSTYPE_MARKED5): Likewise.
3553 (CLASSTYPE_MARKED6): Likewise.
3554 (SET_CLASSTYPE_MARKED): Whitespace.
3555 (CLEAR_CLASSTYPE_MARKED): Likewise.
3556 (SET_CLASSTYPE_MARKED2): Likewise.
3557 (CLEAR_CLASSTYPE_MARKED2): Likewise.
3558 (SET_CLASSTYPE_MARKED3): Likewise.
3559 (CLEAR_CLASSTYPE_MARKED3): Likewise.
3560 (SET_CLASSTYPE_MARKED4): Likewise.
3561 (CLEAR_CLASSTYPE_MARKED4): Likewise.
3562 (SET_CLASSTYPE_MARKED5): Likewise.
3563 (CLEAR_CLASSTYPE_MARKED5): Likewise.
3564 (SET_CLASSTYPE_MARKED6): Likewise.
3565 (CLEAR_CLASSTYPE_MARKED6): Likewise.
3566 (CLASSTYPE_TAGS): Likewise.
3567 (CLASSTYPE_VSIZE): Likewise.
3568 (CLASSTYPE_VBASECLASSES): Likewise.
3569 (CANONICAL_BINFO): Add parenthesis.
3570 (CLASSTYPE_SIZE(NODE): Likewise.
3571 (CLASSTYPE_SIZE_UNIT): Likewise.
3572 (CLASSTYPE_ALIGN(NODE): Likewise.
3573 (CLASSTYPE_USER_ALIGN): Likewise.
3574 (TYPE_JAVA_INTERFACE): Likewise.
3575 (CLASSTYPE_PURE_VIRTUALS): Likewise.
3576 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
3577 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
3578 (CLASSTYPE_HAS_MUTABLE): Likewise.
3579 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
3580 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
3581 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
3582 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
3583 (CLASSTYPE_INTERFACE_ONLY): Likewise.
3584 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
3585 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3586 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
3587 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3588 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
3589 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
3590 (BINFO_UNSHARED_MARKED): Whitespace.
3591 (BINFO_MARKED): Whitespace and wrap.
3592 (SET_BINFO_MARKED): Likewise.
3593 (CLEAR_BINFO_MARKED): Likewise.
3594 (BINFO_VTABLE_PATH_MARKED): Likewise.
3595 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
3596 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
3597 (BINFO_SUBVTT_INDEX): Remove parenthesis.
3598 (BINFO_VPTR_INDEX): Likewise.
3599 (BINFO_PRIMARY_BASE_OF): Likewise,
3600 (CLASSTYPE_VFIELDS): Whitespace.
3601 (VF_DERIVED_VALUE): Wrap long line.
3602 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
3603 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
3604 (DEFARG_POINTER): Whitespace.
3605 (DECL_NEEDED_P): Remove parenthesis.
3606 (DECL_LANGUAGE): Whitespace.
3607 (SET_DECL_LANGUAGE): Add parenthesis.
3608 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
3609 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
3610 (DECL_IN_AGGR_P): Whitespace.
3611 (DECL_FRIEND_P): Likewise.
3612 (DECL_BEFRIENDING_CLASSES): Likewise.
3613 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
3614 (DECL_NONCONVERTING_P): Whitespace.
3615 (DECL_PURE_VIRTUAL_P): Likewise.
3616 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
3617 (DECL_PENDING_INLINE_INFO): Whitespace.
3618 (DECL_SORTED_FIELDS): Likewise.
3619 (DECL_DEFERRED_FN): Likewise.
3620 (DECL_TEMPLATE_INFO): Likewise.
3621 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
3622 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
3623 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
3624 (TMPL_ARGS_LEVEL): Likewise.
3625 (SET_TMPL_ARGS_LEVEL): Likewise.
3626 (INNERMOST_TEMPLATE_PARMS): Whitespace.
3627 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
3628 (INTEGRAL_CODE_P(CODE): Add parenthesis.
3629 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
3630 (TYPE_HAS_CONSTRUCTOR): Whitespace.
3631 (TREE_HAS_CONSTRUCTOR): Likewise.
3632 (TYPE_HAS_DESTRUCTOR): Likewise.
3633 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
3634 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
3635 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3636 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
3637 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
3638 (TYPE_PTRMEMFUNC_P): Likewise.
3639 (TYPE_PTRMEMFUNC_FLAG): Likewise.
3640 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
3641 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
3642 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
3643 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3644 (DECL_ACCESS): Whitespace.
3645 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
3646 (DECL_GLOBAL_DTOR_P): Likewise.
3647 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 3648 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
3649 (DECL_TEMPLATE_RESULT): Likewise.
3650 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
3651 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
3652 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
3653 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3654 (PRIMARY_TEMPLATE_P): Add parenthesis.
3655 (DECL_USE_TEMPLATE): Whitespace.
3656 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3657 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3658 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
3659 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
3660 (CALL_DECLARATOR_PARMS): Remove parenthesis.
3661 (CALL_DECLARATOR_QUALS): Likewise.
3662 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3663 (TEMP_NAME_P): Wrap.
3664 (VFIELD_NAME_P): Likewise.
3665 (B_SET): Uppercase macro parameters and add parenthesis.
3666 (B_CLR): Likewise.
3667 (B_TST): Likewise.
3668 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
3669 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
3670 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
3671 (same_or_base_type_p): Likewise.
3672 (cp_deprecated): Likewise.
98e40e83 3673
c28abdf0
RH
36742002-01-05 Richard Henderson <rth@redhat.com>
3675
15eb1e43 3676 * semantics.c (expand_body): Revert last change.
c28abdf0 3677
f11ee281
JM
36782002-01-04 Jason Merrill <jason@redhat.com>
3679
195a5def 3680 PR c++/4122
f11ee281
JM
3681 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
3682 lost primary.
3683
3684 * class.c (build_vtbl_initializer): Check for a lost primary
3685 before calculating the vtable entry to throw away.
3686
a4200657
JM
36872002-01-02 Jason Merrill <jason@redhat.com>
3688
3689 * semantics.c (expand_body): Call outlining_inline_function when
3690 emitting an inline function out of line.
3691
40e593d7
NS
36922002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3693
3694 PR c++/5116, c++/764 reversion
3695 * call.c (build_new_op): Revert the instantiations. They are
3696 incorrect.
c588e52b 3697
323728aa
NS
36982002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3699
3700 PR c++/5089
3701 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
3702
46c895ac
NS
37032002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3704
3705 PR c++/3716
3706 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
3707 (tsubst, case POINTER_TYPE): Handle pmfs here.
3708 (tsubst, case OFFSET_TYPE): Check it is not an offset to
3709 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
3710
833aa4c4
NS
37112002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3712
3713 PR c++/35
3714 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
3715 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
3716 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
3717 PARM_DECL.
3718 (tsubst_template_parms): Break up loop statements.
3719 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
3720 parm PARM_DECLs don't get promoted.
3721
18976b21
NS
37222002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3723
3724 PR c++/5123
3725 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
3726 (build_x_function_call): Cope with a COMPONENT_REF containing a
3727 TEMPLATE_ID_EXPR.
3728
303d1c55
NS
37292002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3730
3731 PR c++/5213
3732 * pt.c (convert_template_argument): Be more careful determining
3733 when RECORD_TYPE templates are or are not templates.
3734
d46a33b3
NS
37352002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3736
3737 PR c++/775
3738 * cp-tree.h (handle_class_head): Adjust prototype.
3739 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
3740 parameters. Use for all class heads.
3741 * parse.y (named_class_head_sans_basetype, named_class_head,
3742 named_complex_class_head_sans_basetype,
3743 named_class_head_sans_basetype_defn,
3744 unnamed_class_head): Remove.
3745 (class_head, class_head_apparent_template): Recognize class heads
3746 (class_head_decl, class_head_defn): New reductions. Process class
3747 heads.
3748 (structsp): Adjust class definition and class declaration
3749 reductions.
3750 (maybe_base_class_list): Give diagnostic on empty list.
3751
4542128e
NS
37522002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3753
3754 PR c++/4379
3755 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
3756 single non-static member.
3757 (unary_complex_lvalue): If it cannot be a pointer to member, don't
3758 make it so. Check it is not pointer to reference.
3759
903c6234
NS
37602002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3761
3762 PR c++/5132
3763 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
3764 are processing a template decl.
3765
477558bf
NS
37662002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3767
3768 PR c++/5116, c++/764
3769 * call.c (build_new_op): Make sure template class operands are
3770 instantiated. Simplify arglist construction.
3771
41f5d4b1
NS
37722001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3773
3774 * call.c (build_user_type_conversion_1): Use my_friendly_assert
3775 rather than if ... abort.
3776 * cvt.c (convert_to_reference): Likewise.
3777 * semantics.c (setup_vtbl_ptr): Likewise.
3778 * pt.c (lookup_template_class): Comment typo.
c588e52b 3779
f3368a90
NS
37802001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3781
3782 PR c++/5125
3783 * pt.c (push_template_decl_real): Make sure DECL has
3784 DECL_LANG_SPECIFIC.
3785
03c9c274
NS
37862001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3787
3788 PR c++/335
3789 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
3790 for non-reference fields.
3791 * typeck.c (require_complete_type): Use resolve_offset_ref).
3792
7d8e8369
NS
37932001-12-26 Nathan Sidwell <nathan@codesourcery.com>
3794
3795 PR c++/196
03c9c274 3796 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 3797
a56ca899
NS
37982001-12-24 Nathan Sidwell <nathan@codesourcery.com>
3799
3800 PR c++/160
3801 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
3802 up. Don't stabilize_references when initializing a reference.
3803
0b5826ac
KG
38042001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3805
3806 * decl2.c (lang_f_options): Const-ify.
3807
38be19f6
JM
38082001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
3809
3810 * config-lang.in (diff_excludes): Remove.
3811
2e4cf9dc
NS
38122001-12-19 Nathan Sidwell <nathan@codesourcery.com>
3813
3814 PR c++/90
3815 * typeck.c (build_function_call_real): Use original function
3816 expression for errors.
3817
00e4119c
JM
38182001-12-18 Jason Merrill <jason@redhat.com>
3819
195a5def 3820 PR c++/3242
00e4119c
JM
3821 * class.c (add_method): Do compare 'this' quals when trying to match a
3822 used function. Don't defer to another used function.
3823
3ad97789
NS
38242001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3825
3826 * pt.c (instantiate_clone): Remove, fold into ...
3827 (instantiate_template): ... here. Simplify by removing mutual
3828 recursion.
3829 * typeck2.c (build_m_component_ref): Don't cv qualify the function
3830 pointed to by a pointer to function.
3831 * class.c (delete_duplicate_fields_1): Typo.
3832
f21add07
JM
38332001-12-18 Jason Merrill <jason@redhat.com>
3834
3835 C++ ABI change: destroy value arguments in caller.
3836 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
3837 create an extra binding level for the parameters.
3838 * decl.c (store_parm_decls): Don't do parameter cleanups.
3839
ea50ad82
NS
38402001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3841
3842 * call.c (build_new_method_call): Use '%#V'.
3843 * error.c (cv_to_string): Use V parameter to determine padding.
3844
3855d0d1
JM
38452001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3846
3847 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
3848 spellings in messages.
3849
33bd39a2
ZW
38502001-12-17 Zack Weinberg <zack@codesourcery.com>
3851
3852 * cp-tree.h: Delete #defines for cp_error, cp_warning,
3853 cp_pedwarn, and cp_compiler_error.
3854 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
3855 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
3856 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3857 typeck2.c: Change calls to the above macros to use their
3858 language-independent equivalents: error, warning, pedwarn, and
3859 internal_error respectively.
3860
317c26c3
NB
38612001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
3862
3863 * decl2.c (finish_file): Remove back_end_hook.
3864
aba649ba
JM
38652001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
3866
3867 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
3868 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
3869 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
3870
1737c953
JM
38712001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
3872
3873 * lang-options.h: Use American spelling in messages.
3874
4a90862e
JM
38752001-12-13 Jason Merrill <jason@redhat.com>
3876
ade3dc07
JM
3877 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
3878
3879 Use cleanups to run base and member destructors.
3880 * init.c (push_base_cleanups): New function, split out from...
3881 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
3882 * decl.c (finish_destructor_body): Move vbase destruction code to
3883 push_base_cleanups.
3884 (begin_function_body, finish_function_body): New fns.
3885 (finish_function): Move [cd]tor handling and call_poplevel to
3886 finish_function_body.
3887 (pushdecl): Skip the new level.
3888 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
3889 (setup_vtbl_ptr): Call push_base_cleanups.
3890 * method.c (synthesize_method): Call {begin,end}_function_body.
3891 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
3892 * cp-tree.h: Declare new fns.
3893 * parse.y (function_body, .begin_function_body): New nonterminals.
3894 (fndef, pending_inline, function_try_block): Use function_body.
3895 (ctor_initializer_opt, function_try_block): No longer has a value.
3896 (base_init): Remove .set_base_init token.
3897 (.set_base_init, compstmt_or_error): Remove.
3898 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
3899
4a90862e
JM
3900 * optimize.c (maybe_clone_body): Fix parameter updating.
3901
a0de9d20
JM
39022001-12-12 Jason Merrill <jason@redhat.com>
3903
3904 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3905 * semantics.c (genrtl_start_function): Don't pass
3906 parms_have_cleanups or push an extra binding level.
3907 (genrtl_finish_function): Lose cleanup_label cruft.
3908
3909 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3910 (ctor_label): Remove.
3911 * semantics.c (finish_return_stmt): Lose ctor_label support.
3912 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 3913 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
3914 dtor_label.
3915
3916 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3917 check for [cd]tors.
3918 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3919
3920 * decl.c (finish_function): Check VMS_TARGET, not VMS.
3921
3922 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3923 (end_cleanup_fn): And poplevel.
3924
3925 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3926 if we're in a template.
3927
dc5c569a
JJ
39282001-12-12 Jakub Jelinek <jakub@redhat.com>
3929
3930 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3931 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3932 THIS_NAME_P): Delete.
3933 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3934 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3935 with internal naming scheme.
3936 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3937
ad1a6d45
NS
39382001-12-12 Nathan Sidwell <nathan@codesourcery.com>
3939
3940 * decl.c (grokdeclarator): Deprecated implicit typename use.
3941
270d8c65
NS
39422001-12-11 Nathan Sidwell <nathan@codesourcery.com>
3943
3944 PR g++/51
3945 * parse.y (frob_specs): Indicate it is a language linkage which
3946 contained the extern.
3947 * decl.c (grokdeclarator): Allow extern language linkage with
3948 other specifiers.
3949
9aaceb4b
NS
39502001-12-10 Nathan Sidwell <nathan@codesourcery.com>
3951
3952 PR g++/72
3953 * decl.c (add_binding): Don't reject duplicate typedefs involving
3954 template parameters.
3955
a23c9413
NB
39562001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
3957
3958 * parse.y, semantics.c: Similarly.
3959
9aaceb4b 39602001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
3961
3962 PR g++/87
3963 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3964 (copy_args_p): Rename to ...
3965 (copy_fn_p): ... here.
3966 (grok_special_member_properties): New function.
3967 (grok_op_properties): Lose VIRTUALP parameter.
3968 (copy_assignment_arg_p): Remove.
3969 * call.c (build_over_call): Use copy_fn_p.
3970 * decl.c (grokfndecl): Reformat. Adjust call to
3971 grok_op_properties.
3972 (copy_args_p): Rename to ...
3973 (copy_fn_p): ... here. Reject template functions. Check for pass
3974 by value.
3975 (grok_special_member_properties): Remember special functions.
3976 (grok_ctor_properties): Don't remember them here, just check.
3977 (grok_op_properties): Likewise.
3978 (start_method): Call grok_special_member_properties.
3979 * decl2.c (grokfield): Likewise.
3980 (copy_assignment_arg_p): Remove.
3981 (grok_function_init): Don't remember abstract assignment here.
3982 * pt.c (instantiate_class_template): Call
3983 grok_special_member_properties.
3984 (tsubst_decl): Adjust grok_op_properties call.
3985
bdd8737f
AH
39862001-12-08 Aldy Hernandez <aldyh@redhat.com>
3987
33bd39a2
ZW
3988 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
3989 RID_TYPES_COMPATIBLE_P.
bdd8737f 3990
46af705a
JDA
39912001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
3992
3993 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
3994 call to build_aggr_init.
3995 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
3996
cb97d97d
NB
39972001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
3998
3999 * parse.y: Replace uses of the string non-terminal with STRING.
4000 Don't perform string concatentaion here.
4001 (string): Remove non-terminal.
4002 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4003
742a37d5
JM
40042001-12-05 Jason Merrill <jason@redhat.com>
4005
4006 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4007 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4008 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4009 * pt.c (push_tinst_level): No longer static.
4010 * cp-tree.h: Declare them.
4011
4012 * init.c (resolve_offset_ref): Don't check access for the base
4013 conversion to access a FIELD_DECL.
4014
4015 * cp-tree.h (TYPE_REFFN_P): New macro.
4016 * decl.c (bad_specifiers): Check it, too.
4017
4018 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4019 on the __*_type_info type if we haven't seen a definition.
4020
26f943fd
NB
40212001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
4022
4023 * decl.c: Include c-common.h.
4024 (shadow_warning): Move to c-common.c.
4025
37a08a29
RK
4026Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4027
4028 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4029
9471d3e2
NS
40302001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4031
4032 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4033
713ccd0c
NS
40342001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4035
4036 PR g++/164
4037 * init.c (sort_base_init): Allow binfos to be directly specified.
4038 * method.c (do_build_copy_constructor): Explicitly convert to the
4039 base instance.
4040 (do_build_assign_ref): Likewise.
4041
591382c4
HPN
40422001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
4043
4044 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4045 declaration and initialization.
4046
c725bd79
NB
40472001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4048
4049 * typeck2.c: Remove leading capital from diagnostic messages, as
4050 per GNU coding standards.
4051
a5d7c4a3
MK
40522001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
4053
4054 PR c++/3394
9fe038e8
HPN
4055 * decl.c (xref_basetypes): Handle attributes between
4056 'class' and name.
a5d7c4a3 4057
f1880e13
NS
40582001-12-03 Nathan Sidwell <nathan@codesourcery.com>
4059
4060 PR g++/3381
4061 * parse.y (named_complex_class_head_sans_basetype): Add new
4062 reduction.
4063 * Make-lang.in (parse.c): Adjust expected conflict count.
4064
ff668506
JM
40652001-12-03 Jason Merrill <jason@redhat.com>
4066
4067 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4068 immediate binfos for our virtual bases.
4069
1f978f5f
NB
40702001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
4071
4072 * call.c (build_java_interface_fn_ref): Similarly.
4073 * except.c (is_admissible_throw_operand): Similarly.
4074 * init.c (build_java_class_ref): Similarly.
4075 * xref.c (open_xref_file): Similarly.
4076
357351e5
NB
40772001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4078
4079 * class.c (finish_struct): Remove trailing periods from messages.
4080 * decl.c (check_tag_decl): Similarly.
4081 * lex.c (cxx_set_yydebug): Similarly.
4082 * typeck2.c (friendly_abort): Similarly.
4083
998979e6
MM
40842001-11-29 Mark Mitchell <mark@codesourcery.com>
4085
4086 PR c++/3048
4087 * cp-tree.h (ovl_member): Remove.
33bd39a2 4088 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
4089 specially.
4090 * tree.c (ovl_member): Remove.
4091
7d5b8b11
MM
40922001-11-29 Mark Mitchell <mark@codesourcery.com>
4093
4094 PR c++/4842
4095 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4096 FUNCTION_DECL, as input.
4097 (mark_overriders): Remove.
4098 (warn_hidden): Rework for the new ABI.
4099
b67db529
MM
41002001-11-29 Mark Mitchell <mark@codesourcery.com>
4101
4102 PR c++/3471
4103 * call.c (convert_like_real): Do not build additional temporaries
4104 for rvalues of class type.
4105
2db1ab2d
NS
41062001-11-28 Nathan Sidwell <nathan@codesourcery.com>
4107
4108 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
4109 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
4110 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
4111 (DERIVED_FROM_P): Likewise.
4112 (enum base_access): Renumber, add ba_quiet bit mask.
4113 (get_binfo): Remove.
4114 (get_base_distance): Remove.
4115 (binfo_value): Remove.
4116 (ACCESSIBLY_DERIVED_FROM_P): Remove.
4117 * call.c (standard_conversion): Use lookup_base.
4118 * class.c (strictly_overrides): Likewise.
4119 (layout_virtual_bases): Likewise.
4120 (warn_about_ambiguous_direct_bases): Likewise.
4121 (is_base_of_enclosing_class): Likewise.
4122 (add_vcall_offset_vtbl_entries_1): Likewise.
4123 * cvt.c (build_up_reference): Adjust comment.
4124 * init.c (build_member_call): Reformat.
4125 * search.c (get_binfo): Remove.
4126 (get_base_distance_recursive): Remove.
4127 (get_base_distance): Remove.
4128 (lookup_base_r): Tweak.
4129 (lookup_base): Add ba_quiet control. Complete the types here.
4130 (covariant_return_p): Use lookup_base.
4131 * tree.c (binfo_value): Remove.
4132 (maybe_dummy_object): Use lookup_base.
4133 * typeck.c (build_static_cast): Use lookup_base.
4134 (get_delta_difference): Likewise.
4135 * typeck2.c (binfo_or_else): Use lookup_base.
4136 (build_scoped_ref): Add back error_mark_check.
4137 (build_m_component_ref): Use lookup_base.
4138
d3945f0a
JM
41392001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4140
4141 * Make-lang.in (c++.generated-manpages): New dummy target.
4142
ac79cd5a
RK
4143Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4144
4145 * Make-lang.in (cp-lang.o): Depends on c-common.h.
4146 * cp-lang.c (c-common.h): Include.
4147 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
4148 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
4149 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
4150
4d6baafa
NB
41512001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
4152
4153 * decl2.c (c_language): Move to c-common.c.
4154 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4155 functions.
4156 (cxx_init): Update.
4157
5b0c5896
JM
41582001-11-26 Jason Merrill <jason@redhat.com>
4159
4160 * call.c (joust): Remove COND_EXPR hack.
4161
4bdd26e6
AH
41622001-11-25 Aldy Hernandez <aldyh@redhat.com>
4163
195a5def 4164 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 4165 space.
33bd39a2 4166
338d90b8
NS
41672001-11-25 Nathan Sidwell <nathan@codesourcery.com>
4168
4169 PR g++/3145
4170 * class.c (build_vbase_pointer): Remove.
4171 (build_vbase_path): Remove.
4172 (build_base_path): New function.
4173 * cp-tree.h (base_access, base_kind): New enumerations.
4174 (build_base_path): Declare.
4175 (convert_pointer_to_real): Remove.
4176 (convert_pointer_to): Remove.
4177 (lookup_base): Declare.
4178 (convert_pointer_to_vbase): Remove.
4179 * call.c (build_scoped_method_call): Use lookup_base &
4180 build_base_path instead of convert_pointer_to_real,
4181 get_base_distance & get_binfo.
4182 (build_over_call): Likewise.
4183 * cvt.c (cp_convert_to_pointer): Likewise.
4184 (convert_to_pointer_force): Likewise.
4185 (build_up_reference): Likewise.
4186 (convert_pointer_to_real): Remove.
4187 (convert_pointer_to): Remove.
4188 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
4189 instead of convert_pointer_to_vbase & build_vbase_path.
4190 (emit_base_init): Use build_base_path instead of
4191 convert_pointer_to_real.
4192 (expand_virtual_init): Lose unrequired conversions.
4193 (resolve_offset_ref): Use lookup_base and build_base_path
4194 instead of convert_pointer_to.
4195 * rtti.c (build_dynamic_cast_1): Use lookup_base &
4196 build_base_path instead of get_base_distance & build_vbase_path.
4197 * search.c (get_vbase_1): Remove.
4198 (get_vbase): Remove.
4199 (convert_pointer_to_vbase): Remove.
07f521fc 4200 (lookup_base_r): New function.
338d90b8
NS
4201 (lookup_base): New function.
4202 * typeck.c (require_complete_type): Use lookup_base &
4203 build_base_path instead of convert_pointer_to.
4204 (build_component_ref): Likewise.
4205 (build_x_function_call): Likewise.
4206 (get_member_function_from_ptrfunc): Likewise.
4207 (build_component_addr): Likewise.
4208 * typeck2.c (build_scoped_ref): Likewise.
4209
89d684bb
BM
42102001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4211
4212 * cp-tree.h (CP_TYPE_QUALS): Removed.
4213 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 4214 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 4215 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 4216 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
4217 lang-hooks prototype.
4218 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
4219 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
4220 CP_TYPE_QUALS changed to cp_type_quals.
4221 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
4222 (CXX_C_OBJS): Remove c-dump.o.
4223
12eb9f93 42242001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
4225
4226 PR c++/3637
12eb9f93
MM
4227 * pt.c (lookup_template_class): Ensure that all specializations
4228 are registered on the list corresponding to the most general
4229 template.
4230
42312001-11-20 Mark Mitchell <mark@codesourcery.com>
4232
2d2e8123 4233 * call.c (non_reference): Add documentation.
33bd39a2 4234 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
4235 from conversion operators.
4236 (maybe_handle_ref_bind): Simplify.
4237 (compare_ics): Correct handling of references.
4238
78a40378
MM
42392001-11-19 John Wilkinson <johnw@research.att.com>
4240
4241 * dump.c (dump_op): New function.
4242 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
4243 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
4244 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 4245
78a40378
MM
42462001-11-19 Mark Mitchell <mark@codesourcery.com>
4247
4248 PR4629
4249 * semantics.c (finish_sizeof): Make sure that expression created
4250 while processing a template do not have a type.
4251 (finish_alignof): Likewise.
4252 * typeck.c (c_sizeof): Likewise.
4253 (expr_sizeof): Likewise.
4254
22703ccc
NB
42552001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
4256
4257 * lex.c (cxx_finish): Call c_common_finish.
4258 (finish_parse): Remove.
4259
b3faacfd
KL
42602001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4261
4262 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
4263 when displaying error message about missing array bounds.
4264
873ff987
KL
42652001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4266
4267 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
4268 CONST_CAST_EXPR.
4269 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
4270
08f3a861
NB
42712001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
4272
4273 * cp-tree.h (print_class_statistics): Restore.
4274
8a2b77e7
JM
42752001-11-15 Jason Merrill <jason@redhat.com>
4276
3b1a4132
JM
4277 * method.c (use_thunk): Don't emit debugging information for thunks.
4278
8a2b77e7
JM
4279 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
4280 * decl.c (make_typename_type): Handle getting a class template.
4281 * search.c (lookup_field_r): A class template is good enough for
4282 want_type.
4283
4284 * call.c (convert_like_real): Only use cp_convert for the bad part.
4285 (standard_conversion): Also allow bad int->enum.
4286 * typeck.c (ptr_reasonably_similar): Also allow functions to
4287 interconvert. Pointers to same-size integers are reasonably
4288 similar.
4289
4290 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
4291 give it void type.
4292
36a68fe7
NS
42932001-11-15 Nathan Sidwell <nathan@codesourcery.com>
4294
4295 PR g++/3154
4296 * init.c (sort_base_init): Remove unreachable code.
4297 (expand_member_init): Adjust comment to reflect reality. Simplify
4298 and remove unreachable code.
4299
f5e99456
NB
43002001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
4301
4302 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
4303 (cxx_init): Update prototype.
4304 * decl.c (init_decl_processing): Rename. Move null node init
4305 to its creation time.
4306 * lex.c (cxx_init_options): Update.
4307 (cxx_init): Combine with old init_parse; also call
4308 cxx_init_decl_processing.
4309
fe5b6c1c
RS
43102001-11-14 Richard Sandiford <rsandifo@redhat.com>
4311
8a2b77e7
JM
4312 * decl.c (check_initializer): Try to complete the type of an
4313 array element before checking whether it's complete. Don't
4314 complain about arrays with complete element types but an
4315 unknown size.
4316 (cp_finish_decl): Build the hierarchical constructor before
4317 calling maybe_deduce_size_from_array_init.
fe5b6c1c 4318
77bd67cb
JM
43192001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
4320
4321 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
4322
b02922a4
NS
43232001-11-13 Nathan Sidwell <nathan@codesourcery.com>
4324
4325 PR g++/4206
4326 * parse.y (already_scoped_stmt): Remove.
4327 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
4328
abfc1ef6
L
43292001-11-12 H.J. Lu <hjl@gnu.org>
4330
195a5def 4331 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
4332 function is always `true'.
4333
5d69f816
NB
43342001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4335
4336 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4337 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4338 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
4339 * cp-tree.h (print_class_statistics): Remove.
4340 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
4341 cxx_print_identifier, cxx_set_yydebug): New.
4342 * lex.c (set_yydebug): Rename c_set_yydebug.
4343 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
4344 lang_print_xnode): Rename.
4345 * tree.c (print_lang_statistics): Rename.
4346
4fdc14ca
KG
43472001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4348
4349 * class.c (dump_array): Fix format specifier warning.
4350
3ac88239
NB
43512001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4352
4353 * cp-lang.c (LANG_HOOKS_NAME): Override.
4354 (struct lang_hooks): Constify.
4355 * lex.c (cxx_init_options): Update.
4356 (lang_identify): Remove.
33bd39a2 4357 * parse.y (language_string): Remove.
3ac88239 4358
b21d216c
AF
43592001-11-08 Andreas Franck <afranck@gmx.de>
4360
4361 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
4362 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
4363 suggested by autoconf.
4364 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
4365 (c++.install-common): Use the transformed target alias names.
4366
d23c55c2
NB
43672001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4368
4369 * Make-lang.in: Update.
4370 * cp-lang.c: Include langhooks-def.h.
4371
2a2b1d56
KL
43722001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4373
4374 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
4375
76648a8b
KG
43762001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4377
4378 * lex.c (copy_lang_type): Add static prototype.
4379
fccef71e
KL
43802001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4381
4382 * pt.c (unify): Handle SCOPE_REF.
4383
19989812
JJ
43842001-11-01 Jakub Jelinek <jakub@redhat.com>
4385
4386 * tree.c (cp_copy_res_decl_for_inlining): Adjust
4387 DECL_ABSTRACT_ORIGIN for the return variable.
4388
5b7874aa
ZW
43892001-10-31 Zack Weinberg <zack@codesourcery.com>
4390
4391 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4392
306ef644
JM
43932001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
4394
4395 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
4396 semantics.c, spew.c: Fix spelling errors.
4397
76543000
KL
43982001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4399
4400 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
4401
37207ee7
ZW
44022001-10-25 Zack Weinberg <zack@codesourcery.com>
4403
4404 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
4405 pop_everything.
4406
8ac61af7
RK
4407Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4408
4409 * cp-lang.c (cxx_get_alias_set): New function.
4410 Point LANG_HOOKS_GET_ALIAS_SET to it.
4411
f1e09fa2 44122001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
4413
4414 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
4415 * cp-tree.h (make_unbound_class_template): Prototype new function.
4416 * decl.c (make_unbound_class_template): New function.
4417 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
4418 * error.c (dump_type): Likewise.
4419 * mangle.c (write_type): Likewise.
4420 * parse.y (template_parm): Likewise.
4421 (template_argument): Use make_unbound_class_template.
4422 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
4423 (tsubst): Likewise.
4424 (tsubst_copy): Likewise.
4425 (unify): Likewise.
4426 * tree.c (walk_tree): Likewise.
4427 * typeck.c (comptypes): Likewise.
4428
0df6c2c7
KG
44292001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4430
4431 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
4432 extra calls into fewer ones.
4433
97055d5c
AO
44342001-10-18 Alexandre Oliva <aoliva@redhat.com>
4435
4436 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
4437 Warn when merging inline with attribute noinline.
4438 (start_decl, start_function): Warn if inline and attribute
4439 noinline appear in the same declaration.
4440
b5823a44
L
44412001-10-16 H.J. Lu <hjl@gnu.org>
4442
4443 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
4444 for tree checking disabled.
4445
dc8ad298
HPN
44462001-10-16 Hans-Peter Nilsson <hp@axis.com>
4447
4448 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
4449 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
4450
d9f818d9
RS
44512001-10-15 Richard Sandiford <rsandifo@redhat.com>
4452
4453 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
4454 (unify): Only handle MINUS_EXPR specially if the above flag is set
4455 and the subtracted constant is 1. Clear the flag on recursive calls.
4456 Set it when unifying the maximum value in an INTEGER_TYPE's range.
4457
e1be26f4
RS
44582001-10-15 Richard Sandiford <rsandifo@redhat.com>
4459
4460 * decl.c (bad_specifiers): Don't allow exception specifications
4461 on any typedefs.
4462
a5da89c6
NB
44632001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
4464
4465 * cp/lex.c (init_cp_pragma): Similarly.
4466
4f96ff63
KL
44672001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4468
4469 * pt.c (lookup_template_class): Build complete template arguments
4470 for BOUND_TEMPLATE_TEMPLATE_PARM.
4471
11e74ea6
KL
44722001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4473
4474 * cp-tree.h (TYPE_BINFO): Update comment.
4475 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
4476 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
4477 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
4478 (copy_type): Prototype new function.
4479 * lex.c (copy_lang_decl): Gather tree node statistics.
4480 (copy_lang_type): New function.
4481 (copy_type): Likewise.
4482 (cp_make_lang_type): Create lang_type for
4483 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
4484 and BOUND_TEMPLATE_TEMPLATE_PARM.
4485 * pt.c (tsubst): Use copy_type instead of copy_node.
4486 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
4487
f5d47abd
KL
44882001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4489
4490 * pt.c (determine_specialization): Ignore functions without
4491 DECL_TEMPLATE_INFO.
4492
e60505a5
NS
44932001-10-12 Nathan Sidwell <nathan@codesourcery.com>
4494
4495 PR g++/4476
4496 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
4497
6f32162a
JM
44982001-10-11 Jason Merrill <jason_merrill@redhat.com>
4499
4500 * typeck2.c (store_init_value): Don't re-digest a bracketed
4501 initializer.
4502
4503 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
4504 ANON_AGGR_TYPE_P.
4505
4a8d0c9c
RH
45062001-10-11 Richard Henderson <rth@redhat.com>
4507
4508 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
4509 of an asm statement.
4510 (build_vtbl_ref_1): Split out from build_vtbl_ref.
4511 (build_vfn_ref): Use it to handle vtable descriptors before
4512 calling build_vtable_entry_ref.
4513 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
4514
84b72302
RH
45152001-10-10 Richard Henderson <rth@redhat.com>
4516
37207ee7 4517 * parse.y (asm_operand): Allow named operands.
84b72302
RH
4518 * semantics.c (finish_asm_stmt): Tweek for changed location
4519 of the operand constrant.
4520
48c8b0be 45212001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
4522
4523 * call.c (standard_conversion): Add bad conversion between
4524 integers and pointers.
4525 (convert_like_real): Don't use convert_for_initialization for bad
4526 conversions; complain here and use cp_convert.
4527 (build_over_call): Don't handle bad conversions specially.
4528 (perform_implicit_conversion): Allow bad conversions.
4529 (can_convert_arg_bad): New fn.
4530 * cp-tree.h: Declare it.
4531 * typeck.c (convert_for_assignment): Use it.
4532 (ptr_reasonably_similar): Any target type is similar to void.
4533
19551f29
AO
45342001-10-08 Alexandre Oliva <aoliva@redhat.com>
4535
4536 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
4537 (cp/cp-lang.o): New rule.
4538 * cp-tree.h: Declare hooks.
4539 * tree.c: Make hooks non-static.
4540 (init_tree): Don't initialize hooks here.
4541 * lex.c: Likewise. Move definition of lang_hooks to...
4542 * cp-lang.c: ... new file.
4543
31ed8fea
RH
45442001-10-08 Richard Henderson <rth@redhat.com>
4545
4546 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
4547 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
4548
8b60264b
KG
45492001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4550
4551 * class.c (build_vtable_entry_ref): Const-ify.
4552 * decl.c (predefined_identifier,
37207ee7 4553 initialize_predefined_identifiers): Likewise.
8b60264b
KG
4554 * init.c (build_new_1): Likewise.
4555 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
4556 Likewise.
4557
bc4c7159
AO
45582001-10-05 Alexandre Oliva <aoliva@redhat.com>
4559
4560 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
4561 (INSNS_PER_STMT): Likewise.
4562 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
4563 (copy_body, initialize_inlined_parameters): Likewise.
4564 (declare_return_variable, inlinable_function_p): Likewise.
4565 (expand_call_inline, expand_calls_inline): Likewise.
4566 (optimize_inline_calls, clone_body): Likewise.
4567 * tree.c (walk_tree): Moved to ../tree-inline.c.
4568 (walk_tree_without_duplicates): Likewise.
4569 (copy_tree_r, remap_save_expr): Likewise.
4570
25af8512
AO
45712001-10-04 Alexandre Oliva <aoliva@redhat.com>
4572
4573 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
4574 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
4575 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
4576 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
4577 (flag_inline_trees): Moved declaration to ../tree-inline.h.
4578 (walk_tree): Moved declaration to ../tree-inline.h.
4579 (walk_tree_without_duplicates, copy_tree_r): Likewise.
4580 (remap_save_expr): Likewise.
4581 * decl.c: Include tree-inline.h.
4582 (lang_mark_tree): Don't mark inlined_fns.
4583 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
4584 * optimize.c: Include tree-inline.h.
4585 (optimize_inline_calls): Move declaration to ../tree.h, as
4586 non-static.
4587 (remap_decl): Use language-independent constructs and hooks.
4588 (remap_block, copy_body_r, declare_return_variable): Likewise.
4589 (inlinable_function_p): Likewise. Don't test for
4590 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
4591 no longer language-specific.
4592 (optimize_inline_calls): Likewise. Make it non-static. Moved
4593 call of dump_function to...
4594 (optimize_function): Here...
4595 (clone_body): New function, extracted from...
4596 (maybe_clone_body): ... here. Build decl_map locally and pass
4597 it on to clone_body.
4598 * pt.c, semantics.c: Include tree-inline.h.
4599 * tree.c: Likewise.
4600 (cp_walk_subtrees): New language-specific hook for tree inlining.
4601 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
4602 cp_is_overload_p, cp_auto_var_in_fn_p,
4603 cp_copy_res_decl_for_inlining): Likewise.
4604 (walk_tree): Move language-specific constructs into...
4605 (cp_walk_subtrees): this new function.
4606 (copy_tree_r): Use language-independent constructs and hooks.
4607 (init_tree): Initialize tree inlining hooks.
4608 (remap_save_expr): Adjust prototype so that the declaration
4609 does not require the definition of splay_tree.
4610
6a4af81f
JDA
46112001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
4612
4613 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
4614 to build the declaration instead of the declaration itself.
4615
0caee1c6
JM
46162001-10-02 Jason Merrill <jason_merrill@redhat.com>
4617
48c8b0be
JM
4618 * decl2.c (cxx_decode_option): Add 'else'.
4619
0caee1c6
JM
4620 * spew.c (end_input): No longer static.
4621 * cp-tree.h: Declare it.
4622 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
4623
80a497e4
JM
46242001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
4625
4626 * call.c (build_over_call), typeck.c (build_function_call_real):
4627 Pass type attributes to check_function_format rather than name or
4628 assembler name. Don't require there to be a name or assembler
4629 name to check formats.
4630
6431177a
JM
46312001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
4632
4633 * decl.c (init_decl_processing): Don't call
4634 init_function_format_info. Initialize lang_attribute_table
4635 earlier.
4636 (builtin_function): Call decl_attributes.
4637 (insert_default_attributes): New.
4638
55b3d665
JM
46392001-10-01 Jason Merrill <jason_merrill@redhat.com>
4640
4641 * decl.c (grokdeclarator): Copy array typedef handling from C
4642 frontend.
4643
4644 * decl.c (grokdeclarator): Copy too-large array handling from C
4645 frontend.
4646
9f57ca19
AO
46472001-09-29 Alexandre Oliva <aoliva@redhat.com>
4648
4649 * config-lang.in (target_libs): Added target-gperf, so that we
4650 don't try to build it if C++ is disabled.
4651
749ced52
ZW
46522001-09-23 Zack Weinberg <zack@codesourcery.com>
4653
4654 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
4655 (cp/errfn.o): Delete rule.
4656 (cp/error.o): Depend on flags.h.
4657 * errfn.c: Delete file.
4658 * cp-tree.h: Declare warn_deprecated. Remove definitions of
4659 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
4660 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
4661 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
4662 internal_error respectively. Make cp_deprecated into a macro.
4663 Don't define cp_printer typedef or declare cp_printers.
4664 * error.c: Include flags.h.
4665 Delete: struct tree_formatting_info, print_function_argument_list,
4666 print_declaration, print_expression, print_function_declaration,
4667 print_function_parameter, print_type_id, print_cv_qualifier_seq,
4668 print_type_specifier_seq, print_simple_type_specifier,
4669 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
4670 print_parameter_declaration_clause, print_exception_specification,
4671 print_nested_name_specifier, and definition of cp_printers.
4672 (locate_error): New function.
4673 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
4674 rewritten in terms of locate_error and diagnostic.c.
4675 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
4676 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
4677 (init_error): Adjust to match.
4678
bb9f8221
RK
4679Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4680
4681 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
4682
67231816
RH
46832001-09-21 Richard Henderson <rth@redhat.com>
4684
4685 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
4686 (build_vtbl_initializer): Likewise.
4687 (build_vfn_ref): New.
4688 * cp-tree.h: Declare it.
4689 * call.c (build_over_call): Use it.
4690 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
4691 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
4692
c9574c9f
R
4693Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
4694
4695 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
4696
91d231cb
JM
46972001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
4698
4699 Table-driven attributes.
4700 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
4701 * decl2.c (cplus_decl_attributes): Only take one attributes
4702 parameter.
4703 * cp-tree.c (cplus_decl_attributes): Update prototype.
4704 * class.c (finish_struct), decl.c (start_decl, start_function),
4705 decl2.c (grokfield), friend.c (do_friend), parse.y
4706 (parse_bitfield): Update calls to cplus_decl_attributes.
4707 * decl.c (grokdeclarator): Take a pointer to a single ordinary
4708 attribute list.
4709 * decl.h (grokdeclarator): Update prototype.
4710 * decl2.c (grokfield): Take a single ordinary attribute list.
4711 * friend.c (do_friend): Likewise.
4712 * decl.c (shadow_tag, groktypename, start_decl,
4713 start_handler_parms, grokdeclarator, grokparms, start_function,
4714 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
4715 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
4716 (process_template_parm, do_decl_instantiation): Pass single
4717 ordinary attribute lists around.
4718 * decl.c (grokdeclarator): Correct handling of nested attributes.
4719 Revert the patch
4720 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
4721 * decl.c (grokdeclarator): Embedded attrs bind to the right,
4722 not the left.
4723 .
4724 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
4725 (cp_attribute_table): Declare.
4726 * decl.c (valid_lang_attribute): Don't define.
4727 (lang_attribute_table): Define.
4728 (init_decl_processing): Initialize lang_attribute_table instead of
4729 valid_lang_attribute.
4730 * tree.c (cp_valid_lang_attribute): Remove.
4731 (handle_java_interface_attribute, handle_com_interface_attribute,
4732 handle_init_priority_attribute): New functions.
4733 (cp_attribute_table): New array.
4734 * decl2.c (import_export_class): Don't use
4735 targetm.valid_type_attribute.
4736
a1bda5f1
GDR
47372001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4738
e6b9638b
JM
4739 * Make-lang.in (cp/error.o): Depend on real.h
4740 * error.c: #include "real.h"
a1bda5f1 4741
cb6edbcb
KG
47422001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4743
4744 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
4745 xmalloc/strcpy/strcat.
4746
83182544
KG
47472001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4748
4749 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
4750 Const-ification.
4751 * pt.c (tsubst_decl): Likewise.
4752
40008eda
KG
47532001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4754
4755 * decl2.c (lang_f_options): Const-ification.
4756 * lex.c (cplus_tree_code_name): Likewise.
4757 * spew.c (yyerror): Likewise.
4758
39e78d8b
NS
47592001-09-06 Nathan Sidwell <nathan@codesourcery.com>
4760
4761 PR c++/3986
4762 * class.c (force_canonical_binfo_r): Check & move an indirect
4763 primary base first.
4764 (force_canonical_binfo): Check that it's not already
4765 canonical.
4766 (mark_primary_virtual_base): Remove BINFO parameter.
4767 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
4768
6d0a3f67
NS
47692001-09-06 Nathan Sidwell <nathan@codesourcery.com>
4770
4771 Remove TYPE_NONCOPIED_PARTS.
4772 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
4773 CLASSTYPE_PURE_VIRTUALS.
4774 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
4775 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 4776 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
4777 (finish_struct_1): ... call it here.
4778
4f8e1232
MM
47792001-09-04 Mark Mitchell <mark@codesourcery.com>
4780
4781 * decl.c (duplicate_decls): Remove code deadling with
4782 DECL_SAVED_INSNS.
4783 * decl2.c (finish_file): Likewise.
4784 * pt.c (instantiate_decl): Likewise.
4785 * semantics.c (expand_body): Don't defer local functions if
4786 they wouldn't be deferred for some other reason. Don't
4787 generate RTL for functions that will not be emitted.
4788 (genrtl_start_function): Remove code deadling with
4789 DECL_SAVED_INSNS.
4790 (genrtl_finish_function): Likewise.
4791
da86f08f
NS
47922001-09-04 Nathan Sidwell <nathan@codesourcery.com>
4793
4794 PR c++/4203
4795 * call.c (build_over_call): Do not optimize any empty base
4796 construction.
4797
38066e83
KL
47982001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4799
4800 * error.c (dump_template_decl): Output template parameters
4801 together with their specifiers.
4802 Output `class' prefix for template template parameter.
4803 (dump_decl): Fix formatting.
4804
598e9ba5 48052001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 4806
598e9ba5
KG
4807 * optimize.c (inlinable_function_p): Allow only smaller single
4808 functions. Halve inline limit after reaching recursive limit.
749ced52 4809
f232e4a5
JR
48102001-08-30 Joern Rennecke <amylaar@redhat.com>
4811 Jason Merrill <jason_merrill@redhat.com>
4812
4813 * class.c (build_vtable_entry_ref): Subtract in char*, not
4814 ptrdiff_t.
4815
0213a355
JM
48162001-08-23 Jason Merrill <jason_merrill@redhat.com>
4817
4818 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
4819 (build_cplus_array_type): Use cp_build_qualified_type, not
4820 TYPE_MAIN_VARIANT, to get an unqualified version.
4821
4822 * decl2.c (grok_alignof): Lose.
4823 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
4824 * typeck.c (c_alignof): Lose.
4825 * semantics.c (finish_sizeof, finish_alignof): New.
4826 * parse.y: Use them.
4827 * cp-tree.h: Declare them.
4828
fd10dd09
JM
48292001-08-22 Jason Merrill <jason_merrill@redhat.com>
4830
4831 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
4832 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
4833 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
4834
baeb4732
JJ
48352001-08-19 Jakub Jelinek <jakub@redhat.com>
4836
4837 * typeck2.c (add_exception_specifier): Only require complete type if
4838 not in processing template declaration.
4839
1c0cc57e
KG
48402001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4841
4842 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
4843 GNU_xref_start_scope and GNU_xref_end_scope.
4844
4845 * tree.c (TYPE_HASH): Moved to ../tree.h.
4846
9a52d09b
MM
48472001-08-16 Mark Mitchell <mark@codesourcery.com>
4848
4849 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
4850 on COMPOUND_EXPRs.
4851
b5d1cbd2
RH
48522001-08-14 Richard Henderson <rth@redhat.com>
4853
4854 * class.c, cp-tree.h (build_vfn_ref): Remove.
4855 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
4856
63d6f87a
MM
48572001-08-13 Mark Mitchell <mark@codesourcery.com>
4858
4859 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
4860 empty class assignment as having side-effects to avoid
4861 spurious warnings.
4862
e78d8e51
ZW
48632001-08-13 Zack Weinberg <zackw@panix.com>
4864
4865 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
4866 * except.c: Include libfuncs.h.
4867
a60af04a
GDR
48682001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4869
4870 * decl.c (grokdeclarator): Clarify diagnostic message.
4871
3605b283
KL
48722001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4873
4874 * decl2.c (do_nonmember_using_decl): Replace using directive
4875 with using declaration in the error message.
4876
4d5f3fbd
KL
48772001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4878
4879 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
4880 criterion to avoid rebuilding expression tree instead of
4881 processing_template_decl.
4882
07b2f2fd
JM
48832001-08-07 Jason Merrill <jason_merrill@redhat.com>
4884
4885 Support named return value optimization for inlines, too.
4886 * decl.c (finish_function): Nullify returns here.
4887 * semantics.c (genrtl_start_function): Not here.
4888 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
4889 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
4890 Also nullify the CLEANUP_STMT for the nrv.
4891 * cp-tree.h: Declare it.
4892 * optimize.c (declare_return_variable): Replace the nrv with the
4893 return variable.
4894 * typeck.c (check_return_expr): Be more flexible on alignment check.
4895 Ignore cv-quals when checking for a matching type.
4896
2cc07db4
RH
48972001-08-09 Richard Henderson <rth@redhat.com>
4898
4899 * decl2.c (finish_objects): Use target hooks instead of
4900 assemble_constructor and assemble_destructor.
4901
0ca179b2
JDA
49022001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4903
4904 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
4905
0830ae44
NS
49062001-08-07 Nathan Sidwell <nathan@codesourcery.com>
4907
4908 PR c++/3820
4909 Stop using TYPE_NONCOPIED_PARTS.
4910 * call.c (build_over_call): Be careful when copy constructing
4911 or assigning to an empty class.
4912 * class.c (check_bases_and_members): It has a
4913 COMPLEX_ASSIGN_REF if it has a vptr.
4914 (layout_class_type): Don't add empty class padding to
4915 TYPE_NONCOPIED_PARTS.
4916 (finish_struct_1): Don't add the VFIELD either.
4917 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
4918 initialization.
4919
59a13e0f
JM
49202001-08-07 Jason Merrill <jason_merrill@redhat.com>
4921
4922 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
4923
47907859
RH
49242001-08-06 Richard Henderson <rth@redhat.com>
4925
4926 * decl2.c (finish_objects): Pass a symbol_ref and priority to
4927 assemble_{constructor,destructor}. Remove priority handling.
4928
eac69b8a
GDR
49292001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4930
4931 Don't allow template-id in using-declaration.
4932 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
4933 (do_class_using_decl): Likewise.
4934
ef6e958a
NB
49352001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4936
4937 * cp/spew.c (read_token): No need to pop buffers.
4938
dff94ad7
SS
49392001-08-02 Stan Shebs <shebs@apple.com>
4940
4941 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
4942 (fnaddr_from_vtable_entry): Remove decl.
4943 * method.c (use_thunk): Update comment.
4944
026c3f13
AC
49452001-08-01 Andrew Cagney <ac131313@redhat.com>
4946
4947 * repo.c (get_base_filename): Change return value to const char
4948 pointer.
4949
1dbb6023
NS
49502001-08-02 Nathan Sidwell <nathan@codesourcery.com>
4951
4952 Kill -fhonor-std.
4953 * NEWS: Document.
4954 * cp-tree.h (flag_honor_std): Remove.
4955 (CPTI_FAKE_STD): Remove.
4956 (std_node): Remove comment about it being NULL.
4957 (fake_std_node): Remove.
4958 * decl.c (in_fake_std): Remove.
4959 (walk_namespaces_r): Remove fake_std_node check.
4960 (push_namespace): Remove in_fake_std code.
4961 (pop_namespace): Likewise.
4962 (lookup_name_real): Remove fake_std_node check.
4963 (init_decl_processing): Always create std_node. Always add
4964 std:: things there.
4965 (builtin_function): Always put non '_' fns in std.
4966 * decl2.c (flag_honor_std): Remove.
4967 (lang_f_options): Remove honor-std.
4968 (unsupported_options): Add honor-std.
4969 (set_decl_namespace): Remove fake_std_node check.
4970 (validate_nonmember_using_decl): Likewise.
4971 (do_using_directive): Likewise.
4972 (handle_class_head): Likewise.
4973 * dump.c (cp_dump_tree): Likewise.
4974 * except.c (init_exception_processing): Adjust.
4975 * init.c (build_member_call): Remove fake_std_node check.
4976 (build_offset_ref): Likewise.
4977 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
4978 * rtti.c (init_rtti_processing): Adjust.
4979
6ad7895a
APB
49802001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
4981
4982 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
4983 operand while calling cp_tree_equal.
4984
befe7c61
NS
49852001-07-31 Nathan Sidwell <nathan@codesourcery.com>
4986
4987 The 3.0 ABI no longer has vbase pointer fields.
4988 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
4989 FORMAT_VBASE_NAME): Remove.
4990 * method.c (do_build_copy_constructor): Adjust.
4991 (do_build_assign_ref): Adjust.
4992 * search.c (lookup_field_r): Adjust.
4993 * typeck.c (build_component_ref): Adjust.
4994
4995 The 3.0 ABI always has a vtable pointer at the start of every
4996 polymorphic class.
4997 * rtti.c (build_headof_sub): Remove.
4998 (build_headof): Adjust.
4999 (get_tinfo_decl_dynamic): No need to check flag_rtti
5000 here. Adjust.
5001 (create_real_tinfo_var): Explain why we need a hidden name.
5002
20dde49d
NS
50032001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5004
5005 PR c++/3631
5006 * class.c (update_vtable_entry_for_fn): The fixed adjustment
5007 of a virtual thunk should be from declaring base.
5008
b7ad2f8b
NS
50092001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5010
5011 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5012 the shared virtual base, so preserving inheritance graph order.
5013
57cb6d52
AJ
50142001-07-30 Andreas Jaeger <aj@suse.de>
5015
749ced52 5016 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 5017
594280a3
RH
50182001-07-28 Richard Henderson <rth@redhat.com>
5019
5020 * method.c (pending_inlines): Remove.
5021
0ab142b0
NS
50222001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5023
5024 * class.c (mark_primary_virtual_base): Don't adjust base
5025 offsets here.
5026 (dfs_unshared_virtual_bases): Adjust them here.
5027 (mark_primary_bases): Explain why we adjust at the end.
5028
d60d223b
NS
50292001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5030
5031 * class.c (finish_struct_1): When copying the primary base's
5032 VFIELD, make sure we find it is at offset zero.
5033
db3ef87b
KL
50342001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5035
5036 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5037 tsubst_expr for default template arguments.
5038
312b7c9d
NS
50392001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5040
d60d223b 5041 PR c++/3621
312b7c9d 5042 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 5043 nonzero.
312b7c9d 5044
648c2206
NS
50452001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5046
5047 PR c++/3624
5048 * call.c (resolve_args): Simplify, call
5049 convert_from_reference.
5050 (build_new_op): Resolve and convert from reference ARG1
5051 earlier. Adjust ARG2 & ARG3 resolve and conversion.
5052
969fd501
NS
50532001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5054
5055 * decl.c (last_function_parm_tags): Remove.
5056 (current_function_parm_tags): Remove.
5057 (init_decl_processing): Adjust.
5058 (start_function): Adjust.
5059 (store_parm_decls): Adjust.
5060
5061 PR c++/3152
5062 * decl.c (grokdeclarator): Detect when a function typedef is
5063 declaring a function, and create last_function_parms correctly.
5064
08ac397c 50652001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 5066
08ac397c
JM
5067 * call.c (joust): Only prefer a non-builtin candidate to a builtin
5068 one if they have the same signature.
5069
5070 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
5071 it rather than toplevel_bindings_p. Give it a mangled name if static.
5072 (convert_to_reference): Adjust.
5073 * decl2.c (get_temp_name): Lose.
5074 * mangle.c (mangle_ref_init_variable): New fn.
5075 (mangle_guard_variable): Strip the ref-init header.
5076 * cp-tree.h: Adjust.
5077 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5078 initializer.
5079 (grok_reference_init): Always use DECL_INITIAL.
5080
40260429
NS
50812001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5082
5083 PR c++/3416
5084 * call.c (build_conditional_expr): Recheck args after
5085 conversions.
5086 * cp-tree.h (build_conditional_expr): Move to correct file.
5087 * typeck.c (decay_conversion): Diagnose any unknown types
5088 reaching here.
5089 (build_binary_op): Don't do initial decay or default
5090 conversions on overloaded functions.
5091 (build_static_cast): Don't do a decay conversion here.
5092
ab085207
NS
50932001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5094
5095 PR c++/3543
5096 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5097 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5098
0abe00c5
NS
50992001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5100
5101 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5102 (create_vtbl_ptr): ... here.
5103
90b1ca2f
NS
51042001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5105
5106 * class.c (build_vbase_offset_vbtl_entries): Look for
5107 non-primary base of which we are a sub vtable.
5108
cfe5dc31
PE
51092001-07-24 Phil Edwards <pme@sources.redhat.com>
5110
5111 * semantics.c (finish_this_expr): Remove unused code.
5112
7f54a851
NS
51132001-07-24 Nathan Sidwell <nathan@codesourcery.com>
5114
5115 Simplify rtti, now we've only one ABI.
5116 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5117 CPTI_TINFO_VAR_ID.
5118 (tinfo_decl_id, tinfo_var_id): Remove.
5119 (get_typeid_1): Remove.
5120 * rtti.c
5121 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
5122 (typeid_ok_p): New function.
5123 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
5124 (get_tinfo_decl): Remove old abi documentation.
5125 (tinfo_from_decl): Remove.
5126 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
5127 (get_typeid_1): Remove.
5128 (get_base_offset): Remove.
5129 (synthesize_tinfo_var): Absorb get_base_offset.
5130 (create_real_tinfo_var): Don't use tinfo_decl_id.
5131
18fee3ee
GS
51322001-07-23 Graham Stott <grahams@redhat.com>
5133
d30d6e7a 5134 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
5135 variable has_two_argument_delete_p.
5136
c4372ef4
NS
51372001-07-21 Nathan Sidwell <nathan@codesourcery.com>
5138
5139 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
5140 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
5141 (CPTI_INDEX_IDENTIFIER): Remove.
5142 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
5143 (delta2_identifier): Remove.
5144 (index_identifier): Remove.
5145 (pfn_or_delta2_identifier): Remove.
5146 (flag_vtable_thunks): Remove.
5147 (VTABLE_DELTA2_NAME): Remove.
5148 (VTABLE_INDEX_NAME): Remove.
5149 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
5150 (vfunc_ptr_type_node): Adjust.
5151 (VTABLE_NAME_PREFIX): Adjust.
5152 (build_vfn_ref): Lose first parameter.
5153 (fixup_all_virtual_upcast_offsets): Remove.
5154 * decl.c (initialize_predefined_identifiers): Remove
5155 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
5156 (init_decl_processing): Remove no-vtable-thunk code.
5157 * decl2.c (flag_vtable_thunks): Remove.
5158 (mark_vtable_entries): Remove no-vtable-thunk code.
5159 * error.c (dump_decl): Remove no-vtable-thunk code.
5160 (dump_expr): Adjust ptr to member function code.
5161 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
5162 code.
5163 * rtti.c (build_headof): Remove no-vtable-thunk code.
5164 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
5165 * search.c (get_base_distance): Remove expand_upcast_fixups case.
5166 (virtual_context) Remove.
5167 (expand_upcast_fixups): Remove.
5168 (fixup_virtual_upcast_offsets): Remove.
5169 (fixup_all_virtual_upcast_offsets): Remove.
5170 * typeck.c (get_member_function_from_ptrfunc): Remove
5171 no-vtable-thunk code.
5172 * call.c (build_over_call): Adjust call to build_vfn_ref.
5173 * class.c (build_vfn_ref): Lose first parameter. Remove
5174 no-vtable-thunk code.
5175 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
5176 (build_vtable_entry): Remove no-vtable-thunk code.
5177
3461fba7
NS
51782001-07-20 Nathan Sidwell <nathan@codesourcery.com>
5179
5180 Remove old-abi remnants. Remove comments about old abi
838dfd8a 5181 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
5182 * cp-tree.h: Adjust comments.
5183 (vbase_offsets_in_vtable_p): Delete.
5184 (vcall_offsets_in_vtable_p): Delete.
5185 (vptrs_present_everywhere_p): Delete.
5186 (all_overridden_vfuns_in_vtables_p): Delete.
5187 (merge_primary_and_secondary_vtables_p): Delete.
5188 (TYPE_CONTAINS_VPTR_P): Adjust.
5189 (VTT_NAME_PREFIX): Remove.
5190 (CTOR_VTBL_NAME_PREFIX): Remove.
5191 (init_vbase_pointers): Remove.
5192 * class.c: Adjust coments.
5193 (build_vbase_pointer_fields): Delete.
5194 (build_vbase_pointer): Remove old-abi code.
5195 (build_secondary_vtable): Likewise.
5196 (modify_all_vtables): Likewise.
5197 (create_vtable_ptr): Likewise.
5198 (layout_class_type): Likewise.
5199 (finish_struct_1): Likewise.
5200 (finish_vtbls): Likewise.
5201 (dfs_finish_vtbls): Delete.
5202 (build_vbase_offset_vtbl_entries): Remove old-abi code.
5203 * cvt.c: Adjust comments.
5204 * decl.c: Adjust comments.
5205 * decl2.c: Adjust comments.
5206 * init.c: Adjust comments.
5207 (construct_virtual_bases): Remove old-abi code.
5208 * lang-specs.h: Remove -fno-new-abi.
5209 * mangle.c: Adjust comments.
5210 * rtti.c: Adjust comments.
5211 (get_base_offset): Remove old-abi-code.
5212 * search.c: Adjust comments.
5213 (dfs_init_vbase_pointers): Remove.
5214 (dfs_vtable_path_unmark): Remove.
5215 (init_vbase_pointers): Remove.
5216 * semantics.c: Adjust comments.
5217 (emit_associated_thunks): Remove old-abi code.
5218 * typeck.c: Adjust comments.
5219
1c432a87
DB
52202001-07-20 Daniel Berlin <dan@cgsoftware.com>
5221
5222 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
5223 params.h.
5224
b7076960
MM
52252001-07-19 Mark Mitchell <mark@codesourcery.com>
5226
5227 * class.c (finish_struct_anon): Forbid nested classes.
5228
2b85879e
NB
52292001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
5230
5231 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
5232 * optimize.c: Include debug.h.
5233 (maybe_clone_body): Use debug hook.
5234 * semantics.c: Include debug.h.
5235 (expand_body): Use debug hook.
5236
c60e94a7
NB
52372001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
5238
5239 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
5240
dbc957f1
MM
52412001-07-18 Mark Mitchell <mark@codesourcery.com>
5242
5243 * class.c (type_requires_array_cookie): New function.
5244 (check_methods): Don't try to figure out whether the type needs a
5245 cookie here.
5246 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
5247 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
5248 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
5249 * pt.c (instantiate_class_template): Don't set
5250 TYPE_VEC_DELETE_TAKES_SIZE.
5251 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 5252
7ba0b0f7 52532001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 5254 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
5255
5256 * NEWS (Changes in GCC 3.0): Fix typo.
5257
59387d2e
JM
52582001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
5259
5260 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
5261 which attributes are to be attached, and a flags argument. Update
5262 call to decl_attributes.
5263 (grokfield): Update call to decl_attributes.
5264 * class.c (finish_struct): Update call to cplus_decl_attributes.
5265 * cp-tree.h (cplus_decl_attributes): Update prototype.
5266 * decl.c (start_decl, grokdeclarator, start_function): Update
5267 calls to decl_attributes and cplus_decl_attributes.
5268 * friend.c (do_friend): Update call to cplus_decl_attributes.
5269 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
5270
7ed47c04
MM
52712001-07-12 Mark Mitchell <mark@codesourcery.com>
5272
5273 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
5274 for `register' variables with an asm-specification.
5275
40b18c0a
MM
52762001-07-11 Mark Mitchell <mark@codesourcery.com>
5277
5278 * semantics.c (finish_asm_stmt): Mark the output operands
5279 to an asm addressable, if necessary.
5280
517c3b80
BE
52812001-07-11 Ben Elliston <bje@redhat.com>
5282
219670f1
BE
5283 * Revert this change -- there is a subtle bug.
5284
517c3b80
BE
5285 PR c++/80
5286 * decl.c (finish_enum): New "attributes" argument; pass it to
5287 cplus_decl_attributes. Use a narrower type if the enum is packed.
5288 * cp-tree.h (finish_enum): Adjust prototype.
5289 * parse.y (enum_head): New non-terminal.
5290 (structsp): Use it. Enums now may be preceded or followed by
5291 optional attributes -- pass their chained tree to finish_enum().
5292 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
5293
2ba9c47e
MM
52942001-07-10 Mark Mitchell <mark@codesourcery.com>
5295
5296 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
5297 variables.
5298
35241192
JM
52992001-07-10 Jason Merrill <jason_merrill@redhat.com>
5300
5301 * semantics.c (cp_expand_stmt): Fix for null
5302 current_function_return_value.
5303
07167a18
JM
53042001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
5305
5306 * call.c (build_op_delete_call): Initialize fn.
5307 (convert_like_real): Delete conditional.
5308 (joust): Initialize *w and *l.
5309 * class.c: Add prototype for binfo_ctor_vtable.
5310 (get_primary_binfo): Initialize result.
5311 * init.c (build_java_class_ref): Initialize name.
ae818d3b 5312
35241192
JM
53132001-07-09 Erik Rozendaal <dlr@acm.org>
5314
ae818d3b
ER
5315 * typeck.c (unary_complex_lvalue): Do not duplicate the
5316 argument to modify, pre-, or post-increment when used as an
5317 lvalue and when the argument has side-effects.
5318
12a68f1f
JM
53192001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
5320
5321 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5322 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
5323 cplus_decl_attributes even if attrs is NULL.
5324 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5325
f7a4cec0
JM
53262001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
5327
5328 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
5329 calls to decl_attributes.
5330
c80106a4
IR
53312001-07-06 Ira Ruben <ira@apple.com>
5332
ae818d3b 5333 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
5334 be DECL_TEMPLATE_RESULT.
5335
dac65501
KL
53362001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5337
5338 * cp-tree.h (copy_template_template_parm): Rename to ...
5339 (bind_template_template_parm): ... here.
5340 * tree.c (copy_template_template_parm): Rename to ...
5341 (bind_template_template_parm): ... here. Remove the case when
5342 NEWARGS is NULL_TREE.
5343 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
5344 BOUND_TEMPLATE_TEMPLATE_PARM.
5345 * pt.c (lookup_template_class): Adjust.
5346
01f9e964
JM
53472001-07-05 Jason Merrill <jason_merrill@redhat.com>
5348
5349 * cvt.c (convert_lvalue): New fn.
5350 * cp-tree.h: Declare it.
5351 * method.c (do_build_assign_ref): Use it.
5352 (do_build_copy_constructor): Convert parm to base types
5353 before calling base constructors.
5354
5355 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
5356 DECL_USER_ALIGN. Check flag_elide_constructors instead of
5357 optimize.
5358 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
5359
6be77748
NS
53602001-07-02 Nathan Sidwell <nathan@codesourcery.com>
5361
5362 * optimize.c (optimize_inline_calls): New function, broken out
5363 of ...
5364 (optimize_function): ... here. Call it. Don't inline if it is
5365 a thunk.
5366 (dump_function): Print name of dump flag causing this dump.
5367 * semantics.c (expand_body): Move thunk inline check to
5368 optimize_function.
5369
8d8e52be
JM
53702001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
5371
5372 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
5373 (comptypes): Use target.comp_type_attributes.
5374
5a0db193
NS
53752001-06-29 Nathan Sidwell <nathan@codesourcery.com>
5376
5377 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
5378
46f018e1
GDR
53792001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5380
5381 * error.c (lang_print_error_function): Add a `diagnostic_context *'
5382 parameter. Tweak.
5383
501990bb
NB
53842001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5385
5386 * decl2.c (import_export_class): Update.
5387
f68fc4db
GDR
53882001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
5389
5390 * error.c (init_error): Adjust settings.
5391
9596ddd6
GDR
53922001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
5393
5394 * error.c (init_error): Adjust settings.
5395
c93586fa
RS
53962001-06-19 Richard Sandiford <rsandifo@redhat.com>
5397
5398 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
5399 return pointers to data members by reference rather than by value.
5400
0d97bf4c
JM
54012001-06-18 Jason Merrill <jason_merrill@redhat.com>
5402
5403 Implement the Named Return Value optimization.
5404 * cp-tree.h (struct cp_language_function): Add x_return_value.
5405 (current_function_return_value): Now a macro.
5406 * decl.c: Don't define it.
5407 (define_label, finish_case_label): Don't clear it.
5408 (init_decl_processing): Don't register it with GC.
5409 * semantics.c (genrtl_finish_function): Don't check it for
5410 no_return_label. Copy the RTL from the return value to
5411 current_function_return_value and walk, calling...
5412 (nullify_returns_r): ...this new fn.
5413 * typeck.c (check_return_expr): Set current_function_return_value.
5414
13de7ec4
JM
54152001-06-15 Jason Merrill <jason_merrill@redhat.com>
5416
5417 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
5418 sharing a ctor vtable with. Merge code for cases 1 and 2.
5419 (binfo_ctor_vtable): New fn.
5420 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
5421
3ea099f1
JM
54222001-06-14 Jason Merrill <jason_merrill@redhat.com>
5423
5424 * class.c (dfs_find_final_overrider): Fix logic.
5425
5426 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
5427 virtual thunk instead of non-virtual.
5428 (get_matching_virtual): Uncomment.
5429
5430 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
5431 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
5432 PARM, not ARG.
5433
87326ba8
NS
54342001-06-14 Nathan Sidwell <nathan@codesourcery.com>
5435
5436 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
5437 we've not emerged from the hierarchy of RTTI_BINFO on reaching
5438 a non-virtual base.
5439
e065a36e
MM
54402001-06-13 Mark Mitchell <mark@codesourcery.com>
5441
5442 * NEWS: Update release number.
5443
623fe76a
NS
54442001-06-12 Nathan Sidwell <nathan@codesourcery.com>
5445
5446 PR c++/3130, c++/3131, c++/3132
5447 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
5448 * class.c (force_canonical_binfo_r): Move
5449 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
5450 virtual bases unless they're primary and what they're primary
5451 too has been moved.
5452 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
5453 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
5454 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
5455 derived binfo.
5456 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
5457 (layout_nonempty_base_or_field): Add most derived type
5458 parameter. Adjust.
5459 (layout_empty_base): Likewise.
5460 (build_base_field): Likewise.
5461 (build_base_fields): Likewise.
5462 (propagate_binfo_offsets): Add most derived type
5463 parameter. Skip non canonical virtual bases too.
5464 (dfs_set_offset_for_unshared_vbases): Don't skip primary
5465 bases. Do skip canonical bases.
5466 (layout_virtual_bases): Adjust.
5467 (layout_class_type): Adjust.
5468 (dfs_get_primary_binfo): Build list of virtual primary base
5469 candidates.
5470 (get_primary_binfo): Check that the shared virtual primary
5471 base candidate was found first.
5472 (accumulate_vtbl_inits): Don't do anything for non-vptr
5473 containing binfos. For case 1 primary virtual bases, keep
5474 checking that we've not emerged from the hierarchy of RTTI_BINFO.
5475
7bdcf888
NS
54762001-06-12 Nathan Sidwell <nathan@codesourcery.com>
5477
5478 PR c++/3089
5479 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
5480 hierarchy looking for primary bases for a ctor
5481 vtable. Recursively call oneself, if we meet our primary via
5482 this route and haven't met it yet via inheritance graph order.
5483
25b5b465
MM
54842001-06-11 Mark Mitchell <mark@codesourcery.com>
5485
5486 * lang-options.h: Emit documentation for -fno-honor-std, not
5487 -fhonor-std.
5488
eb2d0614
AO
54892001-06-10 Alexandre Oliva <aoliva@redhat.com>
5490
5491 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
5492 Don't clobber delta.
5493 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
5494
2a2b2d43
GDR
54952001-06-10 Mark Mitchell <mark@codesourcery.com>
5496 Gabriel Dos Reis <gdr@codesourcery.com>
5497
5498 * Make-lang.in (cp/call.o): Depend on diagnostic.h
5499 (cp/typeck.o): Depend on diagnostic.h
5500 (cp/typeck2.o): Depend on diagnostic.h
07167a18 5501 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
5502 * typeck.c: #include diagnostic.h
5503 (convert_for_initialization): Remove extern declaration for
5504 warningcount and errorcount.
5505
5506 * call.c: #include diagnostic.h
5507 (convert_like_real): Remove extern declaration for warnincount and
07167a18 5508 errorcount.
2a2b2d43
GDR
5509
5510 * repo.c: #include diagnostic.h
5511 * typeck2.c: #include diagnostic.h
5512
06d5e633
NS
55132001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5514
5515 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
5516 in previous change.
5517
9ac1bd2e
NS
55182001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5519
5520 PR c++/2929
5521 * friend.c (do_friend): Use push_decl_namespace for classes at
5522 namespace scope.
5523
85a9a0a2
NS
55242001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5525 Jason Merrill <jason_merrill@redhat.com>
5526
5527 PR c++/3061
5528 * class.c (build_secondary_vtable): Use assert, rather than an error
5529 message.
5530 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
5531 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
5532 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
5533 Don't set BINFO_VTABLE for a primary virtual base.
5534
daa8df65
MM
55352001-06-07 Mark Mitchell <mark@codesourcery.com>
5536
5537 * decl.c (duplicate_decls): Update source position information
5538 when a template function is defined.
5539
37344b9b
PE
55402001-06-07 Phil Edwards <pme@sources.redhat.com>
5541
5542 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
5543
fcebb2dd
NS
55442001-06-07 Nathan Sidwell <nathan@codesourcery.com>
5545
5546 PR c++/2914
5547 * decl.c (pushtag): Don't push into a complete type's scope.
5548
d0cd8b44
JM
55492001-06-06 Jason Merrill <jason_merrill@redhat.com>
5550
5551 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
5552 (struct lang_decl_flags): Lose generate_with_vtable_p.
5553 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
5554 * class.c (copy_virtuals): Adjust.
5555 * decl2.c (mark_vtable_entries): Adjust.
5556 * method.c (make_thunk, build_vtable_entry): Adjust.
5557 * class.c (update_vtable_entry_for_fn): Only look as far as the
5558 first defining class.
07167a18 5559 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 5560 defined in a lost primary virtual base.
07167a18 5561 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
5562 the lost primary case and the normal case.
5563 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
5564 (get_vfield_offset, get_derived_offset): Lose.
5565 (dfs_find_final_overrider): Use look_for_overrides_here.
5566 (get_matching_virtual): New fn.
5567 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
5568 not BV_VCALL_INDEX.
5569 * search.c (look_for_overrides_here): Split out from...
5570 (look_for_overrides_r): Here.
5571
5572 * class.c (find_final_overrider): Return error_mark_node on error.
5573
5574 * decl2.c (key_method): #if 0 accidental change.
5575
acf97e0b
JDA
55762001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
5577
5578 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
5579 (build_over_call): Likewise.
5580 * decl.c (grokparms): Likewise.
5581 * pt.c (tsubst_decl): Likewise.
5582 * typeck.c (convert_arguments): Likewise.
5583
7e9abee9
MM
55842001-06-05 Mark Mitchell <mark@codesourcery.com>
5585
47ee8904
MM
5586 * semantics.c (begin_class_definition): Robustify.
5587
7e9abee9
MM
5588 * pt.c (instantiate_decl): Tell the repository code about the
5589 clones, not the cloned functions.
5590 * repo.c (repo_template_used): Explicitly instantiate the cloned
5591 function, not the clones.
5592
bea09693
NS
55932001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5594
5595 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
5596 ICS_BAD_FLAG on created conversion.
5597 (compare_ics): Break out rank.
5598
8f7550ca
NS
55992001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5600
5601 * decl.c (xref_tag): Remove extraneous %s on dependent name
5602 lookup warning.
5603
442e01b6
NS
56042001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5605
5606 * class.c (layout_vtable_decl): Fix off by one error on
5607 build_index_type.
5608 (build_vtt): Likewise.
5609 (build_ctor_vtbl_group): Likewise.
5610
b7442fb5
NS
56112001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5612
5613 * class.c (maybe_indent_hierarchy): New function.
5614 (dump_class_hierarchy_r): Add flags. Dump extra binfo
5615 information, if enabled. Use maybe_indent_hierarchy. Adjust
5616 output format.
5617 (dump_class_hierarchy): Adjust prototype. Adjust output format.
5618 (dump_array, dump_vtable, dump_vtt): New functions.
5619 (finish_struct_1): Adjust hierarchy dumping.
5620 (initialize_vtable): Call dump_vtable.
5621 (build_vtt): Call dump_vtt.
5622 (build_ctor_vtbl_group): Call dump_vtable.
5623 * decl2.c (flag_dump_class_layout): Remove.
5624 (cxx_decode_option): Remove dump translation unit
5625 and dump class hierarchy check. Call dump_switch_p.
5626 (finish_file): Adjust dumping.
5627 (dump.c): Only dump base classes if not TDF_SLIM.
5628 Only dump namespace members if not TDF_SLIM.
5629 * optimize.c (dump_function): New function.
5630 (optimize_function): Call dump_function.
5631 * semantics.c (expand_body): Use dump_enabled_p.
5632
e5410b32
NS
56332001-06-01 Nathan Sidwell <nathan@codesourcery.com>
5634
5635 PR g++/2936
5636 Part missed from first commit
5637 * decl2.c (finish_anon_union): Copy context.
5638
e97c9488
NS
56392001-05-30 Nathan Sidwell <nathan@codesourcery.com>
5640
5641 PR g++/2936
e97c9488
NS
5642 * optimize.c (remap_decl): Remap anonymous aggregate members too.
5643
87d9ac49
NS
56442001-05-26 Nathan Sidwell <nathan@codesourcery.com>
5645
5646 PR g++/2823
5647 * semantics.c (expand_body): Don't optimize thunks.
5648
88657302
RH
56492001-05-25 Sam TH <sam@uchicago.edu>
5650
5651 * cp-tree.h lex.h: Fix header include guards.
5652
56532001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
5654
5655 * decl.c (init_decl_processing): Tweak.
5656
0b1161fc
MM
56572001-05-24 Mark Mitchell <mark@codesourcery.com>
5658
5659 * decl.c (duplicate_decls): Tidy.
5660 (init_decl_processing): Always set flag_no_builtin.
5661
6f56d925
NS
56622001-05-24 Nathan Sidwell <nathan@codesourcery.com>
5663
5664 PR c++/2184
5665 * decl2.c (do_local_using_decl): Push the decls, even in a
5666 template.
5667
39e0656d
MM
56682001-05-22 Mark Mitchell <mark@codesourcery.com>
5669
5670 * optimize.c (initialize_inlined_parameters): Don't set
5671 TREE_READONLY for a VAR_DECL taking the place of an inlined
5672 PARM_DECL.
5673
0401d499
JM
56742001-05-22 Jason Merrill <jason_merrill@redhat.com>
5675
5676 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
5677 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
5678 attribute.
5679
14fc3426
JM
56802001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
5681
5682 * parse.y: Refer to compound literals as such, not as
5683 constructor-expressions.
5684
3f41ffd8
MM
56852001-05-21 Mark Mitchell <mark@codesourcery.com>
5686
5687 * call.c (build_op_delete_call): Ignore exception-specifications
5688 when looking for matching delete operators.
5689 * init.c (build_new_1): Compute whether or not the allocation
5690 function used is a placement allocation function or not, and
5691 communicate this information to build_op_delete_call.
5692
1a6025b4
JM
56932001-05-21 Jason Merrill <jason_merrill@redhat.com>
5694
90ecce3e
JM
5695 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
5696 (build_vtbl_ref): Adjust.
5697 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
5698 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
5699 Re-add vtable-gc.
5700 (unsupported_options): Correspondingly.
5701
5702 * decl2.c (maybe_make_one_only): Check flag_weak, not
5703 supports_one_only().
5704
1a6025b4
JM
5705 * cp-tree.def (START_CATCH_STMT): Lose.
5706 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
5707 * tree.c (cp_statement_code_p): Don't case it.
5708 * semantics.c (cp_expand_stmt): Likewise.
5709 * cp-tree.h (START_CATCH_TYPE): Lose.
5710 (HANDLER_TYPE): New.
5711 * except.c (expand_start_catch_block): Don't start any blocks.
5712 Return the type.
5713 (expand_end_catch_block): Don't end any blocks.
5714 * parse.y (handler): Don't pass anything from finish_handler_parms
5715 to finish_handler.
5716 * pt.c (tsubst_expr): Likewise.
5717 * semantics.c (begin_handler): Call note_level_for_catch here.
5718 (finish_handler_parms): Don't return anything.
5719 (genrtl_catch_block, begin_catch_block): Lose.
5720 (genrtl_handler): Call expand_start_catch here.
5721
57222001-05-18 Jason Merrill <jason_merrill@redhat.com>
5723
5724 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
5725 (get_vtable_decl, build_vtt): Not here.
5726
d30a825a
NS
57272001-05-20 Nathan Sidwell <nathan@codesourcery.com>
5728
5729 PR c++/2781
5730 * optimize.c (update_cloned_parm): Copy addressability and other
5731 flags.
5732
3b82c249
KL
57332001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5734
5735 * pt.c (determine_specialization): Ignore artificial functions.
5736
2a967f3d
NB
57372001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
5738
5739 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
5740 (C_RID_CODE): Remove.
5741 * lex.c (cxx_init_options): Call set_identifier_size. Update.
5742 (init_parse): Don't do it here.
5743
f99df08e
DN
57442001-05-18 Diego Novillo <dnovillo@redhat.com>
5745
5746 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
5747 function declaration to avoid stripping the symbol's attributes.
5748
2b0cbc5d
NS
57492001-05-18 Nathan Sidwell <nathan@codesourcery.com>
5750
5751 * decl.c (pushdecl): Adjust error string.
5752 (xref_tag): Adjust friend class injection warning. Remove the
5753 inherited name from the class shadowed scope.
5754
e6855a2d
MM
57552001-05-17 Mark Mitchell <mark@codesourcery.com>
5756
5757 * except.c (cp_protect_cleanup_actions): New function.
07167a18 5758 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
5759 here. Do set lang_protect_cleanup_actions.
5760
cc469ee9
NS
57612001-05-16 Nathan Sidwell <nathan@codesourcery.com>
5762
5763 * spew.c (read_token): Call yyerror on all unexpected tokens.
5764
3f0a9b35
NS
57652001-05-16 Nathan Sidwell <nathan@codesourcery.com>
5766
5767 * init.c (member_init_ok_or_else): Take a tree rather than
5768 string for name.
5769 (expand_member_init): Adjust.
5770
8d0cb60d
NC
57712001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
5772
5773 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 5774 decls if the first decl is a friend.
8d0cb60d 5775
1f730ff7
ZW
57762001-05-12 Zack Weinberg <zackw@stanford.edu>
5777
5778 * except.c (choose_personality_routine): Export. Add
5779 explanatory comment. Take an enum languages, not a boolean.
5780 (initialize_handler_parm): Adjust to match.
5781 * cp-tree.h: Prototype choose_personality_routine.
5782 * lex.c (handle_pragma_java_exceptions): New function.
5783 (init_cp_pragma): Register #pragma GCC java_exceptions.
5784
90e0c410
NB
57852001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5786
5787 * method.c (build_mangled_C99_name): Remove unused prototype.
5788
cb7fdde2
AO
57892001-05-12 Alexandre Oliva <aoliva@redhat.com>
5790
5791 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
5792 * typeck.c (get_member_function_from_ptrfunc,
5793 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
5794 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
5795
5796 Reverted Geoff Keating's 2001-05-03's patch.
5797
401deb20
IR
57982001-05-11 Ira Ruben <ira@apple.com>
5799
5800 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
5801
8e93d446
NB
58022001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
5803
5804 * cp-tree.h (finish_label_expr, lookup_label): Delete.
5805 * parse.y: Update for '&&'; don't issue warning here.
5806 * semantics.c (finish_label_expr): Delete.
5807
5cdba4ff
MM
58082001-05-07 Mark Mitchell <mark@codesourcery.com>
5809
5810 * splay-tree.h (splay_tree_max): New function.
5811 (splay_tree_min): Likewise.
5812
8e9eff6b
GK
58132001-05-03 Geoffrey Keating <geoffk@redhat.com>
5814
5815 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
5816 (pfn_vflag_identifier): Define.
5817 Update comment about layout of pointer functions.
5818 (build_ptrmemfunc1): Update prototype.
5819 (expand_ptrmemfunc_cst): Update prototype.
5820 * decl.c (initialize_predefined_identifiers): Initialize
5821 pfn_vflag_identifier.
5822 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
5823 an extra field to the type.
07167a18 5824 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
5825 expand_ptrmemfunc_cst and build_ptrmemfunc1.
5826 * typeck.c (get_member_function_from_ptrfunc): When
5827 FUNCTION_BOUNDARY < 16, look at additional field to determine
5828 if a pointer-to-member is a real pointer or a vtable offset.
5829 (build_ptrmemfunc1): Add new parameter to contain extra field.
5830 (build_ptrmemfunc): Pass the extra field around.
5831 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
5832 (pfn_from_ptrmemfunc): Ignore the extra field.
5833
acc72c37
MM
58342001-05-03 Mark Mitchell <mark@codesourcery.com>
5835
5836 * cp-tree.h (flag_inline_trees): Update documentation.
5837 * decl.c (init_decl_processing): Adjust handling of
5838 flag_inline_functions and flag_inline_trees to support -O3.
5839 (grokfndecl): Set DECL_INLINE on all functions if that's what
5840 the user requested.
5841 (save_function_data): Clear DECL_INLINE in
5842 current_function_cannot_inline is non-NULL.
5843 * decl2.c (flag_inline_trees): Update documentation.
5844
5158d7ee
NS
58452001-05-03 Nathan Sidwell <nathan@codesourcery.com>
5846
5847 * dump.c (cp_dump_tree, USING_STMT case): New case.
5848 * tree.c (cp_statement_code_p): Add USING_STMT.
5849 * decl2.c (do_using_directive): Add the using directive statement.
5850
5851 * tree.c (walk_tree): Reformat an if block.
5852
80f5bb34
MM
58532001-05-02 Mark Mitchell <mark@codesourcery.com>
5854
5855 * decl.c (compute_array_index_type): Don't try to do anything with
5856 the indices when processing a template.
5857
3e411c3f
KG
58582001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5859
5860 * call.c: NULL_PTR -> NULL.
5861 * class.c: Likewise.
5862 * cvt.c: Likewise.
5863 * decl.c: Likewise.
5864 * decl2.c: Likewise.
5865 * except.c: Likewise.
5866 * init.c: Likewise.
5867 * rtti.c: Likewise.
5868 * search.c: Likewise.
5869 * tree.c: Likewise.
5870 * typeck.c: Likewise.
5871 * typeck2.c: Likewise.
5872
46188dca
MM
58732001-05-02 Mark Mitchell <mark@codesourcery.com>
5874
5875 * decl2.c (do_using_directive): Revert previous patch.
5876
9da99f7d
NS
58772001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5878
5879 * cp-tree.def (USING_STMT): New statement node.
5880 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
5881 * decl2.c (do_using_directive): Add USING_STMT to statement
5882 tree. Don't emit errors when processing template decl.
5883 * pt.c (tsubst_expr, USING_STMT case): New case.
5884 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
5885
4b48a93e
NS
58862001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5887
5888 * call.c (build_new_op): Convert args from reference here.
5889 (build_conditional_expr): Don't convert here.
5890
1bcea8d7
NS
58912001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5892
5893 * spew.c (last_token_id): New static variable.
5894 (read_token): Set it here.
5895 (yyerror): Use it here.
5896
d72040f5
RH
58972001-04-30 Richard Henderson <rth@redhat.com>
5898
749ced52 5899 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
5900 * decl.c: Likewise.
5901
c3aac512
MM
59022001-04-30 Mark Mitchell <mark@codesourcery.com>
5903
5904 * gxxint.texi: Remove.
5905 * Make-lang.in: Remove all traces of gxxint.texi.
5906
5fd893d5
MM
5907Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
5908
5909 * decl2.c (start_static_initialization_or_destruction): Correct
5910 logic to handle the -fno-use-cxa-atexit case.
5911
d60e5448
MM
59122001-04-30 Mark Mitchell <mark@codesourcery.com>
5913
5914 * optimize.c (update_cloned_parm): New function.
5915 (maybe_clone_body): Use it. Update the `this' parameter too.
5916
7200764f
JM
59172001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
5918
5919 * decl2.c (unsupported_options): Add new-abi.
5920 * lang-options.h: Remove no longer supported options.
5921
2d46ec83
NS
59222001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5923
5924 * except.c (can_convert_eh): Don't check template parms,
5925 typename types etc.
5926
02a1a68c
NS
59272001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5928
5929 * optimize.c (maybe_clone_body): Copy parameter names and locations.
5930
5f6eeeb3
NS
59312001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5932
5933 * cp-tree.h (adjust_clone_args): Prototype new function.
5934 * class.c (adjust_clone_args): New function.
5935 * decl.c (start_function): Call it for in charge ctors.
5936
1b28d441
MM
59372001-04-26 Mark Mitchell <mark@codesourcery.com>
5938
5939 * method.c (use_thunk): Make sure that thunks really are emitted
5940 when requested.
5941
0576ec13
NS
59422001-04-26 Nathan Sidwell <nathan@codesourcery.com>
5943
5944 * mangle.c (write_chars): New macro.
5945 (hwint_to_ascii): New function
5946 (write_number): Use it.
5947 (write_integer_cst): Deal with really big numbers.
5948
b96ada87
MM
59492001-04-25 Mark Mitchell <mark@codesourcery.com>
5950
5951 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
5952 the clone.
5953
6bda7a5e
NS
59542001-04-25 Nathan Sidwell <nathan@codesourcery.com>
5955
5956 * decl.c (grokdeclarator): Set context of namespace scope
5957 TYPE_DECLS.
5958
11fe225a
ZW
59592001-04-24 Zack Weinberg <zackw@stanford.edu>
5960
5961 * cp/optimize.c: Include hashtab.h.
5962 (struct inline_data): Add tree_pruner.
5963 (expand_call_inline, expand_calls_inline): Use it when calling
5964 walk_tree.
5965 (optimize_function): Initialize and free tree_pruner.
5966
0ba8a114
NS
59672001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5968
5969 Lazy __FUNCTION__ generation.
5970 * cp-tree.def (FUNCTION_NAME): Remove.
5971 * cp-tree.h (function_name_declared_p): Remove.
5972 (cp_fname_init): Prototype.
5973 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
5974 don't call declare_function_name. Call start_fname_decls.
5975 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
5976 clobber the line number.
5977 (cp_fname_init): New function.
5978 (start_function): Call start_fname_decls.
5979 (finish_function): Call finish_fname_decls.
5980 * lex.c (reswords): Add slots for __FUNCTION__ et al.
5981 (rid_to_yy): Add mappings for __FUNCTION__ et al.
5982 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
5983 * parse.y (VAR_FUNC_NAME): New token.
5984 (primary): Add VAR_FUNC_NAME.
5985 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
5986 generation.
5987 (tsubst, FUNCTION_NAME case): Remove.
5988 (tsubst_copy, FUNCTION_NAME case): Remove.
5989 (tsubst_expr, DECL_STMT case): Be careful with a
5990 DECL_PRETTY_FUNCTION_P.
5991 (instantiate_decl): Remove function_name_declared_p.
5992 * semantics.c (begin_compound_statement): Don't call
5993 declare_function_name here.
5994 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
5995 (finish_translation_unit): Call finish_fname_decls.
5996 (expand_body): Remove function_name_declared_p.
5997 * typeck2.c (digest_init): Allow any ERROR_MARK.
5998
dfbb4f34
NS
59992001-04-24 Nathan Sidwell <nathan@codesourcery.com>
6000
6001 * pt.c (tsubst_decl): Use VOID_TYPE_P.
6002 * semantics.c: Fix some typos.
6003
e2584c52
PE
60042001-04-23 Phil Edwards <pme@sources.redhat.com>
6005
6006 * cp/decl2.c (flag_honor_std): Always initialize to 1.
6007
d4c3ec27
KG
60082001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6009
6010 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6011
2ac8a0f9
JM
60122001-04-23 Jason Merrill <jason_merrill@redhat.com>
6013
6014 * except.c (build_throw): Wrap the initialization of the exception
6015 object in a MUST_NOT_THROW_EXPR.
6016 (do_free_exception): #if 0.
6017
968b956a
MM
60182001-04-20 Mark Mitchell <mark@codesourcery.com>
6019
6020 * cp-tree.h (finish_enum): Change prototype.
6021 * decl.c (finish_enum): Reorganize.
6022 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 6023
aa1826e2
NS
60242001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6025
6026 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6027 't' case.
6028
06d9f09f
NS
60292001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6030
6031 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6032 (layout_empty_base): Return at end flag.
6033 (build_base_field): Likewise.
6034 (build_base_fields): Likewise.
6035 (layout_virtual_bases): Don't add 1 to eoc value.
6036 (end_of_class): Use full size for empty bases.
6037 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6038 empty bases. Don't add 1 to eoc value. Only add trailing padding
6039 if we're an empty class with no empty bases.
6040 (dump_class_hierarchy): Dump size and alignment.
6041
351a0f00
JJ
60422001-04-20 Jakub Jelinek <jakub@redhat.com>
6043
6044 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6045 ICS_BAD_FLAG.
6046
881cae05
JJ
60472001-04-20 Jakub Jelinek <jakub@redhat.com>
6048
6049 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6050 is found, look first if name does not match the structure name.
6051
5d2ed28c
MM
60522001-04-19 Mark Mitchell <mark@codesourcery.com>
6053
6054 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6055 set.
6056 (SET_DECL_LANGUAGE): New macro.
6057 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6058 (pushdecl): Likewise.
6059 (build_library_fn_1): Likewise.
6060 (build_cp_library_fn): Likewise.
6061 (grokfndecl): Likewise.
6062 (grokvardecl): Mark `extern "C"' variables as having C linkage.
6063 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6064 * lex.c (retrofit_lang_decl): Likewise.
6065 * mangle.c (mangle_decl_string): Don't mangle the names of
6066 variables declared with C language linkage.
6067 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 6068
41251458
JDA
60692001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
6070
6071 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6072 flag_access_control from uninitialized storage.
6073
1b4a93f7
MM
60742001-04-15 Mark Mitchell <mark@codesourcery.com>
6075
24272dc0
MM
6076 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6077 * mangle.c (write_pointer_to_member_type): Fix mangling of
6078 pointers to cv-qualified member function types.
6079
1b4a93f7
MM
6080 * init.c (build_delete): Create a SAVE_EXPR for the address if
6081 we're going to use it more than once.
6082
530ec96d
MM
60832001-04-13 Mark Mitchell <mark@codesourcery.com>
6084
6085 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6086 (expand_ptremfunc_cst): Change prototype.
6087 (delta2_from_ptrmemfunc): Remove.
6088 * expr.c (cplus_expand_constant): Adjust call to
6089 expand_ptrmemfunc_cst.
6090 * typeck.c (build_ptrmemfunc1): Simplify.
6091 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6092 results in a constant.
6093 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6094 (delta2_from_ptrmemfunc): Remove.
6095 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 6096
ee8fc32b
JM
60972001-04-12 Jason Merrill <jason_merrill@redhat.com>
6098
6099 * cp-tree.h (decl_namespace_list): New macro.
6100 (struct saved_scope): Add decl_ns_list.
6101 * decl.c (mark_saved_scope): Mark it.
6102 * decl2.c: Lose static decl_namespace_list.
6103 (init_decl2): Don't save it.
6104
48857160
KG
61052001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6106
6107 * cp-tree.h (warn_return_type, yylex): Delete redundant
6108 declarations.
11fe225a 6109
48857160
KG
6110 * decl.c (current_class_depth, global_namespace): Likewise.
6111
6112 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6113
6114 * repo.c (flag_use_repository): Likewise.
6115
845e14ed
KG
61162001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6117
6118 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
6119 set_block, pushdecl, getdecls, gettags, init_decl_processing,
6120 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
6121 lvalue_or_else, print_lang_statistics, comp_target_types,
6122 unsigned_type, signed_type, signed_or_unsigned_type,
6123 build_function_call, mark_addressable, incomplete_type_error):
6124 Delete redundant declarations.
6125
1951a1b6
JM
61262001-04-11 Jason Merrill <jason_merrill@redhat.com>
6127
6128 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
6129 (TYPE_ANONYMOUS_P): New macro.
6130 (TAGGED_TYPE_P): New macro.
6131 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
6132 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
6133 * tree.c (no_linkage_helper): Likewise.
6134 * semantics.c (begin_class_definition): Likewise.
6135 * pt.c (convert_template_argument): Likewise.
6136 * lex.c (check_for_missing_semicolon): Likewise.
6137
0fb3018c
NS
61382001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6139
6140 * class.c (dfs_unshared_virtual_bases): New function.
6141 (mark_primary_bases): Call it.
6142 (check_bases): Ignore virtual bases when determining
6143 nearly-emptiness.
6144
bbb53468
NS
61452001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6146
6147 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6148
9b7949d5
MM
61492001-04-11 Mark Mitchell <mark@codesourcery.com>
6150
6151 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6152 cloned function to the clone.
6153
d6684bc8
KG
61542001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6155
6156 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6157
6158 * semantics.c: Include expr.h.
6159
a2095778
NS
61602001-04-11 Nathan Sidwell <nathan@codesourcery.com>
6161
6162 * method.c (implicitly_declare_fn): Commonize code for copy ctor
6163 and assignment op. Set TREE_USED for parameter.
6164
78b45a24
MM
61652001-04-10 Mark Mitchell <mark@codesourcery.com>
6166
6167 * class.c (find_final_overrider_data): Add `candidates'.
6168 (dfs_find_final_overrider): Don't issue error messages
6169 prematurely.
6170 (find_final_overrider): Issue error messages here.
6171 (build_base_field): Don't warn about amgibuous direct bases here.
6172 (warn_about_ambiguous_direct_bases): New function.
6173 (layout_class_type): Use it.
6174
0450d74d
RH
61752001-04-10 Richard Henderson <rth@redhat.com>
6176
6177 * typeck.c (build_array_ref): Push the array reference inside
6178 COMPOUND_EXPR and COND_EXPR.
6179
79065db2
MM
61802001-04-05 Mark Mitchell <mark@codesourcery.com>
6181
6182 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
6183 * decl.c (duplicate_decls): Adjust accordingly.
6184 (maybe_commonize_var): Likewise.
6185 (grokfndecl): Likewise.
6186 (start_function): Likewise.
6187 (start_method): Likewise.
6188 * decl2.c (key_method): Likewise.
6189 (import_export_decl): Likewise.
6190 * method.c (implicitly_declare_fn): Likewise.
6191 * optimize.c (maybe_clone_body): Likewise.
11fe225a 6192
fdecbf8a
BK
61932001-04-05 Benjamin Kosnik <bkoz@redhat.com>
6194
b03eced6 6195 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 6196
0b4c1646
R
6197Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
6198
6199 * search.c (get_dynamic_cast_base_type): When building a new
6200 constant, set its type to ssizetype.
6201
e59d6709
JJ
62022001-04-04 Jakub Jelinek <jakub@redhat.com>
6203
6204 * optimize.c (expand_call_inline): Only add newly inlined statements
6205 into inlined_stmts.
6206
0c918ce5
MM
62072001-04-03 Mark Mitchell <mark@codesourcery.com>
6208
6209 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
6210 (OPERATOR_FORMAT): Likewise.
6211 (OPERATOR_TYPENAME_FORMAT): Likewise.
6212 * operators.def: Remove old name-mangling information.
6213 * decl.c (grok_op_properties): Adjust accordingly.
6214 * lex.c (init_operators): Likewise.
6215 * rtti.c (get_tinfo_decl): Issue error messages about types that
6216 have variable size.
6217
92788413
MM
62182001-04-03 Mark Mitchell <mark@codesourcery.com>
6219
11fe225a 6220 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
6221 when processing an inline member function.
6222 * semantics.c (expand_body): Call import_export_decl before
6223 emitting inline functions.
6224
52a11cbf
RH
62252001-03-28 Richard Henderson <rth@redhat.com>
6226
6227 IA-64 ABI Exception Handling:
6228 * cp-tree.def (EH_SPEC_BLOCK): New.
6229 (MUST_NOT_THROW_EXPR): New.
6230 * cp-tree.h: Update changed function declarations.
6231 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
6232 (CPTI_CALL_UNEXPECTED): New.
6233 (struct cp_language_function): Rename x_eh_spec_try_block
6234 to x_eh_spec_block.
6235 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 6236 * decl.c (current_binding_level): If no current function
52a11cbf
RH
6237 bindings, revert to scope_chain.
6238 (initialize_predefined_identifiers): Remove __cp_push_exception.
6239 (store_parm_decls): Use begin_eh_spec_block.
6240 (finish_function): Use finish_eh_spec_block.
6241 (mark_lang_function): Update for name changes.
6242 * decl2.c (finish_file): No mark_all_runtime_matches.
6243 * dump.c (cp_dump_tree): Handle new tree codes.
6244 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
6245 * except.c (catch_language_init, catch_language): Remove.
6246 (init_exception_processing): Don't set language code.
6247 Initialize call_unexpected_node, protect_cleanup_actions,
6248 eh_personality_libfunc, lang_eh_runtime_type.
6249 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
6250 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
6251 (prepare_eh_type): Split out type canonicalizations ...
6252 (build_eh_type_type): ... from here.
6253 (build_eh_type_type_ref): Remove.
6254 (mark_all_runtime_matches): Remove.
6255 (build_exc_ptr): New.
6256 (do_begin_catch, do_end_catch): New.
6257 (do_pop_exception): Remove.
6258 (build_terminate_handler): Remove.
6259 (choose_personality_routine): Split out language choice from ...
6260 (initialize_handler_parm): ... here.
6261 Use MUST_NOT_THROW_EXPR.
6262 (expand_start_catch_block): Use do_begin_catch. Simplify Java
6263 exception object handling.
6264 (expand_start_eh_spec, expand_end_eh_spec): Remove.
6265 (expand_exception_blocks, alloc_eh_object): Remove.
6266 (begin_eh_spec_block, finish_eh_spec_block): New.
6267 (do_allocate_exception, do_free_exception): New.
6268 (expand_throw): Merge into ...
6269 (build_throw): ... here. Update for abi.
6270 * expr.c (cplus_expand_expr): No expand_internal_throw.
6271 Handle MUST_NOT_THROW_EXPR.
6272 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
6273 * semantics.c (*) Update for except.h name changes.
6274 (genrtl_try_block): No protect_with_terminate.
6275 (genrtl_eh_spec_block): New.
6276 (genrtl_handler): Don't emit the goto here.
6277 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
6278 (genrtl_finish_function): Don't expand_exception_blocks.
6279 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
6280
826840d9
RH
62812001-03-28 Richard Henderson <rth@redhat.com>
6282
6283 * decl.c (struct named_label_list): Rename eh_region to
6284 in_try_scope, add in_catch_scope.
6285 (struct binding_level): Rename eh_region to is_try_scope,
6286 add is_catch_scope.
6287 (note_level_for_try): Rename from note_level_for_eh.
6288 (note_level_for_catch): New.
6289 (poplevel): Copy both is_try_scope and is_catch_scope to
6290 the named_label_list struct.
6291 (check_previous_goto_1): Don't check for catch block via
6292 DECL_ARTIFICIAL; use in_try_scope instead.
6293 (check_goto): Likewise.
6294 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
6295 * except.c (expand_start_catch_block): Call note_level_for_catch.
6296 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
6297
531073e7
RH
62982001-03-27 Richard Henderson <rth@redhat.com>
6299
6300 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
6301 exceptions_via_longjmp.
6302
8653a2c3
PE
63032001-03-27 Phil Edwards <pme@sources.redhat.com>
6304
6305 * pt.c (check_default_tmpl_args): Make error messages clearer.
6306
63072001-03-26 Phil Edwards <pme@sources.redhat.com>
6308
6309 * error.c: Also undefine 'A' macro used for cp_printers definition.
6310
911e6107
KG
63112001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6312
6313 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6314
005a5cb0
MY
63152001-03-26 Mike Yang <yang@research.att.com>
6316 Mark Mitchell <mark@codesourcery.com>
6317
6318 * dump.c (dump_access): New function.
6319 (cp_dump_tree): Use it. Dump basetype information for class
6320 types.
6321
b850de4f
MM
63222001-03-26 Mark Mitchell <mark@codesourcery.com>
6323
6324 * Makefile.in (optimize.o): Depend on params.h.
6325 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
6326 (init_decl_processing): Set flag_no_inline when doing
6327 inlining-on-trees.
6328 * optimize.c: Include params.h.
6329 (struct inline_data): Improve documentation of FNS. Add
6330 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
6331 (INSNS_PER_STMT): New macro.
6332 (remap_block): Use CLONING_P.
6333 (inlinable_function_p): Don't inline big functions.
6334 (expand_call_inline): Keep track of how much inlining we've done.
6335 (optimize_function): Set FIRST_INLINED_FN.
6336 (maybe_clone_body): Set CLONING_P.
6337 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
6338 tree nodes.
6339 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
6340 rest_of_compilation. Clear DECL_RTL for local variables
6341 afterwards.
6342 (clear_decl_rtl): New function.
11fe225a 6343
788bf0e3
NS
63442001-03-26 Nathan Sidwell <nathan@codesourcery.com>
6345
6346 Implement DR 209
6347 * cp-tree.h (skip_type_access_control,
6348 reset_type_access_control): Prototype.
6349 * decl.c (grokdeclarator): Access of friends is not checked.
6350 * parse.y (component_decl_list): Reset type access control.
6351 * semantics.c (decl_type_access_control): Clear
6352 current_type_lookups.
6353 (save_type_access_control): Don't save if not deferring.
6354 (skip_type_access_control, reset_type_access_control): New
6355 functions.
6356 (begin_class_definition): Do type access control for basetypes.
6357 Start deferred access control.
6358 (finish_class_definition): Resume immediate access control if
6359 this is a local class.
6360
730e1556
KG
63612001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6362
6363 * class.c (add_method): Use memcpy/memmove, not bcopy.
6364
6365 * decl.c (duplicate_decls): Likewise.
6366
f1a0345c
JJ
63672001-03-23 Jakub Jelinek <jakub@redhat.com>
6368
6369 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
6370 not `_'.
6371
8e4ce833
JJ
63722001-03-23 Jakub Jelinek <jakub@redhat.com>
6373
6374 * decl.c (local_names): Define.
6375 (push_local_name): New.
6376 (grok_reference_init): Return init if initializing static reference
6377 variable with non-constant instead of emitting it.
6378 Move expand_static_init call to cp_finish_decl.
6379 (layout_var_decl): Call push_local_name.
6380 (maybe_commonize_var): Allow inlining functions even if they have
6381 static local variables, use comdat_linkage for them if flag_weak.
6382 (check_initializer): Call obscure_complex_init if
838dfd8a 6383 grok_reference_init returned nonzero.
8e4ce833
JJ
6384 (save_function_data): Clear x_local_names.
6385 (pop_cp_function_context): Free x_local_names.
6386 (mark_inlined_fns): Remove.
6387 (mark_lang_function): Mark x_local_names.
6388 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
6389 Mark inlined_fns as tree, remove call to mark_inlined_fns.
6390 * class.c (alter_access): Ensure DECL_ACCESS is never set if
6391 DECL_DISCRIMINATOR_P.
6392 * cp-tree.h (cp_language_function): Add x_local_names.
6393 (lang_decl_flags): Add discriminator into u2.
6394 (lang_decl_inlined_fns): Remove.
6395 (lang_decl): inlined_fns is now a TREE_VEC.
6396 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
6397 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
6398 TREE_VEC, not a custom structure.
6399 (optimize_function): Likewise.
6400 * mangle.c (discriminator_for_local_entity): Discriminate among
6401 VAR_DECL local entities.
6402 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
6403 is not valid.
6404
60c87482
BM
64052001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
6406
6407 Add support for Java interface method calls.
6408 * cp-tree.h (struct lang_type): Add java_interface flag.
6409 (TYPE_JAVA_INTERFACE): New macro.
6410 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
6411 by setting TYPE_JAVA_INTERFACE.
6412 * call.c (java_iface_lookup_fn): New static.
11fe225a 6413 (build_over_call): If calling a method declared in a
60c87482
BM
6414 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
6415 expression which resolves the function address.
6416 (build_java_interface_fn_ref): New function.
6417
94c7f30b
RH
64182001-03-22 Richard Henderson <rth@redhat.com>
6419
6420 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
6421 * except.c: Don't include it.
6422
fd8b7a0e 64232001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 6424 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
6425
6426 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
6427 New nonterminals.
6428 (data_def, component_decl): Add reductions to bad_decl.
6429
a1c2b86d
JJ
64302001-03-22 Jakub Jelinek <jakub@redhat.com>
6431
6432 * method.c (do_build_assign_ref): Don't use build_modify_expr for
6433 anonymous aggregates, since they don't have assignment operator
6434 method.
6435 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
6436 assignment operators for anonymous structure fields.
6437
46ccf50a
JM
64382001-03-21 Jason Merrill <jason@redhat.com>
6439
6440 * pt.c (instantiate_decl): Abort if we see a member constant
6441 instantiation that doesn't already have its initializer.
6442 Downgrade explicit instantiation without definition to pedwarn.
6443
6444 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
6445 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
6446 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
6447
6448 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
6449 (pending_vtables): Remove.
6450 * decl2.c (pending_vtables): Remove.
6451 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
6452 CLASSTYPE_VTABLE_NEEDS_WRITING.
6453 (import_export_class): Likewise.
6454 (init_decl2): Don't mark pending_vtables.
6455 * lex.c (handle_pragma_vtable): Just sorry.
6456 * pt.c (instantiate_class_template): Don't mess with
6457 CLASSTYPE_VTABLE_NEEDS_WRITING.
6458 (mark_class_instantiated): Likewise.
6459 * ptree.c (print_lang_type): Don't print it.
6460 * semantics.c (begin_class_definition): Don't set it.
6461
6462 * pt.c (template_tail): Replace with last_pending_template.
6463 (maybe_templates, maybe_template_tail): Remove.
6464 (add_pending_template): Adjust.
6465 (instantiate_pending_templates): Adjust.
6466
6467 * cp-tree.h (struct saved_scope): Remove lang_stack field.
6468 (current_lang_stack): Remove.
6469 * decl.c (maybe_push_to_top_level): Don't initialize it.
6470 (duplicate_decls): Use current_lang_depth.
6471 (xref_basetypes): Likewise.
6472 * class.c (current_lang_depth): New fn.
6473 (push_lang_context): Use more varray functionality.
6474 (pop_lang_context): Likewise.
64d9c3fe
JM
6475
6476 * error.c (GLOBAL_THING): Always use '__'.
6477
1c06710a
MM
64782001-03-21 Mark Mitchell <mark@codesourcery.com>
6479
71cb9286
MM
6480 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
6481
1c06710a
MM
6482 * mangle.c (mangle_decl_string): Mangle the names of overloaded
6483 operators, even when they have `extern "C"' linkage.
6484
92643fea
MM
64852001-03-19 Mark Mitchell <mark@codesourcery.com>
6486
6487 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
6488 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6489 where it's not necessary.
6490 (add_method): Remove optimization involving comparison of
6491 DECL_ASSEMBLER_NAME.
6492 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
6493 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6494 where it's not necessary.
6495 (check_methods): Likewise.
6496 (build_clone): Likewise.
6497 (built_vtt): Likewise.
6498 * cp-tree.h (DECL_NEEDED_P): Likewise.
6499 * decl.c (pushtag): Likewise.
6500 (duplicate_decls): Likewise.
6501 (pushdecl): Likewise.
6502 (builtin_function): Likewise.
6503 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
6504 (build_cp_library_fn): Likewise.
6505 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
6506 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6507 where it's not necessary.
6508 (make_rtl_for_nonlocal_decl): Likewise.
6509 (cp_finish_decl): Likewise.
6510 (grokfndecl): Likewise.
6511 (grokvardecl): Likewise.
6512 (grokdeclarator): Likewise.
6513 (start_function): Likewise.
6514 (cp_missing_return_ok_p): Likewise.
6515 * decl2.c (grokclassfn): Likewise.
6516 (check_classfn): Likewise.
6517 (finish_static_data_member_decl): Likewise.
6518 (grokfield): Likewise.
6519 * error.c (GLOBAL_IORD_P): Remove.
6520 (dump_global_iord): Improve output.
6521 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
6522 * except.c (nothrow_libfn_p): Summarily reject any function not in
6523 namespace-scope.
6524 * init.c (build_java_class_ref): Don't explicitly set
6525 DECL_ASSEMBLER_NAME after calling mangle_decl.
6526 * mangle.c (mangle_decl_string): Handle extern "C" functions.
6527 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
6528 * method.c (set_mangled_name_for_decl): Don't explicitly set
6529 DECL_ASSEMBLER_NAME after calling mangle_decl.
6530 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
6531 IDENTIFIER_GLOBAL_VALUE for the thunk.
6532 * pt.c (set_mangled_name_for_template_decl): Remove.
6533 (check_explicit_specialization): Don't use it.
6534 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
6535 (tsubst_friend_function): Likewise.
6536 (tsubst_decl): Likewise.
6537 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
6538 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
6539 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6540 where it's not necessary.
6541 (tinfo_base_init): Likewise.
6542 (create_real_tinfo_var): Likewise.
6543 * search.c (looup_field_1): Likewise.
6544 * semantics.c (finish_named_return_value): Likewise.
6545 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 6546
d064d75a
GDR
65472001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
6548
6549 Correct semantics restrictions checking in throw-expression.
6550 * except.c (is_admissible_throw_operand): New function.
6551 (build_throw): Use it.
6552
a3eab619
MM
65532001-03-14 Mark Mitchell <mark@codesourcery.com>
6554
6555 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
6556 and its ilk.
6557
19e7881c
MM
65582001-03-14 Mark Mitchell <mark@codesourcery.com>
6559
6560 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6561 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
6562 * decl.c (duplicate_decls): Likewise.
6563 (builtin_function): Likewise.
6564 (build_library_fn): Likewise.
6565 (build_cp_library_fn): Likewise.
6566 (check_initializer): Likewise.
6567 (cp_finish_decl): Likewise.
6568 * decl2.c (grokfield): Likewise.
6569 (grok_function_init): Remove #if 0'd code.
6570 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6571 * friend.c (do_friend): Likewise.
6572 * init.c (get_temp_regvar): Likewise.
6573 * method.c (make_thunk): Likewise.
6574 * pt.c (tsubst_friend_function): Likewise.
6575 (tsubst_decl): Likewise.
6576 (regenerate_decl_from_template): Likewise.
6577 * semantics.c (genrtl_named_return_value): Likewise.
6578 (expand_body): Likewise.
6579 (genrtl_finish_function): Likewise.
6580 * tree.c (cp_tree_equal): Likewise.
11fe225a 6581
78fe06c2
NS
65822001-03-12 Nathan Sidwell <nathan@codesourcery.com>
6583
6584 * call.c (convert_like_real): Add extra semantics to INNER
6585 parameter. Don't convert to temporary if a user conversion
6586 gives us an lvalue that we're about to bind to a reference.
6587 Set INNER to indicate pending reference binding on recursive
6588 calls.
6589
b3e68a79
NB
65902001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
6591
6592 * cp/lex.c: Delete duplicate pending_lang_change.
6593
65942001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
6595
6596 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
6597 Similarly.
6598 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
6599 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
6600
11642c3a
ZW
66012001-03-09 Zack Weinberg <zackw@stanford.edu>
6602
6603 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
6604
bb6852eb 66052001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
6606
6607 * cp-tree.h (set_identifier_local_value): Remove unused decl.
6608
cc937581
ZW
66092001-03-06 Zack Weinberg <zackw@stanford.edu>
6610
6611 * spew.c: Remove references to CPP_OSTRING.
6612
d1188d91
AH
66132001-03-06 Andrew Haley <aph@redhat.com>
6614
6615 * typeck.c (convert_arguments): Check that we have an fndecl.
6616
4eaf1d5b
AH
66172001-03-05 Andrew Haley <aph@redhat.com>
6618
6619 * typeck.c (convert_arguments): Don't do ellipsis conversion for
6620 __built_in_constant_p.
6621
7eeb553c
NS
66222001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6623
6624 * typeck.c (build_static_cast): Allow enum to enum conversions
6625 as per DR 128.
6626
d282fcb2
NS
66272001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6628
6629 * class.c (check_field_decls): Pointers to member do not a
6630 non-pod struct make, as per DR 148.
6631
f86fdf68
NS
66322001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6633
6634 * call.c (joust): cp_pedwarn when using gnu extension concerning
6635 worst conversion sequences.
6636
d6edb99e
ZW
66372001-03-01 Zack Weinberg <zackw@stanford.edu>
6638
6639 * decl.c: Replace all uses of 'boolean' with 'bool'.
6640
f7143427
ZW
66412001-03-01 Zack Weinberg <zackw@stanford.edu>
6642
6643 * lang-specs.h: Add zero initializer for cpp_spec field to
6644 all array elements that need one. Don't put an #ifdef inside
6645 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
6646 use it.
6647
fbfe8c9e
NS
66482001-03-01 Nathan Sidwell <nathan@codesourcery.com>
6649
6650 Implement using decls inside template functions.
6651 * decl2.c (validate_nonmember_using_decl): Don't special case
6652 fake_std_node in the global namespace. Don't reject early when
6653 processing a template.
6654 (do_local_using_decl): Add to statement tree. Don't do further
6655 processing when building a template.
6656 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
6657
4d24a889
NS
66582001-03-01 Nathan Sidwell <nathan@codesourcery.com>
6659
6660 * decl2.c (do_nonmember_using_decl): Don't complain if we find
6661 same function. Do complain about ambiguating extern "C"
6662 declarations.
6663
e5844e6d
NS
66642001-02-28 Nathan Sidwell <nathan@codesourcery.com>
6665
6666 Remove floating point and complex type template constant parms.
6667 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
6668 COMPLEX_TYPE extensions.
6669 (invalid_nontype_parm_type_p): Likewise.
6670
788f238c
JO
66712001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
6672
6673 * except.c (call_eh_info): Revert "match_function"'s type.
6674
73ea87d7
NS
66752001-02-27 Nathan Sidwell <nathan@codesourcery.com>
6676
6677 Fix ctor vtable vcall offsets.
6678 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
6679 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
6680 (get_matching_base): Remove.
6681 (get_original_base): New function.
11fe225a 6682 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
6683 Use a virtual thunk for a ctor vtable with an index
6684 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
6685 primary base within a constructor vtable. Only set
6686 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
6687 when primary base has been lost.
6688 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
6689
fe730161
JO
66902001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
6691
6692 * call.c (joust): Ensure more_specialized()'s argument length
6693 parameter has correct value for constructors.
6694
e5dd4aad
NS
66952001-02-26 Nathan Sidwell <nathan@codesourcery.com>
6696
6697 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 6698
e5dd4aad
NS
6699 * decl.c (mark_inlined_fns): Prototype.
6700
25200ab2
MM
67012001-02-22 Mark Mitchell <mark@codesourcery.com>
6702
6703 * spew.c (yylex): Correct handling of friends.
6704
f58c04ac
MM
67052001-02-22 Mark Mitchell <mark@codesourcery.com>
6706
6707 * mangle.c (write_encoding): Pass write_function_type the
6708 FUNCTION_DECL for the function being encoded.
6709 (write_function_type): Pass it along to write_bare_function_type.
6710 (write_bare_function_type): Pass it along to write_method_parms.
6711 (write_method_parms): Don't mangle the compiler-generated
6712 parameters to a constructor or destructor.
6713
9c96f3f8
AJ
67142001-02-22 Andreas Jaeger <aj@suse.de>
6715
6716 * optimize.c: Include toplev.h for
6717 note_deferral_of_defined_inline_function prototype.
6718
b3bae5e2
JJ
67192001-02-22 Jakub Jelinek <jakub@redhat.com>
6720
6721 * cp-tree.h (struct lang_decl_inlined_fns): New.
6722 (struct lang_decls): Add inlined_fns.
6723 (DECL_INLINED_FNS): New macro.
6724 * optimize.c (struct inline_data): Add inlined_fns.
6725 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
6726 (inlinable_function_p): Likewise, fix typo in comment,
6727 function is not inlinable if it already inlined function currently
6728 being optimized.
306ef644 6729 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
6730 (optimize_function): Initialize inlined_fns.
6731 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
6732 * decl.c (mark_inlined_fns): New function.
6733 (lang_mark_tree): Call it.
6734
5daf7c0a
JM
67352001-02-21 Jason Merrill <jason@redhat.com>
6736
6737 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
6738 (DECL_UNINLINABLE): Move to middle-end.
6739
6740 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
6741 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
6742 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
6743 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
6744 parms and outer BLOCK. note_deferral_of_defined_inline_function.
6745
6746 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
6747 second parm of op=.
6748
2c0fc02d
MM
67492001-02-19 Mark Mitchell <mark@codesourcery.com>
6750
6751 * decl2.c (set_decl_namespace): Allow explicit instantiations in
6752 any namespace.
6753
612164eb
KL
67542001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6755
6756 * optimize.c (expand_call_inline): Don't walk subtrees of type
6757 nodes.
6758
69a59a49
MM
67592001-02-18 Mark Mitchell <mark@codesourcery.com>
6760
6761 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
6762 for a destructor.
6763
e0fff4b3
JM
67642001-02-18 Jason Merrill <jason@redhat.com>
6765
6766 Do put the VTT parameter in DECL_ARGUMENTS.
6767 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
6768 (current_vtt_parm): New macro.
6769 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
6770 (DECL_HAS_VTT_PARM_P): New macro.
6771 (DECL_VTT_PARM): Remove.
6772 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
6773 * decl.c (duplicate_decls): Only copy the operator code if
6774 appropriate.
6775 (start_function): Set current_vtt_parm.
6776 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 6777 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
6778 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
6779 * class.c (build_clone): Maybe remove the VTT parm.
6780 * optimize.c (maybe_clone_body): Set up the VTT parm.
6781 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
6782 * call.c (build_over_call): Just allow the VTT arg.
6783 * method.c (make_thunk): Don't set DECL_VTT_PARM.
6784 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
6785 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
6786 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
6787 * error.c (dump_function_decl): Likewise.
6788 * call.c (build_user_type_conversion_1, convert_like_real): Abort
6789 if we try to call a constructor with in-charge or VTT parms.
6790 * method.c (skip_artificial_parms_for): New fn.
6791 * call.c (add_function_candidate, build_over_call): Call it.
6792 * call.c (build_new_method_call): Use current_vtt_parm.
6793 * init.c (expand_virtual_init): Likewise.
6794 * class.c (same_signature_p): No longer static.
6795 * cp-tree.h: Declare it.
6796 * search.c (look_for_overrides_r): Use it.
6797
c750255c
MM
67982001-02-17 Mark Mitchell <mark@codesourcery.com>
6799
8fa33dfa
MM
6800 * cp-tree.h (new_abi_rtti_p): Remove.
6801 (name_mangling_version): Likewise.
6802 (flag_do_squangling): Likewise.
6803 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
6804 * decl.c (grokfndecl): Likewise.
6805 * decl2.c (name_mangling_version): Remove.
6806 (flag_do_squangling): Likewise.
6807 (lang_f_options): Remove `squangle'.
6808 (unsupported_options): Add `squangle'.
6809 (cxx_decode_option): Issue a warning about uses of
6810 -fname-mangling-version.
6811 (finish_file): Remove old ABI support.
6812 * pt.c (check_explicit_specialization): Likewise.
6813 (tsubst_decl): Likewise.
6814 * rtti.c (init_rtti_processing): Likewise.
6815 (build_headof): Likewise.
6816 (get_tinfo_decl_dynamic): Likewise.
6817 (tinfo_from_decl): Likewise.
6818 (build_dynamic_cast_1): Likewise.
6819 (synthesize_tinfo_var): Likewise.
12fa82db
MM
6820 * init.c (build_new): Allow enumeration types for the array-bounds
6821 in a direct-new-declarator.
6822
6823 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
6824
c750255c
MM
6825 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
6826 TREE_PROTECTED from the template being specialized.
6827
a714e5c5
JM
68282001-02-17 Jason Merrill <jason@redhat.com>
6829
6830 * decl2.c (build_artificial_parm): Set TREE_READONLY.
6831
9c96f3f8 6832 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
6833 pointer-to-function or -member-function type.
6834 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
6835 a pmf.
6836
8084b91e
MM
68372001-02-17 Mark Mitchell <mark@codesourcery.com>
6838
6839 * call.c (check_dtor_name): Handle template names correctly.
6840
48f22ed2
JM
68412001-02-16 Jason Merrill <jason@redhat.com>
6842
6843 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
6844 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
6845 * optimize.c (maybe_clone_body): Don't substitute it.
6846 * call.c (build_new_method_call): Check in_chrg instead.
6847 * init.c (expand_virtual_init): Likewise.
6848
e8186ecf
GDR
68492001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
6850
6851 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
6852 class-type introduces at least a type-name.
6853
2c1be322
JJ
68542001-02-16 Jakub Jelinek <jakub@redhat.com>
6855
6856 * call.c (convert_like_real): Create a temporary for non-lvalue.
6857
aab8454a
JO
68582001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
6859
6860 * cp-tree.h: Fix typos in comments.
6861
a901fa64
JM
68622001-02-16 Jason Merrill <jason@redhat.com>
6863
6864 * optimize.c (remap_block): If we're compiling a clone, pass the
6865 new block to insert_block.
6866
8853373c
MM
68672001-02-16 Mark Mitchell <mark@codesourcery.com>
6868
6869 * semantics.c (finish_asm_stmt): Robustify.
6870
b60ecc04
MM
68712001-02-15 Mark Mitchell <mark@codesourcery.com>
6872
6873 * pt.c (push_template_decl_real): Don't remangle the name of a
6874 class template.
6875
e658449e
JM
68762001-02-15 Jim Meyering <meyering@lucent.com>
6877
fd48c9b5
DD
6878 * Make-lang.in (c++.install-common): Depend on installdirs.
6879 (c++.install-info): Likewise.
6880 (c++.install-man): Likewise.
e658449e 6881
f1a3f197
MM
68822001-02-15 Mark Mitchell <mark@codesourcery.com>
6883
6884 * typeck2.c (build_m_component_ref): Robustify.
6885
8826b15b
AO
68862001-02-15 Alexandre Oliva <aoliva@redhat.com>
6887
6888 * friend.c (do_friend): Don't take the nested [template] class
6889 into account when deciding whether to warn about the friend
6890 function not referring to a template function.
6891
7161c1a5
JJ
68922001-02-14 Jakub Jelinek <jakub@redhat.com>
6893
6894 * typeck.c (build_unary_op): Clarify error message.
6895
4806765e
AH
68962001-02-08 Aldy Hernandez <aldyh@redhat.com>
6897
a901fa64
JM
6898 * parse.y (component_constructor_declarator): allow optional
6899 parentheses around constructor class name.
4806765e 6900
bfc8e1e2
NS
69012001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6902
6903 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
6904 section.
6905 * init.c (emit_base_init): Remove incorrect comment about
6906 virtual bases.
6907 * method.c (make_thunk): Fix comment alignment.
6908
394fd776
NS
69092001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6910
6911 Kill remnants of this is variable.
6912 * cp-tree.h (flag_this_is_variable): Remove.
6913 * decl2.c (flag_this_is_variable): Remove.
6914 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
6915 (build_vbase_path): The path is non-static, even in a cdtor.
6916 (resolves_to_fixed_type_p): Add additional return value.
6917 * search.c (init_vbase_pointers): Adjust.
6918 * tree.c (lvalue_p_1): Adjust.
6919 * typeck.c (mark_addressable): Adjust.
6920
d0ab7624
NS
69212001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6922
6923 * pt.c (unify): Don't check cv quals of array types.
6924
7773899b
NS
69252001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6926
6927 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
6928 check whether we already have the type.
6929
52682a1b
MM
69302001-02-13 Mark Mitchell <mark@codesourcery.com>
6931
6932 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
6933 * call.c (build_op_delete_call): Simplify to remove duplicate
6934 code.
6935 * class.c (clone_function_decl): Don't build the deleting variant
6936 of a non-virtual destructor.
6937 * decl.c (finish_destructor_body): Don't call delete if this is a
6938 non-virtual destructor.
6939 * init.c (build_delete): Explicitly call `operator delete' when
6940 deleting an object with a non-virtual destructor.
9c96f3f8 6941
3b6bd115
JM
69422001-02-13 Jason Merrill <jason@redhat.com>
6943
6944 * lang-specs.h: Add more __EXCEPTIONS.
6945
45abaea8
NS
69462001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6947
6948 * typeck2.c (process_init_constructor): Check
6949 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
6950
996065b4
NS
69512001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6952
6953 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
6954 Remove spurious information in comment. Allow further
6955 adjustments of REFERENCE_TYPE args.
6956
82c18d5c
NS
69572001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6958
6959 * errfn.c (cp_deprecated): Tweak diagnostic text.
6960 * parse.y (new_initializer): Deprecate initializer lists
6961 extension.
6962
1f84ec23
MM
69632001-02-12 Mark Mitchell <mark@codesourcery.com>
6964
6965 Remove old ABI support.
6966
8c310e3f
MM
69672001-02-11 Mark Mitchell <mark@codesourcery.com>
6968
b1012f1b
MM
6969 * decl2.c (flag_vtable_thunks): Always set it to 1.
6970 (flag_new_abi): Likewise.
6971 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 6972
8c310e3f
MM
6973 * Makefile.in (g++spec.o): Fix typo.
6974
3b635dfc
JM
69752001-02-09 Jason Merrill <jason@redhat.com>
6976
6977 * lang-specs.h: Restore definition of __EXCEPTIONS.
6978
bd0d5d4a
JM
69792001-02-08 Jason Merrill <jason@redhat.com>
6980
6981 * search.c (shared_member_p): New function.
6982 (lookup_field_r): Use it.
6983 * cp-tree.h (SHARED_MEMBER_P): Remove.
6984
6985 * method.c (process_overload_item): Handle template-dependent array
6986 bounds.
6987 * pt.c (type_unification_real): If we end up with undeduced nontype
6988 parms, try again.
6989
6990 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
6991 types.
6992
6993 * typeck2.c (friendly_abort): Don't say anything if we have
6994 earlier errors or sorries.
6995
9c96f3f8 6996 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
6997 wchar_t. Ignore if in_system_header.
6998
6999 * decl.c (maybe_push_cleanup_level): New fn...
7000 (start_decl_1): ...split out from here.
7001 * cvt.c (build_up_reference): Use it.
7002 * cp-tree.h: Declare it.
7003
a9374841
MM
70042001-02-07 Mark Mitchell <mark@codesourcery.com>
7005
9c96f3f8 7006 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
7007 spec.
7008
a87b4257
NS
70092001-02-06 Nathan Sidwell <nathan@codesourcery.com>
7010
7011 * pt.c (lookup_template_class): Make sure it's a primary
7012 template or template_template_parm when called from the parser.
7013 (instantiate_template_class): Add assertion.
7014
518fed76
AO
70152001-02-05 Alexandre Oliva <aoliva@redhat.com>
7016
7017 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7018 from error_mark_node.
7019
9965d119
NS
70202001-02-05 Nathan Sidwell <nathan@codesourcery.com>
7021
7022 Fix specification and implementation bugs in V3 ABI
7023 construction vtables.
7024 * cp-tree.h (flag_dump_class_layout): New flag.
7025 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7026 (BINFO_LOST_PRIMARY_P): New flag.
7027 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7028 (BINFO_PRIMARY_MARKED_P): Rename to ...
7029 (BINFO_PRIMARY_P): ... here.
7030 (binfo_via_virtual): New prototype.
7031 * decl2.c (flag_dump_class_layout): New flag.
7032 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7033 use `=' as a file name separator.
7034 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7035 bases.
7036 (build_vtbl_address): If this is a virtual primary base, then
7037 get the vtbl of what it is ultimately primary for.
7038 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7039 for BINFO_PRIMARY_P.
7040 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7041 (get_shared_vbase_if_not_primary): Likewise.
7042 (dfs_get_pure_virtuals): Likewise.
7043 (expand_upcast_fixups): Likewise.
7044 (fixup_virtual_upcast_offsets): Likewise.
7045 (dfs_find_vbase_instance): Likewise.
7046 (find_vbase_instance): Likewise.
7047 (binfo_from_vbase): Adjust comment to reflect reality.
7048 (binfo_via_virtual): New function.
7049 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7050 for binfo walking during VTT construction.
7051 (dfs_mark_primary_bases): Remove.
7052 (force_canonical_binfo_r): New function.
7053 (force_canonical_binfo): New function.
7054 (mark_primary_virtual_base): New function.
7055 (mark_primary_bases): Walk in inheritance graph order, use
7056 mark_primary_virtual_base.
7057 (determine_primary_base): Use some more intermediate variables.
7058 (dfs_find_final_overrider): Don't check for overriding along a
7059 virtual path.
7060 (dfs_modify_vtables): Walk into primary virtual bases too.
7061 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7062 (build_base_fields): Likewise.
7063 (dfs_set_offset_for_unshared_vbases): Likewise.
7064 (layout_virtual_bases): Likewise.
7065 (end_of_class): Likewise.
7066 (finish_struct_1): Call dump_class_hierarchy, if requested.
7067 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7068 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7069 (dump_class_hierarchy): Add file parameter. Append to file, if
7070 required.
7071 (finish_vtbls): Adjust accumulate_vtbl_inits call.
7072 Use canonical base for virtual bases.
7073 (build_vtt): Add more comments. Adjust build_vtt_inits call.
7074 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7075 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7076 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7077 virtual VTTs.
7078 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7079 from DATA. We want virtual primary bases and all bases via virtual.
7080 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7081 virtual base when not a construction vtable.
7082 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7083 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7084 Use canonical bases when processing virtual bases.
7085 (accumulate_vtbl_inits): We're interested in any base via a
7086 virtual path.
7087 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7088 within a construction vtable, determine what is being overridden.
7089 (build_vtbl_initializer): Add more comments
7090 (add_vcall_offset_vtbl_entries_1): Adjust comment.
7091 (build_rtti_vtbl_entries): Check if the base has lost its
7092 primary.
7093
39d6f2e8
MM
70942001-02-05 Mark Mitchell <mark@codesourcery.com>
7095
7096 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7097
400500c4
RK
7098Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7099
7100 * decl.c (pushdecl): Call abort instead of fatal.
7101 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
7102 * init.c (build_new_1): Likewise.
7103 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
7104 * decl.c (build_typename_type): hash_table_init now returns void.
7105 decl.c (init_decl_processing): Make an error non-fatal.
7106
97458258
MM
71072001-02-04 Mark Mitchell <mark@codesourcery.com>
7108
7109 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
7110 Document.
7111 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7112 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7113 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7114 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7115 * decl.c (maybe_commonize_var): Use the new name-mangling where
7116 appropriate.
7117 * decl2.c (comdat_linkage): Enhance comments. Make all
7118 compiler-generated things static, if COMDAT is not available.
7119 (get_tinfo_decl): Do not make typeinfo objects that belong in the
7120 library COMDAT.
7121 (tinfo_base_init): Use the correct mangled name for typeinfo
7122 strings, and push them into the global scope.
7123 (typeinfo_in_lib_p): New function.
7124 (synthesize_tinfo_var): Use it.
7125 (create_real_tinfo_var): Likewise.
9c96f3f8 7126
55de1b66
JJ
71272001-02-03 Jakub Jelinek <jakub@redhat.com>
7128
7129 * decl.c (push_class_binding): Use context_for_name_lookup instead
7130 of CP_DECL_CONTEXT.
7131 * search.c (context_for_name_lookup): Remove static. Check for NULL
7132 context in the loop.
7133 * cp-tree.h (context_for_name_lookup): Add prototype.
7134
e92730aa
JJ
71352001-02-02 Jakub Jelinek <jakub@redhat.com>
7136
7137 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7138 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7139 Remove.
7140 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7141 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7142
049f6ec9
MM
71432001-02-02 Mark Mitchell <mark@codesourcery.com>
7144
7145 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
7146 of macros used when compiling g++spec.c.
7147 * g++spec.c (lang_specific_driver): Link with the shared
7148 libgcc by default.
7149
718b8ea5
JM
71502001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
7151
7152 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
7153 make_reference_declarator, make_call_declarator), method.c
7154 (implicitly_declare_fn), parse.y (namespace_using_decl,
7155 notype_unqualified_id, expr_or_declarator, new_type_id,
7156 after_type_declarator, direct_after_type_declarator,
7157 notype_declarator, complex_notype_declarator,
7158 complex_direct_notype_declarator, qualified_id,
7159 notype_qualified_id, overqualified_id, direct_new_declarator,
7160 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
7161 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
7162 instead of build_parse_node.
7163
f2d1f0ba
KG
71642001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7165
7166 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
7167 (minus_one_node): Moved to top level gcc directory. Renamed
7168 to integer_minus_one_node.
7169
7170 * init.c (init_init_processing): Don't set minus_one_node.
7171 (build_vec_init): Use integer_minus_one_node.
7172
7173 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7174
6001735e
JJ
71752001-01-28 Jakub Jelinek <jakub@redhat.com>
7176
7177 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
7178 identical and they would be replaced with constant, remove
7179 MODIFY_EXPR from the tree.
7180
c913b6f1
KG
71812001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7182
7183 * Make-lang.in: Remove all dependencies on defaults.h.
7184 * call.c: Don't include defaults.h.
7185 * decl.c: Likewise.
7186 * decl2.c: Likewise.
7187 * except.c: Likewise.
7188 * pt.c: Likewise.
7189 * rtti.c: Likewise.
7190 * tree.c: Likewise.
7191 * typeck.c: Likewise.
7192
324ffb8c
JJ
71932001-01-25 Jakub Jelinek <jakub@redhat.com>
7194
7195 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
7196 operators even in "C" linkage.
7197 * method.c (set_mangled_name_for_decl): Likewise.
7198 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
7199 overloaded operators in "C" linkage.
7200
4b2811e9
NS
72012001-01-24 Nathan Sidwell <nathan@codesourcery.com>
7202
7203 * pt.c (tsubst_decl): Remove IN_DECL parameter.
7204 (tsubst_arg_types): Check parameter is not void.
7205 (tsubst): Adjust tsubst_decl call.
7206
d8caf48e
NS
72072001-01-24 Nathan Sidwell <nathan@codesourcery.com>
7208
7209 * call.c (add_builtin_candidate): Quote std properly, from
7210 previous change.
7211
08511114
KL
72122001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7213
7214 * pt.c (check_explicit_specialization): Clone constructors and
7215 destructors.
7216
92ecdfb7
NS
72172001-01-23 Nathan Sidwell <nathan@codesourcery.com>
7218
7219 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
7220 indicates anything special about template depth. Make sure we
7221 only count the user visible template classes.
7222
4cff6abe
NS
72232001-01-23 Nathan Sidwell <nathan@codesourcery.com>
7224
7225 * call.c (build_conv): Typo in comment.
7226 (add_builtin_candidate): Add more explanation.
7227 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
7228 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
7229 when we have enumeral types.
7230 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
7231 candidates for relops and eqops.
7232 (joust): Simplify control flow. Allow a non-template user
7233 function to hide a builtin.
7234
62e4a758
NS
72352001-01-22 Nathan Sidwell <nathan@codesourcery.com>
7236
7237 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
7238 (more_specialized): Add deduction parameter.
7239 * call.c (joust): Adjust more_specialized call.
7240 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
7241 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
7242 (get_bindings_order): Remove.
7243 (get_bindings_real): Add DEDUCE parameter.
7244 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
7245 REFERENCE_TYPE jig for DEDUCE_ORDER.
7246 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
7247 maybe_adjust_types_for_deduction.
7248 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
7249 directly.
7250 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
7251 (check_cv_quals_for_unify): Use new unify qualifier flags.
7252 (unify): Clear new unify qualifier flags.
7253 (get_bindings_real): Add DEDUCE parameter.
7254 (get_bindings): Adjust call to get_bindings_real.
7255 (get_bindings_overload): Likewise.
7256 (most_specialized_instantiation): Adjust call to
7257 more_specialized.
7258
2a2a9e5a
JM
72592001-01-19 Jason Merrill <jason@redhat.com>
7260
7261 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
7262
7263 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
7264 -fnew-abi.
7265
60696c53
JM
72662001-01-19 Ute Pelkmann <scope.muc@t-online.de>
7267
7268 * decl2.c (arg_assoc_class): Fix double iteration logic.
7269
72702001-01-19 Jason Merrill <jason@redhat.com>
7271
7272 * init.c (build_delete): Always call convert_force to strip cv-quals.
7273
7274 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
7275 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
7276 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
7277
1e00f18c
NS
72782001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7279
7280 * search.c (get_vbase_1): Count only virtual bases.
7281
e13bced2
NS
72822001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7283
7284 * class.c (duplicate_tag_error): Robustify flag clearing.
7285
f9c244b8
NS
72862001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7287
7288 * cp-tree.h (lookup_template_class): Add complain parm.
7289 * decl.c (lookup_namespace_name): Adjust call to
7290 lookup_template_class.
7291 (make_typename_type): Likewise.
7292 * semantics.c (finish_template_type): Likewise.
7293 * pt.c (lookup_template_class): Add complain parm. Adjust.
7294 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
7295 (tsubst): Likewise.
7296
08c2df0f
NS
72972001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7298
7299 * pt.c (copy_default_args_to_explicit_spec): Preserve
7300 object's CV quals. Reorganize.
7301
f5ceeec8
NS
73022001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7303
7304 * typeck.c (build_modify_expr): Say `initialization' for
7305 INIT_EXPRs.
7306 * init.c (build_default_init): Convert to enumeral type, if
7307 needed.
7308
a1cfa434
JJ
73092001-01-18 Jakub Jelinek <jakub@redhat.com>
7310
7311 * parse.y (nomods_initdcl0): Properly set things up for
7312 initdcl0_innards.
7313
028d1f20
NS
73142001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7315
7316 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
7317 (type_unification_real): Set it.
7318 (unify): Use it.
7319
9f724b6a
NS
73202001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7321
7322 * decl.c (finish_destructor_body): Convert to vbase pointer here.
7323
522d6614
NS
73242001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7325
7326 * semantics.c (begin_class_definition): Check we're not inside a
7327 template parm list.
7328
7f805b8f
NS
73292001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7330
7331 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
7332 BASELINK_P.
7333
dc3799c1
KL
73342001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7335
7336 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
7337 * call.c (build_over_call): Add comment.
7338
bb37c4a5
DB
73392001-01-16 Daniel Berlin <dberlin@redhat.com>
7340
826840d9
RH
7341 * cvt.c (ocp_convert): Handle vector type conversion
7342 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 7343
a26e7fb5
PE
73442001-01-16 Phil Edwards <pme@sources.redhat.com>
7345
7346 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
7347 was given.
7348
11b810f1
NS
73492001-01-15 Nathan Sidwell <nathan@codesourcery.com>
7350
7351 * pt.c (check_nontype_parm): Rename to ...
7352 (invalid_nontype_parm_type_p): ... here.
7353 (process_template_parm): Adjust.
7354 (convert_template_argument): Adjust.
7355
db3f4e4e
NS
73562001-01-15 Nathan Sidwell <nathan@codesourcery.com>
7357
7358 * pt.c (check_nontype_parm): New function.
7359 (process_template_parm): Use it.
7360 (convert_template_argument): Use it.
7361 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
7362 member.
7363
ea4f1fce
JO
73642001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
7365
7366 * tree.c: Add defaults.h
7367 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
7368 * Make-lang.in (cp/tree.o): Add defaults.h.
7369
1312c143
JM
73702001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7371
7372 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
7373
4bc1997b
JM
73742001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7375
7376 * g++.1: Change to be ".so man1/gcc.1".
7377
23de1fbf
JM
73782001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7379
7380 * Make-lang.in (c++.info, c++.install-info): Build and install g++
7381 internals info.
7382 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
7383 ($(srcdir)/cp/g++int.info): New target.
7384 * gxxint.texi: Add info directory entry. Use @@ in email address.
7385 * .cvsignore: Update.
7386
0949f723
NS
73872001-01-12 Nathan Sidwell <nathan@codesourcery.com>
7388
7389 * typeck.c (build_c_cast): Do template processing earlier.
7390 Always pedwarn on array casts.
7391
a8641661
NS
73922001-01-12 Nathan Sidwell <nathan@codesourcery.com>
7393
7394 * friend.c (make_friend_class): Make sure a templated class is
7395 actually a template.
7396
844511c8
NS
73972001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7398
7399 * decl2.c (get_guard): Set linkage from guarded decl.
7400
96a1e32d
NS
74012001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7402
7403 * call.c (convert_default_arg): Check for unprocessed
7404 DEFAULT_ARG.
7405 * cp-tree.h (replace_defarg): Move to spew.c.
7406 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
7407 spew.c, which is where they really are.
7408 (done_pending_defargs): Declare.
7409 (unprocessed_defarg_fn): Declare.
7410 * decl.c (replace_defarg): Move to spew.c
7411 * parse.y (structsp): Call done_pending_defargs.
7412 * spew.c (defarg_fns): Rearrange list structure.
7413 (defarg_fnsdone): New static variable.
7414 (defarg_depfns): New static variable.
7415 (init_spew): Adjust.
7416 (add_defarg_fn): Store the type in TREE_TYPE.
7417 (do_pending_defargs): Detect and deal with ordering constraints
7418 and circularity.
7419 (done_pending_defargs): New function.
7420 (unprocessed_defarg_fn): New function.
7421 (replace_defarg): Moved from decl.c. Robustify. Don't save
7422 if circularity detected.
7423
34e225a3
NS
74242001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7425
7426 * pt.c (unify): Check array has a domain, before checking
7427 whether it is variable sized.
7428
98979fe0
NS
74292001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7430
7431 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
7432 parameters with pointers to arrays of unknown bound.
7433
b37bf5bd
NS
74342001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7435
7436 * parse.y (template_parm_header, template_spec_header): New
7437 reductions. Split out from ...
7438 (template_header): ... here. Use them.
7439 (template_template_parm): Use template_parm_header.
7440 * semantics.c (finish_template_template_parm): Add assert.
7441
6c418184
MM
74422001-01-10 Mark Mitchell <mark@codesourcery.com>
7443
792508b5
MM
7444 * mangle.c (write_builtin_type): Fix thinko.
7445
8afa707f
MM
7446 * pt.c (copy_default_args_to_explicit_spec_1): New function.
7447 (copy_default_args_to_explicit_spec): Likewise.
7448 (check_explicit_specialization): Use it.
7449
6c418184
MM
7450 * class.c (finish_struct_1): Remove last argument in call to
7451 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7452 * decl.c (builtin_function): Likewise.
7453 (build_cp_library_fn): Likewise.
7454 (check_initializer): Likewise.
7455 (make_rtl_for_nonlocal_decl): Likewise.
7456 (cp_finish_decl): Likewise.
7457 (start_function): Likewise.
7458 * decl2.c (finish_anon_union): Likewise.
7459 * friend.c (do_friend): Likewise.
7460 * init.c (build_java_class_ref): Likewise.
7461 * method.c (make_thunk): Likewise.
7462 * pt.c (tsubst_friend_function): Likewise.
7463 * semantics.c (expand_body): Likewise.
7464
31d95fc6
MM
74652001-01-10 Mark Mitchell <mark@codesourcery.com>
7466
7467 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
7468 looking at DECL_CLONED_FUNCTION for non-functions.
7469
31bb3027
NS
74702001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7471
7472 * error.c (dump_template_parameter): Use parm to determine how
7473 to print default value.
7474
fd3f43e7
NS
74752001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7476
7477 * class.c (duplicate_tag_error): Clear more flags.
7478
042b4c4e
NS
74792001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7480
7481 * call.c (build_new_method_call): Use binfo_for_vbase.
7482
a7537031
JM
74832001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
7484
7485 * cp-tree.h (flag_cond_mismatch): Don't declare.
7486 * decl2.c (flag_cond_mismatch): Don't define.
7487 (lang_f_options): Remove cond-mismatch.
7488 (unsupported_options): Add cond-mismatch.
7489
186c0fbe
NS
74902001-01-09 Nathan Sidwell <nathan@codesourcery.com>
7491
7492 * class.c (handle_using_decl): Reject using of constructor name
7493 of sourcing class. Allow injecting of a method with same name as
7494 nested class. Fixup error messages.
7495
28ec8d6b
JM
74962001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
7497
7498 * decl2.c (lang_decode_option): Handle -Wformat=2.
7499
3febd123
NS
75002001-01-08 Nathan Sidwell <nathan@codesourcery.com>
7501
7502 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
7503 initialized_in_class.
7504 (DECL_DEFINED_IN_CLASS_P): Rename to ...
7505 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
7506 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
7507 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
7508 * pt.c (check_default_tmpl_args): Adjust for
7509 DECL_INITIALIZED_IN_CLASS_P.
7510 (instantiate_class_template): Likewise.
7511 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 7512
3febd123
NS
7513 * class.c (finish_struct): Constify saved_filename.
7514
1f0d71c5
NS
75152001-01-08 Nathan Sidwell <nathan@codesourcery.com>
7516
7517 * class.c (duplicate_tag_error): Adjust diagnostic.
7518 (finish_struct): Locally set location to start of struct.
7519 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
7520
5bf15e84 75212001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
7522
7523 * decl.c (struct binding_level): Adjust class_shadowed comments
7524 to reflect reality.
aba649ba 7525 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
7526 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
7527 Don't set TREE_VALUE on the class_shadowed list.
7528
23d4e4cc 75292001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
7530
7531 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
7532 * init.c (build_java_class_ref): When using the new ABI, search
7533 `class$' and have it mangled with `mangle_decl.'
7534 * mangle.c (write_java_integer_type_codes): New function.
7535 (write_builtin_type): Detect and mangle Java integer and real
7536 types.
9c96f3f8 7537
0c58da3e
MM
75382001-01-07 Mark Mitchell <mark@codesourcery.com>
7539
7540 * decl2.c (grokfield): Don't accept `asm' specifiers for
7541 non-static data members.
7542
45b8ddb4
KG
75432001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7544
7545 * expr.c (cplus_expand_expr): Don't reset `target'.
7546
96302433
NB
75472001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
7548
826840d9 7549 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 7550
220bce48
NS
75512001-01-05 Nathan Sidwell <nathan@codesourcery.com>
7552
7553 * parse.y (template_datadef): Check for error_mark_node.
7554
bfa2cb33
NS
75552001-01-05 Nathan Sidwell <nathan@codesourcery.com>
7556
7557 * cp-tree.def (DEFAULT_ARG): Make `x' class.
7558
eaa7c03f
JM
75592001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
7560
7561 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
7562 (record_builtin_type): Make non-static.
7563 (flag_short_double): Don't declare.
7564 (init_decl_processing): Remove the creation of many tree nodes now
7565 in c_common_nodes_and_builtins.
7566 (build_void_list_node): New function.
7567 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
7568 * cp-tree.h (flag_short_wchar): Don't declare.
7569
3af4c257
MM
75702001-01-04 Mark Mitchell <mark@codesourcery.com>
7571
7572 * call.c (build_conv): Don't use build1 for USER_CONV.
7573 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
7574
03dc0325
JM
75752001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
7576
7577 * lex.c (lang_init): Call c_common_lang_init.
7578
3c505507
NS
75792001-01-03 Nathan Sidwell <nathan@codesourcery.com>
7580
7581 * search.c (lookup_fnfields_here): Remove.
7582 (look_for_overrides_r): Use lookup_fnfields_1.
7583 Ignore functions from using declarations.
7584
03378143
NS
75852001-01-03 Nathan Sidwell <nathan@codesourcery.com>
7586
7587 Implement exceptions specifiers for implicit member functions.
7588 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
7589 * method.c (synthesize_exception_spec): New function.
7590 (locate_dtor, locate_ctor, locate_copy): New functions.
7591 (implicitly_declare_fn): Generate the exception spec too.
7592 * search.c (check_final_overrider): Check artificial functions
7593 too.
9c96f3f8 7594 * typeck2.c (merge_exception_specifiers): New function.
03378143 7595
f30efcb7
JM
75962001-01-03 Jason Merrill <jason@redhat.com>
7597
7598 * init.c (build_default_init): New fn.
7599 (perform_member_init): Split out from here.
7600 (build_new_1): Use it. Simplify initialization logic.
7601 (build_vec_init): Take an array, rather than a pointer and maxindex.
7602 Speed up simple initializations. Don't clean up if we're assigning.
7603 * cp-tree.h: Adjust.
7604 * decl2.c (do_static_initialization): Remove TREE_VEC case.
7605 * parse.y (new_initializer): Return void_zero_node for ().
7606 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
7607 * typeck2.c (digest_init): Only complain about user-written
7608 CONSTRUCTORs.
7609
a412bf75
MS
76102000-12-22 Mike Stump <mrs@wrs.com>
7611
7612 * decl2.c: (max_tinst_depth): Increase to 50.
7613
4890c2f4
MM
76142001-01-02 Mark Mitchell <mark@codesourcery.com>
7615
7616 * class.c (invalidate_class_lookup_cache): Zero the
7617 previous_class_values.
7618 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
7619 TREE_INT_CST_HIGH.
7620 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
7621 * decl.c (free_bindings): New variable.
7622 (push_binding): Don't create a new binding if we have one on the
7623 free list.
7624 (pop_binding): Put old bindings on the free list.
7625 (init_decl_processing): Use size_int, not build_int_2.
7626 Register free_bindings as a GC root.
7627 (cp_make_fname_decl): Use size_int, not build_int_2.
7628 (push_inline_template_parms_recursive): Likewise.
7629 (end_template_parm_list): Likewise.
688f6688 7630 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
7631 (tsubst_template_parms): Use size_int, not build_int_2.
7632 (tsubst): Likewise.
7633 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 7634
4f78b9a8
RH
76352001-01-02 Richard Henderson <rth@redhat.com>
7636
7637 * parse.y (asm): Set ASM_INPUT_P.
7638
3c8c2a0a
JM
76392001-01-02 Jason Merrill <jason@redhat.com>
7640
96d6c610
JM
7641 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
7642 for v3 ABI.
7643
7644 * typeck.c (cp_truthvalue_conversion): New fn.
7645 * cvt.c (ocp_convert): Use it.
7646
7647 * cp-tree.h: Lose c-common.c decls.
7648
7649 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
7650 * cvt.c (convert_to_void): Use type_unknown_p.
7651
9c96f3f8 7652 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
7653 pointer-to-member types.
7654
7655 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
7656 parse.y as C.
7657
7658 * call.c (build_new_method_call): Do evaluate the object parameter
7659 when accessing a static member.
7660 * typeck.c (build_component_ref): Likewise.
7661
d363e7bf
AJ
76622001-01-02 Andreas Jaeger <aj@suse.de>
7663
7664 * decl.c (cp_missing_noreturn_ok_p): New.
7665 (init_decl_processing): Set lang_missing_noreturn_ok_p.
7666
77f5250d
JJ
76672000-12-29 Jakub Jelinek <jakub@redhat.com>
7668
7669 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
7670
31a714f6
MM
76712000-12-29 Mark Mitchell <mark@codesourcery.com>
7672
7673 * class.c (pushclass): Remove #if 0'd code.
7674 * cp-tree.h (overload_template_name): Remove.
7675 * decl.c (store_bindings): Simplify.
7676 (pop_from_top_level): Likewise.
7677 * pt.c (overload_template_name): Remove.
d363e7bf 7678 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
7679 needed.
7680
414ea4aa
MM
76812000-12-28 Mark Mitchell <mark@codesourcery.com>
7682
7683 * pt.c (register_local_specialization): Don't return a value.
7684 (lookup_template_class): Use move-to-front heuristic when looking
7685 up template instantiations.
7686 (instantiate_decl): Only push_to_top_level when we're actually
7687 going to instantiate the template.
7688
6f18f7e9
HPN
76892000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
7690
7691 * search.c (binfo_for_vtable): Return least derived class, not
7692 most. Handle secondary vtables.
7693
e5214479
JM
76942000-12-22 Jason Merrill <jason@redhat.com>
7695
3c8c2a0a
JM
7696 * pt.c (more_specialized): Don't optimize len==0.
7697 (fn_type_unification): If we're adding the return type, increase len.
7698
ebb1abc3
JM
7699 * typeck.c (build_binary_op): Fix pmf comparison logic.
7700
c939ca5f
JM
7701 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
7702 DECL_STATIC_FUNCTION_P.
7703
e6fe680d
JM
7704 * semantics.c (genrtl_finish_function): Don't try to jump to
7705 return_label unless it exists.
7706
e5214479
JM
7707 In partial ordering for a call, ignore parms for which we don't have
7708 a real argument.
7709 * call.c (joust): Pass len to more_specialized.
7710 (add_template_candidate_real): Strip 'this', pass len.
7711 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
7712 (get_bindings_order): New fn. Pass len down.
7713 (get_bindings_real): Strip 'this', pass len.
7714 (fn_type_unification): Likewise.
7715 (type_unification_real): Succeed after checking 'len' args.
7716 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 7717 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
7718 pass len.
7719
77202000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
7721
7722 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
7723 DECL_TEMPLATE_RESULT.
7724
7725 * search.c (lookup_field_r): Call lookup_fnfields_1, not
7726 lookup_fnfields_here.
7727
7728 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
7729
7730 * call.c (build_object_call): Also allow conversions that return
7731 reference to pointer to function.
7732 (add_conv_candidate): Handle totype being ref to ptr to fn.
7733 (build_field_call): Also allow members of type reference to function.
7734 Lose support for calling pointer to METHOD_TYPE fields.
7735
7736 * error.c (dump_expr): Handle *_CAST_EXPR.
7737
7738 * typeck2.c (build_scoped_ref): Always convert to the naming class.
7739
7740 * tree.c (break_out_cleanups): Lose.
7741 * cp-tree.h: Remove prototype.
7742 * typeck.c (build_component_ref): Don't break_out_cleanups.
7743 (build_compound_expr): Likewise.
7744 * semantics.c (finish_expr_stmt): Likewise.
7745
3e4d04a1
RH
77462000-12-20 Richard Henderson <rth@redhat.com>
7747
7748 * cp-tree.h: Update declarations.
7749 * decl.c (finish_case_label): Return the new stmt node.
7750 * semantics.c (finish_goto_stmt): Likewise.
7751 (finish_expr_stmt, finish_return_stmt): Likewise.
7752 (finish_break_stmt, finish_continue_stmt): Likewise.
7753 (finish_asm_stmt): Likewise.
7754 * parse.y (already_scoped_stmt): Set STMT_LINENO.
7755 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
7756 (simple_if, simple_stmt): Return the new stmt node.
7757 (save_lineno): New.
7758
20d380b1
JM
77592000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7760
7761 * cp-tree.h: Don't declare warn_long_long.
7762
221c7a7f
KL
77632000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7764
7765 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
7766 IS_AGGR_TYPE.
7767
b429fdf0
KL
77682000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7769
7770 * pt.c (unify): Handle when both ARG and PARM are
7771 BOUND_TEMPLATE_TEMPLATE_PARM.
7772
c2beae77
KL
77732000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7774
7775 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
7776 DECL_TEMPLATE_PARM_P.
7777
c3e899c1
JM
77782000-12-15 Jason Merrill <jason@redhat.com>
7779
96790071
JM
7780 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
7781
8d42565b
JM
7782 * init.c (build_new_1): Don't strip quals from type.
7783
fab09a24
JM
7784 * decl.c (pushdecl): Don't check for linkage on a non-decl.
7785
c3e899c1
JM
7786 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
7787
7788 * call.c (build_new_function_call): Lose space before paren in
7789 error message.
7790 (build_new_method_call): Likewise.
7791
7792 * typeck2.c (build_m_component_ref): Propagate quals from datum.
7793
edac124d
KL
77942000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7795
7796 * pt.c (check_explicit_specialization): Propagate default
7797 function arguments to explicit specializations.
7798
31750649 77992000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
7800
7801 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
7802 and <? operators.
7803
5e818b93
JM
78042000-12-08 Jason Merrill <jason@redhat.com>
7805
7806 * error.c (dump_function_name): Don't let the user see __comp_ctor.
7807
7808 Clean up copy-initialization in overloading code.
7809 * call.c (build_user_type_conversion_1): Die if we are asked to
7810 convert to the same or a base type.
7811 (implicit_conversion): Avoid doing so. Lose reference binding code.
7812 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
7813 direct-initialization. Also do direct-init part of copy-init.
7814 (build_user_type_conversion): Don't provide context to convert_like.
7815 * cvt.c (ocp_convert): build_user_type_conversion will now provide
7816 the constructor call for copy-init.
7817
7818 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
7819 instantiation of a member template.
7820 (do_decl_instantiation): Not here.
7821
38da6039
NS
78222000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7823
7824 * class.c (check_field_decls): Don't special case anonymous
7825 fields in error messages.
c9407e4c 7826 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 7827
38da6039
NS
7828 * tree.c (pod_type_p): Use strip_array_types.
7829 (cp_valid_lang_attribute): Likewise.
7830 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
7831 multiple evaluations.
d363e7bf 7832 (cp_has_mutable_p): Use strip_array_types.
38da6039 7833
a11d04b5
NS
78342000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7835
7836 * cp-tree.h (sufficient_parms_p): Declare new function.
7837 * call.c (sufficient_parms_p): New function, broken out of ...
7838 (add_function_candidate): ... here. Use it.
7839 (add_conv_candidate): Use it.
7840 * decl.c (grok_ctor_properties): Use it.
7841
5eec2847
JJ
78422000-12-07 Jakub Jelinek <jakub@redhat.com>
7843
7844 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
7845
c907e684
JM
78462000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
7847
7848 * decl2.c (lang_decode_option): Handle -Wformat-security.
7849
74601d7c
KL
78502000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7851
7852 * pt.c (verify_class_unification): New function.
7853 (get_class_bindings): Use it.
7854 (try_class_unification): Tidy.
7855 (unify): Handle when argument of a template-id is not
7856 template parameter dependent.
7857 (template_args_equal): Handle when TREE_CODE's do not match.
7858
8954e858
AO
78592000-12-06 Alexandre Oliva <aoliva@redhat.com>
7860
7861 * lang-specs.h (c++): When invoking the stand-alone preprocessor
7862 for -save-temps, pass all relevant -Defines to it, and then don't
7863 pass them to cc1plus.
7864
3dc9aec6
WC
78652000-12-05 Will Cohen <wcohen@redhat.com>
7866
7867 * decl.c (finish_case_label): Cleared
7868 more_cleanups_ok in surrounding function scopes.
7869 (define_label): Likewise.
7870
cbb40945
NS
78712000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7872
7873 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
7874 (get_matching_virtual): Remove.
7875 (look_for_overrides): Declare new function.
7876 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
7877 DECL_VINDEX here.
7878 * class.c (check_for_override): Move base class iteration code
7879 to look_for_overrides.
7880 * search.c (next_baselink): Remove.
7881 (get_virtuals_named_this): Remove.
7882 (get_virtual_destructor): Remove.
7883 (tree_has_any_destructors_p): Remove.
7884 (struct gvnt_info): Remove.
7885 (check_final_overrider): Remove `virtual' from error messages.
7886 (get_matching_virtuals): Remove. Move functionality to ...
7887 (look_for_overrides): ... here, and ...
7888 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
7889 to be overriding.
7890
61402b80
NS
78912000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7892
7893 * typeck.c (get_delta_difference): If via a virtual base,
7894 return zero.
7895 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
7896 adjustment.
7897
39abc9a6
RH
78982000-12-04 Richard Henderson <rth@redhat.com>
7899
7900 * error.c (dump_tree): Use output_add_string not OB_PUTS.
7901
c00996a3
JM
79022000-12-04 Jason Merrill <jason@redhat.com>
7903
7904 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 7905 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
7906 type_for_mode.
7907 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
7908 Pass intSI_type_node and the like through type_for_mode.
7909 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
7910 * pt.c (tsubst, unify): Likewise.
7911 * tree.c (walk_tree): Likewise.
7912 * error.c (dump_type): Likewise.
7913 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 7914
c00996a3
JM
7915 * Make-lang.in: Tweak top comment for emacs.
7916 (cp/TAGS): Restore.
7917
7918 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
7919
c00996a3
JM
7920 * class.c (clone_function_decl): Robustify.
7921
79222000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
7923
7924 * decl.c (store_bindings): Only search in the non modified
7925 old_bindings for duplicates.
7926
00bb3dad
NS
79272000-12-04 Nathan Sidwell <nathan@codesourcery.com>
7928
7929 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
7930 TYPE_POLYMORPHIC_P.
d363e7bf 7931
00bb3dad
NS
7932 * typeck.c (build_static_cast): Remove unused variable.
7933
dc957d14
KL
79342000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7935
7936 * pt.c: Fix typo in comment.
7937
4d808927
JM
79382000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7939
7940 * decl2.c (warn_format): Remove definition.
7941 (lang_decode_option): Handle -Wformat-nonliteral,
7942 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
7943
5fd8e536
JM
79442000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7945
7946 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
7947 (init_decl_processing): Don't create string_type_node,
7948 const_string_type_node, wint_type_node, intmax_type_node,
7949 uintmax_type_node, default_function_type, ptrdiff_type_node and
7950 unsigned_ptrdiff_type_node. Adjust position of call to
7951 c_common_nodes_and_builtins.
7952 (identifier_global_value): New function.
7953
13f9714b
NS
79542000-12-01 Nathan Sidwell <nathan@codesourcery.com>
7955
7956 * call.c (standard_conversion): Reject pointer to member
7957 conversions from ambiguous, inaccessible or virtual bases.
7958 * typeck.c (build_static_cast): Don't check pointers to members
7959 specially.
7960
31b1b957
NS
79612000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7962
7963 * method.c (do_build_copy_constructor): Preserve cv
7964 qualifications when accessing source object members.
7965 (do_build_assign_ref): Likewise. Remove separate diagnostics for
7966 unnamed fields.
7967
717e3f73
NS
79682000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7969
7970 * method.c (do_build_assign_ref): Construct appropriately
7971 CV-qualified base reference. Don't allow const casts in base
7972 conversion.
7973
2c92b94d
NS
79742000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7975
7976 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
7977 incomplete return type.
7978
bb92901d
NS
79792000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7980
7981 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
7982 * semantics.c (finish_base_specifier): Accept a _TYPE not a
7983 _DECL.
7984
2f3608c3
NS
79852000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7986
7987 * spew.c (yyerror): Cope if yylval.ttype is NULL.
7988
eeb75383
NS
79892000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7990
7991 * decl.c (grokdeclarator): Diagnose undefined template contexts.
7992
5ee4cc26
NS
79932000-11-28 Nathan Sidwell <nathan@codesourcery.com>
7994
7995 * decl.c (grokdeclarator): Do type access control on friend
7996 class.
7997
76e57b45
NS
79982000-11-27 Nathan Sidwell <nathan@codesourcery.com>
7999
8000 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8001 bison parser ickiness.
8002 * pt.c (tsubst_friend_function): Enter namespace scope when
8003 tsubsting the function name.
8004 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8005
f9825168
NS
80062000-11-27 Nathan Sidwell <nathan@codesourcery.com>
8007
8008 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8009 * cvt.c (cp_convert_to_pointer): Add force parameter.
8010 Allow conversions via virtual base if forced.
8011 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8012 (ocp_convert): Likewise.
8013 * search.c (binfo_from_vbase): Return the virtual base's binfo.
8014 * typeck.c (get_delta_difference): Adjust handling of virtual
8015 bases.
8016
9ccb25d5
MM
80172000-11-26 Mark Mitchell <mark@codesourcery.com>
8018
8019 * tree.c (struct list_hash): Remove.
8020 (list_hash_table): Make it be an htab.
8021 (struct list_proxy): New type.
8022 (list_hash_eq): New function.
8023 (list_hash_pieces): Renamed from ...
8024 (list_hash): ... this.
8025 (list_hash_lookup): Remove.
8026 (list_hash_add): Remove.
8027 (hash_tree_cons): Use the generic hashtable.
8028 (mark_list_hash): Remove.
8029 (init_tree): Create the hashtable.
8030
9399bad3
JM
80312000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
8032
8033 * method.c (build_mangled_C9x_name): Rename to
8034 build_mangled_C99_name. Change C9X references in comments to
8035 refer to C99.
8036
2f401cc8
NS
80372000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8038
8039 * parse.y (unary_expr): Move VA_ARG from here ...
8040 (primary): ... to here.
8041
3d7e9ba4
NS
80422000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8043
8044 * semantics.c (finish_id_expr): If type is error_mark, return
8045 error_mark.
8046
ab097535
NS
80472000-11-23 Nathan Sidwell <nathan@codesourcery.com>
8048
8049 * pt.c (lookup_template_class): Simplify loop exit constructs.
8050 Cope when there is no partial instantiation of a template
8051 template member.
8052
9196ece5
R
8053Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
8054
8055 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8056
cac78ea2
MM
80572000-11-22 Mark Mitchell <mark@codesourcery.com>
8058
6e1b44bc
MM
8059 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8060 prefix.
8061
cac78ea2
MM
8062 * pt.c (do_decl_instantiate): Explicitly clone constructors and
8063 destructors that haven't already been cloned.
8064
3aac38d7
RH
80652000-11-20 Richard Henderson <rth@redhat.com>
8066
8067 * parse.y (yyparse_1): Rename the parser entry point.
8068
80692000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
8070
8071 * mangle.c (write_name): Use <unscoped-name> for names directly in
8072 function scope.
8073 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 8074
447306fa
NS
80752000-11-20 Nathan Sidwell <nathan@codesourcery.com>
8076
8077 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8078 * parse.y (extdef): Add EXPORT reduction.
8079 * spew.c (yylex): Don't skip export here.
8080
2650255a
MM
80812000-11-19 Mark Mitchell <mark@codesourcery.com>
8082
8083 * decl.c (init_decl_processing): Correct name of pure virtual
8084 function under the new ABI.
8085 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8086 (throw_bad_typeid): Likewise for bad typeid function.
8087
0657c69c
MM
80882000-11-18 Mark Mitchell <mark@codesourcery.com>
8089
04f3dc2b
MM
8090 * decl.c (grokparms): Don't even function types of `void' type,
8091 either.
8092 * mangle.c (write_type): Don't crash when confronted with the
8093 error_mark_node.
8094
0657c69c
MM
8095 * decl.c (grokparms): Don't create parameters of `void' type.
8096
a8a05998
ZW
80972000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8098
8099 * lex.c (mark_impl_file_chain): Delete.
8100 (init_parse): Remove call to ggc_add_string_root. No need to
8101 ggc_strdup a string constant. Do not add impl_file_chain to GC
8102 roots.
8103 (handle_pragma_implementation): No need to ggc_strdup main_filename.
8104
35728a80
NS
81052000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8106
8107 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8108
5cce22b6
NS
81092000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8110
8111 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
8112 * decl.c (grokdeclarator): Don't reject void parms here.
8113 (require_complete_types_for_parms): Simplify, use
8114 complete_type_or_else.
8115 (grokparms): Remove bitrot. Remove funcdef parm.
8116 Deal with ellipsis parm lists here.
8117 * semantics.c (finish_parmlist): Don't append void_list_node
8118 here. Set PARMLIST_ELLIPSIS_P.
8119
146c8d60
NS
81202000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8121
d30d6e7a 8122 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
8123 excessive diagnostics.
8124
520a57c8
ZW
81252000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8126
8127 * lex.c (struct impl_files, internal_filename): Constify a char *.
8128
43048a06
MM
81292000-11-16 Mark Mitchell <mark@codesourcery.com>
8130
8131 * mangle.c (write_special_name_constructor): Don't generate
8132 assembler junk when confronted with an old-style constructor.
8133 (write_special_name_destructor): Likewise.
8134 (mangle_decl_string): Do it here instead.
8135
cdb71673
NS
81362000-11-16 Nathan Sidwell <nathan@codesourcery.com>
8137
8138 * call.c (op_error): Make error messages clearer.
8139
62136084
MM
81402000-11-15 Mark Mitchell <mark@codesourcery.com>
8141
8142 * decl.c (wrapup_globals_for_namespace): Don't mark things
8143 TREE_ASM_WRITTEN when they're not.
8144
ee3400e8
JM
81452000-11-15 Jason Merrill <jason@redhat.com>
8146
8147 * typeck2.c (friendly_abort): Uncount the error before handing
8148 off to fancy_abort.
8149
71631a1f
NS
81502000-11-15 Nathan Sidwell <nathan@codesourcery.com>
8151
8152 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8153
79cda2d1
MM
81542000-11-14 Mark Mitchell <mark@codesourcery.com>
8155
8156 * class.c (build_vtbl_initializer): Fix typo in comment.
8157 * typeck.c (expr_sizeof): Don't crash on errors.
8158
2567bc56
JW
81592000-11-14 Jim Wilson <wilson@redhat.com>
8160
8161 * lang-specs.h: Add %2 after %(cc1_options).
8162
8422942c
RH
81632000-11-14 Richard Henderson <rth@redhat.com>
8164
8165 * typeck.c (c_sizeof): Be strict about casting result value
8166 back to c_size_type_node.
8167 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
8168
19552aa5
JM
81692000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8170
8171 * typeck.c (build_unary_op): Use boolean_increment from
8172 c-common.c, moving the relevant code there.
8173
d96a6d1a
JM
81742000-11-11 Jason Merrill <jason@redhat.com>
8175
8176 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
8177
8178 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
8179 in inlines.
8180
4e135bdd
KG
81812000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8182
8183 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
8184 * lex.c (copy_lang_decl): Likewise.
8185
0a7394bc
MM
81862000-11-09 Mark Mitchell <mark@codesourcery.com>
8187
13507bd8
MM
8188 * dump.c (cp_dump_tree): Don't dump function bodies here.
8189
0a7394bc
MM
8190 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8191 (dump.o): Update dependency list.
8192 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
8193 (flag_dump_translation_unit): Likewise.
8194 (CP_TYPE_QUALS): Adjust definition.
8195 (DECL_C_BIT_FIELD): Remove.
8196 (SET_DECL_C_BIT_FIELD): Likewise.
8197 (CLEAR_DECL_C_BIT_FIELD): Likewise.
8198 (add_maybe_template): Likewise.
8199 (strip_array_types): Likewise.
8200 (dump_node_to_file): Likewise.
8201 (cp_dump_tree): New function.
8202 * decl.c (init_decl_processing): Set lang_dump_tree.
8203 * decl2.c (flag_dump_translation_unit): Remove.
8204 * dump.c: Move most of it to ../c-dump.c.
8205 (cp_dump_tree): New function.
8206 * pt.c (add_maybe_template): Remove.
8207 * typeck.c (strip_array_types): Likewise.
a8a05998 8208
5362b086
EC
82092000-11-07 Eric Christopher <echristo@redhat.com>
8210
492cca24
JM
8211 * decl.c (init_decl_processing): Change definition of
8212 __wchar_t to wchar_t. Remove artificial declaration of
8213 wchar_t.
8214 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 8215
5361cbb7
NS
82162000-11-09 Nathan Sidwell <nathan@codesourcery.com>
8217
8218 * lex.c (do_identifier): Don't lookup_name for operators.
8219 * parse.y (operator): Save looking_for_typename.
8220 (unoperator): Restore it.
8221 * spew.c (frob_opname): Use nth_token for lookahead.
8222
36791f1e
NS
82232000-11-08 Nathan Sidwell <nathan@codesourcery.com>
8224
8225 * decl.c (grok_op_properties): Always use coerce_new_type and
8226 coerce_delete_type.
8227 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
8228 exception specification. Tidy up.
8229 (coerce_delete_type): Preserve exception specification. Tidy up.
8230
961192e1
JM
82312000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
8232
8233 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
8234 (push_binding_level), error.c (cp_tree_printer), pt.c
8235 (process_partial_specialization, tsubst_template_arg_vector),
8236 search.c (lookup_member): Use memset () instead of bzero ().
8237
d48ebde1
NS
82382000-11-07 Nathan Sidwell <nathan@codesourcery.com>
8239
8240 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
8241
436a88a6
JM
82422000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
8243
8244 * Make-lang.in (c++.distdir): Remove.
8245
7a4e5091
MM
82462000-11-04 Mark Mitchell <mark@codesourcery.com>
8247
8248 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
8249 declarations from different namespaces to be combined.
8250
0e9295cf
ZW
82512000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
8252
8253 * decl.c: Include tm_p.h.
8254
da61dec9
JM
82552000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
8256
8257 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
8258
9473c522
JM
82592000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
8260
8261 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
8262 (build_overload_value), repo.c (open_repo_file), xref.c
8263 (open_xref_file): Use strchr () and strrchr () instead of index ()
8264 and rindex ().
8265
b0b3afb2
BS
82662000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
8267
8268 * call.c (build_over_call): Call fold on the CALL_EXPR.
8269
faafaee6
GDR
82702000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
8271
8272 * error.c (dump_template_decl): Separate template hearders with
8273 space not comma.
8274
761f0855
GDR
82752000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
8276
8277 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
8278 TS_* flags with corresponding TFF_*. Adjust prototypes of
8279 functions (which used to take a tree_string_flags) to take an int.
8280
8281 * cp-tree.h (enum tree_string_flags): Remove
8282 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
8283 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
8284 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8285 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8286 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
8287 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
8288 (type_as_string, decl_as_string, expr_as_string,
8289 context_as_string): Adjust prototype.
8290
8291 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
8292 instead of TS_PLAIN.
8293
8294 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
8295 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
8296 plain `0'.
8297
ad50e811
MM
82982000-10-30 Mark Mitchell <mark@codesourcery.com>
8299
8300 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
8301 (linkage_kind): New enumeration.
8302 (decl_linkage): New function.
8303 * decl2.c (comdat_linkage): Extend comment.
8304 * error.c (dump_function_decl): Print the arguments used to
8305 instantiate a template, even when not printing the type of the
8306 function.
8307 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
8308 not TREE_PUBLIC, to test for external linkage.
8309 * tree.c (decl_linkage): New function.
8310
930cd796
MM
83112000-10-28 Mark Mitchell <mark@codesourcery.com>
8312
8313 * pt.c (instantiate_decl): Always instantiate static data members
8314 initialized in-class.
8315
b8dad04b
ZW
83162000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
8317
8318 * Make-lang.in: Move all build rules here from Makefile.in,
8319 adapt to new context. Wrap all rules that change the current
8320 directory in parentheses. Expunge all references to $(P).
8321 When one command depends on another and they're run all at
8322 once, use && to separate them, not ;. Add OUTPUT_OPTION to
8323 all object-file generation rules. Delete obsolete variables.
8324
8325 * Makefile.in: Delete.
8326 * config-lang.in: Delete outputs= line.
8327
5f9cd837
GDR
83282000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
8329
8330 * error.c (dump_function_decl): Print no space between
8331 `ptr-operator' the `type-specifier' of the return type.
8332 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 8333 place.
5f9cd837 8334
6c6ed0ef
JM
83352000-10-23 Jason Merrill <jason@redhat.com>
8336
8337 * call.c (equal_functions): Also call decls_match for extern "C" fns.
8338
83392000-10-22 Jason Merrill <jason@redhat.com>
8340
8341 * call.c (build_conditional_expr): Use ocp_convert to force
8342 rvalue conversion.
8343
e36308b0
MM
83442000-10-22 Mark Mitchell <mark@codesourcery.com>
8345
583ca5a0
MM
8346 * call.c (standard_conversion): Use RVALUE_CONVs for all
8347 expressions that satisfy lvalue_p, not just those that satisfy
8348 real_lvalue_p.
8349
f9808f81
MM
8350 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
8351
5362b086 8352 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
8353 not one with TYPE_IS_SIZETYPE set.
8354 (dubious_conversion_warnings): Remove special-case code.
8355
3b9ae6f0
GK
83562000-10-21 Geoffrey Keating <geoffk@cygnus.com>
8357
7a0f14e5
GK
8358 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
8359 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
8360 (dump_type_prefix): Print vector-of-int as 'int vector'.
8361 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
8362 * tree.c (walk_tree): Handle VECTOR_TYPE.
8363
3b9ae6f0 8364 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 8365
aca77bd1
JM
83662000-10-21 Jason Merrill <jason@redhat.com>
8367
8368 * parse.y (operator): Set got_object from got_scope.
8369 Set looking_for_typename.
8370 * decl.c (lookup_name_real): Clear val after setting from_obj.
8371 Reorganize diagnostic.
8372
ba523395
JM
83732000-10-20 Jason Merrill <jason@redhat.com>
8374
8375 * tree.c (walk_tree): Don't walk into default args.
8376
8377 * error.c (dump_expr): Use host_integerp.
8378
2e44948d
DE
83792000-10-20 David Edelsohn <edelsohn@gnu.org>
8380
8381 * typeck2.c (abstract_virtuals_error): Use "because" instead of
8382 "since" in error message.
8383
44475138
RK
8384Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8385
8386 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
8387
11306230
JO
83882000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
8389
8390 * decl.c (revert_static_member_fn): Fixed typo.
8391
97ba1e3c
MM
83922000-10-19 Mark Mitchell <mark@codesourcery.com>
8393
c20118a8
MM
8394 * class.c (subobject_offset_fn): New type.
8395 (dfs_record_base_offsets): Remove.
8396 (record_base_offsets): Likewise.
8397 (dfs_search_base_offsets): Likewise.
8398 (record_subobject_offset): New function.
8399 (check_subobject_offset): Likewise.
8400 (walk_subobject_offsets): Likewise.
8401 (record_subobject_offsets): Likewise.
8402 (layout_conflict_p): Reimplement.
8403 (layout_nonempty_base_or_field): Correct handling of type
8404 conflicts during layout.
8405 (layout_empty_base): Likewise.
8406 (build_base_field): Adjust to handle new representation of empty
8407 base offset table.
8408 (build_base_fields): Likewise.
8409 (layout_virtual_bases): Likewise.
8410 (splay_tree_compare_integer_csts): New function.
8411 (layout_class_type): Use a splay_tree, rather than a varray, to
8412 represent the offsets of empty bases.
5362b086 8413
97ba1e3c
MM
8414 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
8415 * decl.c (select_decl): Don't return declarations that are
8416 DECL_ANTICIPATED.
8417
6bcedb4e
MM
84182000-10-18 Mark Mitchell <mark@codesourcery.com>
8419
8420 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
8421 (fake_std_node): New macro.
8422 * decl.c (in_std): Rename to ...
8423 (in_fake_std): ... this.
8424 (flag_no_builtin): Remove.
8425 (flag_no_nonansi_builtin): Likewise.
8426 (walk_namespaces_r): Use fake_std_node.
8427 (push_namespace): Use std_identifier.
8428 (pop_namespace): Use in_fake_std.
8429 (lookup_name_real): Use fake_std_node.
8430 (init_decl_processing): When -fhonor-std, create the `std'
8431 namespace. Don't create a dummy fake_std_node in that case.
8432 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
8433 (builtin_function): Put builtins whose names don't begin
8434 with `_' in the std namespace.
8435 * decl2.c (flag_no_builtin): Remove.
8436 (flag_no_nonansi_builtin): Likewise.
8437 (set_decl_namespace): Use fake_std_node.
8438 (validate_nonmember_using_decl): Likewise.
8439 (do_using_directive): Likewise.
8440 (handle_class_head): Likewise.
8441 * dump.c (dequeue_and_dump): Likewise.
8442 * except.c (init_exception_processing): Use std_identifier.
8443 * init.c (build_member_call): Use fake_std_node.
8444 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 8445
67673f5c
MM
84462000-10-17 Mark Mitchell <mark@codesourcery.com>
8447
8448 * cp-tree.h (back_end_hook): Remove declaration.
8449 * decl2.c (back_end_hook): Remove definition.
8450
8451 * dump.c (dequeue_and_dump): Dump TREE_USED.
8452
8fef2e47
BL
8453Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
8454
8455 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
8456
652469d0
JM
84572000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
8458
8459 * decl.c (WINT_TYPE): Define.
8460 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
8461 c_size_type_node, signed_size_type_node and wint_type_node.
8462
74ff4629
JM
84632000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
8464
8465 * decl2.c (warn_missing_format_attribute): New variable.
8466 (lang_decode_option): Decode -Wmissing-format-attribute.
8467
634790f4
MM
84682000-10-16 Mark Mitchell <mark@codesourcery.com>
8469
8470 * typeck.c (qualify_type): Remove.
8471 (composite_pointer_type): Fix handling of conversions to `cv void*'.
8472
bb12da9d
KG
84732000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8474
8475 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
8476
4b945402
KG
84772000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8478
8479 * Makefile.in (parse.c, parse.h): Create atomically.
8480
1f8f4a0b
MM
84812000-10-12 Mark Mitchell <mark@codesourcery.com>
8482
8483 * class.c (current_obstack): Remove.
8484 * decl.c (ggc_p): Remove.
8485 (start_decl): Don't use decl_tree_cons.
8486 (grokdeclarator): Don't use build_decl_list.
8487 (start_function): Don't use decl_tree_cons.
8488 (finish_function): Don't mess with obstacks.
8489 * decl2.c (grok_x_components): Don't use build_decl_list.
8490 * lex.c (make_call_declarator): Don't call decl_tree_cons.
8491 (implicitly_declare_fn): Don't call build_decl_list.
8492 * parse.y (frob_specs): Don't call build_decl_list or
8493 decl_tree_cons.
8494 (expr_or_declarator_intern): Don't call decl_tree_cons.
8495 (primary): Don't call build_decl_list.
8496 (fcast_or_absdcl): Likewise.
8497 (typed_declspecs): Don't call decl_tree_cons.
8498 (reserved_declspecs): Don't call build_decl_list.
8499 (declmods): Likewise.
8500 (reserved_typespecquals): Likewise.
8501 (aggr): Likewise.
8502 (new_type_id): Likewise.
8503 (cv_qualifiers): Likewise.
8504 (after_type_declarator_intern): Likewise.
8505 (notype_declarator_intern): Likewise.
8506 (absdcl_intern): Likewise.
8507 (named_parm): Likewise.
8508 * pt.c (most_specialized_class): Likewise.
8509 * repo.c (temporary_obstack): Make it a structure, not a pointer.
8510 (init_repo): Initialize it.
8511 * search.c (current_obstack): Remove.
8512 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 8513
8dc54971
RH
85142000-10-09 Richard Henderson <rth@cygnus.com>
8515
8516 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
8517 (c++ language support bits for libgcc): Remove.
8518 (c++.clean): Remove cplib2.txt cleanup.
8519 * config-lang.in (headers, lib2funcs): Remove.
8520
8521 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
8522 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
8523 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
8524 * inc/new.h, inc/typeinfo: Remove files.
8525
b15ad712
JM
85262000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
8527
8528 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
8529 defined.
8530 (init_decl_processing): Initialize intmax_type_node and
8531 uintmax_type_node.
8532
156ce211
RH
85332000-10-06 Richard Henderson <rth@cygnus.com>
8534
8535 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
8536 (original_result_rtx): Remove.
8537 * decl.c (save_function_data): Don't clear x_result_rtx.
8538 (mark_lang_function): Don't mark it either.
8539 * expr.c (fixup_result_decl): Remove.
8540 * semantics.c (genrtl_named_return_value): Frob the return decl
8541 before calling emit_local_var.
8542 (genrtl_finish_function): Don't call fixup_result_decl.
8543 Always emit the jump to return_label.
8544
92777ce4
NS
85452000-10-06 Nathan Sidwell <nathan@codesourcery.com>
8546
8547 * pt.c (lookup_template_class): Set current access for enum.
8548 (tsubst_enum): Set file & line for enum decl.
5362b086 8549
92777ce4
NS
8550 * spew.c (yylex): Remove unused variable.
8551
63c16fc5
RH
85522000-10-05 Richard Henderson <rth@cygnus.com>
8553
8554 * semantics.c (genrtl_finish_function): Don't init or check
8555 can_reach_end; remove noreturn and return value checks.
8556
d1a458c4
TT
85572000-10-05 Tom Tromey <tromey@cygnus.com>
8558
8559 * init.c (build_java_class_ref): Use `build_static_name' with a
8560 suffix, not a prefix, to build the class object's name.
8561
509fc277
NS
85622000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8563
8564 * cp-tree.h (access_kind): Fix comment typo.
8565 * decl2.c (grokfield): Fix diagnostic typo.
8566 * semantics.c (finish_template_type): Fix comment typo.
8567 (finish_qualified_object_call_expr): Likewise.
8568
ce2e5191
NS
85692000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8570
8571 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 8572 tsubsting fails.
ce2e5191 8573
79cc5312
NS
85742000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8575
8576 * spew.c (frob_id): New static function.
8577 (frob_opname): Use it.
8578 (yylex): Use it.
8579
f15b9af9
MM
85802000-10-01 Mark Mitchell <mark@codesourcery.com>
8581
8582 * decl.c (lang_mark_false_label_stack): Remove.
8583 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 8584
28e6b1c2
JM
85852000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
8586
8587 * gxxint.texi: Use @email for formatting email addresses.
8588
99885b3f
GDR
85892000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
8590
8591 * error.c: Remove direct obstack manipulation. Replace with
8592 output_buffer-based formatting. Adjust calls to removed macros.
8593 (obstack_chunk_alloc, obstack_chunk_free): Remove.
8594 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
8595 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
8596
c06aa51e
MM
85972000-09-24 Mark Mitchell <mark@codesourcery.com>
8598
8599 * ir.texi: Move to ../c-tree.texi.
8600
99fada40
JM
86012000-09-20 Jason Merrill <jason@redhat.com>
8602
8603 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
8604
bb20cc46
AJ
86052000-09-21 Andreas Jaeger <aj@suse.de>
8606
8607 * errfn.c: Move declaration of cp_printer and cp_printers to ...
8608 * cp-tree.h: ... here.
8609
8610 * error.c: Remove declaration of cp_printer.
8611
fab701da
MM
86122000-09-20 Mark Mitchell <mark@codesourcery.com>
8613
8614 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
8615
0370fea1
HPN
86162000-09-20 Hans-Peter Nilsson <hp@axis.com>
8617
8618 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
8619 users.
8620
78c120b5
MM
86212000-09-18 Mark Mitchell <mark@codesourcery.com>
8622
8623 * decl.c (start_function): Robustify.
8624
3f80e6ac
KG
86252000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8626
8627 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 8628
3f80e6ac
KG
8629 * call.c, typeck.c: Updates calls to `check_function_format'.
8630
fc928afe
GK
86312000-09-17 Geoffrey Keating <geoffk@cygnus.com>
8632
8633 * decl2.c (handle_class_head): Always push some scope even
8634 in the error case.
8635
8f17b5c5
MM
86362000-09-16 Mark Mitchell <mark@codesourcery.com>
8637
8638 * cp-tree.h (struct cp_language_function): Remove
8639 x_scope_stmt_stack and name_declared.
8640 (current_scope_stmt_stack): Remove.
8641 (function_name_declared_p): New macro.
8642 (struct lang_decl_flags): Use c_lang_decl as a base class.
8643 (context): Remove.
8644 (struct lang_decl): Replace saved_tree with context.
8645 (DECL_FRIEND_CONTEXT): Adjust accordingly.
8646 (SET_DECL_FRIEND_CONTEXT): Likewise.
8647 (DECL_VIRTUAL_CONTEXT): Likewise.
8648 (DECL_SAVED_TREE): Remove.
8649 (C_DECLARED_LABEL_FLAG): Likewise.
8650 (cplus_expand_expr_stmt): Don't declare.
8651 (add_decl_stmt): Likewise.
8652 (add_scope_stmt): Likewise.
8653 * decl.c (mark_stmt_tree): Remove.
8654 (case_compare): Likewise.
8655 (finish_case_label): Use c_add_case_label.
8656 (init_decl_processing): Set more language-specific hooks.
8657 (build_enumerator): Fix typo in comment.
8658 (cplus_expand_expr_stmt): Remove.
8659 (mark_lang_function): Use mark_c_language_function.
8660 (lang_mark_tree): Use c_mark_lang_decl.
8661 * decl2.c: Change order of inclusion.
8662 * except.c: Likewise.
8663 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
8664 back on c_expand_expr.
8665 * friend.c: Include expr.h.
8666 * init.c: Change order of inclusion.
8667 * Makefile.in: Update dependencies.
8668 * lex.h (free_lang_decl_chain): Remove.
8669 * optimize.c (maybe_clone_body): Use function_name_declared_p.
8670 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
8671 it doesn't exist.
8672 (instantiate_decl): Use function_name_declared_p.
8673 * semantics.c (lang_expand_expr_stmt): Remove.
8674 (set_current_function_name_declared): Likewise.
8675 (current_function_name_declared): Likewise.
8676 (begin_compound_stmt): Use function_name_declared_p.
8677 (add_decl_stmt): Remove.
8678 (setup_vtbl_ptr): Use function_name_declared_p.
8679 (add_scope_stmt): Remove.
8680 (current_scope_stmt_stack): New function.
8681 (cp_expand_stmt): Don't handle SCOPE_STMTs.
8682 (expand_body): Use function_name_declared_p.
8683 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
8684 * typeck.c: Change order of includes.
8685 (convert_sequence): Remove.
bb20cc46 8686
d9dbd9b1
JM
86872000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
8688
8689 * lex.c (reswords): Add _Complex.
8690
9985f210
RK
8691Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8692
8693 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
8694
f903ebb1
DA
86952000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
8696
8697 * init.c (begin_init_stmts): Don't use // comments.
8698
f2ae0c45
JM
86992000-09-12 Jason Merrill <jason@redhat.com>
8700
8701 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
8702 all non-extern arrays.
8703
8704 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
8705 typenames, too. Downgrade complaint to pedwarn.
8706 (xref_tag): Warn about surprising behavior of 'friend struct T'.
8707 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
8708 'class This::Inherited'.
8709
71ad4a16
MM
87102000-09-12 Mark Mitchell <mark@codesourcery.com>
8711
8712 * decl.c (finish_case_label): Given the LABEL_DECL a
8713 DECL_CONTEXT.
8714
c3e76028
GDR
87152000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
8716
8717 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
8718 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
8719 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8720 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8721 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
8722 New macros.
8723 (sorry_for_unsupported_tree, print_scope_operator,
8724 print_left_paren, print_right_paren, print_left_bracket,
8725 print_right_bracket, print_whitespace): Likewise.
8726 (aggr_variety): Rename to class_key_or_enum.
8727 (print_type): Rename to print_type_id.
8728 (print_type_specifier_seq, print_simple_type_specifier,
8729 print_elaborated_type_specifier,
8730 print_rest_of_abstract_declarator,
8731 print_parameter_declaration_clause, print_exception_specification,
8732 print_nested_name_specifier, print_template_id,
8733 typedef_original_name, print_template_argument_list_start,
8734 print_template_argument_list_end): New functions.
8735
eb50138b
GDR
87362000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
8737
a8a05998 8738 * ir.texi: Add more documentation.
eb50138b 8739
f444e36b
MM
87402000-09-11 Mark Mitchell <mark@codesourcery.com>
8741
8742 * cp-tree.h (struct saved_scope): Remove x_function_parms.
8743 (current_function_parms): Don't define.
8744 (struct cp_language_function): Remove parms_stored.
8745 (current_function_just_assigned_this): Don't define.
8746 (current_function_parms_stored): Likewise.
8747 (static_ctors): Declare.
8748 (static_dtors): Likewise.
8749 (SF_EXPAND): Don't define.
8750 (expand_start_early_try_stmts): Remove declaration.
8751 (store_parm_decls): Likewise.
8752 * decl.c (static_ctors): Don't declare.
8753 (static_dtors): Likewise.
8754 (struct binding_level): Remove this_block.
8755 (poplevel): Remove dead code.
8756 (set_block): Likewise.
8757 (mark_binding_level): Don't mark this_block.
8758 (mark_saved_scope): Don't mark x_function_parms.
8759 (init_decl_processing): Don't add current_function_parms as a GC
8760 root.
8761 (check_function_type): Change prototype.
8762 (start_function): Remove RTL-generation code.
8763 (expand_start_early_try_stmts): Remove.
8764 (store_parm_decls): Give it internal linkage. Remove
8765 RTL-generation code.
8766 (finish_function): Remove RTL-generation code.
8767 * decl2.c (static_ctors): Fix formatting.
8768 (static_dtors): Likewise.
8769 * method.c (use_thunk): Don't call store_parm_decls.
8770 (synthesize_method): Likewise.
8771 * optimize.c (maybe_clone_body): Likewise.
8772 * parse.y (fn.def2): Likewise.
8773 (.set_base_init): Likewise.
8774 (nodecls): Likewise.
8775 * pt.c (instantiate_decl): Likewise.
8776 * rtti.c (synthesize_tinfo_fn): Likewise.
8777 * semantics.c (genrtl_try_block): Simplify.
8778 (expand_body): Use genrtl_start_function and
8779 genrtl_finish_function.
8780 (genrtl_start_function): New function.
8781 (genrtl_finish_function): Likewise.
8782
181d2ba0
NS
87832000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8784
8785 * error.c (cp_tree_printer, case 'P'): Append break.
8786
f2d71db6
NS
87872000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8788
8789 * cp-tree.h (frob_opname): Declare.
8790 * parse.y (saved_scopes): New static variable.
8791 (cp_parse_init): Adjust.
8792 (do_id): If lastiddecl is NULL, do do_identifier.
8793 (operator): Save scope information.
aca77bd1 8794 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
8795 (operator_name): Append unoperator. Call frob_opname.
8796 * spew.c (frob_opname): Define.
8797
d8ea8f28
ZW
87982000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8799
8800 * decl.c, rtti.c: Include defaults.h if not already included.
8801 Don't define the *_TYPE_SIZE macros.
8802
56cb9733
MM
88032000-09-09 Mark Mitchell <mark@codesourcery.com>
8804
8805 * cp-tree.h (push_switch): Change prototype.
8806 (check_cp_case_value): Remove declaration.
8807 (decl_constant_value): Likewise.
8808 * decl.c (struct cp_switch): Add switch_stmt and cases.
8809 (case_compare): New function.
8810 (push_switch): Set switch_stmt. Initialize cases.
8811 (pop_switch): Clean up cases.
8812 (define_case_label): Rename to ...
8813 (finish_case_label): ... this. Do semantic analysis for case
8814 labels here.
8815 (start_function): Correct comment.
8816 * decl2.c (check_cp_case_value): Remove.
8817 * expr.c (do_case): Remove.
8818 * pt.c (tsubst_expr): Adjust call to finish_case_label.
8819 * semantics.c (genrtl_do_poplevel): Remove declaration.
8820 (RECHAIN_STMTS): Remove.
8821 (finish_break_stmt): Use build_break_stmt.
8822 (finish_continue_stmt): Use build_continue_stmt.
8823 (finish_switch_cond): Adjust condition here, rater than in
8824 c_expand_start_case.
8825 (finish_case_label): Remove.
8826 * typeck.c (c_expand_return): Remove.
8827 (c_expand_start_case): Likewise.
bb20cc46 8828
990a9693
GDR
88292000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
8830
8831 * ir.texi: Document type nodes.
8832
ae499cce
MM
88332000-09-06 Mark Mitchell <mark@codesourcery.com>
8834
54f7877c
MM
8835 * cp-tree.h (init_cp_semantics): Declare.
8836 (genrtl_try_block): Don't declare.
8837 (genrtl_handler): Likewise.
8838 (genrtl_catch_block): Likewise.
8839 (genrtl_ctor_stmt): Likewise.
8840 (genrtl_subobject): Likewise.
8841 (genrtl_do_poplevel): Likewise.
8842 (genrtl_named_return_value): Likewise.
8843 * lex.c (init_parse): Call init_cp_semantics.
8844 * semantics.c (genrtl_try_block): Give it internal linkage.
8845 (genrtl_handler): Likewise.
8846 (genrtl_catch_block): Likewise.
8847 (genrtl_ctor_stmt): Likewise.
8848 (genrtl_subobject): Likewise.
8849 (genrtl_do_poplevel): Likewise.
8850 (genrtl_named_return_value): Likewise.
8851 (lang_expand_stmt): Rename to ...
8852 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
8853 (init_cp_semantics): Define.
8854
3a0d3e1e
MM
8855 * decl.c (initialize_local_var): Remove RTL-generating code.
8856 * semantics.c (genrtl_try_block): Fix formatting.
8857
ae499cce
MM
8858 Move statement-tree facilities from C++ to C front-end.
8859 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
8860 (void_zero_node): Remove.
8861 (stmt_tree): Likewise.
8862 (scope_chain): Adjust.
8863 (language_function): Rename to cp_language_function.
8864 (cp_function_chain): Adjust.
8865 (current_stmt_tree): Remove.
8866 (last_tree): Likewise.
8867 (last_expr_type): Likewise.
8868 (struct lang_decl): Adjust.
8869 (STMT_IS_FULL_EXPR_P): Remove.
8870 (add_tree): Remove.
8871 (begin_stmt_tree): Likewise.
8872 (finish_stmt_tree): Likewise.
8873 (walk_tree_fn): Likewise.
8874 (walk_stmt_tree): Likewise.
8875 * class.c (finish_struct): Replace use of add_tree with add_stmt.
8876 * decl.c (mark_stmt_tree): Adjust type.
8877 (init_decl_processing): Don't build void_zero_node.
8878 (initialize_local_var): Adjust usage of current_stmt_tree.
8879 (finish_enum): Use add_stmt, not add_tree.
8880 (save_function_data): Adjust use of language_function.
8881 (finish_constructor_body): Use add_stmt, not add_tree.
8882 (finish_destructor_body): Likewise.
8883 (push_cp_function_context): Adjust use of language_function.
8884 (pop_cp_function_context): Likewise.
8885 (mark_lang_function): Likewise.
8886 (mark_cp_function_context): Likewise.
8887 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
8888 (build_vec_init): Likewise.
8889 * semantics.c (SET_LAST_STMT): Remove.
8890 (RECHAIN_STMTS): Don't use it.
8891 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
8892 (current_stmt_tree): Define.
8893 (add_tree): Remove.
8894 (finish_goto_stmt): Use add_stmt, not add_tree.
8895 (finish_expr_stmt): Likewise.
8896 (begin_if_stmt): Likewise.
8897 (finish_then_clause): Likewise.
8898 (begin_while_stmt): Likewise.
8899 (begin_do_stmt): Likewise.
8900 (finish_return_stmt): Likewise.
8901 (begin_for_stmt): Likewise.
8902 (finish_break_stmt): Likewise.
8903 (finish_continue_stmt): Likewise.
8904 (begin_switch_stmt): Likewise.
8905 (finish_case_label): Likewise.
8906 (begin_try_block): Likewise.
8907 (begin_function_try_block): Likewise.
8908 (begin_handler): Likewise.
8909 (begin_catch_block): Likewise.
8910 (begin_compound_stmt): Likewise.
8911 (begin_asm_stmt): Likewise.
8912 (finish_asm_stmt): Likewise.
8913 (finish_label_stmt): Likewise.
8914 (add_decl_stmt): Likewise.
8915 (finish_subobject): Likewise.
8916 (finish_decl_cleanup): Likewise.
8917 (finish_named_return_value): Likewise.
8918 (setup_vtbl_ptr): Likewise.
8919 (add_scope_stmt): Likewise.
8920 (finish_stmt_expr): Likewise.
8921 (prune_unused_decls): Remove.
8922 (begin_stmt_tree): Likewise.
8923 (finish_stmt_tree): Likewise.
8924 (prep_stmt): Adjust use of current_stmt_tree.
8925 (lang_expand_stmt): Likewise.
8926 * tree.c (statement_code_p): Remove.
8927 (cp_statement_code_p): New function.
8928 (walk_stmt_tree): Remove.
8929 (init_tree): Set lang_statement_code_p.
bb20cc46 8930
0e5921e8
ZW
89312000-09-06 Zack Weinberg <zack@wolery.cumb.org>
8932
8933 Integrated preprocessor.
8934
8935 * Make-lang.in, Makefile.in: Remove all references to input.c,
8936 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
8937 * gxx.gperf, hash.h, input.c: Delete.
8938 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
8939 initialized properly.
8940
8941 * class.c (fixup_pending_inline): Take a tree, not a
8942 struct pending_inline *. All callers changed.
8943 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
8944 RID_PROTECTED entries in ridpointers[] array here.
8945 * decl.c (duplicate_decls): Do not refer to struct
8946 pending_inline.
8947 (record_builtin_type, init_decl_processing): Use RID_MAX not
8948 CP_RID_MAX.
8949 (grokdeclarator): Use C_IS_RESERVED_WORD.
8950 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
8951 cpplib.
8952 (grok_x_components): Do not inspect pending_inlines chain.
8953
8954 * cp-tree.h (struct lang_identifier): Add rid_code entry.
8955 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
8956 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
8957 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
8958 TIME_IDENTIFIER_FILEINFO): Kill.
8959 Update prototypes.
8960 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
8961 single 32-bit word.
8962 * parse.y: Call do_pending_inlines unconditionally.
8963 reinit_parse_for_method is now snarf_method. fn.defpen is no
8964 longer necessary. Remove unnecessary <itype> annotation on
8965 SCOPE. Do not refer to end_of_file or struct pending_inline.
8966 * semantics.c (begin_inline_definitions): Call
8967 do_pending_inlines unconditionally.
8968
8969 * lex.c: Remove all code now shared with C front end.
8970 Initialize cpplib properly if USE_CPPLIB. Put reserved words
8971 into the get_identifier table. Rewrite pragma handling to
8972 work with the registry. Move code to save tokens for later
8973 processing to spew.c.
8974
8975 * spew.c: Rewrite everything in terms of token streams instead
8976 of text. Move routines here from lex.c / input.c as
8977 appropriate. GC-mark trees hanging off the pending inlines
8978 chain.
8979
44835fdd
MM
89802000-09-06 Mark Mitchell <mark@codesourcery.com>
8981
8982 * NEWS: Mention that the named return value extension has been
8983 deprecated.
8984 * cp-tree.h (original_result_rtx): Define.
8985 (TREE_REFERENCE_EXPR): Remove.
8986 (DECL_VPARENT): Likewise.
8987 (pushdecl_nonclass_level): Likewise.
8988 (store_return_init): Likewise.
8989 (reinit_lang_specific): Likewise.
8990 (genrtl_named_return_value): Change prototype.
8991 * decl.c (original_result_rtx): Remove.
8992 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
8993 Do not generate RTL for local variables here.
8994 (store_return_init): Remove.
8995 * semantics.c (genrtl_named_return_value): Simplify. Fold in
8996 store_return_init.
8997 (finish_named_return_value): Adjust accordingly. Warn that this
8998 extension is deprecated.
8999 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9000
d7c4edd0
NS
90012000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9002
9003 * pt.c (type_unification_real): Replace switch with if.
9004 (unify): Tsubst non-type parms before comparing.
9005
46e2747c
NS
90062000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9007
9008 * error.c (dump_typename): New function, broken out of ...
9009 (dump_type): ... here. Use it.
9010 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9011
c833d2be
NS
90122000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9013
9014 * init.c (build_offset_ref): Deal with namespace scoped
9015 TEMPLATE_ID_EXPRs.
9016
b1ce3eb2
NS
90172000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9018
9019 * class.c (resolve_address_of_overloaded_function): Add
9020 explanation message.
9021 * decl.c (define_case_label): Reformat explanation.
9022 * decl2.c (finish_static_data_member_decl): Likewise.
9023 (grokfield): Likewise.
9024 * friend.c (do_friend): Likewise.
9025
11f53b6a
ZW
90262000-09-05 Zack Weinberg <zack@wolery.cumb.org>
9027
9028 * tree.c (walk_tree): Expose tail recursion.
9029 (walk_stmt_tree): New function.
9030 * cp-tree.h: Prototype walk_stmt_tree.
9031 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9032 the BLOCKs directly. If a BLOCK has no variables after
9033 pruning, discard it.
9034 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
9035 restore the line number.
9036
ee94fce6
MM
90372000-09-05 Mark Mitchell <mark@codesourcery.com>
9038
9039 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9040 (pt.o): Remove dependency on HTAB_H.
9041 * cp-tree.h: Include hashtab.h.
9042 (walk_tree): Change prototype.
9043 (walk_tree_without_duplicates): New function.
9044 * decl.c (check_default_argument): Use it.
9045 * optimize.c (remap_decl): Adjust calls to walk_tree.
9046 (copy_body): Likewise.
9047 (expand_calls_inline): Likewise.
9048 (calls_setjmp_p): Use walk_tree_without_duplicates.
9049 * pt.c: Don't include hashtab.h.
9050 (for_each_template_parm): Use walk_tree_without_duplicates.
9051 * semantics.c (finish-stmt_tree): Likewise.
9052 (expand_body): Likewise.
9053 * tree.c (walk_tree): Add additional parameter.
9054 (walk_tree_without_duplicates): New function.
9055 (count_trees): Use it.
9056 (verify_stmt_tree): Adjust call to walk_tree.
9057 (find_tree): Use walk_tree_without_duplicates.
9058 (no_linkage_check): Likewise.
9059 (break_out_target_exprs): Adjust call to walk_tree.
9060 (cp_unsave): Likewise.
9061
a1281f45
KL
90622000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9063
9064 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9065 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9066 * cp-tree.h (TYPE_BINFO): Adjust comment.
9067 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9068 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9069 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9070 (TYPE_TEMPLATE_INFO): Likewise.
9071 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9072 * class.c (push_nested_class): Likewise.
9073 * decl.c (lookup_name_real): Likewise.
9074 (grokdeclarator): Likewise.
9075 (grok_op_properties): Likewise.
9076 (xref_tag): Likewise.
9077 (xref_basetypes): Likewise.
9078 * decl2.c (constructor_name_full): Likewise.
9079 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9080 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9081 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9082 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9083 (dump_type_suffix): Likewise.
9084 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9085 instead.
9086 (get_aggr_from_typedef): Likewise.
9087 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9088 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9089 (write_template_parm): Likewise.
9090 (write_template_template_parm): Check tree code instead of
9091 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 9092 * method.c (build_overload_nested_name): Add
a1281f45
KL
9093 BOUND_TEMPLATE_TEMPLATE_PARM.
9094 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9095 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9096 * pt.c (convert_template_argument): Check tree code instead of
9097 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9098 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
9099 (for_each_template_parm): Adjust comment.
9100 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
9101 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9102 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
9103 template_args_equal to compare template template parameter cases.
9104 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9105 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
9106 instead.
9107 * tree.c (copy_template_template_parm): Decide whether to create
9108 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
9109 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9110 (copy_tree_r): Likewise.
9111 * typeck.c (comptypes): Likewise. Check tree code instead of
9112 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9113
c9672d45
ME
91142000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
9115
9116 * decl.c (finish_function): Move the code for handling functions
9117 marked with the constructor and destructor attributes inside the
9118 expand_p block.
9119
67804825
NS
91202000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9121
9122 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9123
1bc0793e
NS
91242000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9125
9126 * pt.c (lookup_template_class): Remove abort.
9127 * tree.c (get_type_decl): Allow error_mark_node.
9128
3338663b
NS
91292000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9130
9131 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9132 TEMPLATE_ID_EXPRs.
9133
1b84dc37
MM
91342000-09-03 Mark Mitchell <mark@codesourcery.com>
9135
9136 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 9137 new ABI mangling.
1b84dc37 9138
9687f8f4
NS
91392000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9140
9141 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 9142 union tag mismatch error reporting.
9687f8f4 9143
4f8025eb
NS
91442000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9145
c9672d45 9146 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 9147
495d26d6
JM
91482000-08-30 Jason Merrill <jason@redhat.com>
9149
9150 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
9151
9152 * tree.c (bot_manip): Check TREE_CONSTANT rather than
9153 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
9154 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
9155
9156 * decl.c (start_function): Always call make_function_rtl.
9157
7efcf466
ZW
91582000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9159
495d26d6 9160 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
9161 (finish_stmt_tree): Call it via walk_tree.
9162
63ad61ed
ZW
91632000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9164
9165 * class.c (build_secondary_vtable): Constify a char *.
9166 * decl.c (init_decl_processing): Initialize function_id_node,
9167 pretty_function_id_node, and func_id_node.
9168 * input.c (struct input_source): Constify 'str'.
9169 (feed_input): Constify first argument.
9170 * mangle.c (write_identifier): Constify argument.
9171 * pt.c (mangle_class_name_for_template): Constify argument.
9172
4361b41d
MM
91732000-08-29 Mark Mitchell <mark@codesourcery.com>
9174
9175 * typeck.c (mark_addressable): Remove code that pokes around in
9176 RTL.
9177
881c6935
JM
91782000-08-28 Jason Merrill <jason@redhat.com>
9179
9180 * lex.c (file_name_nondirectory): Move to toplev.c.
9181
9182 * cp-tree.h (LOCAL_CLASS_P): New macro.
9183 * class.c (finish_struct_1): Use it.
9184
f0f33848
AS
91852000-08-27 Alex Samuel <samuel@codesourcery.com>
9186
9187 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
9188 (write_encoding): Pass another argument to write_name.
9189 (write_name): Add ignore_local_scope parameter. Fix handling of
9190 local names.
9191 (write_nested_name): Use write_unqualified_name.
9192 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
9193 (write_template_prefix): Use write_unqualified_name.
9194 (write_component): Remove.
9195 (write_local_name): Add parameter. Use direct local entity to
9196 discriminator calculation.
0e5921e8 9197 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
9198 (write_template_template_arg): Likewise.
9199 (make_guard_variable): Likewise.
0e5921e8 9200
94dfccd1
JM
92012000-08-27 Jason Merrill <jason@redhat.com>
9202
9203 * decl.c (pushdecl): Matching decls for local externs are found in
9204 the current level. Propagate linkage information from previous
9205 declarations.
9206
14fdf4b6
GDR
92072000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
9208
9209 * ir.texi (Expressions): Fix typo.
9210
b5232c64
GM
92112000-08-25 Greg McGary <greg@mcgary.org>
9212
9213 * tree.c (init_tree): Use ARRAY_SIZE.
9214
22a4158c
GDR
92152000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
9216
9217 * error.c (cp_tree_printer): Rework.
9218
f22967f3
MM
92192000-08-25 Mark Mitchell <mark@codesourcery.com>
9220
a0c182fe
MM
9221 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
9222 dyn-string.o.
9223 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
9224 (cp-demangle.o): Remove target.
9225 (dyn-string.o): Likewise.
9226
f22967f3
MM
9227 * decl.c (grokfndecl): Require that `main' return an `int'.
9228 * mangle.c (write_encoding): Don't mangle return types for
9229 conversion functions.
9230
a1066c99
GDR
92312000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
9232
9233 * error.c (tree_formatting_info): New data type.
9234 (tree_being_formatted): New macro.
9235 (tree_formatting_flags): Likewise.
9236 (put_whitespace): Likewise.
9237 (print_tree_identifier): Likewise.
9238 (print_identifier): Likewise.
9239 (cp_tree_printer, print_function_argument_list, print_declaration,
9240 print_expression, print_function_declaration,
9241 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 9242 functions.
a1066c99
GDR
9243 (init_error): Initialize lang_printer.
9244
3f2b640a
JM
92452000-08-24 Jason Merrill <jason@redhat.com>
9246
9247 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
9248 adjustment necessary.
9249
7ec09bf7
GM
92502000-08-24 Greg McGary <greg@mcgary.org>
9251
9252 * cp-tree.h (MAIN_NAME_P): Remove macro.
9253
2ab99c46
GDR
92542000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
9255
9256 * error.c (print_instantiation_context): Don't forget to flush the
9257 buffer.
9258
7def1251
JM
92592000-08-23 Jason Merrill <jason@redhat.com>
9260
9261 * typeck.c (build_ptrmemfunc): Save the input pmf.
9262
9263 * method.c (process_modifiers): Use same_type_p.
9264
94350948
MM
92652000-08-23 Mark Mitchell <mark@codesourcery.com>
9266
9267 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
9268 * mangle.c (write_function_type): Change prototype.
9269 (write_encoding): Don't mangle return types for
9270 constructors or destructors.
9271 (write_type): Adjust call to write_function_type.
9272 * pt.c (instantiate_template): Instantiate alternate entry points
9273 when instantiating the main function.
0e5921e8 9274
a64e7329
GDR
92752000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
9276
9277 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 9278 output_printf.
a64e7329 9279
a72462a4
GDR
92802000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
9281
9282 * decl.c (init_decl_processing): Remove bogus initialization.
9283 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
9284 (init_error): Initialize print_error_function.
9285
3add6264
TP
92862000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9287
9288 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
9289
cb753e49
GDR
92902000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
9291
9292 * Makefile.in (error.o): Depends on diagnostic.h
9293
9294 * cp-tree.h (problematic_instantiation_changed,
9295 record_last_problematic_instantiation, current_instantiation,
9296 print_instantiation_context): Declare.
9297 (maybe_print_template_context): Remove.
9298
9299 * decl.c (init_decl_processing): Set print_error_function to NULL.
9300 (lang_print_error_function): Remove, since we're using a new
9301 machinery.
9302
9303 * error.c: #include diagnostic.h
9304 (function_category): New function.
9305 (cp_diagnostic_starter): Likewise.
9306 (cp_diagnostic_finalizer): Likewise.
9307 (cp_print_error_function): Likewise.
9308 (maybe_print_instantiation_context): Likewise.
9309 (print_instantiation_full_context): Likewise.
9310 (print_instantiation_partial_context): Likewise.
9311 (print_instantiation_context): Define.
9312 (init_error): Initialize diagnostic pager and finalizer.
9313
9314 * pt.c (problematic_instantiation_changed): Define.
9315 (record_last_problematic_instantiation): Likewise.
9316 (current_instantiation): Likewise.
9317 (maybe_print_template_context): Remove.
9318 (print_template_context): Likewise.
9319 (current_tinst_level): Make static to reflect Brendan Kehoe's
9320 change of 1995-04-13.
0e5921e8
ZW
9321 (push_tinst_level): Call print_instantiation_context.
9322
05a3d06e 93232000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 9324
05a3d06e
N
9325 * lang-specs.h: Do not process -o or run the assembler if
9326 -fsyntax-only.
9327
93e2382f
JM
93282000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
9329
9330 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
9331 variables.
9332 * decl2.c (lang_decode_option): Disable gettext attributes for
9333 -ansi.
9334
24805e80
GDR
93352000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
9336
9337 * lex.c (lang_init_options): Default diagnostic message maximum
9338 length to 80, when line-wrapping.
9339
b485e15b
MM
93402000-08-20 Mark Mitchell <mark@codesourcery.com>
9341
9342 * class.c (build_vtbl_initializer): Clear the entire
9343 vtbl_init_data. Start keeping track of the functions for which we
9344 have created vcall offsets here.
9345 (dfs_build_vcall_offset_vtbl_entries): Remove.
9346 (build_vcall_offset_vtbl_entries): Reimplement.
9347 (add_vcall_offset_vtbl_entries_r): New function.
9348 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
9349 computing when vcall offsets are necessary.
9350
2ae7bada
NS
93512000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9352
9353 * decl.c (member_function_or_else): Use cp_error ... %T.
9354 (grokdeclarator): Likewise.
9355 (start_method): Likewise.
0e5921e8 9356 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 9357
7a8b1375
NS
93582000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9359
9360 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 9361 TYPE_DECLs.
7a8b1375 9362
19420d00
NS
93632000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9364
9365 * cp-tree.h (PTRMEM_OK_P): New macro.
9366 (itf_ptrmem_ok): New enumeration value.
9367 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
9368 argument. Diagnose implicit pointer to member.
9369 (instantiate_type): Don't diagnose implicit pointer to member
9370 here. Pass itf_ptrmem_ok if ok. Adjust calls to
9371 resolve_address_of_overloaded_function.
9372 * init.c (build_offset_ref): Set PTRMEM_OK_P.
9373 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
9374 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
9375 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
9376 (build_unary_op): Deal with single non-static member in
9377 microsoft-land.
9378
66081283
NS
93792000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9380
9381 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
9382
fa40aa12
NS
93832000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9384
9385 * cp-tree.h (enum_name_string): Remove prototype.
9386 (report_case_error): Remove prototype.
9387 * cp/typeck2.c (enum_name_string): Remove.
9388 (report_case_error): Remove.
9389 * error.c (dump_expr): Deal with enum values directly.
9390 Correctly negate integer constant.
9391
d13b34e9
NS
93922000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9393
9394 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
9395 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
9396 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
9397 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
9398 (__cxa_vec_new): Use __cxa_vec_new2.
9399 (__cxa_vec_delete): Use __cxa_vec_delete2.
9400
2f1b80af
NS
94012000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9402
9403 * vec.cc (__cxa_vec_new): Set "C" linkage.
9404 (__cxa_vec_ctor): Likewise.
9405 (__cxa_vec_cctor): Likewise.
9406 (__cxa_vec_dtor): Likewise.
9407 (__cxa_vec_delete): Likewise.
9408 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
9409 (__cxa_vec_ctor): Likewise.
9410 (__cxa_vec_cctor): Likewise.
9411 (__cxa_vec_dtor): Likewise.
9412 (__cxa_vec_delete): Likewise.
9413
105d8e1f
NS
94142000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9415
9416 * class.c (instantiate_type): Reinstate local variable
9417 deleted in previous change.
0e5921e8 9418
f1819d9a
NS
9419 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
9420 itf_no_attributes.
105d8e1f 9421
5e76004e
NS
94222000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9423
9424 * cp-tree.h (instantiate_type_flags): New enumeration.
9425 (instantiate_type): Change parameter.
9426 * class.c (instantiate_type): Adjust prototype. Adjust.
9427 * call.c (standard_conversion): Adjust instantiate_type call.
9428 (reference_binding): Likewise.
9429 (build_op_delete_call): Likewise.
9430 (convert_like_real): Likewise.
9431 * cvt.c (cp_convert_to_pointer): Likewise.
9432 (convert_to_reference): Likewise.
9433 * pt.c (convert_nontype_argument): Likewise.
9434 * typeck.c (build_binary_op): Likewise.
9435 (build_ptrmemfunc): Likewise.
9436 (convert_for_assignment): Likewise.
9437
4b054b80
NS
94382000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9439
9440 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
9441 (current_aggr): Define.
9442 * decl.c (grokdeclarator): Make sure a friend class is an
9443 elaborated type specifier.
9444 * parse.y (current_aggr): Remove static definition.
9445 (cp_parse_init): Adjust.
9446 (structsp): Clear and restore current_aggr.
9447 (component_decl_list): Clear current_aggr.
0e5921e8 9448
4b054b80
NS
9449 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
9450 aggregate tag on the typename's context.
0e5921e8 9451
321cba97
NS
9452 * pt.c (tsubst_friend_class): Return error_mark_node, if
9453 parms becomes NULL.
9454 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 9455
08aead78
NS
94562000-08-14 Nathan Sidwell <nathan@codesourcery.com>
9457
9458 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 9459 (convert_to_reference): ... here. Use it.
08aead78 9460
fa1f3ebc
KL
94612000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9462
9463 * parse.y (template_arg): Add rule for template qualified with
9464 global scope.
9465
9845b52b
TP
94662000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9467
9468 * decl2.c (add_function): Reorganize.
9469 (arg_assoc): Do not consider function template decls.
9470
e69c8072
JM
94712000-08-11 Jason Merrill <jason@redhat.com>
9472
9473 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
9474 looking inside.
9475
5c1e5476
NS
94762000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9477
9478 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
9479 (lookup_nested_tag): Likewise.
0e5921e8 9480
5c1e5476
NS
9481 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
9482 can be produced.
9483
5426aa7f
NS
94842000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9485
9486 * parse.y (named_complex_class_head_sans_basetype): Remove
9487 always true if.
9488
fd037e0d
NS
94892000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9490
9491 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
9492 explicit TEMPLATE_ID_EXPR args.
9493 (build_expr_from_tree, case CALL_EXPR): Likewise.
9494
73ae5c34
NS
94952000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9496
9497 * decl.c (check_tag_decl): Diagnose typename's which don't
9498 declare anything.
9499
aa54df09
NS
95002000-08-10 Nathan Sidwell <nathan@codesourcery.com>
9501
9502 * init.c (build_aggr_init): Reject bogus array initializers
9503 early.
9504
7e8dad18
NS
95052000-08-09 Nathan Sidwell <nathan@codesourcery.com>
9506
9507 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
9508 runtime.
9509 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 9510 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 9511
0f586b9b
NS
95122000-08-09 Nathan Sidwell <nathan@codesourcery.com>
9513
9514 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 9515 attempting to cast from ambiguous base.
0f586b9b 9516
08e72a19
JM
95172000-08-08 Jason Merrill <jason@redhat.com>
9518
9519 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
9520 (tsubst_template_arg_vector): Likewise.
9521
9522 * decl2.c (build_anon_union_vars): Choose the largest field; don't
9523 assume that one will be as large as the union.
9524
0811ea8f
KH
95252000-08-07 Kazu Hirata <kazu@hxi.com>
9526
9527 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
9528 * decl.c (pop_labels): Likewise.
9529
f9fcf62b
JO
95302000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
9531
9532 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
9533 specifications.
9534 (__pointer_to_member_type_info): Likewise.
9535 (__base_class_info): Likewise.
9536 (__class_type_info): Likewise.
9537 (__si_class_type_info): Likewise.
9538 (__vmi_class_type_info): Likewise.
9539 * tinfo.cc (__si_class_type_info::__do_find_public_src):
9540 Changed member names to match specifications.
9541 (__vmi_class_type_info::__do_find_public_src): Likewise.
9542 (__si_class_type_info::__do_dyncast): Likewise.
9543 (__vmi_class_type_info::__do_dyncast): Likewise.
9544 (__si_class_type_info::__do_upcast): Likewise.
9545 (__vmi_class_type_info::__do_upcast): Likewise.
9546 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
9547 (__pbase_type_info::__pointer_catch): Likewise.
9548 (__pointer_type_info::__pointer_catch): Likewise.
9549 (__pointer_to_member_type_info::__pointer_catch): Likewise.
9550
a36556a8
ZW
95512000-08-04 Zack Weinberg <zack@wolery.cumb.org>
9552
0e5921e8
ZW
9553 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
9554 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
9555 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 9556
452a394b
MM
95572000-08-04 Mark Mitchell <mark@codesourcery.com>
9558
9559 * cp-tree.h (add_method): Change prototype.
9560 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
9561 Don't double the size of the method vector in the error case.
9562 (handle_using_decl): Adjust call to add_method.
9563 (add_implicitly_declared_members): Likewise.
9564 (clone_function_decl): Likewise.
9565 * decl2.c (check_classfn): Likewise.
9566 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 9567
b8458e3e
JM
95682000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
9569
9570 * decl.c (flag_isoc94): New variable.
9571
a1bcc528
JM
95722000-08-02 Jason Merrill <jason@redhat.com>
9573
9574 * pt.c (do_type_instantiation): Add complain parm; don't complain
9575 if called recursively.
9576 * cp-tree.h, parse.y: Adjust.
9577
50e60bc3
ZW
95782000-08-02 Zack Weinberg <zack@wolery.cumb.org>
9579
eae51189
ZW
9580 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
9581 -Wno-strict-prototypes.
9582
37620334
ZW
9583 * g++spec.c: Adjust type of second argument to
9584 lang_specific_driver, and update code as necessary.
9585
50e60bc3
ZW
9586 * cp-tree.h: Don't prototype min_precision here.
9587 (my_friendly_assert): Cast expression to void.
9588 * semantics.c (do_poplevel): Initialize scope_stmts.
9589
3f954fc3
MM
95902000-08-02 Mark Mitchell <mark@codesourcery.com>
9591
9592 * cp-tree.h (DECL_NEEDED_P): Tweak.
9593
ab4fa7ed
JM
95942000-07-28 Jason Merrill <jason@redhat.com>
9595
9596 * lang-specs.h: Use %i in rule for .ii files.
9597
4871239e
ZW
95982000-07-31 Zack Weinberg <zack@wolery.cumb.org>
9599
9600 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
9601
911a71a7
MM
96022000-07-30 Mark Mitchell <mark@codesourcery.com>
9603
9604 Allow indirect primary bases.
9605 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
9606 primary_base.
9607 (CLASSTYPE_VFIELD_PARENT): Remove.
9608 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
9609 (BINFO_PRIMARY_BINFO): Remove.
9610 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
9611 (BINFO_VBASE_PRIMARY_P): Likewise.
9612 (BINFO_PRIMARY_BASE_OF): New macro.
9613 (BINFO_INDIRECT_PRIMARY_P): Likewise.
9614 (get_primary_binfo): New function.
9615 * decl.c (lang_mark_tree): Make lang_type::primary_base.
9616 * class.c (vcall_offset_data_s): Rename to ...
9617 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
9618 and add ctor_vtbl_p.
9619 (get_derived_offset): Use get_primary_binfo.
9620 (dfs_mark_primary_bases): Adjust handling of virtual primary
9621 bases.
9622 (mark_primary_bases): Likewise.
9623 (set_primary_base): Take a binfo, not an integer, as a
9624 representation of the primary base.
9625 (indirect_primary_base_p): Remove.
9626 (determine_primary_base): Adjust for indirect primary bases.
9627 (dfs_find_final_overrider): Fix typo in coment.
9628 (update_vtable_entry_for_fn): Use get_primary_binfo.
9629 (layout_nonempty_base_or_field): Tweak.
9630 (build_base_fields): Adjust for new primary base semantics.
9631 (dfs_propagate_binfo_offsets): Remove.
9632 (propagate_binfo_offsets): Rewrite.
9633 (dfs_set_offset_for_shared_vbases): Remove.
9634 (layout_virtual_bases): Don't use it.
9635 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
9636 ABI.
9637 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
9638 CLASSTYPE_VFIELD_PARENT.
9639 (dfs_get_primary_binfo): New function.
9640 (get_primary_binfo): Likewise.
9641 (dump_class_hierarchy_r): Tweak printing of primary bases.
9642 (build_vtbl_initializer): Fix typo in comments. Use
9643 vtbl_init_data.
9644 (build_vcall_and_vbase_vtbl_entries): Likewise.
9645 (build_vbaes_offset_vtbl_entries): Likewise.
9646 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
9647 BV_VCALL_INDEX to handle indirect primary bases.
9648 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
9649 (build_rtti_vtbl_entries): Likewise.
9650 * search.c (get_shared_vbase_if_not_primary): Tweak.
9651 (find_vbase_instance): Likewise.
9652 (binfo_for_vtable): Simplify.
9653 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
9654 (make_binfo): Make it have 11 entries.
0e5921e8 9655
722bed0f
AS
96562000-07-30 Alex Samuel <samuel@codesourcery.com>
9657
9658 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
9659 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
9660 ascertaining primaryness.
9661 (G): Remove template_args.
9662 (decl_is_template_id): New function.
9663 (write_encoding): Use decl_is_template_id.
9664 (write_name): Likewise. Handle type_decls. Get main variant of
9665 type decls.
9666 (write_nested_name): Likewise.
9667 (write_prefix): Likewise.
9668 (write_template_prefix): Likewise.
9669 (write_special_name_constructor): Remove defunct production from
9670 comment.
9671 (write_bare_function_type): Remove comment about absent parameter.
9672 (write_template_template_arg): Add missing grammar production to
9673 comment.
9674
9076e292
JM
96752000-07-27 Jason Merrill <jason@redhat.com>
9676
9677 * decl.c (duplicate_decls): If common_type produces a non-typedef
9678 type for a typedef, just use the old type.
9679
b2244c65
MM
96802000-07-27 Mark Mitchell <mark@codesourcery.com>
9681
9682 * cp-tree.h (function_depth): Declare.
9683 (verify_stmt_tree): Likewise.
9684 (find_tree): Likewise.
9685 * decl.c (function_depth): Give it external linkage.
9686 * optimize.c (optimize_function): Increment and decrement it.
9687 * tree.c (verify_stmt_tree_r): New function.
9688 (verify_stmt_tree): Likewise.
9689 (find_tree_r): Likewise.
9690 (find_tree): Likewise.
9691
62e3bf54
JM
96922000-07-27 Jason Merrill <jason@redhat.com>
9693
9076e292
JM
9694 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
9695 TYPE_PTRMEMFUNC_P.
9696 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 9697
5a728aca
MM
96982000-07-26 Mark Mitchell <mark@codesourcery.com>
9699
9700 * decl.c (start_cleanup_fn): Mark the function as `inline'.
9701 * decl2.c (get_guard): Call cp_finish_decl, not
9702 rest_of_decl_compilation, for local guards.
9703 * lex.c (do_identifier): Remove unused variable.
9704
6a1fa5f9
ME
9705Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
9706
9707 * parse.y: Add missing ';'.
9708
0c10a805
MM
97092000-07-26 Mark Mitchell <mark@codesourcery.com>
9710
9711 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
9712 of `extern "C++"'.
9713
8b27e9ef
NS
97142000-07-25 Nathan Sidwell <nathan@codesourcery.com>
9715
9716 Kill strict_prototype. Backwards compatibility only for
9717 non NO_IMPLICIT_EXTERN_C systems.
9718 * cp-tree.h (flag_strict_prototype): Remove.
9719 (strict_prototype): Remove.
9720 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9721 * decl.c (maybe_push_to_top_level): Adjust.
9722 (pop_from_top_level): Adjust.
9723 (decls_match): Only allow sloppy parm matching for ancient
9724 system headers.
9725 (init_decl_processing): Adjust.
9726 (grokdeclarator): Adjust.
9727 * decl2.c (flag_strict_prototype): Remove.
9728 (strict_prototype): Remove.
9729 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9730 (lang_f_options): Remove "strict-prototype".
9731 (unsupported-options): Add "strict-prototype".
9732 * lex.c (do_identifier): Adjust.
9733 (do_scoped_id): Adjust.
9734 * parse.y (empty_parms): Adjust.
9735 * class.c (push_lang_context): Adjust.
9736 (pop_lang_context): Adjust.
9737 * typeck.c (comp_target_parms): Adjust.
9738
c3783399
NS
97392000-07-25 Nathan Sidwell <nathan@codesourcery.com>
9740
9741 * decl.c (poplevel): Deal with anonymous variables at for scope.
9742 (maybe_inject_for_scope_var): Likewise.
9743
a7023245
ZW
97442000-07-25 Zack Weinberg <zack@wolery.cumb.org>
9745
9746 * decl.c: Remove all signal handling code, now done in toplev.c.
9747
95ee998c
MM
97482000-07-23 Mark Mitchell <mark@codesourcery.com>
9749
9750 * decl.c (make_rtl_for_nonlocal_decl): Rework.
9751
9752 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
9753 correctly.
9754
1b493b81
ZW
97552000-07-20 Zack Weinberg <zack@wolery.cumb.org>
9756
9757 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
9758 Define my_friendly_assert and my_friendly_abort as macros
9759 which may call friendly_abort. Prototype friendly abort, not
9760 my_friendly_abort or my_friendly_assert.
9761 * decl.c (signal_catch): Report the signal caught in the error
9762 message. Call fatal directly.
9763 * typeck2.c (ack, my_friendly_assert): Delete.
9764 (my_friendly_abort): Rename to friendly_abort. Expect file,
9765 line, and function parameters. Report the abort code, then
9766 call fancy_abort. Do not mask an abort if errors have
9767 already occurred.
9768
a306451c
NS
97692000-07-18 Nathan Sidwell <nathan@codesourcery.com>
9770
9771 * typeck.c (comp_target_parms): Remove obsolete parameter.
9772 (comp_target_types): Adjust.
9773
f49fad00
JM
97742000-07-17 Jason Merrill <jason@redhat.com>
9775
9776 * typeck.c (mark_addressable): Never set TREE_USED.
9777 * call.c (build_call): Don't abort on calls to library functions
9778 that have been declared normally.
9779
9780 * typeck.c (build_binary_op): Fix grammar in warning.
9781
9782 * exception.cc (__eh_free): Fix prototype.
9783
9784 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
9785
0e5921e8 9786 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
9787 IDENTIFIER_NAMESPACE_VALUE.
9788
69690d98
MM
97892000-07-16 Mark Mitchell <mark@codesourcery.com>
9790
9791 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
9792 * method.c (use_thunk): Correct handling of vcall offsets.
9793
bfbbc080
ZW
97942000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9795
9796 * .cvsignore: parse.h and parse.c have no cp- prefix.
9797
83a90717
MM
97982000-07-13 Mark Mitchell <mark@codesourcery.com>
9799
9800 * .cvsignore: New file.
9801
ea414c97
ZW
98022000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9803
9804 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9805
792abd35
MM
98062000-07-12 Mark Mitchell <mark@codesourcery.com>
9807
9808 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
9809 * parse.c: Remove.
9810 * parse.h: Likewise.
9811
72a50ab0
MM
98122000-07-11 Mark Mitchell <mark@codesourcery.com>
9813
9814 * class.c (layout_class_type): Add pointers to virtual bases after
9815 base classes under the old ABI.
9816
0dfdeca6
BC
98172000-07-10 Benjamin Chelf <chelf@codesourcery.com>
9818
9819 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
9820 (finish_continue_stmt): Likewise.
9821 (begin_for_stmt): Remove call to note_level_for_for.
9822 (finish_goto_stmt): Change call from build_min_nt
9823 to build_stmt.
9824 (finish_expr_stmt): Likewise.
9825 (begin_if_stmt): Likewise.
9826 (begin_while_stmt): Likewise.
9827 (finish_while_stmt): Likewise.
9828 (finish_return_stmt): Likewise.
9829 (begin_for_stmt): Likewise.
9830 (finish_for_stmt): Likewise.
9831 (finish_break_stmt): Likewise.
9832 (begin_switch_stmt): Likewise.
9833 (finish_case_label): Likewise.
9834 (genrtl_try_block): Likewise.
9835 (begin_try_block): Likewise.
9836 (begin_handler): Likewise.
9837 (begin_compound_stmt): Likewise.
9838 (finish_asm_stmt): Likewise.
9839 (finish_label_stmt): Likewise.
9840 (add_decl_stmt): Likewise.
9841 (finish_subobject): Likewise.
9842 (finish_decl_cleanup): Likewise.
9843 (finish_named_return_value): Likewise.
9844 (setup_vtbl_ptr): Likewise.
9845 (add_scope_stmt): Likewise.
9846 * decl.c (finish_constructor_body): Likewise.
9847 (finish_destructor_body): Likewise.
9848 * optimize.c (copy_body_r): Likewise.
9849 (initialize_inlined_parameters): Likewise.
9850 (declare_return_variable): Likewise.
9851 (expand_call_inline): Likewise.
0e5921e8 9852
f12eef58
JJ
98532000-07-10 Jakub Jelinek <jakub@redhat.com>
9854
9855 * semantics.c (expand_body): Sync interface information
9856 at the end of function body expansion.
9857
2bb5d995
JM
98582000-07-09 Jason Merrill <jason@redhat.com>
9859
9860 * init.c (build_new_1): Bail early if the call to new fails.
9861
0e5921e8 9862 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
9863 an INTEGER_CST, not just TREE_CONSTANT.
9864
0e5921e8 9865 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
9866 the DECL_TEMPLATE_RESULT.
9867 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
9868 codes.
9869
9870 * error.c (dump_template_bindings): Don't crash if we had an
9871 invalid argument list.
9872
9873 * typeck.c (c_expand_start_case): Do narrowing here.
9874 * semantics.c (finish_switch_cond): Not here.
9875
98762000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
9877
9878 * parse.y (asm_clobbers): Do string concatenation.
9879
089acd57
MM
98802000-07-09 Mark Mitchell <mark@codesourcery.com>
9881
9882 * decl.c (pushtag): Don't put local classes in template functions
9883 on the local_classes list.
9884
98852000-07-04 Scott Snyder <snyder@fnal.gov>
9886
9887 * decl2.c (get_guard): Add missing return for old ABI local
9888 variable case.
9889
7b019c19
MM
98902000-07-09 Mark Mitchell <mark@codesourcery.com>
9891
9892 * cp-tree.h (char_type_p): New function.
9893 * decl.c (init_decl_processing): Don't initialize
9894 signed_wchar_type_node or unsigned_wchar_type_node.
9895 (complete_array_type): Handle brace-enclosed string-constants.
9896 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
9897 * tree.c (char_type_p): New function.
9898 * typeck2.c (digest_init): Use char_type_p.
9899
a5f1c5f8
NS
99002000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9901
9902 * pt.c (tsubst): Don't layout type, if it's error_mark.
9903
84e5ca0f
NS
99042000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9905
9906 * pt.c (instantiate_pending_templates): Reset template level.
9907
ab785305
JM
99082000-07-05 Jason Merrill <jason@redhat.com>
9909
9910 * call.c (joust): Don't complain about `operator char *()' beating
9911 `operator const char *() const'.
9912
90418208
JM
99132000-07-04 scott snyder <snyder@fnal.gov>
9914 Jason Merrill <jason@redhat.com>
9915
0e5921e8 9916 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
9917 bases has a null TYPE_BINFO_VTABLE.
9918
99192000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
9920 Jason Merrill <jason@redhat.com>
9921
9922 * parse.y (member_init): Just pass in the type.
9923 * init.c (expand_member_init): Handle getting a type.
9924
9925