]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
search.c (grow_bfs_bases): New subroutine of bfs_walk.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
860c9ea6
ZW
12003-02-18 Zack Weinberg <zack@codesourcery.com>
2
3 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5 vectors, for speed.
6
6b99d1c0
MM
72003-02-18 Mark Mitchell <mark@codesourcery.com>
8
9 PR c++/9704
10 * class.c (layout_class_type): In the 3.2 ABI, take into account
11 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
12
2b59501b
MA
132003-02-18 Matt Austern <austern@apple.com>
14
15 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
16 nothing for C++.
17 * cp/decl.c (wrapup_globals_for_namespace): Remove special
18 handling of global namespace.
19
e17aafd1
GK
202003-02-18 Geoffrey Keating <geoffk@apple.com>
21
22 * cp-tree.h (rid_to_yy): Delete.
23 (C_RID_YYCODE): Delete.
24 (finish_file): Delete redundant declaration.
25
04b03085
JM
262003-02-18 Jason Merrill <jason@redhat.com>
27
28 PR c++/9623
29 * decl.c (reshape_init): Don't mess with initializer labels.
30
bf7c02dd
BE
312003-02-18 Ben Elliston <bje@redhat.com>
32
33 PR other/7350
34 * decl.c (duplicate_decls): Fix typo in comment.
35
0f3a8219
MEC
362003-02-17 Michael Elizabeth Chastain <mec@shout.net>
37
c7adfa01 38 PR debug/9717
0f3a8219
MEC
39 * class.c (build_base_field): Mark fields for base classes with
40 DECL_IGNORED_P.
41
db77ef4c
KL
422003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
43
44 PR c++/9457
45 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
46 CONSTRUCTOR_ELTS only once.
47
0df4ae96
KL
482003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
49
50 PR c++/9459
51 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
52 (dump_type_suffix): Likewise.
53
86ac0575
NS
542003-02-14 Nathan Sidwell <nathan@codesourcery.com>
55
56 * search.c: ANSIfy function declarations and definitions.
57 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
58 * call.c (build_method_call, resolve_scoped_fn_name,
59 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
60 calls.
61 * class.c (handle_using_decl): Likewise.
62 * decl.c (make_typename_type, make_unmound_class_template,
63 start_decl, compute_array_index_type): Likewise.
64 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
65 * init.c (expand_member_init, build_member_call): Likewise.
66 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
67 resolve_typename_type): Likewise.
68 * typeck.c (lookup_destructor, finish_class_member_access_exprm
69 build_prememfunc_access_expr): Likewise.
70
fd295cb2
GDR
712003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
72
73 * decl2.c: Include "timevar.h".
74 (namespace_ancestor): Time name lookup.
75 (add_using_namespace): Likewise.
76 (lookup_using_namespace): Likewise.
77 (qualified_lookup_using_namespace): Likewise.
78 (decl_namespace): Likewise.
79 (lookup_arg_dependent): Likewise.
80 * lex.c (do_identifier): Likewise.
81 (do_scoped_id): Likewise.
82 * pt.c (lookup_template_class): Likewise.
83
62ed060f
AP
842003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
85
86 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
87
22ffcc6f
GDR
882003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
89
90 * decl.c: Include "timevar.h".
91 (poplevel): Time name lookup.
92 (find_binding): Likewise.
93 (push_namespace): Likewise.
94 (pop_nested_namespace): Likewise.
95 (store_bindings): Likewise.
96 (maybe_push_to_top_level): Likewise.
97 (pop_from_top_level): Likewise.
98 (push_local_name): Likewise.
99 (pushtag): Likewise.
100 (pushdecl): Likewise.
101 (pushdecl_with_scope): Likewise.
102 (pushdecl_namespace_level): Likewise.
103 (pushdecl_top_level): Likewise.
104 (pushdecl_class_level): Likewise.
105 (push_class_level_binding): Likewise.
106 (push_using_decl): Likewise.
107 (push_using_directive): Likewise.
108 (push_overloaded_decl): Likewise.
109 (lookup_label): Likewise.
110 (define_label): Likewise.
111 (lookup_tag): Likewise.
112 (lookup_tag_reverse): Likewise.
113 (lookup_namespace_name): Likewise.
114 (select_decl): Likewise.
115 (unqualified_namespace_lookup): Likewise.
116 (lookup_name_real): Likewise.
117 (lookup_name_current_level): Likewise.
118 (lookup_type_current_level): Likewise.
119 (maybe_inject_for_scope_var): Likewise.
120 (xref_tag): Likewise.
121
122 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
123
6a540f3c
PE
1242003-02-12 Phil Edwards <pme@gcc.gnu.org>
125
126 * decl.c (build_enumerator): Remove unneeded test.
127
7a93f739
DN
1282003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
129
130 * cp-tree.h (struct lang_type_header): Make all fields unsigned
131 char.
132
b80f8ef3
MM
1332003-02-03 Mark Mitchell <mark@codesourcery.com>
134
135 PR c++/7129
136 * call.c (z_candidate): Add args.
137 (convert_class_to_reference): Set it.
138 (implicit_conversion): Tidy.
139 (add_candidate): Add args parameter.
140 (add_function_candidate): Adjust call to add_candidate.
141 (add_conv_candidate): Likewise.
142 (build_builtin_candidate): Likewise.
143 (build_user_type_conversion_1): Eliminate wasteful tree_cons
144 usage.
145 (build_new_function_call): Likewise.
146 (build_object_call): Likewise.
147 (add_candidates): New function.
148 (build_new_op): Use it.
149 (covert_like_real): Adjust call to build_over_call.
150 (build_over_call): Remove args parameter.
151 * operators.def: Add <?= and >?=.
152
271bd540
RS
1532003-02-01 Richard Sandiford <rsandifo@redhat.com>
154
155 * typeck.c (build_indirect_ref): Don't check flag_volatile.
156
db0f613d
KL
1572003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
158
159 PR c++/8849
160 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
161
1824b90d
NS
1622003-01-31 Nathan Sidwell <nathan@codesourcery.com>
163
164 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
165 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
166 (BINFO_LANG_ELTS): New #define.
167 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
168
f099d360
GK
1692003-01-30 Geoffrey Keating <geoffk@apple.com>
170
171 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
172
5552b43c
MM
1732003-01-30 Mark Mitchell <mark@codesourcery.com>
174
175 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
176 for class types.
177 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
178 rather than TYPE_LANG_FLAG_0.
179 (TYPE_BUILT_IN): Remove.
180 (TYPE_DEPENDENT_P): New macro.
181 (TYPE_DEPENDENT_P_VALID): Likewise.
182 (lang_type_class): Add fields_readonly.
183 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
184 * pt.c (dependent_type_p_r): New function, split out from ...
185 (dependent_type_p): ... here. Memoize results.
186 * search.c (dependent_base_p): Use dependent_type_p, not
187 uses_template_parms.
188 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
189 for class types.
190
14d22dd6
MM
1912003-01-29 Mark Mitchell <mark@codesourcery.com>
192
193 * call.c (build_field_call): Use build_new_op, not build_opfncall.
194 (prep_operand): New function.
195 (build_new_op): Use it. Remove dead code.
196 * class.c (pushclass): Change "modify" parameter type from int to
197 bool.
198 (currently_open_class): Use same_type_p, not pointer equality.
199 (push_nested_class): Adjust calls to pushclass, remove modify
200 parameter.
201 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
202 (pushclass): Change prototype.
203 (push_nested_class): Likewise.
204 (grokoptypename): Remove.
205 (build_opfncall): Remove.
206 (value_dependent_expression_p): Declare.
207 (resolve_typename_type): Likewise.
208 (resolve_typename_type_in_current_instantiation): Likewise.
209 (enter_scope_of): Remove.
210 (tsubst): Remove.
211 (tsubst_expr): Likewise.
212 (tsubst_copy): Likewise.
213 (tsubst_copy_and_build): Likewise.
214 * decl.c (warn_about_implicit_typename_lookup): Remove.
215 (finish_case_label): Return error_mark_node for erroneous labels.
216 (start_decl): Adjust calls to push_nested_class.
217 (grokfndecl): Call push_scope/pop_scope around call to
218 duplicate_decls.
219 (grokdeclarator): Do not call tsubst.
220 (start_function): Adjust calls to push_nested_class.
221 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
222 (check_classfn): Use push_scope/pop_scope around type comparisions.
223 (grokoptypename): Remove.
224 (push_sscope): Adjust call to push_nested_class.
225 * error.c (dump_type): Show cv-qualification of typename types.
226 * init.c (build_member_call): Use build_new_op, not
227 build_opfncall.
228 * method.c (build_opfncall): Remove.
229 * parser.c (cp_parser): Add allow_non_constant_expression_p and
230 non_constant_expression_p.
231 (cp_parser_constant_expression): Adjust prototype.
232 (cp_parser_resolve_typename_type): Remove.
233 (cp_parser_non_constant_expression): New function.
234 (cp_parser_non_constant_id_expression): Likewise.
235 (cp_parser_new): Set allow_non_constant_expression_p and
236 non_constant_expression_p.
237 (cp_parser_primary_expression): Reject `this' and `va_arg' in
238 constant-expressions. Note that dependent names aren't really
239 constant.
240 (cp_parser_postfix_expression): Reject conversions to non-integral
241 types in constant-expressions. Neither are increments or
242 decrements.
243 (cp_parser_unary_expression): Reject increments and decrements in
244 constant-expressions.
245 (cp_parser_direct_new_declarator): Adjust call to
246 cp_parser_constant_expression.
247 (cp_parser_cast_expression): Reject conversions to non-integral
248 types in constant-expressions.
249 (cp_parser_assignment_expression): Rejects assignments in
250 constant-expressions.
251 (cp_parser_expression): Reject commas in constant-expressions.
252 (cp_parser_labeled_statement): Adjust call to
253 cp_parser_constant_expression.
254 (cp_parser_direct_declarator): Simplify array bounds, even in
255 templates, when they are non-dependent. Use
256 resolve_typename_type, not cp_parser_resolve_typename_type.
257 (cp_parser_class_head): Use resolve_typename_type, not
258 cp_parser_resolve_typename_type.
259 (cp_parser_member_declaration): Adjust call to
260 cp_parser_constant_expression.
261 (cp_parser_constant_initializer): Likewise.
262 (cp_parser_constructor_declarator): Use resolve_typename_type, not
263 cp_parser_resolve_typename_type.
264 (cp_parser_late_parsing_default_args): Adjust call to
265 push_nested_class.
266 * pt.c (tsubst): Give it internal linkage.
267 (tsubst_expr): Likewise.
268 (tsubst_copy): Likewise.
269 (tsubst_copy_and_build): Likewise.
270 (push_access_scope_real): Likewise.
271 (tsubst_friend_class): Likewise.
272 (instantiate_class_template): Adjust call to pushclass.
273 (value_dependent_expression_p): Give it external linkage.
274 Robustify.
275 (resolve_typename_type): New function.
276 * semantics.c (finish_call_expr): Use build_new_op, not
277 build_opfncall.
278 (begin_constructor_declarator): Remove.
279 (begin_class_definition): Adjust call to pushclass.
280 (enter_scope_of): Remove.
281 * typeck.c (comptypes): Resolve typename types as appropriate.
282 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
283 (build_x_compound_expr): Likewise.
284 (build_modify_expr): Likewise.
285 (build_x_modify_expr): Likewise.
286 * typeck2.c (build_x_arrow): Likewise.
287
be5a07ac
FJ
2882003-01-29 Fariborz Jahanian <fjahanian@apple.com>
289
290 * pt.c (last_pending_template) Declare GTY().
291
710b73e6
KL
2922003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
293
294 PR c++/8591
295 * parser.c (cp_parser_elaborated_type_specifier): Convert
296 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
297 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
298
f2ce60b8
NS
2992003-01-28 Nathan Sidwell <nathan@codesourcery.com>
300
9ae58faf
NS
301 PR c++/9437
302 * pt.c (unify): Don't unify '*T' with 'U C::*'.
303
f2ce60b8
NS
304 PR c++/3902
305 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
306 inside a declarator.
307
a2ddc397
NS
3082003-01-27 Nathan Sidwell <nathan@codesourcery.com>
309
310 * class.c (update_vtable_entry_for_fn): Add index parameter.
311 Generate vcall thunk for covariant overriding from a virtual
312 primary base.
313 (dfs_modify_vtables): Adjust.
314
bbaab916
NS
3152003-01-25 Nathan Sidwell <nathan@codesourcery.com>
316
317 PR c++/9403
318 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
319 template keyword.
320 (cp_parser_base_specifier): Look for and consume a
321 TEMPLATE keyword. Replace switch with array index.
322
323 PR c++/795
324 * semantics.c (finish_non_static_data_member): Remember the
325 field's type even in a template.
326
327 PR c++/9415
328 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
329 already scoped.
330
331 PR c++/8545
332 * parser.c (cp_parser_cast_expression): Be more tentative.
333
fb8eab96
KL
3342003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
335
336 * cp-tree.h (flagged_type_tree_s): Remove.
337 (check_for_new_type): Likewise.
338 * typeck2.c (check_for_new_type): Likewise.
339
c38e9817
NN
3402003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
341
ee42dd9d
NN
342 * dump.c: ANSIfy function declarations and definitions.
343
c38e9817
NN
344 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
345
c006d942
MM
3462003-01-22 Mark Mitchell <mark@codesourcery.com>
347
348 PR c++/9354
349 * init.c (build_new): Set the type of the new-expression, even
350 when processing_templte_decl.
351
352 PR c++/9216
353 * parser.c (cp_parser_primary_expression): Improve error message
354 for templates used in an expression context.
355
356 PR c++/8696
357 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
358 parse when encountering "typedef".
359
94edc4ab
NN
3602003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
361
362 * class.c, parser.c: ANSIfy function definitions and declarations.
363
e0860732
MM
3642003-01-22 Mark Mitchell <mark@codesourcery.com>
365
65a5559b
MM
366 PR c++/9328
367 * error.c (dump_decl): For an OVERLOAD, just print the name of the
368 function; it doesn't make sense to try to print its type.
369 * semantics.c (finish_typeof): Issue errors about invalid uses.
370
e0860732
MM
371 PR c++/9298
372 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
373 function.
374 (cp_parser_expression_statement): Use it.
375 (cp_parser_explicit_instantiation): Likewise.
376 * pt.c (do_decl_instantiation): Improve error handling logic.
377
1fb3244a
MM
3782003-01-22 Mark Mitchell <mark@codesourcery.com>
379
4eb6d609
MM
380 PR c++/9384
381 * parser.c (cp_parser_using_declaration): Issue error messages
382 about name resolution failures here.
383
1fb3244a
MM
384 PR c++/9388
385 * class.c (currently_open_derived_class): Use dependent_type_p.
386 * cp-tree.h (dependent_type_p): New function.
387 (dependent_template_arg_p): Likewise.
388 (dependent_template_p): Likewise.
389 (type_dependent_expression_p): Likewise.
390 * parser.c (cp_parser_dependent_type_p): Remove.
391 (cp_parser_value_dependent_type_p): Likewise.
392 (cp_parser_type_dependent_expression_p): Likewise.
393 (cp_parser_dependent_template_arg_p): Likewise.
394 (cp_parser_dependent_template_id_p): Likewise.
395 (cp_parser_dependent_template_p): Likewise.
396 (cp_parser_diagnose_invalid_type_name): Replace
397 cp_parser_dependent_type_p with dependent_type_p, etc.
398 (cp_parser_primary_expresion): Likewise.
399 (cp_parser_nested_name_specifier_opt): Likewise.
400 (cp_parser_postfix_expression): Likewise.
401 (cp_parser_unary_expression): Likewise.
402 (cp_parser_template_name): Likewise.
403 (cp_parser_class_name): Likewise.
404 (cp_parser_lookup_name): Likewise.
405 * pt.c (dependent_type_p): New function.
406 (value_dependent_expression_p): Likewise.
407 (type_dependent_expression_p): Likewise.
408 (dependent_template_arg_p): Likewise.
409 (dependent_template_id_p): Likewise.
410 (dependent_template_p): Likewise.
411
412 PR c++/9285
413 PR c++/9294
00b51d29
MM
414 * parser.c (cp_parser_simple_declaration): Return quickly when
415 encountering errors.
1fb3244a 416
dd859b8a
KG
4172003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
418
419 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
420
753225c1
JM
4212003-01-17 Jason Merrill <jason@redhat.com>
422
423 PR c++/9167, c++/9358
424 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
425
77b996cc
JM
4262003-01-17 Jason Merrill <jason@redhat.com>
427
428 PR c++/9342
429 * call.c (build_conditional_expr): Always do lvalue-rvalue
430 conversion.
431
5dae1114
MM
4322003-01-17 Mark Mitchell <mark@codesourcery.com>
433
434 PR c++/9294
435 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
436 * cp-tree.h (BASELINK_BINFO): Adjust.
437 (BASELINK_FUNCTIONS): Likewise.
438 (BASELINK_ACCESS_BINFO): Likewise.
439 (tree_baselink): New structure.
440 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
441 (lang_tree_node): Add baselink.
442 * decl.c (cp_tree_node_structure): Add BASELINK case.
443 * search.c (build_baselink): Adjust.
444 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
445 test from TREE_LIST case.
446
447 PR c++/9272
448 * parser.c (cp_parser_constructor_declarator_p): Do not assume
449 that a constructor cannot be declared outside of its own class.
450
451 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
452 be resolved, neither can the qualified name.
453
454 * rtti.c (get_pseudo_ti_desc): Fix thinko.
455
a48cccea
JM
4562003-01-16 Jason Merrill <jason@redhat.com>
457
458 PR c++/8564
459 * init.c (build_vec_init): Re-add maxindex parm.
460 (perform_member_init, build_aggr_init): Pass it.
461 (build_new_1): Pass it. Use an incomplete array type for full_type.
462 * typeck.c (build_modify_expr): Pass it.
463 * cp-tree.h: Adjust.
464
cc23546e
JO
4652003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
466
467 * cp-tree.h (tsubst_copy_and_build): New declaration.
468 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
469 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
470 (tsubst_copy_and_build): New function.
471
8fbc5ae7
MM
4722003-01-16 Mark Mitchell <mark@codesourcery.com>
473
474 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
475 (PARTIAL_INSTANTIATION_P): Remove.
476 (IMPLICIT_TYPENAME_P): Likewise.
477 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
478 (build_typename_type): Remove declaration.
479 (parmlist_is_exprlist): Likewise.
480 * decl.c (build_typename_type): Make it static, remove third
481 parameter.
482 (push_class_binding): Don't do implicit typename stuff.
483 (make_typename_type): Likewise.
484 (lookup_name_real): Likewise.
485 (grokdeclarator): Don't try to convert declarations into
486 initializations. Don't do implicit typename stuff.
487 (parmlist_is_exprlist): Remove.
488 (xref_basetypes): Simplify.
489 * decl2.c (grokfield): Don't try to convert declarations into
490 initializations.
491 (build_anon_union_vars): Do this while processing templates, too.
492 (finish_anon_union): Likewise.
493 * error.c (dump_type): Remove implicit typename handling.
494 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
495 (cp_parser_primary_expression): Correct handling of names not
496 found by unqualified name lookup in templates.
497 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
498 of types when possible.
499 (cp_parser_simple_declaration): Complain intelligently about some
500 invalid declarations.
501 (cp_parser_member_declaration): Likewise.
502 (cp_parser_constructor_declarator_p): Don't check when we're in a
503 function scope.
504 * pt.c (instantiate_class_template): Remove
505 PARTIAL_INSTANTIATION_P gunk.
506 * search.c (lookup_field_r): Don't build implicit typenames.
507 (marked_pushdecls_p): Don't enter dependent base types.
508 (unmarked_pushdecls_p): Likewise.
509 * semantics.c (begin_class_definition): Remove implicit typename
510 stuff.
511
712becab
NS
5122003-01-16 Nathan Sidwell <nathan@codesourcery.com>
513
514 PR c++/9212
515 * parser.c (cp_parser_direct_declarator): If accepting either
516 abstract or named, the name must be an unqualified-id.
517
fc555370
KG
5182003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
519
520 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
521
dd1b7476
KG
5222003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
523
524 * decl2.c (check_classfn): Fix uninitialized warning.
525 (build_anon_union_vars): Likewise.
526 * pt.c (tsubst_copy): Likewise.
527
a7189b49
JO
5282003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
529
530 Further conform g++'s __vmi_class_type_info to the C++ ABI
531 specification.
532 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
533 the specification.
534 (class_hint_flags): Likewise.
535
cf22909c
KL
5362003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
537
538 * config-lang.in: Add semantics.c to gtfiles.
539 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
540 (saved_scope): Likewise.
541 (type_lookups): Remove.
542 (deferred_access): New structure.
543 (type_access_control): Remove.
544 (save_type_access_control): Likewise.
545 (reset_type_access_control): Likewise.
546 (decl_type_access_control): Likewise.
547 (push_deferring_access_checks): Declare.
548 (resume_deferring_access_checks): Likewise.
549 (stop_deferring_access_checks): Likewise.
550 (pop_deferring_access_checks): Likewise.
551 (get_deferred_access_checks): Likewise.
552 (pop_to_parent_deferring_access_checks): Likewise.
553 (perform_deferred_access_checks): Likewise.
554 (perform_or_defer_access_check): Likewise.
555 * decl.c (make_typename_type): Use perform_or_defer_access_check.
556 (make_unbound_class_template): Likewise.
557 (grokdeclarator): Don't call decl_type_access_control.
558 * parser.c (cp_parser_context): Remove deferred_access_checks
559 and deferring_access_checks_p fields.
560 (cp_parser_context_new): Adjust.
561 (cp_parser): Remove access_checks_lists.
562 (cp_parser_defer_access_check): Remove.
563 (cp_parser_start_deferring_access_checks): Remove.
564 (cp_parser_stop_deferring_access_checks): Remove.
565 (cp_parser_perform_deferred_access_checks): Remove.
566 (cp_parser_nested_name_specifier_opt): Use new deferred access
567 functions.
568 (cp_parser_simple_declaration): Likewise.
569 (cp_parser_template_id): Likewise.
570 (cp_parser_function_definition): Likewise.
571 (cp_parser_class_specifier): Likewise.
572 (cp_parser_lookup_name): Likewise.
573 (cp_parser_single_declaration): Likewise.
574 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
575 (cp_parser_parse_tentatively): Likewise.
576 (cp_parser_parse_definitely): Likewise.
577 (yyparse): Likewise.
578 (cp_parser_init_declarator): Remove access_checks parameter.
579 Use new deferred access functions.
580 (cp_parser_function_definition_from_specifiers_and_declarator):
581 Likewise.
582 (cp_parser_class_head): Remove deferring_access_checks_p and
583 saved_access_checks parameters. Use new deferred access functions.
584 (cp_parser_member_specification_opt): Don't call
585 reset_type_access_control.
586 * search.c (type_access_control): Remove.
587 * semantics.c: Include "gt-cp-semantics.h".
588 (deferred_type_access_control): Remove.
589 (deferred_access_stack): New variable.
590 (deferred_access_free_list): Likewise.
591 (push_deferring_access_checks): New function.
592 (resume_deferring_access_checks): Likewise.
593 (stop_deferring_access_checks): Likewise.
594 (pop_deferring_access_checks): Likewise.
595 (get_deferred_access_checks): Likewise.
596 (pop_to_parent_deferring_access_checks): Likewise.
597 (perform_deferred_access_checks): New function, adapted from
598 cp_parser_perform_deferred_access_checks.
599 (perform_or_defer_access_check): New function, adapted from
600 cp_parser_defer_access_check.
601 (current_type_lookups): Remove.
602 (deferred_type_access_control): Likewise.
603 (decl_type_access_control): Likewise.
604 (save_type_access_control): Likewise.
605 (reset_type_access_control): Likewise.
606 (begin_function_definition): Adjust.
607 (begin_class_definiton): Likewise.
608
f576dfc4
JM
6092003-01-13 Jason Merrill <jason@redhat.com>
610
611 PR c++/8748
612 * class.c (build_base_path): Take the address before calling save_expr.
613
614 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
615 all the ambiguous conversions are bad.
616
617 * class.c (maybe_warn_about_overly_private_class): Don't stop
618 searching when we find a nonprivate method.
619
620 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
621
8fa1ad0e
MM
6222003-01-12 Mark Mitchell <mark@codesourcery.com>
623
624 * cp-tree.h (get_arglist_len_in_bytes): Remove.
625
626 PR c++/9264
627 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
628 typeame types more robustly.
629
15d2cb19
PE
6302003-01-11 Phil Edwards <pme@gcc.gnu.org>
631
632 * parser.c: Fix comment typos.
633
a6f6052a
MM
6342003-01-10 Mark Mitchell <mark@codesourcery.com>
635
99152b95 636 PR c++/9099
a6f6052a
MM
637 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
638 an object_type which is not a class type.
639
3466b292
GK
6402003-01-10 Geoffrey Keating <geoffk@apple.com>
641
642 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
643 (cp_parser_late_parsing_default_args): Likewise.
644
b2f29cd9
NN
6452003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
646
647 * cfns.gperf: ANSIfy function declarations.
648 * cfns.h: Regenerate.
649 * cp-tree.h: ANSIfy function declarations.
650
2050a1bb
MM
6512003-01-10 Mark Mitchell <mark@codesourcery.com>
652
653 * cp-tree.h (reparse_absdcl_as_expr): Remove.
654 (reparse_absdcl_as_casts): Likewise.
655 (reparse_decl_as_expr): Likewise.
656 (finish_decl_parsing): Likewise.
657 * decl2.c (reparse_absdcl_as_expr): Remove.
658 (reparse_absdcl_as_casts): Likewise.
659 (repase_decl_as_expr): Likewise.
660 (finish_decl_parsing): Likewise.
661
662 PR c++/9128
663 PR c++/9153
664 PR c++/9171
665 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
666 function.
667 (cp_parser_nested_name_specifier_opt): Correct the
668 check_dependency_p false.
669 (cp_parser_postfix_expression): Fix formatting.
670 (cp_parser_decl_specifier_seq): Avoid looking for constructor
671 declarators when possible.
672 (cp_parser_template_id): Avoid performing name-lookup when
673 possible.
674 (cp_parser_class_head): Do not count specializations when counting
675 levels of templates.
676 (cp_parser_constructor_declarator_p): Return immediately if
677 there's no chance that the tokens form a constructor declarator.
678 * rtti.c (throw_bad_typeid): Add comment. Do not return an
679 expression with reference type.
680 (get_tinfo_decl_dynamic): Do not return an expression with
681 reference type.
682 (build_typeid): Add comment. Do not return an expression with
683 reference type.
684 * typeck.c (build_class_member_access_expr): Improve handling of
685 conditionals and comma-expressions as objects.
686
45225759
NN
6872003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
688
b2f29cd9
NN
689 * cfns.gperf: ANSIfy function declarations.
690 * cfns.h: Regenerate.
691 * cp-tree.h: ANSIfy function declarations.
692 * parser.c: ANSIfy function declarations & definitions.
693
45225759
NN
694 * decl.c (bad_specifiers): Fix parameter order error I introduced.
695
17211ab5
GK
6962003-01-09 Geoffrey Keating <geoffk@apple.com>
697
698 Merge from pch-branch:
699
700 2003-01-09 Geoffrey Keating <geoffk@apple.com>
701
702 Merge to tag pch-merge-20030102:
703
704 * semantics.c (finish_translation_unit): Don't call finish_file.
705 * parser.c: Don't include ggc.h.
706 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
707 read first token here. Don't allow PCH files after the first
708 token is read.
709 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
710 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
711 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
712 (cp_parser_late_parsing_for_member): Don't duplicate call to
713 cp_lexer_set_source_position_from_token.
714 (cp_parser_late_parsing_default_args): Likewise.
715 (yyparse): Call finish_file after clearing the_parser.
716
717 2002-12-11 Geoffrey Keating <geoffk@apple.com>
718
719 * Make-lang.in: Remove $(GGC_H) from all dependencies.
720 (CXX_TREE_H): Add $(GGC_H).
721 * class.c: Don't include ggc.h.
722 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
723 (method_name_cmp): Likewise.
724 (resort_data): New variable.
725 (resort_field_decl_cmp): New.
726 (resort_method_name_cmp): New.
727 (resort_sorted_fields): New.
728 (resort_type_method_vec): New.
729 (finish_struct_methods): Delete cast.
730 (finish_struct_1): Delete cast.
731 * cp-tree.h: Include ggc.h.
732 (struct lang_type_class): Add reorder attribute to field `methods'.
733 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
734 (resort_sorted_fields): New prototype.
735 (resort_type_method_vec): New prototype.
736 * call.c: Don't include ggc.h.
737 * decl.c: Likewise.
738 * decl2.c: Likewise.
739 * init.c: Likewise.
740 * lex.c: Likewise.
741 * method.c: Likewise.
742 * optimize.c: Likewise.
743 * parse.y: Likewise.
744 * pt.c: Likewise.
745 * repo.c: Likewise.
746 * search.c: Likewise.
747 * semantics.c: Likewise.
748 * spew.c: Likewise.
749 * tree.c: Likewise.
750
751 * lang-specs.h: Remove comment.
752
753 2002-12-03 Geoffrey Keating <geoffk@apple.com>
754
755 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
756 (operator_name_info): Mark to be saved for PCH, specify size.
757 (assignment_operator_name_info): Likewise.
758
759 2002-11-19 Geoffrey Keating <geoffk@apple.com>
760
761 * decl.c (anon_cnt): Mark to be saved for PCH.
762
763 2002-10-25 Geoffrey Keating <geoffk@apple.com>
764
765 * lex.c (init_reswords): Delete now-untrue comment.
766 Allocate ridpointers using GGC.
767
768 2002-10-04 Geoffrey Keating <geoffk@apple.com>
769
770 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
771
772 * g++spec.c (lang_specific_driver): Don't include standard
773 libraries in `added'.
774
775 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
776
777 * decl2.c (finish_file): Call c_common_write_pch.
778 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
779
780 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
781
782 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
783 files when using g++.
784 * lang-specs.h: Handle compiling C++ header files.
785
ca5dd8b7
JJ
7862003-01-09 Jakub Jelinek <jakub@redhat.com>
787
788 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
789
0f399e5f
KL
7902003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
791
792 * pt.c (push_access_scope_real): Call push_to_top_level for
793 function in namespace scope.
794 (pop_access_scope): Call pop_from_top_level for function in
795 namespace scope.
796
c456a45a
JJ
7972003-01-09 Jakub Jelinek <jakub@redhat.com>
798
799 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
800
2c6ce97e
CC
8012003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
802
803 * Make-lang.in (c++.install-common, c++.install-man,
804 c++.uninstall): Prepend $(DESTDIR) to destination paths in
805 all (un)installation commands.
806 (c++.install-common): Rewrite $(LN) commands to support
807 DESTDIR with "ln" as well as with "ln -s".
808
f74dbcec
JM
8092003-01-08 Jason Merrill <jason@redhat.com>
810
811 * parser.c (cp_parser_primary_expression): See through explicitly
812 scoped ALIAS_DECLs, too.
813
11f6b451
NN
8142003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
815
1774f99d
NN
816 * decl.c: Remove some #if 0 code.
817
11f6b451
NN
818 * decl.c: ANSIfy function declarations.
819
8caf4c38
MM
8202003-01-07 Mark Mitchell <mark@codesourcery.com>
821
822 * parser.c (cp_parser_asm_definition): Correct handling of omitted
823 operands.
824
2b59fc25
KL
8252003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
826
827 PR c++/9030
828 * decl.c (make_typename_type): Check access only when tf_error.
829 (make_unbound_class_template): Likewise.
830 * pt.c (saved_access_scope): New variable.
831 (push_access_scope_real): New function.
832 (push_access_scope): Likewise.
833 (pop_access_scope): Likewise.
834 (tsubst_default_argument): Use them.
835 (instantiate_template): Likewise.
836 (regenerate_decl_from_template): Likewise.
837 (instantiate_decl): Likewise.
838 (get_mostly_instantiated_function_type): Likewise.
839
3f7617e4
NN
8402003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
841
842 * tree.c: Delete bogus #if 0 code.
843
c9372112
AS
8442003-01-07 Andreas Schwab <schwab@suse.de>
845
846 * class.c (layout_class_type): Don't use
847 PCC_BITFIELD_TYPE_MATTERS if not defined.
848
8218bd34
MM
8492003-01-06 Mark Mitchell <mark@codesourcery.com>
850
c10cdb3d
MM
851 PR c++/9165
852 * decl2.c (build_cleanup): Mark the object as used.
853
69f794a7
MM
854 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
855 (hash_local_specialization): New function.
856 (register_local_specialization): Revert 2003-01-05 change.
857 (instantiate_decl): Use hash_local_specialization when creating
858 the local_specializations table.
859
4c4646b5
MM
860 * decl2.c (mark_used): Do not synthesize thunks.
861
63e5f567
MM
862 * class.c (layout_class_type): Correct handling of unnamed
863 bitfields wider than their types.
864
8218bd34
MM
865 PR c++/9189
866 * parser.c (cp_parser): Remove default_arg_types. Update
867 documentation for unparsed_functions_queues.
868 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
869 parameter.
870 (cp_parser_new): Don't set parser->default_arg_types.
871 (cp_parser_function_definition): Adjust usage of
872 unparsed_funtions_queues.
873 (cp_parser_class_specifier): Don't mess with
874 parser->default_arg_types. Handle default argument processing in
875 a separate phase from function body processing.
876 (cp_parser_template_declaration_after_export): Adjust usage of
877 unparsed_functions_queues.
878 (cp_parser_late_parsing_for_member): Do not handle default
879 arguments.
880
62b8a44e
NS
8812003-01-06 Nathan Sidwell <nathan@codesourcery.com>
882
883 PR c++/9109
884 * parser.c (cp_parser_declarator_kind): New enum.
885 (cp_parser_declarator): Adjust.
886 (cp_parser_direct_declarator): Adjust. Allow for either named or
887 abstract declarator. Prefer abstract, if possible. Allow
888 parenthesized function name.
889 (cp_parser_condition): Adjust cp_parser_declarator call.
890 (cp_parser_explicit_instantiation): Likewise.
891 (cp_parser_init_declarator): Likewise.
892 (cp_parser_type_id): Likewise.
893 (cp_parser_function_definition): Likewise.
894 (cp_parser_member_declaration): Likewise.
895 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
896 the tentative parsing.
897 (cp_parser_exception_declaration): Likewise.
898
ec194454
MM
8992003-01-05 Mark Mitchell <mark@codesourcery.com>
900
901 * parser.c (cp_parser_template_parameter): Adjust call to
902 cp_parser_parameter_declaration.
903 (cp_parser_parameter_declaration_list): Likewise.
904 (cp_parser_parameter_declaration): Replace
905 greater_than_is_operator_p with template_parm_p parameter. Do not
906 cache tokens for template default arguments.
907
908 * pt.c (retrieve_local_specialization): Use htab_find, not
909 htab_find_with_hash.
910 (register_local_specialization): Use htab_find_slot, not
911 htab_find_slot_with_hash.
912 (instantiate_decl): Pass a hash function to htab_create.
913
39b1af70
KG
9142003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
915
916 * parser.c (cp_parser_binary_expression,
917 cp_parser_multiplicative_expression,
918 cp_parser_additive_expression, cp_parser_shift_expression,
919 cp_parser_relational_expression, cp_parser_equality_expression,
920 cp_parser_and_expression, cp_parser_exclusive_or_expression,
921 cp_parser_inclusive_or_expression,
922 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
923 cp_parser_binary_expression): Const-ify.
924
1bb2cc34
MM
9252003-01-04 Mark Mitchell <mark@codesourcery.com>
926
927 * method.c (use_thunk): Disable access control while building the
928 body of the thunk.
929
3fd5abcf
NN
9302003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
931
932 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
933 front end.
934
9aad8f83
MA
9352003-01-03 Matt Austern <austern@apple.com>
936
937 * cp-tree.h (struct lang_type_class): add field for key method
938 (cp_global_trees): rename dynamic_classes to keyed_classes
939 (key_method): add definition
940 * class.c (finish_struct_1): compute class's key method, and add
941 the class to keyed_classes list if there is no key method.
942 * decl.c (finish_function): add class to keyed_classes list if we
943 see a definition of the class's key method.
944 * pt.c (instantiate_class_template): add template specialization
945 of a dynamic class to keyed_classes list.
946 * decl2.c (key_method): remove
947 (finish_file): iterate only through keyed_classes list when
948 deciding whether to emit vtables, remove class from its list after
949 we do the emission.
950
6cce57b0
JM
9512003-01-02 Jason Merrill <jason@redhat.com>
952
4e8dca1c
JM
953 * call.c (build_conditional_expr): Stabilize lvalues properly.
954 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
955 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
956 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
957
958 * call.c (convert_like_real): Call decl_constant_value for an
959 IDENTITY_CONV even if there are no more conversions.
960
961 * cvt.c (build_up_reference): Don't push unnamed temps.
962
963 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
964
965 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
966 for a backend struct.
967
968 * except.c (wrap_cleanups_r, build_throw): Make
969 MUST_NOT_THROW_EXPRs void.
970 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
971
972 * init.c (build_vec_delete_1): Pre-evaluate the base address.
973
974 * init.c (get_temp_regvar): Simplify logic.
975
976 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
977 our replacement is a decl.
978
6cce57b0
JM
979 * decl.c (cp_make_fname_decl): Push the decls inside the
980 outermost scope.
981
31758337
NS
9822003-01-03 Nathan Sidwell <nathan@codesourcery.com>
983
984 PR c++/45, c++/3784
985 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
986 the same too.
987
24c0ef37
GS
9882003-01-03 Graham Stott <graham.stott@btinternet.com>
989
990 * parser.c (struct cp_parser): Add access_checks_lists field
991 (cp_parser_simple_declaration): Use.
992 (cp_parser_init_declarator): Likewise.
993
5e8a153a
MM
9942003-01-02 Mark Mitchell <mark@codesourcery.com>
995
1092805d
MM
996 * parser.c (cp_parser_declaration): Accept the __extension__
997 keyword before the declaration.
998
4971227d
MM
999 PR c++/2843
1000 * parser.c (cp_parser_parameter_declaration): Allow attributes to
1001 appear after the declarator.
1002
5e8a153a
MM
1003 * call.c (build_new_method_call): Fix typo in message format
1004 string.
1005
3beb3abf
MM
10062003-01-02 Mark Mitchell <mark@codesourcery.com>
1007
f7b5ecd9
MM
1008 * parser.c (cp_lexer_next_token_is): Declare it inline.
1009 (cp_lexer_set_source_position_from_token): Likewise.
1010 (cp_lexer_debugging_p): Likewise.
1011 (cp_parser_parsing_tentatively): Likewise.
1012 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1013 to the cp_lexer_peek_token.
1092805d 1014
3beb3abf
MM
1015 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1016 expression.
1017
43c6a96a
SB
10182003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
1019
1020 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1021 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1022 cp/repo.c: Fix copyright years.
1023
c58b209a
NB
10242003-01-01 Neil Booth <neil@daikokuya.co.uk>
1025
1026 * lex.c: Remove superfluous include of cpplib.h.
1027 (CONSTRAINT): Define without conditions.
1028 (init_cp_pragma): Use c_register_pragma.
1029
7347c2c5
NB
10302002-12-31 Neil Booth <neil@daikokuya.co.uk>
1031
1032 * .cvsignore: Remove.
1033
f5adbb8d
SB
10342002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
1035
1036 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1037 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1038 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1039 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1040 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1041 copyright header.
1042 * lex.h: parse.y is dead, so don't mention it. Also replace the
1043 copyright header with the default GNU copyright header.
1044
f1aba0a5
MM
10452002-12-31 Mark Mitchell <mark@codesourcery.com>
1046
eea9800f
MM
1047 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1048 (lookup_name_namespace_only): Likewise.
1049 (begin_only_namespace_names): Likewise.
1050 (end_only_namespace_names): Likewise.
1051 * decl.c (only_namespace_names): Remove.
1052 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1053 (lookup_name_real): Do not check only_namespace_names.
1054 (lookup_name_namespace_only): Remove.
1055 (begin_only_namespace_names): Likewise.
1056 (end_only_namespace_names): Likewise.
1057 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1058 nested-name-specifiers more gracefully.
1059 (cp_parser_class_or_namespace_name): Avoid looking up namespace
1060 names when they cannot possibly appear.
1061 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1062 (cp_parser_elaborated_type_specifier): Likewise.
1063 (cp_parser_namespace_name): Only look for namespace names.
1064 (cp_parser_lookup_name): Add is_namespace parameter.
1065 (cp_parser_lookup_name_simple): Adjust call to
1066 cp_parser_lookup_name.
1067
f1aba0a5
MM
1068 * parser.c (cp_parser_dependent_type_p): Fix thinko.
1069
eea9800f
MM
10702002-12-31 Neil Booth <neil@daikokuya.co.uk>
1071
1072 * .cvsignore: Update.
1073
3cfabe60
NS
10742002-12-31 Nathan Sidwell <nathan@codesourcery.com>
1075
1076 * class.c (modify_vtable_entry): Remove unused variable.
1077 (get_vcall_index): Always expect a non-thunk.
1078 (update_vtable_entry_for_fn): Combine covariant adjustments, when
1079 overriding a thunk. Pass get_vcall_index a non-thunk.
1080
1081 * decl2.c (finish_file): Mark undefined inlines as extern.
1082
92bc1323
MM
10832002-12-31 Mark Mitchell <mark@codesourcery.com>
1084
1085 * cp-tree.def (RETURN_INIT): Remove.
1086 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1087 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1088 (note_level_for_for): Remove.
1089 (note_level_for_try): Likewise.
1090 (note_level_for_catch): Likewise.
1091 (finish_named_return_value): Likewise.
1092 (do_pushlevel): Change prototype.
1093 (pending_lang_change): Remove.
1094 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1095 sk_for.
1096 (note_level_for_for): Remove.
1097 (note_level_for_try): Likewise.
1098 (note_level_for_catch): Likewise.
1099 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1100 * parser.c (cp_parser_context_free_list): Make it "deletable".
1101 (cp_parser_template_argument): Remove misleading comment.
1102 * pt.c (tsubst_expr): Remove RETURN_INIT code.
1103 * semantics.c (genrtl_named_return_value): Remove.
1104 (do_pushlevel): Take a scope kind as an argument.
1105 (begin_if_stmt): Adjust.
1106 (begin_while_stmt): Likewise.
1107 (begin_for_stmt): Likewise.
1108 (finish_for_init_stmt): Likewise.
1109 (begin_switch_stmt): Likewise.
1110 (begin_handler): Likewise.
1111 (begin_compound_stmt): Likewise.
1112 (finish_named_return_value): Remove.
1113 (cp_expand_stmt): Remove RETURN_INIT case.
1114 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
43c6a96a 1115
abda8efe
MM
11162002-12-31 Mark Mitchell <mark@codesourcery.com>
1117
1118 PR c++/9112
1119 * parser.c (cp_parser_direct_declarator): Handle erroneous
1120 parenthesized declarators correctly.
1121
eddcae5a
GDR
11222002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1123
1124 * cp-tree.h (pending_lang_change): Declare.
1125
c838d82f
MM
11262002-12-30 Mark Mitchell <mark@codesourcery.com>
1127
e5976695
MM
1128 * parser.c (cp_parser_context_free_list): New variable.
1129 (cp_parser_context_new): Use it.
1130 (cp_parser_error): Check return code from
1131 cp_parser_simulate_error.
1132 (cp_parser_simulate_error): Return a value.
1133 (cp_parser_id_expression): Optimize common case.
1134 (cp_parser_class_name): Likewise.
1135 (cp_parser_class_specifier): Adjust call to
1136 cp_parser_late_parsing_default_args.
1137 (cp_parser_lookup_name): Optimize common case.
1138 (cp_parser_late_parsing_for_member): Adjust call to
1139 cp_parser_late_parsing_default_args.
1140 (cp_parser_late_parsing_default_args): Add scope parameter.
1141 (cp_parser_require): Avoid creating the error message unless it's
1142 needed.
1143 (cp_parser_parse_definitely): Place free'd contexts on the free
1144 list.
1145
c838d82f
MM
1146 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1147
c73aecdf
DE
11482002-12-30 David Edelsohn <edelsohn@gnu.org>
1149
1150 * parser.c (cp_parser_parameter_declaration_clause): Treat system
1151 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1152
b599b135
NN
11532002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
1154
43c6a96a 1155 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
b599b135
NN
1156 GCC, not GNU CC.
1157
946d5e45
MM
11582002-12-30 Mark Mitchell <mark@codesourcery.com>
1159
afd9b9dd
MM
1160 * parse.y: Remove.
1161 * spew.c: Likewise.
1162 * Make-lang.in (gt-cp-spew.h): Remove.
1163 * cp-tree.h (do_pending_lang_change): Remove.
1164 (do_identifier): Change prototype.
1165 (finish_id_expr): Remove.
1166 * decl.c (lookup_name_real): Remove yylex variable.
1167 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1168 * lex.c (init_cpp_parse): Remove.
1169 (reduce_cmp): Likewise.
1170 (token_cmp): Likewise.
1171 (yychar): Likewise.
1172 (lastiddecl): Likewise.
1173 (token_count): Likewise.
1174 (reduce_count): Likewise.
1175 (yyhook): Likewise.
1176 (print_parse_statistics): Likewise.
1177 (do_pending_lang_change): Likewise.
1178 (do_identifier): Remove parsing parameter.
1179 * lex.h (lastiddecl): Remove.
1180 (looking_for_typename): Remove.
1181 (looking_for_template): Likewise.
1182 (pending_lang_change): Likewise.
1183 (yylex): Likewise.
1184 * semantics.c (finish_id_expr): Remove.
43c6a96a 1185
946d5e45
MM
1186 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1187 thread" correctly.
1188
1c313945
NN
11892002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
1190
1191 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
1192 end, not the C front end.
1193
8e268f72
NS
11942002-12-30 Nathan Sidwell <nathan@codesourcery.com>
1195
1196 * cp-tree.h (THUNK_TARGET): New macro.
1197 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1198 (finish_thunk): Remove offset parms.
1199 * class.c (find_final_overrider): Look through thunks.
1200 (get_vcall_index): Use THUNK_TARGET.
1201 (update_vtable_entry_for_fn): Look through thunks. Set covariant
1202 fixed offset here. Adjust finish_thunk call.
1203 (build_vtbl_initializer): Adjust finish_thunk calls.
1204 * mangle.c (mangle_call_offset): Remove superfluous if.
1205 (mangle_thunk): Adjust.
1206 * method.c (make_thunk): Adjust.
1207 (finish_thunk): Adjust.
1208 (thunk_adjust): Remove assert.
1209 (use_thunk): Use THUNK_TARGET
1210 * dump1.c (cp_dump_tree): Adjust thunk dumping.
1211
1212 PR c++/9054
1213 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1214 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1215
848eed92
GDR
12162002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1217
1218 Remove traditional C constructs 4/n.
1219 * decl2.c (grok_method_quals, warn_if_unknown_interface,
1220 grok_x_components, cp_build_parm_decl, build_artificial_parm,
1221 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1222 delete_sanity, check_member_template, check_java_method,
1223 check_classfn, finish_static_data_member_decl, grokfield,
1224 grokbitfield, grokoptypename, grok_function_init,
1225 cplus_decl_attributes, constructor_name, defer_fn,
1226 build_anon_union_vars, finish_anon_union, coerce_new_type,
1227 coerce_delete_type, comdat_linkage, maybe_make_one_only,
1228 key_method, import_export_vtable, import_export_class,
1229 output_vtable_inherit, import_export_decl, import_export_tinfo,
1230 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1231 set_guard, start_objects, finish_objects,
1232 start_static_storage_duration_function,
1233 finish_static_storage_duration_function, get_priority_info,
1234 start_static_initialization_or_destruction,
1235 finish_static_initialization_or_destruction,
1236 do_static_initialization, do_static_destruction,
1237 prune_vars_needing_no_initialization, write_out_vars,
1238 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1239 add_using_namespace, merge_functions, ambiguous_decl,
1240 lookup_using_namespace, lookup_using_namespace,
1241 qualified_lookup_using_namespace, set_decl_namespace,
1242 decl_namespace, current_decl_namespace, push_decl_namespace,
1243 pop_decl_namespace, push_scope, pop_scope, add_function,
1244 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1245 lookup_arg_dependent, do_namespace_alias,
1246 validate_nonmember_using_decl, do_nonmember_using_decl,
1247 do_toplevel_using_decl, do_local_using_decl,
1248 do_class_using_decl, do_using_directive, check_default_args,
1249 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
1250 * parser.c (cp_parser_class_head): Use booleanss.
1251 * decl.c (walk_globals, walk_vtables): Likewise.
1252 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1253 walk_globals): Change return type from 'int' to 'bool'.
1254 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1255 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1256 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1257 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1258 qualifier_flags, tinfo_base_init, generic_initializer,
1259 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1260 dfs_class_hint_unmark, class_hint_flags, class_initializer,
1261 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1262 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1263 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1264 * repo.c (repo_compile_flags, repo_template_declared,
1265 repo_template_defined, repo_class_defined, repo_get_id,
1266 repo_template_used, repo_vtable_used, repo_inline_used,
1267 repo_tinfo_used, repo_template_instantiated, extract_string,
1268 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1269 finish_repo): Likewise.
1270 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1271 cxx_print_xnode): Likewise..
1272 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1273 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1274 * cxxfilt.c (demangle_it, print_demangler_list, usage,
1275 standard_symbol_characters, hp_symbol_characters, main, fatal):
43c6a96a 1276 Likewise.
848eed92
GDR
1277 (strip_underscore): Change type from 'int' to 'bool'.
1278 (main): Use boolean constants.
1279
b746c5dc
GDR
12802002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1281
1282 Remove traditional C constructs 3/n.
1283 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1284 build_up_reference, warn_ref_binding, convert_to_reference,
1285 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1286 convert_to_void, convert, convert_force, build_type_conversion,
1287 build_expr_type_conversion, type_promotes_to,
1288 perform_qualification_conversions): Use C90 prototyping style.
1289 * decl2.c (grok_array_decl): Use boolean constant.
1290 (delete_sanity): Likewise.
1291 * typeck.c (build_unary_op): Likewise.
1292 * semantics.c (finish_switch_cond): Likewise.
1293 * parser.c (cp_parser_direct_new_declarator): Likewise.
1294 * init.c (build_new): Likewise.
1295
a723baf1
MM
12962002-12-27 Mark Mitchell <mark@codesourcery.com>
1297
1298 * Make-lang.in (po-generated): Remove parse.c.
1299 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
1300 ($(srcdir)/cp/parse.h): Remove target.
1301 ($(srcdir)/cp/parse.c): Likewise.
1302 (gt-cp-parse.h): Likewise.
1303 (gt-cp-parser.h): New target.
1304 (c++.distclean): Do not remove parse.output.
1305 (c++.maintainer-clean): Do not remove parse.c or parse.h.
1306 (cp/spew.o): Remove target.
1307 (cp/lex.o): Adjust dependencies.
1308 (cp/pt.o): Likewise.
1309 (cp/parse.o): Likewise.
1310 (cp/TAGS): Do not mention parse.c.
1311 (cp/parser.o): New target.
1312 * NEWS: Mention the new parser.
1313 * call.c (build_scoped_method_call): Simplify.
1314 (build_method_call): Likewise.
1315 (build_new_function_call): Adjust calls to add_function_candidate
1316 and add_template_candidate.
1317 (build_new_op): Improve handling of erroroneous operands.
1318 (convert_default_arg): Remove circular argument processing.
1319 (name_as_c_string): New function.
1320 (build_new_method_call): Use it.
1321 (perform_implicit_conversion): Use error_operand_p.
1322 * class.c (finish_struct_anon): Use constructor_name_p.
1323 (check_field_decls): Likewise.
1324 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1325 (resolve_address_of_overloaded_function): Likewise.
1326 (instantiate_type): Tweak pointer-to-member handling.
1327 (get_primary_binfo): Remove incorrect assertion.
1328 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1329 * cp-tree.h (DEFARG_TOKENS): New macro.
1330 (default_arg): New structure.
1331 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1332 (lang_tree_node): Add default_arg.
1333 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1334 (type_info_ref_type): New macro.
1335 (saved_scope): Make processing_explicit_instantiation a boolean.
1336 (check_access): New field.
1337 (unparsed_text): Remove.
1338 (language_function): Remove unparsed_inlines.
1339 (error_operand_p): New macro.
1340 (lang_decl): Adjust pending_inline_info.
1341 (DEFARG_POINTER): Remove.
1342 (tag_types): Add typenames.
1343 (lookup_ualified_name): Declare.
1344 (lookup_name_real): Likewise.
1345 (shadow_tag): Adjust prototype.
1346 (get_scope_of_declarator): Declare it.
1347 (process_next_inline): Remove it.
1348 (check_for_missing_semicolon): Likewise.
1349 (maybe_get_template_decl_from_type_decl): Declare it.
1350 (finish_label_stmt): Adjust prototype.
1351 (finish_non_static_data_meber): Declare it.
1352 (finish_pseudo_destructor_call_expr): Rename to ...
1353 (finish_pseudo_destructor_expr): ... this.
1354 (finish_compound_literal): Declare it.
1355 (begin_inline_definitions): Remove it.
1356 (init_spew): Remove.
1357 (peekyylex): Likewise.
1358 (arbitrate_lookup): Likewise.
1359 (frob_opname): Likewise.
1360 (maybe_snarf_defarg): Likewise.
1361 (add_defarg_fn): Likewise.
1362 (do_pending_defargs): Likewise.
1363 (done_pending_defargs): Likewise.
1364 (unprocessed_defarg_fn): Likewise.
1365 (replace_defarg): Likewise.
1366 (end_input): Likewise.
1367 (get_overloaded_fn): Likewise.
1368 * cvt.c (convert_to_reference): Improve error handling.
1369 * decl.c (lookup_name_real): Do not declare it static.
1370 (maybe_push_to_top_level): Set check_access.
1371 (identifier_type_value): Adjust call to lookup_name_real.
1372 (lookup_qualified_name): New method.
1373 (lookup_name_real): Remove special-case parsing code.
1374 (lookup_name-nonclass): Adjust call to lookup_name_real.
1375 (lookup_name_namespace_only): Likewise.
1376 (lookup_name): Likewise.
1377 (check_tag_decl): Return the type declared.
1378 (shadow_tag): Likewise.
1379 (register_dtor_fn): Tweak check_access.
1380 (grokfndecl): Use constructor_name_p.
1381 (get_scope_of_declarator): New function.
1382 (grokdeclarator): Obscure tweaks for slightly different declarator
1383 representations.
1384 (start_method): Return error_mark_node to indicate failure.
43c6a96a 1385 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
a723baf1
MM
1386 * decl2.c (constructor_name_full): Simplify.
1387 (constructor_name): Use it.
1388 (build_expr_from_tree): Adjust for changes to do new parser.
1389 (push_scope): Improve robustness.
1390 (validate_nonmember_using_decl): Process declarations, not names.
1391 (do_class_using_decl): Likewise.
1392 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1393 here.
1394 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1395 * expr.c (cxx_expand_expr): Handle BASELINKs.
1396 * init.c (member_init_ok_or_else): Issue more errors.
1397 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1398 * lex.c: Do not include parse.h.
1399 (yypring): Do not declare.
1400 (yylval): Likewise.
1401 (make_reference_declarator): Remove error-generating code.
1402 (rid_to_yy): Remove.
1403 (cxx_init): Do not call init_spew.
1404 (yypring): Remove.
1405 (check_for_missing_semicolon): Remove.
1406 * lex.h (got_scope): Remove.
1407 (got_object): Remove.
1408 * method.c (hack_identifier): Use finish_non_static_data_member.
1409 (implicitly_declare_fn): Adjust use of constructor_name.
1410 * parser.c: New file.
1411 * pt.c (parse.h): Do not include it.
1412 (maybe_get_template_decl_from_template): Do not declare it.
1413 (finish_member_template_decl): Tweak.
1414 (begin_explicit_instantiation): Adjust for
1415 processing_explicit_instantiation being boolean.
1416 (end_explicit_instantiation): Likewise.
1417 (maybe_process_partial_specialization): Tighten specialization
1418 test.
1419 (retrieve_local_specialization): Adjust ue of hash table.
1420 (eq_local_specializations): New function.
1421 (register_local_specialization): Likewise.
1422 (push_template_decl_real): Remove unnecessary test.
1423 (maybe_get_template_decl_from_type_decl): Don't make it static.
1424 (for_each_template_parm_r): Handle TYPEOF_TYPE.
1425 (tsubst_copy): Use retrieive_local_specialization to handle
1426 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
1427 Handle COMPONENT_REFs with pseudo-destructor-expressions.
1428 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1429 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1430 (unify): Tweak handling of CONST_DECLs.
1431 (regenerate_decl_from_template): Use push_nested_class.
1432 (template_for_substitution): New funciton.
1433 (instantiate_decl): Use it. Register parameters as local
1434 specializations.
1435 * rtti.c (init_rtti_processing): Set type_info_ref_type.
1436 (build_typeid): Use it.
1437 (get_typeid): Likeise.
1438 * search.c (accessible_p): Use check_access, not
1439 flag_access_control.
1440 (adjust_result_of_qualified_name_lookup): Pay attention to the
1441 context_class.
1442 * semantics.c (finish_asm_stmt): Adjust error handling.
1443 (finish_label_stmt): Return the statement.
1444 (finish_non_static_data_member): New function.
1445 (finish_class_expr): Handle BASELINKs.
1446 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1447 (finish_object_call_expr): Simplify handling during templates.
1448 (finish_pseudo_destructor_call_expr): Rename to ...
1449 (finish_pseudo_dtor_expr): ... this.
1450 (finish_compound_literal): New function.
1451 (begin_inline_definitions): Remove.
1452 (finish_sizeof): Remove special template handling.
1453 * spew.c: Do not include parse.h.
1454 * tree.c (get_overloaded_fn): Remove.
1455 * typeck.c (build_class_member_access_expr): Handle
1456 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
1457 (lookup_destructor): New function.
1458 (finish_class_member_access_expr): Use it.
1459 (convert_arguments): Simplify.
1460 (build_unary_op): Handle BASELINKs.
43c6a96a 1461
aac1406f
NS
14622002-12-26 Nathan Sidwell <nathan@codesourcery.com>
1463
eab5474f
NS
1464 PR c++/4803
1465 * decl2.c (mark_used): Defer inline functions.
1466 (finish_file): Merge deferred_fns loops. Check all used
1467 inline functions have a definition.
1468 * method.c (make_thunk): Thunks are not inline.
1469
aac1406f
NS
1470 PR c++/5116, c++/764
1471 * call.c (build_new_op): Make sure template class operands are
1472 instantiated.
1473
b9201622
NS
14742002-12-24 Nathan Sidwell <nathan@codesourcery.com>
1475
3e14cd30
NS
1476 PR C++/7964
1477 * cp-tree.h (resolve_scoped_fn_name): Prototype.
1478 * call.c (resolve_scoped_fn_name): New function. Deal with
1479 more template expansion. Broken out of ...
1480 * parse.y (parse_finish_call_expr): ... here. Call it.
1481 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1482 resolve_scoped_fn_name and build_call_from_tree.
1483
b9201622
NS
1484 PR c++/9053
1485 * decl.c (duplicate_decls): Templates may be disambiguated by
1486 return type.
43c6a96a 1487
b9201622
NS
1488 PR c++/8702
1489 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1490 conversion operators on failure.
1491
94be8403
GDR
14922002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1493
b746c5dc
GDR
1494 Remove traditional C constructs 2/n.
1495 * call.c (tourney, build_field_call, equal_functions, joust,
1496 compare_ics, build_over_call, build_java_interface_fn_ref,
1497 convert_like_real, op_error, build_object_call, resolve_args,
1498 build_vfield_ref, check_dtor_name, build_scoped_method_call,
1499 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1500 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1501 standard_conversion, reference_related_p,
1502 reference_compatible_p, convert_class_to_reference,
1503 direct_reference_binding, reference_binding,
1504 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1505 add_template_conv_candidate, any_viable, any_strictly_viable,
1506 build_this, splice_viable, print_z_candidates,
1507 build_user_type_conversion, build_new_function_call,
1508 conditional_conversion, build_conditional_expr, build_new_op,
1509 build_op_delete_call, enforce_access, call_builtin_trap,
1510 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1511 convert_default_arg, type_passed_as, convert_for_arg_passing,
1512 in_charge_arg_for_name, is_properly_derived_from,
1513 maybe_handle_implicit_object, maybe_handle_ref_bind,
1514 source_type, add_warning, can_convert, can_convert_arg,
1515 perform_implicit_conversion, can_convert_arg_bad,
1516 initialize_reference, add_conv_candidate,
1517 add_template_candidate_real, add_template_candidate): Ansify.
94be8403 1518
081cebb2
NS
15192002-12-22 Nathan Sidwell <nathan@codesourcery.com>
1520
1521 PR c++/8572
1522 * cp-tree.h (grokoptypename): Add SCOPE parameter.
1523 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1524 if in a template scope.
1525 * parse.y (unoperator): Return the scope.
1526 (operator_name): Adjust grokoptypename call.
1527
4f09be91
KL
15282002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1529
1530 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1531 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
1532 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1533
4639c5c6
KH
15342002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1535
1536 * ChangeLog: Fix a typo.
1537 * class.c: Fix comment typos.
1538 * cp-tree.h: Likewise.
1539
0ca7178c
JM
15402002-12-18 Jason Merrill <jason@redhat.com>
1541
1542 Handle anonymous unions at the tree level.
1543 C++ ABI change: Mangle anonymous unions using the name of their
1544 first named field (by depth-first search). Should not cause
1545 binary compatibility problems, though, as the compiler previously
1546 didn't emit anything for affected unions.
1547 * cp-tree.def (ALIAS_DECL): New tree code.
1548 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
1549 first field, not the largest.
1550 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
1551 push the decl, and write it out at namespace scope.
1552 * decl.c (lookup_name_real): See through an ALIAS_DECL.
1553 (pushdecl): Add namespace bindings for ALIAS_DECLs.
1554 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1555 of a decl which doesn't have one.
1556 * typeck.c (build_class_member_access_expr): Don't recurse if
1557 we already have the type we want.
1558
da9701a6
KL
15592002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1560
1561 PR c++/8099
1562 * friend.c (make_friend_class): Allow partial specialization
1563 when declaration is not a template friend.
1564
cab7a9a3
KL
15652002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1566
1567 PR c++/3663
1568 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1569 TREE_PROTECTED to created decl nodes.
1570
50cb9059
MM
15712002-12-18 Mark Mitchell <mark@codesourcery.com>
1572
1573 * class.c (build_base_field): Do not set DECL_PACKED on the
1574 FIELD_DECL.
1575
e220f0a4
GDR
15762002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1577
1578 * cp-tree.h (struct tree_srcloc): Use location_t.
1579 (SOURCE_LOCUS): New.
1580 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1581
efc7052d
JM
15822002-12-17 Jason Merrill <jason@redhat.com>
1583
1584 * decl.c (finish_function): Also complain about no return in
1585 templates.
43c6a96a 1586 * semantics.c (finish_return_stmt): Also call check_return_expr in
efc7052d
JM
1587 templates.
1588 * typeck.c (check_return_expr): In a template, just remember that we
1589 saw a return.
1590
9f175208
JM
15912002-12-16 Jason Merrill <jason@redhat.com>
1592
89ea02fb
JM
1593 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1594 of the CALL_EXPR.
1595
9f175208
JM
1596 * semantics.c (do_pushlevel): Call pushlevel after adding the
1597 SCOPE_STMT.
1598 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1599 * parse.y (function_body): Go back to using compstmt.
1600 * decl.c (pushdecl): Skip another level to get to the parms level.
1601
1602 * call.c (build_new_method_call): Use is_dummy_object to determine
1603 whether or not to evaluate the object parameter to a static member
1604 function.
1605
4977bab6
ZW
16062002-12-14 Jason Merrill <jason@redhat.com>
1607
1608 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1609 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1610 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1611 don't bother with an AGGR_INIT_EXPR.
1612 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1613 just generate a new decl normally. Take return slot parm.
1614 * cp-tree.h: Adjust prototype.
1615
75c525d7
GDR
16162002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1617
1618 PR C++/8031
43c6a96a 1619 * cvt.c (convert_to_pointer_force): Don't try comparing against
75c525d7
GDR
1620 erronous type.
1621
8c6ae51f
GK
16222002-12-13 Geoffrey Keating <geoffk@apple.com>
1623
1624 * cp-tree.h: Have the multiple-include guards around
1625 the entire file.
1626
4977bab6
ZW
16272002-12-10 David Edelsohn <edelsohn@gnu.org>
1628
1629 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1630 for SPEW_DEBUG.
1631 (snarf_method): Same.
1632 (snarf_defarg): Same.
1633
d23faea1
MM
16342002-12-10 Mark Mitchell <mark@codesourcery.com>
1635
1636 PR c++/8372
1637 * pt.c (tsubst_copy): Handle destructor names more correctly.
1638
3932057c 16392002-12-10 Matt Austern <austern@apple.com>
d23faea1 1640
3932057c 1641 * cp-tree.h: get rid of needs_virtual_reinit bit.
43c6a96a 1642
dcba9b0f
MM
16432002-12-09 Mark Mitchell <mark@codesourcery.com>
1644
43c6a96a 1645 * NEWS: Document removal of in-class initialization extension for
dcba9b0f
MM
1646 static data members of non-arithmetic, non-enumeration type.
1647 * decl.c (check_static_variable_definition): Do not allow that
1648 extension.
1649 * decl2.c (grokfield): Do not call digest_init when processing
1650 templates.
1651
42b99e03
KG
16522002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1653
1654 * error.c (dump_expr): Fix format specifier warning.
1655
6c73ad72
GK
16562002-12-04 Geoffrey Keating <geoffk@apple.com>
1657
1658 * class.c (finish_struct_1): Correct comment.
1659 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1660
8c048a52
GDR
16612002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1662
1663 PR C++/8799
1664 * error.c (dump_expr): Don't ever try to dump a non-existent
43c6a96a 1665 expression.
8c048a52 1666
4977bab6
ZW
16672002-12-03 Nathan Sidwell <nathan@codesourcery.com>
1668
1669 Implement covariant returns.
1670 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1671 (struct lang_decl_flags): Add this_thunk_p flag.
1672 Rename vcall_offset to virtual_offset.
1673 (struct lang_decl): Rename delta to fixed_offset.
1674 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1675 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1676 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1677 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1678 (make_thunk): Add this_adjusting arg.
1679 (finish_thunk): Declare.
1680 (mangle_thunk): Add this_adjusting arg.
1681 * class.c (get_vcall_index): Use base function for lookup.
1682 (update_vtable_entry_for_fn): Generate covariant thunk.
1683 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1684 (build_vtbl_initializer): Use base function for lookup.
1685 Finish covariant thunk here. Adjust thunk generation.
1686 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1687 Adjust thunk dumping.
1688 * mangle.c (mangle_call_offset): New function.
1689 (mangle_thunk): Adjust for covariant thunks.
1690 * method.c (make_thunk): Adjust. Do not set name here.
1691 (finish_thunk): New function. Set name here.
1692 (use_thunk): Generate covariant thunks too.
1693 (thunk_adjust): New function.
1694 * search.c (covariant_return_p): Remove. Fold into ...
1695 (check_final_overrider): ... here. Simplify.
1696 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1697
c203334d
JM
16982002-12-03 Jason Merrill <jason@redhat.com>
1699
c246c65d
JM
1700 PR c++/8674
1701 * call.c (build_over_call): Check specifically for TARGET_EXPR
1702 when eliding.
1703
1704 PR c++/8461, c++/8625
1705 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1706 (cp_convert_parm_for_inlining): Remove.
43c6a96a 1707 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
c246c65d
JM
1708 Remove.
1709 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1710 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1711
c203334d
JM
1712 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1713 an ambiguous conversion.
1714
ee7ecb29
MM
17152002-12-03 Mark Mitchell <mark@codesourcery.com>
1716
1717 PR c++/8688
1718 * decl.c (reshape_init): Handle erroneous initializers.
1719
5089de93
MM
17202002-12-02 Mark Mitchell <mark@codesourcery.com>
1721
1722 PR c++/8720
1723 * spew.c (remove_last_token): Make sure that last_chunk is set
1724 correctly.
1725
1726 PR c++/8615
1727 * error.c (dump_expr): Handle character constants with
1728 TREE_OVERFLOW set.
43c6a96a 1729
218e0eb6
KL
17302002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1731
1732 DR 180
1733 * decl.c (grokdeclarator): Require class-key for all friend class.
1734 Output the correct type and context in the error message.
1735
a82d6da5
MM
17362002-12-01 Mark Mitchell <mark@codesourcery.com>
1737
94fc547c
MM
1738 PR c++/5919
1739 * pt.c (unify): Use variably_modified_type_p to test validity of
1740 template argument types.
43c6a96a 1741
a82d6da5
MM
1742 PR c++/8727
1743 * cp-tree.h (lang_type_class): Add typeinfo_var.
1744 (CLASSTYPE_TYPEINFO_VAR): New macro.
1745 * rtti.c (get_tinfo_decl): Use it.
1746
1747 PR c++/8663
1748 * init.c (expand_member_init): Always get the main variant of a
1749 base class.
1750
c9f8536c
MM
17512002-12-01 Mark Mitchell <mark@codesourcery.com>
1752
1753 PR c++/8332
1754 PR c++/8493
1755 * decl.c (cxx_init_decl_processing): Use size_type_node, not
1756 c_size_type_node.
1757 * decl2.c (coerce_new_type): Likewise.
1758 * except.c (do_allocate_exception): Likewise.
1759
4977bab6
ZW
17602002-11-30 Zack Weinberg <zack@codesourcery.com>
1761
1762 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1763 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1764 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1765 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1766 typeck2.c: Include coretypes.h and tm.h.
1767 * Make-lang.in: Update dependencies.
1768
c17707f1
MM
17692002-11-30 Mark Mitchell <mark@codesourcery.com>
1770
328de7c2
MM
1771 PR c++/8227
1772 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1773 (check_initializer): Validate the type of the initialized
1774 variable, even if the initializer is absent.
1775 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
43c6a96a 1776
c17707f1
MM
1777 PR c++/8214
1778 * typeck.c (convert_for_assignment): Do not use
1779 decl_constant_value on the operand.
1780
65f8b0fb
MM
1781 PR c++/8511
1782 * pt.c (instantiate_decl): Handle template friends defined outside
1783 of the class correctly.
1784
f6a83eb0
JB
17852002-11-29 Joe Buck <jbuck@synopsys.com>
1786
1787 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1788 anonymous structs.
43c6a96a 1789
ff944b49
MM
17902002-11-29 Mark Mitchell <mark@codesourcery.com>
1791
1792 * class.c (walk_subobject_offsets): Recur on binfos as well as on
1793 types.
1794 (layout_nonempty_base_or_field): Pass it a binfo when processing a
1795 base class.
1796 (layout_empty_base): Likewise.
1797 (build_base_field): Likewise.
43c6a96a 1798
21b3d0ba
MM
17992002-11-27 Mark Mitchell <mark@codesourcery.com>
1800
1801 * class.c (build_base_field): Make sure we get the canonical base
1802 when descending through primary bases.
1803
a16f2357
GK
18042002-11-26 Geoffrey Keating <geoffk@apple.com>
1805
1806 * decl.c (check_initializer): Don't error on initialisation of
1807 a scalar with a brace-enclosed expression.
1808
688f6688
NS
18092002-11-26 Nathan Sidwell <nathan@codesourcery.com>
1810
1811 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1812 (template_parms_equal): Remove prototype.
1813 * typeck.c (buuld_indirect_ref): Reformat.
1814
4977bab6
ZW
18152002-11-25 Jason Merrill <jason@redhat.com>
1816
1817 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1818 and a DO_STMT.
1819
b82ddab4
MM
18202002-11-25 Mark Mitchell <mark@codesourcery.com>
1821
2003cd37
MM
1822 * tree.c (cp_build_qualified_type_real): Correct handling of
1823 array types.
1824 * class.c (walk_subobject_offsets): Fix thinko.
1825 (build_base_field): Record offsets of empty bases in primary
1826 virtual bases.
1827 (layout_class_type): Record offsets of empty bases in fields.
43c6a96a 1828
b82ddab4
MM
1829 * search.c (is_subobject_of_p_1): Fix thinko.
1830 (lookup_field_queue_p): Likewise.
1831
8a874cb4
MM
18322002-11-24 Mark Mitchell <mark@codesourcery.com>
1833
1834 * class.c (layout_class_type): Reuse tail padding when laying out
1835 virtual bases.
1836
05abed76
MM
18372002-11-22 Mark Mitchell <mark@codesourcery.com>
1838
1839 * rtti.c (qualifier_flags): Fix thinko.
1840
4977bab6
ZW
18412002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1842
1843 Remove traditional C constructs 1/n.
1844 * cp-tree.h (init_method, set_mangled_name_for_decl,
1845 build_opfncall, hack_identifier, make_thunk, use_thunk,
1846 synthesize_method, implicitly_declare_fn,
1847 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1848 maybe_clone_body): Remove use of PARAMS.
1849
1850 * method.c (do_build_assign_ref, do_build_copy_constructor,
1851 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1852 Likewise.
1853 (synthesize_method): Use 'bool' type and constants instead of
1854 'int'.
1855 (locate_copy): Likewise.
1856 (implicitly_declare_fn): Likewise.
1857
1858 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1859 Remove old-style declaration.
1860 (maybe_clone_body): Use 'bool' type and constants.
1861
1c83ea9f
GN
18622002-11-21 Glen Nakamura <glen@imodulo.com>
1863
1864 PR c++/8342
1865 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1866 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1867 of the branches of a COND_EXPR.
1868
ad2ae3b2
MM
18692002-11-19 Mark Mitchell <mark@codesourcery.com>
1870
1871 * pt.c (for_each_template_parm): Free allocated memory.
1872 * search.c (is_subobject_of_p_1): New function.
1873 (is_subobject_of_p): Avoid walking virtual bases multiple times.
1874
f3226a90
JT
18752002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
1876
1877 * g++spec.c (lang_specific_spec_functions): New.
1878
90024bdc
KH
18792002-11-15 Kazu Hirata <kazu@cs.umass.edu>
1880
1881 * ChangeLog: Follow spelling conventions.
1882 * class.c: Likewise.
1883 * decl2.c: Likewise.
1884
fa7b533b
ZW
18852002-11-14 Zack Weinberg <zack@codesourcery.com>
1886
1887 * search.c (dfs_push_decls): Do not try to reorder elements
1888 3..n of method_vec if method_vec has only two elements.
1889 Reverse order of two tests to avoid accessing unallocated
1890 memory.
1891
95675950
MM
18922002-11-14 Mark Mitchell <mark@codesourcery.com>
1893
1894 * class.c (dfs_find_final_overrider): Adjust so that the most
1895 derived object is a binfo, rather than a class type.
1896 (find_final_overrider): Likewise.
1897 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1898 (add_vcall_offset): Likewise.
1899
5c74d5b0
KL
19002002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1901
1902 PR c++/8389
1903 * pt.c (instantiate_template): Push class scope for member
1904 functions.
1905 (get_mostly_instantiated_function_type): Likewise. Don't call
1906 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
1907 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1908 * mangle.c (write_encoding, write_unqualified_name): Adjust.
1909
4f2c9d7e
MM
19102002-11-07 Mark Mitchell <mark@codesourcery.com>
1911
e6a66567
MM
1912 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1913 vcall offfsets. Split out ...
1914 (add_vcall_offset): ... new function.
1915
4f2c9d7e
MM
1916 PR c++/8338
1917 * pt.c (for_each_template_parm): Add htab parameter.
1918 (process_partial_specialization): Adjust call.
1919 (push_template_decl_real): Likewise.
1920 (pair_fn_data): Add visited.
1921 (for_each_template_parm_r): Avoid walking duplicates more than
1922 once.
1923 (uses_template_parms): Adjust call to for_each_template_parm.
1924
f72ab53b
MM
19252002-11-07 Mark Mitchell <mark@codesourcery.com>
1926
1927 * class.c (add_implicitly_declared_members): Put implicitly
1928 declared functions at the end of TYPE_METHODs when -fabi-version
1929 is at least 2.
1930
0a288b9a
GK
19312002-11-05 Geoffrey Keating <geoffk@apple.com>
1932
1933 * decl2.c (finish_file): Correct spelling.
1934
548502d3
MM
19352002-11-03 Mark Mitchell <mark@codesourcery.com>
1936
1937 * call.c (build_special_member_call): Do not try to lookup VTTs by
1938 name.
1939 * class.c (vtbl_init_data): Add generate_vcall_entries.
1940 (get_vtable_decl): Do not look up virtual tables by name.
1941 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1942 (set_primary_base): Do not set CLASSTYPE_RTTI.
1943 (determine_primary_base): Likewise.
1944 (get_matching_virtual): Remove.
1945 (get_vcall_index): New function.
1946 (update_vtable_entry_for_fn): Do not try to use virtual thunks
1947 when they are not required. Assign vcall indices at this point.
1948 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1949 Do update dynamic_classes.
1950 (build_vtt): Do not add VTTs to the symbol table.
1951 (build_ctor_vtbl_group): Likewise.
1952 (build_vtbl_initializer): Simplify handling of vcall indices.
1953 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1954 for the most derived class.
1955 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1956 the vtable.
1957 * cp-tree.h (dynamic_classes): New macro.
1958 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
1959 (CLASSTYPE_RTTI): Remove.
1960 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1961 (CLASSTYPE_VCALL_INDICES): New macro.
1962 (CLASSTYPE_VTABLES): Likewise.
1963 (BV_USE_VCALL_INDEX_P): Remove.
1964 (build_vtable_path): Remove.
1965 * decl2.c (finish_vtable_vardecl): Remove.
1966 (key_method): Remove #if 0'd code.
1967 (finish_vtable_vardecl): Rename to ...
1968 (maybe_emit_vtables): ... this.
1969 (finish_file): Use it.
1970 * search.c (look_for_overrides_here): Update comment.
1971
04d57dd5
ZW
19722002-11-01 Zack Weinberg <zack@codesourcery.com>
1973
1974 PR c/7353 redux
1975 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1976
bab076f7
JM
19772002-10-30 Jason Merrill <jason@redhat.com>
1978
1979 PR c++/8186
1980 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1981 * call.c (convert_for_arg_passing): Set it.
1982 * except.c (stabilize_throw_expr): Recurse for such an arg.
1983
14b4829d
MM
19842002-10-31 Mark Mitchell <mark@codesourcery.com>
1985
1986 * cp-tree.h (lang_decl_flags): Remove init_priority.
1987 (lang_decl): Add delta.
1988 (GLOBAL_INIT_PRIORITY): Remove.
1989 (THUNK_DELTA): Revise definition.
1990 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1991 * dump.c (cp_dump_tree): Don't dump it.
1992
8c081e84
MM
19932002-10-30 Mark Mitchell <mark@codesourcery.com>
1994
1995 PR c++/8160
1996 * typeck2.c (process_init_constructor): Call complete_array_type.
1997
1998 PR c++/8149
1999 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 2000
7088fca9
KL
20012002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2002
2003 Core issue 287, PR c++/7639
2004 * cp-tree.h (lang_type_class): Add decl_list field.
2005 (CLASSTYPE_DECL_LIST): New macro.
2006 (maybe_add_class_template_decl_list): Add declaration.
2007 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2008 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2009 (maybe_add_class_template_decl_list): New function.
2010 (add_implicitly_declared_members): Use it.
2011 * decl.c (maybe_process_template_type_declaration): Likewise.
2012 (pushtag): Likewise.
2013 * friend.c (add_friend): Likewise.
2014 (make_friend_class): Likewise.
2015 * semantics.c (finish_member_declaration): Likewise.
2016 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2017 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2018 to process members and friends in the order of declaration.
2019
5633b37c
MM
20202002-10-29 Mark Mitchell <mark@codesourcery.com>
2021
2022 PR c++/8287
2023 * decl.c (finish_destructor_body): Create the label to jump to
2024 when returning from a destructor here.
2025 (finish_function_body): Rather than here.
2026
f65e1183
ZW
20272002-10-25 Zack Weinberg <zack@codesourcery.com>
2028
2029 PR c++/7266
2030 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2031 SCOPE_REF is not null before dereferencing it.
2032
bb5e8a7f
MM
20332002-10-25 Mark Mitchell <mark@codesourcery.com>
2034
e93ee644
MM
2035 * call.c (build_over_call): Use DECL_CONTEXT, not
2036 DECL_VIRTUAL_CONTEXT.
2037 * class.c (modify_vtable_entry): Don't mess with
2038 DECL_VIRTUAL_CONTEXT.
2039 (set_vindex): Remove.
2040 (set_primary_base): Remove vfuns_p parameter.
2041 (determine_primary_base): Likewise.
2042 (modify_all_vtables): Likewise.
2043 (layout_class_type): Likewise. Adjust calls to other functions
2044 accordingly.
2045 (finish_struct_1): Adjust calls to modified functions. Set
2046 DECL_VINDEX here.
2047 * cp-tree.h (lang_type_class): Remove vsize.
2048 (CLASSTYPE_VSIZE): Remove.
2049 (lang_decl): Remove thunks.
2050 (DECL_THUNKS): Adjust.
2051 (DECL_VIRTUAL_CONTEXT): Remove.
2052 (duplicate_decls): Don't copy it.
2053 * pt.c (build_template_decl): Don't set it.
2054 (tsubst_decl): Likewise.
2055 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 2056
bb5e8a7f
MM
2057 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2058 (build_vtable_entry): Remove.
2059 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2060 (lang_decl): Add thunks.
2061 (DECL_THUNKS): New macro.
2062 * decl.c (duplicate_decls): Copy it.
2063 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2064 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 2065
6eb35968
DE
20662002-10-24 David Edelsohn <edelsohn@gnu.org>
2067
2068 PR c++/7228
2069 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2070 lang_type structure exists before accessing field.
2071 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2072 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2073 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2074 * class.c (check_field_decls): Use new macros.
2075 * typeck2.c (process_init_constructor): Remove redundant check for
2076 existence of lang_type structure.
2077
0cee073d
MM
20782002-10-24 Mark Mitchell <mark@codesourcery.com>
2079
ba9a991f
MM
2080 * class.c (end_of_base): New method.
2081 (end_of_class): Use it. Check indirect virtual bases.
2082
0cee073d
MM
2083 * class.c (check_field_decls): Fix typo.
2084
e6f052b7
MM
20852002-10-23 Mark Mitchell <mark@codesourcery.com>
2086
6b607ffd
MM
2087 PR c++/8067
2088 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2089 related variables.
2090
e6f052b7
MM
2091 PR c++/7679
2092 * spew.c (next_token): Do not return an endless stream of
2093 END_OF_SAVED_INPUT tokens.
2094 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2095 the cached token stream.
2096 (snarf_defarg): Likewise.
2097
8bcefb43
ZW
20982002-10-23 Zack Weinberg <zack@codesourcery.com>
2099
2100 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2101 variably_modified_type_p.
2102 * cp-tree.h: Remove prototype of variably_modified_type_p.
2103 * tree.c (variably_modified_type_p): Remove; now implemented
2104 in language-independent code.
2105
ad4f9910
MM
21062002-10-22 Mark Mitchell <mark@codesourcery.com>
2107
2108 PR c++/6579
2109 * spew.c (snarf_parenthesized_expression): New function.
2110 (snarf_block): Use it.
2111
3961e8fe
RH
21122002-10-22 Richard Henderson <rth@redhat.com>
2113
2114 * method.c (use_thunk): Always compute vcall_value; assert that
2115 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
2116 for vcall thunks as well.
2117
5ec1192e
MM
21182002-10-21 Mark Mitchell <mark@codesourcery.com>
2119
7ba539c6
MM
2120 * class.c (empty_base_at_nonzero_offset_p): New function.
2121 (layout_nonempty_base_or_field): Do not check for conflicts when
2122 laying out a virtual base using the GCC 3.2 ABI.
2123 (build_base_field): Correct checking for presence of empty classes
90024bdc 2124 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 2125
e3ccdd50
MM
2126 * class.c (include_empty_classes): Use normalize_rli.
2127 (layout_class_type): Likewise.
2128
42328048
MM
2129 * decl.c (reshape_init): Tweak handling of character arrays.
2130
5ec1192e
MM
2131 PR c++/8218
2132 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2133 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2134 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2135 (check_field_decls): Likewise.
2136 (layout_class_type): Likewise.
2137 (finish_struct_1): Initialize it.
2138 (walk_subobject_offsets): Use it to prune searches.
2139
eb0424da
MM
21402002-10-20 Mark Mitchell <mark@codesourcery.com>
2141
2142 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2143 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2144 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 2145
4a7510cb
ZW
21462002-10-18 Zack Weinberg <zack@codesourcery.com>
2147
2148 * decl.c (start_decl): Point users of the old initialized-
2149 typedef extension at __typeof__.
2150
483ab821
MM
21512002-10-18 Mark Mitchell <mark@codesourcery.com>
2152
2153 * Make-lang.in (method.o): Depend on TARGET_H.
2154 * method.c (target.h): Include it.
2155 (use_thunk): Use target hooks. Use vcall thunks, if available.
2156
e4f4feba
MM
21572002-10-18 Mark Mitchell <mark@codesourcery.com>
2158
2159 * class.c (base_derived_from): Make sure return value is a bool.
2160
9368208b
MM
21612002-10-18 Mark Mitchell <mark@codesourcery.com>
2162
2163 * class.c (find_final_overrider_data_s): Remove overriding_fn and
2164 overriding_base.
2165 (dfs_base_derived_from): New function.
2166 (base_derived_from): Likewise.
2167 (dfs_find_final_overrider): Use base_derived_from.
2168 (find_final_overrider): Adjust.
2169
5275f2bf
JM
21702002-10-18 Jason Merrill <jason@redhat.com>
2171
2172 PR c++/8080
2173 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2174 with condition decls in a template.
2175
8a188e24
NS
21762002-10-17 Nathan Sidwell <nathan@codesourcery.com>
2177
2178 * class.c (add_method): Compare template parms too.
2179
b216f69b
MM
21802002-10-17 Mark Mitchell <mark@codesourcery.com>
2181
982216be
MM
2182 PR c++/7584
2183 * class.c (handle_using_decl): Allow the declaration used to be
2184 from an ambiguous base.
2185
d768a589
MM
2186 * pt.c (convert_template_argument): Revert this change:
2187 2002-10-16 Mark Mitchell <mark@codesourcery.com>
2188 * pt.c (convert_template_argument): Do not fold non-type
2189 template rguments when inside a template.
2190
b216f69b
MM
2191 * init.c (expand_default_init): Handle brace-enclosed initializers
2192 correctly.
2193
2303a079
MM
21942002-10-16 Mark Mitchell <mark@codesourcery.com>
2195
d3133e68
MM
2196 * mangle.c (write_expression): Correct handling of enumeration
2197 constants.
2198 (write_template_arg): Likewise.
2199 * pt.c (convert_template_argument): Do not fold non-type template
2200 arguments when inside a template.
2201
2303a079
MM
2202 PR c++/7478
2203 * cvt.c (convert_to_reference): Allow references as the incoming
2204 type.
2205
451c0899
MM
22062002-10-16 Mark Mitchell <mark@codesourcery.com>
2207
2208 PR c++/7524
2209 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2210 build_qualified_type.
2211
da6eec72
RH
22122002-10-15 Richard Henderson <rth@redhat.com>
2213
2214 * error.c (dump_expr): Use real_to_decimal directly, and with
2215 the new arguments.
2216
3fa3c4bd
MM
22172002-10-15 Mark Mitchell <mark@codesourcery.com>
2218
2219 * decl.c (reshape_init): Fix typo.
2220
2221 * cp-tree.h (operator_name_info_t): Add arity.
2222 * lex.c (init_operators): Initialize it.
2223 * mangle.c (write_conversion_operator_name): New function.
2224 (write_unqualified_name): Use it.
2225 (write_template_args): Accept template arguments as a TREE_LIST.
2226 (write_expression): Adjust handling of qualified names to match
2227 specification.
2228
1a55127d
JM
22292002-10-15 Jason Merrill <jason@redhat.com>
2230
2231 * call.c (call_builtin_trap): New fn.
2232 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
2233 (build_call): Don't set current_function_returns_abnormally outside
2234 a function.
2235
58731fd1
MM
22362002-10-14 Mark Mitchell <mark@codesourcery.com>
2237
2238 * class.c (check_field_decls): Remove empty_p parameter. Instead,
2239 clear CLASSTYPE_EMPTY_P.
2240 (build_base_field): Likewise.
2241 (build_base_fields): Likewise.
2242 (check_bases_and_members): Likewise.
2243 (create_vtbl_ptr): Likewise.
2244 (layout_class_type): Likewise. Ensure that empty classes have
2245 size zero when used as base classes in the 3.2 ABI.
2246 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2247 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
2248 parameter.
2249 (is_empty_class): Correct definition when using post-3.2 ABI.
2250 * cp-tree.h (lang_type_class): Add empty_p.
2251 (CLASSTYPE_EMPTY_P): New macro.
2252
6742d92b
NS
22532002-10-12 Nathan Sidwell <nathan@codesourcery.com>
2254
2255 * init.c (build_delete): Do not apply save_expr for arrays.
2256 (build_vec_delete): Likewise.
2257
77631fa7
MM
22582002-10-14 Mark Mitchell <mark@codesourcery.com>
2259
4a7510cb 2260 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
2261 whose type is an array with unspecified bounds.
2262
77631fa7
MM
2263 PR c++/7176
2264 * lex.c (do_identifier): Add another option for the parsing
2265 parameter.
2266 * parse.y (do_id): Use it.
2267
2ee366b5
GDR
22682002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
2269
2270 PRs C++/6803, C++/7721 and C++/7803
2271 * decl.c (grokdeclarator): Gracefully handle template-name as
2272 decl-specifier.
2273
01c3fb15
JM
22742002-10-11 Jason Molenda <jmolenda@apple.com>
2275
2276 * init.c (build_field_list): Provide uses_unions_p with a default
2277 value.
2278
8e3df2de
MM
22792002-10-11 Mark Mitchell <mark@codesourcery.com>
2280
dac45b5c
MM
2281 PR c++/5661
2282 * cp-tree.h (variably_modified_type_p): New function.
2283 (grokdeclarator) Tighten check for variably modified types as
2284 fields.
2285 * pt.c (convert_template_argument): Do not allow variably modified
2286 types as template arguments.
4a7510cb 2287 * tree.c (variably_modified_type_p): New function.
dac45b5c 2288
8e3df2de
MM
2289 * NEWS: Document removal of "new X = ..." extension.
2290 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2291 brace-enclosed initializers.
2292 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2293 (initialize_local_var): Remove declaration.
2294 (expand_static_init): Likewise.
2295 * decl.c (next_initializable_field): New function.
2296 (reshape_init): Likewise.
2297 (check_initializer): Use them. Build dynamic initializer for
2298 aggregates here too.
2299 (initialize_local_var): Simplify, and incorporate cleanup
2300 insertion code as well.
2301 (destroy_local_var): Remove.
2302 (cp_finish_decl): Tidy.
2303 (expand_static_init): Fold checks for whether or not a variable
2304 needs initialization into this function. Simplify.
2305 * decl2.c (do_static_initialization): Simplify.
2306 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2307 be done for us automatically.
2308 (expand_default_init): Handle brace-enclosed initializers
2309 correctly.
2310 (expand_aggr_init_1): Remove RTL-generation code.
2311 (build_vec_init): Remove "new X = ..." support.
2312 * parse.y (new_initializer): Likewise.
2313 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2314 brace-enclosed initializer.
2315 (create_pseudo_type_info): Likewise.
2316 * typeck2.c (store_init_value): Don't try to handle digest_init
2317 being called more than once.
2318 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 2319
7bdfd72e
KG
23202002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2321
2322 * decl.c (typename_hash): Use htab_hash_pointer.
2323
e89fe41c
JW
23242002-10-10 Jim Wilson <wilson@redhat.com>
2325
2326 * decl.c (duplicate_decls): Don't call decl_attributes.
2327
95f79357
ZW
23282002-10-09 Zack Weinberg <zack@codesourcery.com>
2329
85cd7be8 2330 PR c/7353
95f79357
ZW
2331 * decl.c (start_decl): Unconditionally issue error for
2332 'typedef foo = bar'.
2333 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2334 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2335
10a38dba
KG
23362002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2337
2338 * decl2.c (prune_vtable_vardecl): Delete unused function.
2339
edebf865
MM
23402002-10-03 Mark Mitchell <mark@codesourcery.com>
2341
2342 PR c++/7754
2343 * decl2.c (finish_anon_union): Do not expand anonymous unions when
2344 procesing template functions.
2345 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2346 type. Call layout_decl.
2347 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2348
01f4137f
RH
23492002-10-07 Richard Henderson <rth@redhat.com>
2350
2351 * decl2.c, pt.c: Revert c++/7754 fix.
2352
eb55ce4b
KL
23532002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2354
2355 PR c++/7804
2356 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2357
bd9bb3d2
MM
23582002-10-03 Mark Mitchell <mark@codesourcery.com>
2359
43c6a96a 2360 PR c++/7931
bd9bb3d2
MM
2361 * pt.c (for_each_template_parm_r): Handle BASELINKs.
2362
2363 PR c++/7754
2364 * decl2.c (finish_anon_union): Do not expand anonymous unions when
2365 procesing template functions.
2366 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2367 type. Call layout_decl.
2368 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2369
6397d80b
MM
23702002-10-03 Mark Mitchell <mark@codesourcery.com>
2371
2372 PR c++/8006
2373 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2374 template parameters.
2375 (globals): Add entity and need_abi_warning.
2376 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2377 CLASSTYPE_TEMPLATE_INFO.
2378 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2379 TYPE_TI_TEMPLATE.
2380 (write_prefix): Handle typename types correctly.
2381 (write_template_prefix): Handle template template parameters
2382 correctly.
2383 (start_mangling): Add entity parameter.
2384 (finish_mangling): Warn about names whose mangling will change.
2385 (mangle_decl_string): Adjust.
2386 (mangle_type_string): Likewise.
2387 (mangle_special_for_type): Likewise.
2388 (mangle_ctor_vtbl_for_type): Likewise.
2389 (mangle_thunk): Likewise.
2390 (mangle_guard_variable): Likewise.
2391 (mangle_ref_init_variable): Likewise.
2392
2282d28d
MM
23932002-10-02 Mark Mitchell <mark@codesourcery.com>
2394
2395 PR c++/7188.
2396 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2397 * cp-tree.h (emit_base_init): Rename to ....
2398 (emit_mem_initializers): ... this.
2399 (expand_member_init): Change prototype.
2400 * init.c (perform_member_init): Compute explicit, rather than
2401 requiring it as a parameter.
2402 (sort_member_init): Rename to ...
2403 (sort_mem_initializers): ... this. Process bases and data members
2404 together.
2405 (sort_base_init): Remove.
2406 (emit_base_init): Rename to ...
2407 (emit_mem_initializers): ... this.
2408 (expand_aggr_vbase_init_1): Remove.
2409 (construct_virtual_bases): Rename to ...
2410 (construct_virtual_base): ... this.
2411 (expand_member_init): Rework handling of base initializers.
2412 * method.c (do_build_copy_constructor): Use
2413 finish_mem_initializers.
2414 * parse.y (member_init): Adjust calls to expand_member_init.
2415 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2416 (tsubst_initializer_list): Use expand_member_init.
2417 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
2418
24192002-10-02 Matt Austern <austern@apple.com>
2420 * decl.c (walk_vtables_r): Fixed typo that caused result to
2421 never get a nonzero value.
95f79357 2422
f963b5d9
RS
24232002-10-02 Roger Sayle <roger@eyesopen.com>
2424
2425 PR optimization/6627
2426 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2427 from here, and move it to tree.h.
2428 * decl.c (cxx_init_decl_processing): If storing the vbit
2429 in function pointers, ensure that force_align_functions_log
2430 is atleast one.
2431
69788039
MA
24322002-10-02 Matt Austern <austern@apple.com>
2433
2434 * class.c (check_field_decls): Changed warning about const member
2435 variables so that it doesn't get issued for a class aggregate.
95f79357 2436
d881ff25
MM
24372002-10-01 Mark Mitchell <mark@codesourcery.com>
2438
2439 * decl.c (cp_finish_decl): Make sure array types are laid out,
2440 even if the array bounds are unknown.
2441
2e88ae22
SE
24422002-10-01 Steve Ellcey <sje@cup.hp.com>
2443
d881ff25 2444 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
2445 to build1.
2446
b4c20e52
MM
24472002-10-01 Mark Mitchell <mark@codesourcery.com>
2448
d881ff25
MM
2449 * decl.c (cp_finish_decl): Make sure array types are laid out,
2450 even if the array bounds are unknown.
2451
b4c20e52
MM
2452 * decl.c (cp_finish_decl): Correct check for dynamic
2453 initialization of thread-local storage.
2454
5a9a1961
NS
24552002-09-30 Nathan Sidwell <nathan@codesourcery.com>
2456
2457 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2458 overloaded.
2459
7befdb9f
SE
24602002-09-30 Steve Ellcey <sje@cup.hp.com>
2461
2462 * class.c (build_vtbl_initializer): Add cast.
2463 (add_vcall_offset_vtbl_entries_1):
2464 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2465
17bbb839
MM
24662002-09-30 Mark Mitchell <mark@codesourcery.com>
2467
2468 * class.c (walk_subobject_offsets): Correct the calculation of
2469 offsets for virtual bases. Correct the counting of array
2470 elements.
2471 (layout_nonempty_base_or_field): Simplify. Correct the
2472 calculation of offsets to be propagated through the binfo
2473 hierarchy.
2474 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2475 Add the FIELD_DECL to TYPE_FIELDS.
2476 (build_base_fields): Adjust accordingly.
2477 (layout_virtual_bases): Use build_base_field.
2478 (end_of_class): Return a tree, not an integer.
2479 (warn_about_ambiguous_direct_bases): Rename to ...
2480 (warn_about_ambiguous_bases): ... this.
2481 (include_empty_classes): New function.
2482 (layout_class_type): Create an alternative version of the type to
2483 be used when as a base class type. Do not call
2484 finish_record_layout until we are done laying out the class.
2485 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
2486 as_base.
2487 (CLASSTYPE_SIZE): Reimplement.
2488 (CLASSTYPE_SIZE_UNIT): Likewise.
2489 (CLASSTYPE_ALIGN): Likweise.
2490 (CLASSTYPE_USER_ALIGN): Likewise.
2491 (CLASSTYPE_AS_BASE): New macro.
2492 (DECL_INITIALIZED_P): Likewise.
2493 (extract_init): Remove prototype.
2494 (build_forced_zero_init): Rename to ...
2495 (build_zero_init): ... this.
2496 (force_store_init_value): Remove.
2497 * decl.c (obscure_complex_init): Remove.
2498 (duplicate_decls): Copy DECL_INITIALIZED_P.
2499 (check_initializer): Do not leave junk in DECL_INITIAL.
2500 (cp_finish_decl): Handle zero-initialization of entities with
2501 static storage duration.
2502 * expr.c (extract_init): Remove.
2503 * init.c (build_forced_zero_init): Remove.
2504 (build_zero_init): New function.
2505 (build_default_init): Use it.
2506 (build_field_list): Skip FIELD_DECLs for base subobjects.
2507 (push_base_cleanups): Likewise.
2508 * method.c (do_build_assign_ref): Likewise.
2509 (synthesize_exception_spec): Likewise.
2510 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2511 (regenerate_decl_from_template): To not set DECL_INITIAL for a
2512 static data member whose initialization took place in its class.
2513 (instantiate_decl): Do not pass an initializer to cp_finish_decl
2514 in that situation.
2515 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2516 (dfs_unuse_fields): Likewise.
2517 * tree.c (pod_type_p): Handle error_mark_node.
2518 (zero_init_p): Likewise.
95f79357 2519 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
2520 subobjects.
2521 * typeck2.c (store_init_value): Remove #if 0'd code.
2522 (force_store_init_value): Remove.
2523 (process_init_constructor): Use build_zero_init.
95f79357 2524
03357c23
NS
25252002-09-29 Nathan Sidwell <nathan@codesourcery.com>
2526
2527 PR c++/7788
2528 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2529
27631dae
KH
25302002-09-29 Kazu Hirata <kazu@cs.umass.edu>
2531
2532 * cp-tree.h: Fix comment typos.
2533 * decl.c: Likewise.
2534 * pt.c: Likewise.
2535
956d9305
MM
25362002-09-25 Mark Mitchell <mark@codesourcery.com>
2537
2538 * cp/class.c (contains_empty_class_p): New method.
2539 (walk_subobject_offsets): Correct computation of field offset.
2540 (layout_empty_base): Correct placement of emtpy base classes.
2541 (layout_class_type): Warn about ABI changes.
2542
2d3e278d
MM
25432002-09-23 Mark Mitchell <mark@codesourcery.com>
2544
2545 * cp/class.c (layout_virtual_bases): Do not round the size of the
2546 type to a multiple of the alignment before laying out virtual bases.
2547 (layout_class_type): Correct handling of bit-fields that are wider
2548 than their type inside unions. Round the size of the type to a
2549 even number of bytes when computing the size without virtual
2550 bases.
2551 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 2552
838dfd8a
KH
25532002-09-21 Kazu Hirata <kazu@cs.umass.edu>
2554
2555 * ChangeLog: Follow spelling conventions.
2556 * ChangeLog.2: Likewise.
2557 * call.c: Likewise.
2558 * class.c: Likewise.
2559 * cp-tree.h: Likewise.
2560 * cvt.c: Likewise.
2561 * decl.c: Likewise.
2562 * decl2.c: Likewise.
2563 * except.c: Likewise.
2564 * friend.c: Likewise.
2565 * g++spec.c: Likewise.
2566 * init.c: Likewise.
2567 * lex.c: Likewise.
2568 * mangle.c: Likewise.
2569 * method.c: Likewise.
2570 * operators.def: Likewise.
2571 * optimize.c: Likewise.
2572 * pt.c: Likewise.
2573 * rtti.c: Likewise.
2574 * search.c: Likewise.
2575 * semantics.c: Likewise.
2576 * spew.c: Likewise.
2577 * tree.c: Likewise.
2578 * typeck.c: Likewise.
2579
9ced0328
DP
25802002-09-18 Devang Patel <dpatel@apple.com>
2581
2582 * cp/cp-tree.h: New prototype for walk_vtabls().
2583 * cp/decl.c (walk_vtables_r): New function.
2584 (struct cp_binding_level): Add new members, namespaces,
2585 names_size and vtables.
2586 (add_decl_to_level): Add decl in namespaces or vtables
2587 chain, if conditions match.
2588 (walk_vtables): New function.
2589 (walk_namespaces_r): Travers separate namespace chain
2590 for namespace decls.
2591 (wrapup_globals_for_namespace): Use names_size instead
2592 of list_length().
2593 * cp/decl2.c (finish_file): Use walk_vtables() instead of
2594 walk_globals() to walk vtable decls.
2595
dd29188b
NS
25962002-09-18 Nathan Sidwell <nathan@codesourcery.com>
2597
2598 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2599 ICE with invalid pointers & references.
2600
f989ed67
ZW
26012002-09-17 Zack Weinberg <zack@codesourcery.com>
2602
2603 * Make-lang.in: Remove all references to the demangler.
2604 * cxxfilt.c: Moved to binutils.
2605
171d2f50
NS
26062002-09-16 Nathan Sidwell <nathan@codesourcery.com>
2607
3ec83083
NS
2608 PR c++/7718
2609 * pt.c (tsubst_decl): Remove assert.
2610
171d2f50
NS
2611 Remove DR 295 implementation.
2612 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2613 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2614 about ignoring volatile qualifiers.
2615
2616 * search.c (lookup_member): Correct documentation.
2617
36a5eadd
GK
26182002-09-16 Geoffrey Keating <geoffk@apple.com>
2619
2620 * cp-tree.h (union lang_tree_node): Add chain_next option.
2621
28c56d25
NS
26222002-09-16 Nathan Sidwell <nathan@codesourcery.com>
2623
7979434d
NS
2624 * parse.y (parse_finish_call_expr): Check lookup_member result.
2625
28c56d25
NS
2626 PR c++/7015
2627 * semantic.c (finish_asm_stmt): Fix operand/output_operands
2628 thinko.
2629 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2630
3baab484
NS
26312002-09-15 Nathan Sidwell <nathan@codesourcery.com>
2632
2633 PR c++/7919
2634 * call.c (build_over_call): Convert this pointer for fns found by
2635 using decls.
2636
d30d6e7a
KH
26372002-09-15 Kazu Hirata <kazu@cs.umass.edu>
2638
2639 * ChangeLog: Follow spelling conventions.
2640 * ChangeLog.1: Likewise.
2641
c8460010
NS
26422002-09-14 Nathan Sidwell <nathan@codesourcery.com>
2643
2644 PR c++/7768
2645 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2646
c6002625
KH
26472002-09-14 Kazu Hirata <kazu@cs.umass.edu>
2648
2649 * error.c: Fix comment formatting.
2650 * except.c: Likewise.
2651 * expr.c: Likewise.
2652 * friend.c: Likewise.
2653 * g++spec.c: Likewise.
2654 * init.c: Likewise.
2655 * lex.c: Likewise.
2656 * mangle.c: Likewise.
2657 * method.c: Likewise.
2658 * optimize.c: Likewise.
2659 * pt.c: Likewise.
2660 * rtti.c: Likewise.
2661 * search.c: Likewise.
2662 * semantics.c: Likewise.
2663 * spew.c: Likewise.
2664 * tree.c: Likewise.
2665 * typeck.c: Likewise.
2666 * typeck2.c: Likewise.
2667
46dd3884
GDR
26682002-09-13 Matt Austern <austern@apple.com>
2669
4a7510cb 2670 PR C++/7828
46dd3884
GDR
2671 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2672 * cp/call.c: Change call-by-const-reference mechanism to use
2673 non_cast_lvalue_p when deciding whether the create a temporary.
2674 We need a temporary when passing, e.g. (long) x by const ref.
2675
712467a4
NS
26762002-09-13 Nathan Sidwell <nathan@codesourcery.com>
2677
2678 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2679
a1c65f9f
KH
26802002-09-13 Kazu Hirata <kazu@cs.umass.edu>
2681
2682 * decl.c: Fix comment formatting.
2683 * decl2.c: Likewise.
2684
00a17e31
KH
26852002-09-12 Kazu Hirata <kazu@cs.umass.edu>
2686
2687 * call.c: Fix comment formatting.
2688 * class.c: Likewise.
2689 * cp-lang.c: Likewise.
2690 * cp-tree.h: Likewise.
2691 * cvt.c: Likewise.
2692
3fd9d606
ZW
26932002-09-11 Zack Weinberg <zack@codesourcery.com>
2694
2695 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2696 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2697 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2698 minor adjustments (use version_string, eliminate yet another
2699 duplicate of xmalloc)
2700
2515a7ea
KG
27012002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2702
2703 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2704
5aa3396c
JM
27052002-09-05 Jason Merrill <jason@redhat.com>
2706
2707 * typeck2.c (add_exception_specifier): Only pedwarn for an
2708 incomplete type.
2709 (require_complete_eh_spec_types): New fn.
2710 (cxx_incomplete_type_diagnostic): Also support pedwarning.
2711 * typeck.c (complete_type_or_diagnostic): Likewise.
2712 * call.c (build_call): Call require_complete_eh_spec_types.
2713 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2714 on an incomplete type.
2715
23ccd1f3
JJ
27162002-09-04 Jakub Jelinek <jakub@redhat.com>
2717
2718 * decl.c (start_cleanup_fn): Clear interface_only before
2719 start_function, restore it afterwards.
2720
4977bab6
ZW
27212002-09-02 Nathan Sidwell <nathan@codesourcery.com>
2722
2723 * cp-tree.h (finish_builtin_type): Remove.
2724 * decl2.c (finish_builtin_type): Move to common code.
2725 * decl.c (build_ptrmemfunc_type): Adjust.
2726 * rtti.c (create_pseudo_type_info): Adjust.
2727 (create_tinfo_types): Adjust.
2728
d99f015c
JM
27292002-08-31 Jason Merrill <jason@redhat.com>
2730
2731 * cp-lang.c (cp_expr_size): Allow initialization from a
2732 CONSTRUCTOR.
2733
8a3c9180
RH
27342002-08-30 Richard Henderson <rth@redhat.com>
2735
c9989d09 2736 PR opt/7515
8a3c9180
RH
2737 * tree.c: Include target.h.
2738 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2739 don't bind locally.
2740 * Makefile.in (tree.o): Update.
2741
eca7f13c
MM
27422002-08-27 Mark Mitchell <mark@codesourcery.com>
2743
2744 * class.c (layout_virtual_bases): Warn about bugs in G++ that
2745 result in incorrect object layouts.
2746 (layout_class_type): Likewise.
f989ed67 2747
13d3f0b6
MA
27482002-08-24 Matt Austern <austern@apple.com>
2749
2750 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2751 are allowable.
2752 (real_lvalue_p): Update caller.
2753 (lvalue_p): Ditto.
2754 (non_cast_lvalue_or_else): New.
2755 * tree.h: Declare it.
f989ed67 2756 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 2757
5b770a96
MM
27582002-08-22 Mark Mitchell <mark@codesourcery.com>
2759
2760 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2761 and COND_EXPR specially; fix error message output.
2762
d65b1d77
JM
27632002-08-22 Jason Merrill <jason@redhat.com>
2764
2765 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2766 * semantics.c (nullify_returns_r): Likewise.
2767
8a5f4379
GDR
27682002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2769
2770 Fix PR/7621
2771 * typeck.c (finish_class_member_access_expr): Diagnose cases where
2772 name lookup finds nothing.
2773
5d764395
JM
27742002-08-15 Jason Merrill <jason@redhat.com>
2775
2776 * semantics.c (finish_then_clause): Remove redundant assignment.
2777 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2778 extra binding level outside the if/switch statement.
2779 (finish_while_cond, finish_for_cond): Rewrite complex condition
2780 into the loop body.
2781
c01b9ec8
AO
27822002-08-15 Alexandre Oliva <aoliva@redhat.com>
2783
2784 * parse.y (sizeof, alignof, typeof): New non-terminals to
2785 increment skip_evaluation. Replace terminals with them and
2786 decrement skip_evaluation at the end of rules using them.
2787 * decl2.c (mark_used): Don't assemble_external if
2788 skipping evaluation.
2789
e8fe46d4
GDR
27902002-08-15 Gabriel Dos Reis <gdr@nerim.net>
2791
2792 Fix PR/7504
2793 * parse.y (parse_finish_call_expr): Handle incomplete
2794 type used to name a scope.
2795
eac5ce6c
NS
27962002-08-15 Nathan Sidwell <nathan@codesourcery.com>
2797
2798 PR c++/7598
2799 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2800 regression caused by my 2002-08-08 patch.
2801
22eadedb
MM
28022002-08-13 Mark Mitchell <mark@codesourcery.com>
2803
2804 * decl.c (pushdecl_class_level): Honor requests to bind names to
2805 OVERLOADs.
2806
e65e6212
KG
28072002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2808
2809 * decl2.c (build_call_from_tree): Fix uninitialized variable.
2810 * parse.y (parse_finish_call_expr): Likewise.
2811 * repo.c (old_args, old_dir, old_main): Const-ify.
2812
3e72ec9a
GDR
28132002-08-11 Gabriel Dos Reis <gdr@nerim.net>
2814
2815 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2816 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2817 * optimize.c (maybe_clone_body): Likewise.
2818 * pt.c (tsubst_enum): Likewise.
2819 (lookup_template_class): Likewise.
2820 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2821
f749a36b
NB
28222002-08-10 Neil Booth <neil@daikokuya.co.uk>
2823
2824 * lang-specs.h: Remove -ansi.
2825
3ebf5204
NS
28262002-08-10 Nathan Sidwell <nathan@codesourcery.com>
2827
2828 * tree.c (maybe_dummy_object): Replace // with /* */
2829
9e259dd1
MM
28302002-08-09 Mark Mitchell <mark@codesourcery.com>
2831
2832 * call.c (standard_conversion): Use build_ptrmem_type.
2833 * cp-tree.h (build_ptrmem_type): New function.
2834 (adjust_result_of_qualified_name_lookup): Likewise.
2835 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2836 static data members.
2837 (build_ptrmem_type): New function.
2838 (grokdeclarator): Do not use build_offset_type when encountering a
2839 qualified name.
2840 * parse.y (parse_finish_call_expr): Use
2841 adjust_result_of_qualified_name_lookup.
2842 * search.c (adjust_result_of_qualified_name_lookup): New function.
2843 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2844 accessing OFFSET_TYPEs directly.
f989ed67 2845
0e339752
MS
28462002-08-08 Mike Stump <mrs@apple.com>
2847
2848 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2849 (type_decays_to): Likewise.
2850 * class.c (find_final_overrider): Likewise.
2851 (maybe_note_name_used_in_class): Likewise.
2852 * decl.c (current_tmpl_spec_kind): Likewise.
2853 (add_binding): Likewise.
2854 (push_class_binding): Likewise.
2855 (duplicate_decls): Likewise.
2856 (layout_var_decl): Likewise.
2857 (grokfndecl): Likewise.
2858 (grokdeclarator): Likewise.
2859 (check_default_argument): Likewise.
2860 * decl2.c (handle_class_head): Likewise.
2861 * error.c (dump_template_decl): Likewise.
2862 * init.c (build_offset_ref): Likewise.
2863 * pt.c (check_specialization_scope): Likewise.
2864 (determine_specialization): Likewise.
2865 (check_explicit_specialization): Likewise.
2866 (maybe_check_template_type): Likewise.
2867 (process_partial_specialization): Likewise.
2868 (check_default_tmpl_args): Likewise.
2869 (push_template_decl_real): Likewise.
2870 (convert_template_argument): Likewise.
2871 (try_class_unification): Likewise.
2872 (get_bindings_real): Likewise.
2873 (do_decl_instantiation): Likewise.
2874 * semantics.c (begin_function_definition): Likewise.
2875 (finish_member_declaration): Likewise.
2876 (check_multiple_declarators): Likewise.
2877 * typeck.c (comp_array_types): Likewise.
2878 (comptypes): Likewise.
2879 (expr_sizeof): Likewise.
2880 (build_binary_op): Likewise.
2881 (dubious_conversion_warnings): Likewise.
2882 (check_return_expr): Likewise.
b6ce26ac 2883
a6f5b2d3
MM
28842002-08-08 Mark Mitchell <mark@codesourcery.com>
2885
2886 * typeck.c (build_class_member_access_expr): Do not return
2887 error_mark_node when no error has occurred.
b6ce26ac 2888
c93a26f5
NS
28892002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2890
2891 * typeck.c (build_component_addr): Remove.
2892 (build_unary_op): Just check it's not a bitfield, and then build
2893 an ADDR_EXPR.
2894
5bfc90de
NS
28952002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2896
2897 * class.c (convert_to_base): Correct check for error_mark_node.
2898 (create_vtable_ptr): Remove unused VFUNS_P parm.
2899
22aa533e
NS
29002002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2901
2902 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2903
50ad9642
MM
29042002-08-07 Mark Mitchell <mark@codesourcery.com>
2905
2906 Rework build_component_ref.
2907 * call.c (build_vfield_ref): Do not go through build_component_ref.
2908 (build_field_call): Use build_class_member_access_expr.
2909 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2910 (build_object_call): Likewise.
2911 * class.c (convert_to_base): New function.
2912 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2913 (instantiate_type): Handle BASELINKs.
2914 * cp-tree.def (BASELINK): New tree code.
2915 * cp-tree.h (BASELINK_P): Reimplement.
2916 (SET_BASELINK_P): Remove.
2917 (BASELINK_BINFO): Reimplement.
2918 (BASELINK_FUNCTIONS): Likewise.
2919 (BASELINK_ACCESS_BINFO): Likewise.
2920 (BASELINK_OPTYPE): Likewise.
2921 (convert_to_base): New function.
2922 (name_p): Likewise.
2923 (build_object_ref): Remove.
2924 (build_component_ref_1): Likewise.
2925 (build_component_ref): Likewise.
2926 (build_x_component_ref): Likewise.
2927 (build_class_member_access_expr): New function.
2928 (finish_class_member_access_expr): Likewise.
2929 (build_ptrmemfunc_access_expr): Likewise.
2930 * decl.c (grokdeclarator): Handle BASELINKs.
2931 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2932 finish_class_member_access_expr.
2933 (arg_assoc): Handle BASELINKs.
2934 (do_class_using_decl): Likewise.
2935 * error.c (dump_decl): Likewise.
2936 (dump_expr): Use build_ptrmemfunc_access_expr.
2937 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2938 destructors.
2939 (build_throw): Use BASELINK_FUNCTIONS.
2940 * init.c (perform_member_init): Use
2941 build_class_member_access_expr.
2942 (build_offset_ref): Handle BASELINKs. Use
2943 build_class_member_access_expr.
2944 * method.c (hack_identifier): Likewise.
2945 * parse.y (do_id): Use BASELINK, not TREE_LIST.
2946 (primary): Remove uses of build_object_ref.
2947 * pt.c (lookup_template_function): Handle BASELINKs.
2948 (resolve_overloaded_unification): Likewise.
2949 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2950 (lookup_field): Use BASELINK, not TREE_LIST.
2951 (lookup_fnfiels): Likewise.
2952 (setup_class_bindings): Likewise.
2953 * semantics.c (finish_object_call_expr): Do not use
2954 build_method_call when we already know what function is being
2955 called.
2956 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2957 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2958 TREE_CHAIN.
2959 (name_p): New function.
2960 * typeck.c (build_object_ref): Remove.
2961 (build_component_ref_1): Likewise.
2962 (build_x_component_ref): Likewise.
2963 (build_class_member_access_expr): New function.
2964 (finish_class_member_access_expr): Likewise.
2965 (build_ptrmemfunc_access_expr): Likewise.
2966 (get_member_function_from_ptrfunc): Use
2967 build_ptrmemfunc_access_expr.
2968 (build_binary_op): Likewise.
2969 (build_unary_op): Likewise.
2970 (build_ptrmemfunc): Likewise.
2971 (pfn_from_ptrmemfunc): Likewise.
2972 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 2973
0b6f2917
NB
29742002-08-07 Neil Booth <neil@daikokuya.co.uk>
2975
2976 * Make-lang.in (CXX_C_OBJS): Update.
2977 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2978 * cp-tree.h (cxx_decode_option): Remove.
2979 * decl2.c (compare_options, lang_f_options, unsupported_options,
2980 cxx_decode_option): Remove.
2981
1e14c7f0
GDR
29822002-08-06 Gabriel Dos Reis <gdr@nerim.net>
2983
2984 * typeck.c (build_x_unary_op): Handle pointer-to-member.
2985
b3426eb9
GK
29862002-08-05 Geoffrey Keating <geoffk@redhat.com>
2987
2988 * class.c: Don't include obstack.h.
b6ce26ac 2989 (popclass):
b3426eb9
GK
2990 * decl2.c: Delete bogus comment.
2991 * error.c: Don't include obstack.h.
2992 * except.c: Likewise.
2993 (dump_type): Correct comment.
2994 * method.c: Don't include obstack.h.
2995 * tree.c: Likewise.
2996
201fbb7f
GDR
29972002-08-04 Gabriel Dos Reis <gdr@nerim.net>
2998
2999 Fix PR/2213
3000 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3001 expressions to pointer-to-data-member of pointer-to-member-functions.
3002
6d9f628e
GK
30032002-08-04 Geoffrey Keating <geoffk@redhat.com>
3004
3005 * cvt.c (ocp_convert): Delete obsolete code.
3006 * parse.y (permanent_obstack): Delete declaration.
3007 * pt.c (permanent_obstack): Delete declaration.
3008 * repo.c (permanent_obstack): Delete declaration.
3009 (open_repo_file): Use xmalloc instead of permanent_obstack.
3010 (init_repo): Use xstrdup instead of permanent_obstack.
3011
dd98e14f
NS
30122002-08-04 Nathan Sidwell <nathan@codesourcery.com>
3013
3014 * cp-tree.h (VF_DERIVED_VALUE): Remove.
3015 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3016
e6858a84
NS
30172002-08-03 Nathan Sidwell <nathan@codesourcery.com>
3018
3019 PR 7470.
3020 C++ ABI change - vfunc ordering.
3021 * class.c (add_virtual_function): Remove.
3022 (dfs_modify_all_vtables): Take list of all declared
3023 virtuals. Assign all that are not in primary base.
3024 (check_for_override): Adjust comments.
3025 (create_vtable_ptr): Take single list of virtuals. Build chain
3026 of declared virtuals here.
3027 (layout_class_type): Take single list of virtuals. Adjust.
3028 (finish_struct_1): Keep virtuals on single list. Adjust.
3029
55765de4
MM
30302002-08-02 Mark Mitchell <mark@codesourcery.com>
3031
3032 * init.c (build_member_call): Use build_new_method_call, not
3033 build_method_call.
3034
d0067571
KW
30352002-08-02 Krister Walfridsson <cato@df.lth.se>
3036
3037 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3038
4a34e0e8
MM
30392002-08-02 Mark Mitchell <mark@codesourcery.com>
3040
3041 * call.c (build_method_call): Issue a more helpful error message
3042 about ambiguous method names.
3043
41ab2ae2
NS
30442002-08-02 Nathan Sidwell <nathan@codesourcery.com>
3045
3046 * tree.c (build_shared_int_cst): Make cache file scope, and
3047 GTY it.
3048
367aa585
JM
30492002-08-02 Jason Merrill <jason@redhat.com>
3050
a77a9a18
JM
3051 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3052 (cp_expr_size): New fn.
3053 * call.c (build_over_call): Lose empty class hackery.
3054 (convert_arg_to_ellipsis): Promote non-POD warning to error.
3055 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3056
367aa585
JM
3057 * semantics.c (expand_body): Do tree optimization in the function
3058 context, too.
3059
4078b403
NB
30602002-08-01 Neil Booth <neil@daikokuya.co.uk>
3061
3062 * cp-tree.h: Move all warning and flag declarations to c-common.h.
3063 * decl.c: Move all warning and flag variables to c-common.c.
3064 * decl2.c: Move all warning and flag variables to c-common.c.
3065 * lex.c (flag_digraphs): Remove.
3066 (warn_traditional): Now in c-common.c.
3067
4ba126e4
MM
30682002-07-31 Mark Mitchell <mark@codesourcery.com>
3069
3070 * call.c (build_field_call): Do not look up the field by name.
3071 (build_method_call): Simplify.
3072 (struct z_candidate): Add access_path and conversion_path. Remove
3073 basetype_path.
3074 (convert_class_to_reference): Adjust use of
3075 add_function_candidate.
3076 (add_candidate): Add conversion_path argument.
3077 (add_function_candidate): Use it.
3078 (add_conv_dndidate): Likewise.
3079 (build_builtin_candidate): Likewise.
3080 (add_template_candidate_real): Add conversion_path argument.
3081 (add_template_conv_candidate): Likewise.
3082 (add_template_candidate): Likewise.
3083 (build_user_type_conversion_1): Use it.
3084 (build_new_function_call): Remove name lookup code. Adjust use of
3085 add_template_candidate and add_function_candidate.
3086 (build_new_op): Likewise.
3087 (convert_like_real): Use build_special_member_call.
3088 (build_over_call): Use cand->conversion_path.
3089 (build_special_member_call): New method.
3090 (build_new_method_call): Remove name lookup code.
3091 * cp-tree.def (OFFSET_REF): Update documentation.
3092 (TEMPLATE_ID_EXPR): Likewise.
3093 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3094 (BASELINK_OPTYPE): Likewise.
3095 (build_new_method_call): Adjust prototype.
3096 (build_special_member_call): New method.
3097 (build_baselink): New method.
3098 (build_offset_ref_call_from_tree): Likewise.
3099 (build_call_from_tree): Likewise.
3100 (finish_qualified_call_expr): Remove.
3101 (finish_call_expr): Adjust prototype.
3102 (build_x_function_call): Remove.
3103 * cvt.c (ocp_convert): Use build_special_member_call.
3104 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3105 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3106 CALL_EXPR.
3107 (build_offset_ref_call_from_tree): New function.
3108 (build_call_from_tree): Likewise.
3109 * init.c (expand_cleanup): Use build_special_member_call.
3110 (expand_default_init): Likewise.
3111 (build_member_call): Use finish_call_expr.
3112 (build_new_1): Use build_special_member_call.
3113 (push_base_cleanups): Likewise.
3114 * method.c (do_build_assign_ref): Likewise.
3115 * parse.y (template_id): Do not pass a COMPONENT_REF to
3116 lookup_template_function.
3117 (primary): Use parse_finish_call_epxr, not finish_call_expr.
3118 (parse_finish_call_expr): New function.
3119 * pt.c (lookup_template_function): Add assertions.
3120 * search.c (lookup_base): Allow T to be a binfo.
3121 (build_baselink): New function.
3122 (lookup_member): Use it.
3123 * semantics.c (finish_call_expr): Do not do name lookup.
3124 (finish_object_call_expr): Remove #if 0'd code.
3125 (finish_qualified_call_expr): Remove.
3126 * typeck.c (build_x_function_call): Remove.
3127 (build_static_case): Use build_special_member_call.
3128 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 3129
60b8aa94
FS
31302002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3131
3132 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3133
8a4a7242
GDR
31342002-07-30 Gabriel Dos Reis <gdr@nerim.net>
3135
3136 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3137
03fc215c
NS
31382002-07-30 Nathan Sidwell <nathan@codesourcery.com>
3139
3140 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3141 documentation.
3142
3f16a8f3
AM
31432002-07-29 Alan Modra <amodra@bigpond.net.au>
3144
3145 * cp-tree.h: Comment typo fix.
3146
c03d566f
RE
31472002-07-29 Richard Earnshaw <rearnsha@arm.com>
3148
3149 * spew.c (space_for_token): Allocate zeroed memory for a new token
3150 chunk.
3151
c2ef6d34
RS
31522002-07-27 Roger Sayle <roger@eyesopen.com>
3153
3154 * decl.c (builtin_function_1): No need to explicitly mark
3155 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3156
a3926fe1
RS
31572002-07-27 Roger Sayle <roger@eyesopen.com>
3158
3159 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3160
8e51619a
JM
31612002-07-26 Jason Merrill <jason@redhat.com>
3162
3163 * call.c (build_over_call): Likewise.
3164 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
3165 (convert_for_arg_passing): New fn.
3166 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
3167 (type_passed_as): New fn.
3168 * pt.c (tsubst_decl): Use it.
3169 * decl2.c (cp_build_parm_decl): New fn.
3170 (build_artificial_parm): Use it.
3171 (start_static_storage_duration_function): Likewise.
3172 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3173 (grokparms): Don't mess with DECL_ARG_TYPE.
3174 * typeck.c (convert_arguments): Use convert_for_arg_passing.
3175 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3176 Define.
3177 * cp-tree.h: Declare new fns.
b6ce26ac 3178
c372b0fa
NB
31792002-07-26 Neil Booth <neil@daikokuya.co.uk>
3180
3181 * cp-tree.h (flag_operator_names): Remove.
3182 * decl2.c (flag_operator_names): Remove.
3183 (lang_f_options): Remove operator-names.
3184 * lex.c (D_OPNAME): Remove.
3185 (reswords): Remove operator names.
3186 (rid_to_yy): Remove operator names.
3187 (init_reswords): No need to handle D_OPNAME.
3188 * spew.c (read_process_identifier): There are no operator
3189 names.
3190
558ee214
JM
31912002-07-26 Jason Merrill <jason@redhat.com>
3192
3193 * dump.c (cp_dump_tree): Call c_dump_tree.
3194 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3195
81a1552d
NB
31962002-07-25 Neil Booth <neil@daikokuya.co.uk>
3197
3198 * error.c (print_whitespace): Remove.
3199 * g++spec.c (LIBUNWIND): Move.
3200 * mangle.c (mangled_position, write_signed_number): Remove.
3201
cad2c6b6
NB
32022002-07-25 Neil Booth <neil@daikokuya.co.uk>
3203
3204 * decl2.c (cxx_decode_option): Similarly.
3205
ea793912
GDR
32062002-07-25 Gabriel Dos Reis <gdr@nerim.net>
3207
3208 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3209 (cxx_sizeof_or_alignof_type): Take a third argument.
3210 (cxx_sizeof): Adjust definition.
3211 (cxx_alignof): Likewise.
3212 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3213 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3214 complaining.
3215 (c_sizeof_nowarn): Remove definition.
3216 (build_unary_op): Use cxx_sizeof_nowarn.
3217
3cfab7ec
GK
32182002-07-24 Geoffrey Keating <geoffk@redhat.com>
3219
3220 * tree.c (cp_build_qualified_type_real): When copying
3221 pointer-to-method types, unshare the record that holds
3222 the cached pointer-to-member-function type.
3223
c0667597
NB
32242002-07-23 Neil Booth <neil@daikokuya.co.uk>
3225
3226 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3227
fa72b064
GDR
32282002-07-23 Gabriel Dos Reis <gdr@nerim.net>
3229
3230 Fix PR/7363:
3231 * typeck.c (cxx_sizeof_or_alignof_type): New function.
3232 (c_sizeof): Remove definition.
3233 (expr_sizeof): Use cxx_sizeof.
3234 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3235 * decl.c (finish_destructor_body): Use cxx_sizeof.
3236 * semantics.c (finish_alignof): Likewise.
3237 (finish_alignof): Use cxx_alignof.
3238 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3239 (cxx_sizeof_or_alignof_type): Declare.
3240 (my_friendly_assert): Move to ../c-common.h.
3241
4fa31c2a
NB
32422002-07-23 Neil Booth <neil@daikokuya.co.uk>
3243
3244 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3245
0e902d98
KL
32462002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3247
3248 PR c++/7347, c++/7348
3249 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3250 * decl.c (make_typename_type): Use it.
3251 (make_unbound_class_template): Likewise.
3252 (lookup_name_real): Don't call type_access_control if scope is
3253 template parameter dependent.
3254 * parse.y (template_arg): Call make_unbound_class_template with
3255 tf_parsing set.
3256 (nest_name_specifier): Call make_typename_type with tf_parsing set.
3257 (typename_sub0): Likewise.
3258 (typename_sub1): Likewise.
3259 (instantiate_decl): Push class scope.
3260 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3261 for both static variable and member function template.
3262 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3263 and arguments.
3264 * search.c (type_access_control): Do type access for TEMPLATE_DECL
3265 too.
3266
b886c620
RS
32672002-07-20 Roger Sayle <roger@eyesopen.com>
3268
3269 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3270 test by using positive_option. Make whitespace consistent.
3271
7a561142
GDR
32722002-07-20 Gabriel Dos Reis <gdr@nerim.net>
3273
fa72b064 3274 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
3275 members with 'locus'. Adjust use throughout.
3276 (struct feed): Likewise.
3277 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3278 Adjust use.
3279 (snarf_defarg): Use error(), not error_with_file_and_line().
3280
059ba716
CD
32812002-07-19 Chris Demetriou <cgd@broadcom.com>
3282
3283 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3284 cpp_options is included.
3285
d955f6ea
KL
32862002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3287
3288 PR c++/2862, c++/2863
3289 * pt.c (determine_specialization): Compare the length of
3290 TYPE_ARG_TYPES. Tidy.
3291
d03d18e8
KL
32922002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3293
3294 PR c++/3797
3295 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 3296 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
3297 instantiation olddecl.
3298
ba59df78
KL
32992002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3300
3301 PR c++/4802, c++/5387
3302 * decl.c (make_typename_type): Use enforce_access.
3303
58f05188
SS
33042002-07-17 Scott Snyder <snyder@fnal.gov>
3305
3306 PR c++/7320
3307 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3308
04ec0065
MM
33092002-07-12 Mark Mitchell <mark@codesourcery.com>
3310
3311 * class.c (add_method): Correct handling of conversion operators.
3312
f0ab6bf2
MM
33132002-07-11 Mark Mitchell <mark@codesourcery.com>
3314
3315 PR c++/7224
3316 * class.c (add_method): Simplify.
3317
34902e16
JM
33182002-07-11 Jason Merrill <jason@redhat.com>
3319
3320 PR c++/7279
3321 * tree.c (cp_copy_res_decl_for_inlining): Also copy
3322 TREE_ADDRESSABLE.
3323
6e04241f
GS
33242002-07-10 Graham Stott <graham.stott@btinternet.com>
3325
3326 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 3327 Pass depth as int pointer.
6e04241f 3328
8ac9d31f
TJ
33292002-07-11 Tim Josling <tej@melbpc.org.au>
3330
b6ce26ac 3331 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
3332
3333 * config-lang.in (gtfiles): Add files needed for this front end.
3334
15c7fb9c
MM
33352002-07-10 Mark Mitchell <mark@codesourcery.com>
3336
3337 * cp-tree.h (unqualified_name_lookup_error): Declare it.
3338 (begin_function_definition): Adjust prototype.
3339 * lex.c (unqualified_name_lookup_error): New function, split out
3340 from ...
3341 (do_identifier): ... here.
3342 * parse.y (parse_begin_function_definition): New function.
3343 (fn.def1): Use it.
3344 * semantics.c (begin_function_definition): Accept decl-specifiers
3345 and attributes as separate parameters.
3346
abf92e26
JM
33472002-07-10 Jason Merrill <jason@redhat.com>
3348
3349 PR c++/6255
3350 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3351 modifying the old one.
3352
8ba658ee
MM
33532002-07-09 Mark Mitchell <mark@codesourcery.com>
3354
3355 * cp-tree.h (constructor_name_p): Declare it.
3356 (check_template_template_default_arg): Likewise.
3357 * class.c (handle_using_decl): Use constructor_name_p.
3358 * decl.c (grokdeclarator): Likewise.
3359 * decl2.c (constructor_name_p): Define it.
3360 * init.c (build_member_call): Use constructor_name_p.
3361 * parse.y (template_parm): Use check_template_template_default_arg.
3362 * pt.c (check_explicit_specialization): Use constructor_name_p.
3363 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 3364
d5372501
KL
33652002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3366
3367 * pt.c (can_complete_type_without_circularity): Add static to
3368 function definition.
3369
594bb0e7
MM
33702002-07-08 Mark Mitchell <mark@codesourcery.com>
3371
3372 * cp-tree.h (have_extern_spec): Declare it
3373 * decl.c (have_extern_spec): Define it.
3374 (start_decl): Eliminate use of used_extern_spec.
3375 (start_function): Likewise.
3376 * parse.y (have_extern_spec): Remove declaration.
3377 (used_extern_spec): Likewise.
3378 (frob_specs): Eliminate use of used_extern_spec.
3379 (.hush_warning): Likewise.
3380
eb8845be
MM
33812002-07-07 Mark Mitchell <mark@codesourcery.com>
3382
3383 * Make-lang.in (cp/parse.o): Depend on decl.h.
3384 * cp-tree.h (do_decl_instantiation): Change prototype.
3385 * parse.y: Include decl.h.
3386 (parse_decl_instantiation): New function.
3387 (explicit_instantiation): Use it.
3388 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3389 and DECLSPECS.
b6ce26ac 3390
78abea27
RS
33912002-07-07 Roger Sayle <roger@eyesopen.com>
3392
3393 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3394 constructor and destructor tests when passed a TEMPLATE_DECL.
3395
98c07d7b
JM
33962002-07-05 Jason Merrill <jason@redhat.com>
3397
212e17fd
JM
3398 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3399 pointers.
3400
98c07d7b
JM
3401 PR optimization/7145
3402 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3403
c6f553d1
NS
34042002-07-05 Nathan Sidwell <nathan@codesourcery.com>
3405
3406 Repair damage on weak-impared targets caused by my previous patch.
3407 * cp-tree.h (import_export_tinfo): Add parameter.
3408 * decl2.c (import_export_tinfo): Add parameter, post adjust
3409 DECL_COMDAT.
3410 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3411 import_export_tinfo.
3412
b2153b98
KL
34132002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3414
3415 PR c++/6944
3416 * init.c (build_aggr_init): Remove qualifiers of init before calling
3417 build_vec_init.
3418 (build_vec_init): Flatten multi-dimensional array during cleanup.
3419 (build_vec_delete_1): Abort if the type of each element is array.
3420
492ff760
GS
34212002-07-03 Graham Stott <graham.stott@btinternet.com>
3422
3423 * pt.c (instantiate_class_template): Fix typo.
3424
04c4491d
KL
34252002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3426
06728f70
KL
3427 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3428 by CVS conflict in my last patch.
04c4491d 3429
17f29637
KL
34302002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3431
3432 PR c++/6716
3433 * pt.c (can_complete_type_without_circularity): New function.
3434 (instantiate_class_template): Use it.
06728f70
KL
3435 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3436 message due to incomplete fields.
17f29637 3437
5d69ba1f
MM
34382002-07-01 Mark Mitchell <mark@codesourcery.com>
3439
3440 PR c++/7112
3441 * mangle.c (write_expression): Add mangling for sizeof when
3442 applied to a type.
3443 * operators.def: Remove stale comment.
3444
d689a8f1
NS
34452002-06-30 Nathan Sidwell <nathan@codesourcery.com>
3446
3447 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3448 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3449 (tinfo_decl_type): Replace with ...
3450 (type_info_ptr_type): ... this.
3451 (import_export_tinfo): Declare.
3452 (tinfo_decl_p): Rename to ...
3453 (unemitted_tinfo_decl_p): ... this.
3454 * decl2.c (import_export_decl): Break out tinfo handling into ...
3455 (import_export_tinfo): ... here. New function.
3456 (finish_file): Adjust.
3457 * rtti.c (TINFO_REAL_NAME): New macro.
3458 (init_rtti_processing): Create the tinfo types.
3459 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3460 (get_tinfo_decl): Adjust.
3461 (get_tinfo_ptr): New function.
3462 (get_type_id): Use it.
3463 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3464 (ptr_initializer): Use get_tinfo_ptr.
3465 (ptm_initializer): Likewise.
3466 (synthesize_tinfo_var): Break into ...
3467 (get_pseudo_ti_init): ... this. Just create the initializer.
3468 (get_pseudo_ti_desc): .. and this.
3469 (create_real_tinfo_var): Remove.
3470 (create_pseudo_type_info): Don't create the vtable decl here.
3471 (get_vmi_pseudo_type_info): Remove.
3472 (create_tinfo_types): Adjust.
3473 (tinfo_decl_p): Rename to ...
3474 (unemitted_tinfo_decl_p): ... here. Adjust.
3475 (emit_tinfo_decl): Adjust. Create the initializer.
3476
5ce49b4b
MM
34772002-06-27 Mark Mitchell <mark@codesourcery.com>
3478
3479 PR c++/6695
3480 * pt.c (tsubst_friend_class): Substitute into the context of the
3481 friend before using it.
3482
88e5899c
MM
34832002-06-26 Mark Mitchell <mark@codesourcery.com>
3484
3485 * cp-tree.h (xref_tag): Change prototype.
3486 (handle_class_head): Likewise.
3487 (build_x_component_ref): Likewise.
3488 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3489 (xref_tag): Take attributes as a separate parameter.
3490 (xref_tag_from_type): Adjust call to xref_tag.
3491 * decl2.c (build_expr_from_tree): Adjust call to
3492 build_x_component_ref.
3493 (handle_class_head): Take attributes as a separate parameter.
3494 * parse.y (parse_xref_tag): New function.
3495 (parse_handle_class_head): Likewise.
3496 (primary): Use parse_xref_tag.
3497 (class_head_decl): Use parse_handle_class_head.
3498 (class_head_defn): Likewise.
3499 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3500 (build_dynamic_cast_1): Likewise.
3501 (create_pseudo_type_info): Likewise.
3502 (emit_support_tinfos): Likewise.
3503 * typeck.c (build_object_ref): Adjust call to
3504 build_x_component_ref.
3505 (build_x_component_ref): Remove protect parameter.
b6ce26ac 3506
da15dae6
MM
35072002-06-25 Mark Mitchell <mark@codesourcery.com>
3508
3509 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3510 * class.c (handle_using_decl): Likewise.
3511 (instantiate_type): Likewise.
3512 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3513 (xref_basetypes): Change prototype.
3514 (begin_mem_initializers): New function.
3515 (get_overloaded_fn): Likewise.
3516 * decl.c (xref_basetypes): Simplify.
3517 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3518 * init.c (build_offset_ref): Likewise.
3519 * parse.y (base_init): Use begin_mem_initializers().
3520 (structsp): Adjust call to xref_basetypes.
3521 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3522 (instantiate_class_template): Adjust call to xref_basetypes.
3523 * semantics.c (begin_mem_initializers): New function.
3524 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3525 (really_overlaoded_fn): Likewise.
3526 (get_overloaded_fn): New function.'
3527 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 3528
5f261ba9
MM
35292002-06-24 Mark Mitchell <mark@codesourcery.com>
3530
3531 * cp-tree.h (SCALAR_TYPE_P): New macro.
3532 (check_for_out_of_scope_variable): New function.
3533 (at_class_scope_p): Likewise.
3534 (finish_fname): Likewise.
3535 * class.c (finish_struct): Use at_function_scope_p.
3536 * decl.c (check_for_out_of_scope_variable): New function, split
3537 out from do_identifier.
3538 (finish_enum): Use at_function_scope_p.
3539 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3540 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
3541 (primary): Use at_function_scope_p.
3542 * search.c (at_class_scope_p): New function.
3543 * semantics.c (finish_fname): Likewise.
3544 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 3545
80b1331c
MM
35462002-06-23 Mark Mitchell <mark@codesourcery.com>
3547
3548 * parse.y (parse_scoped_id): New function.
3549 (primary): Use it.
3550 * cp-tree.h (do_scoped_id): Adjust declaration.
3551 * lex.c (do_scoped_id): Remove call to yylex.
3552 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3553 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3554 expanding it inline.
b6ce26ac 3555
08c7ae5a
MT
35562002-06-23 Matt Thomas <matt@3am-software.com>
3557
3558 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3559 "#if VMS_TARGET".
3560
eb6b51b9
KG
35612002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3562
3563 * mangle.c (integer_type_codes): Const-ify.
3564
aa8dea09
RH
35652002-06-20 Richard Henderson <rth@redhat.com>
3566
3567 PR c++/6747
f989ed67
ZW
3568 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3569 Call put_var_into_stack.
aa8dea09 3570
62c71f4b
KG
35712002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3572
3573 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3574 array size calculation.
3575
aa16c0fa
KL
35762002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3577
3578 PR c++/6892
3579 * pt.c (tsubst_expr): Handle FILE_STMT.
3580
342cea95
KL
35812002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3582
3583 PR c++/6723
3584 * pt.c (lookup_template_class): Don't build complete argument of
3585 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3586 argument.
3587
84d901be
AD
35882002-06-19 Akim Demaille <akim@epita.fr>
3589
3590 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3591 decl.h's TYPENAME.
3592 * spew.c, lex.c: Adjust.
3593 * parse.y (explicit_instantiation): Add empty action to override
3594 the default $$ = $1 where it introduces a type clash.
3595
83b14b88
JM
35962002-06-14 Jason Merrill <jason@redhat.com>
3597
18ba380b
JM
3598 * semantics.c (begin_for_stmt): Push the 'for' scope before
3599 adding the FOR_STMT.
3600
83b14b88
JM
3601 C++ ABI changes.
3602 * class.c (build_base_field): Set DECL_PACKED.
3603 (layout_class_type): Don't use tail padding of PODs.
3604 * mangle.c (write_unqualified_name): Fix template conversion op
3605 mangling.
3606
fd852454
RH
36072002-06-16 Richard Henderson <rth@redhat.com>
3608
3609 PR opt/6793
3610 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3611 after template instantiation.
3612
750491fc
RH
36132002-06-16 Richard Henderson <rth@redhat.com>
3614
3615 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3616
f7d3c5f0
GDR
36172002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
3618
3619 * cp-tree.h (compiler_error): Remove declaration.
3620 * lex.c (compiler_error): Remove definition.
3621
893a047c
SE
36222002-06-14 Steve Ellcey <sje@cup.hp.com>
3623
3624 * g++spec.c (LIBUNWIND): New.
3625 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3626
a6f5e048
RH
36272002-06-13 Jessica Han <jessica@cup.hp.com>
3628
3629 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3630 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3631 (build_vbase_offset_vtbl_entries): Likewise.
3632 * rtti.c (build_headof): Likewise.
3633 (get_tinfo_decl_dynamic): Likewise.
3634 (create_pseudo_type_info): Likewise.
3635
e4dadd2a
SS
36362002-06-12 Stan Shebs <shebs@apple.com>
3637
3638 * mpw-config.in: Remove file, no longer used.
3639 * mpw-make.sed: Ditto.
3640
09e77dee
ZW
36412002-06-07 Zack Weinberg <zack@codesourcery.com>
3642
3643 * decl2.c: Update call to cpp_handle_option.
3644
4bafaa6f
L
36452002-06-07 H.J. Lu (hjl@gnu.org)
3646
3647 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3648
3cb8660c
GDR
36492002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
3650
3651 * error.c (cp_error_at): Fix typo.
3652
47b69537
GDR
36532002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
3654
3655 * error.c (cp_diagnostic_starter): Adjust call.
3656 (maybe_print_instantiation_context): Change prototype to take a
3657 'diagnostic_info *'.
3658 (print_instantiation_full_context): Likewise.
3659 (print_instantiation_partial_context): Likewise.
3660 (cp_diagnostic_starter): Likewise.
3661 (cp_diagnostic_finalizer): Likewise.
3662 (cp_print_error_function): Likewise.
3663 (cp_printer): Take a secondary parameter as a 'text_info *'.
3664 Remove output_state savings. Adjust calls.
3665
e2500fed
GK
36662002-06-03 Geoffrey Keating <geoffk@redhat.com>
3667
3668 * pt.c (inline_parm_levels): Mark for GC.
3669
3670 * mangle.c (start_mangling): Allocate G.substitutions here...
3671 (init_mangle): ... rather than here.
3672 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
3673 * spew.c (yylexstring): Don't use VARRAY_FREE.
3674 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
3675 * decl2.c (pending_statics): Use gengtype to mark.
3676 (deferred_fns): Likewise.
3677 (ssdf_decls): Likewise.
3678 (init_decl2): Delete.
3679 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3680 (cxx_init_decl_processing): Don't call init_decl2.
3681 (cxx_pop_function_context): Don't use VARRAY_FREE.
3682 * cp-tree.h (struct saved_scope): No need for special marking
3683 of varrays.
3684 (struct language_function): Likewise.
3685 (local_classes): Use gengtype to mark.
3686 (init_decl2): Delete prototype.
3687 * class.c (init_class_processing): Don't use
3688 ggc_add_tree_varray_root.
3689 (build_vtbl_initializer): Don't use VARRAY_FREE.
3690
3691 * decl.c (typename_compare): Don't use same_type_p.
3692
3693 * decl.c: Include hashtab.h instead of hash.h.
3694 (typename_hash): Update to use htab_h.
3695 (typename_compare): Likewise.
3696 (typename_htab): Use gengtype to mark.
3697 (build_typename_type): Update to use htab_h.
3698 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3699
3700 * Make-lang.in (gt-cp-tree.h): New rule.
3701 (cp/tree.o): Depend on gt-cp-tree.h.
3702 * config-lang.in (gtfiles): Add cp/tree.c.
3703 * tree.c: Include gt-cp-tree.h.
3704 (list_hash_table): Use gengtype to mark.
3705 (init_tree): Use gengtype to mark trees.
3706
3707 * Make-lang.in (cp/decl.o): Add debug.h dependency.
3708 * call.c (struct z_candidate): Use gengtype.
3709 (USER_CONV_CAND): Use WRAPPER_ZC.
3710 (convert_class_to_reference): Use build_zc_wrapper.
3711 (build_type_conversion_1): Likewise.
3712 (build_over_call): Use WRAPPER_ZC.
3713 (add_warning): Use build_zc_wrapper.
3714 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3715 * cp-tree.h (struct lang_identifier): Use gengtype.
3716 (struct template_parm_index_s): Likewise.
3717 (struct ptrmem_cst): Likewise.
3718 (struct tree_binding): Likewise.
3719 (struct tree_overload): Likewise.
3720 (struct tree_srcloc): Likewise.
3721 (struct tree_wrapper): Likewise. Also modify to have a pointer
3722 to struct z_candidate rather than void.
3723 (enum cp_tree_node_structure_enum): New.
3724 (union lang_tree_node): New.
3725 (cxx_mark_tree): Delete prototype.
3726 (cp_tree_node_structure): New prototype.
3727 (build_ptr_wrapper): Delete prototype.
3728 (build_int_wrapper): Delete prototype.
3729 (build_zc_wrapper): New prototype.
3730 * decl.c: Include debug.h
3731 (cxx_mark_tree): Delete.
3732 (cp_tree_node_structure): New.
3733 * tree.c (build_ptr_wrapper): Delete.
3734 (build_int_wrapper): Delete.
3735 (build_zc_wrapper): New.
3736
3737 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3738 Correct typo. Patch from k_fukui@highway.ne.jp.
3739
3740 * semantics.c (current_stmt_tree): Update for change to
3741 struct language_function.
3742 (finish_mem_initializers): Likewise.
3743 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3744 * cp-tree.h (struct language_function): Rename from
3745 cp_language_function. Change all uses.
3746 (cp_function_chain): Don't need to cast.
3747
3748 * class.c (duplicate_tag_error): Reset discriminator.
3749 (check_bases_and_members): Update for data structure changes.
3750 * cp-tree.h (struct lang_id2): Use gengtype.
3751 (flagged_type_tree): Likewise.
3752 (SET_LANG_ID): Use GGC on struct lang_id2.
3753 (struct cp_language_function): Use gengtype. Remove field
3754 'x_vcalls_possible_p'.
3755 (current_vcalls_possible_p): Delete.
3756 (struct lang_type_header): New.
3757 (struct lang_type_class): Rename from struct lang_type. Include
3758 struct lang_type_header.
3759 (struct lang_type_ptrmem): New.
3760 (struct lang_type): New.
3761 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
3762 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
3763 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3764 (struct lang_decl_flags): Use gengtype. Add discriminators.
3765 (struct lang_decl): Use gengtype. Add and use discriminators.
3766 Update the macros that reference moved fields.
3767 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
3768 (SET_DECL_THUNK_P): Set discriminator too.
3769 (clear_inline_text_obstack): Delete prototype.
3770 (finish_inline_definitions): Delete prototype.
3771 (mark_pending_inlines): Delete prototype.
3772 (lang_check_failed): New prototype.
3773 * decl.c (struct named_label_use_list): Use gengtype.
3774 (struct named_label_list): Likewise.
3775 (mark_binding_level): Delete.
3776 (mark_named_label_lists): Delete.
3777 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3778 (cxx_init_decl_processing): Use generated marker routine.
3779 (begin_destructor_body): Delete dead set to
3780 current_vcalls_possible_p.
3781 (mark_lang_function): Delete.
3782 (mark_cp_function_context): Delete.
3783 (lang_mark_tree): Use generated marker routines.
3784 * decl2.c (start_objects): Set discriminator when setting
3785 GLOBAL_INIT_PRIORITY.
3786 * lex.c (retrofit_lang_decl): Set discriminators.
3787 (copy_lang_type): Update for changes to lang_type structure.
3788 (cp_make_lang_type): Set discriminator.
3789 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
3790 * search.c: Include ggc.h.
3791 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3792 (finish_inline_definitions): Delete.
3793 * spew.c (struct token): Use gengtype.
3794 (struct token_chunk): New.
3795 (struct unparsed_text): Use gengtype. Store tokens in chunks.
3796 (struct feed): Use gengtype.
3797 (feed_obstack): Delete.
3798 (feed): Mark as GC root.
3799 (pending_inlines): Mark as GC root.
3800 (pending_inlines_tail): Likewise.
3801 (processing_these_inlines): Likewise.
3802 (token_obstack): Make static.
3803 (first_token): Likewise.
d30d6e7a 3804 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
3805 (clear_inline_text_obstack): Delete.
3806 (feed_input): Use GC for struct feed. Update for changes to
3807 struct unparsed_text.
3808 (mark_pending_inlines): Delete.
3809 (next_token): Rename from add_token. Change all callers. Update
3810 for changes to struct unparsed_text.
3811 (space_for_token): New.
3812 (remove_last_token): New.
3813 (alloc_unparsed_text): New.
3814 (snarf_block): Take an unparsed_text. Update for changes to struct
3815 unparsed_text.
3816 (snarf_method): Update for changes to struct unparsed_text.
3817 (snarf_defarg): Update for changes to struct unparsed_text.
3818 * tree.c (lang_check_failed): New.
3819
3820 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3821 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3822 (cp/spew.o): Add dependency on gt-<filename>.h.
3823 (cp/decl2.o): Add dependency on gt-<filename>.h.
3824 (cp/call.o): Add dependency on gt-<filename>.h.
3825 (cp/pt.o): Add dependency on gt-<filename>.h.
3826 (cp/repo.o): Add dependency on gt-<filename>.h.
3827 (cp/parse.o): Add dependency on gt-<filename>.h.
3828 * call.c: Use gengtype for roots.
3829 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3830 decl2.c parse.y pt.c repo.c spew.c.
3831 * cp-tree.h: Use gengtype for roots.
3832 (struct saved_scope): Use GGC, gengtype.
3833 (cp_parse_init): Delete prototype.
3834 (init_pt): Delete prototype.
3835 * decl.c: Use gengtype for roots.
3836 (mark_saved_scope): Delete.
3837 (cxx_init_decl_processing): Don't call deleted initilisation
3838 routines.
3839 (signed_size_zero_node): Delete, unused.
3840 * decl.h: Use gengtype for roots.
3841 * decl2.c: Use gengtype for roots.
3842 * lex.h: Use gengtype for roots.
3843 * parse.y: Use gengtype for roots.
3844 (cp_parse_init): Delete.
3845 * pt.c: Use gengtype for roots.
3846 (init_pt): Delete.
3847 * repo.c: Use gengtype for roots.
3848 * spew.c: Use gengtype for roots.
3849
3850 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
3851 (cp/decl.o): Add dependency on gtype-cp.h.
3852 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3853 Include gtype-cp.h. Allow for filename changes.
3854
3855 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3856 (cp/decl.o): Add cp/gt-decl.h dependency.
3857 * config-lang.in (gtfiles): New.
3858 * tree.h: Rename struct binding_level to struct cp_binding_level.
3859 * decl.c: Rename struct binding_level to struct cp_binding_level.
3860 Include cp/gt-decl.h.
3861 (struct cp_binding_level): Use gengtype.
3862 (make_binding_level): Use GGC on struct cp_binding_level.
3863 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3864 (cxx_init_decl_processing): Mark free_binding_level as
3865 deletable.
3866
3867 * decl.c (mark_cp_function_context): Update calling sequence.
3868
3869 * decl.c (start_function): Don't free 'struct
3870 cp_language_function'.
3871 (pop_cp_function_context): Likewise.
3872 (save_function_data): Allocate it using GC.
3873 * semantics.c (genrtl_start_function): Don't free 'struct
3874 cp_language_function'.
3875
8b968bd1
MW
38762002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
3877
3878 * lang-specs.h: Use cpp_debug_options.
3879
11ad4784
ZW
38802002-05-28 Zack Weinberg <zack@codesourcery.com>
3881
3882 * mangle.c, tree.c: Include real.h.
3883 * Make-lang.in: Update dependency lists.
3884
81a75f0f
NB
38852002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
3886
3887 * lex.c: Don't include c-lex.h.
3888 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3889
a97d1398
NB
38902002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
3891
3892 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3893
6f001fdf
RH
38942002-05-22 Richard Henderson <rth@redhat.com>
3895
3896 * decl.c (obscure_complex_init): Check for VAR_DECL
3897 before using DECL_THREAD_LOCAL.
3898
7a1f3f5f
RH
38992002-05-22 Richard Henderson <rth@redhat.com>
3900
3901 * decl.c (check_tag_decl): Handle RID_THREAD.
3902 (obscure_complex_init): Reject run-time init of tls.
3903 (grokvardecl, grokdeclarator): Handle RID_THREAD.
3904 * lex.c (reswords): Add __thread.
3905 (rid_to_yy): Map RID_THREAD to SCSPEC.
3906
e5f3b786
NB
39072002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
3908
3909 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3910 * cp-tree.h (cxx_post_options): Kill.
3911 * cp-lex.c (cxx_post_options): Kill.
3912
3d78f2e9
RH
39132002-05-21 Richard Henderson <rth@redhat.com>
3914
3915 * lex.c (rid_to_yy): Add RID_THREAD.
3916
c8a3d889
AO
39172002-05-21 Alexandre Oliva <aoliva@redhat.com>
3918
3919 * init.c (build_vec_init): Test for trivial copy-assignment when
3920 copy-assigning arrays.
3921
500abaa8
AJ
39222002-05-20 Andreas Jaeger <aj@suse.de>
3923
3924 * init.c (build_default_init): Remove unused variable.
3925
ecc42c14
AO
39262002-05-20 Alexandre Oliva <aoliva@redhat.com>
3927
3928 * call.c (any_strictly_viable): New.
3929 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3930
4e664ef1
KL
39312002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3932
3933 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3934
07782718
KL
39352002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3936
3937 PR c++/186, DR 259
3938 * pt.c (do_decl_instantiation): Don't complain explicit
3939 instantiation after explicit specialization.
3940 (do_type_instantiation): Likewise.
3941
23b4deba
AO
39422002-05-19 Alexandre Oliva <aoliva@redhat.com>
3943
3944 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3945 renamed from...
3946 (complete_type_or_else): ... this. Redefined as macro.
3947 (cxx_incomplete_type_diagnostic): Declare.
3948 (cxx_incomplete_type_error): Define as macro.
3949 * init.c (build_delete): Warn about incomplete types other than
3950 void, and use the built-in operator delete for them.
3951 * typeck.c (complete_type_or_diagnostic): Renamed from
3952 complete_type_or_else. Added warn_only argument, passed to...
3953 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
3954 warnings or errors depending on new warn_only argument. Renamed
3955 from...
3956 (cxx_incomplete_type_error): ... this. New implementation in
3957 terms of cxx_incomplete_type_diagnostic.
3958
b41d214e
JM
39592002-05-18 Jason Merrill <jason@redhat.com>
3960
98c07d7b 3961 PR c++/6611
b41d214e
JM
3962 * decl2.c (import_export_decl): If we clear
3963 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3964
e2005c8d
KL
39652002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3966
3967 PR c++/6620
3968 * pt.c (verify_class_unification): Don't check if PARM is template
3969 parameter dependent. Simplify.
3970 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3971 parameter dependent expression.
3972
ff48be5c
JM
39732002-05-14 Jason Merrill <jason@redhat.com>
3974
3975 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3976 Do set DECL_COMDAT.
3977 (synthesize_tinfo_var): Take the public decl.
3978 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
3979 (emit_tinfo_decl): Adjust. Call import_export_decl.
3980 * decl2.c (import_export_decl): Simplify tinfo decl handling.
3981
94e6e4c4
AO
39822002-05-14 Alexandre Oliva <aoliva@redhat.com>
3983
3984 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 3985 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
3986 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3987 * class.c (check_field_decls): Test non_zero_init.
3988 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3989 zero-to-NULL conversions.
3990 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3991 type that needs zero-initialization without zeros.
3992 (check_initializer_decl): Compute zero-initializer for types
3993 that require a non-trivial one.
3994 * init.c (build_forced_zero_init): New function.
3995 (build_default_init): Use it.
3996 * tree.c (zero_init_p): New function.
3997 * typeck2.c (force_store_init_value): New function.
3998 (process_init_constructor): Create non-trivial zero-initializers
3999 for array members and class fields.
4000
e5f5feea
NB
40012002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
4002
4003 * lang-specs.h: Remove redundant -lang-c++.
4004
f63ab951
JM
40052002-05-13 Jason Merrill <jason@redhat.com>
4006
4007 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4008 (fixed_type_or_null): See through reference vars.
4009 (build_base_path): Vtable contents are constant.
4010 * typeck.c (get_member_function_from_ptrfunc): Likewise.
4011
0d08ea48
JM
40122002-05-12 Jason Merrill <jason@redhat.com>
4013
4014 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4015 structs are safe.
4016
3df89291
NB
40172002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
4018
4019 * cp-tree.h (flag_ansi): Remove.
4020 * decl2.c (flag_ansi): Remove.
4021 (cxx_decode_option): Set flag_iso and flag_undef.
4022
c87978aa
JM
40232002-05-09 Jason Merrill <jason@redhat.com>
4024
4025 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4026 Use subtraction rather than a bitmask to get the index.
4027 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4028
4029 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4030
a5a49440
NB
40312002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
4032
4033 * Make-lang.in (decl2.o): Update.
4034 * cp-tree.h (warn_multichar): Remove.
4035 * decl2.c: Include c-common.h.
4036 (warn_multichar): Remove.
4037
609688f3
JM
40382002-05-03 Jason Merrill <jason@redhat.com>
4039
0abc082a
JM
4040 * tree.c (build_cplus_array_type): Only const and volatile get
4041 special handling.
4042
609688f3
JM
4043 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4044
8b16faa2
MM
40452002-04-30 Mark Mitchell <mark@codesourcery.com>
4046
394ab947 4047 ABI change, returning simple classes from functions.
8b16faa2
MM
4048 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4049 TYPE_HAS_TRIVIAL_INIT_REF is false or
4050 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4051
ac905924
JM
40522002-04-30 Jason Merrill <jason@redhat.com>
4053
2cb008af 4054 PR debug/6436
ac905924
JM
4055 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4056 anonymous class with a typedef if there are attributes.
4057
e6e81f1c 40582002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 4059
e6e81f1c 4060 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 4061
3a73bffb
JJ
40622002-04-29 Jakub Jelinek <jakub@redhat.com>
4063
4064 PR c++/6477
4065 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4066 non-NULL first.
4067
33dd07ee
MM
40682002-04-29 Mark Mitchell <mark@codesourcery.com>
4069
4070 PR c++/6492
4071 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4072 enter that scope before name lookup.
4073
4074 PR c++/6486
4075 * method.c (do_build_copy_constructor): Avoid building
4076 cv-qualified reference types.
500abaa8 4077
4bd7c270
NS
40782002-04-29 Nathan Sidwell <nathan@codesourcery.com>
4079
4080 PR c++/5719
500abaa8 4081 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
4082 by value. operator% should.
4083
45806a3f
FS
40842002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4085
4086 PR c/6343
4087 * decl.c (duplicate_decls): Call merge_weak.
4088
94a50397
RH
40892002-04-26 Richard Henderson <rth@redhat.com>
4090
4091 * parse.y (malloced_yyss, malloced_yyvs): New.
4092 (yyoverflow): Re-add. Set them.
4093 (free_parser_stacks): New.
4094
7d793e9b
MM
40952002-04-26 Mark Mitchell <mark@codesourcery.com>
4096
4097 PR c++/6497
4098 * method.c (do_build_assign_ref): Pass a derivation to
4099 build_method_call when calling base class assignment operators.
4100
bde3c0c0
RH
41012002-04-26 Richard Henderson <rth@redhat.com>
4102
4103 * parse.y (yyoverflow): Revert.
4104
b84a3874
RH
41052002-04-26 Richard Henderson <rth@redhat.com>
4106
4107 PR c/3581
4108 * parse.y (string): Remove. Update all uses to use STRING
4109 instead, and not call combine_strings.
4110 * rtti.c (tinfo_name): Use fix_string_type.
4111 * semantics.c (finish_asm_stmt): Don't call combine_strings.
4112 * spew.c (yylexstring): New.
4113 (read_token): Use it.
4114
6052bef0
RH
41152002-04-25 Richard Henderson <rth@redhat.com>
4116
4117 PR c/2161
4118 * parse.y (yyoverflow): New.
4119
8d1f0f67
JM
41202002-04-25 Jason Merrill <jason@redhat.com>
4121
4122 PR c++/5607
4123 * search.c (check_final_overrider): No longer static.
4124 * class.c (update_vtable_entry_for_fn): Call it.
4125 * cp-tree.h: Adjust.
4126
ff45c01e
NB
41272002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
4128
4129 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4130 * cp-tree.h (cxx_set_yydebug): Die.
4131 * lex.c (YYDEBUG): Get from c-lex.h.
4132 (cxx_set_yydebug): Remove.
4133 * parse.y: Include c-lex.h.
4134 (YYDEBUG): Get from c-lex.h.
4135
a62d375f
MM
41362002-04-24 Mark Mitchell <mark@codesourcery.com>
4137
4138 PR c++/6438.
4139 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4140 void.
4141
349ae713
NB
41422002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
4143
4144 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4145 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4146 Redefine.
4147 * cp-tree.h (cp_attribute_table): Rename.
4148 * decl.c (lang_attribute_table): Remove declaration.
4149 (cxx_init_decl_processing): Don't set it.
4150 * tree.c (cp_attribute_table): Rename.
4151
b602511f
JM
41522002-04-24 Jason Merrill <jason@redhat.com>
4153
985723ce
JM
4154 PR c++/6331
4155 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4156 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
4157 The pedwarn for array assignment is now unconditional.
4158 * tree.c (build_cplus_array_type_1): Still process simple array types
4159 normally in templates.
985723ce 4160
b602511f
JM
4161 PR c++/6395
4162 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4163 stuff for comdats.
4164
29cece2e
JJ
41652002-04-23 Jakub Jelinek <jakub@redhat.com>
4166
4167 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4168 node with attributes.
4169
515387dc
DB
41702002-2-23 David O'Brien <obrien@FreeBSD.org>
4171
4172 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4173 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4174
77adef84
MM
41752002-04-23 Mark Mitchell <mark@codesourcery.com>
4176
4177 PR c++/6256:
4178 * pt.c (tsubst_friend_class): Handle templates with explicit
4179 nested names.
4180
4181 PR c++/6331:
4182 * typeck.c (merge_types): Remember the cv-qualification of pointer
4183 types when merging them.
4184
b03e38e1
NB
41852002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
4186
4187 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4188 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4189 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4190 cxx_mark_function_context): New.
4191 * decl.c (push_cp_function_context, pop_cp_function_context,
4192 mark_cp_function_context): Rename for consistency.
4193 (cxx_init_decl_processing): Don't set old hooks.
4194
ab393bf1
NB
41952002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
4196
4197 * call.c (convert_type_from_ellipsis): Rename, update.
4198 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4199 * cp-tree.h (convert_type_from_ellipsis): Rename.
4200 * decl.c (cxx_init_decl_processing): Don't set hook.
4201
7a228918
NB
42022002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
4203
4204 * call.c (build_new_method_call): Update.
4205 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4206 * cp-tree.h (cxx_incomplete_type_error): New.
4207 * decl.c (grokdeclarator, grokparms): Update.
4208 * decl2.c (check_classfn): Update.
4209 * pt.c (tsubst): Update.
4210 * typeck.c (complete_type_or_else, expr_sizeof,
4211 decay_conversion): Update.
4212 * typeck2.c (incomplete_type_error): Rename.
4213 (add_exception_specifier): Update.
4214
8152c320
JM
42152002-04-18 Jason Merrill <jason@redhat.com>
4216
4217 PR c++/5658
4218 * search.c (setup_class_bindings): A class template qualifies as a
4219 type binding.
4220
32121b96
JJ
42212002-04-17 Jakub Jelinek <jakub@redhat.com>
4222
4223 PR c++/6316
4224 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4225 before expanding.
4226
b2123dc0
MM
42272002-04-16 Mark Mitchell <mark@codesourcery.com>
4228
4229 * init.c (begin_init_stmts): Remove commented out code.
4230 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4231 * semantics.c (begin_gobal_stmt_expr): Adjust call to
4232 expand_start_stmt_expr.
500abaa8 4233
0f268005
MM
42342002-04-15 Mark Mitchell <mark@codesourcery.com>
4235
4236 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4237 dso_handle itself, to __cxa_atexit.
4238
bd6bec6b
GDR
42392002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4240
4241 * error.c (cxx_print_error_function): Adjust call to macros.
4242
0f490a2b
JJ
42432002-04-14 Jakub Jelinek <jakub@redhat.com>
4244
4245 * class.c (layout_virtual_bases): Do all dsize computation on trees.
4246
85b7def6
JM
42472002-04-14 Jason Merrill <jason@redhat.com>
4248
4249 * typeck.c (get_member_function_from_ptrfunc): Don't do
4250 gratuitious division and multiplication on
4251 ptrmemfunc_vbit_in_delta targets.
4252
0481bc21
MM
42532002-04-12 Mark Mitchell <mark@codesourcery.com>
4254
4255 PR c++/5373.
4256 * semantics.c (finish_expr_stmt): Remember the type of the
4257 expression before any conversions are performed.
4258
9928a3d5
MM
42592002-04-12 Mark Mitchell <mark@codesourcery.com>
4260
4261 PR c++/5189.
4262 * call.c (add_template_candidate_real): Do not treat member
4263 templates as copy constructors.
4264
c740732f
MM
42652002-04-12 Mark Mitchell <mark@codesourcery.com>
4266
4267 * decl.c (duplicate_decls): Do not copy the RTL for a variable
4268 declaration if the old variable had an incomplete type and the new
4269 variable does not.
4270 (complete_vars): Do not call layout_decl for completed variables.
4271
4782bd5b
RS
42722002-04-12 Richard Sandiford <rsandifo@redhat.com>
4273
4274 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4275 with an explicit one.
4276 (follow_tag_typedef): New.
4277 (lookup_tag): Use it to extract the tag of an explicit typedef.
4278 (xref_tag): Likewise.
4279
2f4d058f
AH
42802002-04-11 Andrew Haley <aph@redhat.com>
4281
4282 * typeck.c (type_after_usual_arithmetic_conversions):
4283 If two types have the same variant, return immediately.
500abaa8 4284 When two floating-point operands are the same precision:
2f4d058f
AH
4285 convert to float if one of the operands is float;
4286 if neither operand is one of the standard types, return the type
4287 of the first operand.
500abaa8 4288
ba3307c0
NS
42892002-04-10 Nathan Sidwell <nathan@codesourcery.com>
4290
4291 PR c++/5507
4292 * decl.c (make_typename_type): Remove implicit typenameness.
4293
cd6af0c1
JM
42942002-04-09 Jason Merrill <jason@redhat.com>
4295
edf5cd1d
JM
4296 PR optimization/6189
4297 * semantics.c (genrtl_start_function): Don't free
4298 DECL_SAVED_FUNCTION_DATA for inline functions.
4299
cd6af0c1
JM
4300 * init.c (build_member_call): For now, don't convert to
4301 intermediate base if it would cause an error.
4302
224e6091
PC
43032002-04-08 Paolo Carlini <pcarlini@unitus.it>
4304
4305 * parse.y (namespace_qualifier, maybe_identifier,
4306 begin_explicit_instantiation, end_explicit_instantiation,
4307 apparent_template_type, .finish_template_type,
4308 do_id, maybe_init, defarg_again, component_decl_1):
4309 Add ending ';', in accordance with POSIX.
4310
0154eaa8
MM
43112002-04-06 Mark Mitchell <mark@codesourcery.com>
4312
4313 PR c++/5571
4314 * class.c (layout_class_type): Remember incomplete static
4315 variables.
4316 (finish_struct_1): Call complete_vars, not
4317 hack_incomplete_structures.
4318 * cp-tree.h (hack_incomplete_structures): Rename to ...
4319 (complete_vars): ... this.
4320 (struct saved_scope): Remove incomplete.
4321 (namespace_scope_incomplete): Remove.
4322 * decl.c (struct binding_level): Remove incomplete.
4323 (incomplete_vars): New variable.
4324 (mark_binding_level): Don't mark incomplete.
4325 (print_binding_level): Don't print it.
4326 (mark_saved_scope): Don't mark incomplete.
4327 (pushdecl): Use maybe_register_incopmlete_var.
4328 (cxx_init_decl_processing): Register incomplete_vars for GC.
4329 (start_decl_1): Clarify error message.
4330 (hack_incomplete_vars): Remove.
4331 (maybe_register_incomplete_var): New function.
4332 (complete_vars): Likewise.
4333
f62ea157
JM
43342002-04-06 Jason Merrill <jason@redhat.com>
4335
03da5286
JM
4336 PR c++/4934
4337 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4338 set before checking it.
4339
a29e1034
JM
4340 PR c++/525
4341 * init.c (build_member_call): Use build_scoped_ref.
4342 (resolve_offset_ref): Likewise.
4343 * call.c (build_scoped_method_call): Likewise.
500abaa8 4344 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
4345 wrong.
4346 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4347 * cp-tree.h: Adjust.
500abaa8 4348
a29e1034
JM
4349 * init.c (push_base_cleanups): Just use build_scoped_method_call.
4350
f62ea157 4351 PR c++/6179
500abaa8 4352 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
4353 synthesize_exception_spec.
4354
78ef5b89
NB
43552002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
4356
4357 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4358 * cvt.c: Update comment.
4359 * init.c (expand_cleanup_for_base): Update.
4360 * semantics.c (finish_parenthesized_expr): Update.
4361 * typeck.c (cp_truthvalue_conversion): Update.
4362
dffa4176
JM
43632002-04-04 Jason Merrill <jason@redhat.com>
4364
659e5a7a
JM
4365 * semantics.c (finish_eh_cleanup): New fn.
4366 * cp-tree.h: Add prototype.
500abaa8 4367 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
4368 finish_eh_cleanup.
4369 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4370 * cp-tree.h: Remove references.
4371 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4372 * dump.c (cp_dump_tree): Likewise.
4373 * pt.c (tsubst_expr): Likewise.
4374 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4375 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4376 * tree.c (cp_statement_code_p): Likewise.
4377
4378 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4379
4380 PR c++/5636
4381 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4382 cleanup for nrv.
4383
dffa4176
JM
4384 PR c++/5104
4385 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4386 specifiers.
4387 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4388
ef4f94ac
RH
43892002-04-03 Richard Henderson <rth@redhat.com>
4390
4391 * cp-lang.c (cxx_warn_unused_global_decl): New.
4392 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4393
599bba86
NB
43942002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
4395
4396 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4397 * tree.c (init_tree): Don't set hook.
4398
cba2004a
RS
43992002-04-03 Roger Sayle <roger@eyesopen.com>
4400
4401 PR c++/5998:
4402 * decl.c (duplicate_decls): Don't mess with assembler names when
4403 redeclaring builtin functions as static.
4404
dffd7eb6
NB
44052002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4406
4407 * call.c (build_addr_func): Update.
4408 * class.c (resolve_address_of_overloaded_function): Update.
4409 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4410 * cp-tree.h (cxx_mark_addressable): New.
4411 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4412 * decl2.c (build_cleanup): Update.
4413 * except.c (build_throw): Update.
4414 * init.c (resolve_offset_ref): Update.
4415 * pt.c (convert_nontype_argument): Update.
4416 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4417 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4418 unary_complex_lvalue): Update.
4419 (mark_addressable): Rename.
4420
04a9d080
RS
44212002-04-01 Roger Sayle <roger@eyesopen.com>
4422
4423 PR c++/5998:
4424 * decl.c (duplicate_decls): Overwrite the RTL when (and only
4425 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
4426 but follow the SET_DECL_RTL idiom used elsewhere in the function.
4427
ceef8ce4
NB
44282002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4429
4430 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4431 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4432 * decl.c (grokdeclarator): Update.
4433 * mangle.c (write_integer_cst): Update.
4434 * typeck.c (build_binary_op): Update.
4435
48a7a235
NB
44362002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4437
4438 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4439 * lex.c (cxx_init): Don't set hook.
4440
7cb32822
NB
44412002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4442
4443 * Make-lang.in (error.o): Update.
4444 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4445 * cp-tree.h (struct diagnostic_context): Predeclare.
4446 (cxx_print_error_function): New.
4447 * error.c: Include langhooks-def.h.
4448 (lang_print_error_function): Rename. Update.
4449 (init_error): Don't set hook.
4450
b0c48229
NB
44512002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4452
4453 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4454 Redefine.
4455 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4456 * decl.c (finish_enum): Similarly.
4457 * error.c (dump_type): Similarly.
4458 * lex.c (cxx_init): Similarly.
4459 * mangle.c (write_builtin_type): Similarly.
4460 * typeck.c (comptypes): Similarly.
4461
d52e4867
RS
44622002-03-28 Roger Sayle <roger@eyesopen.com>
4463
4464 PR c++/5998:
4465 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4466 in the g++ front-end.
4467 (duplicate_decl): Allow redefinition of anticipated built-ins.
4468 Fix inlining problem by over-writing the old DECL_RTL.
4469 (lookup_namespace_name): Fail to find an identifier in the
4470 specified namespace if its still anticipated.
4471 (builtin_function_1): New function split out from builtin_function
4472 to create a builtin in the current namespace with given context.
4473 (builtin_function): Call builtin_function_1 to define the
4474 appropriate builtins in both the std and global namespaces.
4475 (select_decl): Don't test for anticipated decls here.
4476 (unqualified_namespace_lookup): Instead ignore them whilst
4477 searching through scopes and namespaces.
4478 * decl2.c (do_nonmember_using_decl): If a using declaration
4479 specifies an anticipated built-in function, mark it as no longer
4480 anticipated in that scope.
4481 (ambiguous_decl): Avoid resolving to an anticipated decl.
4482 * lex.c (do_scoped_id): Fail to find an identifier in the global
4483 namespace if its still anticipated.
4484
f1e639b1
NB
44852002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4486
4487 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4488 * cp-tree.h (cp_make_lang_type): Rename.
4489 * lex.c (cp_make_lang_type): Rename.
4490 (make_aggr_type): Update.
4491 * tree.c (init_tree): Don't set make_lang_type_fn.
4492
c7f4981a
JJ
44932002-03-29 Jakub Jelinek <jakub@redhat.com>
4494
4495 PR c++/6073
4496 * class.c (finish_struct_1): Update static field's DECL_MODE even
4497 if its type is a variant of t.
4498
7ffb4fd2
NB
44992002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4500
4501 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4502 * cp-tree.h (cxx_insert_default_attributes): New.
4503 * decl.c (insert_default_attributes): Rename.
4504
cd4e8331
MM
45052002-03-27 Mark Mitchell <mark@codesourcery.com>
4506
4507 PR c++/4884
4508 * call.c (build_op_delete_call): Allow for the fact the placement
4509 may be a COMPOUND_EXPR.
500abaa8 4510
c9d892a8
NB
45112002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4512
4513 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4514 * cp-tree.h (init_cplus_expand): Remove.
4515 (cxx_expand_expr): New.
4516 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4517 fix prototype.
4518 (init_cplus_expand): Remove.
4519 * lex.c (cxx_init): Don't call init_cplus_expand.
4520
46ff5047
MM
45212002-03-26 Mark Mitchell <mark@codesourcery.com>
4522
4523 PR c++/4884.
4524 * init.c (build_new_1): Allow for the fact the result of
4525 build_function_call may be a COMPOUND_EXPR.
4526
6d4c57a0
NS
45272002-03-26 Nathan Sidwell <nathan@codesourcery.com>
4528
4529 PR c++/5682
4530 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4531 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4532 (dfs_skip_nonprimary_vbases_markedp): Remove.
4533 * search.c (get_shared_vbase_if_not_primary): Remove.
4534 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4535 (dfs_skip_nonprimary_vbases_markedp): Remove.
4536 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4537 (dfs_marked_real_bases_queue_p): Likewise.
4538
4f0ade92
NB
45392002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
4540
4541 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4542 * cp-tree.h (cxx_mark_tree): New.
4543 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4544
c88770e9
NB
45452002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
4546
4547 * cp-tree.h (cxx_maybe_build_cleanup): New.
4548 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4549 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4550 * tree.c (build_target_expr): Update.
7b3e5198 4551 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 4552
aaf93206
NB
45532002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
4554
4555 * decl2.c (cxx_decode_option): Handle -E.
4556 * lang-specs.h (default_compilers): Preprocess with cc1plus.
4557 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4558
e756a7da
JJ
45592002-03-23 Jakub Jelinek <jakub@redhat.com>
4560
4561 PR c++/6037
4562 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4563
ea9264e9
GDR
45642002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4565
4566 * error.c (dump_type): Be careful about implicit typenames.
4567
acb044ee
GDR
45682002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4569
4570 PR C++/3656
4571 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 4572 classes.
acb044ee 4573
b216cd4a
ZW
45742002-03-22 Zack Weinberg <zack@codesourcery.com>
4575
4576 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4577 REAL_IS_NOT_DOUBLE.
4578
9181f8db
JK
45792002-03-22 Jeff Knaggs <jknaggs@redhat.com>
4580
cd6af0c1
JM
4581 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4582 an index into the vtable_entry array regardless of
9181f8db
JK
4583 TARGET_PTRMEMFUNC_VBIT_LOCATION.
4584
e019cf95
AH
45852002-03-21 Aldy Hernandez <aldyh@redhat.com>
4586
84d901be 4587 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 4588
43577e6b
NB
45892002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
4590
4591 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4592 insert_block, getdecls, global_bindings_p): New.
4593
8c152bad
NS
45942002-03-20 Nathan Sidwell <nathan@codesourcery.com>
4595
4596 PR c++/4361
4597 * mangle.c (struct globals) Add internal_mangling_p member.
4598 (write_template_param): Do internal mangling, if needed.
4599 (mangle_conv_op_name_for_type): Request internal mangling.
4600
e3fe84e5
JM
46012002-03-20 Jason Merrill <jason@redhat.com>
4602
4603 PR c++/2136
4604 * init.c (build_delete): Check access for a member op delete here.
4605 * decl2.c (delete_sanity): Not here.
4606
ea122333
JM
46072002-03-19 Jason Merrill <jason@redhat.com>
4608
4609 PR c++/5118
4610 * class.c (get_vfield_name): Use the constructor_name.
4611
7afff7cf
NB
46122002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
4613
4614 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4615 * cp-tree.h (lang_printable_name): Rename.
4616 * error.c (lang_decl_name): Use new hook.
4617 * lex.c (cxx_init): Remove old hook.
4618 * pt.c (tsubst_decl): Use new hook.
4619 * tree.c (lang_printable_name): Rename.
4620
ff77ac85
EB
46212002-03-18 Eric Botcazou <ebotcazou@multimania.com>
4622
4623 PR c++/3882
4624 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4625 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4626 only after recording the declaration.
4627
ffd696af
JM
46282002-03-18 Jason Merrill <jason@redhat.com>
4629
097955f2
JM
4630 PR c++/2039
4631 * init.c (resolve_offset_ref): Hand off to build_component_ref.
4632
b663bcf3
JM
4633 PR c++/4222, c++/5995
4634 * call.c (build_over_call): Fix empty class logic.
4635
0f4237c2
JM
4636 PR c++/3870
4637 * cp-tree.h (struct saved_scope): Add last_parms field.
4638 * decl.c (maybe_push_to_top_level): Save last_function_parms.
4639 (pop_from_top_level): Restore it.
4640
001ad76c
JM
4641 PR c++/4377
4642 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
4643 NON_LVALUE_EXPRs.
4644
4645 PR c++/4003
ed2fa432
JM
4646 * pt.c (tsubst_friend_function): Use decl_namespace_context.
4647
ffd696af
JM
4648 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4649 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4650 type with a nontrivial destructor.
4651
f2606a97
JM
46522002-03-17 Jason Merrill <jason@redhat.com>
4653
4654 PR c++/4460
4655 * class.c (build_base_path): Virtual base layout is fixed in
4656 in-charge [cd]tors.
4657
52dabb6c
NB
46582002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
4659
4660 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4661 * parse.y (yyparse): Remove macro.
4662
beb9c8a2
JM
46632002-03-17 Jason Merrill <jason@redhat.com>
4664
4665 PR c++/5757
4666 * init.c (build_new_1): Pass the right pointer to op delete.
4667
5dd236e2
NS
46682002-03-16 Nathan Sidwell <nathan@codesourcery.com>
4669
4670 PR c++/4361
4671 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4672 conversion operators go.
4673 (struct lang_decl_flags): Add template_conv_p and unused
4674 bitfields.
4675 (DECL_TEMPLATE_CONV_FN_P): New macro.
4676 * call.c (build_user_type_conversion_1): Don't check second type
4677 conversion of overload set first.
4678 * class.c (add_method): Make sure templated conversion operators
4679 all end up on slot 2.
4680 * lex.c (do_identifier): A conversion operator token might be
4681 satisfied by a templated conversion operator.
5dd236e2
NS
4682 * pt.c (check_explicit_specialization): Use
4683 CLASSTYPE_FIRST_CONVERSION_SLOT.
4684 (template_parm_this_level_p): New function.
4685 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 4686 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
4687 the first slot.
4688 * typeck.c (build_component_ref): Preserve the type of an
4689 conversion operator name on the overload type.
4690 (build_x_function_call): Retrieve the conversion operator name.
4691
0ba20759
RH
46922002-03-15 Richard Henderson <rth@redhat.com>
4693
4694 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4695
6e4ae815
MM
46962002-03-15 Mark Mitchell <mark@codesourcery.com>
4697
4698 * cp-tree.h (CLEANUP_DECL): Remove.
4699 (CLEANUP_EXPR): Likewise.
4700 * decl.c (destroy_local_var): Simplify.
4701 (maybe_build_cleanup): Tidy.
4702 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4703 * semantics.c (cp_expand_stmt): Likewise.
4704 * cp/tree.c (cp_statement_code_p): Likewise.
4705
5cc90635
JM
47062002-03-15 Jason Merrill <jason@redhat.com>
4707
6da794e8
JM
4708 PR c++/5857
4709 * decl.c (duplicate_decls): Use merge_types instead of common_type.
4710 * typeck.c (common_type): Just hand off to
4711 type_after_usual_arithmetic_conversions and
4712 composite_pointer_type.
4713 (merge_types): New fn.
4714 (commonparms): Use it instead of common_type.
4715 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4716 (composite_pointer_type): Also handle attributes.
4717 * cp-tree.h: Declare merge_types.
4718
5cc90635
JM
4719 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4720 variables.
4721 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4722
ecb0eece
RH
47232002-03-14 Richard Henderson <rth@redhat.com>
4724
4725 * decl.c: Include c-pragma.h.
4726 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4727 * Make-lang.in: Update dependencies.
4728
d3f129b3
JJ
47292002-03-14 Jakub Jelinek <jakub@redhat.com>
4730
f6562b37 4731 PR c++/5908
d3f129b3
JJ
4732 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4733 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4734
049e6879
RS
47352002-03-12 Richard Sandiford <rsandifo@redhat.com>
4736
4737 * mangle.c (write_builtin_type): Handle 128-bit integers even if
4738 they are not a standard integer type.
4739
872c9284
RS
47402002-03-12 Richard Sandiford <rsandifo@redhat.com>
4741
4742 * cp-tree.h (init_init_processing): Remove declaration.
4743 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4744 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4745
2f9834e8
KG
47462002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4747
4748 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4749 Define.
4750 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4751 tree_code_length.
4752 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4753 cplus_tree_code_name): Delete.
4754 (cxx_init): Don't call add_c_tree_codes, instead set
4755 lang_unsafe_for_reeval. Don't try to copy into the various
4756 tree_code arrays.
4757
df867456
NS
47582002-03-12 Nathan Sidwell <nathan@codesourcery.com>
4759
4760 PR c++/5659
4761 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4762 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4763 definitions.
4764
ab04e34b
NS
47652002-03-11 Nathan Sidwell <nathan@codesourcery.com>
4766
4767 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
4768 DR209 is now not a defect.
4769 * cp-tree.h (skip_type_access_control): Remove.
4770 * decl.c (grokdeclarator): Do type access control for friend
4771 declarations.
4772 * semantics.c (decl_type_access_control): Don't reset
4773 current_type_lookups.
4774 (save_type_access_control): Always save the lookups.
4775 (skip_type_access_control): Remove.
4776 (finish_class_definition): Don't change type_lookups.
4777
999cc24c
NS
47782002-03-11 Nathan Sidwell <nathan@codesourcery.com>
4779
4780 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
4781 It is incorrect.
4782 * typeck.c (build_static_cast): Compare non-qualified types
4783 with pointer to member conversions.
4784
61eece67
DN
47852002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
4786 Daniel Berlin <dan@dberlin.org>
4787
4788 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4789 (cxx_get_alias_set): Use it.
4790
644d28d4
KG
47912002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4792
4793 * cp-tree.h (stabilize_expr): Prototype.
4794
7e326356
CR
47952002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
4796
4797 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4798 conditional return void.
4799
24965e7a
NB
48002002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
4801
4802 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4803 * cp-tree.h (cxx_unsave): New.
4804 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4805 (init_tree): Update.
4806
ca7558fc
KG
48072002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4808
4809 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4810 explicit sizeof/sizeof.
4811 * decl2.c (cxx_decode_option): Likewise.
4812 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4813
fd87b7a7
NS
48142002-03-02 Nathan Sidwell <nathan@codesourcery.com>
4815
4816 PR c++/775
4817 * decl.c (lookup_tag): Only reject enum/class mismatch, not
4818 class/union mismatch.
4819 * parse.y (check_class_key): New function.
4820 (structsp): Call it.
4821
bfba94bd
MM
48222002-03-01 Michael Matz <matz@suse.de>
4823
4824 * typeck.c (cp_pointer_int_sum): Complete inner type which is
4825 used later by size_in_bytes().
4826
fdc9bf29
PE
48272002-03-01 Phil Edwards <pme@gcc.gnu.org>
4828
4829 * cp-tree.h: Require __GNUC__ to be #defined.
4830 (build_init): Add missing prototype.
4831
6f30f1f1
JM
48322002-03-01 Jason Merrill <jason@redhat.com>
4833
4834 * except.c: Don't include decl.h or obstack.h. Do include
4835 tree-inline.h.
4836 (build_throw): Destroy temporaries from the thrown
500abaa8 4837 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
4838 temporary directly into the exception object.
4839 (stabilize_throw_expr): New function.
4840 (wrap_cleanups_r): New function.
4841 * tree.c (stabilize_expr): New function.
4842 * init.c (build_init): New function.
4843 * Make-lang.in (cp/except.o): Adjust .h deps.
4844
46cfb101
JM
48452002-02-28 Jason Merrill <jason@redhat.com>
4846
07f521fc
JM
4847 * search.c (lookup_base_r): Don't clear is_non_public just because
4848 we found a friendly scope.
4849
46cfb101
JM
4850 * decl.c (finish_function): Only warn about missing return
4851 statement with -Wreturn-type.
4852
63e1b1c4
NB
48532002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
4854
4855 * class.c (build_clone): Update.
4856 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4857 * cp-tree.h (cxx_dup_lang_specific_decl): New.
4858 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4859 (copy_decl): Update.
4860 * method.c (make_thunk): Update.
4861
f458d1d5
ZW
48622002-02-27 Zack Weinberg <zack@codesourcery.com>
4863
4864 * decl2.c: Delete traditional-mode-related code copied from
4865 the C front end but not used, or used only to permit the
4866 compiler to link.
4867
500abaa8 48682002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
4869
4870 PR c++/4093
4871 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4872 to void.
4873
25c8b645
JJ
48742002-02-22 Jakub Jelinek <jakub@redhat.com>
4875
4876 PR other/5746
4877 * semantics.c (finish_switch_cond): Don't call get_unwidened
4878 if error_mark_node.
4879
4f2b0fb2
NS
48802002-02-22 Nathan Sidwell <nathan@codesourcery.com>
4881
4882 PR c++/2645, DR 295
4883 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4884 tf_keep_type_decl.
4885 (make_typename_type): Use tsubst_flags_t.
4886 * decl.c (make_typename_type): Adjust. Return non-artificial
4887 TYPE_DECLs, if required.
4888 (grokdeclarator): Simplify CVR qualification handling. Allow bad
4889 qualifiers on typedef types.
4890 * decl2.c (handle_class_head): Adjust make_typename_type call.
4891 * parse.y (nested_name_specifier): Likewise.
4892 (typename_sub0): Likewise.
4893 (typename_sub1): Likewise.
4894 * pt.c (convert_template_argument): Adjust make_typename_type
4895 return value.
4896 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 4897 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
4898 on template type parms.
4899 (instantiate_decl): Recheck substitutions to give warnings on bad
4900 qualifications.
4901 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4902
8fc2ba41
AH
49032002-02-21 Aldy Hernandez <aldyh@redhat.com>
4904
84d901be 4905 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 4906
84d901be
AD
4907 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4908 unless DECL_ALWAYS_INLINE.
8fc2ba41 4909
7552da58
JJ
49102002-02-20 Jakub Jelinek <jakub@redhat.com>
4911
4912 * typeck.c (cp_pointer_int_sum): Renamed from
4913 pointer_int_sum, call pointer_int_sum.
4914
00fae85d
JJ
49152002-02-20 Jakub Jelinek <jakub@redhat.com>
4916
4917 * decl.c (duplicate_decls): Return 0 if issued error about
4918 redeclaration.
4919
6ea868b7
JM
49202002-02-19 Jason Merrill <jason@redhat.com>
4921
500abaa8 4922 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
4923 M1AKFvvE, not MK1AFvvE.
4924 * mangle.c (write_function_type): Write cv-quals for member
4925 function type here.
4926 (write_pointer_to_member_type): Not here.
4927
c02f5e29
JM
49282002-02-18 Jason Merrill <jason@redhat.com>
4929
4930 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4931 (do_decl_instantiation): Likewise.
4932
624a5800
CR
49332002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
4934
4935 PR c++/5685
4936 * decl.c (duplicate_decls): Make warning unconditional
4937 if duplicate default argument declarations are present.
4938
f6f8ada3
JJ
49392002-02-17 Jakub Jelinek <jakub@redhat.com>
4940
4941 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4942 shortening.
4943
8d6e459d
NS
49442002-02-15 Nathan Sidwell <nathan@codesourcery.com>
4945
4946 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4947 remove incorrect comment. Move #if 0'd code to common path. Use
4948 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4949
ca4feb54
JM
49502002-02-13 Jason Merrill <jason@redhat.com>
4951
57d5032b
JM
4952 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4953 (finish_function): Don't warn if current_function_returns_null.
4954
bb26522d
JM
4955 * typeck2.c (digest_init): Do handle values of vector type.
4956
ca4feb54
JM
4957 * typeck2.c (digest_init, process_init_constructor): Treat vectors
4958 like arrays.
4959
e6b9638b
JM
49602002-02-11 Jason Merrill <jason@redhat.com>
4961
4962 * parse.y (reserved_declspecs): Don't handle attributes.
4963 (reserved_typespecquals): Handle them here.
4964 * Make-lang.in (parse.c): Adjust expected conflicts.
4965
1cf537c5
JJ
49662002-02-08 Jakub Jelinek <jakub@redhat.com>
4967
4968 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4969 instead of compstmt.
4970 (compstmt_or_stmtexpr): Renamed from compstmt.
4971 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4972
c2ea3a40
NS
49732002-02-07 Nathan Sidwell <nathan@codesourcery.com>
4974
4975 Rename instantiate_type_flags to tsubst_flags_t & expand use.
4976 * cp-tree.h (instantiate_type_flags): Rename to ...
4977 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4978 add tf_warning flag.
4979 (instantiate_type): Adjust prototype.
4980 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4981 do_type_instantiation, cp_build_qualified_type_real): Likewise.
4982 cp_build_qualified_type: Adjust.
4983 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4984 tf_*.
4985 * call.c (standard_conversion): Rename itf_* to tf_*.
4986 (reference_binding): Likewise.
4987 (convert_like_real): Likewise.
4988 * cvt.c (cp_convert_to_pointer): Likewise.
4989 (convert_to_reference): Likewise.
4990 * decl.c (lookup_namespace_name): Use tf_* flags.
4991 (make_typename_type): Likewise.
4992 (grokdeclarator): Likewise.
4993 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4994 (coerce_template_template_parms, convert_template_argument,
4995 coerce_template_parms, maybe_get_template_decl_from_type_decl,
4996 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
4997 instantiate_class_template, tsubst_template_arg_vector,
4998 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 4999 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 5000 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 5001 instantiate_template, fn_type_unification,
500abaa8
AJ
5002 resolve_overloaded_unification, verify_class_unification,
5003 unify, get_bindings_real, do_type_instantiation,
5004 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
5005 tsubst_initializer_list, tsubst_enum,
5006 get_mostly_instantiated_function_type,
5007 invalid_nontype_parm_type_p): Likewise.
5008 * tree.c (cp_build_qualified_type_real): Likewise.
5009 * typeck.c (build_binary_op): Rename itf_* to tf_*.
5010 (build_ptrmemfunc): Likewise.
5011 (convert_for_assignment): Likewise.
5012
d5614afb
NS
50132002-02-07 Nathan Sidwell <nathan@codesourcery.com>
5014
5015 PR c++/109
5016 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 5017 dependent types.
d5614afb
NS
5018 * decl2.c (handle_class_head): Don't push into template parm contexts.
5019 * pt.c (push_template_decl_real): Template parm contexts are never
5020 being defined.
5021
1af6141b
AO
50222002-02-05 Alexandre Oliva <aoliva@redhat.com>
5023
5024 * class.c: Include target.h.
5025 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5026 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5027 bit-field layout.
5028 * Make-lang.in: Adjust deps.
5029
d8a6f584
JM
50302002-02-05 Jason Merrill <jason@redhat.com>
5031
5032 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5033
6f9fdf4d
JJ
50342002-02-04 Jakub Jelinek <jakub@redhat.com>
5035
5036 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5037 (finish_switch_cond): Set SWITCH_TYPE.
5038
14691f8d
RH
50392002-02-04 Richard Henderson <rth@redhat.com>
5040
5041 * method.c (use_thunk): Always initialize the block tree. Reindent.
5042 * semantics.c (expand_body): Emit thunks after function, not before.
5043
e89a6075
JM
50442002-02-04 Jason Merrill <jason@redhat.com>
5045
5046 * decl.c (start_function): Call cplus_decl_attributes immediately
5047 after grokdeclarator.
5048
5049 * decl.c (start_function): Combine DECL_RESULT handling code.
5050
9780c24f
JM
50512002-02-03 Jason Merrill <jason@redhat.com>
5052
5053 * xref.c: Remove.
5054 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5055 (cp/xref.o): Remove dependencies.
5056 * class.c (finish_struct_1, check_methods): Don't call xref fns.
5057 (finish_struct_1): Likewise.
5058 * friend.c (make_friend_class): Likewise.
5059 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5060 * spew.c (read_process_identifier): Likewise.
5061
65f36ac8
JM
50622002-02-01 Jason Merrill <jason@redhat.com>
5063
efe49da0 5064 PR c++/4872
500abaa8 5065 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
5066 no return statement and no abnormal exit.
5067 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5068 (current_function_returns_abnormally): New macro.
5069 * call.c (build_call): Set it.
5070
f2d9afec
JM
5071 * typeck.c (build_component_ref): Always complain about offsetof
5072 constructs on non-PODs. Only make it an error for members of
5073 virtual bases.
5074
65f36ac8
JM
5075 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5076 (dump_function_decl): Always dump parms.
5077
5078 * decl2.c (finish_static_data_member_decl): Complain about a local
5079 class with a static data member.
5080
5081 PR c++/4286
5082 * search.c (lookup_field_1): Don't xref a static data member
5083 just because we looked it up.
5084
98884b26
JM
50852002-01-31 Jason Merrill <jason@redhat.com>
5086
b88c0704
JM
5087 * Make-lang.in (parse.c): Handle .output file.
5088
a588fe25
JM
5089 PR c++/3395
5090 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5091 not TREE_TYPE.
5092 * semantics.c (finish_class_definition): Adjust.
5093
98884b26
JM
5094 Allow attributes in parms and casts.
5095 * parse.y (named_parm): Don't strip attrs.
5096 (declmods): Remove 'attributes' production.
5097 (nonempty_cv_qualifiers): Accept attributes.
5098 (ATTRIBUTE): Give precedence.
5099 * decl.c (groktypename): Handle attributes.
5100 (grokparms): Likewise.
5101
ffdeea47
JJ
51022002-01-29 Jakub Jelinek <jakub@redhat.com>
5103
5104 * decl2.c (cxx_decode_option): Pass 0 as last argument to
5105 cpp_handle_option.
5106 * lang-specs.h: Use cpp_unique_options instead of cpp_options
5107 when used together with cc1_options.
5108
b8b98c66
NS
51092002-01-29 Nathan Sidwell <nathan@codesourcery.com>
5110
5111 PR c++/5132
5112 * typeck2.c (digest_init): Make sure non-array core type is
5113 instantiated.
5114 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5115 constructor, rather than build a new one.
5116 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5117 PURPOSE of constructor elts.
5118
7437519c
ZW
51192002-01-23 Zack Weinberg <zack@codesourcery.com>
5120
5121 * Make-lang.in (parse.c): Adjust expected number of
5122 shift-reduce conflicts.
5123 (decl.o): Depend on diagnostic.h.
5124 * decl.c: Include diagnostic.h.
5125 (grokdeclarator): Check for null pointer.
5126 (finish_function): Don't abort when
5127 current_binding_level->parm_flag != 1, if errors have
5128 occurred; throw away the statement tree and extra binding
5129 levels, and continue.
5130 * lex.c (note_list_got_semicolon): Check for null pointer.
5131 * method.c (hack_identifier): Just return error_mark_node if
5132 value is error_mark_node.
5133 * parse.y (primary: TYPEID(type_id)): No need to use
5134 TYPE_MAIN_VARIANT here.
5135 (handler_seq): Accept an empty list of catch clauses and
5136 generate a fake handler block to avoid later crashes.
5137 (ansi_raise_identifier): Accept the error token too.
5138 * semantics.c (begin_class_definition,
5139 finish_class_definition): Check for error_mark_node.
5140
c588e52b
ZW
51412002-01-23 Zack Weinberg <zack@codesourcery.com>
5142
5143 * typeck2.c (friendly_abort): Delete definition.
5144 * cp-tree.h (friendly_abort): Don't prototype.
5145 (my_friendly_assert): Use fancy_abort.
5146
d55ecaa4
CR
51472002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
5148
5149 * cp-tree.h (my_friendly_abort): Remove.
5150
0a01c261
JJ
51512002-01-23 Jakub Jelinek <jakub@redhat.com>
5152
5153 * spew.c (pending_inlines, pending_inlines_tail,
5154 processing_these_inlines): Make static.
5155 (mark_pending_inlines): Remove static.
5156 (begin_parsing_inclass_inline): If in function, save pi
5157 for GC to cp_function_chain->unparsed_inlines instead.
5158 (process_next_inline): Likewise.
5159 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5160 (mark_pending_inlines): Add prototype.
5161 * decl.c (spew_debug): Remove unused extern.
5162 (mark_lang_function): Call mark_pending_inlines.
5163
a98facb0
CR
51642002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
5165
c588e52b
ZW
5166 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5167 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5168 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
5169 Change my_fancy_abort() to abort().
5170
f893c16e
JM
51712002-01-23 Jason Merrill <jason@redhat.com>
5172
608afcc5
JM
5173 PR c++/5453
5174 * class.c (fixed_type_or_null): Fix thinko.
5175
f893c16e
JM
5176 PR c++/3331
5177 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 5178
b2115575
JM
5179 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5180
f893c16e
JM
51812002-01-22 Jason Merrill <jason@redhat.com>
5182
b5856475
JM
5183 * parse.y (function_body): Suppress the block for the outermost
5184 curly braces.
5185 * decl.c (pushdecl): Don't try to skip it.
5186 (begin_function_body): Keep the block we create, not the next one.
5187 * init.c (emit_base_init): Don't mess with keep_next_level.
5188
6bc34b14
JM
5189 * class.c (build_base_path): Tweak formatting.
5190
3807621a
NS
51912002-01-19 Nathan Sidwell <nathan@codesourcery.com>
5192
5193 Fix regression introduced with patch for c++/775
5194 * parse.y (class_head_defn): Check for template specializations
5195 with a different class-key.
5196
cdd2559c
JM
51972002-01-17 Jason Merrill <jason@redhat.com>
5198
5199 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5200 (begin_function_body): Call them and keep_next_level.
5201 * init.c (emit_base_init): Call keep_next_level.
5202 * semantics.c (setup_vtbl_ptr): Lose.
5203 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5204 (vtbls_set_up_p): Lose.
5205 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5206 * method.c (do_build_copy_constructor): Likewise.
5207 (synthesize_method): Call finish_mem_initializers.
5208 * parse.y (nodecls): Likewise.
ad6b1795
JM
5209
5210 * error.c (dump_type_suffix): Print the exception specs before
5211 recursing.
5212 (dump_function_decl): Here, too.
5213
5214 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5215
195a5def
IR
52162002-01-10 Ira Ruben <ira@apple.com>
5217
6bc34b14 5218 PR c++/907
195a5def
IR
5219 * decl.c (start_method): Handle attrlist.
5220
f21ee879
JJ
52212002-01-10 Jakub Jelinek <jakub@redhat.com>
5222
5223 * decl2.c (max_tinst_depth): Increase default limit to 500.
5224
52252002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
5226
5227 * spew.c (YYCHAR): Uppercase macro parameter and add
5228 parenthesis.
5229 (YYCODE): Likewise.
5230 (NAME): Uppercase macro parameter.
5231
c3af729a
GS
52322002-01-09 Graham Stott <grahams@redhat.com>
5233
6bc34b14 5234 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 5235
c3af729a
GS
5236 * semantics.c (FINISH_COND): Uppercase macro paramaters and
5237 add parenthesis.
5238
91800747
GS
52392002-01-08 Graham Stott <grahams@redhat.com>
5240
5241 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5242 (PALLOC): Uppercase macro parameter and whitespace.
5243 (SALLOC): Uppercase macro parameter.
5244 (SFREE): Uppercase macros parameter, add parenthese and
5245 whitespace.
5246 (STREQL): Uppercase macro parameter and whitespace.
5247 (STRNEQ): Likewise.
5248 (STRLSS): Likewise.
5249 (STRLEQ): Likewise.
5250 (STRGTR): Likewise.
5251 (STRGEQ): Likewise.
5252
5253 * call.c (convert_like): Add parenthesis and wrap.
5254 (convert_like_with_context): Likewise.
5255 (ICS_RANK): Whitespace.
5256 (NEED_TEMPORARY_P): Remove parenthesis.
5257
5258 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5259 whitespace.
5260 (VTT_MARKED_BINFO_P): Likewise.
5261
5262 * decl.c (BINDING_LEVEL): Add parenthesis.
5263 (DEF_OPERATOR): Likewise.
5264
91800747
GS
5265 * mangle.c (MANGLE_TRACE): Add parenthesis.
5266 (MANGLE_TRACE_TREE): Likewise.
5267 (write_signed_number): Likewise.
5268 (write_unsigned_number): Likewise.
5269
5270 * pt.c (ccat): Uppercase macro parameter.
5271 (cat): Likewise
5272
5273 * search.c (SET_BINFO_ACCESS): Add parenthesis.
5274
15eb1e43
JM
52752002-01-07 Jason Merrill <jason@redhat.com>
5276
5277 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5278 to pedwarn.
5279
6bc34b14 5280 PR c++/3536
15eb1e43
JM
5281 * method.c (make_thunk): If !flag_weak, give the thunk the
5282 function's linkage.
5283 (use_thunk): Here, too.
5284
b34c06e3
GS
52852002-01-07 Graham Stott <grahams@redhat.com>
5286
6bc34b14
JM
5287 * error.c: Update copyright date.
5288 (print_scope_operator): Add parenthesis.
5289 (print_left_paren): Likewise.
5290 (print_right_paren): Likewise.
5291 (print_left_bracket): Likewise.
5292 (print_right_bracket): Likewise.
5293 (print_template_argument_list_start): Likewise.
5294 (print_template_argument_list_end): Likewise.
5295 (print_non_consecutive_character): Likewise.
5296 (print_tree_identifier): Likewise.
5297 (print_identifier): Likewise.
5298 (NEXT_CODE): Uppercase macro parameter.
5299 (ident_fndecl): Delete unused.
5300 (GLOBAL_THING): Likewise.
b34c06e3 5301
98e40e83
GS
53022002-01-06 Graham Stott <grahams@redhat.com>
5303
5304 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5305 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5306 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5307 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5308 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5309 (C_IS_RESERVED_WORD): Uppercase macro parameter.
5310 (C_RID_YYCODE) Likewise.
5311 (ptrmem_cst): Use rtx.
5312 (LOCAL_BINDING_P): Add whitespace.
5313 (INHERITED_VALUE_BINDING_P): Likewise.
5314 (BINDING_SCOPE): Wrap long line.
5315 (BINDING_HAS_LEVEL_P): Remove parenthesis.
5316 (BINDING_VALUE): Wrap long line.
5317 (BINDING_TYPE): Whitespace.
5318 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5319 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 5320 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
5321 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5322 (same_type_p): Uppercase macro parameters.
5323 (same_type_ignoring_top_level_qualifiers_p): Likewise.
5324 (OVL_FUNCTION): Wrap long line.
5325 (OVL_CHAIN): Whitespace.
b34c06e3 5326 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
5327 (OVL_NEXT): Whitespace.
5328 (OVL_USED): Likewise.
5329 (IDENTIFIER_TYPE_VALUE): Likewise.
5330 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5331 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5332 (LANG_ID_FIELD): Whitespace.
5333 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5334 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5335 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5336 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5337 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5338 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5339 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5340 (IDENTIFIER_VIRTUAL_P): Likewise.
5341 (IDENTIFIER_OPNAME_P): Likewise.
5342 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5343 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5344 (C_SET_EXP_ORIGINAL_CODE): Likewise.
5345 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5346 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5347 (IS_AGGR_TYPE): Uppercase macro parameter.
5348 (CLASS_TYPE_P): Likewise.
5349 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5350 (IS_AGGR_TYPE_2): Whitespace.
5351 (TAGGED_TYPE_P): Uppercase macro parameter.
5352 (TYPE_BUILT_IN): Whitespace.
5353 (TYPE_FOR_JAVA): Likewise.
5354 (FUNCTION_ARG_CHAIN): Remove parenthesis.
5355 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5356 (FUNCTION_FIRST_USER_PARAM): Likewise.
5357 (PROMOTES_TO_AGGR_TYPE): Whitespace.
5358 (DERIVED_FROM_P): Add parenthesis and wrap.
5359 (UNIQUELY_DERIVED_FROM_P): Likewise.
5360 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5361 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5362 (CLASSTYPE_USE_TEMPLATE): Whitespace.
5363 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5364 (TYPE_GETS_DELETE): Add parenthesis.
5365 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5366 (TYPE_HAS_ASSIGN_REF): Likewise,
5367 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5368 (TYPE_HAS_INIT_REF): Likewise.
5369 (TYPE_HAS_CONST_INIT_REF): Likewise.
5370 (TYPE_BEING_DEFINED): Likewise.
5371 (TYPE_LANG_SPECIFIC): Likewise.
5372 (CLASSTYPE_RTTI): Likewise.
5373 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5374 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5375 (TYPE_OVERLOADS_ARROW): Likewise.
5376 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5377 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5378 (CLASSTYPE_METHOD_VEC): Likewise.
5379 (CLASSTYPE_MARKED_N): Likewise.
5380 (CLASSTYPE_MARKED): Likewise.
5381 (CLASSTYPE_MARKED2): Likewise.
5382 (CLASSTYPE_MARKED3): Likewise.
5383 (CLASSTYPE_MARKED4): Likewise.
5384 (CLASSTYPE_MARKED5): Likewise.
5385 (CLASSTYPE_MARKED6): Likewise.
5386 (SET_CLASSTYPE_MARKED): Whitespace.
5387 (CLEAR_CLASSTYPE_MARKED): Likewise.
5388 (SET_CLASSTYPE_MARKED2): Likewise.
5389 (CLEAR_CLASSTYPE_MARKED2): Likewise.
5390 (SET_CLASSTYPE_MARKED3): Likewise.
5391 (CLEAR_CLASSTYPE_MARKED3): Likewise.
5392 (SET_CLASSTYPE_MARKED4): Likewise.
5393 (CLEAR_CLASSTYPE_MARKED4): Likewise.
5394 (SET_CLASSTYPE_MARKED5): Likewise.
5395 (CLEAR_CLASSTYPE_MARKED5): Likewise.
5396 (SET_CLASSTYPE_MARKED6): Likewise.
5397 (CLEAR_CLASSTYPE_MARKED6): Likewise.
5398 (CLASSTYPE_TAGS): Likewise.
5399 (CLASSTYPE_VSIZE): Likewise.
5400 (CLASSTYPE_VBASECLASSES): Likewise.
5401 (CANONICAL_BINFO): Add parenthesis.
5402 (CLASSTYPE_SIZE(NODE): Likewise.
5403 (CLASSTYPE_SIZE_UNIT): Likewise.
5404 (CLASSTYPE_ALIGN(NODE): Likewise.
5405 (CLASSTYPE_USER_ALIGN): Likewise.
5406 (TYPE_JAVA_INTERFACE): Likewise.
5407 (CLASSTYPE_PURE_VIRTUALS): Likewise.
5408 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5409 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5410 (CLASSTYPE_HAS_MUTABLE): Likewise.
5411 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5412 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5413 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5414 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5415 (CLASSTYPE_INTERFACE_ONLY): Likewise.
5416 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5417 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5418 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5419 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5420 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5421 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5422 (BINFO_UNSHARED_MARKED): Whitespace.
5423 (BINFO_MARKED): Whitespace and wrap.
5424 (SET_BINFO_MARKED): Likewise.
5425 (CLEAR_BINFO_MARKED): Likewise.
5426 (BINFO_VTABLE_PATH_MARKED): Likewise.
5427 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5428 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5429 (BINFO_SUBVTT_INDEX): Remove parenthesis.
5430 (BINFO_VPTR_INDEX): Likewise.
5431 (BINFO_PRIMARY_BASE_OF): Likewise,
5432 (CLASSTYPE_VFIELDS): Whitespace.
5433 (VF_DERIVED_VALUE): Wrap long line.
5434 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
5435 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5436 (DEFARG_POINTER): Whitespace.
5437 (DECL_NEEDED_P): Remove parenthesis.
5438 (DECL_LANGUAGE): Whitespace.
5439 (SET_DECL_LANGUAGE): Add parenthesis.
5440 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5441 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5442 (DECL_IN_AGGR_P): Whitespace.
5443 (DECL_FRIEND_P): Likewise.
5444 (DECL_BEFRIENDING_CLASSES): Likewise.
5445 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5446 (DECL_NONCONVERTING_P): Whitespace.
5447 (DECL_PURE_VIRTUAL_P): Likewise.
5448 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5449 (DECL_PENDING_INLINE_INFO): Whitespace.
5450 (DECL_SORTED_FIELDS): Likewise.
5451 (DECL_DEFERRED_FN): Likewise.
5452 (DECL_TEMPLATE_INFO): Likewise.
5453 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5454 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5455 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5456 (TMPL_ARGS_LEVEL): Likewise.
5457 (SET_TMPL_ARGS_LEVEL): Likewise.
5458 (INNERMOST_TEMPLATE_PARMS): Whitespace.
5459 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5460 (INTEGRAL_CODE_P(CODE): Add parenthesis.
5461 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5462 (TYPE_HAS_CONSTRUCTOR): Whitespace.
5463 (TREE_HAS_CONSTRUCTOR): Likewise.
5464 (TYPE_HAS_DESTRUCTOR): Likewise.
5465 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5466 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5467 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5468 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5469 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5470 (TYPE_PTRMEMFUNC_P): Likewise.
5471 (TYPE_PTRMEMFUNC_FLAG): Likewise.
5472 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5473 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5474 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5475 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5476 (DECL_ACCESS): Whitespace.
5477 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5478 (DECL_GLOBAL_DTOR_P): Likewise.
5479 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 5480 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
5481 (DECL_TEMPLATE_RESULT): Likewise.
5482 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5483 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5484 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5485 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5486 (PRIMARY_TEMPLATE_P): Add parenthesis.
5487 (DECL_USE_TEMPLATE): Whitespace.
5488 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5489 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5490 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5491 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5492 (CALL_DECLARATOR_PARMS): Remove parenthesis.
5493 (CALL_DECLARATOR_QUALS): Likewise.
5494 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5495 (TEMP_NAME_P): Wrap.
5496 (VFIELD_NAME_P): Likewise.
5497 (B_SET): Uppercase macro parameters and add parenthesis.
5498 (B_CLR): Likewise.
5499 (B_TST): Likewise.
5500 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5501 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5502 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5503 (same_or_base_type_p): Likewise.
5504 (cp_deprecated): Likewise.
98e40e83 5505
c28abdf0
RH
55062002-01-05 Richard Henderson <rth@redhat.com>
5507
15eb1e43 5508 * semantics.c (expand_body): Revert last change.
c28abdf0 5509
f11ee281
JM
55102002-01-04 Jason Merrill <jason@redhat.com>
5511
195a5def 5512 PR c++/4122
f11ee281
JM
5513 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5514 lost primary.
5515
5516 * class.c (build_vtbl_initializer): Check for a lost primary
5517 before calculating the vtable entry to throw away.
5518
a4200657
JM
55192002-01-02 Jason Merrill <jason@redhat.com>
5520
5521 * semantics.c (expand_body): Call outlining_inline_function when
5522 emitting an inline function out of line.
5523
40e593d7
NS
55242002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5525
5526 PR c++/5116, c++/764 reversion
5527 * call.c (build_new_op): Revert the instantiations. They are
5528 incorrect.
c588e52b 5529
323728aa
NS
55302002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5531
5532 PR c++/5089
5533 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5534
46c895ac
NS
55352002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5536
5537 PR c++/3716
5538 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5539 (tsubst, case POINTER_TYPE): Handle pmfs here.
5540 (tsubst, case OFFSET_TYPE): Check it is not an offset to
5541 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5542
833aa4c4
NS
55432002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5544
5545 PR c++/35
5546 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5547 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5548 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5549 PARM_DECL.
5550 (tsubst_template_parms): Break up loop statements.
5551 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5552 parm PARM_DECLs don't get promoted.
5553
18976b21
NS
55542002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5555
5556 PR c++/5123
5557 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5558 (build_x_function_call): Cope with a COMPONENT_REF containing a
5559 TEMPLATE_ID_EXPR.
5560
303d1c55
NS
55612002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5562
5563 PR c++/5213
5564 * pt.c (convert_template_argument): Be more careful determining
5565 when RECORD_TYPE templates are or are not templates.
5566
d46a33b3
NS
55672002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5568
5569 PR c++/775
5570 * cp-tree.h (handle_class_head): Adjust prototype.
5571 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5572 parameters. Use for all class heads.
5573 * parse.y (named_class_head_sans_basetype, named_class_head,
5574 named_complex_class_head_sans_basetype,
5575 named_class_head_sans_basetype_defn,
5576 unnamed_class_head): Remove.
5577 (class_head, class_head_apparent_template): Recognize class heads
5578 (class_head_decl, class_head_defn): New reductions. Process class
5579 heads.
5580 (structsp): Adjust class definition and class declaration
5581 reductions.
5582 (maybe_base_class_list): Give diagnostic on empty list.
5583
4542128e
NS
55842002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5585
5586 PR c++/4379
5587 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5588 single non-static member.
5589 (unary_complex_lvalue): If it cannot be a pointer to member, don't
5590 make it so. Check it is not pointer to reference.
5591
903c6234
NS
55922002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5593
5594 PR c++/5132
5595 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5596 are processing a template decl.
5597
477558bf
NS
55982002-01-02 Nathan Sidwell <nathan@codesourcery.com>
5599
5600 PR c++/5116, c++/764
5601 * call.c (build_new_op): Make sure template class operands are
5602 instantiated. Simplify arglist construction.
5603
41f5d4b1
NS
56042001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5605
5606 * call.c (build_user_type_conversion_1): Use my_friendly_assert
5607 rather than if ... abort.
5608 * cvt.c (convert_to_reference): Likewise.
5609 * semantics.c (setup_vtbl_ptr): Likewise.
5610 * pt.c (lookup_template_class): Comment typo.
c588e52b 5611
f3368a90
NS
56122001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5613
5614 PR c++/5125
5615 * pt.c (push_template_decl_real): Make sure DECL has
5616 DECL_LANG_SPECIFIC.
5617
03c9c274
NS
56182001-12-29 Nathan Sidwell <nathan@codesourcery.com>
5619
5620 PR c++/335
5621 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5622 for non-reference fields.
5623 * typeck.c (require_complete_type): Use resolve_offset_ref).
5624
7d8e8369
NS
56252001-12-26 Nathan Sidwell <nathan@codesourcery.com>
5626
5627 PR c++/196
03c9c274 5628 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 5629
a56ca899
NS
56302001-12-24 Nathan Sidwell <nathan@codesourcery.com>
5631
5632 PR c++/160
5633 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5634 up. Don't stabilize_references when initializing a reference.
5635
0b5826ac
KG
56362001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5637
5638 * decl2.c (lang_f_options): Const-ify.
5639
38be19f6
JM
56402001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
5641
5642 * config-lang.in (diff_excludes): Remove.
5643
2e4cf9dc
NS
56442001-12-19 Nathan Sidwell <nathan@codesourcery.com>
5645
5646 PR c++/90
5647 * typeck.c (build_function_call_real): Use original function
5648 expression for errors.
5649
00e4119c
JM
56502001-12-18 Jason Merrill <jason@redhat.com>
5651
195a5def 5652 PR c++/3242
00e4119c
JM
5653 * class.c (add_method): Do compare 'this' quals when trying to match a
5654 used function. Don't defer to another used function.
5655
3ad97789
NS
56562001-12-18 Nathan Sidwell <nathan@codesourcery.com>
5657
5658 * pt.c (instantiate_clone): Remove, fold into ...
5659 (instantiate_template): ... here. Simplify by removing mutual
5660 recursion.
5661 * typeck2.c (build_m_component_ref): Don't cv qualify the function
5662 pointed to by a pointer to function.
5663 * class.c (delete_duplicate_fields_1): Typo.
5664
f21add07
JM
56652001-12-18 Jason Merrill <jason@redhat.com>
5666
5667 C++ ABI change: destroy value arguments in caller.
5668 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5669 create an extra binding level for the parameters.
5670 * decl.c (store_parm_decls): Don't do parameter cleanups.
5671
ea50ad82
NS
56722001-12-18 Nathan Sidwell <nathan@codesourcery.com>
5673
5674 * call.c (build_new_method_call): Use '%#V'.
5675 * error.c (cv_to_string): Use V parameter to determine padding.
5676
3855d0d1
JM
56772001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
5678
5679 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5680 spellings in messages.
5681
33bd39a2
ZW
56822001-12-17 Zack Weinberg <zack@codesourcery.com>
5683
5684 * cp-tree.h: Delete #defines for cp_error, cp_warning,
5685 cp_pedwarn, and cp_compiler_error.
5686 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5687 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5688 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5689 typeck2.c: Change calls to the above macros to use their
5690 language-independent equivalents: error, warning, pedwarn, and
5691 internal_error respectively.
5692
317c26c3
NB
56932001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
5694
5695 * decl2.c (finish_file): Remove back_end_hook.
5696
aba649ba
JM
56972001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
5698
5699 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5700 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5701 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5702
1737c953
JM
57032001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
5704
5705 * lang-options.h: Use American spelling in messages.
5706
4a90862e
JM
57072001-12-13 Jason Merrill <jason@redhat.com>
5708
ade3dc07
JM
5709 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5710
5711 Use cleanups to run base and member destructors.
5712 * init.c (push_base_cleanups): New function, split out from...
5713 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
5714 * decl.c (finish_destructor_body): Move vbase destruction code to
5715 push_base_cleanups.
5716 (begin_function_body, finish_function_body): New fns.
5717 (finish_function): Move [cd]tor handling and call_poplevel to
5718 finish_function_body.
5719 (pushdecl): Skip the new level.
5720 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5721 (setup_vtbl_ptr): Call push_base_cleanups.
5722 * method.c (synthesize_method): Call {begin,end}_function_body.
5723 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5724 * cp-tree.h: Declare new fns.
5725 * parse.y (function_body, .begin_function_body): New nonterminals.
5726 (fndef, pending_inline, function_try_block): Use function_body.
5727 (ctor_initializer_opt, function_try_block): No longer has a value.
5728 (base_init): Remove .set_base_init token.
5729 (.set_base_init, compstmt_or_error): Remove.
5730 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5731
4a90862e
JM
5732 * optimize.c (maybe_clone_body): Fix parameter updating.
5733
a0de9d20
JM
57342001-12-12 Jason Merrill <jason@redhat.com>
5735
5736 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5737 * semantics.c (genrtl_start_function): Don't pass
5738 parms_have_cleanups or push an extra binding level.
5739 (genrtl_finish_function): Lose cleanup_label cruft.
5740
5741 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5742 (ctor_label): Remove.
5743 * semantics.c (finish_return_stmt): Lose ctor_label support.
5744 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 5745 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
5746 dtor_label.
5747
5748 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5749 check for [cd]tors.
5750 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5751
5752 * decl.c (finish_function): Check VMS_TARGET, not VMS.
5753
5754 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5755 (end_cleanup_fn): And poplevel.
5756
5757 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5758 if we're in a template.
5759
dc5c569a
JJ
57602001-12-12 Jakub Jelinek <jakub@redhat.com>
5761
5762 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5763 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5764 THIS_NAME_P): Delete.
5765 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5766 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5767 with internal naming scheme.
5768 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5769
ad1a6d45
NS
57702001-12-12 Nathan Sidwell <nathan@codesourcery.com>
5771
5772 * decl.c (grokdeclarator): Deprecated implicit typename use.
5773
270d8c65
NS
57742001-12-11 Nathan Sidwell <nathan@codesourcery.com>
5775
5776 PR g++/51
5777 * parse.y (frob_specs): Indicate it is a language linkage which
5778 contained the extern.
5779 * decl.c (grokdeclarator): Allow extern language linkage with
5780 other specifiers.
5781
9aaceb4b
NS
57822001-12-10 Nathan Sidwell <nathan@codesourcery.com>
5783
5784 PR g++/72
5785 * decl.c (add_binding): Don't reject duplicate typedefs involving
5786 template parameters.
5787
a23c9413
NB
57882001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
5789
5790 * parse.y, semantics.c: Similarly.
5791
9aaceb4b 57922001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
5793
5794 PR g++/87
5795 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5796 (copy_args_p): Rename to ...
5797 (copy_fn_p): ... here.
5798 (grok_special_member_properties): New function.
5799 (grok_op_properties): Lose VIRTUALP parameter.
5800 (copy_assignment_arg_p): Remove.
5801 * call.c (build_over_call): Use copy_fn_p.
5802 * decl.c (grokfndecl): Reformat. Adjust call to
5803 grok_op_properties.
5804 (copy_args_p): Rename to ...
5805 (copy_fn_p): ... here. Reject template functions. Check for pass
5806 by value.
5807 (grok_special_member_properties): Remember special functions.
5808 (grok_ctor_properties): Don't remember them here, just check.
5809 (grok_op_properties): Likewise.
5810 (start_method): Call grok_special_member_properties.
5811 * decl2.c (grokfield): Likewise.
5812 (copy_assignment_arg_p): Remove.
5813 (grok_function_init): Don't remember abstract assignment here.
5814 * pt.c (instantiate_class_template): Call
5815 grok_special_member_properties.
5816 (tsubst_decl): Adjust grok_op_properties call.
5817
bdd8737f
AH
58182001-12-08 Aldy Hernandez <aldyh@redhat.com>
5819
33bd39a2
ZW
5820 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5821 RID_TYPES_COMPATIBLE_P.
bdd8737f 5822
46af705a
JDA
58232001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
5824
5825 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5826 call to build_aggr_init.
5827 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5828
cb97d97d
NB
58292001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
5830
5831 * parse.y: Replace uses of the string non-terminal with STRING.
5832 Don't perform string concatentaion here.
5833 (string): Remove non-terminal.
5834 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5835
742a37d5
JM
58362001-12-05 Jason Merrill <jason@redhat.com>
5837
5838 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5839 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5840 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5841 * pt.c (push_tinst_level): No longer static.
5842 * cp-tree.h: Declare them.
5843
5844 * init.c (resolve_offset_ref): Don't check access for the base
5845 conversion to access a FIELD_DECL.
5846
5847 * cp-tree.h (TYPE_REFFN_P): New macro.
5848 * decl.c (bad_specifiers): Check it, too.
5849
5850 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5851 on the __*_type_info type if we haven't seen a definition.
5852
26f943fd
NB
58532001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
5854
5855 * decl.c: Include c-common.h.
5856 (shadow_warning): Move to c-common.c.
5857
37a08a29
RK
5858Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5859
5860 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5861
9471d3e2
NS
58622001-12-04 Nathan Sidwell <nathan@codesourcery.com>
5863
5864 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5865
713ccd0c
NS
58662001-12-04 Nathan Sidwell <nathan@codesourcery.com>
5867
5868 PR g++/164
5869 * init.c (sort_base_init): Allow binfos to be directly specified.
5870 * method.c (do_build_copy_constructor): Explicitly convert to the
5871 base instance.
5872 (do_build_assign_ref): Likewise.
5873
591382c4
HPN
58742001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
5875
5876 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5877 declaration and initialization.
5878
c725bd79
NB
58792001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
5880
5881 * typeck2.c: Remove leading capital from diagnostic messages, as
5882 per GNU coding standards.
5883
a5d7c4a3
MK
58842001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
5885
5886 PR c++/3394
9fe038e8
HPN
5887 * decl.c (xref_basetypes): Handle attributes between
5888 'class' and name.
a5d7c4a3 5889
f1880e13
NS
58902001-12-03 Nathan Sidwell <nathan@codesourcery.com>
5891
5892 PR g++/3381
5893 * parse.y (named_complex_class_head_sans_basetype): Add new
5894 reduction.
5895 * Make-lang.in (parse.c): Adjust expected conflict count.
5896
ff668506
JM
58972001-12-03 Jason Merrill <jason@redhat.com>
5898
5899 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5900 immediate binfos for our virtual bases.
5901
1f978f5f
NB
59022001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
5903
5904 * call.c (build_java_interface_fn_ref): Similarly.
5905 * except.c (is_admissible_throw_operand): Similarly.
5906 * init.c (build_java_class_ref): Similarly.
5907 * xref.c (open_xref_file): Similarly.
5908
357351e5
NB
59092001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
5910
5911 * class.c (finish_struct): Remove trailing periods from messages.
5912 * decl.c (check_tag_decl): Similarly.
5913 * lex.c (cxx_set_yydebug): Similarly.
5914 * typeck2.c (friendly_abort): Similarly.
5915
998979e6
MM
59162001-11-29 Mark Mitchell <mark@codesourcery.com>
5917
5918 PR c++/3048
5919 * cp-tree.h (ovl_member): Remove.
33bd39a2 5920 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
5921 specially.
5922 * tree.c (ovl_member): Remove.
5923
7d5b8b11
MM
59242001-11-29 Mark Mitchell <mark@codesourcery.com>
5925
5926 PR c++/4842
5927 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5928 FUNCTION_DECL, as input.
5929 (mark_overriders): Remove.
5930 (warn_hidden): Rework for the new ABI.
5931
b67db529
MM
59322001-11-29 Mark Mitchell <mark@codesourcery.com>
5933
5934 PR c++/3471
5935 * call.c (convert_like_real): Do not build additional temporaries
5936 for rvalues of class type.
5937
2db1ab2d
NS
59382001-11-28 Nathan Sidwell <nathan@codesourcery.com>
5939
5940 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5941 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5942 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5943 (DERIVED_FROM_P): Likewise.
5944 (enum base_access): Renumber, add ba_quiet bit mask.
5945 (get_binfo): Remove.
5946 (get_base_distance): Remove.
5947 (binfo_value): Remove.
5948 (ACCESSIBLY_DERIVED_FROM_P): Remove.
5949 * call.c (standard_conversion): Use lookup_base.
5950 * class.c (strictly_overrides): Likewise.
5951 (layout_virtual_bases): Likewise.
5952 (warn_about_ambiguous_direct_bases): Likewise.
5953 (is_base_of_enclosing_class): Likewise.
5954 (add_vcall_offset_vtbl_entries_1): Likewise.
5955 * cvt.c (build_up_reference): Adjust comment.
5956 * init.c (build_member_call): Reformat.
5957 * search.c (get_binfo): Remove.
5958 (get_base_distance_recursive): Remove.
5959 (get_base_distance): Remove.
5960 (lookup_base_r): Tweak.
5961 (lookup_base): Add ba_quiet control. Complete the types here.
5962 (covariant_return_p): Use lookup_base.
5963 * tree.c (binfo_value): Remove.
5964 (maybe_dummy_object): Use lookup_base.
5965 * typeck.c (build_static_cast): Use lookup_base.
5966 (get_delta_difference): Likewise.
5967 * typeck2.c (binfo_or_else): Use lookup_base.
5968 (build_scoped_ref): Add back error_mark_check.
5969 (build_m_component_ref): Use lookup_base.
5970
d3945f0a
JM
59712001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
5972
5973 * Make-lang.in (c++.generated-manpages): New dummy target.
5974
ac79cd5a
RK
5975Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5976
5977 * Make-lang.in (cp-lang.o): Depends on c-common.h.
5978 * cp-lang.c (c-common.h): Include.
5979 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5980 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5981 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5982
4d6baafa
NB
59832001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
5984
5985 * decl2.c (c_language): Move to c-common.c.
5986 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5987 functions.
5988 (cxx_init): Update.
5989
5b0c5896
JM
59902001-11-26 Jason Merrill <jason@redhat.com>
5991
5992 * call.c (joust): Remove COND_EXPR hack.
5993
4bdd26e6
AH
59942001-11-25 Aldy Hernandez <aldyh@redhat.com>
5995
195a5def 5996 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 5997 space.
33bd39a2 5998
338d90b8
NS
59992001-11-25 Nathan Sidwell <nathan@codesourcery.com>
6000
6001 PR g++/3145
6002 * class.c (build_vbase_pointer): Remove.
6003 (build_vbase_path): Remove.
6004 (build_base_path): New function.
6005 * cp-tree.h (base_access, base_kind): New enumerations.
6006 (build_base_path): Declare.
6007 (convert_pointer_to_real): Remove.
6008 (convert_pointer_to): Remove.
6009 (lookup_base): Declare.
6010 (convert_pointer_to_vbase): Remove.
6011 * call.c (build_scoped_method_call): Use lookup_base &
6012 build_base_path instead of convert_pointer_to_real,
6013 get_base_distance & get_binfo.
6014 (build_over_call): Likewise.
6015 * cvt.c (cp_convert_to_pointer): Likewise.
6016 (convert_to_pointer_force): Likewise.
6017 (build_up_reference): Likewise.
6018 (convert_pointer_to_real): Remove.
6019 (convert_pointer_to): Remove.
6020 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6021 instead of convert_pointer_to_vbase & build_vbase_path.
6022 (emit_base_init): Use build_base_path instead of
6023 convert_pointer_to_real.
6024 (expand_virtual_init): Lose unrequired conversions.
6025 (resolve_offset_ref): Use lookup_base and build_base_path
6026 instead of convert_pointer_to.
6027 * rtti.c (build_dynamic_cast_1): Use lookup_base &
6028 build_base_path instead of get_base_distance & build_vbase_path.
6029 * search.c (get_vbase_1): Remove.
6030 (get_vbase): Remove.
6031 (convert_pointer_to_vbase): Remove.
07f521fc 6032 (lookup_base_r): New function.
338d90b8
NS
6033 (lookup_base): New function.
6034 * typeck.c (require_complete_type): Use lookup_base &
6035 build_base_path instead of convert_pointer_to.
6036 (build_component_ref): Likewise.
6037 (build_x_function_call): Likewise.
6038 (get_member_function_from_ptrfunc): Likewise.
6039 (build_component_addr): Likewise.
6040 * typeck2.c (build_scoped_ref): Likewise.
6041
89d684bb
BM
60422001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6043
6044 * cp-tree.h (CP_TYPE_QUALS): Removed.
6045 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 6046 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 6047 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 6048 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
6049 lang-hooks prototype.
6050 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6051 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6052 CP_TYPE_QUALS changed to cp_type_quals.
6053 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6054 (CXX_C_OBJS): Remove c-dump.o.
6055
12eb9f93 60562001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
6057
6058 PR c++/3637
12eb9f93
MM
6059 * pt.c (lookup_template_class): Ensure that all specializations
6060 are registered on the list corresponding to the most general
6061 template.
6062
60632001-11-20 Mark Mitchell <mark@codesourcery.com>
6064
2d2e8123 6065 * call.c (non_reference): Add documentation.
33bd39a2 6066 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
6067 from conversion operators.
6068 (maybe_handle_ref_bind): Simplify.
6069 (compare_ics): Correct handling of references.
6070
78a40378
MM
60712001-11-19 John Wilkinson <johnw@research.att.com>
6072
6073 * dump.c (dump_op): New function.
6074 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
6075 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6076 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 6077
78a40378
MM
60782001-11-19 Mark Mitchell <mark@codesourcery.com>
6079
6080 PR4629
6081 * semantics.c (finish_sizeof): Make sure that expression created
6082 while processing a template do not have a type.
6083 (finish_alignof): Likewise.
6084 * typeck.c (c_sizeof): Likewise.
6085 (expr_sizeof): Likewise.
6086
22703ccc
NB
60872001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
6088
6089 * lex.c (cxx_finish): Call c_common_finish.
6090 (finish_parse): Remove.
6091
b3faacfd
KL
60922001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6093
6094 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6095 when displaying error message about missing array bounds.
6096
873ff987
KL
60972001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6098
6099 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6100 CONST_CAST_EXPR.
6101 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6102
08f3a861
NB
61032001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
6104
6105 * cp-tree.h (print_class_statistics): Restore.
6106
8a2b77e7
JM
61072001-11-15 Jason Merrill <jason@redhat.com>
6108
3b1a4132
JM
6109 * method.c (use_thunk): Don't emit debugging information for thunks.
6110
8a2b77e7
JM
6111 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6112 * decl.c (make_typename_type): Handle getting a class template.
6113 * search.c (lookup_field_r): A class template is good enough for
6114 want_type.
6115
6116 * call.c (convert_like_real): Only use cp_convert for the bad part.
6117 (standard_conversion): Also allow bad int->enum.
6118 * typeck.c (ptr_reasonably_similar): Also allow functions to
6119 interconvert. Pointers to same-size integers are reasonably
6120 similar.
6121
6122 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6123 give it void type.
6124
36a68fe7
NS
61252001-11-15 Nathan Sidwell <nathan@codesourcery.com>
6126
6127 PR g++/3154
6128 * init.c (sort_base_init): Remove unreachable code.
6129 (expand_member_init): Adjust comment to reflect reality. Simplify
6130 and remove unreachable code.
6131
f5e99456
NB
61322001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
6133
6134 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6135 (cxx_init): Update prototype.
6136 * decl.c (init_decl_processing): Rename. Move null node init
6137 to its creation time.
6138 * lex.c (cxx_init_options): Update.
6139 (cxx_init): Combine with old init_parse; also call
6140 cxx_init_decl_processing.
6141
fe5b6c1c
RS
61422001-11-14 Richard Sandiford <rsandifo@redhat.com>
6143
8a2b77e7
JM
6144 * decl.c (check_initializer): Try to complete the type of an
6145 array element before checking whether it's complete. Don't
6146 complain about arrays with complete element types but an
6147 unknown size.
6148 (cp_finish_decl): Build the hierarchical constructor before
6149 calling maybe_deduce_size_from_array_init.
fe5b6c1c 6150
77bd67cb
JM
61512001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
6152
6153 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6154
b02922a4
NS
61552001-11-13 Nathan Sidwell <nathan@codesourcery.com>
6156
6157 PR g++/4206
6158 * parse.y (already_scoped_stmt): Remove.
6159 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6160
abfc1ef6
L
61612001-11-12 H.J. Lu <hjl@gnu.org>
6162
195a5def 6163 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
6164 function is always `true'.
6165
5d69f816
NB
61662001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6167
6168 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6169 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6170 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6171 * cp-tree.h (print_class_statistics): Remove.
6172 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6173 cxx_print_identifier, cxx_set_yydebug): New.
6174 * lex.c (set_yydebug): Rename c_set_yydebug.
6175 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6176 lang_print_xnode): Rename.
6177 * tree.c (print_lang_statistics): Rename.
6178
4fdc14ca
KG
61792001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6180
6181 * class.c (dump_array): Fix format specifier warning.
6182
3ac88239
NB
61832001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6184
6185 * cp-lang.c (LANG_HOOKS_NAME): Override.
6186 (struct lang_hooks): Constify.
6187 * lex.c (cxx_init_options): Update.
6188 (lang_identify): Remove.
33bd39a2 6189 * parse.y (language_string): Remove.
3ac88239 6190
b21d216c
AF
61912001-11-08 Andreas Franck <afranck@gmx.de>
6192
6193 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6194 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6195 suggested by autoconf.
6196 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6197 (c++.install-common): Use the transformed target alias names.
6198
d23c55c2
NB
61992001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6200
6201 * Make-lang.in: Update.
6202 * cp-lang.c: Include langhooks-def.h.
6203
2a2b1d56
KL
62042001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6205
6206 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6207
76648a8b
KG
62082001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6209
6210 * lex.c (copy_lang_type): Add static prototype.
6211
fccef71e
KL
62122001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6213
6214 * pt.c (unify): Handle SCOPE_REF.
6215
19989812
JJ
62162001-11-01 Jakub Jelinek <jakub@redhat.com>
6217
6218 * tree.c (cp_copy_res_decl_for_inlining): Adjust
6219 DECL_ABSTRACT_ORIGIN for the return variable.
6220
5b7874aa
ZW
62212001-10-31 Zack Weinberg <zack@codesourcery.com>
6222
6223 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6224
306ef644
JM
62252001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
6226
6227 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6228 semantics.c, spew.c: Fix spelling errors.
6229
76543000
KL
62302001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6231
6232 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6233
37207ee7
ZW
62342001-10-25 Zack Weinberg <zack@codesourcery.com>
6235
6236 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6237 pop_everything.
6238
8ac61af7
RK
6239Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6240
6241 * cp-lang.c (cxx_get_alias_set): New function.
6242 Point LANG_HOOKS_GET_ALIAS_SET to it.
6243
f1e09fa2 62442001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
6245
6246 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6247 * cp-tree.h (make_unbound_class_template): Prototype new function.
6248 * decl.c (make_unbound_class_template): New function.
6249 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6250 * error.c (dump_type): Likewise.
6251 * mangle.c (write_type): Likewise.
6252 * parse.y (template_parm): Likewise.
6253 (template_argument): Use make_unbound_class_template.
6254 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6255 (tsubst): Likewise.
6256 (tsubst_copy): Likewise.
6257 (unify): Likewise.
6258 * tree.c (walk_tree): Likewise.
6259 * typeck.c (comptypes): Likewise.
6260
0df6c2c7
KG
62612001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6262
6263 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6264 extra calls into fewer ones.
6265
97055d5c
AO
62662001-10-18 Alexandre Oliva <aoliva@redhat.com>
6267
6268 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6269 Warn when merging inline with attribute noinline.
6270 (start_decl, start_function): Warn if inline and attribute
6271 noinline appear in the same declaration.
6272
b5823a44
L
62732001-10-16 H.J. Lu <hjl@gnu.org>
6274
6275 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6276 for tree checking disabled.
6277
dc8ad298
HPN
62782001-10-16 Hans-Peter Nilsson <hp@axis.com>
6279
6280 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6281 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6282
d9f818d9
RS
62832001-10-15 Richard Sandiford <rsandifo@redhat.com>
6284
6285 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6286 (unify): Only handle MINUS_EXPR specially if the above flag is set
6287 and the subtracted constant is 1. Clear the flag on recursive calls.
6288 Set it when unifying the maximum value in an INTEGER_TYPE's range.
6289
e1be26f4
RS
62902001-10-15 Richard Sandiford <rsandifo@redhat.com>
6291
6292 * decl.c (bad_specifiers): Don't allow exception specifications
6293 on any typedefs.
6294
a5da89c6
NB
62952001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
6296
6297 * cp/lex.c (init_cp_pragma): Similarly.
6298
4f96ff63
KL
62992001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6300
6301 * pt.c (lookup_template_class): Build complete template arguments
6302 for BOUND_TEMPLATE_TEMPLATE_PARM.
6303
11e74ea6
KL
63042001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6305
6306 * cp-tree.h (TYPE_BINFO): Update comment.
6307 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6308 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6309 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6310 (copy_type): Prototype new function.
6311 * lex.c (copy_lang_decl): Gather tree node statistics.
6312 (copy_lang_type): New function.
6313 (copy_type): Likewise.
6314 (cp_make_lang_type): Create lang_type for
6315 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
6316 and BOUND_TEMPLATE_TEMPLATE_PARM.
6317 * pt.c (tsubst): Use copy_type instead of copy_node.
6318 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6319
f5d47abd
KL
63202001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6321
6322 * pt.c (determine_specialization): Ignore functions without
6323 DECL_TEMPLATE_INFO.
6324
e60505a5
NS
63252001-10-12 Nathan Sidwell <nathan@codesourcery.com>
6326
6327 PR g++/4476
6328 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6329
6f32162a
JM
63302001-10-11 Jason Merrill <jason_merrill@redhat.com>
6331
6332 * typeck2.c (store_init_value): Don't re-digest a bracketed
6333 initializer.
6334
6335 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6336 ANON_AGGR_TYPE_P.
6337
4a8d0c9c
RH
63382001-10-11 Richard Henderson <rth@redhat.com>
6339
6340 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6341 of an asm statement.
6342 (build_vtbl_ref_1): Split out from build_vtbl_ref.
6343 (build_vfn_ref): Use it to handle vtable descriptors before
6344 calling build_vtable_entry_ref.
6345 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6346
84b72302
RH
63472001-10-10 Richard Henderson <rth@redhat.com>
6348
37207ee7 6349 * parse.y (asm_operand): Allow named operands.
84b72302 6350 * semantics.c (finish_asm_stmt): Tweek for changed location
4639c5c6 6351 of the operand constraint.
84b72302 6352
48c8b0be 63532001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
6354
6355 * call.c (standard_conversion): Add bad conversion between
6356 integers and pointers.
6357 (convert_like_real): Don't use convert_for_initialization for bad
6358 conversions; complain here and use cp_convert.
6359 (build_over_call): Don't handle bad conversions specially.
6360 (perform_implicit_conversion): Allow bad conversions.
6361 (can_convert_arg_bad): New fn.
6362 * cp-tree.h: Declare it.
6363 * typeck.c (convert_for_assignment): Use it.
6364 (ptr_reasonably_similar): Any target type is similar to void.
6365
19551f29
AO
63662001-10-08 Alexandre Oliva <aoliva@redhat.com>
6367
6368 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6369 (cp/cp-lang.o): New rule.
6370 * cp-tree.h: Declare hooks.
6371 * tree.c: Make hooks non-static.
6372 (init_tree): Don't initialize hooks here.
6373 * lex.c: Likewise. Move definition of lang_hooks to...
6374 * cp-lang.c: ... new file.
6375
31ed8fea
RH
63762001-10-08 Richard Henderson <rth@redhat.com>
6377
6378 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6379 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6380
8b60264b
KG
63812001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6382
6383 * class.c (build_vtable_entry_ref): Const-ify.
6384 * decl.c (predefined_identifier,
37207ee7 6385 initialize_predefined_identifiers): Likewise.
8b60264b
KG
6386 * init.c (build_new_1): Likewise.
6387 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6388 Likewise.
6389
bc4c7159
AO
63902001-10-05 Alexandre Oliva <aoliva@redhat.com>
6391
6392 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6393 (INSNS_PER_STMT): Likewise.
6394 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6395 (copy_body, initialize_inlined_parameters): Likewise.
6396 (declare_return_variable, inlinable_function_p): Likewise.
6397 (expand_call_inline, expand_calls_inline): Likewise.
6398 (optimize_inline_calls, clone_body): Likewise.
6399 * tree.c (walk_tree): Moved to ../tree-inline.c.
6400 (walk_tree_without_duplicates): Likewise.
6401 (copy_tree_r, remap_save_expr): Likewise.
6402
25af8512
AO
64032001-10-04 Alexandre Oliva <aoliva@redhat.com>
6404
6405 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6406 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6407 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6408 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6409 (flag_inline_trees): Moved declaration to ../tree-inline.h.
6410 (walk_tree): Moved declaration to ../tree-inline.h.
6411 (walk_tree_without_duplicates, copy_tree_r): Likewise.
6412 (remap_save_expr): Likewise.
6413 * decl.c: Include tree-inline.h.
6414 (lang_mark_tree): Don't mark inlined_fns.
6415 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6416 * optimize.c: Include tree-inline.h.
6417 (optimize_inline_calls): Move declaration to ../tree.h, as
6418 non-static.
6419 (remap_decl): Use language-independent constructs and hooks.
6420 (remap_block, copy_body_r, declare_return_variable): Likewise.
6421 (inlinable_function_p): Likewise. Don't test for
6422 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6423 no longer language-specific.
6424 (optimize_inline_calls): Likewise. Make it non-static. Moved
6425 call of dump_function to...
6426 (optimize_function): Here...
6427 (clone_body): New function, extracted from...
6428 (maybe_clone_body): ... here. Build decl_map locally and pass
6429 it on to clone_body.
6430 * pt.c, semantics.c: Include tree-inline.h.
6431 * tree.c: Likewise.
6432 (cp_walk_subtrees): New language-specific hook for tree inlining.
6433 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6434 cp_is_overload_p, cp_auto_var_in_fn_p,
6435 cp_copy_res_decl_for_inlining): Likewise.
6436 (walk_tree): Move language-specific constructs into...
6437 (cp_walk_subtrees): this new function.
6438 (copy_tree_r): Use language-independent constructs and hooks.
6439 (init_tree): Initialize tree inlining hooks.
6440 (remap_save_expr): Adjust prototype so that the declaration
6441 does not require the definition of splay_tree.
6442
6a4af81f
JDA
64432001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
6444
6445 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6446 to build the declaration instead of the declaration itself.
6447
0caee1c6
JM
64482001-10-02 Jason Merrill <jason_merrill@redhat.com>
6449
48c8b0be
JM
6450 * decl2.c (cxx_decode_option): Add 'else'.
6451
0caee1c6
JM
6452 * spew.c (end_input): No longer static.
6453 * cp-tree.h: Declare it.
6454 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6455
80a497e4
JM
64562001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
6457
6458 * call.c (build_over_call), typeck.c (build_function_call_real):
6459 Pass type attributes to check_function_format rather than name or
6460 assembler name. Don't require there to be a name or assembler
6461 name to check formats.
6462
6431177a
JM
64632001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
6464
6465 * decl.c (init_decl_processing): Don't call
6466 init_function_format_info. Initialize lang_attribute_table
6467 earlier.
6468 (builtin_function): Call decl_attributes.
6469 (insert_default_attributes): New.
6470
55b3d665
JM
64712001-10-01 Jason Merrill <jason_merrill@redhat.com>
6472
6473 * decl.c (grokdeclarator): Copy array typedef handling from C
6474 frontend.
6475
6476 * decl.c (grokdeclarator): Copy too-large array handling from C
6477 frontend.
6478
9f57ca19
AO
64792001-09-29 Alexandre Oliva <aoliva@redhat.com>
6480
6481 * config-lang.in (target_libs): Added target-gperf, so that we
6482 don't try to build it if C++ is disabled.
6483
749ced52
ZW
64842001-09-23 Zack Weinberg <zack@codesourcery.com>
6485
6486 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6487 (cp/errfn.o): Delete rule.
6488 (cp/error.o): Depend on flags.h.
6489 * errfn.c: Delete file.
6490 * cp-tree.h: Declare warn_deprecated. Remove definitions of
6491 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6492 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6493 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6494 internal_error respectively. Make cp_deprecated into a macro.
6495 Don't define cp_printer typedef or declare cp_printers.
6496 * error.c: Include flags.h.
6497 Delete: struct tree_formatting_info, print_function_argument_list,
6498 print_declaration, print_expression, print_function_declaration,
6499 print_function_parameter, print_type_id, print_cv_qualifier_seq,
6500 print_type_specifier_seq, print_simple_type_specifier,
6501 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6502 print_parameter_declaration_clause, print_exception_specification,
6503 print_nested_name_specifier, and definition of cp_printers.
6504 (locate_error): New function.
6505 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6506 rewritten in terms of locate_error and diagnostic.c.
6507 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6508 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
6509 (init_error): Adjust to match.
6510
bb9f8221
RK
6511Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6512
6513 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6514
67231816
RH
65152001-09-21 Richard Henderson <rth@redhat.com>
6516
6517 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6518 (build_vtbl_initializer): Likewise.
6519 (build_vfn_ref): New.
6520 * cp-tree.h: Declare it.
6521 * call.c (build_over_call): Use it.
6522 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6523 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6524
c9574c9f
R
6525Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
6526
6527 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6528
91d231cb
JM
65292001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
6530
6531 Table-driven attributes.
6532 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6533 * decl2.c (cplus_decl_attributes): Only take one attributes
6534 parameter.
6535 * cp-tree.c (cplus_decl_attributes): Update prototype.
6536 * class.c (finish_struct), decl.c (start_decl, start_function),
6537 decl2.c (grokfield), friend.c (do_friend), parse.y
6538 (parse_bitfield): Update calls to cplus_decl_attributes.
6539 * decl.c (grokdeclarator): Take a pointer to a single ordinary
6540 attribute list.
6541 * decl.h (grokdeclarator): Update prototype.
6542 * decl2.c (grokfield): Take a single ordinary attribute list.
6543 * friend.c (do_friend): Likewise.
6544 * decl.c (shadow_tag, groktypename, start_decl,
6545 start_handler_parms, grokdeclarator, grokparms, start_function,
6546 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6547 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6548 (process_template_parm, do_decl_instantiation): Pass single
6549 ordinary attribute lists around.
6550 * decl.c (grokdeclarator): Correct handling of nested attributes.
6551 Revert the patch
6552 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
6553 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6554 not the left.
6555 .
6556 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6557 (cp_attribute_table): Declare.
6558 * decl.c (valid_lang_attribute): Don't define.
6559 (lang_attribute_table): Define.
6560 (init_decl_processing): Initialize lang_attribute_table instead of
6561 valid_lang_attribute.
6562 * tree.c (cp_valid_lang_attribute): Remove.
6563 (handle_java_interface_attribute, handle_com_interface_attribute,
6564 handle_init_priority_attribute): New functions.
6565 (cp_attribute_table): New array.
6566 * decl2.c (import_export_class): Don't use
6567 targetm.valid_type_attribute.
6568
a1bda5f1
GDR
65692001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6570
e6b9638b
JM
6571 * Make-lang.in (cp/error.o): Depend on real.h
6572 * error.c: #include "real.h"
a1bda5f1 6573
cb6edbcb
KG
65742001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6575
6576 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6577 xmalloc/strcpy/strcat.
6578
83182544
KG
65792001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6580
6581 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6582 Const-ification.
6583 * pt.c (tsubst_decl): Likewise.
6584
40008eda
KG
65852001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6586
6587 * decl2.c (lang_f_options): Const-ification.
6588 * lex.c (cplus_tree_code_name): Likewise.
6589 * spew.c (yyerror): Likewise.
6590
39e78d8b
NS
65912001-09-06 Nathan Sidwell <nathan@codesourcery.com>
6592
6593 PR c++/3986
6594 * class.c (force_canonical_binfo_r): Check & move an indirect
6595 primary base first.
6596 (force_canonical_binfo): Check that it's not already
6597 canonical.
6598 (mark_primary_virtual_base): Remove BINFO parameter.
6599 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6600
6d0a3f67
NS
66012001-09-06 Nathan Sidwell <nathan@codesourcery.com>
6602
6603 Remove TYPE_NONCOPIED_PARTS.
6604 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6605 CLASSTYPE_PURE_VIRTUALS.
6606 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6607 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 6608 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
6609 (finish_struct_1): ... call it here.
6610
4f8e1232
MM
66112001-09-04 Mark Mitchell <mark@codesourcery.com>
6612
6613 * decl.c (duplicate_decls): Remove code deadling with
6614 DECL_SAVED_INSNS.
6615 * decl2.c (finish_file): Likewise.
6616 * pt.c (instantiate_decl): Likewise.
6617 * semantics.c (expand_body): Don't defer local functions if
6618 they wouldn't be deferred for some other reason. Don't
6619 generate RTL for functions that will not be emitted.
6620 (genrtl_start_function): Remove code deadling with
6621 DECL_SAVED_INSNS.
6622 (genrtl_finish_function): Likewise.
6623
da86f08f
NS
66242001-09-04 Nathan Sidwell <nathan@codesourcery.com>
6625
6626 PR c++/4203
6627 * call.c (build_over_call): Do not optimize any empty base
6628 construction.
6629
38066e83
KL
66302001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6631
6632 * error.c (dump_template_decl): Output template parameters
6633 together with their specifiers.
6634 Output `class' prefix for template template parameter.
6635 (dump_decl): Fix formatting.
6636
598e9ba5 66372001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 6638
598e9ba5
KG
6639 * optimize.c (inlinable_function_p): Allow only smaller single
6640 functions. Halve inline limit after reaching recursive limit.
749ced52 6641
f232e4a5
JR
66422001-08-30 Joern Rennecke <amylaar@redhat.com>
6643 Jason Merrill <jason_merrill@redhat.com>
6644
6645 * class.c (build_vtable_entry_ref): Subtract in char*, not
6646 ptrdiff_t.
6647
0213a355
JM
66482001-08-23 Jason Merrill <jason_merrill@redhat.com>
6649
6650 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6651 (build_cplus_array_type): Use cp_build_qualified_type, not
6652 TYPE_MAIN_VARIANT, to get an unqualified version.
6653
6654 * decl2.c (grok_alignof): Lose.
6655 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6656 * typeck.c (c_alignof): Lose.
6657 * semantics.c (finish_sizeof, finish_alignof): New.
6658 * parse.y: Use them.
6659 * cp-tree.h: Declare them.
6660
fd10dd09
JM
66612001-08-22 Jason Merrill <jason_merrill@redhat.com>
6662
6663 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6664 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6665 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6666
baeb4732
JJ
66672001-08-19 Jakub Jelinek <jakub@redhat.com>
6668
6669 * typeck2.c (add_exception_specifier): Only require complete type if
6670 not in processing template declaration.
6671
1c0cc57e
KG
66722001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6673
6674 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6675 GNU_xref_start_scope and GNU_xref_end_scope.
6676
6677 * tree.c (TYPE_HASH): Moved to ../tree.h.
6678
9a52d09b
MM
66792001-08-16 Mark Mitchell <mark@codesourcery.com>
6680
6681 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6682 on COMPOUND_EXPRs.
6683
b5d1cbd2
RH
66842001-08-14 Richard Henderson <rth@redhat.com>
6685
6686 * class.c, cp-tree.h (build_vfn_ref): Remove.
6687 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6688
63d6f87a
MM
66892001-08-13 Mark Mitchell <mark@codesourcery.com>
6690
6691 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6692 empty class assignment as having side-effects to avoid
6693 spurious warnings.
6694
e78d8e51
ZW
66952001-08-13 Zack Weinberg <zackw@panix.com>
6696
6697 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6698 * except.c: Include libfuncs.h.
6699
a60af04a
GDR
67002001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6701
6702 * decl.c (grokdeclarator): Clarify diagnostic message.
6703
3605b283
KL
67042001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6705
6706 * decl2.c (do_nonmember_using_decl): Replace using directive
6707 with using declaration in the error message.
6708
4d5f3fbd
KL
67092001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6710
6711 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6712 criterion to avoid rebuilding expression tree instead of
6713 processing_template_decl.
6714
07b2f2fd
JM
67152001-08-07 Jason Merrill <jason_merrill@redhat.com>
6716
6717 Support named return value optimization for inlines, too.
6718 * decl.c (finish_function): Nullify returns here.
6719 * semantics.c (genrtl_start_function): Not here.
6720 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6721 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
6722 Also nullify the CLEANUP_STMT for the nrv.
6723 * cp-tree.h: Declare it.
6724 * optimize.c (declare_return_variable): Replace the nrv with the
6725 return variable.
6726 * typeck.c (check_return_expr): Be more flexible on alignment check.
6727 Ignore cv-quals when checking for a matching type.
6728
2cc07db4
RH
67292001-08-09 Richard Henderson <rth@redhat.com>
6730
6731 * decl2.c (finish_objects): Use target hooks instead of
6732 assemble_constructor and assemble_destructor.
6733
0ca179b2
JDA
67342001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
6735
6736 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6737
0830ae44
NS
67382001-08-07 Nathan Sidwell <nathan@codesourcery.com>
6739
6740 PR c++/3820
6741 Stop using TYPE_NONCOPIED_PARTS.
6742 * call.c (build_over_call): Be careful when copy constructing
6743 or assigning to an empty class.
6744 * class.c (check_bases_and_members): It has a
6745 COMPLEX_ASSIGN_REF if it has a vptr.
6746 (layout_class_type): Don't add empty class padding to
6747 TYPE_NONCOPIED_PARTS.
6748 (finish_struct_1): Don't add the VFIELD either.
6749 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6750 initialization.
6751
59a13e0f
JM
67522001-08-07 Jason Merrill <jason_merrill@redhat.com>
6753
6754 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6755
47907859
RH
67562001-08-06 Richard Henderson <rth@redhat.com>
6757
6758 * decl2.c (finish_objects): Pass a symbol_ref and priority to
6759 assemble_{constructor,destructor}. Remove priority handling.
6760
eac69b8a
GDR
67612001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6762
6763 Don't allow template-id in using-declaration.
6764 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6765 (do_class_using_decl): Likewise.
6766
ef6e958a
NB
67672001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6768
6769 * cp/spew.c (read_token): No need to pop buffers.
6770
dff94ad7
SS
67712001-08-02 Stan Shebs <shebs@apple.com>
6772
6773 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6774 (fnaddr_from_vtable_entry): Remove decl.
6775 * method.c (use_thunk): Update comment.
6776
026c3f13
AC
67772001-08-01 Andrew Cagney <ac131313@redhat.com>
6778
6779 * repo.c (get_base_filename): Change return value to const char
6780 pointer.
6781
1dbb6023
NS
67822001-08-02 Nathan Sidwell <nathan@codesourcery.com>
6783
6784 Kill -fhonor-std.
6785 * NEWS: Document.
6786 * cp-tree.h (flag_honor_std): Remove.
6787 (CPTI_FAKE_STD): Remove.
6788 (std_node): Remove comment about it being NULL.
6789 (fake_std_node): Remove.
6790 * decl.c (in_fake_std): Remove.
6791 (walk_namespaces_r): Remove fake_std_node check.
6792 (push_namespace): Remove in_fake_std code.
6793 (pop_namespace): Likewise.
6794 (lookup_name_real): Remove fake_std_node check.
6795 (init_decl_processing): Always create std_node. Always add
6796 std:: things there.
6797 (builtin_function): Always put non '_' fns in std.
6798 * decl2.c (flag_honor_std): Remove.
6799 (lang_f_options): Remove honor-std.
6800 (unsupported_options): Add honor-std.
6801 (set_decl_namespace): Remove fake_std_node check.
6802 (validate_nonmember_using_decl): Likewise.
6803 (do_using_directive): Likewise.
6804 (handle_class_head): Likewise.
6805 * dump.c (cp_dump_tree): Likewise.
6806 * except.c (init_exception_processing): Adjust.
6807 * init.c (build_member_call): Remove fake_std_node check.
6808 (build_offset_ref): Likewise.
6809 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6810 * rtti.c (init_rtti_processing): Adjust.
6811
6ad7895a
APB
68122001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6813
6814 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6815 operand while calling cp_tree_equal.
6816
befe7c61
NS
68172001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6818
6819 The 3.0 ABI no longer has vbase pointer fields.
6820 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6821 FORMAT_VBASE_NAME): Remove.
6822 * method.c (do_build_copy_constructor): Adjust.
6823 (do_build_assign_ref): Adjust.
6824 * search.c (lookup_field_r): Adjust.
6825 * typeck.c (build_component_ref): Adjust.
6826
6827 The 3.0 ABI always has a vtable pointer at the start of every
6828 polymorphic class.
6829 * rtti.c (build_headof_sub): Remove.
6830 (build_headof): Adjust.
6831 (get_tinfo_decl_dynamic): No need to check flag_rtti
6832 here. Adjust.
6833 (create_real_tinfo_var): Explain why we need a hidden name.
6834
20dde49d
NS
68352001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6836
6837 PR c++/3631
6838 * class.c (update_vtable_entry_for_fn): The fixed adjustment
6839 of a virtual thunk should be from declaring base.
6840
b7ad2f8b
NS
68412001-07-31 Nathan Sidwell <nathan@codesourcery.com>
6842
6843 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6844 the shared virtual base, so preserving inheritance graph order.
6845
57cb6d52
AJ
68462001-07-30 Andreas Jaeger <aj@suse.de>
6847
749ced52 6848 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 6849
594280a3
RH
68502001-07-28 Richard Henderson <rth@redhat.com>
6851
6852 * method.c (pending_inlines): Remove.
6853
0ab142b0
NS
68542001-07-27 Nathan Sidwell <nathan@codesourcery.com>
6855
6856 * class.c (mark_primary_virtual_base): Don't adjust base
6857 offsets here.
6858 (dfs_unshared_virtual_bases): Adjust them here.
6859 (mark_primary_bases): Explain why we adjust at the end.
6860
d60d223b
NS
68612001-07-27 Nathan Sidwell <nathan@codesourcery.com>
6862
6863 * class.c (finish_struct_1): When copying the primary base's
6864 VFIELD, make sure we find it is at offset zero.
6865
db3ef87b
KL
68662001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6867
6868 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6869 tsubst_expr for default template arguments.
6870
312b7c9d
NS
68712001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6872
d60d223b 6873 PR c++/3621
312b7c9d 6874 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 6875 nonzero.
312b7c9d 6876
648c2206
NS
68772001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6878
6879 PR c++/3624
6880 * call.c (resolve_args): Simplify, call
6881 convert_from_reference.
6882 (build_new_op): Resolve and convert from reference ARG1
6883 earlier. Adjust ARG2 & ARG3 resolve and conversion.
6884
969fd501
NS
68852001-07-26 Nathan Sidwell <nathan@codesourcery.com>
6886
6887 * decl.c (last_function_parm_tags): Remove.
6888 (current_function_parm_tags): Remove.
6889 (init_decl_processing): Adjust.
6890 (start_function): Adjust.
6891 (store_parm_decls): Adjust.
6892
6893 PR c++/3152
6894 * decl.c (grokdeclarator): Detect when a function typedef is
6895 declaring a function, and create last_function_parms correctly.
6896
08ac397c 68972001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 6898
08ac397c
JM
6899 * call.c (joust): Only prefer a non-builtin candidate to a builtin
6900 one if they have the same signature.
6901
6902 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
6903 it rather than toplevel_bindings_p. Give it a mangled name if static.
6904 (convert_to_reference): Adjust.
6905 * decl2.c (get_temp_name): Lose.
6906 * mangle.c (mangle_ref_init_variable): New fn.
6907 (mangle_guard_variable): Strip the ref-init header.
6908 * cp-tree.h: Adjust.
6909 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6910 initializer.
6911 (grok_reference_init): Always use DECL_INITIAL.
6912
40260429
NS
69132001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6914
6915 PR c++/3416
6916 * call.c (build_conditional_expr): Recheck args after
6917 conversions.
6918 * cp-tree.h (build_conditional_expr): Move to correct file.
6919 * typeck.c (decay_conversion): Diagnose any unknown types
6920 reaching here.
6921 (build_binary_op): Don't do initial decay or default
6922 conversions on overloaded functions.
6923 (build_static_cast): Don't do a decay conversion here.
6924
ab085207
NS
69252001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6926
6927 PR c++/3543
6928 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6929 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6930
0abe00c5
NS
69312001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6932
6933 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6934 (create_vtbl_ptr): ... here.
6935
90b1ca2f
NS
69362001-07-25 Nathan Sidwell <nathan@codesourcery.com>
6937
6938 * class.c (build_vbase_offset_vbtl_entries): Look for
6939 non-primary base of which we are a sub vtable.
6940
cfe5dc31
PE
69412001-07-24 Phil Edwards <pme@sources.redhat.com>
6942
6943 * semantics.c (finish_this_expr): Remove unused code.
6944
7f54a851
NS
69452001-07-24 Nathan Sidwell <nathan@codesourcery.com>
6946
6947 Simplify rtti, now we've only one ABI.
6948 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6949 CPTI_TINFO_VAR_ID.
6950 (tinfo_decl_id, tinfo_var_id): Remove.
6951 (get_typeid_1): Remove.
6952 * rtti.c
6953 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6954 (typeid_ok_p): New function.
6955 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6956 (get_tinfo_decl): Remove old abi documentation.
6957 (tinfo_from_decl): Remove.
6958 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6959 (get_typeid_1): Remove.
6960 (get_base_offset): Remove.
6961 (synthesize_tinfo_var): Absorb get_base_offset.
6962 (create_real_tinfo_var): Don't use tinfo_decl_id.
6963
18fee3ee
GS
69642001-07-23 Graham Stott <grahams@redhat.com>
6965
d30d6e7a 6966 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
6967 variable has_two_argument_delete_p.
6968
c4372ef4
NS
69692001-07-21 Nathan Sidwell <nathan@codesourcery.com>
6970
6971 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6972 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6973 (CPTI_INDEX_IDENTIFIER): Remove.
6974 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6975 (delta2_identifier): Remove.
6976 (index_identifier): Remove.
6977 (pfn_or_delta2_identifier): Remove.
6978 (flag_vtable_thunks): Remove.
6979 (VTABLE_DELTA2_NAME): Remove.
6980 (VTABLE_INDEX_NAME): Remove.
6981 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6982 (vfunc_ptr_type_node): Adjust.
6983 (VTABLE_NAME_PREFIX): Adjust.
6984 (build_vfn_ref): Lose first parameter.
6985 (fixup_all_virtual_upcast_offsets): Remove.
6986 * decl.c (initialize_predefined_identifiers): Remove
6987 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6988 (init_decl_processing): Remove no-vtable-thunk code.
6989 * decl2.c (flag_vtable_thunks): Remove.
6990 (mark_vtable_entries): Remove no-vtable-thunk code.
6991 * error.c (dump_decl): Remove no-vtable-thunk code.
6992 (dump_expr): Adjust ptr to member function code.
6993 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6994 code.
6995 * rtti.c (build_headof): Remove no-vtable-thunk code.
6996 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6997 * search.c (get_base_distance): Remove expand_upcast_fixups case.
6998 (virtual_context) Remove.
6999 (expand_upcast_fixups): Remove.
7000 (fixup_virtual_upcast_offsets): Remove.
7001 (fixup_all_virtual_upcast_offsets): Remove.
7002 * typeck.c (get_member_function_from_ptrfunc): Remove
7003 no-vtable-thunk code.
7004 * call.c (build_over_call): Adjust call to build_vfn_ref.
7005 * class.c (build_vfn_ref): Lose first parameter. Remove
7006 no-vtable-thunk code.
7007 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7008 (build_vtable_entry): Remove no-vtable-thunk code.
7009
3461fba7
NS
70102001-07-20 Nathan Sidwell <nathan@codesourcery.com>
7011
7012 Remove old-abi remnants. Remove comments about old abi
838dfd8a 7013 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
7014 * cp-tree.h: Adjust comments.
7015 (vbase_offsets_in_vtable_p): Delete.
7016 (vcall_offsets_in_vtable_p): Delete.
7017 (vptrs_present_everywhere_p): Delete.
7018 (all_overridden_vfuns_in_vtables_p): Delete.
7019 (merge_primary_and_secondary_vtables_p): Delete.
7020 (TYPE_CONTAINS_VPTR_P): Adjust.
7021 (VTT_NAME_PREFIX): Remove.
7022 (CTOR_VTBL_NAME_PREFIX): Remove.
7023 (init_vbase_pointers): Remove.
7024 * class.c: Adjust coments.
7025 (build_vbase_pointer_fields): Delete.
7026 (build_vbase_pointer): Remove old-abi code.
7027 (build_secondary_vtable): Likewise.
7028 (modify_all_vtables): Likewise.
7029 (create_vtable_ptr): Likewise.
7030 (layout_class_type): Likewise.
7031 (finish_struct_1): Likewise.
7032 (finish_vtbls): Likewise.
7033 (dfs_finish_vtbls): Delete.
7034 (build_vbase_offset_vtbl_entries): Remove old-abi code.
7035 * cvt.c: Adjust comments.
7036 * decl.c: Adjust comments.
7037 * decl2.c: Adjust comments.
7038 * init.c: Adjust comments.
7039 (construct_virtual_bases): Remove old-abi code.
7040 * lang-specs.h: Remove -fno-new-abi.
7041 * mangle.c: Adjust comments.
7042 * rtti.c: Adjust comments.
7043 (get_base_offset): Remove old-abi-code.
7044 * search.c: Adjust comments.
7045 (dfs_init_vbase_pointers): Remove.
7046 (dfs_vtable_path_unmark): Remove.
7047 (init_vbase_pointers): Remove.
7048 * semantics.c: Adjust comments.
7049 (emit_associated_thunks): Remove old-abi code.
7050 * typeck.c: Adjust comments.
7051
1c432a87
DB
70522001-07-20 Daniel Berlin <dan@cgsoftware.com>
7053
7054 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7055 params.h.
7056
b7076960
MM
70572001-07-19 Mark Mitchell <mark@codesourcery.com>
7058
7059 * class.c (finish_struct_anon): Forbid nested classes.
7060
2b85879e
NB
70612001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
7062
7063 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7064 * optimize.c: Include debug.h.
7065 (maybe_clone_body): Use debug hook.
7066 * semantics.c: Include debug.h.
7067 (expand_body): Use debug hook.
7068
c60e94a7
NB
70692001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
7070
7071 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7072
dbc957f1
MM
70732001-07-18 Mark Mitchell <mark@codesourcery.com>
7074
7075 * class.c (type_requires_array_cookie): New function.
7076 (check_methods): Don't try to figure out whether the type needs a
7077 cookie here.
7078 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7079 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7080 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7081 * pt.c (instantiate_class_template): Don't set
7082 TYPE_VEC_DELETE_TAKES_SIZE.
7083 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 7084
7ba0b0f7 70852001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 7086 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
7087
7088 * NEWS (Changes in GCC 3.0): Fix typo.
7089
59387d2e
JM
70902001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
7091
7092 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7093 which attributes are to be attached, and a flags argument. Update
7094 call to decl_attributes.
7095 (grokfield): Update call to decl_attributes.
7096 * class.c (finish_struct): Update call to cplus_decl_attributes.
7097 * cp-tree.h (cplus_decl_attributes): Update prototype.
7098 * decl.c (start_decl, grokdeclarator, start_function): Update
7099 calls to decl_attributes and cplus_decl_attributes.
7100 * friend.c (do_friend): Update call to cplus_decl_attributes.
7101 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7102
7ed47c04
MM
71032001-07-12 Mark Mitchell <mark@codesourcery.com>
7104
7105 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7106 for `register' variables with an asm-specification.
7107
40b18c0a
MM
71082001-07-11 Mark Mitchell <mark@codesourcery.com>
7109
7110 * semantics.c (finish_asm_stmt): Mark the output operands
7111 to an asm addressable, if necessary.
7112
517c3b80
BE
71132001-07-11 Ben Elliston <bje@redhat.com>
7114
219670f1
BE
7115 * Revert this change -- there is a subtle bug.
7116
517c3b80
BE
7117 PR c++/80
7118 * decl.c (finish_enum): New "attributes" argument; pass it to
7119 cplus_decl_attributes. Use a narrower type if the enum is packed.
7120 * cp-tree.h (finish_enum): Adjust prototype.
7121 * parse.y (enum_head): New non-terminal.
7122 (structsp): Use it. Enums now may be preceded or followed by
7123 optional attributes -- pass their chained tree to finish_enum().
7124 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7125
2ba9c47e
MM
71262001-07-10 Mark Mitchell <mark@codesourcery.com>
7127
7128 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7129 variables.
7130
35241192
JM
71312001-07-10 Jason Merrill <jason_merrill@redhat.com>
7132
7133 * semantics.c (cp_expand_stmt): Fix for null
7134 current_function_return_value.
7135
07167a18
JM
71362001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
7137
7138 * call.c (build_op_delete_call): Initialize fn.
7139 (convert_like_real): Delete conditional.
7140 (joust): Initialize *w and *l.
7141 * class.c: Add prototype for binfo_ctor_vtable.
7142 (get_primary_binfo): Initialize result.
7143 * init.c (build_java_class_ref): Initialize name.
ae818d3b 7144
35241192
JM
71452001-07-09 Erik Rozendaal <dlr@acm.org>
7146
ae818d3b
ER
7147 * typeck.c (unary_complex_lvalue): Do not duplicate the
7148 argument to modify, pre-, or post-increment when used as an
7149 lvalue and when the argument has side-effects.
7150
12a68f1f
JM
71512001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
7152
7153 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7154 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
7155 cplus_decl_attributes even if attrs is NULL.
7156 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7157
f7a4cec0
JM
71582001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
7159
7160 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7161 calls to decl_attributes.
7162
c80106a4
IR
71632001-07-06 Ira Ruben <ira@apple.com>
7164
ae818d3b 7165 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
7166 be DECL_TEMPLATE_RESULT.
7167
dac65501
KL
71682001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7169
7170 * cp-tree.h (copy_template_template_parm): Rename to ...
7171 (bind_template_template_parm): ... here.
7172 * tree.c (copy_template_template_parm): Rename to ...
7173 (bind_template_template_parm): ... here. Remove the case when
7174 NEWARGS is NULL_TREE.
7175 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7176 BOUND_TEMPLATE_TEMPLATE_PARM.
7177 * pt.c (lookup_template_class): Adjust.
7178
01f9e964
JM
71792001-07-05 Jason Merrill <jason_merrill@redhat.com>
7180
7181 * cvt.c (convert_lvalue): New fn.
7182 * cp-tree.h: Declare it.
7183 * method.c (do_build_assign_ref): Use it.
7184 (do_build_copy_constructor): Convert parm to base types
7185 before calling base constructors.
7186
7187 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7188 DECL_USER_ALIGN. Check flag_elide_constructors instead of
7189 optimize.
7190 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7191
6be77748
NS
71922001-07-02 Nathan Sidwell <nathan@codesourcery.com>
7193
7194 * optimize.c (optimize_inline_calls): New function, broken out
7195 of ...
7196 (optimize_function): ... here. Call it. Don't inline if it is
7197 a thunk.
7198 (dump_function): Print name of dump flag causing this dump.
7199 * semantics.c (expand_body): Move thunk inline check to
7200 optimize_function.
7201
8d8e52be
JM
72022001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
7203
7204 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7205 (comptypes): Use target.comp_type_attributes.
7206
5a0db193
NS
72072001-06-29 Nathan Sidwell <nathan@codesourcery.com>
7208
7209 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7210
46f018e1
GDR
72112001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7212
7213 * error.c (lang_print_error_function): Add a `diagnostic_context *'
7214 parameter. Tweak.
7215
501990bb
NB
72162001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7217
7218 * decl2.c (import_export_class): Update.
7219
f68fc4db
GDR
72202001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
7221
7222 * error.c (init_error): Adjust settings.
7223
9596ddd6
GDR
72242001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
7225
7226 * error.c (init_error): Adjust settings.
7227
c93586fa
RS
72282001-06-19 Richard Sandiford <rsandifo@redhat.com>
7229
7230 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7231 return pointers to data members by reference rather than by value.
7232
0d97bf4c
JM
72332001-06-18 Jason Merrill <jason_merrill@redhat.com>
7234
7235 Implement the Named Return Value optimization.
7236 * cp-tree.h (struct cp_language_function): Add x_return_value.
7237 (current_function_return_value): Now a macro.
7238 * decl.c: Don't define it.
7239 (define_label, finish_case_label): Don't clear it.
7240 (init_decl_processing): Don't register it with GC.
7241 * semantics.c (genrtl_finish_function): Don't check it for
7242 no_return_label. Copy the RTL from the return value to
7243 current_function_return_value and walk, calling...
7244 (nullify_returns_r): ...this new fn.
7245 * typeck.c (check_return_expr): Set current_function_return_value.
7246
13de7ec4
JM
72472001-06-15 Jason Merrill <jason_merrill@redhat.com>
7248
7249 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7250 sharing a ctor vtable with. Merge code for cases 1 and 2.
7251 (binfo_ctor_vtable): New fn.
7252 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7253
3ea099f1
JM
72542001-06-14 Jason Merrill <jason_merrill@redhat.com>
7255
7256 * class.c (dfs_find_final_overrider): Fix logic.
7257
7258 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7259 virtual thunk instead of non-virtual.
7260 (get_matching_virtual): Uncomment.
7261
7262 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7263 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
7264 PARM, not ARG.
7265
87326ba8
NS
72662001-06-14 Nathan Sidwell <nathan@codesourcery.com>
7267
7268 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7269 we've not emerged from the hierarchy of RTTI_BINFO on reaching
7270 a non-virtual base.
7271
e065a36e
MM
72722001-06-13 Mark Mitchell <mark@codesourcery.com>
7273
7274 * NEWS: Update release number.
7275
623fe76a
NS
72762001-06-12 Nathan Sidwell <nathan@codesourcery.com>
7277
7278 PR c++/3130, c++/3131, c++/3132
7279 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7280 * class.c (force_canonical_binfo_r): Move
7281 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7282 virtual bases unless they're primary and what they're primary
7283 too has been moved.
7284 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7285 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7286 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7287 derived binfo.
7288 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7289 (layout_nonempty_base_or_field): Add most derived type
7290 parameter. Adjust.
7291 (layout_empty_base): Likewise.
7292 (build_base_field): Likewise.
7293 (build_base_fields): Likewise.
7294 (propagate_binfo_offsets): Add most derived type
7295 parameter. Skip non canonical virtual bases too.
7296 (dfs_set_offset_for_unshared_vbases): Don't skip primary
7297 bases. Do skip canonical bases.
7298 (layout_virtual_bases): Adjust.
7299 (layout_class_type): Adjust.
7300 (dfs_get_primary_binfo): Build list of virtual primary base
7301 candidates.
7302 (get_primary_binfo): Check that the shared virtual primary
7303 base candidate was found first.
7304 (accumulate_vtbl_inits): Don't do anything for non-vptr
7305 containing binfos. For case 1 primary virtual bases, keep
7306 checking that we've not emerged from the hierarchy of RTTI_BINFO.
7307
7bdcf888
NS
73082001-06-12 Nathan Sidwell <nathan@codesourcery.com>
7309
7310 PR c++/3089
7311 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7312 hierarchy looking for primary bases for a ctor
7313 vtable. Recursively call oneself, if we meet our primary via
7314 this route and haven't met it yet via inheritance graph order.
7315
25b5b465
MM
73162001-06-11 Mark Mitchell <mark@codesourcery.com>
7317
7318 * lang-options.h: Emit documentation for -fno-honor-std, not
7319 -fhonor-std.
7320
eb2d0614
AO
73212001-06-10 Alexandre Oliva <aoliva@redhat.com>
7322
7323 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7324 Don't clobber delta.
7325 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7326
2a2b2d43
GDR
73272001-06-10 Mark Mitchell <mark@codesourcery.com>
7328 Gabriel Dos Reis <gdr@codesourcery.com>
7329
7330 * Make-lang.in (cp/call.o): Depend on diagnostic.h
7331 (cp/typeck.o): Depend on diagnostic.h
7332 (cp/typeck2.o): Depend on diagnostic.h
07167a18 7333 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
7334 * typeck.c: #include diagnostic.h
7335 (convert_for_initialization): Remove extern declaration for
7336 warningcount and errorcount.
7337
7338 * call.c: #include diagnostic.h
7339 (convert_like_real): Remove extern declaration for warnincount and
07167a18 7340 errorcount.
2a2b2d43
GDR
7341
7342 * repo.c: #include diagnostic.h
7343 * typeck2.c: #include diagnostic.h
7344
06d5e633
NS
73452001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7346
7347 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7348 in previous change.
7349
9ac1bd2e
NS
73502001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7351
7352 PR c++/2929
7353 * friend.c (do_friend): Use push_decl_namespace for classes at
7354 namespace scope.
7355
85a9a0a2
NS
73562001-06-08 Nathan Sidwell <nathan@codesourcery.com>
7357 Jason Merrill <jason_merrill@redhat.com>
7358
7359 PR c++/3061
7360 * class.c (build_secondary_vtable): Use assert, rather than an error
7361 message.
7362 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7363 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7364 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7365 Don't set BINFO_VTABLE for a primary virtual base.
7366
daa8df65
MM
73672001-06-07 Mark Mitchell <mark@codesourcery.com>
7368
7369 * decl.c (duplicate_decls): Update source position information
7370 when a template function is defined.
7371
37344b9b
PE
73722001-06-07 Phil Edwards <pme@sources.redhat.com>
7373
7374 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
7375
fcebb2dd
NS
73762001-06-07 Nathan Sidwell <nathan@codesourcery.com>
7377
7378 PR c++/2914
7379 * decl.c (pushtag): Don't push into a complete type's scope.
7380
d0cd8b44
JM
73812001-06-06 Jason Merrill <jason_merrill@redhat.com>
7382
7383 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7384 (struct lang_decl_flags): Lose generate_with_vtable_p.
7385 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7386 * class.c (copy_virtuals): Adjust.
7387 * decl2.c (mark_vtable_entries): Adjust.
7388 * method.c (make_thunk, build_vtable_entry): Adjust.
7389 * class.c (update_vtable_entry_for_fn): Only look as far as the
7390 first defining class.
07167a18 7391 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 7392 defined in a lost primary virtual base.
07167a18 7393 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
7394 the lost primary case and the normal case.
7395 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7396 (get_vfield_offset, get_derived_offset): Lose.
7397 (dfs_find_final_overrider): Use look_for_overrides_here.
7398 (get_matching_virtual): New fn.
7399 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7400 not BV_VCALL_INDEX.
7401 * search.c (look_for_overrides_here): Split out from...
7402 (look_for_overrides_r): Here.
7403
7404 * class.c (find_final_overrider): Return error_mark_node on error.
7405
7406 * decl2.c (key_method): #if 0 accidental change.
7407
acf97e0b
JDA
74082001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
7409
7410 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7411 (build_over_call): Likewise.
7412 * decl.c (grokparms): Likewise.
7413 * pt.c (tsubst_decl): Likewise.
7414 * typeck.c (convert_arguments): Likewise.
7415
7e9abee9
MM
74162001-06-05 Mark Mitchell <mark@codesourcery.com>
7417
47ee8904
MM
7418 * semantics.c (begin_class_definition): Robustify.
7419
7e9abee9
MM
7420 * pt.c (instantiate_decl): Tell the repository code about the
7421 clones, not the cloned functions.
7422 * repo.c (repo_template_used): Explicitly instantiate the cloned
7423 function, not the clones.
7424
bea09693
NS
74252001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7426
7427 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7428 ICS_BAD_FLAG on created conversion.
7429 (compare_ics): Break out rank.
7430
8f7550ca
NS
74312001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7432
7433 * decl.c (xref_tag): Remove extraneous %s on dependent name
7434 lookup warning.
7435
442e01b6
NS
74362001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7437
7438 * class.c (layout_vtable_decl): Fix off by one error on
7439 build_index_type.
7440 (build_vtt): Likewise.
7441 (build_ctor_vtbl_group): Likewise.
7442
b7442fb5
NS
74432001-06-05 Nathan Sidwell <nathan@codesourcery.com>
7444
7445 * class.c (maybe_indent_hierarchy): New function.
7446 (dump_class_hierarchy_r): Add flags. Dump extra binfo
7447 information, if enabled. Use maybe_indent_hierarchy. Adjust
7448 output format.
7449 (dump_class_hierarchy): Adjust prototype. Adjust output format.
7450 (dump_array, dump_vtable, dump_vtt): New functions.
7451 (finish_struct_1): Adjust hierarchy dumping.
7452 (initialize_vtable): Call dump_vtable.
7453 (build_vtt): Call dump_vtt.
7454 (build_ctor_vtbl_group): Call dump_vtable.
7455 * decl2.c (flag_dump_class_layout): Remove.
7456 (cxx_decode_option): Remove dump translation unit
7457 and dump class hierarchy check. Call dump_switch_p.
7458 (finish_file): Adjust dumping.
7459 (dump.c): Only dump base classes if not TDF_SLIM.
7460 Only dump namespace members if not TDF_SLIM.
7461 * optimize.c (dump_function): New function.
7462 (optimize_function): Call dump_function.
7463 * semantics.c (expand_body): Use dump_enabled_p.
7464
e5410b32
NS
74652001-06-01 Nathan Sidwell <nathan@codesourcery.com>
7466
7467 PR g++/2936
7468 Part missed from first commit
7469 * decl2.c (finish_anon_union): Copy context.
7470
e97c9488
NS
74712001-05-30 Nathan Sidwell <nathan@codesourcery.com>
7472
7473 PR g++/2936
e97c9488
NS
7474 * optimize.c (remap_decl): Remap anonymous aggregate members too.
7475
87d9ac49
NS
74762001-05-26 Nathan Sidwell <nathan@codesourcery.com>
7477
7478 PR g++/2823
7479 * semantics.c (expand_body): Don't optimize thunks.
7480
88657302
RH
74812001-05-25 Sam TH <sam@uchicago.edu>
7482
7483 * cp-tree.h lex.h: Fix header include guards.
7484
74852001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
7486
7487 * decl.c (init_decl_processing): Tweak.
7488
0b1161fc
MM
74892001-05-24 Mark Mitchell <mark@codesourcery.com>
7490
7491 * decl.c (duplicate_decls): Tidy.
7492 (init_decl_processing): Always set flag_no_builtin.
7493
6f56d925
NS
74942001-05-24 Nathan Sidwell <nathan@codesourcery.com>
7495
7496 PR c++/2184
7497 * decl2.c (do_local_using_decl): Push the decls, even in a
7498 template.
7499
39e0656d
MM
75002001-05-22 Mark Mitchell <mark@codesourcery.com>
7501
7502 * optimize.c (initialize_inlined_parameters): Don't set
7503 TREE_READONLY for a VAR_DECL taking the place of an inlined
7504 PARM_DECL.
7505
0401d499
JM
75062001-05-22 Jason Merrill <jason_merrill@redhat.com>
7507
7508 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7509 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7510 attribute.
7511
14fc3426
JM
75122001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
7513
7514 * parse.y: Refer to compound literals as such, not as
7515 constructor-expressions.
7516
3f41ffd8
MM
75172001-05-21 Mark Mitchell <mark@codesourcery.com>
7518
7519 * call.c (build_op_delete_call): Ignore exception-specifications
7520 when looking for matching delete operators.
7521 * init.c (build_new_1): Compute whether or not the allocation
7522 function used is a placement allocation function or not, and
7523 communicate this information to build_op_delete_call.
7524
1a6025b4
JM
75252001-05-21 Jason Merrill <jason_merrill@redhat.com>
7526
90ecce3e
JM
7527 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
7528 (build_vtbl_ref): Adjust.
7529 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7530 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7531 Re-add vtable-gc.
7532 (unsupported_options): Correspondingly.
7533
7534 * decl2.c (maybe_make_one_only): Check flag_weak, not
7535 supports_one_only().
7536
1a6025b4
JM
7537 * cp-tree.def (START_CATCH_STMT): Lose.
7538 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
7539 * tree.c (cp_statement_code_p): Don't case it.
7540 * semantics.c (cp_expand_stmt): Likewise.
7541 * cp-tree.h (START_CATCH_TYPE): Lose.
7542 (HANDLER_TYPE): New.
7543 * except.c (expand_start_catch_block): Don't start any blocks.
7544 Return the type.
7545 (expand_end_catch_block): Don't end any blocks.
7546 * parse.y (handler): Don't pass anything from finish_handler_parms
7547 to finish_handler.
7548 * pt.c (tsubst_expr): Likewise.
7549 * semantics.c (begin_handler): Call note_level_for_catch here.
7550 (finish_handler_parms): Don't return anything.
7551 (genrtl_catch_block, begin_catch_block): Lose.
7552 (genrtl_handler): Call expand_start_catch here.
7553
75542001-05-18 Jason Merrill <jason_merrill@redhat.com>
7555
7556 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7557 (get_vtable_decl, build_vtt): Not here.
7558
d30a825a
NS
75592001-05-20 Nathan Sidwell <nathan@codesourcery.com>
7560
7561 PR c++/2781
7562 * optimize.c (update_cloned_parm): Copy addressability and other
7563 flags.
7564
3b82c249
KL
75652001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7566
7567 * pt.c (determine_specialization): Ignore artificial functions.
7568
2a967f3d
NB
75692001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
7570
7571 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7572 (C_RID_CODE): Remove.
7573 * lex.c (cxx_init_options): Call set_identifier_size. Update.
7574 (init_parse): Don't do it here.
7575
f99df08e
DN
75762001-05-18 Diego Novillo <dnovillo@redhat.com>
7577
7578 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7579 function declaration to avoid stripping the symbol's attributes.
7580
2b0cbc5d
NS
75812001-05-18 Nathan Sidwell <nathan@codesourcery.com>
7582
7583 * decl.c (pushdecl): Adjust error string.
7584 (xref_tag): Adjust friend class injection warning. Remove the
7585 inherited name from the class shadowed scope.
7586
e6855a2d
MM
75872001-05-17 Mark Mitchell <mark@codesourcery.com>
7588
7589 * except.c (cp_protect_cleanup_actions): New function.
07167a18 7590 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
7591 here. Do set lang_protect_cleanup_actions.
7592
cc469ee9
NS
75932001-05-16 Nathan Sidwell <nathan@codesourcery.com>
7594
7595 * spew.c (read_token): Call yyerror on all unexpected tokens.
7596
3f0a9b35
NS
75972001-05-16 Nathan Sidwell <nathan@codesourcery.com>
7598
7599 * init.c (member_init_ok_or_else): Take a tree rather than
7600 string for name.
7601 (expand_member_init): Adjust.
7602
8d0cb60d
NC
76032001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
7604
7605 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 7606 decls if the first decl is a friend.
8d0cb60d 7607
1f730ff7
ZW
76082001-05-12 Zack Weinberg <zackw@stanford.edu>
7609
7610 * except.c (choose_personality_routine): Export. Add
7611 explanatory comment. Take an enum languages, not a boolean.
7612 (initialize_handler_parm): Adjust to match.
7613 * cp-tree.h: Prototype choose_personality_routine.
7614 * lex.c (handle_pragma_java_exceptions): New function.
7615 (init_cp_pragma): Register #pragma GCC java_exceptions.
7616
90e0c410
NB
76172001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7618
7619 * method.c (build_mangled_C99_name): Remove unused prototype.
7620
cb7fdde2
AO
76212001-05-12 Alexandre Oliva <aoliva@redhat.com>
7622
7623 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7624 * typeck.c (get_member_function_from_ptrfunc,
7625 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7626 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
7627
7628 Reverted Geoff Keating's 2001-05-03's patch.
7629
401deb20
IR
76302001-05-11 Ira Ruben <ira@apple.com>
7631
7632 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7633
8e93d446
NB
76342001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
7635
7636 * cp-tree.h (finish_label_expr, lookup_label): Delete.
7637 * parse.y: Update for '&&'; don't issue warning here.
7638 * semantics.c (finish_label_expr): Delete.
7639
5cdba4ff
MM
76402001-05-07 Mark Mitchell <mark@codesourcery.com>
7641
7642 * splay-tree.h (splay_tree_max): New function.
7643 (splay_tree_min): Likewise.
7644
8e9eff6b
GK
76452001-05-03 Geoffrey Keating <geoffk@redhat.com>
7646
7647 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7648 (pfn_vflag_identifier): Define.
7649 Update comment about layout of pointer functions.
7650 (build_ptrmemfunc1): Update prototype.
7651 (expand_ptrmemfunc_cst): Update prototype.
7652 * decl.c (initialize_predefined_identifiers): Initialize
7653 pfn_vflag_identifier.
7654 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7655 an extra field to the type.
07167a18 7656 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
7657 expand_ptrmemfunc_cst and build_ptrmemfunc1.
7658 * typeck.c (get_member_function_from_ptrfunc): When
7659 FUNCTION_BOUNDARY < 16, look at additional field to determine
7660 if a pointer-to-member is a real pointer or a vtable offset.
7661 (build_ptrmemfunc1): Add new parameter to contain extra field.
7662 (build_ptrmemfunc): Pass the extra field around.
7663 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7664 (pfn_from_ptrmemfunc): Ignore the extra field.
7665
acc72c37
MM
76662001-05-03 Mark Mitchell <mark@codesourcery.com>
7667
7668 * cp-tree.h (flag_inline_trees): Update documentation.
7669 * decl.c (init_decl_processing): Adjust handling of
7670 flag_inline_functions and flag_inline_trees to support -O3.
7671 (grokfndecl): Set DECL_INLINE on all functions if that's what
7672 the user requested.
7673 (save_function_data): Clear DECL_INLINE in
7674 current_function_cannot_inline is non-NULL.
7675 * decl2.c (flag_inline_trees): Update documentation.
7676
5158d7ee
NS
76772001-05-03 Nathan Sidwell <nathan@codesourcery.com>
7678
7679 * dump.c (cp_dump_tree, USING_STMT case): New case.
7680 * tree.c (cp_statement_code_p): Add USING_STMT.
7681 * decl2.c (do_using_directive): Add the using directive statement.
7682
7683 * tree.c (walk_tree): Reformat an if block.
7684
80f5bb34
MM
76852001-05-02 Mark Mitchell <mark@codesourcery.com>
7686
7687 * decl.c (compute_array_index_type): Don't try to do anything with
7688 the indices when processing a template.
7689
3e411c3f
KG
76902001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7691
7692 * call.c: NULL_PTR -> NULL.
7693 * class.c: Likewise.
7694 * cvt.c: Likewise.
7695 * decl.c: Likewise.
7696 * decl2.c: Likewise.
7697 * except.c: Likewise.
7698 * init.c: Likewise.
7699 * rtti.c: Likewise.
7700 * search.c: Likewise.
7701 * tree.c: Likewise.
7702 * typeck.c: Likewise.
7703 * typeck2.c: Likewise.
7704
46188dca
MM
77052001-05-02 Mark Mitchell <mark@codesourcery.com>
7706
7707 * decl2.c (do_using_directive): Revert previous patch.
7708
9da99f7d
NS
77092001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7710
7711 * cp-tree.def (USING_STMT): New statement node.
7712 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7713 * decl2.c (do_using_directive): Add USING_STMT to statement
7714 tree. Don't emit errors when processing template decl.
7715 * pt.c (tsubst_expr, USING_STMT case): New case.
7716 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7717
4b48a93e
NS
77182001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7719
7720 * call.c (build_new_op): Convert args from reference here.
7721 (build_conditional_expr): Don't convert here.
7722
1bcea8d7
NS
77232001-05-01 Nathan Sidwell <nathan@codesourcery.com>
7724
7725 * spew.c (last_token_id): New static variable.
7726 (read_token): Set it here.
7727 (yyerror): Use it here.
7728
d72040f5
RH
77292001-04-30 Richard Henderson <rth@redhat.com>
7730
749ced52 7731 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
7732 * decl.c: Likewise.
7733
c3aac512
MM
77342001-04-30 Mark Mitchell <mark@codesourcery.com>
7735
7736 * gxxint.texi: Remove.
7737 * Make-lang.in: Remove all traces of gxxint.texi.
7738
5fd893d5
MM
7739Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
7740
7741 * decl2.c (start_static_initialization_or_destruction): Correct
7742 logic to handle the -fno-use-cxa-atexit case.
7743
d60e5448
MM
77442001-04-30 Mark Mitchell <mark@codesourcery.com>
7745
7746 * optimize.c (update_cloned_parm): New function.
7747 (maybe_clone_body): Use it. Update the `this' parameter too.
7748
7200764f
JM
77492001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
7750
7751 * decl2.c (unsupported_options): Add new-abi.
7752 * lang-options.h: Remove no longer supported options.
7753
2d46ec83
NS
77542001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7755
7756 * except.c (can_convert_eh): Don't check template parms,
7757 typename types etc.
7758
02a1a68c
NS
77592001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7760
7761 * optimize.c (maybe_clone_body): Copy parameter names and locations.
7762
5f6eeeb3
NS
77632001-04-27 Nathan Sidwell <nathan@codesourcery.com>
7764
7765 * cp-tree.h (adjust_clone_args): Prototype new function.
7766 * class.c (adjust_clone_args): New function.
7767 * decl.c (start_function): Call it for in charge ctors.
7768
1b28d441
MM
77692001-04-26 Mark Mitchell <mark@codesourcery.com>
7770
7771 * method.c (use_thunk): Make sure that thunks really are emitted
7772 when requested.
7773
0576ec13
NS
77742001-04-26 Nathan Sidwell <nathan@codesourcery.com>
7775
7776 * mangle.c (write_chars): New macro.
7777 (hwint_to_ascii): New function
7778 (write_number): Use it.
7779 (write_integer_cst): Deal with really big numbers.
7780
b96ada87
MM
77812001-04-25 Mark Mitchell <mark@codesourcery.com>
7782
7783 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7784 the clone.
7785
6bda7a5e
NS
77862001-04-25 Nathan Sidwell <nathan@codesourcery.com>
7787
7788 * decl.c (grokdeclarator): Set context of namespace scope
7789 TYPE_DECLS.
7790
11fe225a
ZW
77912001-04-24 Zack Weinberg <zackw@stanford.edu>
7792
7793 * cp/optimize.c: Include hashtab.h.
7794 (struct inline_data): Add tree_pruner.
7795 (expand_call_inline, expand_calls_inline): Use it when calling
7796 walk_tree.
7797 (optimize_function): Initialize and free tree_pruner.
7798
0ba8a114
NS
77992001-04-24 Nathan Sidwell <nathan@codesourcery.com>
7800
7801 Lazy __FUNCTION__ generation.
7802 * cp-tree.def (FUNCTION_NAME): Remove.
7803 * cp-tree.h (function_name_declared_p): Remove.
7804 (cp_fname_init): Prototype.
7805 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7806 don't call declare_function_name. Call start_fname_decls.
7807 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7808 clobber the line number.
7809 (cp_fname_init): New function.
7810 (start_function): Call start_fname_decls.
7811 (finish_function): Call finish_fname_decls.
7812 * lex.c (reswords): Add slots for __FUNCTION__ et al.
7813 (rid_to_yy): Add mappings for __FUNCTION__ et al.
7814 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7815 * parse.y (VAR_FUNC_NAME): New token.
7816 (primary): Add VAR_FUNC_NAME.
7817 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7818 generation.
7819 (tsubst, FUNCTION_NAME case): Remove.
7820 (tsubst_copy, FUNCTION_NAME case): Remove.
7821 (tsubst_expr, DECL_STMT case): Be careful with a
7822 DECL_PRETTY_FUNCTION_P.
7823 (instantiate_decl): Remove function_name_declared_p.
7824 * semantics.c (begin_compound_statement): Don't call
7825 declare_function_name here.
7826 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7827 (finish_translation_unit): Call finish_fname_decls.
7828 (expand_body): Remove function_name_declared_p.
7829 * typeck2.c (digest_init): Allow any ERROR_MARK.
7830
dfbb4f34
NS
78312001-04-24 Nathan Sidwell <nathan@codesourcery.com>
7832
7833 * pt.c (tsubst_decl): Use VOID_TYPE_P.
7834 * semantics.c: Fix some typos.
7835
e2584c52
PE
78362001-04-23 Phil Edwards <pme@sources.redhat.com>
7837
7838 * cp/decl2.c (flag_honor_std): Always initialize to 1.
7839
d4c3ec27
KG
78402001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7841
7842 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7843
2ac8a0f9
JM
78442001-04-23 Jason Merrill <jason_merrill@redhat.com>
7845
7846 * except.c (build_throw): Wrap the initialization of the exception
7847 object in a MUST_NOT_THROW_EXPR.
7848 (do_free_exception): #if 0.
7849
968b956a
MM
78502001-04-20 Mark Mitchell <mark@codesourcery.com>
7851
7852 * cp-tree.h (finish_enum): Change prototype.
7853 * decl.c (finish_enum): Reorganize.
7854 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 7855
aa1826e2
NS
78562001-04-20 Nathan Sidwell <nathan@codesourcery.com>
7857
7858 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7859 't' case.
7860
06d9f09f
NS
78612001-04-20 Nathan Sidwell <nathan@codesourcery.com>
7862
7863 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7864 (layout_empty_base): Return at end flag.
7865 (build_base_field): Likewise.
7866 (build_base_fields): Likewise.
7867 (layout_virtual_bases): Don't add 1 to eoc value.
7868 (end_of_class): Use full size for empty bases.
7869 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7870 empty bases. Don't add 1 to eoc value. Only add trailing padding
7871 if we're an empty class with no empty bases.
7872 (dump_class_hierarchy): Dump size and alignment.
7873
351a0f00
JJ
78742001-04-20 Jakub Jelinek <jakub@redhat.com>
7875
7876 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7877 ICS_BAD_FLAG.
7878
881cae05
JJ
78792001-04-20 Jakub Jelinek <jakub@redhat.com>
7880
7881 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7882 is found, look first if name does not match the structure name.
7883
5d2ed28c
MM
78842001-04-19 Mark Mitchell <mark@codesourcery.com>
7885
7886 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7887 set.
7888 (SET_DECL_LANGUAGE): New macro.
7889 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7890 (pushdecl): Likewise.
7891 (build_library_fn_1): Likewise.
7892 (build_cp_library_fn): Likewise.
7893 (grokfndecl): Likewise.
7894 (grokvardecl): Mark `extern "C"' variables as having C linkage.
7895 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7896 * lex.c (retrofit_lang_decl): Likewise.
7897 * mangle.c (mangle_decl_string): Don't mangle the names of
7898 variables declared with C language linkage.
7899 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 7900
41251458
JDA
79012001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
7902
7903 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7904 flag_access_control from uninitialized storage.
7905
1b4a93f7
MM
79062001-04-15 Mark Mitchell <mark@codesourcery.com>
7907
24272dc0
MM
7908 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7909 * mangle.c (write_pointer_to_member_type): Fix mangling of
7910 pointers to cv-qualified member function types.
7911
1b4a93f7
MM
7912 * init.c (build_delete): Create a SAVE_EXPR for the address if
7913 we're going to use it more than once.
7914
530ec96d
MM
79152001-04-13 Mark Mitchell <mark@codesourcery.com>
7916
7917 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7918 (expand_ptremfunc_cst): Change prototype.
7919 (delta2_from_ptrmemfunc): Remove.
7920 * expr.c (cplus_expand_constant): Adjust call to
7921 expand_ptrmemfunc_cst.
7922 * typeck.c (build_ptrmemfunc1): Simplify.
7923 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7924 results in a constant.
7925 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7926 (delta2_from_ptrmemfunc): Remove.
7927 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 7928
ee8fc32b
JM
79292001-04-12 Jason Merrill <jason_merrill@redhat.com>
7930
7931 * cp-tree.h (decl_namespace_list): New macro.
7932 (struct saved_scope): Add decl_ns_list.
7933 * decl.c (mark_saved_scope): Mark it.
7934 * decl2.c: Lose static decl_namespace_list.
7935 (init_decl2): Don't save it.
7936
48857160
KG
79372001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7938
7939 * cp-tree.h (warn_return_type, yylex): Delete redundant
7940 declarations.
11fe225a 7941
48857160
KG
7942 * decl.c (current_class_depth, global_namespace): Likewise.
7943
7944 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7945
7946 * repo.c (flag_use_repository): Likewise.
7947
845e14ed
KG
79482001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7949
7950 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7951 set_block, pushdecl, getdecls, gettags, init_decl_processing,
7952 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7953 lvalue_or_else, print_lang_statistics, comp_target_types,
7954 unsigned_type, signed_type, signed_or_unsigned_type,
7955 build_function_call, mark_addressable, incomplete_type_error):
7956 Delete redundant declarations.
7957
1951a1b6
JM
79582001-04-11 Jason Merrill <jason_merrill@redhat.com>
7959
7960 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7961 (TYPE_ANONYMOUS_P): New macro.
7962 (TAGGED_TYPE_P): New macro.
7963 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7964 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7965 * tree.c (no_linkage_helper): Likewise.
7966 * semantics.c (begin_class_definition): Likewise.
7967 * pt.c (convert_template_argument): Likewise.
7968 * lex.c (check_for_missing_semicolon): Likewise.
7969
0fb3018c
NS
79702001-04-12 Nathan Sidwell <nathan@codesourcery.com>
7971
7972 * class.c (dfs_unshared_virtual_bases): New function.
7973 (mark_primary_bases): Call it.
7974 (check_bases): Ignore virtual bases when determining
7975 nearly-emptiness.
7976
bbb53468
NS
79772001-04-12 Nathan Sidwell <nathan@codesourcery.com>
7978
7979 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7980
9b7949d5
MM
79812001-04-11 Mark Mitchell <mark@codesourcery.com>
7982
7983 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7984 cloned function to the clone.
7985
d6684bc8
KG
79862001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7987
7988 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7989
7990 * semantics.c: Include expr.h.
7991
a2095778
NS
79922001-04-11 Nathan Sidwell <nathan@codesourcery.com>
7993
7994 * method.c (implicitly_declare_fn): Commonize code for copy ctor
7995 and assignment op. Set TREE_USED for parameter.
7996
78b45a24
MM
79972001-04-10 Mark Mitchell <mark@codesourcery.com>
7998
7999 * class.c (find_final_overrider_data): Add `candidates'.
8000 (dfs_find_final_overrider): Don't issue error messages
8001 prematurely.
8002 (find_final_overrider): Issue error messages here.
8003 (build_base_field): Don't warn about amgibuous direct bases here.
8004 (warn_about_ambiguous_direct_bases): New function.
8005 (layout_class_type): Use it.
8006
0450d74d
RH
80072001-04-10 Richard Henderson <rth@redhat.com>
8008
8009 * typeck.c (build_array_ref): Push the array reference inside
8010 COMPOUND_EXPR and COND_EXPR.
8011
79065db2
MM
80122001-04-05 Mark Mitchell <mark@codesourcery.com>
8013
8014 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8015 * decl.c (duplicate_decls): Adjust accordingly.
8016 (maybe_commonize_var): Likewise.
8017 (grokfndecl): Likewise.
8018 (start_function): Likewise.
8019 (start_method): Likewise.
8020 * decl2.c (key_method): Likewise.
8021 (import_export_decl): Likewise.
8022 * method.c (implicitly_declare_fn): Likewise.
8023 * optimize.c (maybe_clone_body): Likewise.
11fe225a 8024
fdecbf8a
BK
80252001-04-05 Benjamin Kosnik <bkoz@redhat.com>
8026
b03eced6 8027 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 8028
0b4c1646
R
8029Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
8030
8031 * search.c (get_dynamic_cast_base_type): When building a new
8032 constant, set its type to ssizetype.
8033
e59d6709
JJ
80342001-04-04 Jakub Jelinek <jakub@redhat.com>
8035
8036 * optimize.c (expand_call_inline): Only add newly inlined statements
8037 into inlined_stmts.
8038
0c918ce5
MM
80392001-04-03 Mark Mitchell <mark@codesourcery.com>
8040
8041 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8042 (OPERATOR_FORMAT): Likewise.
8043 (OPERATOR_TYPENAME_FORMAT): Likewise.
8044 * operators.def: Remove old name-mangling information.
8045 * decl.c (grok_op_properties): Adjust accordingly.
8046 * lex.c (init_operators): Likewise.
8047 * rtti.c (get_tinfo_decl): Issue error messages about types that
8048 have variable size.
8049
92788413
MM
80502001-04-03 Mark Mitchell <mark@codesourcery.com>
8051
11fe225a 8052 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
8053 when processing an inline member function.
8054 * semantics.c (expand_body): Call import_export_decl before
8055 emitting inline functions.
8056
52a11cbf
RH
80572001-03-28 Richard Henderson <rth@redhat.com>
8058
8059 IA-64 ABI Exception Handling:
8060 * cp-tree.def (EH_SPEC_BLOCK): New.
8061 (MUST_NOT_THROW_EXPR): New.
8062 * cp-tree.h: Update changed function declarations.
8063 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8064 (CPTI_CALL_UNEXPECTED): New.
8065 (struct cp_language_function): Rename x_eh_spec_try_block
8066 to x_eh_spec_block.
8067 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 8068 * decl.c (current_binding_level): If no current function
52a11cbf
RH
8069 bindings, revert to scope_chain.
8070 (initialize_predefined_identifiers): Remove __cp_push_exception.
8071 (store_parm_decls): Use begin_eh_spec_block.
8072 (finish_function): Use finish_eh_spec_block.
8073 (mark_lang_function): Update for name changes.
8074 * decl2.c (finish_file): No mark_all_runtime_matches.
8075 * dump.c (cp_dump_tree): Handle new tree codes.
8076 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8077 * except.c (catch_language_init, catch_language): Remove.
8078 (init_exception_processing): Don't set language code.
8079 Initialize call_unexpected_node, protect_cleanup_actions,
8080 eh_personality_libfunc, lang_eh_runtime_type.
8081 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8082 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8083 (prepare_eh_type): Split out type canonicalizations ...
8084 (build_eh_type_type): ... from here.
8085 (build_eh_type_type_ref): Remove.
8086 (mark_all_runtime_matches): Remove.
8087 (build_exc_ptr): New.
8088 (do_begin_catch, do_end_catch): New.
8089 (do_pop_exception): Remove.
8090 (build_terminate_handler): Remove.
8091 (choose_personality_routine): Split out language choice from ...
8092 (initialize_handler_parm): ... here.
8093 Use MUST_NOT_THROW_EXPR.
8094 (expand_start_catch_block): Use do_begin_catch. Simplify Java
8095 exception object handling.
8096 (expand_start_eh_spec, expand_end_eh_spec): Remove.
8097 (expand_exception_blocks, alloc_eh_object): Remove.
8098 (begin_eh_spec_block, finish_eh_spec_block): New.
8099 (do_allocate_exception, do_free_exception): New.
8100 (expand_throw): Merge into ...
8101 (build_throw): ... here. Update for abi.
8102 * expr.c (cplus_expand_expr): No expand_internal_throw.
8103 Handle MUST_NOT_THROW_EXPR.
8104 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8105 * semantics.c (*) Update for except.h name changes.
8106 (genrtl_try_block): No protect_with_terminate.
8107 (genrtl_eh_spec_block): New.
8108 (genrtl_handler): Don't emit the goto here.
8109 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8110 (genrtl_finish_function): Don't expand_exception_blocks.
8111 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8112
826840d9
RH
81132001-03-28 Richard Henderson <rth@redhat.com>
8114
8115 * decl.c (struct named_label_list): Rename eh_region to
8116 in_try_scope, add in_catch_scope.
8117 (struct binding_level): Rename eh_region to is_try_scope,
8118 add is_catch_scope.
8119 (note_level_for_try): Rename from note_level_for_eh.
8120 (note_level_for_catch): New.
8121 (poplevel): Copy both is_try_scope and is_catch_scope to
8122 the named_label_list struct.
8123 (check_previous_goto_1): Don't check for catch block via
8124 DECL_ARTIFICIAL; use in_try_scope instead.
8125 (check_goto): Likewise.
8126 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8127 * except.c (expand_start_catch_block): Call note_level_for_catch.
8128 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8129
531073e7
RH
81302001-03-27 Richard Henderson <rth@redhat.com>
8131
8132 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8133 exceptions_via_longjmp.
8134
8653a2c3
PE
81352001-03-27 Phil Edwards <pme@sources.redhat.com>
8136
8137 * pt.c (check_default_tmpl_args): Make error messages clearer.
8138
81392001-03-26 Phil Edwards <pme@sources.redhat.com>
8140
8141 * error.c: Also undefine 'A' macro used for cp_printers definition.
8142
911e6107
KG
81432001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8144
8145 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8146
005a5cb0
MY
81472001-03-26 Mike Yang <yang@research.att.com>
8148 Mark Mitchell <mark@codesourcery.com>
8149
8150 * dump.c (dump_access): New function.
8151 (cp_dump_tree): Use it. Dump basetype information for class
8152 types.
8153
b850de4f
MM
81542001-03-26 Mark Mitchell <mark@codesourcery.com>
8155
8156 * Makefile.in (optimize.o): Depend on params.h.
8157 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8158 (init_decl_processing): Set flag_no_inline when doing
8159 inlining-on-trees.
8160 * optimize.c: Include params.h.
8161 (struct inline_data): Improve documentation of FNS. Add
8162 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8163 (INSNS_PER_STMT): New macro.
8164 (remap_block): Use CLONING_P.
8165 (inlinable_function_p): Don't inline big functions.
8166 (expand_call_inline): Keep track of how much inlining we've done.
8167 (optimize_function): Set FIRST_INLINED_FN.
8168 (maybe_clone_body): Set CLONING_P.
8169 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8170 tree nodes.
8171 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8172 rest_of_compilation. Clear DECL_RTL for local variables
8173 afterwards.
8174 (clear_decl_rtl): New function.
11fe225a 8175
788bf0e3
NS
81762001-03-26 Nathan Sidwell <nathan@codesourcery.com>
8177
8178 Implement DR 209
8179 * cp-tree.h (skip_type_access_control,
8180 reset_type_access_control): Prototype.
8181 * decl.c (grokdeclarator): Access of friends is not checked.
8182 * parse.y (component_decl_list): Reset type access control.
8183 * semantics.c (decl_type_access_control): Clear
8184 current_type_lookups.
8185 (save_type_access_control): Don't save if not deferring.
8186 (skip_type_access_control, reset_type_access_control): New
8187 functions.
8188 (begin_class_definition): Do type access control for basetypes.
8189 Start deferred access control.
8190 (finish_class_definition): Resume immediate access control if
8191 this is a local class.
8192
730e1556
KG
81932001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8194
8195 * class.c (add_method): Use memcpy/memmove, not bcopy.
8196
8197 * decl.c (duplicate_decls): Likewise.
8198
f1a0345c
JJ
81992001-03-23 Jakub Jelinek <jakub@redhat.com>
8200
8201 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8202 not `_'.
8203
8e4ce833
JJ
82042001-03-23 Jakub Jelinek <jakub@redhat.com>
8205
8206 * decl.c (local_names): Define.
8207 (push_local_name): New.
8208 (grok_reference_init): Return init if initializing static reference
8209 variable with non-constant instead of emitting it.
8210 Move expand_static_init call to cp_finish_decl.
8211 (layout_var_decl): Call push_local_name.
8212 (maybe_commonize_var): Allow inlining functions even if they have
8213 static local variables, use comdat_linkage for them if flag_weak.
8214 (check_initializer): Call obscure_complex_init if
838dfd8a 8215 grok_reference_init returned nonzero.
8e4ce833
JJ
8216 (save_function_data): Clear x_local_names.
8217 (pop_cp_function_context): Free x_local_names.
8218 (mark_inlined_fns): Remove.
8219 (mark_lang_function): Mark x_local_names.
8220 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8221 Mark inlined_fns as tree, remove call to mark_inlined_fns.
8222 * class.c (alter_access): Ensure DECL_ACCESS is never set if
8223 DECL_DISCRIMINATOR_P.
8224 * cp-tree.h (cp_language_function): Add x_local_names.
8225 (lang_decl_flags): Add discriminator into u2.
8226 (lang_decl_inlined_fns): Remove.
8227 (lang_decl): inlined_fns is now a TREE_VEC.
8228 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8229 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8230 TREE_VEC, not a custom structure.
8231 (optimize_function): Likewise.
8232 * mangle.c (discriminator_for_local_entity): Discriminate among
8233 VAR_DECL local entities.
8234 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8235 is not valid.
8236
60c87482
BM
82372001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
8238
8239 Add support for Java interface method calls.
8240 * cp-tree.h (struct lang_type): Add java_interface flag.
8241 (TYPE_JAVA_INTERFACE): New macro.
8242 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8243 by setting TYPE_JAVA_INTERFACE.
8244 * call.c (java_iface_lookup_fn): New static.
11fe225a 8245 (build_over_call): If calling a method declared in a
60c87482
BM
8246 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8247 expression which resolves the function address.
8248 (build_java_interface_fn_ref): New function.
8249
94c7f30b
RH
82502001-03-22 Richard Henderson <rth@redhat.com>
8251
8252 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8253 * except.c: Don't include it.
8254
fd8b7a0e 82552001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 8256 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
8257
8258 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8259 New nonterminals.
8260 (data_def, component_decl): Add reductions to bad_decl.
8261
a1c2b86d
JJ
82622001-03-22 Jakub Jelinek <jakub@redhat.com>
8263
8264 * method.c (do_build_assign_ref): Don't use build_modify_expr for
8265 anonymous aggregates, since they don't have assignment operator
8266 method.
8267 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8268 assignment operators for anonymous structure fields.
8269
46ccf50a
JM
82702001-03-21 Jason Merrill <jason@redhat.com>
8271
8272 * pt.c (instantiate_decl): Abort if we see a member constant
8273 instantiation that doesn't already have its initializer.
8274 Downgrade explicit instantiation without definition to pedwarn.
8275
8276 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8277 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8278 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8279
8280 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8281 (pending_vtables): Remove.
8282 * decl2.c (pending_vtables): Remove.
8283 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8284 CLASSTYPE_VTABLE_NEEDS_WRITING.
8285 (import_export_class): Likewise.
8286 (init_decl2): Don't mark pending_vtables.
8287 * lex.c (handle_pragma_vtable): Just sorry.
8288 * pt.c (instantiate_class_template): Don't mess with
8289 CLASSTYPE_VTABLE_NEEDS_WRITING.
8290 (mark_class_instantiated): Likewise.
8291 * ptree.c (print_lang_type): Don't print it.
8292 * semantics.c (begin_class_definition): Don't set it.
8293
8294 * pt.c (template_tail): Replace with last_pending_template.
8295 (maybe_templates, maybe_template_tail): Remove.
8296 (add_pending_template): Adjust.
8297 (instantiate_pending_templates): Adjust.
8298
8299 * cp-tree.h (struct saved_scope): Remove lang_stack field.
8300 (current_lang_stack): Remove.
8301 * decl.c (maybe_push_to_top_level): Don't initialize it.
8302 (duplicate_decls): Use current_lang_depth.
8303 (xref_basetypes): Likewise.
8304 * class.c (current_lang_depth): New fn.
8305 (push_lang_context): Use more varray functionality.
8306 (pop_lang_context): Likewise.
64d9c3fe
JM
8307
8308 * error.c (GLOBAL_THING): Always use '__'.
8309
1c06710a
MM
83102001-03-21 Mark Mitchell <mark@codesourcery.com>
8311
71cb9286
MM
8312 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8313
1c06710a
MM
8314 * mangle.c (mangle_decl_string): Mangle the names of overloaded
8315 operators, even when they have `extern "C"' linkage.
8316
92643fea
MM
83172001-03-19 Mark Mitchell <mark@codesourcery.com>
8318
8319 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8320 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8321 where it's not necessary.
8322 (add_method): Remove optimization involving comparison of
8323 DECL_ASSEMBLER_NAME.
8324 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8325 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8326 where it's not necessary.
8327 (check_methods): Likewise.
8328 (build_clone): Likewise.
8329 (built_vtt): Likewise.
8330 * cp-tree.h (DECL_NEEDED_P): Likewise.
8331 * decl.c (pushtag): Likewise.
8332 (duplicate_decls): Likewise.
8333 (pushdecl): Likewise.
8334 (builtin_function): Likewise.
8335 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8336 (build_cp_library_fn): Likewise.
8337 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8338 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8339 where it's not necessary.
8340 (make_rtl_for_nonlocal_decl): Likewise.
8341 (cp_finish_decl): Likewise.
8342 (grokfndecl): Likewise.
8343 (grokvardecl): Likewise.
8344 (grokdeclarator): Likewise.
8345 (start_function): Likewise.
8346 (cp_missing_return_ok_p): Likewise.
8347 * decl2.c (grokclassfn): Likewise.
8348 (check_classfn): Likewise.
8349 (finish_static_data_member_decl): Likewise.
8350 (grokfield): Likewise.
8351 * error.c (GLOBAL_IORD_P): Remove.
8352 (dump_global_iord): Improve output.
8353 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8354 * except.c (nothrow_libfn_p): Summarily reject any function not in
8355 namespace-scope.
8356 * init.c (build_java_class_ref): Don't explicitly set
8357 DECL_ASSEMBLER_NAME after calling mangle_decl.
8358 * mangle.c (mangle_decl_string): Handle extern "C" functions.
8359 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8360 * method.c (set_mangled_name_for_decl): Don't explicitly set
8361 DECL_ASSEMBLER_NAME after calling mangle_decl.
8362 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8363 IDENTIFIER_GLOBAL_VALUE for the thunk.
8364 * pt.c (set_mangled_name_for_template_decl): Remove.
8365 (check_explicit_specialization): Don't use it.
8366 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8367 (tsubst_friend_function): Likewise.
8368 (tsubst_decl): Likewise.
8369 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8370 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8371 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
8372 where it's not necessary.
8373 (tinfo_base_init): Likewise.
8374 (create_real_tinfo_var): Likewise.
8375 * search.c (looup_field_1): Likewise.
8376 * semantics.c (finish_named_return_value): Likewise.
8377 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 8378
d064d75a
GDR
83792001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
8380
8381 Correct semantics restrictions checking in throw-expression.
8382 * except.c (is_admissible_throw_operand): New function.
8383 (build_throw): Use it.
8384
a3eab619
MM
83852001-03-14 Mark Mitchell <mark@codesourcery.com>
8386
8387 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8388 and its ilk.
8389
19e7881c
MM
83902001-03-14 Mark Mitchell <mark@codesourcery.com>
8391
8392 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8393 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8394 * decl.c (duplicate_decls): Likewise.
8395 (builtin_function): Likewise.
8396 (build_library_fn): Likewise.
8397 (build_cp_library_fn): Likewise.
8398 (check_initializer): Likewise.
8399 (cp_finish_decl): Likewise.
8400 * decl2.c (grokfield): Likewise.
8401 (grok_function_init): Remove #if 0'd code.
8402 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8403 * friend.c (do_friend): Likewise.
8404 * init.c (get_temp_regvar): Likewise.
8405 * method.c (make_thunk): Likewise.
8406 * pt.c (tsubst_friend_function): Likewise.
8407 (tsubst_decl): Likewise.
8408 (regenerate_decl_from_template): Likewise.
8409 * semantics.c (genrtl_named_return_value): Likewise.
8410 (expand_body): Likewise.
8411 (genrtl_finish_function): Likewise.
8412 * tree.c (cp_tree_equal): Likewise.
11fe225a 8413
78fe06c2
NS
84142001-03-12 Nathan Sidwell <nathan@codesourcery.com>
8415
8416 * call.c (convert_like_real): Add extra semantics to INNER
8417 parameter. Don't convert to temporary if a user conversion
8418 gives us an lvalue that we're about to bind to a reference.
8419 Set INNER to indicate pending reference binding on recursive
8420 calls.
8421
b3e68a79
NB
84222001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
8423
8424 * cp/lex.c: Delete duplicate pending_lang_change.
8425
84262001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
8427
8428 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8429 Similarly.
8430 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8431 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8432
11642c3a
ZW
84332001-03-09 Zack Weinberg <zackw@stanford.edu>
8434
8435 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8436
bb6852eb 84372001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
8438
8439 * cp-tree.h (set_identifier_local_value): Remove unused decl.
8440
cc937581
ZW
84412001-03-06 Zack Weinberg <zackw@stanford.edu>
8442
8443 * spew.c: Remove references to CPP_OSTRING.
8444
d1188d91
AH
84452001-03-06 Andrew Haley <aph@redhat.com>
8446
8447 * typeck.c (convert_arguments): Check that we have an fndecl.
8448
4eaf1d5b
AH
84492001-03-05 Andrew Haley <aph@redhat.com>
8450
8451 * typeck.c (convert_arguments): Don't do ellipsis conversion for
8452 __built_in_constant_p.
8453
7eeb553c
NS
84542001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8455
8456 * typeck.c (build_static_cast): Allow enum to enum conversions
8457 as per DR 128.
8458
d282fcb2
NS
84592001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8460
8461 * class.c (check_field_decls): Pointers to member do not a
8462 non-pod struct make, as per DR 148.
8463
f86fdf68
NS
84642001-03-02 Nathan Sidwell <nathan@codesourcery.com>
8465
8466 * call.c (joust): cp_pedwarn when using gnu extension concerning
8467 worst conversion sequences.
8468
d6edb99e
ZW
84692001-03-01 Zack Weinberg <zackw@stanford.edu>
8470
8471 * decl.c: Replace all uses of 'boolean' with 'bool'.
8472
f7143427
ZW
84732001-03-01 Zack Weinberg <zackw@stanford.edu>
8474
8475 * lang-specs.h: Add zero initializer for cpp_spec field to
8476 all array elements that need one. Don't put an #ifdef inside
8477 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8478 use it.
8479
fbfe8c9e
NS
84802001-03-01 Nathan Sidwell <nathan@codesourcery.com>
8481
8482 Implement using decls inside template functions.
8483 * decl2.c (validate_nonmember_using_decl): Don't special case
8484 fake_std_node in the global namespace. Don't reject early when
8485 processing a template.
8486 (do_local_using_decl): Add to statement tree. Don't do further
8487 processing when building a template.
8488 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8489
4d24a889
NS
84902001-03-01 Nathan Sidwell <nathan@codesourcery.com>
8491
8492 * decl2.c (do_nonmember_using_decl): Don't complain if we find
8493 same function. Do complain about ambiguating extern "C"
8494 declarations.
8495
e5844e6d
NS
84962001-02-28 Nathan Sidwell <nathan@codesourcery.com>
8497
8498 Remove floating point and complex type template constant parms.
8499 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8500 COMPLEX_TYPE extensions.
8501 (invalid_nontype_parm_type_p): Likewise.
8502
788f238c
JO
85032001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
8504
8505 * except.c (call_eh_info): Revert "match_function"'s type.
8506
73ea87d7
NS
85072001-02-27 Nathan Sidwell <nathan@codesourcery.com>
8508
8509 Fix ctor vtable vcall offsets.
8510 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8511 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8512 (get_matching_base): Remove.
8513 (get_original_base): New function.
11fe225a 8514 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
8515 Use a virtual thunk for a ctor vtable with an index
8516 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8517 primary base within a constructor vtable. Only set
8518 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8519 when primary base has been lost.
8520 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8521
fe730161
JO
85222001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
8523
8524 * call.c (joust): Ensure more_specialized()'s argument length
8525 parameter has correct value for constructors.
8526
e5dd4aad
NS
85272001-02-26 Nathan Sidwell <nathan@codesourcery.com>
8528
8529 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 8530
e5dd4aad
NS
8531 * decl.c (mark_inlined_fns): Prototype.
8532
25200ab2
MM
85332001-02-22 Mark Mitchell <mark@codesourcery.com>
8534
8535 * spew.c (yylex): Correct handling of friends.
8536
f58c04ac
MM
85372001-02-22 Mark Mitchell <mark@codesourcery.com>
8538
8539 * mangle.c (write_encoding): Pass write_function_type the
8540 FUNCTION_DECL for the function being encoded.
8541 (write_function_type): Pass it along to write_bare_function_type.
8542 (write_bare_function_type): Pass it along to write_method_parms.
8543 (write_method_parms): Don't mangle the compiler-generated
8544 parameters to a constructor or destructor.
8545
9c96f3f8
AJ
85462001-02-22 Andreas Jaeger <aj@suse.de>
8547
8548 * optimize.c: Include toplev.h for
8549 note_deferral_of_defined_inline_function prototype.
8550
b3bae5e2
JJ
85512001-02-22 Jakub Jelinek <jakub@redhat.com>
8552
8553 * cp-tree.h (struct lang_decl_inlined_fns): New.
8554 (struct lang_decls): Add inlined_fns.
8555 (DECL_INLINED_FNS): New macro.
8556 * optimize.c (struct inline_data): Add inlined_fns.
8557 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8558 (inlinable_function_p): Likewise, fix typo in comment,
8559 function is not inlinable if it already inlined function currently
8560 being optimized.
306ef644 8561 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
8562 (optimize_function): Initialize inlined_fns.
8563 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8564 * decl.c (mark_inlined_fns): New function.
8565 (lang_mark_tree): Call it.
8566
5daf7c0a
JM
85672001-02-21 Jason Merrill <jason@redhat.com>
8568
8569 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8570 (DECL_UNINLINABLE): Move to middle-end.
8571
8572 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8573 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8574 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8575 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8576 parms and outer BLOCK. note_deferral_of_defined_inline_function.
8577
8578 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8579 second parm of op=.
8580
2c0fc02d
MM
85812001-02-19 Mark Mitchell <mark@codesourcery.com>
8582
8583 * decl2.c (set_decl_namespace): Allow explicit instantiations in
8584 any namespace.
8585
612164eb
KL
85862001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8587
8588 * optimize.c (expand_call_inline): Don't walk subtrees of type
8589 nodes.
8590
69a59a49
MM
85912001-02-18 Mark Mitchell <mark@codesourcery.com>
8592
8593 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8594 for a destructor.
8595
e0fff4b3
JM
85962001-02-18 Jason Merrill <jason@redhat.com>
8597
8598 Do put the VTT parameter in DECL_ARGUMENTS.
8599 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8600 (current_vtt_parm): New macro.
8601 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8602 (DECL_HAS_VTT_PARM_P): New macro.
8603 (DECL_VTT_PARM): Remove.
8604 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8605 * decl.c (duplicate_decls): Only copy the operator code if
8606 appropriate.
8607 (start_function): Set current_vtt_parm.
8608 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 8609 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
8610 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
8611 * class.c (build_clone): Maybe remove the VTT parm.
8612 * optimize.c (maybe_clone_body): Set up the VTT parm.
8613 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8614 * call.c (build_over_call): Just allow the VTT arg.
8615 * method.c (make_thunk): Don't set DECL_VTT_PARM.
8616 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8617 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8618 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8619 * error.c (dump_function_decl): Likewise.
8620 * call.c (build_user_type_conversion_1, convert_like_real): Abort
8621 if we try to call a constructor with in-charge or VTT parms.
8622 * method.c (skip_artificial_parms_for): New fn.
8623 * call.c (add_function_candidate, build_over_call): Call it.
8624 * call.c (build_new_method_call): Use current_vtt_parm.
8625 * init.c (expand_virtual_init): Likewise.
8626 * class.c (same_signature_p): No longer static.
8627 * cp-tree.h: Declare it.
8628 * search.c (look_for_overrides_r): Use it.
8629
c750255c
MM
86302001-02-17 Mark Mitchell <mark@codesourcery.com>
8631
8fa33dfa
MM
8632 * cp-tree.h (new_abi_rtti_p): Remove.
8633 (name_mangling_version): Likewise.
8634 (flag_do_squangling): Likewise.
8635 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8636 * decl.c (grokfndecl): Likewise.
8637 * decl2.c (name_mangling_version): Remove.
8638 (flag_do_squangling): Likewise.
8639 (lang_f_options): Remove `squangle'.
8640 (unsupported_options): Add `squangle'.
8641 (cxx_decode_option): Issue a warning about uses of
8642 -fname-mangling-version.
8643 (finish_file): Remove old ABI support.
8644 * pt.c (check_explicit_specialization): Likewise.
8645 (tsubst_decl): Likewise.
8646 * rtti.c (init_rtti_processing): Likewise.
8647 (build_headof): Likewise.
8648 (get_tinfo_decl_dynamic): Likewise.
8649 (tinfo_from_decl): Likewise.
8650 (build_dynamic_cast_1): Likewise.
8651 (synthesize_tinfo_var): Likewise.
12fa82db
MM
8652 * init.c (build_new): Allow enumeration types for the array-bounds
8653 in a direct-new-declarator.
8654
8655 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8656
c750255c
MM
8657 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8658 TREE_PROTECTED from the template being specialized.
8659
a714e5c5
JM
86602001-02-17 Jason Merrill <jason@redhat.com>
8661
8662 * decl2.c (build_artificial_parm): Set TREE_READONLY.
8663
9c96f3f8 8664 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
8665 pointer-to-function or -member-function type.
8666 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8667 a pmf.
8668
8084b91e
MM
86692001-02-17 Mark Mitchell <mark@codesourcery.com>
8670
8671 * call.c (check_dtor_name): Handle template names correctly.
8672
48f22ed2
JM
86732001-02-16 Jason Merrill <jason@redhat.com>
8674
8675 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8676 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8677 * optimize.c (maybe_clone_body): Don't substitute it.
8678 * call.c (build_new_method_call): Check in_chrg instead.
8679 * init.c (expand_virtual_init): Likewise.
8680
e8186ecf
GDR
86812001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
8682
8683 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8684 class-type introduces at least a type-name.
8685
2c1be322
JJ
86862001-02-16 Jakub Jelinek <jakub@redhat.com>
8687
8688 * call.c (convert_like_real): Create a temporary for non-lvalue.
8689
aab8454a
JO
86902001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
8691
8692 * cp-tree.h: Fix typos in comments.
8693
a901fa64
JM
86942001-02-16 Jason Merrill <jason@redhat.com>
8695
8696 * optimize.c (remap_block): If we're compiling a clone, pass the
8697 new block to insert_block.
8698
8853373c
MM
86992001-02-16 Mark Mitchell <mark@codesourcery.com>
8700
8701 * semantics.c (finish_asm_stmt): Robustify.
8702
b60ecc04
MM
87032001-02-15 Mark Mitchell <mark@codesourcery.com>
8704
8705 * pt.c (push_template_decl_real): Don't remangle the name of a
8706 class template.
8707
e658449e
JM
87082001-02-15 Jim Meyering <meyering@lucent.com>
8709
fd48c9b5
DD
8710 * Make-lang.in (c++.install-common): Depend on installdirs.
8711 (c++.install-info): Likewise.
8712 (c++.install-man): Likewise.
e658449e 8713
f1a3f197
MM
87142001-02-15 Mark Mitchell <mark@codesourcery.com>
8715
8716 * typeck2.c (build_m_component_ref): Robustify.
8717
8826b15b
AO
87182001-02-15 Alexandre Oliva <aoliva@redhat.com>
8719
8720 * friend.c (do_friend): Don't take the nested [template] class
8721 into account when deciding whether to warn about the friend
8722 function not referring to a template function.
8723
7161c1a5
JJ
87242001-02-14 Jakub Jelinek <jakub@redhat.com>
8725
8726 * typeck.c (build_unary_op): Clarify error message.
8727
4806765e
AH
87282001-02-08 Aldy Hernandez <aldyh@redhat.com>
8729
a901fa64
JM
8730 * parse.y (component_constructor_declarator): allow optional
8731 parentheses around constructor class name.
4806765e 8732
bfc8e1e2
NS
87332001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8734
8735 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8736 section.
8737 * init.c (emit_base_init): Remove incorrect comment about
8738 virtual bases.
8739 * method.c (make_thunk): Fix comment alignment.
8740
394fd776
NS
87412001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8742
8743 Kill remnants of this is variable.
8744 * cp-tree.h (flag_this_is_variable): Remove.
8745 * decl2.c (flag_this_is_variable): Remove.
8746 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8747 (build_vbase_path): The path is non-static, even in a cdtor.
8748 (resolves_to_fixed_type_p): Add additional return value.
8749 * search.c (init_vbase_pointers): Adjust.
8750 * tree.c (lvalue_p_1): Adjust.
8751 * typeck.c (mark_addressable): Adjust.
8752
d0ab7624
NS
87532001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8754
8755 * pt.c (unify): Don't check cv quals of array types.
8756
7773899b
NS
87572001-02-14 Nathan Sidwell <nathan@codesourcery.com>
8758
8759 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8760 check whether we already have the type.
8761
52682a1b
MM
87622001-02-13 Mark Mitchell <mark@codesourcery.com>
8763
8764 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8765 * call.c (build_op_delete_call): Simplify to remove duplicate
8766 code.
8767 * class.c (clone_function_decl): Don't build the deleting variant
8768 of a non-virtual destructor.
8769 * decl.c (finish_destructor_body): Don't call delete if this is a
8770 non-virtual destructor.
8771 * init.c (build_delete): Explicitly call `operator delete' when
8772 deleting an object with a non-virtual destructor.
9c96f3f8 8773
3b6bd115
JM
87742001-02-13 Jason Merrill <jason@redhat.com>
8775
8776 * lang-specs.h: Add more __EXCEPTIONS.
8777
45abaea8
NS
87782001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8779
8780 * typeck2.c (process_init_constructor): Check
8781 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8782
996065b4
NS
87832001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8784
8785 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8786 Remove spurious information in comment. Allow further
8787 adjustments of REFERENCE_TYPE args.
8788
82c18d5c
NS
87892001-02-12 Nathan Sidwell <nathan@codesourcery.com>
8790
8791 * errfn.c (cp_deprecated): Tweak diagnostic text.
8792 * parse.y (new_initializer): Deprecate initializer lists
8793 extension.
8794
1f84ec23
MM
87952001-02-12 Mark Mitchell <mark@codesourcery.com>
8796
8797 Remove old ABI support.
8798
8c310e3f
MM
87992001-02-11 Mark Mitchell <mark@codesourcery.com>
8800
b1012f1b
MM
8801 * decl2.c (flag_vtable_thunks): Always set it to 1.
8802 (flag_new_abi): Likewise.
8803 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 8804
8c310e3f
MM
8805 * Makefile.in (g++spec.o): Fix typo.
8806
3b635dfc
JM
88072001-02-09 Jason Merrill <jason@redhat.com>
8808
8809 * lang-specs.h: Restore definition of __EXCEPTIONS.
8810
bd0d5d4a
JM
88112001-02-08 Jason Merrill <jason@redhat.com>
8812
8813 * search.c (shared_member_p): New function.
8814 (lookup_field_r): Use it.
8815 * cp-tree.h (SHARED_MEMBER_P): Remove.
8816
8817 * method.c (process_overload_item): Handle template-dependent array
8818 bounds.
8819 * pt.c (type_unification_real): If we end up with undeduced nontype
8820 parms, try again.
8821
8822 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8823 types.
8824
8825 * typeck2.c (friendly_abort): Don't say anything if we have
8826 earlier errors or sorries.
8827
9c96f3f8 8828 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
8829 wchar_t. Ignore if in_system_header.
8830
8831 * decl.c (maybe_push_cleanup_level): New fn...
8832 (start_decl_1): ...split out from here.
8833 * cvt.c (build_up_reference): Use it.
8834 * cp-tree.h: Declare it.
8835
a9374841
MM
88362001-02-07 Mark Mitchell <mark@codesourcery.com>
8837
9c96f3f8 8838 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
8839 spec.
8840
a87b4257
NS
88412001-02-06 Nathan Sidwell <nathan@codesourcery.com>
8842
8843 * pt.c (lookup_template_class): Make sure it's a primary
8844 template or template_template_parm when called from the parser.
8845 (instantiate_template_class): Add assertion.
8846
518fed76
AO
88472001-02-05 Alexandre Oliva <aoliva@redhat.com>
8848
8849 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8850 from error_mark_node.
8851
9965d119
NS
88522001-02-05 Nathan Sidwell <nathan@codesourcery.com>
8853
8854 Fix specification and implementation bugs in V3 ABI
8855 construction vtables.
8856 * cp-tree.h (flag_dump_class_layout): New flag.
8857 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8858 (BINFO_LOST_PRIMARY_P): New flag.
8859 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8860 (BINFO_PRIMARY_MARKED_P): Rename to ...
8861 (BINFO_PRIMARY_P): ... here.
8862 (binfo_via_virtual): New prototype.
8863 * decl2.c (flag_dump_class_layout): New flag.
8864 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8865 use `=' as a file name separator.
8866 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8867 bases.
8868 (build_vtbl_address): If this is a virtual primary base, then
8869 get the vtbl of what it is ultimately primary for.
8870 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8871 for BINFO_PRIMARY_P.
8872 (dfs_skip_nonprimary_vbases_markedp): Likewise.
8873 (get_shared_vbase_if_not_primary): Likewise.
8874 (dfs_get_pure_virtuals): Likewise.
8875 (expand_upcast_fixups): Likewise.
8876 (fixup_virtual_upcast_offsets): Likewise.
8877 (dfs_find_vbase_instance): Likewise.
8878 (find_vbase_instance): Likewise.
8879 (binfo_from_vbase): Adjust comment to reflect reality.
8880 (binfo_via_virtual): New function.
8881 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8882 for binfo walking during VTT construction.
8883 (dfs_mark_primary_bases): Remove.
8884 (force_canonical_binfo_r): New function.
8885 (force_canonical_binfo): New function.
8886 (mark_primary_virtual_base): New function.
8887 (mark_primary_bases): Walk in inheritance graph order, use
8888 mark_primary_virtual_base.
8889 (determine_primary_base): Use some more intermediate variables.
8890 (dfs_find_final_overrider): Don't check for overriding along a
8891 virtual path.
8892 (dfs_modify_vtables): Walk into primary virtual bases too.
8893 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8894 (build_base_fields): Likewise.
8895 (dfs_set_offset_for_unshared_vbases): Likewise.
8896 (layout_virtual_bases): Likewise.
8897 (end_of_class): Likewise.
8898 (finish_struct_1): Call dump_class_hierarchy, if requested.
8899 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8900 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8901 (dump_class_hierarchy): Add file parameter. Append to file, if
8902 required.
8903 (finish_vtbls): Adjust accumulate_vtbl_inits call.
8904 Use canonical base for virtual bases.
8905 (build_vtt): Add more comments. Adjust build_vtt_inits call.
8906 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8907 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8908 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8909 virtual VTTs.
8910 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8911 from DATA. We want virtual primary bases and all bases via virtual.
8912 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8913 virtual base when not a construction vtable.
8914 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8915 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8916 Use canonical bases when processing virtual bases.
8917 (accumulate_vtbl_inits): We're interested in any base via a
8918 virtual path.
8919 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8920 within a construction vtable, determine what is being overridden.
8921 (build_vtbl_initializer): Add more comments
8922 (add_vcall_offset_vtbl_entries_1): Adjust comment.
8923 (build_rtti_vtbl_entries): Check if the base has lost its
8924 primary.
8925
39d6f2e8
MM
89262001-02-05 Mark Mitchell <mark@codesourcery.com>
8927
8928 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8929
400500c4
RK
8930Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8931
8932 * decl.c (pushdecl): Call abort instead of fatal.
8933 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8934 * init.c (build_new_1): Likewise.
8935 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8936 * decl.c (build_typename_type): hash_table_init now returns void.
8937 decl.c (init_decl_processing): Make an error non-fatal.
8938
97458258
MM
89392001-02-04 Mark Mitchell <mark@codesourcery.com>
8940
8941 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8942 Document.
8943 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8944 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8945 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8946 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8947 * decl.c (maybe_commonize_var): Use the new name-mangling where
8948 appropriate.
8949 * decl2.c (comdat_linkage): Enhance comments. Make all
8950 compiler-generated things static, if COMDAT is not available.
8951 (get_tinfo_decl): Do not make typeinfo objects that belong in the
8952 library COMDAT.
8953 (tinfo_base_init): Use the correct mangled name for typeinfo
8954 strings, and push them into the global scope.
8955 (typeinfo_in_lib_p): New function.
8956 (synthesize_tinfo_var): Use it.
8957 (create_real_tinfo_var): Likewise.
9c96f3f8 8958
55de1b66
JJ
89592001-02-03 Jakub Jelinek <jakub@redhat.com>
8960
8961 * decl.c (push_class_binding): Use context_for_name_lookup instead
8962 of CP_DECL_CONTEXT.
8963 * search.c (context_for_name_lookup): Remove static. Check for NULL
8964 context in the loop.
8965 * cp-tree.h (context_for_name_lookup): Add prototype.
8966
e92730aa
JJ
89672001-02-02 Jakub Jelinek <jakub@redhat.com>
8968
8969 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8970 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8971 Remove.
8972 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8973 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8974
049f6ec9
MM
89752001-02-02 Mark Mitchell <mark@codesourcery.com>
8976
8977 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8978 of macros used when compiling g++spec.c.
8979 * g++spec.c (lang_specific_driver): Link with the shared
8980 libgcc by default.
8981
718b8ea5
JM
89822001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
8983
8984 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8985 make_reference_declarator, make_call_declarator), method.c
8986 (implicitly_declare_fn), parse.y (namespace_using_decl,
8987 notype_unqualified_id, expr_or_declarator, new_type_id,
8988 after_type_declarator, direct_after_type_declarator,
8989 notype_declarator, complex_notype_declarator,
8990 complex_direct_notype_declarator, qualified_id,
8991 notype_qualified_id, overqualified_id, direct_new_declarator,
8992 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8993 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8994 instead of build_parse_node.
8995
f2d1f0ba
KG
89962001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8997
8998 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8999 (minus_one_node): Moved to top level gcc directory. Renamed
9000 to integer_minus_one_node.
9001
9002 * init.c (init_init_processing): Don't set minus_one_node.
9003 (build_vec_init): Use integer_minus_one_node.
9004
9005 * rtti.c (get_tinfo_decl_dynamic): Likewise.
9006
6001735e
JJ
90072001-01-28 Jakub Jelinek <jakub@redhat.com>
9008
9009 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9010 identical and they would be replaced with constant, remove
9011 MODIFY_EXPR from the tree.
9012
c913b6f1
KG
90132001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9014
9015 * Make-lang.in: Remove all dependencies on defaults.h.
9016 * call.c: Don't include defaults.h.
9017 * decl.c: Likewise.
9018 * decl2.c: Likewise.
9019 * except.c: Likewise.
9020 * pt.c: Likewise.
9021 * rtti.c: Likewise.
9022 * tree.c: Likewise.
9023 * typeck.c: Likewise.
9024
324ffb8c
JJ
90252001-01-25 Jakub Jelinek <jakub@redhat.com>
9026
9027 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9028 operators even in "C" linkage.
9029 * method.c (set_mangled_name_for_decl): Likewise.
9030 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9031 overloaded operators in "C" linkage.
9032
4b2811e9
NS
90332001-01-24 Nathan Sidwell <nathan@codesourcery.com>
9034
9035 * pt.c (tsubst_decl): Remove IN_DECL parameter.
9036 (tsubst_arg_types): Check parameter is not void.
9037 (tsubst): Adjust tsubst_decl call.
9038
d8caf48e
NS
90392001-01-24 Nathan Sidwell <nathan@codesourcery.com>
9040
9041 * call.c (add_builtin_candidate): Quote std properly, from
9042 previous change.
9043
08511114
KL
90442001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9045
9046 * pt.c (check_explicit_specialization): Clone constructors and
9047 destructors.
9048
92ecdfb7
NS
90492001-01-23 Nathan Sidwell <nathan@codesourcery.com>
9050
9051 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9052 indicates anything special about template depth. Make sure we
9053 only count the user visible template classes.
9054
4cff6abe
NS
90552001-01-23 Nathan Sidwell <nathan@codesourcery.com>
9056
9057 * call.c (build_conv): Typo in comment.
9058 (add_builtin_candidate): Add more explanation.
9059 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9060 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9061 when we have enumeral types.
9062 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9063 candidates for relops and eqops.
9064 (joust): Simplify control flow. Allow a non-template user
9065 function to hide a builtin.
9066
62e4a758
NS
90672001-01-22 Nathan Sidwell <nathan@codesourcery.com>
9068
9069 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9070 (more_specialized): Add deduction parameter.
9071 * call.c (joust): Adjust more_specialized call.
9072 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9073 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9074 (get_bindings_order): Remove.
9075 (get_bindings_real): Add DEDUCE parameter.
9076 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9077 REFERENCE_TYPE jig for DEDUCE_ORDER.
9078 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9079 maybe_adjust_types_for_deduction.
9080 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9081 directly.
9082 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9083 (check_cv_quals_for_unify): Use new unify qualifier flags.
9084 (unify): Clear new unify qualifier flags.
9085 (get_bindings_real): Add DEDUCE parameter.
9086 (get_bindings): Adjust call to get_bindings_real.
9087 (get_bindings_overload): Likewise.
9088 (most_specialized_instantiation): Adjust call to
9089 more_specialized.
9090
2a2a9e5a
JM
90912001-01-19 Jason Merrill <jason@redhat.com>
9092
9093 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9094
9095 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9096 -fnew-abi.
9097
60696c53
JM
90982001-01-19 Ute Pelkmann <scope.muc@t-online.de>
9099
9100 * decl2.c (arg_assoc_class): Fix double iteration logic.
9101
91022001-01-19 Jason Merrill <jason@redhat.com>
9103
9104 * init.c (build_delete): Always call convert_force to strip cv-quals.
9105
9106 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9107 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9108 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9109
1e00f18c
NS
91102001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9111
9112 * search.c (get_vbase_1): Count only virtual bases.
9113
e13bced2
NS
91142001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9115
9116 * class.c (duplicate_tag_error): Robustify flag clearing.
9117
f9c244b8
NS
91182001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9119
9120 * cp-tree.h (lookup_template_class): Add complain parm.
9121 * decl.c (lookup_namespace_name): Adjust call to
9122 lookup_template_class.
9123 (make_typename_type): Likewise.
9124 * semantics.c (finish_template_type): Likewise.
9125 * pt.c (lookup_template_class): Add complain parm. Adjust.
9126 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9127 (tsubst): Likewise.
9128
08c2df0f
NS
91292001-01-19 Nathan Sidwell <nathan@codesourcery.com>
9130
9131 * pt.c (copy_default_args_to_explicit_spec): Preserve
9132 object's CV quals. Reorganize.
9133
f5ceeec8
NS
91342001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9135
9136 * typeck.c (build_modify_expr): Say `initialization' for
9137 INIT_EXPRs.
9138 * init.c (build_default_init): Convert to enumeral type, if
9139 needed.
9140
a1cfa434
JJ
91412001-01-18 Jakub Jelinek <jakub@redhat.com>
9142
9143 * parse.y (nomods_initdcl0): Properly set things up for
9144 initdcl0_innards.
9145
028d1f20
NS
91462001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9147
9148 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9149 (type_unification_real): Set it.
9150 (unify): Use it.
9151
9f724b6a
NS
91522001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9153
9154 * decl.c (finish_destructor_body): Convert to vbase pointer here.
9155
522d6614
NS
91562001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9157
9158 * semantics.c (begin_class_definition): Check we're not inside a
9159 template parm list.
9160
7f805b8f
NS
91612001-01-18 Nathan Sidwell <nathan@codesourcery.com>
9162
9163 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9164 BASELINK_P.
9165
dc3799c1
KL
91662001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9167
9168 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9169 * call.c (build_over_call): Add comment.
9170
bb37c4a5
DB
91712001-01-16 Daniel Berlin <dberlin@redhat.com>
9172
826840d9
RH
9173 * cvt.c (ocp_convert): Handle vector type conversion
9174 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 9175
a26e7fb5
PE
91762001-01-16 Phil Edwards <pme@sources.redhat.com>
9177
9178 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
9179 was given.
9180
11b810f1
NS
91812001-01-15 Nathan Sidwell <nathan@codesourcery.com>
9182
9183 * pt.c (check_nontype_parm): Rename to ...
9184 (invalid_nontype_parm_type_p): ... here.
9185 (process_template_parm): Adjust.
9186 (convert_template_argument): Adjust.
9187
db3f4e4e
NS
91882001-01-15 Nathan Sidwell <nathan@codesourcery.com>
9189
9190 * pt.c (check_nontype_parm): New function.
9191 (process_template_parm): Use it.
9192 (convert_template_argument): Use it.
9193 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9194 member.
9195
ea4f1fce
JO
91962001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
9197
9198 * tree.c: Add defaults.h
9199 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9200 * Make-lang.in (cp/tree.o): Add defaults.h.
9201
1312c143
JM
92022001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9203
9204 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9205
4bc1997b
JM
92062001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9207
9208 * g++.1: Change to be ".so man1/gcc.1".
9209
23de1fbf
JM
92102001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
9211
9212 * Make-lang.in (c++.info, c++.install-info): Build and install g++
9213 internals info.
9214 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9215 ($(srcdir)/cp/g++int.info): New target.
9216 * gxxint.texi: Add info directory entry. Use @@ in email address.
9217 * .cvsignore: Update.
9218
0949f723
NS
92192001-01-12 Nathan Sidwell <nathan@codesourcery.com>
9220
9221 * typeck.c (build_c_cast): Do template processing earlier.
9222 Always pedwarn on array casts.
9223
a8641661
NS
92242001-01-12 Nathan Sidwell <nathan@codesourcery.com>
9225
9226 * friend.c (make_friend_class): Make sure a templated class is
9227 actually a template.
9228
844511c8
NS
92292001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9230
9231 * decl2.c (get_guard): Set linkage from guarded decl.
9232
96a1e32d
NS
92332001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9234
9235 * call.c (convert_default_arg): Check for unprocessed
9236 DEFAULT_ARG.
9237 * cp-tree.h (replace_defarg): Move to spew.c.
9238 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9239 spew.c, which is where they really are.
9240 (done_pending_defargs): Declare.
9241 (unprocessed_defarg_fn): Declare.
9242 * decl.c (replace_defarg): Move to spew.c
9243 * parse.y (structsp): Call done_pending_defargs.
9244 * spew.c (defarg_fns): Rearrange list structure.
9245 (defarg_fnsdone): New static variable.
9246 (defarg_depfns): New static variable.
9247 (init_spew): Adjust.
9248 (add_defarg_fn): Store the type in TREE_TYPE.
9249 (do_pending_defargs): Detect and deal with ordering constraints
9250 and circularity.
9251 (done_pending_defargs): New function.
9252 (unprocessed_defarg_fn): New function.
9253 (replace_defarg): Moved from decl.c. Robustify. Don't save
9254 if circularity detected.
9255
34e225a3
NS
92562001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9257
9258 * pt.c (unify): Check array has a domain, before checking
9259 whether it is variable sized.
9260
98979fe0
NS
92612001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9262
9263 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9264 parameters with pointers to arrays of unknown bound.
9265
b37bf5bd
NS
92662001-01-11 Nathan Sidwell <nathan@codesourcery.com>
9267
9268 * parse.y (template_parm_header, template_spec_header): New
9269 reductions. Split out from ...
9270 (template_header): ... here. Use them.
9271 (template_template_parm): Use template_parm_header.
9272 * semantics.c (finish_template_template_parm): Add assert.
9273
6c418184
MM
92742001-01-10 Mark Mitchell <mark@codesourcery.com>
9275
792508b5
MM
9276 * mangle.c (write_builtin_type): Fix thinko.
9277
8afa707f
MM
9278 * pt.c (copy_default_args_to_explicit_spec_1): New function.
9279 (copy_default_args_to_explicit_spec): Likewise.
9280 (check_explicit_specialization): Use it.
9281
6c418184
MM
9282 * class.c (finish_struct_1): Remove last argument in call to
9283 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9284 * decl.c (builtin_function): Likewise.
9285 (build_cp_library_fn): Likewise.
9286 (check_initializer): Likewise.
9287 (make_rtl_for_nonlocal_decl): Likewise.
9288 (cp_finish_decl): Likewise.
9289 (start_function): Likewise.
9290 * decl2.c (finish_anon_union): Likewise.
9291 * friend.c (do_friend): Likewise.
9292 * init.c (build_java_class_ref): Likewise.
9293 * method.c (make_thunk): Likewise.
9294 * pt.c (tsubst_friend_function): Likewise.
9295 * semantics.c (expand_body): Likewise.
9296
31d95fc6
MM
92972001-01-10 Mark Mitchell <mark@codesourcery.com>
9298
9299 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9300 looking at DECL_CLONED_FUNCTION for non-functions.
9301
31bb3027
NS
93022001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9303
9304 * error.c (dump_template_parameter): Use parm to determine how
9305 to print default value.
9306
fd3f43e7
NS
93072001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9308
9309 * class.c (duplicate_tag_error): Clear more flags.
9310
042b4c4e
NS
93112001-01-10 Nathan Sidwell <nathan@codesourcery.com>
9312
9313 * call.c (build_new_method_call): Use binfo_for_vbase.
9314
a7537031
JM
93152001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
9316
9317 * cp-tree.h (flag_cond_mismatch): Don't declare.
9318 * decl2.c (flag_cond_mismatch): Don't define.
9319 (lang_f_options): Remove cond-mismatch.
9320 (unsupported_options): Add cond-mismatch.
9321
186c0fbe
NS
93222001-01-09 Nathan Sidwell <nathan@codesourcery.com>
9323
9324 * class.c (handle_using_decl): Reject using of constructor name
9325 of sourcing class. Allow injecting of a method with same name as
9326 nested class. Fixup error messages.
9327
28ec8d6b
JM
93282001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
9329
9330 * decl2.c (lang_decode_option): Handle -Wformat=2.
9331
3febd123
NS
93322001-01-08 Nathan Sidwell <nathan@codesourcery.com>
9333
9334 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9335 initialized_in_class.
9336 (DECL_DEFINED_IN_CLASS_P): Rename to ...
9337 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9338 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9339 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9340 * pt.c (check_default_tmpl_args): Adjust for
9341 DECL_INITIALIZED_IN_CLASS_P.
9342 (instantiate_class_template): Likewise.
9343 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 9344
3febd123
NS
9345 * class.c (finish_struct): Constify saved_filename.
9346
1f0d71c5
NS
93472001-01-08 Nathan Sidwell <nathan@codesourcery.com>
9348
9349 * class.c (duplicate_tag_error): Adjust diagnostic.
9350 (finish_struct): Locally set location to start of struct.
9351 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9352
5bf15e84 93532001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
9354
9355 * decl.c (struct binding_level): Adjust class_shadowed comments
9356 to reflect reality.
aba649ba 9357 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
9358 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9359 Don't set TREE_VALUE on the class_shadowed list.
9360
23d4e4cc 93612001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
9362
9363 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
9364 * init.c (build_java_class_ref): When using the new ABI, search
9365 `class$' and have it mangled with `mangle_decl.'
9366 * mangle.c (write_java_integer_type_codes): New function.
9367 (write_builtin_type): Detect and mangle Java integer and real
9368 types.
9c96f3f8 9369
0c58da3e
MM
93702001-01-07 Mark Mitchell <mark@codesourcery.com>
9371
9372 * decl2.c (grokfield): Don't accept `asm' specifiers for
9373 non-static data members.
9374
45b8ddb4
KG
93752001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9376
9377 * expr.c (cplus_expand_expr): Don't reset `target'.
9378
96302433
NB
93792001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
9380
826840d9 9381 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 9382
220bce48
NS
93832001-01-05 Nathan Sidwell <nathan@codesourcery.com>
9384
9385 * parse.y (template_datadef): Check for error_mark_node.
9386
bfa2cb33
NS
93872001-01-05 Nathan Sidwell <nathan@codesourcery.com>
9388
9389 * cp-tree.def (DEFAULT_ARG): Make `x' class.
9390
eaa7c03f
JM
93912001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
9392
9393 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9394 (record_builtin_type): Make non-static.
9395 (flag_short_double): Don't declare.
9396 (init_decl_processing): Remove the creation of many tree nodes now
9397 in c_common_nodes_and_builtins.
9398 (build_void_list_node): New function.
9399 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9400 * cp-tree.h (flag_short_wchar): Don't declare.
9401
3af4c257
MM
94022001-01-04 Mark Mitchell <mark@codesourcery.com>
9403
9404 * call.c (build_conv): Don't use build1 for USER_CONV.
9405 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9406
03dc0325
JM
94072001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
9408
9409 * lex.c (lang_init): Call c_common_lang_init.
9410
3c505507
NS
94112001-01-03 Nathan Sidwell <nathan@codesourcery.com>
9412
9413 * search.c (lookup_fnfields_here): Remove.
9414 (look_for_overrides_r): Use lookup_fnfields_1.
9415 Ignore functions from using declarations.
9416
03378143
NS
94172001-01-03 Nathan Sidwell <nathan@codesourcery.com>
9418
9419 Implement exceptions specifiers for implicit member functions.
9420 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9421 * method.c (synthesize_exception_spec): New function.
9422 (locate_dtor, locate_ctor, locate_copy): New functions.
9423 (implicitly_declare_fn): Generate the exception spec too.
9424 * search.c (check_final_overrider): Check artificial functions
9425 too.
9c96f3f8 9426 * typeck2.c (merge_exception_specifiers): New function.
03378143 9427
f30efcb7
JM
94282001-01-03 Jason Merrill <jason@redhat.com>
9429
9430 * init.c (build_default_init): New fn.
9431 (perform_member_init): Split out from here.
9432 (build_new_1): Use it. Simplify initialization logic.
9433 (build_vec_init): Take an array, rather than a pointer and maxindex.
9434 Speed up simple initializations. Don't clean up if we're assigning.
9435 * cp-tree.h: Adjust.
9436 * decl2.c (do_static_initialization): Remove TREE_VEC case.
9437 * parse.y (new_initializer): Return void_zero_node for ().
9438 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9439 * typeck2.c (digest_init): Only complain about user-written
9440 CONSTRUCTORs.
9441
a412bf75
MS
94422000-12-22 Mike Stump <mrs@wrs.com>
9443
9444 * decl2.c: (max_tinst_depth): Increase to 50.
9445
4890c2f4
MM
94462001-01-02 Mark Mitchell <mark@codesourcery.com>
9447
9448 * class.c (invalidate_class_lookup_cache): Zero the
9449 previous_class_values.
9450 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9451 TREE_INT_CST_HIGH.
9452 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9453 * decl.c (free_bindings): New variable.
9454 (push_binding): Don't create a new binding if we have one on the
9455 free list.
9456 (pop_binding): Put old bindings on the free list.
9457 (init_decl_processing): Use size_int, not build_int_2.
9458 Register free_bindings as a GC root.
9459 (cp_make_fname_decl): Use size_int, not build_int_2.
9460 (push_inline_template_parms_recursive): Likewise.
9461 (end_template_parm_list): Likewise.
688f6688 9462 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
9463 (tsubst_template_parms): Use size_int, not build_int_2.
9464 (tsubst): Likewise.
9465 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 9466
4f78b9a8
RH
94672001-01-02 Richard Henderson <rth@redhat.com>
9468
9469 * parse.y (asm): Set ASM_INPUT_P.
9470
3c8c2a0a
JM
94712001-01-02 Jason Merrill <jason@redhat.com>
9472
96d6c610
JM
9473 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9474 for v3 ABI.
9475
9476 * typeck.c (cp_truthvalue_conversion): New fn.
9477 * cvt.c (ocp_convert): Use it.
9478
9479 * cp-tree.h: Lose c-common.c decls.
9480
9481 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9482 * cvt.c (convert_to_void): Use type_unknown_p.
9483
9c96f3f8 9484 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
9485 pointer-to-member types.
9486
9487 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
9488 parse.y as C.
9489
9490 * call.c (build_new_method_call): Do evaluate the object parameter
9491 when accessing a static member.
9492 * typeck.c (build_component_ref): Likewise.
9493
d363e7bf
AJ
94942001-01-02 Andreas Jaeger <aj@suse.de>
9495
9496 * decl.c (cp_missing_noreturn_ok_p): New.
9497 (init_decl_processing): Set lang_missing_noreturn_ok_p.
9498
77f5250d
JJ
94992000-12-29 Jakub Jelinek <jakub@redhat.com>
9500
9501 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9502
31a714f6
MM
95032000-12-29 Mark Mitchell <mark@codesourcery.com>
9504
9505 * class.c (pushclass): Remove #if 0'd code.
9506 * cp-tree.h (overload_template_name): Remove.
9507 * decl.c (store_bindings): Simplify.
9508 (pop_from_top_level): Likewise.
9509 * pt.c (overload_template_name): Remove.
d363e7bf 9510 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
9511 needed.
9512
414ea4aa
MM
95132000-12-28 Mark Mitchell <mark@codesourcery.com>
9514
9515 * pt.c (register_local_specialization): Don't return a value.
9516 (lookup_template_class): Use move-to-front heuristic when looking
9517 up template instantiations.
9518 (instantiate_decl): Only push_to_top_level when we're actually
9519 going to instantiate the template.
9520
6f18f7e9
HPN
95212000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
9522
9523 * search.c (binfo_for_vtable): Return least derived class, not
9524 most. Handle secondary vtables.
9525
e5214479
JM
95262000-12-22 Jason Merrill <jason@redhat.com>
9527
3c8c2a0a
JM
9528 * pt.c (more_specialized): Don't optimize len==0.
9529 (fn_type_unification): If we're adding the return type, increase len.
9530
ebb1abc3
JM
9531 * typeck.c (build_binary_op): Fix pmf comparison logic.
9532
c939ca5f
JM
9533 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9534 DECL_STATIC_FUNCTION_P.
9535
e6fe680d
JM
9536 * semantics.c (genrtl_finish_function): Don't try to jump to
9537 return_label unless it exists.
9538
e5214479
JM
9539 In partial ordering for a call, ignore parms for which we don't have
9540 a real argument.
9541 * call.c (joust): Pass len to more_specialized.
9542 (add_template_candidate_real): Strip 'this', pass len.
9543 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
9544 (get_bindings_order): New fn. Pass len down.
9545 (get_bindings_real): Strip 'this', pass len.
9546 (fn_type_unification): Likewise.
9547 (type_unification_real): Succeed after checking 'len' args.
9548 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 9549 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
9550 pass len.
9551
95522000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
9553
9554 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9555 DECL_TEMPLATE_RESULT.
9556
9557 * search.c (lookup_field_r): Call lookup_fnfields_1, not
9558 lookup_fnfields_here.
9559
9560 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9561
9562 * call.c (build_object_call): Also allow conversions that return
9563 reference to pointer to function.
9564 (add_conv_candidate): Handle totype being ref to ptr to fn.
9565 (build_field_call): Also allow members of type reference to function.
9566 Lose support for calling pointer to METHOD_TYPE fields.
9567
9568 * error.c (dump_expr): Handle *_CAST_EXPR.
9569
9570 * typeck2.c (build_scoped_ref): Always convert to the naming class.
9571
9572 * tree.c (break_out_cleanups): Lose.
9573 * cp-tree.h: Remove prototype.
9574 * typeck.c (build_component_ref): Don't break_out_cleanups.
9575 (build_compound_expr): Likewise.
9576 * semantics.c (finish_expr_stmt): Likewise.
9577
3e4d04a1
RH
95782000-12-20 Richard Henderson <rth@redhat.com>
9579
9580 * cp-tree.h: Update declarations.
9581 * decl.c (finish_case_label): Return the new stmt node.
9582 * semantics.c (finish_goto_stmt): Likewise.
9583 (finish_expr_stmt, finish_return_stmt): Likewise.
9584 (finish_break_stmt, finish_continue_stmt): Likewise.
9585 (finish_asm_stmt): Likewise.
9586 * parse.y (already_scoped_stmt): Set STMT_LINENO.
9587 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9588 (simple_if, simple_stmt): Return the new stmt node.
9589 (save_lineno): New.
9590
20d380b1
JM
95912000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9592
9593 * cp-tree.h: Don't declare warn_long_long.
9594
221c7a7f
KL
95952000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9596
9597 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9598 IS_AGGR_TYPE.
9599
b429fdf0
KL
96002000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9601
9602 * pt.c (unify): Handle when both ARG and PARM are
9603 BOUND_TEMPLATE_TEMPLATE_PARM.
9604
c2beae77
KL
96052000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9606
9607 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9608 DECL_TEMPLATE_PARM_P.
9609
c3e899c1
JM
96102000-12-15 Jason Merrill <jason@redhat.com>
9611
96790071
JM
9612 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
9613
8d42565b
JM
9614 * init.c (build_new_1): Don't strip quals from type.
9615
fab09a24
JM
9616 * decl.c (pushdecl): Don't check for linkage on a non-decl.
9617
c3e899c1
JM
9618 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9619
9620 * call.c (build_new_function_call): Lose space before paren in
9621 error message.
9622 (build_new_method_call): Likewise.
9623
9624 * typeck2.c (build_m_component_ref): Propagate quals from datum.
9625
edac124d
KL
96262000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9627
9628 * pt.c (check_explicit_specialization): Propagate default
9629 function arguments to explicit specializations.
9630
31750649 96312000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
9632
9633 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9634 and <? operators.
9635
5e818b93
JM
96362000-12-08 Jason Merrill <jason@redhat.com>
9637
9638 * error.c (dump_function_name): Don't let the user see __comp_ctor.
9639
9640 Clean up copy-initialization in overloading code.
9641 * call.c (build_user_type_conversion_1): Die if we are asked to
9642 convert to the same or a base type.
9643 (implicit_conversion): Avoid doing so. Lose reference binding code.
9644 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9645 direct-initialization. Also do direct-init part of copy-init.
9646 (build_user_type_conversion): Don't provide context to convert_like.
9647 * cvt.c (ocp_convert): build_user_type_conversion will now provide
9648 the constructor call for copy-init.
9649
9650 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9651 instantiation of a member template.
9652 (do_decl_instantiation): Not here.
9653
38da6039
NS
96542000-12-07 Nathan Sidwell <nathan@codesourcery.com>
9655
9656 * class.c (check_field_decls): Don't special case anonymous
9657 fields in error messages.
c9407e4c 9658 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 9659
38da6039
NS
9660 * tree.c (pod_type_p): Use strip_array_types.
9661 (cp_valid_lang_attribute): Likewise.
9662 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9663 multiple evaluations.
d363e7bf 9664 (cp_has_mutable_p): Use strip_array_types.
38da6039 9665
a11d04b5
NS
96662000-12-07 Nathan Sidwell <nathan@codesourcery.com>
9667
9668 * cp-tree.h (sufficient_parms_p): Declare new function.
9669 * call.c (sufficient_parms_p): New function, broken out of ...
9670 (add_function_candidate): ... here. Use it.
9671 (add_conv_candidate): Use it.
9672 * decl.c (grok_ctor_properties): Use it.
9673
5eec2847
JJ
96742000-12-07 Jakub Jelinek <jakub@redhat.com>
9675
9676 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9677
c907e684
JM
96782000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
9679
9680 * decl2.c (lang_decode_option): Handle -Wformat-security.
9681
74601d7c
KL
96822000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9683
9684 * pt.c (verify_class_unification): New function.
9685 (get_class_bindings): Use it.
9686 (try_class_unification): Tidy.
9687 (unify): Handle when argument of a template-id is not
9688 template parameter dependent.
9689 (template_args_equal): Handle when TREE_CODE's do not match.
9690
8954e858
AO
96912000-12-06 Alexandre Oliva <aoliva@redhat.com>
9692
9693 * lang-specs.h (c++): When invoking the stand-alone preprocessor
9694 for -save-temps, pass all relevant -Defines to it, and then don't
9695 pass them to cc1plus.
9696
3dc9aec6
WC
96972000-12-05 Will Cohen <wcohen@redhat.com>
9698
9699 * decl.c (finish_case_label): Cleared
9700 more_cleanups_ok in surrounding function scopes.
9701 (define_label): Likewise.
9702
cbb40945
NS
97032000-12-05 Nathan Sidwell <nathan@codesourcery.com>
9704
9705 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9706 (get_matching_virtual): Remove.
9707 (look_for_overrides): Declare new function.
9708 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9709 DECL_VINDEX here.
9710 * class.c (check_for_override): Move base class iteration code
9711 to look_for_overrides.
9712 * search.c (next_baselink): Remove.
9713 (get_virtuals_named_this): Remove.
9714 (get_virtual_destructor): Remove.
9715 (tree_has_any_destructors_p): Remove.
9716 (struct gvnt_info): Remove.
9717 (check_final_overrider): Remove `virtual' from error messages.
9718 (get_matching_virtuals): Remove. Move functionality to ...
9719 (look_for_overrides): ... here, and ...
9720 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9721 to be overriding.
9722
61402b80
NS
97232000-12-05 Nathan Sidwell <nathan@codesourcery.com>
9724
9725 * typeck.c (get_delta_difference): If via a virtual base,
9726 return zero.
9727 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9728 adjustment.
9729
39abc9a6
RH
97302000-12-04 Richard Henderson <rth@redhat.com>
9731
9732 * error.c (dump_tree): Use output_add_string not OB_PUTS.
9733
c00996a3
JM
97342000-12-04 Jason Merrill <jason@redhat.com>
9735
9736 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 9737 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
9738 type_for_mode.
9739 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9740 Pass intSI_type_node and the like through type_for_mode.
9741 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9742 * pt.c (tsubst, unify): Likewise.
9743 * tree.c (walk_tree): Likewise.
9744 * error.c (dump_type): Likewise.
9745 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 9746
c00996a3
JM
9747 * Make-lang.in: Tweak top comment for emacs.
9748 (cp/TAGS): Restore.
9749
9750 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9751
c00996a3
JM
9752 * class.c (clone_function_decl): Robustify.
9753
97542000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
9755
9756 * decl.c (store_bindings): Only search in the non modified
9757 old_bindings for duplicates.
9758
00bb3dad
NS
97592000-12-04 Nathan Sidwell <nathan@codesourcery.com>
9760
9761 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9762 TYPE_POLYMORPHIC_P.
d363e7bf 9763
00bb3dad
NS
9764 * typeck.c (build_static_cast): Remove unused variable.
9765
dc957d14
KL
97662000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9767
9768 * pt.c: Fix typo in comment.
9769
4d808927
JM
97702000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
9771
9772 * decl2.c (warn_format): Remove definition.
9773 (lang_decode_option): Handle -Wformat-nonliteral,
9774 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
9775
5fd8e536
JM
97762000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
9777
9778 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9779 (init_decl_processing): Don't create string_type_node,
9780 const_string_type_node, wint_type_node, intmax_type_node,
9781 uintmax_type_node, default_function_type, ptrdiff_type_node and
9782 unsigned_ptrdiff_type_node. Adjust position of call to
9783 c_common_nodes_and_builtins.
9784 (identifier_global_value): New function.
9785
13f9714b
NS
97862000-12-01 Nathan Sidwell <nathan@codesourcery.com>
9787
9788 * call.c (standard_conversion): Reject pointer to member
9789 conversions from ambiguous, inaccessible or virtual bases.
9790 * typeck.c (build_static_cast): Don't check pointers to members
9791 specially.
9792
31b1b957
NS
97932000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9794
9795 * method.c (do_build_copy_constructor): Preserve cv
9796 qualifications when accessing source object members.
9797 (do_build_assign_ref): Likewise. Remove separate diagnostics for
9798 unnamed fields.
9799
717e3f73
NS
98002000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9801
9802 * method.c (do_build_assign_ref): Construct appropriately
9803 CV-qualified base reference. Don't allow const casts in base
9804 conversion.
9805
2c92b94d
NS
98062000-11-30 Nathan Sidwell <nathan@codesourcery.com>
9807
9808 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9809 incomplete return type.
9810
bb92901d
NS
98112000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9812
9813 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9814 * semantics.c (finish_base_specifier): Accept a _TYPE not a
9815 _DECL.
9816
2f3608c3
NS
98172000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9818
9819 * spew.c (yyerror): Cope if yylval.ttype is NULL.
9820
eeb75383
NS
98212000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9822
9823 * decl.c (grokdeclarator): Diagnose undefined template contexts.
9824
5ee4cc26
NS
98252000-11-28 Nathan Sidwell <nathan@codesourcery.com>
9826
9827 * decl.c (grokdeclarator): Do type access control on friend
9828 class.
9829
76e57b45
NS
98302000-11-27 Nathan Sidwell <nathan@codesourcery.com>
9831
9832 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9833 bison parser ickiness.
9834 * pt.c (tsubst_friend_function): Enter namespace scope when
9835 tsubsting the function name.
9836 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9837
f9825168
NS
98382000-11-27 Nathan Sidwell <nathan@codesourcery.com>
9839
9840 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9841 * cvt.c (cp_convert_to_pointer): Add force parameter.
9842 Allow conversions via virtual base if forced.
9843 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9844 (ocp_convert): Likewise.
9845 * search.c (binfo_from_vbase): Return the virtual base's binfo.
9846 * typeck.c (get_delta_difference): Adjust handling of virtual
9847 bases.
9848
9ccb25d5
MM
98492000-11-26 Mark Mitchell <mark@codesourcery.com>
9850
9851 * tree.c (struct list_hash): Remove.
9852 (list_hash_table): Make it be an htab.
9853 (struct list_proxy): New type.
9854 (list_hash_eq): New function.
9855 (list_hash_pieces): Renamed from ...
9856 (list_hash): ... this.
9857 (list_hash_lookup): Remove.
9858 (list_hash_add): Remove.
9859 (hash_tree_cons): Use the generic hashtable.
9860 (mark_list_hash): Remove.
9861 (init_tree): Create the hashtable.
9862
9399bad3
JM
98632000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
9864
9865 * method.c (build_mangled_C9x_name): Rename to
9866 build_mangled_C99_name. Change C9X references in comments to
9867 refer to C99.
9868
2f401cc8
NS
98692000-11-24 Nathan Sidwell <nathan@codesourcery.com>
9870
9871 * parse.y (unary_expr): Move VA_ARG from here ...
9872 (primary): ... to here.
9873
3d7e9ba4
NS
98742000-11-24 Nathan Sidwell <nathan@codesourcery.com>
9875
9876 * semantics.c (finish_id_expr): If type is error_mark, return
9877 error_mark.
9878
ab097535
NS
98792000-11-23 Nathan Sidwell <nathan@codesourcery.com>
9880
9881 * pt.c (lookup_template_class): Simplify loop exit constructs.
9882 Cope when there is no partial instantiation of a template
9883 template member.
9884
9196ece5
R
9885Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
9886
9887 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9888
cac78ea2
MM
98892000-11-22 Mark Mitchell <mark@codesourcery.com>
9890
6e1b44bc
MM
9891 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9892 prefix.
9893
cac78ea2
MM
9894 * pt.c (do_decl_instantiate): Explicitly clone constructors and
9895 destructors that haven't already been cloned.
9896
3aac38d7
RH
98972000-11-20 Richard Henderson <rth@redhat.com>
9898
9899 * parse.y (yyparse_1): Rename the parser entry point.
9900
99012000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
9902
9903 * mangle.c (write_name): Use <unscoped-name> for names directly in
9904 function scope.
9905 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 9906
447306fa
NS
99072000-11-20 Nathan Sidwell <nathan@codesourcery.com>
9908
9909 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9910 * parse.y (extdef): Add EXPORT reduction.
9911 * spew.c (yylex): Don't skip export here.
9912
2650255a
MM
99132000-11-19 Mark Mitchell <mark@codesourcery.com>
9914
9915 * decl.c (init_decl_processing): Correct name of pure virtual
9916 function under the new ABI.
9917 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9918 (throw_bad_typeid): Likewise for bad typeid function.
9919
0657c69c
MM
99202000-11-18 Mark Mitchell <mark@codesourcery.com>
9921
04f3dc2b
MM
9922 * decl.c (grokparms): Don't even function types of `void' type,
9923 either.
9924 * mangle.c (write_type): Don't crash when confronted with the
9925 error_mark_node.
9926
0657c69c
MM
9927 * decl.c (grokparms): Don't create parameters of `void' type.
9928
a8a05998
ZW
99292000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
9930
9931 * lex.c (mark_impl_file_chain): Delete.
9932 (init_parse): Remove call to ggc_add_string_root. No need to
9933 ggc_strdup a string constant. Do not add impl_file_chain to GC
9934 roots.
9935 (handle_pragma_implementation): No need to ggc_strdup main_filename.
9936
35728a80
NS
99372000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9938
9939 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9940
5cce22b6
NS
99412000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9942
9943 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9944 * decl.c (grokdeclarator): Don't reject void parms here.
9945 (require_complete_types_for_parms): Simplify, use
9946 complete_type_or_else.
9947 (grokparms): Remove bitrot. Remove funcdef parm.
9948 Deal with ellipsis parm lists here.
9949 * semantics.c (finish_parmlist): Don't append void_list_node
9950 here. Set PARMLIST_ELLIPSIS_P.
9951
146c8d60
NS
99522000-11-17 Nathan Sidwell <nathan@codesourcery.com>
9953
d30d6e7a 9954 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
9955 excessive diagnostics.
9956
520a57c8
ZW
99572000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
9958
9959 * lex.c (struct impl_files, internal_filename): Constify a char *.
9960
43048a06
MM
99612000-11-16 Mark Mitchell <mark@codesourcery.com>
9962
9963 * mangle.c (write_special_name_constructor): Don't generate
9964 assembler junk when confronted with an old-style constructor.
9965 (write_special_name_destructor): Likewise.
9966 (mangle_decl_string): Do it here instead.
9967
cdb71673
NS
99682000-11-16 Nathan Sidwell <nathan@codesourcery.com>
9969
9970 * call.c (op_error): Make error messages clearer.
9971
62136084
MM
99722000-11-15 Mark Mitchell <mark@codesourcery.com>
9973
9974 * decl.c (wrapup_globals_for_namespace): Don't mark things
9975 TREE_ASM_WRITTEN when they're not.
9976
ee3400e8
JM
99772000-11-15 Jason Merrill <jason@redhat.com>
9978
9979 * typeck2.c (friendly_abort): Uncount the error before handing
9980 off to fancy_abort.
9981
71631a1f
NS
99822000-11-15 Nathan Sidwell <nathan@codesourcery.com>
9983
9984 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9985
79cda2d1
MM
99862000-11-14 Mark Mitchell <mark@codesourcery.com>
9987
9988 * class.c (build_vtbl_initializer): Fix typo in comment.
9989 * typeck.c (expr_sizeof): Don't crash on errors.
9990
2567bc56
JW
99912000-11-14 Jim Wilson <wilson@redhat.com>
9992
9993 * lang-specs.h: Add %2 after %(cc1_options).
9994
8422942c
RH
99952000-11-14 Richard Henderson <rth@redhat.com>
9996
9997 * typeck.c (c_sizeof): Be strict about casting result value
9998 back to c_size_type_node.
9999 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10000
19552aa5
JM
100012000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
10002
10003 * typeck.c (build_unary_op): Use boolean_increment from
10004 c-common.c, moving the relevant code there.
10005
d96a6d1a
JM
100062000-11-11 Jason Merrill <jason@redhat.com>
10007
10008 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
10009
10010 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10011 in inlines.
10012
4e135bdd
KG
100132000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10014
10015 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10016 * lex.c (copy_lang_decl): Likewise.
10017
0a7394bc
MM
100182000-11-09 Mark Mitchell <mark@codesourcery.com>
10019
13507bd8
MM
10020 * dump.c (cp_dump_tree): Don't dump function bodies here.
10021
0a7394bc
MM
10022 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10023 (dump.o): Update dependency list.
10024 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10025 (flag_dump_translation_unit): Likewise.
10026 (CP_TYPE_QUALS): Adjust definition.
10027 (DECL_C_BIT_FIELD): Remove.
10028 (SET_DECL_C_BIT_FIELD): Likewise.
10029 (CLEAR_DECL_C_BIT_FIELD): Likewise.
10030 (add_maybe_template): Likewise.
10031 (strip_array_types): Likewise.
10032 (dump_node_to_file): Likewise.
10033 (cp_dump_tree): New function.
10034 * decl.c (init_decl_processing): Set lang_dump_tree.
10035 * decl2.c (flag_dump_translation_unit): Remove.
10036 * dump.c: Move most of it to ../c-dump.c.
10037 (cp_dump_tree): New function.
10038 * pt.c (add_maybe_template): Remove.
10039 * typeck.c (strip_array_types): Likewise.
a8a05998 10040
5362b086
EC
100412000-11-07 Eric Christopher <echristo@redhat.com>
10042
492cca24
JM
10043 * decl.c (init_decl_processing): Change definition of
10044 __wchar_t to wchar_t. Remove artificial declaration of
10045 wchar_t.
10046 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 10047
5361cbb7
NS
100482000-11-09 Nathan Sidwell <nathan@codesourcery.com>
10049
10050 * lex.c (do_identifier): Don't lookup_name for operators.
10051 * parse.y (operator): Save looking_for_typename.
10052 (unoperator): Restore it.
10053 * spew.c (frob_opname): Use nth_token for lookahead.
10054
36791f1e
NS
100552000-11-08 Nathan Sidwell <nathan@codesourcery.com>
10056
10057 * decl.c (grok_op_properties): Always use coerce_new_type and
10058 coerce_delete_type.
10059 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10060 exception specification. Tidy up.
10061 (coerce_delete_type): Preserve exception specification. Tidy up.
10062
961192e1
JM
100632000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
10064
10065 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10066 (push_binding_level), error.c (cp_tree_printer), pt.c
10067 (process_partial_specialization, tsubst_template_arg_vector),
10068 search.c (lookup_member): Use memset () instead of bzero ().
10069
d48ebde1
NS
100702000-11-07 Nathan Sidwell <nathan@codesourcery.com>
10071
10072 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10073
436a88a6
JM
100742000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
10075
10076 * Make-lang.in (c++.distdir): Remove.
10077
7a4e5091
MM
100782000-11-04 Mark Mitchell <mark@codesourcery.com>
10079
10080 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10081 declarations from different namespaces to be combined.
10082
0e9295cf
ZW
100832000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
10084
10085 * decl.c: Include tm_p.h.
10086
da61dec9
JM
100872000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
10088
10089 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10090
9473c522
JM
100912000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
10092
10093 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10094 (build_overload_value), repo.c (open_repo_file), xref.c
10095 (open_xref_file): Use strchr () and strrchr () instead of index ()
10096 and rindex ().
10097
b0b3afb2
BS
100982000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
10099
10100 * call.c (build_over_call): Call fold on the CALL_EXPR.
10101
faafaee6
GDR
101022000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
10103
10104 * error.c (dump_template_decl): Separate template hearders with
10105 space not comma.
10106
761f0855
GDR
101072000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
10108
10109 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
10110 TS_* flags with corresponding TFF_*. Adjust prototypes of
10111 functions (which used to take a tree_string_flags) to take an int.
10112
10113 * cp-tree.h (enum tree_string_flags): Remove
10114 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10115 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10116 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10117 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10118 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10119 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10120 (type_as_string, decl_as_string, expr_as_string,
10121 context_as_string): Adjust prototype.
10122
10123 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10124 instead of TS_PLAIN.
10125
10126 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10127 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10128 plain `0'.
10129
ad50e811
MM
101302000-10-30 Mark Mitchell <mark@codesourcery.com>
10131
10132 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10133 (linkage_kind): New enumeration.
10134 (decl_linkage): New function.
10135 * decl2.c (comdat_linkage): Extend comment.
10136 * error.c (dump_function_decl): Print the arguments used to
10137 instantiate a template, even when not printing the type of the
10138 function.
10139 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10140 not TREE_PUBLIC, to test for external linkage.
10141 * tree.c (decl_linkage): New function.
10142
930cd796
MM
101432000-10-28 Mark Mitchell <mark@codesourcery.com>
10144
10145 * pt.c (instantiate_decl): Always instantiate static data members
10146 initialized in-class.
10147
b8dad04b
ZW
101482000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
10149
10150 * Make-lang.in: Move all build rules here from Makefile.in,
10151 adapt to new context. Wrap all rules that change the current
10152 directory in parentheses. Expunge all references to $(P).
10153 When one command depends on another and they're run all at
10154 once, use && to separate them, not ;. Add OUTPUT_OPTION to
10155 all object-file generation rules. Delete obsolete variables.
10156
10157 * Makefile.in: Delete.
10158 * config-lang.in: Delete outputs= line.
10159
5f9cd837
GDR
101602000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
10161
10162 * error.c (dump_function_decl): Print no space between
10163 `ptr-operator' the `type-specifier' of the return type.
10164 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 10165 place.
5f9cd837 10166
6c6ed0ef
JM
101672000-10-23 Jason Merrill <jason@redhat.com>
10168
10169 * call.c (equal_functions): Also call decls_match for extern "C" fns.
10170
101712000-10-22 Jason Merrill <jason@redhat.com>
10172
10173 * call.c (build_conditional_expr): Use ocp_convert to force
10174 rvalue conversion.
10175
e36308b0
MM
101762000-10-22 Mark Mitchell <mark@codesourcery.com>
10177
583ca5a0
MM
10178 * call.c (standard_conversion): Use RVALUE_CONVs for all
10179 expressions that satisfy lvalue_p, not just those that satisfy
10180 real_lvalue_p.
10181
f9808f81
MM
10182 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10183
5362b086 10184 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
10185 not one with TYPE_IS_SIZETYPE set.
10186 (dubious_conversion_warnings): Remove special-case code.
10187
3b9ae6f0
GK
101882000-10-21 Geoffrey Keating <geoffk@cygnus.com>
10189
7a0f14e5
GK
10190 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10191 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10192 (dump_type_prefix): Print vector-of-int as 'int vector'.
10193 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10194 * tree.c (walk_tree): Handle VECTOR_TYPE.
10195
3b9ae6f0 10196 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 10197
aca77bd1
JM
101982000-10-21 Jason Merrill <jason@redhat.com>
10199
10200 * parse.y (operator): Set got_object from got_scope.
10201 Set looking_for_typename.
10202 * decl.c (lookup_name_real): Clear val after setting from_obj.
10203 Reorganize diagnostic.
10204
ba523395
JM
102052000-10-20 Jason Merrill <jason@redhat.com>
10206
10207 * tree.c (walk_tree): Don't walk into default args.
10208
10209 * error.c (dump_expr): Use host_integerp.
10210
2e44948d
DE
102112000-10-20 David Edelsohn <edelsohn@gnu.org>
10212
10213 * typeck2.c (abstract_virtuals_error): Use "because" instead of
10214 "since" in error message.
10215
44475138
RK
10216Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10217
10218 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10219
11306230
JO
102202000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
10221
10222 * decl.c (revert_static_member_fn): Fixed typo.
10223
97ba1e3c
MM
102242000-10-19 Mark Mitchell <mark@codesourcery.com>
10225
c20118a8
MM
10226 * class.c (subobject_offset_fn): New type.
10227 (dfs_record_base_offsets): Remove.
10228 (record_base_offsets): Likewise.
10229 (dfs_search_base_offsets): Likewise.
10230 (record_subobject_offset): New function.
10231 (check_subobject_offset): Likewise.
10232 (walk_subobject_offsets): Likewise.
10233 (record_subobject_offsets): Likewise.
10234 (layout_conflict_p): Reimplement.
10235 (layout_nonempty_base_or_field): Correct handling of type
10236 conflicts during layout.
10237 (layout_empty_base): Likewise.
10238 (build_base_field): Adjust to handle new representation of empty
10239 base offset table.
10240 (build_base_fields): Likewise.
10241 (layout_virtual_bases): Likewise.
10242 (splay_tree_compare_integer_csts): New function.
10243 (layout_class_type): Use a splay_tree, rather than a varray, to
10244 represent the offsets of empty bases.
5362b086 10245
97ba1e3c
MM
10246 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10247 * decl.c (select_decl): Don't return declarations that are
10248 DECL_ANTICIPATED.
10249
6bcedb4e
MM
102502000-10-18 Mark Mitchell <mark@codesourcery.com>
10251
10252 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10253 (fake_std_node): New macro.
10254 * decl.c (in_std): Rename to ...
10255 (in_fake_std): ... this.
10256 (flag_no_builtin): Remove.
10257 (flag_no_nonansi_builtin): Likewise.
10258 (walk_namespaces_r): Use fake_std_node.
10259 (push_namespace): Use std_identifier.
10260 (pop_namespace): Use in_fake_std.
10261 (lookup_name_real): Use fake_std_node.
10262 (init_decl_processing): When -fhonor-std, create the `std'
10263 namespace. Don't create a dummy fake_std_node in that case.
10264 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
10265 (builtin_function): Put builtins whose names don't begin
10266 with `_' in the std namespace.
10267 * decl2.c (flag_no_builtin): Remove.
10268 (flag_no_nonansi_builtin): Likewise.
10269 (set_decl_namespace): Use fake_std_node.
10270 (validate_nonmember_using_decl): Likewise.
10271 (do_using_directive): Likewise.
10272 (handle_class_head): Likewise.
10273 * dump.c (dequeue_and_dump): Likewise.
10274 * except.c (init_exception_processing): Use std_identifier.
10275 * init.c (build_member_call): Use fake_std_node.
10276 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 10277
67673f5c
MM
102782000-10-17 Mark Mitchell <mark@codesourcery.com>
10279
10280 * cp-tree.h (back_end_hook): Remove declaration.
10281 * decl2.c (back_end_hook): Remove definition.
10282
10283 * dump.c (dequeue_and_dump): Dump TREE_USED.
10284
8fef2e47
BL
10285Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
10286
10287 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10288
652469d0
JM
102892000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
10290
10291 * decl.c (WINT_TYPE): Define.
10292 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10293 c_size_type_node, signed_size_type_node and wint_type_node.
10294
74ff4629
JM
102952000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
10296
10297 * decl2.c (warn_missing_format_attribute): New variable.
10298 (lang_decode_option): Decode -Wmissing-format-attribute.
10299
634790f4
MM
103002000-10-16 Mark Mitchell <mark@codesourcery.com>
10301
10302 * typeck.c (qualify_type): Remove.
10303 (composite_pointer_type): Fix handling of conversions to `cv void*'.
10304
bb12da9d
KG
103052000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10306
10307 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10308
4b945402
KG
103092000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10310
10311 * Makefile.in (parse.c, parse.h): Create atomically.
10312
1f8f4a0b
MM
103132000-10-12 Mark Mitchell <mark@codesourcery.com>
10314
10315 * class.c (current_obstack): Remove.
10316 * decl.c (ggc_p): Remove.
10317 (start_decl): Don't use decl_tree_cons.
10318 (grokdeclarator): Don't use build_decl_list.
10319 (start_function): Don't use decl_tree_cons.
10320 (finish_function): Don't mess with obstacks.
10321 * decl2.c (grok_x_components): Don't use build_decl_list.
10322 * lex.c (make_call_declarator): Don't call decl_tree_cons.
10323 (implicitly_declare_fn): Don't call build_decl_list.
10324 * parse.y (frob_specs): Don't call build_decl_list or
10325 decl_tree_cons.
10326 (expr_or_declarator_intern): Don't call decl_tree_cons.
10327 (primary): Don't call build_decl_list.
10328 (fcast_or_absdcl): Likewise.
10329 (typed_declspecs): Don't call decl_tree_cons.
10330 (reserved_declspecs): Don't call build_decl_list.
10331 (declmods): Likewise.
10332 (reserved_typespecquals): Likewise.
10333 (aggr): Likewise.
10334 (new_type_id): Likewise.
10335 (cv_qualifiers): Likewise.
10336 (after_type_declarator_intern): Likewise.
10337 (notype_declarator_intern): Likewise.
10338 (absdcl_intern): Likewise.
10339 (named_parm): Likewise.
10340 * pt.c (most_specialized_class): Likewise.
10341 * repo.c (temporary_obstack): Make it a structure, not a pointer.
10342 (init_repo): Initialize it.
10343 * search.c (current_obstack): Remove.
10344 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 10345
8dc54971
RH
103462000-10-09 Richard Henderson <rth@cygnus.com>
10347
10348 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10349 (c++ language support bits for libgcc): Remove.
10350 (c++.clean): Remove cplib2.txt cleanup.
10351 * config-lang.in (headers, lib2funcs): Remove.
10352
10353 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10354 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10355 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10356 * inc/new.h, inc/typeinfo: Remove files.
10357
b15ad712
JM
103582000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
10359
10360 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10361 defined.
10362 (init_decl_processing): Initialize intmax_type_node and
10363 uintmax_type_node.
10364
156ce211
RH
103652000-10-06 Richard Henderson <rth@cygnus.com>
10366
10367 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10368 (original_result_rtx): Remove.
10369 * decl.c (save_function_data): Don't clear x_result_rtx.
10370 (mark_lang_function): Don't mark it either.
10371 * expr.c (fixup_result_decl): Remove.
10372 * semantics.c (genrtl_named_return_value): Frob the return decl
10373 before calling emit_local_var.
10374 (genrtl_finish_function): Don't call fixup_result_decl.
10375 Always emit the jump to return_label.
10376
92777ce4
NS
103772000-10-06 Nathan Sidwell <nathan@codesourcery.com>
10378
10379 * pt.c (lookup_template_class): Set current access for enum.
10380 (tsubst_enum): Set file & line for enum decl.
5362b086 10381
92777ce4
NS
10382 * spew.c (yylex): Remove unused variable.
10383
63c16fc5
RH
103842000-10-05 Richard Henderson <rth@cygnus.com>
10385
10386 * semantics.c (genrtl_finish_function): Don't init or check
10387 can_reach_end; remove noreturn and return value checks.
10388
d1a458c4
TT
103892000-10-05 Tom Tromey <tromey@cygnus.com>
10390
10391 * init.c (build_java_class_ref): Use `build_static_name' with a
10392 suffix, not a prefix, to build the class object's name.
10393
509fc277
NS
103942000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10395
10396 * cp-tree.h (access_kind): Fix comment typo.
10397 * decl2.c (grokfield): Fix diagnostic typo.
10398 * semantics.c (finish_template_type): Fix comment typo.
10399 (finish_qualified_object_call_expr): Likewise.
10400
ce2e5191
NS
104012000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10402
10403 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 10404 tsubsting fails.
ce2e5191 10405
79cc5312
NS
104062000-10-05 Nathan Sidwell <nathan@codesourcery.com>
10407
10408 * spew.c (frob_id): New static function.
10409 (frob_opname): Use it.
10410 (yylex): Use it.
10411
f15b9af9
MM
104122000-10-01 Mark Mitchell <mark@codesourcery.com>
10413
10414 * decl.c (lang_mark_false_label_stack): Remove.
10415 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 10416
28e6b1c2
JM
104172000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
10418
10419 * gxxint.texi: Use @email for formatting email addresses.
10420
99885b3f
GDR
104212000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
10422
10423 * error.c: Remove direct obstack manipulation. Replace with
10424 output_buffer-based formatting. Adjust calls to removed macros.
10425 (obstack_chunk_alloc, obstack_chunk_free): Remove.
10426 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10427 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10428
c06aa51e
MM
104292000-09-24 Mark Mitchell <mark@codesourcery.com>
10430
10431 * ir.texi: Move to ../c-tree.texi.
10432
99fada40
JM
104332000-09-20 Jason Merrill <jason@redhat.com>
10434
10435 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10436
bb20cc46
AJ
104372000-09-21 Andreas Jaeger <aj@suse.de>
10438
10439 * errfn.c: Move declaration of cp_printer and cp_printers to ...
10440 * cp-tree.h: ... here.
10441
10442 * error.c: Remove declaration of cp_printer.
10443
fab701da
MM
104442000-09-20 Mark Mitchell <mark@codesourcery.com>
10445
10446 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10447
0370fea1
HPN
104482000-09-20 Hans-Peter Nilsson <hp@axis.com>
10449
10450 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10451 users.
10452
78c120b5
MM
104532000-09-18 Mark Mitchell <mark@codesourcery.com>
10454
10455 * decl.c (start_function): Robustify.
10456
3f80e6ac
KG
104572000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10458
10459 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 10460
3f80e6ac
KG
10461 * call.c, typeck.c: Updates calls to `check_function_format'.
10462
fc928afe
GK
104632000-09-17 Geoffrey Keating <geoffk@cygnus.com>
10464
10465 * decl2.c (handle_class_head): Always push some scope even
10466 in the error case.
10467
8f17b5c5
MM
104682000-09-16 Mark Mitchell <mark@codesourcery.com>
10469
10470 * cp-tree.h (struct cp_language_function): Remove
10471 x_scope_stmt_stack and name_declared.
10472 (current_scope_stmt_stack): Remove.
10473 (function_name_declared_p): New macro.
10474 (struct lang_decl_flags): Use c_lang_decl as a base class.
10475 (context): Remove.
10476 (struct lang_decl): Replace saved_tree with context.
10477 (DECL_FRIEND_CONTEXT): Adjust accordingly.
10478 (SET_DECL_FRIEND_CONTEXT): Likewise.
10479 (DECL_VIRTUAL_CONTEXT): Likewise.
10480 (DECL_SAVED_TREE): Remove.
10481 (C_DECLARED_LABEL_FLAG): Likewise.
10482 (cplus_expand_expr_stmt): Don't declare.
10483 (add_decl_stmt): Likewise.
10484 (add_scope_stmt): Likewise.
10485 * decl.c (mark_stmt_tree): Remove.
10486 (case_compare): Likewise.
10487 (finish_case_label): Use c_add_case_label.
10488 (init_decl_processing): Set more language-specific hooks.
10489 (build_enumerator): Fix typo in comment.
10490 (cplus_expand_expr_stmt): Remove.
10491 (mark_lang_function): Use mark_c_language_function.
10492 (lang_mark_tree): Use c_mark_lang_decl.
10493 * decl2.c: Change order of inclusion.
10494 * except.c: Likewise.
10495 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
10496 back on c_expand_expr.
10497 * friend.c: Include expr.h.
10498 * init.c: Change order of inclusion.
10499 * Makefile.in: Update dependencies.
10500 * lex.h (free_lang_decl_chain): Remove.
10501 * optimize.c (maybe_clone_body): Use function_name_declared_p.
10502 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10503 it doesn't exist.
10504 (instantiate_decl): Use function_name_declared_p.
10505 * semantics.c (lang_expand_expr_stmt): Remove.
10506 (set_current_function_name_declared): Likewise.
10507 (current_function_name_declared): Likewise.
10508 (begin_compound_stmt): Use function_name_declared_p.
10509 (add_decl_stmt): Remove.
10510 (setup_vtbl_ptr): Use function_name_declared_p.
10511 (add_scope_stmt): Remove.
10512 (current_scope_stmt_stack): New function.
10513 (cp_expand_stmt): Don't handle SCOPE_STMTs.
10514 (expand_body): Use function_name_declared_p.
10515 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10516 * typeck.c: Change order of includes.
10517 (convert_sequence): Remove.
bb20cc46 10518
d9dbd9b1
JM
105192000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
10520
10521 * lex.c (reswords): Add _Complex.
10522
9985f210
RK
10523Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10524
10525 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10526
f903ebb1
DA
105272000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
10528
10529 * init.c (begin_init_stmts): Don't use // comments.
10530
f2ae0c45
JM
105312000-09-12 Jason Merrill <jason@redhat.com>
10532
10533 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10534 all non-extern arrays.
10535
10536 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10537 typenames, too. Downgrade complaint to pedwarn.
10538 (xref_tag): Warn about surprising behavior of 'friend struct T'.
10539 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10540 'class This::Inherited'.
10541
71ad4a16
MM
105422000-09-12 Mark Mitchell <mark@codesourcery.com>
10543
10544 * decl.c (finish_case_label): Given the LABEL_DECL a
10545 DECL_CONTEXT.
10546
c3e76028
GDR
105472000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
10548
10549 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10550 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10551 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10552 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10553 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10554 New macros.
10555 (sorry_for_unsupported_tree, print_scope_operator,
10556 print_left_paren, print_right_paren, print_left_bracket,
10557 print_right_bracket, print_whitespace): Likewise.
10558 (aggr_variety): Rename to class_key_or_enum.
10559 (print_type): Rename to print_type_id.
10560 (print_type_specifier_seq, print_simple_type_specifier,
10561 print_elaborated_type_specifier,
10562 print_rest_of_abstract_declarator,
10563 print_parameter_declaration_clause, print_exception_specification,
10564 print_nested_name_specifier, print_template_id,
10565 typedef_original_name, print_template_argument_list_start,
10566 print_template_argument_list_end): New functions.
10567
eb50138b
GDR
105682000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
10569
a8a05998 10570 * ir.texi: Add more documentation.
eb50138b 10571
f444e36b
MM
105722000-09-11 Mark Mitchell <mark@codesourcery.com>
10573
10574 * cp-tree.h (struct saved_scope): Remove x_function_parms.
10575 (current_function_parms): Don't define.
10576 (struct cp_language_function): Remove parms_stored.
10577 (current_function_just_assigned_this): Don't define.
10578 (current_function_parms_stored): Likewise.
10579 (static_ctors): Declare.
10580 (static_dtors): Likewise.
10581 (SF_EXPAND): Don't define.
10582 (expand_start_early_try_stmts): Remove declaration.
10583 (store_parm_decls): Likewise.
10584 * decl.c (static_ctors): Don't declare.
10585 (static_dtors): Likewise.
10586 (struct binding_level): Remove this_block.
10587 (poplevel): Remove dead code.
10588 (set_block): Likewise.
10589 (mark_binding_level): Don't mark this_block.
10590 (mark_saved_scope): Don't mark x_function_parms.
10591 (init_decl_processing): Don't add current_function_parms as a GC
10592 root.
10593 (check_function_type): Change prototype.
10594 (start_function): Remove RTL-generation code.
10595 (expand_start_early_try_stmts): Remove.
10596 (store_parm_decls): Give it internal linkage. Remove
10597 RTL-generation code.
10598 (finish_function): Remove RTL-generation code.
10599 * decl2.c (static_ctors): Fix formatting.
10600 (static_dtors): Likewise.
10601 * method.c (use_thunk): Don't call store_parm_decls.
10602 (synthesize_method): Likewise.
10603 * optimize.c (maybe_clone_body): Likewise.
10604 * parse.y (fn.def2): Likewise.
10605 (.set_base_init): Likewise.
10606 (nodecls): Likewise.
10607 * pt.c (instantiate_decl): Likewise.
10608 * rtti.c (synthesize_tinfo_fn): Likewise.
10609 * semantics.c (genrtl_try_block): Simplify.
10610 (expand_body): Use genrtl_start_function and
10611 genrtl_finish_function.
10612 (genrtl_start_function): New function.
10613 (genrtl_finish_function): Likewise.
10614
181d2ba0
NS
106152000-09-11 Nathan Sidwell <nathan@codesourcery.com>
10616
10617 * error.c (cp_tree_printer, case 'P'): Append break.
10618
f2d71db6
NS
106192000-09-11 Nathan Sidwell <nathan@codesourcery.com>
10620
10621 * cp-tree.h (frob_opname): Declare.
10622 * parse.y (saved_scopes): New static variable.
10623 (cp_parse_init): Adjust.
10624 (do_id): If lastiddecl is NULL, do do_identifier.
10625 (operator): Save scope information.
aca77bd1 10626 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
10627 (operator_name): Append unoperator. Call frob_opname.
10628 * spew.c (frob_opname): Define.
10629
d8ea8f28
ZW
106302000-09-10 Zack Weinberg <zack@wolery.cumb.org>
10631
10632 * decl.c, rtti.c: Include defaults.h if not already included.
10633 Don't define the *_TYPE_SIZE macros.
10634
56cb9733
MM
106352000-09-09 Mark Mitchell <mark@codesourcery.com>
10636
10637 * cp-tree.h (push_switch): Change prototype.
10638 (check_cp_case_value): Remove declaration.
10639 (decl_constant_value): Likewise.
10640 * decl.c (struct cp_switch): Add switch_stmt and cases.
10641 (case_compare): New function.
10642 (push_switch): Set switch_stmt. Initialize cases.
10643 (pop_switch): Clean up cases.
10644 (define_case_label): Rename to ...
10645 (finish_case_label): ... this. Do semantic analysis for case
10646 labels here.
10647 (start_function): Correct comment.
10648 * decl2.c (check_cp_case_value): Remove.
10649 * expr.c (do_case): Remove.
10650 * pt.c (tsubst_expr): Adjust call to finish_case_label.
10651 * semantics.c (genrtl_do_poplevel): Remove declaration.
10652 (RECHAIN_STMTS): Remove.
10653 (finish_break_stmt): Use build_break_stmt.
10654 (finish_continue_stmt): Use build_continue_stmt.
10655 (finish_switch_cond): Adjust condition here, rater than in
10656 c_expand_start_case.
10657 (finish_case_label): Remove.
10658 * typeck.c (c_expand_return): Remove.
10659 (c_expand_start_case): Likewise.
bb20cc46 10660
990a9693
GDR
106612000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
10662
10663 * ir.texi: Document type nodes.
10664
ae499cce
MM
106652000-09-06 Mark Mitchell <mark@codesourcery.com>
10666
54f7877c
MM
10667 * cp-tree.h (init_cp_semantics): Declare.
10668 (genrtl_try_block): Don't declare.
10669 (genrtl_handler): Likewise.
10670 (genrtl_catch_block): Likewise.
10671 (genrtl_ctor_stmt): Likewise.
10672 (genrtl_subobject): Likewise.
10673 (genrtl_do_poplevel): Likewise.
10674 (genrtl_named_return_value): Likewise.
10675 * lex.c (init_parse): Call init_cp_semantics.
10676 * semantics.c (genrtl_try_block): Give it internal linkage.
10677 (genrtl_handler): Likewise.
10678 (genrtl_catch_block): Likewise.
10679 (genrtl_ctor_stmt): Likewise.
10680 (genrtl_subobject): Likewise.
10681 (genrtl_do_poplevel): Likewise.
10682 (genrtl_named_return_value): Likewise.
10683 (lang_expand_stmt): Rename to ...
10684 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
10685 (init_cp_semantics): Define.
10686
3a0d3e1e
MM
10687 * decl.c (initialize_local_var): Remove RTL-generating code.
10688 * semantics.c (genrtl_try_block): Fix formatting.
10689
ae499cce
MM
10690 Move statement-tree facilities from C++ to C front-end.
10691 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10692 (void_zero_node): Remove.
10693 (stmt_tree): Likewise.
10694 (scope_chain): Adjust.
10695 (language_function): Rename to cp_language_function.
10696 (cp_function_chain): Adjust.
10697 (current_stmt_tree): Remove.
10698 (last_tree): Likewise.
10699 (last_expr_type): Likewise.
10700 (struct lang_decl): Adjust.
10701 (STMT_IS_FULL_EXPR_P): Remove.
10702 (add_tree): Remove.
10703 (begin_stmt_tree): Likewise.
10704 (finish_stmt_tree): Likewise.
10705 (walk_tree_fn): Likewise.
10706 (walk_stmt_tree): Likewise.
10707 * class.c (finish_struct): Replace use of add_tree with add_stmt.
10708 * decl.c (mark_stmt_tree): Adjust type.
10709 (init_decl_processing): Don't build void_zero_node.
10710 (initialize_local_var): Adjust usage of current_stmt_tree.
10711 (finish_enum): Use add_stmt, not add_tree.
10712 (save_function_data): Adjust use of language_function.
10713 (finish_constructor_body): Use add_stmt, not add_tree.
10714 (finish_destructor_body): Likewise.
10715 (push_cp_function_context): Adjust use of language_function.
10716 (pop_cp_function_context): Likewise.
10717 (mark_lang_function): Likewise.
10718 (mark_cp_function_context): Likewise.
10719 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10720 (build_vec_init): Likewise.
10721 * semantics.c (SET_LAST_STMT): Remove.
10722 (RECHAIN_STMTS): Don't use it.
10723 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10724 (current_stmt_tree): Define.
10725 (add_tree): Remove.
10726 (finish_goto_stmt): Use add_stmt, not add_tree.
10727 (finish_expr_stmt): Likewise.
10728 (begin_if_stmt): Likewise.
10729 (finish_then_clause): Likewise.
10730 (begin_while_stmt): Likewise.
10731 (begin_do_stmt): Likewise.
10732 (finish_return_stmt): Likewise.
10733 (begin_for_stmt): Likewise.
10734 (finish_break_stmt): Likewise.
10735 (finish_continue_stmt): Likewise.
10736 (begin_switch_stmt): Likewise.
10737 (finish_case_label): Likewise.
10738 (begin_try_block): Likewise.
10739 (begin_function_try_block): Likewise.
10740 (begin_handler): Likewise.
10741 (begin_catch_block): Likewise.
10742 (begin_compound_stmt): Likewise.
10743 (begin_asm_stmt): Likewise.
10744 (finish_asm_stmt): Likewise.
10745 (finish_label_stmt): Likewise.
10746 (add_decl_stmt): Likewise.
10747 (finish_subobject): Likewise.
10748 (finish_decl_cleanup): Likewise.
10749 (finish_named_return_value): Likewise.
10750 (setup_vtbl_ptr): Likewise.
10751 (add_scope_stmt): Likewise.
10752 (finish_stmt_expr): Likewise.
10753 (prune_unused_decls): Remove.
10754 (begin_stmt_tree): Likewise.
10755 (finish_stmt_tree): Likewise.
10756 (prep_stmt): Adjust use of current_stmt_tree.
10757 (lang_expand_stmt): Likewise.
10758 * tree.c (statement_code_p): Remove.
10759 (cp_statement_code_p): New function.
10760 (walk_stmt_tree): Remove.
10761 (init_tree): Set lang_statement_code_p.
bb20cc46 10762
0e5921e8
ZW
107632000-09-06 Zack Weinberg <zack@wolery.cumb.org>
10764
10765 Integrated preprocessor.
10766
10767 * Make-lang.in, Makefile.in: Remove all references to input.c,
10768 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
10769 * gxx.gperf, hash.h, input.c: Delete.
10770 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10771 initialized properly.
10772
10773 * class.c (fixup_pending_inline): Take a tree, not a
10774 struct pending_inline *. All callers changed.
10775 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10776 RID_PROTECTED entries in ridpointers[] array here.
10777 * decl.c (duplicate_decls): Do not refer to struct
10778 pending_inline.
10779 (record_builtin_type, init_decl_processing): Use RID_MAX not
10780 CP_RID_MAX.
10781 (grokdeclarator): Use C_IS_RESERVED_WORD.
10782 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10783 cpplib.
10784 (grok_x_components): Do not inspect pending_inlines chain.
10785
10786 * cp-tree.h (struct lang_identifier): Add rid_code entry.
10787 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10788 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10789 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10790 TIME_IDENTIFIER_FILEINFO): Kill.
10791 Update prototypes.
10792 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
10793 single 32-bit word.
10794 * parse.y: Call do_pending_inlines unconditionally.
10795 reinit_parse_for_method is now snarf_method. fn.defpen is no
10796 longer necessary. Remove unnecessary <itype> annotation on
10797 SCOPE. Do not refer to end_of_file or struct pending_inline.
10798 * semantics.c (begin_inline_definitions): Call
10799 do_pending_inlines unconditionally.
10800
10801 * lex.c: Remove all code now shared with C front end.
10802 Initialize cpplib properly if USE_CPPLIB. Put reserved words
10803 into the get_identifier table. Rewrite pragma handling to
10804 work with the registry. Move code to save tokens for later
10805 processing to spew.c.
10806
10807 * spew.c: Rewrite everything in terms of token streams instead
10808 of text. Move routines here from lex.c / input.c as
10809 appropriate. GC-mark trees hanging off the pending inlines
10810 chain.
10811
44835fdd
MM
108122000-09-06 Mark Mitchell <mark@codesourcery.com>
10813
10814 * NEWS: Mention that the named return value extension has been
10815 deprecated.
10816 * cp-tree.h (original_result_rtx): Define.
10817 (TREE_REFERENCE_EXPR): Remove.
10818 (DECL_VPARENT): Likewise.
10819 (pushdecl_nonclass_level): Likewise.
10820 (store_return_init): Likewise.
10821 (reinit_lang_specific): Likewise.
10822 (genrtl_named_return_value): Change prototype.
10823 * decl.c (original_result_rtx): Remove.
10824 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10825 Do not generate RTL for local variables here.
10826 (store_return_init): Remove.
10827 * semantics.c (genrtl_named_return_value): Simplify. Fold in
10828 store_return_init.
10829 (finish_named_return_value): Adjust accordingly. Warn that this
10830 extension is deprecated.
10831 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10832
d7c4edd0
NS
108332000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10834
10835 * pt.c (type_unification_real): Replace switch with if.
10836 (unify): Tsubst non-type parms before comparing.
10837
46e2747c
NS
108382000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10839
10840 * error.c (dump_typename): New function, broken out of ...
10841 (dump_type): ... here. Use it.
10842 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10843
c833d2be
NS
108442000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10845
10846 * init.c (build_offset_ref): Deal with namespace scoped
10847 TEMPLATE_ID_EXPRs.
10848
b1ce3eb2
NS
108492000-09-06 Nathan Sidwell <nathan@codesourcery.com>
10850
10851 * class.c (resolve_address_of_overloaded_function): Add
10852 explanation message.
10853 * decl.c (define_case_label): Reformat explanation.
10854 * decl2.c (finish_static_data_member_decl): Likewise.
10855 (grokfield): Likewise.
10856 * friend.c (do_friend): Likewise.
10857
11f53b6a
ZW
108582000-09-05 Zack Weinberg <zack@wolery.cumb.org>
10859
10860 * tree.c (walk_tree): Expose tail recursion.
10861 (walk_stmt_tree): New function.
10862 * cp-tree.h: Prototype walk_stmt_tree.
10863 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10864 the BLOCKs directly. If a BLOCK has no variables after
10865 pruning, discard it.
10866 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
10867 restore the line number.
10868
ee94fce6
MM
108692000-09-05 Mark Mitchell <mark@codesourcery.com>
10870
10871 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10872 (pt.o): Remove dependency on HTAB_H.
10873 * cp-tree.h: Include hashtab.h.
10874 (walk_tree): Change prototype.
10875 (walk_tree_without_duplicates): New function.
10876 * decl.c (check_default_argument): Use it.
10877 * optimize.c (remap_decl): Adjust calls to walk_tree.
10878 (copy_body): Likewise.
10879 (expand_calls_inline): Likewise.
10880 (calls_setjmp_p): Use walk_tree_without_duplicates.
10881 * pt.c: Don't include hashtab.h.
10882 (for_each_template_parm): Use walk_tree_without_duplicates.
10883 * semantics.c (finish-stmt_tree): Likewise.
10884 (expand_body): Likewise.
10885 * tree.c (walk_tree): Add additional parameter.
10886 (walk_tree_without_duplicates): New function.
10887 (count_trees): Use it.
10888 (verify_stmt_tree): Adjust call to walk_tree.
10889 (find_tree): Use walk_tree_without_duplicates.
10890 (no_linkage_check): Likewise.
10891 (break_out_target_exprs): Adjust call to walk_tree.
10892 (cp_unsave): Likewise.
10893
a1281f45
KL
108942000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10895
10896 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10897 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10898 * cp-tree.h (TYPE_BINFO): Adjust comment.
10899 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10900 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10901 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10902 (TYPE_TEMPLATE_INFO): Likewise.
10903 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10904 * class.c (push_nested_class): Likewise.
10905 * decl.c (lookup_name_real): Likewise.
10906 (grokdeclarator): Likewise.
10907 (grok_op_properties): Likewise.
10908 (xref_tag): Likewise.
10909 (xref_basetypes): Likewise.
10910 * decl2.c (constructor_name_full): Likewise.
10911 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10912 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10913 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10914 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10915 (dump_type_suffix): Likewise.
10916 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10917 instead.
10918 (get_aggr_from_typedef): Likewise.
10919 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10920 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10921 (write_template_parm): Likewise.
10922 (write_template_template_parm): Check tree code instead of
10923 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 10924 * method.c (build_overload_nested_name): Add
a1281f45
KL
10925 BOUND_TEMPLATE_TEMPLATE_PARM.
10926 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10927 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10928 * pt.c (convert_template_argument): Check tree code instead of
10929 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10930 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10931 (for_each_template_parm): Adjust comment.
10932 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
10933 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10934 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
10935 template_args_equal to compare template template parameter cases.
10936 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10937 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10938 instead.
10939 * tree.c (copy_template_template_parm): Decide whether to create
10940 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10941 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10942 (copy_tree_r): Likewise.
10943 * typeck.c (comptypes): Likewise. Check tree code instead of
10944 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10945
c9672d45
ME
109462000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
10947
10948 * decl.c (finish_function): Move the code for handling functions
10949 marked with the constructor and destructor attributes inside the
10950 expand_p block.
10951
67804825
NS
109522000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10953
10954 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10955
1bc0793e
NS
109562000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10957
10958 * pt.c (lookup_template_class): Remove abort.
10959 * tree.c (get_type_decl): Allow error_mark_node.
10960
3338663b
NS
109612000-09-04 Nathan Sidwell <nathan@codesourcery.com>
10962
10963 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10964 TEMPLATE_ID_EXPRs.
10965
1b84dc37
MM
109662000-09-03 Mark Mitchell <mark@codesourcery.com>
10967
10968 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 10969 new ABI mangling.
1b84dc37 10970
9687f8f4
NS
109712000-09-01 Nathan Sidwell <nathan@codesourcery.com>
10972
10973 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 10974 union tag mismatch error reporting.
9687f8f4 10975
4f8025eb
NS
109762000-09-01 Nathan Sidwell <nathan@codesourcery.com>
10977
c9672d45 10978 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 10979
495d26d6
JM
109802000-08-30 Jason Merrill <jason@redhat.com>
10981
10982 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10983
10984 * tree.c (bot_manip): Check TREE_CONSTANT rather than
10985 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
10986 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10987
10988 * decl.c (start_function): Always call make_function_rtl.
10989
7efcf466
ZW
109902000-08-29 Zack Weinberg <zack@wolery.cumb.org>
10991
495d26d6 10992 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
10993 (finish_stmt_tree): Call it via walk_tree.
10994
63ad61ed
ZW
109952000-08-29 Zack Weinberg <zack@wolery.cumb.org>
10996
10997 * class.c (build_secondary_vtable): Constify a char *.
10998 * decl.c (init_decl_processing): Initialize function_id_node,
10999 pretty_function_id_node, and func_id_node.
11000 * input.c (struct input_source): Constify 'str'.
11001 (feed_input): Constify first argument.
11002 * mangle.c (write_identifier): Constify argument.
11003 * pt.c (mangle_class_name_for_template): Constify argument.
11004
4361b41d
MM
110052000-08-29 Mark Mitchell <mark@codesourcery.com>
11006
11007 * typeck.c (mark_addressable): Remove code that pokes around in
11008 RTL.
11009
881c6935
JM
110102000-08-28 Jason Merrill <jason@redhat.com>
11011
11012 * lex.c (file_name_nondirectory): Move to toplev.c.
11013
11014 * cp-tree.h (LOCAL_CLASS_P): New macro.
11015 * class.c (finish_struct_1): Use it.
11016
f0f33848
AS
110172000-08-27 Alex Samuel <samuel@codesourcery.com>
11018
11019 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11020 (write_encoding): Pass another argument to write_name.
11021 (write_name): Add ignore_local_scope parameter. Fix handling of
11022 local names.
11023 (write_nested_name): Use write_unqualified_name.
11024 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
11025 (write_template_prefix): Use write_unqualified_name.
11026 (write_component): Remove.
11027 (write_local_name): Add parameter. Use direct local entity to
11028 discriminator calculation.
0e5921e8 11029 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
11030 (write_template_template_arg): Likewise.
11031 (make_guard_variable): Likewise.
0e5921e8 11032
94dfccd1
JM
110332000-08-27 Jason Merrill <jason@redhat.com>
11034
11035 * decl.c (pushdecl): Matching decls for local externs are found in
11036 the current level. Propagate linkage information from previous
11037 declarations.
11038
14fdf4b6
GDR
110392000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
11040
11041 * ir.texi (Expressions): Fix typo.
11042
b5232c64
GM
110432000-08-25 Greg McGary <greg@mcgary.org>
11044
11045 * tree.c (init_tree): Use ARRAY_SIZE.
11046
22a4158c
GDR
110472000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
11048
11049 * error.c (cp_tree_printer): Rework.
11050
f22967f3
MM
110512000-08-25 Mark Mitchell <mark@codesourcery.com>
11052
a0c182fe
MM
11053 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11054 dyn-string.o.
11055 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11056 (cp-demangle.o): Remove target.
11057 (dyn-string.o): Likewise.
11058
f22967f3
MM
11059 * decl.c (grokfndecl): Require that `main' return an `int'.
11060 * mangle.c (write_encoding): Don't mangle return types for
11061 conversion functions.
11062
a1066c99
GDR
110632000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
11064
11065 * error.c (tree_formatting_info): New data type.
11066 (tree_being_formatted): New macro.
11067 (tree_formatting_flags): Likewise.
11068 (put_whitespace): Likewise.
11069 (print_tree_identifier): Likewise.
11070 (print_identifier): Likewise.
11071 (cp_tree_printer, print_function_argument_list, print_declaration,
11072 print_expression, print_function_declaration,
11073 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 11074 functions.
a1066c99
GDR
11075 (init_error): Initialize lang_printer.
11076
3f2b640a
JM
110772000-08-24 Jason Merrill <jason@redhat.com>
11078
11079 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11080 adjustment necessary.
11081
7ec09bf7
GM
110822000-08-24 Greg McGary <greg@mcgary.org>
11083
11084 * cp-tree.h (MAIN_NAME_P): Remove macro.
11085
2ab99c46
GDR
110862000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
11087
11088 * error.c (print_instantiation_context): Don't forget to flush the
11089 buffer.
11090
7def1251
JM
110912000-08-23 Jason Merrill <jason@redhat.com>
11092
11093 * typeck.c (build_ptrmemfunc): Save the input pmf.
11094
11095 * method.c (process_modifiers): Use same_type_p.
11096
94350948
MM
110972000-08-23 Mark Mitchell <mark@codesourcery.com>
11098
11099 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11100 * mangle.c (write_function_type): Change prototype.
11101 (write_encoding): Don't mangle return types for
11102 constructors or destructors.
11103 (write_type): Adjust call to write_function_type.
11104 * pt.c (instantiate_template): Instantiate alternate entry points
11105 when instantiating the main function.
0e5921e8 11106
a64e7329
GDR
111072000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
11108
11109 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 11110 output_printf.
a64e7329 11111
a72462a4
GDR
111122000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
11113
11114 * decl.c (init_decl_processing): Remove bogus initialization.
11115 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
11116 (init_error): Initialize print_error_function.
11117
3add6264
TP
111182000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11119
11120 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11121
cb753e49
GDR
111222000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
11123
11124 * Makefile.in (error.o): Depends on diagnostic.h
11125
11126 * cp-tree.h (problematic_instantiation_changed,
11127 record_last_problematic_instantiation, current_instantiation,
11128 print_instantiation_context): Declare.
11129 (maybe_print_template_context): Remove.
11130
11131 * decl.c (init_decl_processing): Set print_error_function to NULL.
11132 (lang_print_error_function): Remove, since we're using a new
11133 machinery.
11134
11135 * error.c: #include diagnostic.h
11136 (function_category): New function.
11137 (cp_diagnostic_starter): Likewise.
11138 (cp_diagnostic_finalizer): Likewise.
11139 (cp_print_error_function): Likewise.
11140 (maybe_print_instantiation_context): Likewise.
11141 (print_instantiation_full_context): Likewise.
11142 (print_instantiation_partial_context): Likewise.
11143 (print_instantiation_context): Define.
11144 (init_error): Initialize diagnostic pager and finalizer.
11145
11146 * pt.c (problematic_instantiation_changed): Define.
11147 (record_last_problematic_instantiation): Likewise.
11148 (current_instantiation): Likewise.
11149 (maybe_print_template_context): Remove.
11150 (print_template_context): Likewise.
11151 (current_tinst_level): Make static to reflect Brendan Kehoe's
11152 change of 1995-04-13.
0e5921e8
ZW
11153 (push_tinst_level): Call print_instantiation_context.
11154
05a3d06e 111552000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 11156
05a3d06e
N
11157 * lang-specs.h: Do not process -o or run the assembler if
11158 -fsyntax-only.
11159
93e2382f
JM
111602000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
11161
11162 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11163 variables.
11164 * decl2.c (lang_decode_option): Disable gettext attributes for
11165 -ansi.
11166
24805e80
GDR
111672000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
11168
11169 * lex.c (lang_init_options): Default diagnostic message maximum
11170 length to 80, when line-wrapping.
11171
b485e15b
MM
111722000-08-20 Mark Mitchell <mark@codesourcery.com>
11173
11174 * class.c (build_vtbl_initializer): Clear the entire
11175 vtbl_init_data. Start keeping track of the functions for which we
11176 have created vcall offsets here.
11177 (dfs_build_vcall_offset_vtbl_entries): Remove.
11178 (build_vcall_offset_vtbl_entries): Reimplement.
11179 (add_vcall_offset_vtbl_entries_r): New function.
11180 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
11181 computing when vcall offsets are necessary.
11182
2ae7bada
NS
111832000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11184
11185 * decl.c (member_function_or_else): Use cp_error ... %T.
11186 (grokdeclarator): Likewise.
11187 (start_method): Likewise.
0e5921e8 11188 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 11189
7a8b1375
NS
111902000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11191
11192 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 11193 TYPE_DECLs.
7a8b1375 11194
19420d00
NS
111952000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11196
11197 * cp-tree.h (PTRMEM_OK_P): New macro.
11198 (itf_ptrmem_ok): New enumeration value.
11199 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11200 argument. Diagnose implicit pointer to member.
11201 (instantiate_type): Don't diagnose implicit pointer to member
11202 here. Pass itf_ptrmem_ok if ok. Adjust calls to
11203 resolve_address_of_overloaded_function.
11204 * init.c (build_offset_ref): Set PTRMEM_OK_P.
11205 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11206 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11207 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11208 (build_unary_op): Deal with single non-static member in
11209 microsoft-land.
11210
66081283
NS
112112000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11212
11213 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11214
fa40aa12
NS
112152000-08-18 Nathan Sidwell <nathan@codesourcery.com>
11216
11217 * cp-tree.h (enum_name_string): Remove prototype.
11218 (report_case_error): Remove prototype.
11219 * cp/typeck2.c (enum_name_string): Remove.
11220 (report_case_error): Remove.
11221 * error.c (dump_expr): Deal with enum values directly.
11222 Correctly negate integer constant.
11223
d13b34e9
NS
112242000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11225
11226 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11227 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11228 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11229 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11230 (__cxa_vec_new): Use __cxa_vec_new2.
11231 (__cxa_vec_delete): Use __cxa_vec_delete2.
11232
2f1b80af
NS
112332000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11234
11235 * vec.cc (__cxa_vec_new): Set "C" linkage.
11236 (__cxa_vec_ctor): Likewise.
11237 (__cxa_vec_cctor): Likewise.
11238 (__cxa_vec_dtor): Likewise.
11239 (__cxa_vec_delete): Likewise.
11240 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11241 (__cxa_vec_ctor): Likewise.
11242 (__cxa_vec_cctor): Likewise.
11243 (__cxa_vec_dtor): Likewise.
11244 (__cxa_vec_delete): Likewise.
11245
105d8e1f
NS
112462000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11247
11248 * class.c (instantiate_type): Reinstate local variable
11249 deleted in previous change.
0e5921e8 11250
f1819d9a
NS
11251 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11252 itf_no_attributes.
105d8e1f 11253
5e76004e
NS
112542000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11255
11256 * cp-tree.h (instantiate_type_flags): New enumeration.
11257 (instantiate_type): Change parameter.
11258 * class.c (instantiate_type): Adjust prototype. Adjust.
11259 * call.c (standard_conversion): Adjust instantiate_type call.
11260 (reference_binding): Likewise.
11261 (build_op_delete_call): Likewise.
11262 (convert_like_real): Likewise.
11263 * cvt.c (cp_convert_to_pointer): Likewise.
11264 (convert_to_reference): Likewise.
11265 * pt.c (convert_nontype_argument): Likewise.
11266 * typeck.c (build_binary_op): Likewise.
11267 (build_ptrmemfunc): Likewise.
11268 (convert_for_assignment): Likewise.
11269
4b054b80
NS
112702000-08-17 Nathan Sidwell <nathan@codesourcery.com>
11271
11272 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11273 (current_aggr): Define.
11274 * decl.c (grokdeclarator): Make sure a friend class is an
11275 elaborated type specifier.
11276 * parse.y (current_aggr): Remove static definition.
11277 (cp_parse_init): Adjust.
11278 (structsp): Clear and restore current_aggr.
11279 (component_decl_list): Clear current_aggr.
0e5921e8 11280
4b054b80
NS
11281 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11282 aggregate tag on the typename's context.
0e5921e8 11283
321cba97
NS
11284 * pt.c (tsubst_friend_class): Return error_mark_node, if
11285 parms becomes NULL.
11286 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 11287
08aead78
NS
112882000-08-14 Nathan Sidwell <nathan@codesourcery.com>
11289
11290 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 11291 (convert_to_reference): ... here. Use it.
08aead78 11292
fa1f3ebc
KL
112932000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11294
11295 * parse.y (template_arg): Add rule for template qualified with
11296 global scope.
11297
9845b52b
TP
112982000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11299
11300 * decl2.c (add_function): Reorganize.
11301 (arg_assoc): Do not consider function template decls.
11302
e69c8072
JM
113032000-08-11 Jason Merrill <jason@redhat.com>
11304
11305 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11306 looking inside.
11307
5c1e5476
NS
113082000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11309
11310 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11311 (lookup_nested_tag): Likewise.
0e5921e8 11312
5c1e5476
NS
11313 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11314 can be produced.
11315
5426aa7f
NS
113162000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11317
11318 * parse.y (named_complex_class_head_sans_basetype): Remove
11319 always true if.
11320
fd037e0d
NS
113212000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11322
11323 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11324 explicit TEMPLATE_ID_EXPR args.
11325 (build_expr_from_tree, case CALL_EXPR): Likewise.
11326
73ae5c34
NS
113272000-08-11 Nathan Sidwell <nathan@codesourcery.com>
11328
11329 * decl.c (check_tag_decl): Diagnose typename's which don't
11330 declare anything.
11331
aa54df09
NS
113322000-08-10 Nathan Sidwell <nathan@codesourcery.com>
11333
11334 * init.c (build_aggr_init): Reject bogus array initializers
11335 early.
11336
7e8dad18
NS
113372000-08-09 Nathan Sidwell <nathan@codesourcery.com>
11338
11339 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11340 runtime.
11341 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 11342 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 11343
0f586b9b
NS
113442000-08-09 Nathan Sidwell <nathan@codesourcery.com>
11345
11346 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 11347 attempting to cast from ambiguous base.
0f586b9b 11348
08e72a19
JM
113492000-08-08 Jason Merrill <jason@redhat.com>
11350
11351 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11352 (tsubst_template_arg_vector): Likewise.
11353
11354 * decl2.c (build_anon_union_vars): Choose the largest field; don't
11355 assume that one will be as large as the union.
11356
0811ea8f
KH
113572000-08-07 Kazu Hirata <kazu@hxi.com>
11358
11359 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11360 * decl.c (pop_labels): Likewise.
11361
f9fcf62b
JO
113622000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
11363
11364 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11365 specifications.
11366 (__pointer_to_member_type_info): Likewise.
11367 (__base_class_info): Likewise.
11368 (__class_type_info): Likewise.
11369 (__si_class_type_info): Likewise.
11370 (__vmi_class_type_info): Likewise.
11371 * tinfo.cc (__si_class_type_info::__do_find_public_src):
11372 Changed member names to match specifications.
11373 (__vmi_class_type_info::__do_find_public_src): Likewise.
11374 (__si_class_type_info::__do_dyncast): Likewise.
11375 (__vmi_class_type_info::__do_dyncast): Likewise.
11376 (__si_class_type_info::__do_upcast): Likewise.
11377 (__vmi_class_type_info::__do_upcast): Likewise.
11378 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11379 (__pbase_type_info::__pointer_catch): Likewise.
11380 (__pointer_type_info::__pointer_catch): Likewise.
11381 (__pointer_to_member_type_info::__pointer_catch): Likewise.
11382
a36556a8
ZW
113832000-08-04 Zack Weinberg <zack@wolery.cumb.org>
11384
0e5921e8
ZW
11385 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11386 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11387 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 11388
452a394b
MM
113892000-08-04 Mark Mitchell <mark@codesourcery.com>
11390
11391 * cp-tree.h (add_method): Change prototype.
11392 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
11393 Don't double the size of the method vector in the error case.
11394 (handle_using_decl): Adjust call to add_method.
11395 (add_implicitly_declared_members): Likewise.
11396 (clone_function_decl): Likewise.
11397 * decl2.c (check_classfn): Likewise.
11398 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 11399
b8458e3e
JM
114002000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
11401
11402 * decl.c (flag_isoc94): New variable.
11403
a1bcc528
JM
114042000-08-02 Jason Merrill <jason@redhat.com>
11405
11406 * pt.c (do_type_instantiation): Add complain parm; don't complain
11407 if called recursively.
11408 * cp-tree.h, parse.y: Adjust.
11409
50e60bc3
ZW
114102000-08-02 Zack Weinberg <zack@wolery.cumb.org>
11411
eae51189
ZW
11412 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11413 -Wno-strict-prototypes.
11414
37620334
ZW
11415 * g++spec.c: Adjust type of second argument to
11416 lang_specific_driver, and update code as necessary.
11417
50e60bc3
ZW
11418 * cp-tree.h: Don't prototype min_precision here.
11419 (my_friendly_assert): Cast expression to void.
11420 * semantics.c (do_poplevel): Initialize scope_stmts.
11421
3f954fc3
MM
114222000-08-02 Mark Mitchell <mark@codesourcery.com>
11423
11424 * cp-tree.h (DECL_NEEDED_P): Tweak.
11425
ab4fa7ed
JM
114262000-07-28 Jason Merrill <jason@redhat.com>
11427
11428 * lang-specs.h: Use %i in rule for .ii files.
11429
4871239e
ZW
114302000-07-31 Zack Weinberg <zack@wolery.cumb.org>
11431
11432 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11433
911a71a7
MM
114342000-07-30 Mark Mitchell <mark@codesourcery.com>
11435
11436 Allow indirect primary bases.
11437 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
11438 primary_base.
11439 (CLASSTYPE_VFIELD_PARENT): Remove.
11440 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11441 (BINFO_PRIMARY_BINFO): Remove.
11442 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11443 (BINFO_VBASE_PRIMARY_P): Likewise.
11444 (BINFO_PRIMARY_BASE_OF): New macro.
11445 (BINFO_INDIRECT_PRIMARY_P): Likewise.
11446 (get_primary_binfo): New function.
11447 * decl.c (lang_mark_tree): Make lang_type::primary_base.
11448 * class.c (vcall_offset_data_s): Rename to ...
11449 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
11450 and add ctor_vtbl_p.
11451 (get_derived_offset): Use get_primary_binfo.
11452 (dfs_mark_primary_bases): Adjust handling of virtual primary
11453 bases.
11454 (mark_primary_bases): Likewise.
11455 (set_primary_base): Take a binfo, not an integer, as a
11456 representation of the primary base.
11457 (indirect_primary_base_p): Remove.
11458 (determine_primary_base): Adjust for indirect primary bases.
11459 (dfs_find_final_overrider): Fix typo in coment.
11460 (update_vtable_entry_for_fn): Use get_primary_binfo.
11461 (layout_nonempty_base_or_field): Tweak.
11462 (build_base_fields): Adjust for new primary base semantics.
11463 (dfs_propagate_binfo_offsets): Remove.
11464 (propagate_binfo_offsets): Rewrite.
11465 (dfs_set_offset_for_shared_vbases): Remove.
11466 (layout_virtual_bases): Don't use it.
11467 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11468 ABI.
11469 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11470 CLASSTYPE_VFIELD_PARENT.
11471 (dfs_get_primary_binfo): New function.
11472 (get_primary_binfo): Likewise.
11473 (dump_class_hierarchy_r): Tweak printing of primary bases.
11474 (build_vtbl_initializer): Fix typo in comments. Use
11475 vtbl_init_data.
11476 (build_vcall_and_vbase_vtbl_entries): Likewise.
11477 (build_vbaes_offset_vtbl_entries): Likewise.
11478 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11479 BV_VCALL_INDEX to handle indirect primary bases.
11480 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11481 (build_rtti_vtbl_entries): Likewise.
11482 * search.c (get_shared_vbase_if_not_primary): Tweak.
11483 (find_vbase_instance): Likewise.
11484 (binfo_for_vtable): Simplify.
11485 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11486 (make_binfo): Make it have 11 entries.
0e5921e8 11487
722bed0f
AS
114882000-07-30 Alex Samuel <samuel@codesourcery.com>
11489
11490 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11491 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11492 ascertaining primaryness.
11493 (G): Remove template_args.
11494 (decl_is_template_id): New function.
11495 (write_encoding): Use decl_is_template_id.
11496 (write_name): Likewise. Handle type_decls. Get main variant of
11497 type decls.
11498 (write_nested_name): Likewise.
11499 (write_prefix): Likewise.
11500 (write_template_prefix): Likewise.
11501 (write_special_name_constructor): Remove defunct production from
11502 comment.
11503 (write_bare_function_type): Remove comment about absent parameter.
11504 (write_template_template_arg): Add missing grammar production to
11505 comment.
11506
9076e292
JM
115072000-07-27 Jason Merrill <jason@redhat.com>
11508
11509 * decl.c (duplicate_decls): If common_type produces a non-typedef
11510 type for a typedef, just use the old type.
11511
b2244c65
MM
115122000-07-27 Mark Mitchell <mark@codesourcery.com>
11513
11514 * cp-tree.h (function_depth): Declare.
11515 (verify_stmt_tree): Likewise.
11516 (find_tree): Likewise.
11517 * decl.c (function_depth): Give it external linkage.
11518 * optimize.c (optimize_function): Increment and decrement it.
11519 * tree.c (verify_stmt_tree_r): New function.
11520 (verify_stmt_tree): Likewise.
11521 (find_tree_r): Likewise.
11522 (find_tree): Likewise.
11523
62e3bf54
JM
115242000-07-27 Jason Merrill <jason@redhat.com>
11525
9076e292
JM
11526 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11527 TYPE_PTRMEMFUNC_P.
11528 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 11529
5a728aca
MM
115302000-07-26 Mark Mitchell <mark@codesourcery.com>
11531
11532 * decl.c (start_cleanup_fn): Mark the function as `inline'.
11533 * decl2.c (get_guard): Call cp_finish_decl, not
11534 rest_of_decl_compilation, for local guards.
11535 * lex.c (do_identifier): Remove unused variable.
11536
6a1fa5f9
ME
11537Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
11538
11539 * parse.y: Add missing ';'.
11540
0c10a805
MM
115412000-07-26 Mark Mitchell <mark@codesourcery.com>
11542
11543 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11544 of `extern "C++"'.
11545
8b27e9ef
NS
115462000-07-25 Nathan Sidwell <nathan@codesourcery.com>
11547
11548 Kill strict_prototype. Backwards compatibility only for
11549 non NO_IMPLICIT_EXTERN_C systems.
11550 * cp-tree.h (flag_strict_prototype): Remove.
11551 (strict_prototype): Remove.
11552 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11553 * decl.c (maybe_push_to_top_level): Adjust.
11554 (pop_from_top_level): Adjust.
11555 (decls_match): Only allow sloppy parm matching for ancient
11556 system headers.
11557 (init_decl_processing): Adjust.
11558 (grokdeclarator): Adjust.
11559 * decl2.c (flag_strict_prototype): Remove.
11560 (strict_prototype): Remove.
11561 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11562 (lang_f_options): Remove "strict-prototype".
11563 (unsupported-options): Add "strict-prototype".
11564 * lex.c (do_identifier): Adjust.
11565 (do_scoped_id): Adjust.
11566 * parse.y (empty_parms): Adjust.
11567 * class.c (push_lang_context): Adjust.
11568 (pop_lang_context): Adjust.
11569 * typeck.c (comp_target_parms): Adjust.
11570
c3783399
NS
115712000-07-25 Nathan Sidwell <nathan@codesourcery.com>
11572
11573 * decl.c (poplevel): Deal with anonymous variables at for scope.
11574 (maybe_inject_for_scope_var): Likewise.
11575
a7023245
ZW
115762000-07-25 Zack Weinberg <zack@wolery.cumb.org>
11577
11578 * decl.c: Remove all signal handling code, now done in toplev.c.
11579
95ee998c
MM
115802000-07-23 Mark Mitchell <mark@codesourcery.com>
11581
11582 * decl.c (make_rtl_for_nonlocal_decl): Rework.
11583
11584 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11585 correctly.
11586
1b493b81
ZW
115872000-07-20 Zack Weinberg <zack@wolery.cumb.org>
11588
11589 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11590 Define my_friendly_assert and my_friendly_abort as macros
11591 which may call friendly_abort. Prototype friendly abort, not
11592 my_friendly_abort or my_friendly_assert.
11593 * decl.c (signal_catch): Report the signal caught in the error
11594 message. Call fatal directly.
11595 * typeck2.c (ack, my_friendly_assert): Delete.
11596 (my_friendly_abort): Rename to friendly_abort. Expect file,
11597 line, and function parameters. Report the abort code, then
11598 call fancy_abort. Do not mask an abort if errors have
11599 already occurred.
11600
a306451c
NS
116012000-07-18 Nathan Sidwell <nathan@codesourcery.com>
11602
11603 * typeck.c (comp_target_parms): Remove obsolete parameter.
11604 (comp_target_types): Adjust.
11605
f49fad00
JM
116062000-07-17 Jason Merrill <jason@redhat.com>
11607
11608 * typeck.c (mark_addressable): Never set TREE_USED.
11609 * call.c (build_call): Don't abort on calls to library functions
11610 that have been declared normally.
11611
11612 * typeck.c (build_binary_op): Fix grammar in warning.
11613
11614 * exception.cc (__eh_free): Fix prototype.
11615
11616 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11617
0e5921e8 11618 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
11619 IDENTIFIER_NAMESPACE_VALUE.
11620
69690d98
MM
116212000-07-16 Mark Mitchell <mark@codesourcery.com>
11622
11623 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11624 * method.c (use_thunk): Correct handling of vcall offsets.
11625
bfbbc080
ZW
116262000-07-14 Zack Weinberg <zack@wolery.cumb.org>
11627
11628 * .cvsignore: parse.h and parse.c have no cp- prefix.
11629
83a90717
MM
116302000-07-13 Mark Mitchell <mark@codesourcery.com>
11631
11632 * .cvsignore: New file.
11633
ea414c97
ZW
116342000-07-13 Zack Weinberg <zack@wolery.cumb.org>
11635
11636 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
11637
792abd35
MM
116382000-07-12 Mark Mitchell <mark@codesourcery.com>
11639
11640 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11641 * parse.c: Remove.
11642 * parse.h: Likewise.
11643
72a50ab0
MM
116442000-07-11 Mark Mitchell <mark@codesourcery.com>
11645
11646 * class.c (layout_class_type): Add pointers to virtual bases after
11647 base classes under the old ABI.
11648
0dfdeca6
BC
116492000-07-10 Benjamin Chelf <chelf@codesourcery.com>
11650
11651 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11652 (finish_continue_stmt): Likewise.
11653 (begin_for_stmt): Remove call to note_level_for_for.
11654 (finish_goto_stmt): Change call from build_min_nt
11655 to build_stmt.
11656 (finish_expr_stmt): Likewise.
11657 (begin_if_stmt): Likewise.
11658 (begin_while_stmt): Likewise.
11659 (finish_while_stmt): Likewise.
11660 (finish_return_stmt): Likewise.
11661 (begin_for_stmt): Likewise.
11662 (finish_for_stmt): Likewise.
11663 (finish_break_stmt): Likewise.
11664 (begin_switch_stmt): Likewise.
11665 (finish_case_label): Likewise.
11666 (genrtl_try_block): Likewise.
11667 (begin_try_block): Likewise.
11668 (begin_handler): Likewise.
11669 (begin_compound_stmt): Likewise.
11670 (finish_asm_stmt): Likewise.
11671 (finish_label_stmt): Likewise.
11672 (add_decl_stmt): Likewise.
11673 (finish_subobject): Likewise.
11674 (finish_decl_cleanup): Likewise.
11675 (finish_named_return_value): Likewise.
11676 (setup_vtbl_ptr): Likewise.
11677 (add_scope_stmt): Likewise.
11678 * decl.c (finish_constructor_body): Likewise.
11679 (finish_destructor_body): Likewise.
11680 * optimize.c (copy_body_r): Likewise.
11681 (initialize_inlined_parameters): Likewise.
11682 (declare_return_variable): Likewise.
11683 (expand_call_inline): Likewise.
0e5921e8 11684
f12eef58
JJ
116852000-07-10 Jakub Jelinek <jakub@redhat.com>
11686
11687 * semantics.c (expand_body): Sync interface information
11688 at the end of function body expansion.
11689
2bb5d995
JM
116902000-07-09 Jason Merrill <jason@redhat.com>
11691
11692 * init.c (build_new_1): Bail early if the call to new fails.
11693
0e5921e8 11694 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
11695 an INTEGER_CST, not just TREE_CONSTANT.
11696
0e5921e8 11697 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
11698 the DECL_TEMPLATE_RESULT.
11699 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11700 codes.
11701
11702 * error.c (dump_template_bindings): Don't crash if we had an
11703 invalid argument list.
11704
11705 * typeck.c (c_expand_start_case): Do narrowing here.
11706 * semantics.c (finish_switch_cond): Not here.
11707
117082000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
11709
11710 * parse.y (asm_clobbers): Do string concatenation.
11711
089acd57
MM
117122000-07-09 Mark Mitchell <mark@codesourcery.com>
11713
11714 * decl.c (pushtag): Don't put local classes in template functions
11715 on the local_classes list.
11716
117172000-07-04 Scott Snyder <snyder@fnal.gov>
11718
11719 * decl2.c (get_guard): Add missing return for old ABI local
11720 variable case.
11721
7b019c19
MM
117222000-07-09 Mark Mitchell <mark@codesourcery.com>
11723
11724 * cp-tree.h (char_type_p): New function.
11725 * decl.c (init_decl_processing): Don't initialize
11726 signed_wchar_type_node or unsigned_wchar_type_node.
11727 (complete_array_type): Handle brace-enclosed string-constants.
11728 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11729 * tree.c (char_type_p): New function.
11730 * typeck2.c (digest_init): Use char_type_p.
11731
a5f1c5f8
NS
117322000-07-06 Nathan Sidwell <nathan@codesourcery.com>
11733
11734 * pt.c (tsubst): Don't layout type, if it's error_mark.
11735
84e5ca0f
NS
117362000-07-06 Nathan Sidwell <nathan@codesourcery.com>
11737
11738 * pt.c (instantiate_pending_templates): Reset template level.
11739
ab785305
JM
117402000-07-05 Jason Merrill <jason@redhat.com>
11741
11742 * call.c (joust): Don't complain about `operator char *()' beating
11743 `operator const char *() const'.
11744
90418208
JM
117452000-07-04 scott snyder <snyder@fnal.gov>
11746 Jason Merrill <jason@redhat.com>
11747
0e5921e8 11748 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
11749 bases has a null TYPE_BINFO_VTABLE.
11750
117512000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
11752 Jason Merrill <jason@redhat.com>
11753
11754 * parse.y (member_init): Just pass in the type.
11755 * init.c (expand_member_init): Handle getting a type.
11756
11757