]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
fold-const.c (make_range): Do not access operand 1 for a zero-operand operator.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
d17811fd
MM
12003-07-08 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
4 * cp-tree.h (build_call_from_tree): Remove.
5 (build_member_call): Likewise.
6 (dependent_template_arg_p): Remove.
7 (any_dependent_template_arguments_p): New function.
8 (dependent_template_id_p): Likewise.
9 (any_type_dependent_arguments_p): Likewise.
10 (build_non_dependent_expr): Likewise.
11 (build_non_dependent_args): Likewise.
12 (build_x_compound_expr): Adjust prototype.
13 * call.c (build_new_method_call): Handle non-dependent expressions
14 correctly.
15 * decl2.c (grok_array_decl): Likewise.
16 (build_offset_ref_call_from_tree): Likewise.
17 (build_call_from_tree): Remove.
18 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
19 (dump_expr): Likewise.
20 * init.c (build_member_call): Remove.
21 * mangle.c (write_expression): Update handling for template-ids.
22 * parser.c (cp_parser_primary_expression): Use
23 any_dependent_template_arguments_p. Update constant-expression
24 handling.
25 (cp_parser_postfix_expression): Use
26 any_type_dependent_arguments_p. Simplify call processing.
27 (cp_parser_unary_expression): Simplify.
28 (cp_parser_expression): Adjust for changes to
29 build_x_compound_expr.
30 (cp_parser_template_argument): Implement standard-conforming
31 parsing of non-type template arguments.
32 (cp_parser_direct_declarator): Use
33 cp_parser_fold_non_dependent_expr.
34 (cp_parser_fold_non_dependent_expr): New function.
35 (cp_parser_next_token_ends_template_argument_p): Likewise.
36 * pt.c (convert_template_argument): Do not call
37 maybe_fold_nontype_arg.
38 (tsubst_baselink): Likewise.
39 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
40 processing work correctly for non-dependent expressions. Adjust
41 handling of COMPOUND_EXPR. Simplify call processing.
42 (value_dependent_expression_p): Deal with functional casts and
43 sizeof/alignof correctly.
44 (type_dependent_expression_p): Handle overloaded functions.
45 (any_type_dependent_arguments_p): New function.
46 (any_dependent_template_arguments_p): Likewise.
47 (dependent_template_p): Treat SCOPE_REFs as dependent.
48 (dependent_template_id_p): Simplify.
49 (build_non_dependent_expr): New function.
50 (build_non_dependent_args): Likewise.
51 * semantics.c (finish_stmt_expr): Don't make dependent
52 statement-expresions have void type.
53 (finish_call_expr): Handle non-dependent expressions
54 correctly.
55 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
56 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
57 type size_t, even in templates.
58 (expr_sizeof): Likewise.
59 (finish_class_member_access_expr): Handle non-dependent expressions
60 correctly.
61 (build_x_indirect_ref): Likewise.
62 (build_x_binary_op): Likewise.
63 (build_x_unary_op): Likewise.
64 (build_x_conditional_expr): Likewise.
65 (build_x_compound_expr): Likewise.
66 * typeck2.c (build_x_arrow): Likewise.
67
084c1779
JH
68Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
69
70 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
71 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
72 (start_function): Use DECL_ESTIMATED_INSNS.
73 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
74
75 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
76 unit-at-a-time
77
c4d0910c
KL
782003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
79
80 PR c++/11030
81 * pt.c (instantiate_class_template): Don't call xref_tag to
82 inject name when the friend class is a specialization.
83
ee76b931
MM
842003-07-07 Mark Mitchell <mark@codesourcery.com>
85
86 * cp-tree.h (build_scoped_method_call): Remove.
87 (lookup_qualified_name): Remove parameter.
88 (tsubst_copy_and_build): Declare.
89 (finish_qualified_object_call_expr): Remove.
90 (check_accessibility_of_qualified_id): New function.
91 (finish_qualified_id_expr): Likewise.
92 (non_reference): Likewise.
93 (build_expr_from-tree): Remove.
94 * call.c (non_reference): Remove.
95 (build_scoped_method_call): Likewise.
96 (build_method_call): Use error_operand_p. Assert that we are not
97 processing a template.
98 (standard_conversion): Use non_reference.
99 * class.c (build_vtbl_entry_ref): Likewise.
100 (build_vtbl_ref_1): Likewise.
101 * cvt.c (build_expr_type_conversion): Use non_reference.
102 * decl.c (lookup_qualified_name): Remove flags parameter.
103 (grok_op_properties): Use non_reference.
104 * decl2.c (grok_array_decl): Likewise.
105 (build_expr_from_tree): Remove.
106 (build_offset_ref_call_from_tree): Update comment.
107 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
108 * except.c (prepare_eh_types): Use non_reference.
109 (can_convert_eh): Likewise.
110 * init.c (build_dtor_call): Avoid using build_method_call.
111 * mangle.c (write_template_param): Remove misleading comment.
112 * method.c (locate_copy): Use non_reference.
113 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
114 (cp_parser_primary_expression): Do not create SCOPE_REFs is
115 non-dependent contexts.
116 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
117 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
118 build_expr_from_tree.
119 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
120 Use check_accessibility_of_qualified_id.
121 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
122 build_expr_from_tree.
123 (tsubst_baselink): New function.
124 (tsubst_qualified_id): Likewise.
125 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
126 (tsubst_expr): Adjust call to lookup_qualified_name.
127 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
128 handling of CALL_EXPRs.
129 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
130 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
131 * search.c (check_final_overrider): Likewise.
132 * semantics.c (check_accessibility_of_qualified_id): New function.
133 (finish_qualified_object_call_expr): Remove.
134 * typeck.c (target_type): Use non_reference.
135 (cxx_sizeof_or_alignof_type): Likewise.
136 (dubious_conversion_warnings): Likewise.
137 (convert_for_initialization): Likewise.
138 (non_reference): New function.
139
75b6f3fd
KG
1402003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
141
142 * decl.c (print_binding_level, print_other_binding_stack,
143 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
144 stdio calls.
145 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
146
5671bf27
AJ
1472003-07-07 Andreas Jaeger <aj@suse.de>
148
149 * friend.c: Convert to ISO C90 prototypes.
150
151 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
152 language.
153 * cfns.h: Regenerate.
154
155 * typeck.c: Convert remaining prototypes to ISO C90.
156 * search.c: Likewise.
157
158 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
159 * semantics.c (expand_or_defer_fn): Likewise
160 * mangle.c (discriminator_for_string_literal): Likewise.
161 * g++spec.c (lang_specific_driver): Likewise.
162
163 * search.c (lookup_base_r): Remove unused variable.
164
0cea056b
NS
1652003-07-07 Nathan Sidwell <nathan@codesourcery.com>
166
167 * semantics.c: (genrtl_try_block) Adjust emit_line_note
168 calls.
169
5fc521ac
AJ
1702003-07-07 Andreas Jaeger <aj@suse.de>
171
172 * search.c (lookup_base_r): Remove unused variable.
173
267a0752
MC
1742003-07-06 Michael Chastain <mec@shout.net>
175
176 PR debug/10055
177 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
178 assigning to input_filename directly.
179
9bcb9aae
KH
1802003-07-06 Kazu Hirata <kazu@cs.umass.edu>
181
182 * call.c: Fix comment formatting.
183 * class.c: Likewise.
184 * cp-tree.h: Likewise.
185 * decl.c: Likewise.
186 * decl2.c: Likewise.
187 * error.c: Likewise.
188 * method.c: Likewise.
189 * name-lookup.c: Likewise.
190 * parser.c: Likewise.
191 * pt.c: Likewise.
192 * rtti.c: Likewise.
193 * search.c: Likewise.
194 * typeck.c: Likewise.
195
127b8136
MM
1962003-07-06 Mark Mitchell <mark@codesourcery.com>
197
198 PR c++/11345
199 * search.c (lookup_base_r): Remove is_non_public and
200 within_current_scope parameters. Remove other dead code.
201 (lookup_base): Adjust call to lookup_base_r.
202 (adjust_result_of_qualified_name_lookup): Improve comment.
203 * semantics.c (finish_call_expr): Use maybe_dummy_object.
204
cb66e385
NB
2052003-07-06 Neil Booth <neil@daikokuya.co.uk>
206
207 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
208 LANG_HOOKS_MISSING_ARGUMENT): Override.
209
0a72704b
MM
2102003-07-05 Mark Mitchell <mark@codesourcery.com>
211
212 PR c++/11431
213 * typeck.c (build_static_cast): Check for reference conversions
214 earlier.
215
2162003-07-04 Mark Mitchell <mark@codesourcery.com>
217
218 * cp-tree.h (perform_integral_promotions): Declare.
219 * call.c (build_addr_func): Use decay_conversion.
220 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
221 (convert_for_arg_passing): Use perform_integral_promotions.
222 * cvt.c (build_expr_type_conversion): Use decay_conversion.
223 (type_promotes_to): Do not return a cv-qualified type.
224 * decl.c (grok_reference_init): Fix formatting.
225 (get_atexit_node): Use decay_conversion.
226 (build_enumerator): Use perform_integral_promotions.
227 * init.c (build_vec_init): Use decay_conversion.
228 * semantics.c (finish_expr_stmt): Likewise.
229 (finish_switch_cond): Use perform_integral_promotions.
230 * typeck.c (default_conversion): Likewise.
231 (perform_integral_promotions): New function.
232 (build_indirect_ref): Use decay_conversion.
233 (build_array_ref): Use perform_integral_promotions.
234 (convert_arguments): Use decay_conversion.
235 (build_unary_op): Use perform_integral_promotions.
236 (build_c_cast): Use decay_conversion.
237 (build_modify_expr): Likewise.
238 (convert_for_initialization): Likewise.
239 * typeck2.c (build_x_arrow): Likewise.
240
34cd5ae7
KH
2412003-07-04 Kazu Hirata <kazu@cs.umass.edu>
242
243 * call.c: Fix comment typos.
244 * class.c: Likewise.
245 * cp-tree.h: Likewise.
246 * cvt.c: Likewise.
247 * decl2.c: Likewise.
248 * decl.c: Likewise.
249 * init.c: Likewise.
250 * mangle.c: Likewise.
251 * parser.c: Likewise.
252 * pt.c: Likewise.
253 * search.c: Likewise.
254 * semantics.c: Likewise.
255 * tree.c: Likewise.
256 * typeck.c: Likewise.
257
e6cc3a24
ZW
2582003-07-04 Zack Weinberg <zack@codesourcery.com>
259
260 * parser.c (cp_lexer_read_token): No need to handle string
261 constant concatenation.
262
5f1989e6
KG
2632003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
264
265 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
266 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
267 ATTRIBUTE_GCC_CXXDIAG.
268
8d245821
MM
2692003-07-03 Mark Mitchell <mark@codesourcery.com>
270
d6b4ea85
MM
271 * call.c (build_addr_func): Handle bound pointers-to-members.
272 (build_method_call): Do not call resolve_offset_ref.
273 (implicit_conversion): Likewise.
274 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
275 resolve_offset_ref.
276 (resolve_args): Do not call resolve_offset_ref.
277 (build_conditional_expr): Likewise.
278 (build_new_method_call): Likewise.
279 * cp-tree.def (OFFSET_REF): Update documentation.
d17811fd 280 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
d6b4ea85
MM
281 pointers to members to pointers.
282 (ocp_convert): Do not call resolve_offset_ref.
283 (convert_to_void): Likewise.
284 (build_expr_type_conversion): Likewise.
d17811fd
MM
285 * decl2.c (delete_sanity): Likewise.
286 * init.c (resolve_offset_ref): Simplify greatly.
d6b4ea85
MM
287 (build_vec_delete): Do not call resolve_offset_ref.
288 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
289 if appropriate.
290 (cp_parser_unary_expression): Use
291 cp_parser_simple_cast_expression.
292 (cp_parser_delete_expression): Likewise.
293 (cp_parser_cast_expression): Likewise.
294 (cp_parser_pm_expression): Use cp_parser_binary_op.
295 (cp_parser_simple_cast_expression): New function.
296 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
297 * semantics.c (finish_increment_expr): Likewise.
298 (finish_typeof): Likewise.
299 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
300 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
301 (decay_conversion): Do not call resolve_offset_ref.
302 (finish_class_member_access_expr): Likewise.
303 (convert_arguments): Likewise.
304 (build_x_binary_op): Handle DOTSTAR_EXPR.
305 (condition_conversion): Do not call resolve_offset_ref.
306 (unary_complex_lvalue): Likewise.
307 (build_static_cast): Likewise.
308 (build_reinterpret_cast): Likewise.
309 (build_const_cast): Likewise.
310 (build_c_cast): Likewise.
311 (build_modify_expr): Likewise.
312 (convert_for_assignment): Likewise.
313 (convert_for_initialization): Likewise.
314 * typeck2.c (build_x_arrow): Likewise.
315 (build_m_component_ref): Simplify.
e6cc3a24 316
8d245821
MM
317 * call.c (build_scoped_method_call): Use convert_to_void.
318 (build_method_call): Likewise.
319 * class.c (check_field_decls): Remove dead code.
320 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
321 * decl2.c (grok_array_decl): Remove dead code.
322 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
323 as pointer-to-member representation.
324 * init.c (build_offset_ref): Tidy.
325 (build_vec_delete_1): Use convert_to_void.
326 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
327 as pointer-to-member representation.
e6cc3a24 328
8db1028e
NS
3292003-07-03 Nathan Sidwell <nathan@codesourcery.com>
330
331 PR c++/9162
332 * decl.c (grokdeclarator): Return friend decls, not
333 void_type_node.
334 * decl2.c (grokfield): Alter friend decl check.
335 * parser.c (struct cp_parser): Document default_arg chain on
336 unparsed_functions_queue.
337 (cp_parser_save_default_args): New.
338 (cp_parser_init_declarator, cp_parser_function_definition,
339 cp_parser_member_declaration): Call it.
340 (cp_parser_class_specifier): Remove unused variable. Alter
341 processing of unparsed_functions_queue.
342
04d6ccbd
KG
3432003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
344
345 * class.c (add_method, check_field_decl): Fix format specifier.
346 * decl.c (duplicate_decls, pushdecl, check_goto,
347 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
348 start_enum): Likewise.
349 * decl2.c (ambiguous_decl): Likewise.
350 * pt.c (redeclare_class_template): Likewise.
351
0c83a0fc
NS
3522003-07-02 Nathan Sidwell <nathan@codesourcery.com>
353
08476342
NS
354 PR c++/10219
355 * pt.c (type_unification_real): Don't unify exprs of error type.
356 * tree.c (error_type): Don't die on error_type.
357
0c83a0fc
NS
358 PR c++/9779
359 * decl2.c (arg_assoc_class): Don't die on NULL type.
360 * typeck.c (type_unknown_p): Don't die on untyped expressions.
361
ddb45080
MM
3622003-07-01 Mark Mitchell <mark@codesourcery.com>
363
364 PR c++/6949
365 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
366 classes.
367
b01b2484
KG
3682003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
369
370 * error.c (locate_error): %P takes an `int', not a `tree'.
371
8cd2462c
JH
372Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
373
374 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
375 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
376 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
377 massaging.
378
379 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
380 (expand_or_defer_fn): Declare.
381 (lower_function): Declare.
382 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
383 * decl2.c: Include cgraph.h and varpool.h
384 (maybe_emit_vtables): Make explicit instantations as needed.
385 (mark_member_pointers, lower_function): New functions.
386 (finish_file): Do unit-at-a-time.
387 * method.c (synthesize_method): Use expand_or_defer_fn.
388 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
389 * parser.c (cp_parser_function_definition_after_decl): Use
390 expand_or_defer_fn.
391 * pt.c (instantiate_decl): Likewise.
392 * semantics.c: Include cgraph.h
393 (expand_or_defer_fn): Break out from ...
394 (expand_body): ... here; deal with unit-at-a-time.
395 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
396 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
397
28570f7e
MM
3982003-07-01 Mark Mitchell <mark@codesourcery.com>
399
400 * call.c (resolve_scoped_fn_name): Return error_mark_node for
401 erroneous cases.
402
62bfce90
MM
4032003-07-01 Mark Mitchell <mark@codesourcery.com>
404
405 PR c++/11149
406 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
407 is a class type.
408
814ae570 4092003-07-01 Giovanni Bajo <giovannibajo@libero.it>
e6cc3a24
ZW
410
411 PR c++/8046
412 * error.c (dump_decl): Handle BIT_NOT_EXPR as
413 pseudo destructor calls.
814ae570 414
5b030314
NS
4152003-07-01 Nathan Sidwell <nathan@codesourcery.com>
416
417 * cp-tree.h (define_label): Replace filename and lineno
418 arguments with a location_t.
419 * decl.c (pop_label): Adjust define_label call.
420 (define_label): Replace filename and lineno arguments with a
421 location_t.
422 * semantics.c (finish_label): Adjust define_label call.
423
c9bdad35
MM
4242003-07-01 Mark Mitchell <mark@codesourcery.com>
425
426 PR c++/9559
427 * decl2.c (grokfield): Do not build NOP_EXPRs around the
428 error_mark_node.
429
37fa72e9
NB
4302003-06-30 Neil Booth <neil@daikokuya.co.uk>
431
432 * Make-lang.in: Update.
433 * cp-lang.c (c_language): Define.
434 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
435 * cp-tree.h (cxx_init_options): Remove.
436 * lex.c: Don't include diagnostic.h.
437 (cxx_init_options): Remove.
438
44978276
GB
4392003-06-30 Giovanni Bajo <giovannibajo@libero.it>
440
e6cc3a24
ZW
441 PR c++/4933
442 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
443 tree generated within a template. Use dump_expr to dump an
444 expression sizeof.
44978276 445
f8bee204
GB
4462003-06-30 Giovanni Bajo <giovannibajo@libero.it>
447
e6cc3a24
ZW
448 * mangle.c (write_expression): Exit gracefully when trying to
449 mangle a CALL_EXPR.
f8bee204 450
9b61cc1b
GB
4512003-06-30 Giovanni Bajo <giovannibajo@libero.it>
452
e6cc3a24
ZW
453 PR c++/10750
454 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
455 (value- or type-) dependent expression as DECL_INITIAL is a
456 valid constant-expression (at parser time).
9b61cc1b 457
37198bc8
GB
4582003-06-30 Giovanni Bajo <giovannibajo@libero.it>
459
e6cc3a24
ZW
460 PR c++/11106
461 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
462 USING_DECL, instead of print_tree_identifier.
37198bc8 463
4e3f84b7
GDR
4642003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
465
466 * cp-tree.h (language_to_string): Adjust declaration.
467 * dump.c (cp_dump_tree): Adjust usage.
468 * error.c (dump_char): Use output_formatted_scalar. Tidy.
469 (parm_to_string): Lose unused parameter. Tidy.
470 (expr_to_string): Likewise.
471 (code_to_string): Likewise.
472 (language_to_string): Likewise.
473 (op_to_string): Likewise.
474 (assop_to_string): Likewise.
475 (digit_buffer): Remove.
476 (dump_type): Format builtin vector type as __vector__.
477
748f6cb5
GDR
4782003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
479
480 * error.c (print_integer): Remove.
481 (dump_type_suffix): Adjust.
482 (dump_expr): Likewise.
483
9a472a42
NS
4842003-06-28 Nathan Sidwell <nathan@codesourcery.com>
485
35773471
NS
486 * error.c (print_instantiation_partial_context): Take a
487 location_t.
488 (print_instantiation_full_context): Adjust.
489 (print_instantiation_context): Adjust.
490
9a472a42
NS
491 * cp-tree.h (cp_line_of, cp_file_of): Remove.
492 * error.c (cp_line_of, cp_file_of): Merge into ...
493 (location_of): ... here. Make static, return a location_t.
494 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
495
2e2d4075
NS
4962003-06-28 Nathan Sidwell <nathan@codesourcery.com>
497
498 PR c++/10784
499 * call.c (joust): Move warn_conversion check outwards.
500
8ce33230
ZW
5012003-06-27 Zack Weinberg <zack@codesourcery.com>
502
503 * decl.c (build_typename_type)
504 * mangle.c (write_template_template_arg)
505 * parser.c (cp_parser_scope_through_which_access_occurs)
506 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
507 * repo.c (get_base_filename)
508 * semantics.c (maybe_convert_cond):
509 Mark the definition static, matching the forward declaration.
510
dce50630
MM
5112003-06-27 Mark Mitchell <mark@codesourcery.com>
512
513 PR c++/10468
514 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
515
e455bc27
MM
5162003-06-27 Mark Mitchell <mark@codesourcery.com>
517
518 PR c++/10796
519 * decl.c (finish_enum): Implement DR377.
520
521 * decl.c (cp_finish_decl): Don't make variables with reference
522 type readonly while they are being initialized.
523
3a73bcc6
MM
5242003-06-26 Mark Mitchell <mark@codesourcery.com>
525
526 PR c++/11332
527 * typeck.c (build_static_cast): Avoid returning expressions with
528 reference type.
529
8d4ce389
NS
5302003-06-26 Nathan Sidwell <nathan@codesourcery.com>
531
532 * call.c (build_op_delete_call): Use strip_array_call. Correct
533 error message to say 'delete' or 'delete[]'.
534
2f54a1db
GB
5352003-06-26 Giovanni Bajo <giovannibajo@libero.it>
536
8ce33230
ZW
537 PR c++/8266
538 * pt.c (check_explicit_specialization): When looking up a
539 template function from an identifier outside class-scope, bind
540 it to CP_DECL_CONTEXT.
2f54a1db 541
3fe18f1d
MM
5422003-06-25 Mark Mitchell <mark@codesourcery.com>
543
e80706c4
MM
544 PR c++/10990
545 * search.c (lookup_base_r): Rely on accessible_p, rather than
546 trying to emulate that logic here.
547
3fe18f1d
MM
548 PR c++/10931
549 * call.c (convert_like): Pass issue_conversion_warnings.
550 (convert_like_with_context): Likewise.
551 (convert_like_real): Add issue_conversion_warnings parameter.
552 (perform_direct_initialization_if_possible): New function.
553 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
554 * typeck.c (check_for_casting_away_constness): New function.
555 (build_static_cast): Rewrite.
8ce33230 556
6df5158a
NS
5572003-06-24 Nathan Sidwell <nathan@codesourcery.com>
558
559 * call.c (enforce_access): Assert we get a binfo.
560 (build_op_delete_call): Pass a binfo to
561 perform_or_defer_access_check.
562 * class.c (alter_access): Likewise.
563 * decl.c (make_typename_type): Likewise.
564 (make_unbound_class_template): Likewise.
565 * lex.c (do_identifier): Likewise.
566 * method.c (hack_identifier): Likewise.
567 * parser.c (cp_parser_lookup_name): Likewise.
568 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
569 test.
570 * semantics.c (finish_non_static_data_member): Likewise.
571 (perform_or_defer_access_check): Expect a binfo.
572 * typeck.c (comptypes): Expect types.
573
574 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
575 * friend.c (make_friend_class): Likewise.
576 * pt.c (check_default_tmpl_args): Likewise.
577 (lookup_template_class): Likewise.
578
cebebe72
JH
579Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
580
581 * method.c (thunk_labelno): Move outside ifdef block to make garbage
582 collector happy.
583
d35543c0
JH
584Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
585
586 * class.c (build_vtable): Make vtables.
587 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
588 * decl2.c (output_vtable_inherit): Rename to ...
589 (prepare_assemble_variable): ... this one; change interface.
590 (maybe_emit_vtables): Do not call output_vtable_inherit.
591 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
592 * cp-tree.h (prepare_assemble_variable): New.
593
d46c570d
AP
5942003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
595
596 * method.c: add prototype for make_alias_for_thunk.
597 (thunk_labelno, make_alias_for_thunk): only define
598 if ASM_OUTPUT_DEF is defined.
599
89ce1c8f
JJ
6002003-06-23 Jakub Jelinek <jakub@redhat.com>
601
602 * method.c (thunk_labelno): New variable.
603 (make_alias_for_thunk): New function.
604 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
605 into the same section as the function it is calling.
606 Include gt-cp-method.h.
607 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
608 (cp/method.o): Depend on gt-cp-method.h.
609 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
610
bb4f6e6b
JH
611Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
612
613 * decl.c (register_dtor_fn): Mark cleanup as used.
614 * decl2.c (mark_vtable_entries): Skip nops.
615 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
616 (build_dynamic_cast_1): Likewise.
617 (tinfo_base_init): Likewise.
618 (emit_tinfo_decl): Likewise.
619
98decfaf
JJ
6202003-06-23 Jakub Jelinek <jakub@redhat.com>
621
6df5158a 622 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
98decfaf
JJ
623 to it.
624
25abc0a5
GDR
6252003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
626
627 PR c++/10784
628 * call.c (joust): Warn about choosing conversion sequence only if
629 -Wconversion.
630
84cc377e
GDR
6312003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
632
25abc0a5 633 PR c++/10864
84cc377e
GDR
634 * call.c (op_error): Tidy.
635 * error.c (dump_expr): Properly format 'T()' when T is an
636 aggregate type.
637
dfbeb061
GDR
6382003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
639
640 PR c++/10915
641 * decl.c (grok_op_properties): Warn possible confusing conversion
642 only if -Wconversion.
643
68361a03
MM
6442003-06-20 Mark Mitchell <mark@codesourcery.com>
645
66d418e6
MM
646 PR c++/10749
647 * parser.c (cp_parser_class_head): See through dependent names
648 when parsing a class-head.
649
68361a03
MM
650 PR c++/10845
651 * pt.c (try_class_unification): Correct handling of member class
652 templates.
653
1f9cc6db
NS
6542003-06-20 Nathan Sidwell <nathan@codesourcery.com>
655
656 * semantics.c (genrtl_finish_function): Adjust
657 expand_function_end call.
658
170b020f
MM
6592003-06-19 Mark Mitchell <mark@codesourcery.com>
660
00cf3e31
MM
661 PR c++/10939
662 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
663 functions.
664 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
665
f139561c
MM
666 PR c++/9649
667 * cp-tree.h (pushdecl_class_level): Change prototype.
668 (push_class_level_binding): Likewise.
669 * decl.c (add_binding): Reject duplicate static data members.
670 (pushdecl_class_level): Return a value indicating whether or not
671 the binding was valid.
672 (push_class_level_binding): Likewise.
673 * semantics.c (finish_member_declaration): Don't keep invalid
674 declarations.
675
170b020f
MM
676 PR c++/11041
677 * call.c (initialize_reference): Do not use cp_finish_decl to emit
678 temporary variables.
679 * cp-tree.h (static_aggregates): Declare.
680 (pushdecl_top_level_and_finish): Likewise.
681 * decl.c (pushdecl_top_level_1): New function.
682 (pushdecl_top_level): Use it.
683 (pushdecl_top_level_and_finish): New function.
684 (initialize_local_var): Remove redundant code.
685 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
686 building_stmt_tree.
687 * decl.h (static_aggregates): Remove.
688 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
689 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
690 (tinfo_base_init): Likewise.
8ce33230 691
7a1d37e9
MA
6922003-06-19 Matt Austern <austern@apple.com>
693
694 PR c++/11228
695 * init.c (build_zero_init): Assert that number of array elements
696 is an integer constant.
697 (build_default_init) Don't use build_zero_init for arrays with
698 variable number of elements.
8ce33230 699
e295f317
AJ
7002003-06-19 Andreas Jaeger <aj@suse.de>
701
702 * cp-tree.h: Remove duplicated declarations.
703
3a978d72
NN
7042003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
705
706 * pt.c: Convert to ISO C.
707 * semantics.c: Convert to ISO C.
708
acd8e2d0
NS
7092003-06-18 Nathan Sidwell <nathan@codesourcery.com>
710
711 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
712 at_least_as_qualified_p, more_qualified_p): Return bool.
713 * typeck.c: ANSIFY function definitions.
714 (comp_array_types): Take redeclaration bool parameter.
715 (comptypes): Rearrange STRICT handling.
716 (at_least_as_qualified_p, more_qualified_p,
717 comp_cv_qualification): Cache cv quals.
718 (compparms): Rearrange loop.
e295f317 719
c8a209ca
NS
7202003-06-18 Nathan Sidwell <nathan@codesourcery.com>
721
722 * cp-tree.h (COMPARE_RELAXED): Rename to ...
723 (COMPARE_DERIVED): ... here. Adjust comment.
724 (resolve_typename_type_in_current_instantiation): Remove.
725 (cp_tree_equal, comptypes): Return a bool.
726 * cvt.c (convert_to_reference): Adjust comptypes call.
727 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
728 (resolve_typename_type_in_current_instantiation): Remove.
729 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
730 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
731 calls. Refactor code.
732 * typeck.c (comp_array_types): Return bool. Lose callback.
733 parameter. Adjust cp_tree_equal calls.
734 (comptypes): Return bool. Adjust strict handling. Remove relaxed
735 enumeration and java type handling. Deal with typename types here.
736 Adjust recursive and cp_tree_equals calls. Adjust base and derived
737 checking.
738 (comp_target_types): Remove unreachable code. Adjust
739 same_or_base_type_p calls.
740 (ptr_reasonably_similar): Adjust base and derived check.
e295f317 741
c8a209ca
NS
742 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
743 unused calculation.
744 (check_return_expr): Adjust error messages.
745 * cp-tree.def (SCOPE_REF): Correct comment.
746
a26574f5
MM
7472003-06-17 Mark Mitchell <mark@codesourcery.com>
748
749 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
750 string again.
751
f3f735eb
RA
7522003-06-17 Robert Abeles <rabeles@archaelogic.com>
753
754 * optimize.c (dump_function): Form complete flag name by
755 prefixing 'fdump-' to string returned by dump_flag_name().
756
f2d90304
MM
7572003-06-17 Mark Mitchell <mark@codesourcery.com>
758
759 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
760 string.
761
9da32fe1
JM
7622003-06-17 Jason Merrill <jason@redhat.com>
763
764 PR c++/10929
765 * decl.c (grokfndecl): Don't mark a function inline for
766 -finline-functions if it isn't defined.
767
ca90f3e1
MM
7682003-06-17 Mark Mitchell <mark@codesourcery.com>
769
019bb98e 770 PR c++/10712
3cedc9d8
MM
771 * class.c (handle_using_decl): Robustify.
772
ca90f3e1
MM
773 PR c++/11105
774 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
775 * mangle.c (struct globals): Remove internal_mangling_p.
776 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
777 (write_template_parm): Don't write out the level number.
778 (conv_type_names): New variable.
779 (hash_type): New function.
780 (compare_type): Likewise.
781 (mangle_conv_op_name_for_type): Don't try to mangle conversion
782 operator names.
783 * search.c (lookup_conversion_operator): New function.
784 (lookup_fnfields_1): Use it.
785
4c168c6e
AJ
7862003-06-17 Andreas Jaeger <aj@suse.de>
787
788 * except.c: Remove duplicate declaration of push_eh_cleanup.
789
790 * call.c: Remove extra declaration of inhibit_warnings.
791
89aec4b1
NN
7922003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
793
794 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
795 * mangle.c: Convert to ISO C.
796
fad205ff
KG
7972003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
798
799 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
800 macro.
801
b57b79f7
NN
8022003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
803
804 * tree.c: Convert to ISO C.
805
4de8668e
KH
8062003-06-16 Kazu Hirata <kazu@cs.umass.edu>
807
808 * cp-tree.h: Follow spelling conventions.
809 * mangle.c: Likewise.
810 * method.c: Likewise.
811 * parser.c: Likewise.
812
ee6b0296
NS
8132003-06-14 Nathan Sidwell <nathan@codesourcery.com>
814
815 * decl.c (start_function): Adjust init_function_start call.
816 * method.c (use_thunk): Likewise.
817 * semantics.c (genrtl_start_function): Likewise.
818
d7b42618
NB
8192003-06-14 Neil Booth <neil@daikokuya.co.uk>
820
821 * Make-lang.in: Remove c-options.o.
822
0a8cb79e
NN
8232003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
824
9e7d1164
NN
825 * lex.c: Convert to ISO C.
826
362efdc1
NN
827 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
828 * init.c: removes use of PARAMS macro. Use ISO style function
829 declarations. (Not copyright-significant change.)
830
cec57f72
NN
831 * rtti.c: Remove PARAMS.
832
0a8cb79e
NN
833 * typeck2.c: Convert to ISO C.
834
79b59cc3
MM
8352003-06-12 Mark Mitchell <mark@codesourcery.com>
836
837 PR c++/10635
838 * typeck.c (build_c_cast): Check that the destination type is
839 complete.
840
df7f7b9c
MM
8412003-06-11 Mark Mitchell <mark@codesourcery.com>
842
843 PR c++/10432
844 * cp-tree.h (finish_declarator): Remove.
845 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
846 erroneous declarations.
847 * semantics.c (finish_declarator): Remove.
848
35b4a576
RS
8492003-06-11 Roger Sayle <roger@eyesopen.com>
850
e295f317 851 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
35b4a576
RS
852 global static constructor/destructor if it will be empty, i.e.
853 either doesn't call any ctors/dtors or only calls pure or const
854 ctors/dtors.
855
a5512a2f
MM
8562003-06-11 Mark Mitchell <mark@codesourcery.com>
857
24386c5e
MM
858 * mangle.c (tm_p.h): Include it.
859 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
860
a5512a2f
MM
861 PR c++/11131
862 * tree.c (cp_cannot_inline_fn): Check for "inline" before
863 instantiation.
864
0c16e8d6
JM
8652003-06-10 Jason Merrill <jason@redhat.com>
866
867 PR c++/10968
e9bbabab 868 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
0c16e8d6 869
d192828a
GK
8702003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
871
872 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
873 (start_cleanup_cnt): New.
874
d58b7c2d
MM
8752003-06-10 Mark Mitchell <mark@codesourcery.com>
876
877 PR c++/11131
878 * cp-tree.h (template_for_substitution): Declare.
879 * decl2.c (mark_used): Use it when figuring out whether or not a
880 function is inline.
881 * pt.c (template_for_substitution): Give it external linkage.
882 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
883 possible.
884
94d3ea58
ZW
8852003-06-09 Zack Weinberg <zack@codesourcery.com>
886
887 PR 8861
888 * mangle.c (write_real_cst): New function. Implement
889 ABI-compliant mangling of floating-point literals when
890 -fabi-version>=2; provide backward compatibility with 3.3 when
891 -fabi-version=1 (with warning). Clarify commentary.
892 (write_template_arg_literal): Use write_real_cst.
893
55c6e1a6
AJ
8942003-06-07 Andreas Jaeger <aj@suse.de>
895
896 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
897
2772ef3e
NB
8982003-06-07 Neil Booth <neil@daikokuya.co.uk>
899
900 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
901 (LANG_HOOKS_HANDLE_OPTION): Override.
902 * cp-tree.h (cxx_init_options): Update.
903 * lex.c (cxx_init_options): Update.
904
8f231b5d
JH
905Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
906
907 * Make-lang.in: Add support for stageprofile and stagefeedback
908
88d5a16e
R
9092003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
910
911 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
912
81c0e50a
AJ
9132003-06-04 Andreas Jaeger <aj@suse.de>
914
915 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
916
dbe85b80
JM
9172003-06-03 Jason Merrill <jason@redhat.com>
918
94d3ea58 919 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
dbe85b80 920
94d3ea58 921 * cp/decl.c (reshape_init): Handle vectors.
dbe85b80 922
94d3ea58 923 * testsuite/g++.dg/init/array10.C: New.
dbe85b80 924
6c07f448
KL
9252003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
926
927 PR c++/10940
928 * pt.c (check_explicit_specialization): Check for 'static'
929 earlier.
930
522801e7
DN
9312003-05-31 Diego Novillo <dnovillo@redhat.com>
932
933 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
934 the operand of a CONSTRUCTOR node.
935
82a2669e
GDR
9362003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
937
938 * decl.c (cp_binding_level::this_entity): Rename from this_class.
939 (cxx_scope_descriptor): New function.
940 (cxx_scope_debug): Likewise.
941 (push_binding_level): Use it.
942 (pop_binding_level): Likewise.
943 (suspend_binding_level): Likewise.
944 (resume_binding_level): Likewise.
945 (pushlevel_class): Adjust use of this_class.
946 (pushtag): Likewise.
947 (lookup_name_real): Likewise.
948 (global_scope_name): New variable.
949 (initialize_predefined_identifiers): Initialize it.
950 (push_namespace): Use it.
951 (make_cxx_scope): New function.
952 (pushlevel): Use it.
953 (pushlevel_class): Likewise.
954 (push_binding_level): Simplify. Loose the last two arguments.
955 (make_binding_level): Remove.
956 (initial_push__namespace_scope): New function.
957 (push_namespace): Use it. Simplify.
55c6e1a6 958 (cxx_init_decl_processing): Likewise.
82a2669e
GDR
959 (declare_namespace_level): Remove.
960
76d3baad
KL
9612003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
962
963 PR c++/10956
964 * pt.c (instantiate_decl): Don't use full template arguments if
965 we are dealing with specializations.
966
f37e2274
GDR
9672003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
968
969 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
970 (binding_depth): Unconditionally define.
971 (is_class_level): Likewise.
972 (indent): Likewise. Take an indenting parameter.
55c6e1a6 973 (push_binding_level): Remove conditional definittion.
f37e2274
GDR
974 (pop_binding_level): Likewise.
975 (suspend_binding_level): Likewise.
976 (resume_binding_level): Likewise.
977 (pushlevel): Likewise.
978 (pushlevel_class): Likewise.
979 (poplevel_class): Likewise.
980 (pop_everything): Likewise.
981
5f52c0e0
GDR
9822003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
983
984 * name-lookup.h (global_scope_p): New macro.
985 * decl.c (pop_binding_level): Use it. Don't refer directly to
55c6e1a6 986 global_binding_level.
5f52c0e0
GDR
987 (suspend_binding_level): Likewise.
988 (global_bindings_p): Likewise.
989 (print_other_binding_stack): Likewise.
990 (print_binding_stack): Likewise.
991 (maybe_push_to_top_level): Likewise.
992 (pushdecl_namespace_level): Likewise.
993 (cxx_init_decl_processing): Likewise.
994 (start_decl): Likewise.
995 (cp_finish_decl): Likewise.
996 (start_function): Likewise.
997 (global_binding_level): Remove.
998
b7fc8b57
KL
9992003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1000
1001 * parser.c (cp_parser_explicit_instantiation): Restore old
1002 access before template instantiation.
1003
0de12fcc
GK
10042003-05-23 Geoffrey Keating <geoffk@apple.com>
1005
1006 * lang-specs.h: Use -o to specify preprocessor's output file.
1007 Make -no-integrated-cpp work when building PCH files.
1008
43b26a01
KL
10092003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1010
1011 PR c++/10682
1012 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1013 check for implicitly created typedef to an enum.
1014
49b7aacb
JM
10152003-05-21 Jason Merrill <jason@redhat.com>
1016
1017 * init.c (build_vec_delete): Copy the address into a temporary
1018 variable before calling build_vec_delete_1.
1019 * decl2.c (delete_sanity): Don't call stabilize_reference.
1020
b190f239
NS
10212003-05-21 Nathan Sidwell <nathan@codesourcery.com>
1022
1023 * pt.c (register_specialization): Update the decl's location,
1024 if necessary.
1025 (check_explicit_specialization): Likewise.
1026
58228df6
KG
10272003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1028
1029 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1030
16e31964
DS
10312003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
1032
1033 PR c++/9738
1034 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1035 if the old decl had instantiated DECL_RTL.
1036 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1037
a01fff59
MA
10382003-05-19 Matt Austern <austern@apple.com>
1039
1040 * lang-options.h: Document -Wno-invalid-offsetof
1041 * typeck.c (build_class_member_access_expr): Don't complain about
1042 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
55c6e1a6 1043
7e8f3096
AP
10442003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1045
1046 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1047 (binding_entry_make): Make entry->chain NULL after getting an entry.
1048 fix the spelling of chain in a comment.
1049 (binding_table_free): speed up by having temporary variable.
1050 (binding_table_new): set table->chain to be NULL after allocating
55c6e1a6 1051 a table.
7e8f3096
AP
1052 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1053 binding->previous to NULL after getting an binding for speed.
55c6e1a6 1054
5e0c54e5
GDR
10552003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1056
1057 * cp-tree.h (struct lang_type_class): Replace data member tags
1058 with hash-table nested_udts.
1059 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1060 * class.c (unreverse_member_declarations): Don't touch
55c6e1a6 1061 CLASSTYPE_TAGS.
5e0c54e5
GDR
1062 (pushclass): Use cxx_remember_type_decls.
1063 * decl.c (struct cp_binding_level): Replace data member tags with
1064 hash-table type_decls.
1065 (pop_binding_level): Handle level->type_decls.
1066 (kept_level_p): Adjust.
1067 (poplevel): Remove unused local variable.
1068 (bt_print_entry): New function.
1069 (print_binding_level): Use it.
1070 (push_namespace): Build current_binding_level->type_decls.
1071 (maybe_process_template_type_declaration): Adjust.
1072 (pushtag): Likewise.
1073 (clear_anon_tags): Use binding_table_remove_anonymous_types.
1074 (gettags): Remove.
1075 (cxx_remember_type_decls): Rename from storetags. Adjust.
1076 (lookup_tag): Use binding_table_find_anon_type. Tidy.
1077 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1078 (cxx_init_decl_processing): Build global_binding_level->type_decls.
1079 (store_parm_decls): Remove pointless code.
1080 * name-lookup.c (free_binding_entry): New variable.
1081 (ENTRY_INDEX): New macro.
1082 (struct binding_table_s): New datatype.
1083 (binding_entry_make): New function.
1084 (binding_entry_free): Likewise.
1085 (binding_table_construct): Likewise.
1086 (binding_table_free): Likewise.
1087 (binding_table_new): Likewise.
1088 (binding_table_expand): Likewise.
1089 (binding_table_insert): Likewise.
1090 (binding_table_find): Likewise.
1091 (binding_table_find_anon_type): Likewise.
1092 (binding_table_reverse_maybe_remap): Likewise.
1093 (binding_table_remove_anonymous_types): Likewise.
1094 (binding_table_foreach): Likewise.
1095 * name-lookup.h (binding_table): New type.
1096 (binding_entry): Likewise.
1097 (bt_foreach_proc): Likewise.
1098 (struct binding_entry_s): New datatype.
1099 (SCOPE_DEFAULT_HT_SIZE): New macro.
1100 (CLASS_SCOPE_HT_SIZE): Likewise.
1101 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1102 (NAMESPACE_STD_HT_SIZE): Likewise.
1103 (GLOBAL_SCOPE_HT_SIZE): Likewise.
1104 (binding_table_new): Declare.
1105 (binding_table_free): Likewise.
1106 (binding_table_insert): Likewise.
1107 (binding_table_find_anon_type): Likewise.
1108 (binding_table_reverse_maybe_remap): Likewise.
1109 (binding_table_remove_anonymous_types): Likewise.
1110 (binding_table_foreach): Likewise.
1111 (binding_table_find): Likewise.
1112 (cxx_remember_type_decls): Likewise.
1113 * pt.c (bt_instantiate_type_proc): New function.
1114 (do_type_instantiation): Use it.
1115 * search.c (lookup_field_r): Use binding_table_find.
1116
25903d03
KL
11172003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1118
1119 * semantics.c (perform_deferred_access_checks): Don't discard
1120 checked access.
1121
e34d07f2
KG
11222003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1123
1124 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1125 libiberty VA_ macros, always use stdarg.
1126 * rtti.c (create_pseudo_type_info): Likewise.
1127 * tree.c (build_min_nt, build_min): Likewise.
1128
90ff44cf
KG
11292003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1130
1131 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1132 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1133 collapse multiple function calls into one.
55c6e1a6 1134 * tree.c (debug_binfo): Likewise.
90ff44cf 1135
9cefd2ca
JM
11362003-05-15 Jason Merrill <jason@redhat.com>
1137
1138 PR c++/5388
1139 * call.c (conditional_conversion): Don't consider implicit
55c6e1a6 1140 conversions if T2 is a base of T1.
9cefd2ca
JM
1141 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1142 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1143
1144 * parser.c (cp_parser_primary_expression): Convert a static data
1145 member from reference.
1146
dffbbe80
MM
11472003-05-15 Mark Mitchell <mark@codesourcery.com>
1148
8f4b394d
MM
1149 * call.c (build_op_delete_call): Avoid creating unnecessary types.
1150 * class.c (instantiate_type): Remove tests for tf_no_attributes.
1151 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1152 (COMPARE_NO_ATTRIBUTES): Remove.
1153 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1154
dffbbe80
MM
1155 PR c++/8385
1156 * semantics.c (finish_typeof): Refine type-dependency check.
1157
a65cddcf
JM
11582003-05-13 Jason Merrill <jason@redhat.com>
1159
1160 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1161 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1162
afb19ffb
KL
11632003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1164
1165 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1166
9f01ded6
KL
11672003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1168
1169 PR c++/10230, c++/10481
1170 * semantics.c (finish_non_static_data_member): Handle when the
1171 non-static member is not from a base of the current class type.
1172
fcea7401
KL
11732003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1174
1175 PR c++/10552
1176 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1177 template and has dependent context.
1178
7d021397
KL
11792003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1180
1181 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1182
78757caa
KL
11832003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1184
1185 PR c++/9252
1186 * cp-tree.h (saved_scope): Remove check_access field.
1187 (tsubst_flags_t): Remove tf_parsing.
1188 * decl.c (maybe_push_to_top_level): Don't initialize
1189 scope_chain->check_access.
1190 (make_typename_type, make_unbound_class_template): Don't use
1191 tf_parsing.
1192 (register_dtor_fn): Use push/pop_deferring_access_checks
1193 instead of scope_chain->check_access.
1194 * method.c (use_thunk): Likewise.
1195 * parser.c (cp_parser_explicit_instantiation
1196 (cp_parser_constructor_declarator_p): Don't call
1197 push/pop_deferring_access_checks here.
1198 (cp_parser_template_argument, cp_parser_class_name): Don't use
1199 tf_parsing.
1200 (yyparse): Check flag_access_control.
1201 * pt.c (instantiate_class_template): Call
1202 push/pop_deferring_access_checks.
1203 * semantics.c (push_deferring_access_checks): Propagate
1204 dk_no_check.
1205 (perform_or_defer_access_check): Make sure basetype_path is
1206 a type before comparison.
1207 * call.c (build_op_delete_call, build_over_call): Use
1208 perform_or_defer_access_check.
1209 * class.c (alter_access): Likewise.
1210 * init.c (build_offset_ref): Likewise.
1211 * lex.c (do_identifier): Likewise.
1212 * method.c (hack_identifier): Likewise.
1213 * search.c (lookup_member): Likewise.
1214 * semantics.c (finish_non_static_data_member): Likewise.
1215 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1216 instead of flag_access_control.
1217
8d241e0b
KL
12182003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1219
1220 PR c++/9554
1221 * parser.c (cp_parser_class_name): Remove check_access parameter.
1222 All caller adjusted. Update declaration.
1223 (cp_parser_lookup_name): Likewise.
1224 * semantics.c (push_deferring_access_checks): Change parameter type
1225 to enum deferring_kind. All caller adjusted.
1226 (resume_deferring_access_checks): Adjust to use new enum.
1227 (stop_deferring_access_checks): Likewise.
1228 (perform_or_defer_access_check): Likewise.
1229 * cp-tree.h (deferring_kind): New enum.
1230 (deferred_access): Adjust field type.
1231 (push_deferring_access_checks): Update declaration.
1232
88e98cfe
KL
12332003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1234
1235 PR c++/10555, c++/10576
1236 * pt.c (lookup_template_class): Handle class template with
1237 multiple levels of parameters when one of the levels contain
1238 errors.
1239
8b5e2ce4
JM
12402003-05-08 Jason Merrill <jason@redhat.com>
1241
1242 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1243 expression. Undo some of the recent reorg.
1244
a944ceb9
RH
12452003-05-07 Richard Henderson <rth@redhat.com>
1246
9cefd2ca
JM
1247 PR c++/10570
1248 * cfns.gperf: Comment out POSIX thread cancellation points,
1249 plus abort and raise.
1250 * cfns.h: Regenerate.
a944ceb9 1251
a65fd2d7
JM
12522003-05-07 Jason Merrill <jason@redhat.com>
1253
1254 * call.c (build_conditional_expr): Don't assume that the folded
1255 expression has result_type.
1256
d219f3ff
KL
12572003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1258
1259 * typeck.c (build_unary_op): Deal with const qualifier in
1260 invalid pointer-to-member earlier.
1261
5f7262e6
JM
12622003-05-05 Jason Merrill <jason@redhat.com>
1263
1264 PR c++/9537
1265 * call.c (conditional_conversion): Build an RVALUE_CONV if
1266 we're just changing the cv-quals.
1267 (build_conditional_expr): Don't call convert to change
1268 cv-quals.
1269
16692dd5
KL
12702003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1271
1272 PR c++/10496
1273 * typeck.c (build_unary_op): Don't output const qualifier when
1274 output invalid pointer-to-member diagnostics.
1275
7df87825
KL
12762003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1277
1278 * decl.c: Fix typos.
1279
4b41d9eb
KL
12802003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1281
1282 PR c++/4494
1283 * decl.c (start_function): Use same_type_p to check return type
1284 of main.
1285
87f85ea0
ZW
12862003-05-03 Zack Weinberg <zack@codesourcery.com>
1287
1288 PR c/10604
1289 * cp/typeck.c (build_x_compound_expr): No need to check
1290 extra_warnings as well as warn_unused_value.
1291
5dc5d13c
KL
12922003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1293
1294 PR c++/9364, c++/10553, c++/10586
1295 * decl.c (make_typename_type): Don't crash on illegal code.
1296
82a98427
NS
12972003-05-03 Nathan Sidwell <nathan@codesourcery.com>
1298
1299 * class.c (finish_struct): Use location_t and input_location
1300 directly.
1301 * decl.c (make_label_decl): Likewise.
1302 (use_label): Likewise.
1303 * decl2.c (warn_if_unknown_interface): Likewise.
1304 (start_static_initialization_or_destruction): Likewise.
1305 (generate_ctor_or_dtor_function): Likewise.
1306 (finish_file): Likewise.
1307 * error.c (print_instantiation_full_context): Likewise.
1308 * init.c (create_temporary_var): Likewise.
1309 * method.c (synthesize_method): Likewise.
1310 * parser.c (cp_token): Likewise.
1311 (cp_lexer_set_source_position_from_token): Likewise.
1312 (cp_lexer_get_preprocessor_token): Likewise.
1313 (cp_parser_statement): Likewise.
1314 * pt.c (tsubst_friend_function): Likewise.
1315 (instantiate_class_template): Likewise.
1316 (tsubst_decl): Likewise.
1317 (tsubst): Likewise.
1318 (instantiate_decl): Likewise.
1319 * semantics.c (begin_class_definition): Likewise.
1320 (expand_body): Likewise.
1321
3489e061
NS
13222003-05-01 Nathan Sidwell <nathan@codesourcery.com>
1323
1324 * class.c (finish_struct): Rename lineno to input_line.
1325 * decl.c (push_binding_level, pop_binding_level,
1326 suspend_binding_level, resume_binding_level, make_label_decl,
1327 use_label, start_function): Likewise.
1328 * decl2.c (warn_if_unknown_interface,
1329 start_static_initialization_or_destruction,
1330 generate_ctor_or_dtor_function, finish_file): Likewise.
1331 * error.c (cp_line_of, print_instantiation_full_context,
1332 print_instantiation_context): Likewise.
1333 * except.c (check_handlers_1, check_handlers): Likewise.
1334 * init.c (create_temporary_var): Likewise.
1335 * method.c (use_thunk, synthesize_method): Likewise.
1336 * parser.c (cp_lexer_set_source_position_from_token,
1337 cp_lexer_get_preprocessor_token): Likewise.
1338 * pt.c (push_tinst_level, pop_tinst_level,
1339 tsubst_friend_function, instantiate_class_template, tsubst_decl,
1340 tsubst, tsubst_expr, instantiate_decl): Likewise.
1341 * semantics.c (genrtl_try_block, finish_label_stmt,
1342 begin_class_definition, expand_body,
87f85ea0 1343 genrtl_finish_function): Likewise.
3489e061
NS
1344 * tree.c (build_min_nt, build_min): Likewise.
1345
49bf4577
MM
13462003-05-01 Mark Mitchell <mark@codesourcery.com>
1347
1348 * decl2.c (comdat_linkage): Don't externalize explicit
1349 instantiations.
1350
d0af00af
KL
13512003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1352
1353 PR c++/10554
1354 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
1355 is not NULL.
1356
85209a3c
SB
13572003-05-01 Steven Bosscher <steven@gcc.gnu.org>
1358
1359 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
1360 (struct lang_identifier): ... to here.
1361 (LANG_ID_FIELD): Remove.
1362 (SET_LANG_ID): Remove.
1363 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
1364 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
1365 (IDENTIFIER_IMPLICIT_DECL): Likewise.
1366 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
1367 (IDENTIFIER_ERROR_LOCUS): Likewise.
1368 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1369
d12a7283
KL
13702003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1371
1372 PR c++/8772
1373 * pt.c (convert_template_argument): Correct diagnostic.
1374
d7ed5e55
KL
13752003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1376
1377 PR c++/9432, c++/9528
1378 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
1379
152c16a9
GDR
13802003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
1381
1382 * decl.c (check_previous_goto_1): Adjust prototype.
1383 (check_previous_goto): Adjust use.
1384 (check_switch_goto): Likewise.
1385 (use_label): Adjust.
1386 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
1387 (struct named_label_use_list): Use location_t datatype.
1388
1f6f0cb6
MM
13892003-04-29 Mark Mitchell <mark@codesourcery.com>
1390
1391 PR c++/10551
1392 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
1393 that have not yet been written out.
1394
60cde936
MM
13952003-04-29 Mark Mitchell <mark@codesourcery.com>
1396
555456b1
MM
1397 PR c++/10549
1398 * class.c (layout_class_type): Mark overlong bitfields as having
1399 the maximum size permitted by their type, after layout.
1400
60cde936
MM
1401 PR c++/10527
1402 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
1403
8e854b76
KL
14042003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1405
1406 * call.c (build_operator_new_call): Fix typo.
1407 * lang-options.h: Likewise.
1408
0dbc5cd3
MM
14092003-04-29 Mark Mitchell <mark@codesourcery.com>
1410
75135253
MM
1411 PR c++/10515
1412 * cp-tree.h (lookup_field_1): Declare it.
1413 * search.c (lookup_field_1): Make it public.
1414 * decl.c (reshape_init): Handle designated initializers.
1415
0dbc5cd3
MM
1416 * decl.c (maybe_commonize_var): Further tweak support for systems
1417 without weak symbols.
1418
9e6aaf5e
MM
14192003-04-27 Mark Mitchell <mark@codesourcery.com>
1420
1421 * decl.c (maybe_commonize_var): Fix thinko in last patch.
1422
0b50d7f1
MM
14232003-04-27 Mark Mitchell <mark@codesourcery.com>
1424
772f8889
MM
1425 PR c++/10506
1426 * method.c (use_thunk): Decrement immediate_size_expand.
1427
1428 PR c++/10503
1429 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
1430 (DECL_MAYBE_TEMPLATE): Remove.
1431 * class.c (fixed_type_or_null): Avoid infinite recursion.
1432
0b50d7f1
MM
1433 * decl.c (maybe_commonize_var): Make the code match the comments.
1434 * pt.c (instantiate_decl): Move call to import_export_decl.
1435
e2b69423
MM
14362003-04-26 Mark Mitchell <mark@codesourcery.com>
1437
1438 * decl2.c (finish_file): Fix merge botch.
1439
ea56c40c
MM
14402003-04-25 Mark Mitchell <mark@codesourcery.com>
1441
1442 * decl2.c (finish_file): Don't call import_export_decl for
1443 functions that are not defined.
1444 (handle_class_head): Robustify.
1445 * pt.c (instantiate_decl): Do not call cp_finish_decl for
1446 variables that are not defined.
1447
9804b5b8
SP
14482003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
1449
87f85ea0 1450 * call.c (print_z_candidates): Fix off by one error.
9804b5b8 1451
f8986275
NS
14522003-04-24 Nathan Sidwell <nathan@codesourcery.com>
1453
1454 PR c++/10337
1455 * call.c (joust): Don't warn about conversion ops that are exact
1456 or cv-conversions. Rearrange to avoid multiple type comparisons.
1457
374ca7f7
MM
14582003-04-23 Mark Mitchell <mark@codesourcery.com>
1459
1460 PR c++/10471
1461 * call.c (build_cxx_call): Robustify.
1462
6338b358
NB
14632003-04-23 Neil Booth <neil@daikokuya.co.uk>
1464
1465 * Make-lang.in (lex.o): Remove mbchar.h.
1466 * lex.c (MULTIBYTE_CHARS): Lose.
1467 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
1468 in c-lex.c.
1469
4223f82f
MM
14702003-04-23 Mark Mitchell <mark@codesourcery.com>
1471
1472 PR c++/9847
1473 * cp-tree.h (duplicate_tag_error): Remove.
1474 * class.c (duplicate_tag_error): Remove.
1475 * semantics.c (begin_class_definition): Return immediately for a
1476 duplicate class definition.
1477
1478 PR c++/10451
1479 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
1480
6adb9463
MM
14812003-04-22 Mark Mitchell <mark@codesourcery.com>
1482
ae2196c2
MM
1483 PR c++/10446
1484 * search.c (lookup_fnfields_1): Handle empty slots in the method
1485 vector.
87f85ea0 1486
befcd99b
MM
1487 PR c++/10428
1488 * decl.c (check_elaborated_type_specifier): New function, split
1489 out from ...
1490 (xref_tag): ... here. Use the new function in more places.
1491
6adb9463
MM
1492 * rtti.c (throw_bad_typeid): Use build_cxx_call.
1493
b2dd096b
MM
14942003-04-21 Mark Mitchell <mark@codesourcery.com>
1495
1496 * call.c (build_over_call): Use build_cxx_call.
1497 (build_cxx_call): New method, split out of build_over_call.
1498 * cp-tree.h (language_function): Add can_throw.
1499 (build_cxx_call): Declare it.
1500 * decl.c (finish_function): If a function does not contain any
1501 calls to functions that can throw an exception, indicate that
1502 fact.
1503 * decl2.c (mark_used): Do not defer the instantiation of
1504 functions, if the current function does not throw.
1505 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
1506 * pt.c (instantiate_decl): Make sure import_export_decl is called
1507 before emitting things.
1508 * rtti.c (throw_bad_cast): Use build_cxx_call.
1509 (build_dynamic_cast_1): Likewise.
1510 * typeck.c (build_function_call): Likewise.
1511
8de9bb0e
NS
15122003-04-21 Nathan Sidwell <nathan@codesourcery.com>
1513
1514 PR c++/9881
1515 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
1516 expressions. Reverts my 2002-08-08 patch.
87f85ea0 1517
8de9bb0e
NS
1518 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
1519 cheaper early exit.
1520
299f79b5
NS
15212003-04-20 Nathan Sidwell <nathan@codesourcery.com>
1522
1523 * cp/decl2.c (start_static_storage_duration_function): Take count
1524 arg, don't check if it wraps round.
1525 (generate_ctor_or_dtor_function): Add locus arg, use it.
1526 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
1527 locus.
1528 (finish_file): Set line numbers to past EOF for synthesized
1529 functions.
1530
15312003-04-20 Nathan Sidwell <nathan@codesourcery.com>
de0c0e69
NS
1532
1533 PR c++/10405
1534 * search.c (lookup_field_1): Final scan goes backwards for
1535 types, forwards for non-types.
1536
220a35cc
RS
15372003-04-17 Roger Sayle <roger@eyesopen.com>
1538
1539 PR c/10375
1540 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
1541 "nothrow" function attributes.
1542
09d2f85f
KL
15432003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1544
1545 PR c++/10347
1546 * pt.c (type_dependent_expression_p): Handle array new.
1547
5eb10628
MM
15482003-04-15 Mark Mitchell <mark@codesourcery.com>
1549
1550 PR c++/10381
1551 * parser.c (cp_parser_primary_expression): Reorganize logic for
1552 dealing with name lookup failures.
1553
ac5f3b67
JM
15542003-04-15 Jason Merrill <jason@redhat.com>
1555
1556 * decl2.c (mark_used): Don't instantiate anything if
1557 skip_evaluation.
1558
e6237031
ZL
15592003-04-14 Ziemowit Laski <zlaski@apple.com>
1560
1561 * tree.c (build_cplus_array_type_1): Do not call
1562 uses_template_parms() on a NULL index_type.
1563
1331d16f
RS
15642003-04-13 Roger Sayle <roger@eyesopen.com>
1565
1566 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
1567
f4f4610e
MM
15682003-04-12 Mark Mitchell <mark@codesourcery.com>
1569
1570 PR c++/10300
1571 * init.c (build_new_1): Reorganize.
1572
dcf92453
ZW
15732003-04-12 Zack Weinberg <zack@codesourcery.com>
1574
1575 * class.c (initialize_array)
1576 * decl.c (reshape_init)
1577 * decl2.c (build_expr_from_tree)
1578 * init.c (build_zero_init)
1579 * pt.c (tsubst_copy, tsubst_copy_and_build)
1580 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
1581 (ptm_initializer, class_initializer, get_pseudo_ti_init)
1582 * semantics.c (finish_compound_literal)
1583 * typeck.c (build_ptrmemfunc1)
1584 * typeck2.c (store_init_value, process_init_constructor)
1585 (build_functional_cast): Use build_constructor.
1586
2bd02043
ZW
15872003-04-12 Zack Weinberg <zack@codesourcery.com>
1588
1589 * call.c (print_z_candidates): Use gcc_gettext_width, not
1590 strlen, to determine how much padding to use.
1591
339a28b9
ZW
15922003-04-10 Zack Weinberg <zack@codesourcery.com>
1593
1594 * decl.c: Update all calls to shadow_warning.
1595
1e099144
MM
15962003-04-10 Mark Mitchell <mark@codesourcery.com>
1597
1598 * class.c (layout_class_type): Correct handling for overlong
1599 bit-fields whose width is the same as an integer type.
1600
d78e771d
ZW
16012003-04-06 Zack Weinberg <zack@codesourcery.com>
1602
1603 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
1604 * cp-lang.c (cp_tree_size): New function.
1605 (LANG_HOOKS_TREE_SIZE): Override.
1606
1607 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
1608 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
1609 (union lang_tree_node): Remove common and srcloc members.
1610 (build_srcloc_here): Don't prototype.
1611 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
1612 * pt.c (pending_templates): Correct comment.
1613 * tree.c (build_srcloc, build_srcloc_here): Kill.
1614
d2a6f3c0
ZW
16152003-04-06 Zack Weinberg <zack@codesourcery.com>
1616
1617 * call.c: Include intl.h.
1618 (print_z_candidate): Always use inform; get rid of errfn
1619 argument. Reorganize so that all the strings get picked up
1620 by xgettext. Note obligation of caller to pass first argument
1621 through gettext.
1622 (print_z_candidates): Update to match. Indent second and
1623 successive candidates by strlen() of translated message.
1624 (joust): Restructure ambiguous-conversion pedwarn so that
1625 translators see a complete sentence. Update calls to
1626 print_z_candidate.
1627
1628 * Make-lang.in (cp/call.o): Update dependencies.
1629
ff955512
KG
16302003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1631
1632 * decl.c (set_current_binding_level): Delete, revert last change.
1633 (current_binding_level): Modify to allow it as as lvalue.
1634
da247ccc
KG
16352003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1636
1637 * name-lookup.c (find_binding): Pass appropriate pointer type to
1638 POP_TIMEVAR_AND_RETURN.
1639
d893ff33
KG
16402003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1641
1642 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
1643 * cp-tree.h: Don't insist on having GNUC.
1644
78d55cc8
JM
16452003-04-03 Jason Merrill <jason@redhat.com>
1646
55a2af0c
JM
1647 * cvt.c (ocp_convert): Only abort if we try to convert an object
1648 of TREE_ADDRESSABLE type.
1649
78d55cc8
JM
1650 * class.c (build_vtable): Set DECL_ALIGN here.
1651 (get_vtable_decl): Not here.
1652 (layout_vtable_decl): Or here.
1653 (create_vtable_ptr): Or here.
1654 (layout_class_type): Or here.
1655 (check_bitfield_decl): Don't mess with field alignment.
1656
de94b46c
KG
16572003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1658
1659 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
1660 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
1661 * rtti.c (dfs_class_hint_mark): Likewise.
1662
1663 * decl.c (push_local_name, push_class_level_binding,
1664 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
1665 functions returning void.
1666 * decl2.c (add_using_namespace): Likewise.
1667
1668 * decl.c (print_binding_level, print_other_binding_stack,
1669 print_binding_stack): Cast argument of %p specifier to void*.
1670 * ptree.c (cxx_print_decl): Likewise.
1671
1672 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1673 VAR_FUNCTION_OR_PARM_DECL_CHECK,
1674 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1675 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
1676 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
1677
1678 * decl.c (set_current_binding_level): New macro. Use throughout
1679 when setting the current binding level.
1680
1681 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
1682 in enum.
1683 * method.c (mangling_flags): Likewise.
1684
1685 * cp-tree.h (lang_type_header): Add __extension__ and use
1686 CHAR_BITFIELD for members.
1687
0de298af
GK
16882003-04-02 Geoffrey Keating <geoffk@apple.com>
1689
1690 PR other/9274
1691 * mangle.c: Include gt-cp-mangle.h.
1692 (subst_identifiers): Mark with GTY.
1693 * config-lang.in (gtfiles): Add cp/mangle.c.
1694 * Make-lang.in: (gt-cp-mangle.h): New rule.
1695 (cp/mangle.o): Depends on gt-cp-mangle.h.
1696
28ea4c88
AP
16972003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
1698
0de298af 1699 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
28ea4c88
AP
1700 after \$(srcdir)/cp/name-lookup.h.
1701 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
1702 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
0de298af
GK
1703 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
1704 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
d2a6f3c0 1705
adff28c3
JM
17062003-03-31 Jason Merrill <jason@redhat.com>
1707
1708 PR java/10145
1709 * class.c (check_field_decl): Don't set DECL_ALIGN.
1710
c717c5af
MM
17112003-03-30 Mark Mitchell <mark@codesourcery.com>
1712
1713 PR c++/7647
1714 * decl.c (grokdeclarator): Tidy, slightly.
1715 * search.c (lookup_field_1): Add want_type parameter.
1716 (lookup_field_r): Adjust call to lookup_field_1.
1717
7c71dc2b
GDR
17182003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1719
1720 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
1721
ed3cf953
GDR
17222003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1723
1724 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
d2a6f3c0 1725 prototype.
ed3cf953
GDR
1726 (cxx_scope_find_binding_for_name): Likewise.
1727 * decl.c (find_binding: Move to name-lookup.c.
1728 (binding_for_name): Likewise.
1729 (cxx_scope_find_binding_for_name): Likewise.
1730 (BINDING_LEVEL): Remove.
1731 (push_binding): Tidy.
1732 (push_class_binding): Likewise.
1733 (pop_binding): Likewise.
1734 (poplevel): Likewise.
1735 (poplevel_class): Likewise.
1736 (set_identifier_type_value_with_scope): Likewise.
1737 (push_overloaded_decl): Likewise.
1738 (lookup_tag): Likewise.
1739 (unqualified_namespace_lookup): Likewise.
1740 (lookup_name_current_level): Likewise.
1741 (maybe_inject_for_scope_var): Likewise.
1742 (namespace_binding): Move to name-lookup.c.
1743 (set_namespace_binding): Likewise.
1744 * decl2.c (lookup_using_namespace): Tidy.
1745 (qualified_lookup_using_namespace): Likewise.
1746 (do_toplevel_using_decl): Likewise.
1747 * name-lookup.c: Include "timevar.h"
1748 * name-lookup.h (cxx_scope): Declare.
1749 (struct cxx_binding): Lose member "has_level". Adjust "scope"
1750 member declaration.
1751 (BINDING_SCOPE): Adjust definition.
1752 (BINDING_HAS_LEVEL_P): Remove.
1753
aed81407
GDR
17542003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1755
1756 * name-lookup.c: New file.
1757 * name-lookup.h: Likewise..
1758 * decl.c (push_binding): Adjust use cxx_binding_make.
1759 (free_bindings): Move to name-lookup.c
1760 (pop_binding): Use cxx_binding_free.
1761 (binding_for_name): Tidy.
1762 * cp-tree.h: Include "name-lookup.h"
1763 (cxx_binding_make): Move to name-lookup.h
1764 (cxx_binding_clear): Likewise.
1765 (struct cxx_binding): Likewise.
1766 (LOCAL_BINDING_P): Likewise.
1767 (INHERITED_VALUE_BINDING_P): Likewise.
1768 (BINDING_SCOPE): Likewise.
1769 (BINDING_HAS_LEVEL_P): Likewise.
1770 (BINDING_VALUE): Likewise.
1771 (BINDING_TYPE): Likewise.
1772 * config-lang.in (gtfiles): Add cp/name-lookup.h
1773 * Make-lang.in (cp/name-lookup.o): New rule.
1774 (CXX_OBJS): Add cp/name-lookup.o
1775 (CXX_TREE_H): Add cp/name-lookup.h
1776
f7b9026e
JM
17772003-03-28 Jason Merrill <jason@redhat.com>
1778
1779 PR c++/10245
1780 * cvt.c (force_rvalue): New fn.
1781 * call.c (build_conditional_expr): Use it.
1782 * cp-tree.h: Declare it.
1783
2d30fe53
MS
17842003-03-28 Mike Stump <mrs@apple.com>
1785
1786 * error.c (dump_expr): Add 0x to printed hex numbers to make
1787 output match source code better.
1788
400fbc08
MM
17892003-03-28 Mark Mitchell <mark@codesourcery.com>
1790
316a2456
MM
1791 PR c++/10218
1792 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
1793 definitions.
1794
400fbc08
MM
1795 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
1796 non-existant ssdf_decls array.
1797 (finish_file): Call generator_ctor_or_dtor_function when there are
1798 static constructors or destructors and no other static
1799 initializations.
1800
433cd9c9
NS
18012003-03-28 Nathan Sidwell <nathan@codesourcery.com>
1802
1803 PR c++/10047
1804 * decl2.c (finish_file): Don't warn about explicitly instantiated
1805 inline decls.
1806
544aef8c
NS
18072003-03-27 Nathan Sidwell <nathan@codesourcery.com>
1808
1809 PR c++/10224
1810 * pt.c (lookup_template_class): Only check instantiated args if
1811 they do not contain template parameters.
1812
649fc72d
NS
18132003-03-27 Nathan Sidwell <nathan@codesourcery.com>
1814
1815 PR c++/10158
1816 * parser.c (cp_parser_function_definition): Set
1817 DECL_INITIALIZED_IN_CLASS for members.
1818 * pt.c (instantiate_decl): Only reduce the template args for
1819 friends that are not defined in class.
1820
d8c8524d
JM
18212003-03-25 Jason Merrill <jason@redhat.com>
1822
1823 * call.c (print_z_candidate): Change name of first arg to msgid.
1824 (joust): Add comment for translators.
1825
1c82cc90 18262003-03-24 Nathan Sidwell <nathan@codesourcery.com>
d2a6f3c0 1827
1c82cc90 1828 PR c++/9898, PR c++/383, DR 322
649fc72d 1829 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1c82cc90
NS
1830 through reference types on both PARM and ARG.
1831
a5fcc895
NS
18322003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1833
1834 PR c++/10119
649fc72d 1835 * error.c (dump_expr) <BASELINK>: Use dump_expr.
a5fcc895 1836 * pt.c (maybe_fold_nontype_args): New function.
649fc72d
NS
1837 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
1838 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
1839 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
a5fcc895
NS
1840 maybe_fold_nontype_args.
1841
2ef6c975
NS
18422003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1843
1844 PR c++/10026
649fc72d 1845 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2ef6c975 1846
f29a2bd1
MM
18472003-03-23 Mark Mitchell <mark@codesourcery.com>
1848
1849 PR c++/7086
2ef6c975
NS
1850 * typeck.c (cxx_mark_addressable): Adjust call to
1851 gen_mem_addressof or put_var_into_stack.
f29a2bd1 1852
3e4a3562
NS
18532003-03-22 Nathan Sidwell <nathan@codesourcery.com>
1854
1855 PR c++/9978, c++/9708
1856 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
1857 * call.c (add_template_candidate_real): Adjust
1858 instantiate_template call.
1859 * class.c (resolve_address_of_overloaded_function): Likewise.
1860 * decl.c (build_enumerator): Set TREE_CONSTANT.
1861 * pt.c (check_instantiated_args): New.
1862 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
1863 TREE_READONLY.
1864 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
1865 (reduce_template_parm_level): Likewise.
1866 (process_template_parm): Likewise.
1867 (check_explicit_specialization): Adjust instantiate_template call.
1868 (convert_template_argument): Don't check non-type argument here.
1869 (lookup_template_class): Check them here.
1870 (tsubst_friend_function): Adjust instantiate_template call.
1871 (instantiate_template): Add tsubst_flags parameter, use it. Check
1872 instantiated args.
1873
d9b2742a
ZW
18742003-03-21 Zack Weinberg <zack@codesourcery.com>
1875
1876 * decl.c: Update calls to shadow_warning.
1877
f3146d75
NS
18782003-03-21 Nathan Sidwell <nathan@codesourcery.com>
1879
1880 PR c++/9898
1881 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
1882 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
1883
963142fc
MM
18842003-03-20 Mark Mitchell <mark@codesourcery.com>
1885
1886 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
1887 friends.
1888 * cp/pt.c (instantiate_class_template): Fix formatting.
1889
a260bce6
MA
18902003-03-14 Matt Austern <austern@apple.com>
1891
1892 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
1893 (unemitted_tinfo_decl_p): Remove.
1894 (emit_tinfo_decl): Change declaration to remove unused parameter.
1895 * decl2.c (finish_file): Change tinfo emission to loop through
1896 unemitted_tinfo_decls array instead of looping through all decls.
1897 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
1898 unused second parameter.
1899 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
1900 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
1901 (emit_tinfo_decl): remove unused second parameter, add assertion
d9b2742a
ZW
1902 that decl hasn't already been emitted.
1903
2bd3ecad
NN
19042003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
1905
1906 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
1907 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
1908 return statements.
1909
b9747e59
JM
19102003-03-19 Jason Merrill <jason@redhat.com>
1911
1912 PR c++/8316, c++/9315, c++/10136
1913 * call.c (print_z_candidate): Split out from...
1914 (print_z_candidiates): ...here.
1915 (joust): Use it.
1916
10326855
RS
19172003-03-17 Roger Sayle <roger@eyesopen.com>
1918
b9747e59 1919 PR c++/10031
10326855
RS
1920 * decl.c (duplicate_decls): Use the new type when prototyping
1921 anticipated decls, even when the types match. This defines the
1922 exception list for the built-in function.
1923
bdaa131b
JM
19242003-03-17 Jason Merrill <jason@redhat.com>
1925
1926 PR c++/10091
d9b2742a 1927 * typeck.c (build_class_member_access_expr): Compare
bdaa131b
JM
1928 TYPE_MAIN_VARIANTs.
1929
ec20aa6c
MM
19302003-03-17 Mark Mitchell <mark@codesourcery.com>
1931
1932 PR c++/9639
1933 * parser.c (cp_parser_declarator_id): Clear parser->scope.
1934
35e939ae
JM
19352003-03-16 Jason Merrill <jason@redhat.com>
1936
1937 PR c++/9993
1938 * decl.c (finish_function): Only allow the NRVO to use variables
1939 declared at function scope.
1940
40a4184c
AJ
19412003-03-17 Andreas Jaeger <aj@suse.de>
1942
1943 * Make-lang.in (cp/TAGS): Remove.
1944
1f5a253a
NS
19452003-03-16 Nathan Sidwell <nathan@codesourcery.com>
1946
1947 PR c++/9629
1948 * cp-tree.h (struct language_function): Add in_base_initializer.
1949 (in_base_initializer): define it.
1950 (expand_member_init): Remove INIT param.
1951 * init.c (expand_member_init): Remove INIT param, return the member.
1952 (emit_mem_initializers): Set in_base_initializer.
1953 * class.c (build_base_path): Check in_base_initializer.
1954 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1955 * pt.c (tsubst_initializer_list): Likewise.
1956
4f907b59
GDR
19572003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1958
1959 * decl.c (binding_for_name): Fix initialization thinko.
1960
ac2768ff 19612003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
40a4184c 1962
af6fd53f
GDR
1963 Compile-time improvement: 2/n.
1964 * cp-tree.h (struct cxx_binding): New datatype;
1965 (struct lang_identifier): Use it.
1966 (LOCAL_BINDING_P): Adjust definition.
1967 (INHERITED_VALUE_BINDING_P): Likewise.
1968 (BINDING_SCOPE): Likewise.
1969 (BINDING_HAS_LEVEL_P): Likewise.
1970 (BINDING_VALUE): Likewise.
1971 (BINDING_TYPE): Likewise.
1972 (IDENTIFIER_VALUE): Likewise.
1973 (struct tree_binding): Remove.
1974 (TS_CP_BINDING): Likewise.
1975 ((union lang_tree_node): Remove field "binding".
1976 (cxx_binding_clear): New macro.
1977 (binding_for_name): Adjust return type.
1978 (qualified_lookup_using_namespace): Adjust prototype.
1979 (lookup_using_namespace): Adjust prototype.
1980 (cxx_scope_find_binding_for_name): Declare.
1981 * cp-tree.def: Remove CPLUS_BINDING definition.
1982 * decl.c (push_binding): Adjust local variable type.
1983 (add_binding): Likewise.
1984 (push_class_binding): Likewise.
1985 (pop_binding): Likewise.
1986 (poplevel): Likewise.
1987 (poplevel_class): Likewise.
1988 (free_bindings): Adjust type.
1989 (find_binding): Adjust return type, add a third parameter. Remove
40a4184c 1990 non-useful assertion now that we use static typing.
af6fd53f 1991 (cxx_scope_find_binding_for_name): New function.
40a4184c 1992 (binding_for_name): Use it. Adjust local variable type. Simplify.
af6fd53f
GDR
1993 (namespace_binding): Simplify.
1994 (set_namespace_binding): Likewise.
1995 (set_identifier_type_value_with_scope): Adjust local variable type.
1996 (lookup_tag): Don't type-abuse of local variable 'old'.
1997 (lookup_namespace_name): Likewise. Allocate binding on stack.
1998 (select_decl): Adjust prototype.
1999 (unqualified_namespace_lookup): Allocate binding on stack.
2000 Don't type-abuse of local variable 'val'.
2001 (lookup_name_real): Likewise.
2002 (maybe_inject_for_scope_var): Adjust local variable type.
2003 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2004 (namespace_binding): Adjust logic, simplify.
2005 (BINDING_LEVEL): Adjust definition.
2006 (push_class_level_binding): Adjust local variable type.
2007 (struct cxx_saved_binding): Adjust field 'binding' type.
2008 * decl2.c (ambiguous_decl): Adjust prototype.
2009 (lookup_using_namespace): Adjust local variable type.
2010 (qualified_lookup_using_namespace): Catch type error and correct
2011 ensueing logic error.
2012 (do_nonmember_using_decl): Adjust local variable type. Allocate
2013 temporary cxx_binding on stack.
2014 (do_toplevel_using_decl): Adjust local variable type.
2015 * ptree.c (cxx_print_cxx_binding): New function.
2016 (cxx_print_identifier): Use it.
2017 (cxx_print_xnode): Delete CPLUS_BINDING case label.
2018
6a87d634
RS
20192003-03-15 Roger Sayle <roger@eyesopen.com>
2020
2021 * tree.c (count_functions): Fix whitespace.
2022
c1bad961
NB
20232003-03-15 Neil Booth <neil@daikokuya.co.uk>
2024
2025 * Make-lang.in: Update.
2026
6e049fcd
KL
20272003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2028
2029 PR c++/6440
2030 * pt.c (maybe_process_partial_specialization): Handle
2031 member class template when enclosing class template is
2032 explicit specialized.
2033 (most_general_template): Stop looking when DECL is already
2034 specialized.
2035
0171b21c
JM
20362003-03-13 Jason Merrill <jason@redhat.com>
2037
2038 PR c++/9420
2039 * search.c (lookup_conversions): Call complete_type here.
2040 * call.c (implicit_conversion): Not here.
2041
26f86471
MM
20422003-03-13 Mark Mitchell <mark@codesourcery.com>
2043
45707d31
MM
2044 * decl2.c (do_nonmember_using_decl): Correct handling of
2045 simultaneous type/non-type bindings.
2046
26f86471
MM
2047 * call.c (initialize_reference): Remove bogus assertion.
2048 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2049
847311f4
AL
20502003-03-12 Andrew Lewycky <andrew@mxc.ca>
2051
2052 PR c++/7050
2053 * expr.c (cxx_expand_expr): Return const0_rtx for throw
2054 expressions.
2055
2601a4ee
MM
20562003-03-11 Mark Mitchell <mark@codesourcery.com>
2057
e1145e7f 2058 PR c++/9474
2601a4ee
MM
2059 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2060 to merge old and new declarations.
2061
2bfe542b
AO
20622003-03-12 Alexandre Oliva <aoliva@redhat.com>
2063
2064 * g++.1: Remove.
2065 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2066 (cp/g++.1): Build it from scratch in the build tree.
2067 (c++.install-man): Depend on it. Install it from the build tree.
2068 (c++.mostlyclean): Clean it.
2069
0c33daff
MM
20702003-03-11 Mark Mitchell <mark@codesourcery.com>
2071
3033f0ed 2072 PR c++/9474
2601a4ee
MM
2073 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2074 to merge old and new declarations.
2075
0c33daff
MM
2076 PR c++/9924
2077 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2078
cf237c19
JM
20792003-03-11 Jason Merrill <jason@redhat.com>
2080
2081 PR c++/9820
40a4184c 2082 * search.c (lookup_member): Fix handling of functions in a class
cf237c19
JM
2083 being defined.
2084
436f8a4c
MM
20852003-03-11 Mark Mitchell <mark@codesourcery.com>
2086
2087 PR c++/8700
2088 * call.c (convert_class_to_reference): Adjust usage of
2089 splice_viable.
2090 (any_viable): Remove.
2091 (splice_viable): Combine with any_viable.
2092 (print_z_candidates): Avoid printing duplicates.
2093 (build_user_type_conversion_1): Adjust usage of splice_viable.
2094 (build_new_function_call): Likewise.
2095 (build_operator_new_call): Likewise.
2096 (build_object_call): Likewise.
2097 (build_conditional_expr): Likewise.
2098 (build_new_op): Likewise.
2099 (build_new_method_call): Likewise.
2100 (joust): Remove spurious comment.
2101 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2102 * decl2.c (arg_assoc_class): Simplify.
2103 * friend.c (add_friend): Likewise.
2104
5b8e011c
JM
21052003-03-11 Jason Merrill <jason@redhat.com>
2106
2107 PR c++/8660
40a4184c 2108 * decl2.c (check_classfn): A member template only matches a
5b8e011c
JM
2109 member template.
2110
cb60f38d
NB
21112003-03-11 Neil Booth <neil@daikokuya.co.uk>
2112
2113 * Make-lang.in (CXX_C_OBJS): Update.
2114 * lang-specs.h: Don't define __GNUG__ here.
2115
125e6594
MM
21162003-03-10 Mark Mitchell <mark@codesourcery.com>
2117
2118 * call.c (perform_overload_resolution): New function.
2119 (build_new_function_call): Use it.
2120 (build_operator_new_call): Likewise.
2121 (add_candidates): Add explicit_targs and template_only parameters.
2122 (build_new_op): Adjust accordingly.
2123 * cp-tree.h (build_operator_new_call): New function.
2124 (build_function_call_real): Remove.
2125 (build_function_call_maybe): Likewise.
2126 * init.c (build_new_1): Use build_operator_new_call.
2127 * typeck.c (build_function_call_real): Rename to ...
2128 (build_function_call): ... this.
2129
87d7d780 21302003-03-10 Devang Patel <dpatel@apple.com>
40a4184c 2131
87d7d780
DP
2132 PR c++/9394
2133 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
125e6594 2134
6e9554e1
JM
21352003-03-10 Jason Merrill <jason@redhat.com>
2136
70f0e288
JM
2137 PR c++/9798
2138 * decl.c (push_using_directive): Push before recursing.
2139
2140 PR c++/9868, c++/9524
6e9554e1
JM
2141 * call.c (resolve_scoped_fn_name): Handle the case of a function
2142 pointer member.
2143
2144 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2145 argument in the pointer-to-member case.
2146
f6d19bfe
MM
21472003-03-09 Mark Mitchell <mark@codesourcery.com>
2148
1d719415
MM
2149 PR c++/9373
2150 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2151 pointers to member functions.
2152
f6d19bfe
MM
2153 PR c++/8534
2154 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2155 in pointer-to-member-function types.
2156
d9b4e85e
GDR
21572003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2158
2159 * expr.c (cplus_expand_constant): Use C90 prototype style.
2160 (cxx_expand_expr): Likewise.
2161
ca9e1382
KL
21622003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2163
2164 PR c++/9970
2165 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2166 functions.
2167
00a221f0
GK
21682003-03-08 Geoffrey Keating <geoffk@apple.com>
2169
2170 * lang-specs.h (c++-header): Change .pch to .gch.
2171
4bfec483
NB
21722003-03-08 Neil Booth <neil@daikokuya.co.uk>
2173
2174 * cp-tree.h (cxx_init): Update prototype.
2175 * lex.c (cxx_init): Similarly.
2176
089d6ea7
MM
21772003-03-08 Mark Mitchell <mark@codesourcery.com>
2178
0e136342
MM
2179 PR c++/9823
2180 * cp-tree.h (begin_mem_initializers): Remove.
2181 * parser.c (cp_parser_mem_initializer_list): Inline it here.
2182 Do not call finish_mem_initializers if not in a constructor.
2183 (cp_parser_class_head): Fix typo in error message.
2184 * semantics.c (begin_mem_initializers): Remove.
2185 * testsuite/g++.dg/parser/constructor1.C: New test.
2186
089d6ea7
MM
2187 PR c++/9809
2188 * call.c (add_function_candidate): Skip builtin fuctions that have
2189 not yet been declared.
2190
2191 PR c++/9982
2192 * init.c (build_new_1): Correct logic for determining whether or
2193 not to use an array cookie.
2194
2195 PR c++/9524
2196 * parser.c (cp_parser_postfix_expression): Call
2197 finish_non_static_data_member, even when processing_template_decl.
2198
2199 PR c++/9912
2200 * cp-tree.h (is_ancestor): New function.
2201 (handle_class_head): Change prototype.
2202 * decl2.c (is_namespace_ancestor): Rename to ...
2203 (namespace_anecestor): ... this.
2204 (set_decl_namespace): Adjust accordingly.
2205 (handle_class_head): Remove unncessary parameters.
2206 * parser.c (cp_parser_class_head): Check that
2207 nested-name-specifiers are used appropriately.
40a4184c 2208
aa6e8ed3
MM
22092003-03-07 Mark Mitchell <mark@codesourcery.com>
2210
2211 * call.c (reference_binding): Remove REF_IS_VAR parameter.
2212 (implicit_conversion): Adjust call to reference_binding.
2213 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2214 (initialize_reference): Adjust handling for references bound to
2215 rvalues.
2216 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2217 prototype.
2218 (real_non_cast_lvalue_p): New method.
2219 * cvt.c (build_up_reference): Adjust use of
2220 make_temporary_var_for_ref_to_temp.
89d11511 2221 * tree.c (real_non_cast_lvalue_p): New method.
40a4184c 2222
5cc3d3b8
GDR
22232003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2224
2225 * except.c (init_exception_processing): Use C90 prototype style.
2226 (cp_protect_cleanup_actions): Likewise.
2227 (prepare_eh_type): Likewise.
2228 (build_eh_type_type): Likewise.
2229 (build_exc_ptr): Likewise.
2230 (do_begin_catch): Likewise.
2231 (dtor_nothrow): Likewise.
2232 (do_end_catch): Likewise.
2233 (push_eh_cleanup): Likewise.
2234 (decl_is_java_type): Likewise.
2235 (choose_personality_routine): Likewise.
2236 (initialize_handler_parm): Likewise.
2237 (expand_start_catch_block): Likewise.
2238 (expand_end_catch_block): Likewise.
2239 (begin_eh_spec_block): Likewise.
2240 (finish_eh_spec_block): Likewise.
2241 (do_allocate_exception): Likewise.
2242 (do_free_exception): Likewise.
2243 (wrap_cleanups_r): Likewise.
2244 (stabilize_throw_expr): Likewise.
2245 (build_throw): Likewise.
2246 (complete_ptr_ref_or_void_ptr_p): Likewise.
2247 (is_admissible_throw_operand): Likewise.
2248 (nothrow_libfn_p): Likewise.
2249 (can_convert_eh): Likewise.
2250 (check_handlers_1): Likewise.
2251 (check_handlers): Likewise.
40a4184c 2252
3d938426
MM
22532003-03-06 Mark Mitchell <mark@codesourcery.com>
2254
2255 * call.c (merge_conversion_sequences): New function.
2256 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2257 (convert_class_to_reference): Correct handling of second
2258 standard conversion sequence in a user-defined conversion
2259 sequence.
2260 (build_user_type_conversion_1): Use merge_conversion_sequences.
2261 * cp-tree.def: Add comments for CONV nodes.
9534f4bc 2262 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
40a4184c 2263
3f8548e7
GDR
22642003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2265
2266 * error.c (init_error): Use C90 prototype style.
2267 (dump_scope): Likewise.
2268 (dump_qualifiers): Likewise.
2269 (dump_template_argument): Likewise.
2270 (dump_template_argument_list): Likewise.
2271 (dump_template_parameter): Likewise.
2272 (dump_template_bindings): Likewise.
2273 (dump_type): Likewise.
2274 (dump_typename): Likewise.
2275 (class_key_or_enum): Likewise.
2276 (dump_aggr_type): Likewise.
2277 (dump_type_prefix): Likewise.
2278 (dump_type_suffix): Likewise.
2279 (dump_global_iord): Likewise.
2280 (dump_simple_decl): Likewise.
2281 (dump_decl): Likewise.
2282 (dump_template_decl): Likewise.
2283 (dump_function_decl): Likewise.
2284 (dump_parameters): Likewise.
2285 (dump_exception_spec): Likewise.
2286 (dump_function_name): Likewise.
2287 (dump_template_parms): Likewise.
2288 (dump_char): Likewise.
2289 (dump_expr_list): Likewise.
2290 (dump_expr): Likewise.
2291 (dump_binary_op): Likewise.
2292 (dump_unary_op): Likewise.
2293 (type_as_string): Likewise.
2294 (expr_as_string): Likewise.
2295 (decl_as_string): Likewise.
2296 (context_as_string): Likewise.
2297 (lang_decl_name): Likewise.
2298 (cp_file_of): Likewise.
2299 (cp_line_of): Likewise.
2300 (decl_to_string): Likewise.
2301 (expr_to_string): Likewise.
2302 (fndecl_to_string): Likewise.
2303 (code_to_string): Likewise.
2304 (language_to_string): Likewise.
2305 (parm_to_string): Likewise.
2306 (op_to_string): Likewise.
2307 (type_to_string): Likewise.
2308 (assop_to_string): Likewise.
2309 (args_to_string): Likewise.
2310 (cv_to_string): Likewise.
2311 (cxx_print_error_function): Likewise.
2312 (cp_diagnostic_starter): Likewise.
2313 (cp_diagnostic_finalizer): Likewise.
2314 (cp_print_error_function): Likewise.
2315 (function_category): Likewise.
2316 (print_instantiation_full_context): Likewise.
2317 (print_instantiation_partial_context): Likewise.
2318 (maybe_print_instantiation_context): Likewise.
2319 (print_instantiation_context): Likewise.
2320 (cp_printer): Likewise.
2321 (print_integer): Likewise.
2322 (print_non_consecutive_character): Likewise.
2323 (locate_error): Likewise.
2324
3d1df1fa
MM
23252003-03-06 Mark Mitchell <mark@codesourcery.com>
2326
5e256996
MM
2327 PR c++/9965
2328 * call.c (reference_binding): Add ref_is_var parameter.
2329 (implicit_conversion): Adjust call to reference_binding.
2330 (initialize_reference): Likewise.
2331
07681121
MM
2332 PR c++/9400
2333 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2334 PARM_DECLs.
2335
3d1df1fa
MM
2336 PR c++/9791
2337 * class.c (get_basefndecls): Use lookup_fnfields_1.
2338
8a6393df
KL
23392003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2340
2341 PR c++/9188
2342 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2343 in error message.
2344 (cp_parser_single_declaration): Likewise.
2345
c965b169
JM
23462003-03-05 Jason Merrill <jason@redhat.com>
2347
2348 PR c++/9440
2349 * call.c (build_conditional_expr): Use convert rather than an
2350 explicit NOP_EXPR.
2351
1d555f7a
MA
23522003-03-02 Matt Austern <austern@apple.com>
2353
2354 * decl.c (cp_binding_level): Add static_decls varray member.
2355 (add_decl_to_level): Add static/inline namespace scope
2356 declarations to static_decls array.
2357 (wrapup_global_for_namespace): Pass static_decls only, instead of
2358 all decls, to wrapup_global_declarations/check_global_declarations.
2359 (push_namespace): Initialize static_decls for ordinary namespaces.
2360 (cxx_init_decl_processing): Initialize static_decls for global
2361 namespace.
40a4184c 2362
8234c6c1
MM
23632003-03-05 Mark Mitchell <mark@codesourcery.com>
2364
2365 * class.c (end_of_class): Correct thinko.
2366
dc2b3526
NN
23672003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
2368
2369 * config-lang.in: Replace ${libstdcxx_version} by its value.
2370
000d38ea
GDR
23712003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2372
d9b2742a
ZW
2373 * cp-tree.h (cxx_saved_binding): Declare.
2374 (struct saved_scope): Adjust type of field 'old_binding'.
2375 * decl.c (cxx_saved_binding_make): New macro.
2376 (struct cxx_saved_binding): Define.
2377 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
2378 C++ bindings.
2379 (maybe_push_to_top_level): Adjust local variable type.
2380 (pop_from_top_level): Likewise.
40a4184c 2381
b87141b3
TT
23822003-03-04 Tom Tromey <tromey@redhat.com>
2383
2384 * Make-lang.in (c++.tags): New target.
2385
f20d8e39
NB
23862003-03-04 Neil Booth <neil@daikokuya.co.uk>
2387
2388 * Make-lang.in: Update.
2389
f5d70cc0
JM
23902003-03-03 Jason Merrill <jason@redhat.com>
2391
2392 * decl.c (finish_enum): Do set the type in a template. Simplify.
2393 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2394
7993382e
MM
23952003-03-03 Mark Mitchell <mark@codesourcery.com>
2396
2397 PR c++/9878
2398 * call.c (convert_class_to_reference): Correct conversion
2399 sequences.
2400 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
2401 (implicit_conversion): Adjust call to reference_binding.
2402 (add_candidate): Change type of candidates parameter.
2403 (add_function_candidate): Likewise.
2404 (add_conv_candidate): Likewise.
2405 (build_builtin_candidate): Likewise.
2406 (add_builtin_candidate): Likewise.
2407 (add_builtin_candidates): Likewise.
2408 (add_template_candidate_real): Likewise.
2409 (add_template_candidate): Likewise.
2410 (add_template_conv_candidate): Likewise.
2411 (build_user_type_conversion_1): Adjust accordingly.
2412 (build_object_call): Likewise.
2413 (build_conditional_expr): Likewise.
2414 (add_candidates): Likewise.
2415 (build_new_op): Likewise.
2416 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
2417 (build_new_method_call): Adjust calls to add_function_candidate.
2418 (make_temporary_var_for_ref_to_temp): New function.
2419 (initialize_reference): Add decl parameter.
2420 * class.c (build_rtti_vtbl_entries): Use build_address and
2421 build_nop.
2422 * cp-tree.h (initialize_reference): Change prototype.
2423 (make_temporary_var_for_ref_to_temp): New function.
2424 (build_type_conversion): Change prototype.
2425 (build_address): New function.
2426 (build_nop): Likewise.
2427 * cvt.c (cp_convert_to_pointer): Adjust call to
2428 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
2429 Use build_nop.
2430 (convert_to_pointer_force): Use build_nop.
2431 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
2432 (convert_to_reference): Adjust call to build_type_conversion.
2433 (ocp_convert): Likewise.
2434 (build_type_conversion): Remove for_sure parameter.
2435 * decl.c (grok_reference_init): Use initialize_reference.
2436 * typeck.c (build_address): New function.
2437 (build_nop): Likewise.
2438 (build_unary_op): Use them.
2439 (build_ptrmemfunc): Tidy slightly.
2440 (convert_for_initialization): Adjust call to
2441 initialize_reference.
2442 * typeck2.c (store_init_value): Remove #if 0'd code.
40a4184c 2443
d1a74aa7
JM
24442003-03-03 Jason Merrill <jason@redhat.com>
2445
2446 * decl.c (start_function): Clear DECL_NUM_STMTS.
2447
2448 * class.c (get_vtable_decl): Use vtbl_type_node.
2449 (build_primary_vtable): Check for it.
2450
6e1b3a7c
AH
24512003-03-02 Aldy Hernandez <aldyh@redhat.com>
2452
08162287 2453 * decl.c (check_initializer): Check for vector_opaque_p.
6e1b3a7c 2454
8a035a6b
AH
24552003-03-02 Ashif Harji <asharji@uwaterloo.ca>
2456
2457 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
2458 invoke an external cpp during compilation.
2459
456d8864
GDR
24602003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2461
2462 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
2463 that of warning().
2464 (start_decl): Likewise.
2465 (start_function): Likewise.
2466
5793b276
NB
24672003-03-01 Neil Booth <neil@daikokuya.co.uk>
2468
2469 * Make-lang.in (CXX_C_OBJS): Update.
2470
b063b379 24712003-02-28 Mark Mitchell <mark@codesourcery.com>
1d62c33e
MM
2472
2473 PR c++/9892
2474 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
2475 instantiating it.
2476
704a0bbd
AH
24772003-02-28 Aldy Hernandez <aldyh@redhat.com>
2478
d9b2742a
ZW
2479 * parser.c (cp_parser_init_declarator): Revert opaque
2480 vector_opaque_p change.
2481 Do not include target.h.
704a0bbd 2482
1cb8292f
MM
24832003-02-28 Mark Mitchell <mark@codesourcery.com>
2484
2485 PR c++/9879
2486 * cp-tree.h (build_zero_init): Add parameter.
2487 * decl.c (cp_finish_decl): Adjust call.
2488 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
2489 calls.
2490 (build_default_init): Add nelts parameter. Adjust calls to
2491 build_zero_init.
2492 (build_new_1): Adjust call to build_default_init.
2493 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
40a4184c 2494
fdedded1
DP
24952003-02-26 Devang Patel <dpatel@apple.com>
2496
2ef6c975
NS
2497 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
2498 required. Postpone enum setting for template decls.
2499 (build_enumerator): Delay copying value node until finish_enum
2500 (). Remove #if 0'ed code.
fdedded1
DP
2501 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
2502 (tsubst_copy): Add check for enum type.
40a4184c 2503
cec24319
MM
25042003-02-25 Mark Mitchell <mark@codesourcery.com>
2505
2506 PR c++/9683
2507 * decl2.c (prune_vars_needing_no_initialization): Do not throw
2508 away initializations for DECL_EXTERNAL VAR_DECLs.
2509 (finish_file): Adjust accordingly.
2510 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
2511
7d9f2df2
GDR
25122003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
2513
08162287
JM
2514 * decl.c (add_binding): Time TV_NAME_LOOKUP.
2515 (push_class_binding): Likewise.
2516 (set_namespace_binding): Likewise.
7d9f2df2 2517
353b4fc0
MM
25182003-02-24 Mark Mitchell <mark@codesourcery.com>
2519
2520 PR c++/9836
2521 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
2522 specializations back to the main template.
2523 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
2524 * pt.c (resolve_typename_type): Likewise.
2525
8b6a662e
JO
25262003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
2527
2528 PR c++/9778
2529 * pt.c (tsubst_copy_and_build): For a templated function inside a
2530 scope, process template arguments.
2531
9e236a9d
KL
25322003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2533
2534 PR c++/9602
2535 * typeck2.c (abstract_virtuals_error): Don't check when
2536 TYPE is still template parameter dependent.
2537
ca099ac8
MM
25382003-02-23 Mark Mitchell <mark@codesourcery.com>
2539
2540 PR c++/5333
2541 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
2542 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
2543 * pt.c (instantiate_class_template): Don't try to instantiate
2544 dependent types.
2545 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
40a4184c 2546
2fff6d71
MM
25472003-02-21 Mark Mitchell <mark@codesourcery.com>
2548
2549 PR c++/9749
2550 * decl.c (grokdeclarator): Do not allow parameters with variably
2551 modified types.
2552
7fb1c86d
NS
25532003-02-21 Nathan Sidwell <nathan@codesourcery.com>
2554
1f5a253a 2555 * search.c (grow_bfs_bases): Remove. Fold into ...
7fb1c86d
NS
2556 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
2557 in previous patch.
2558
63a3cd3e
MM
25592003-02-20 Mark Mitchell <mark@codesourcery.com>
2560
2561 PR c++/9729
2562 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
2563 when the G++ 3.2 ABI prevents correct compilation.
2564
dbbf88d1
NS
25652003-02-20 Nathan Sidwell <nathan@codesourcery.com>
2566
2567 Change base class access representation. Share virtual base
2568 binfos.
2569 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
2570 call.
2571 * cp/class.c (build_base_path): Likewise.
2572 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
2573 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
2574 (make_new_vtable): Adjust.
2575 (force_canonical_binfo_r): Delete.
2576 (force_canonical_binfo): Delete.
2577 (mark_primary_virtual_base): Delete.
2578 (dfs_unshared_virtual_bases): Delete.
2579 (mark_primary_bases): Adjust.
2580 (maybe_warn_about_overly_private_class): Adjust.
2581 (dfs_base_derived_from): Delete.
2582 (base_derived_from): Follow the inheritance chain.
2583 (struct find_final_overrider_data): Add vpath member.
2584 (dfs_find_final_overrider): Adjust.
2585 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
2586 (find_final_overrider): Adjust.
2587 (update_vtable_entry_for_fn): Adjust.
2588 (modify_all_vtables): Adjust.
2589 (walk_subobject_offsets): Adjust.
2590 (layout_nonempty_base_or_field): Adjust.
2591 (layout_empty_base): Remove last parameter. Adjust.
2592 (build_base_field): Adjust.
2593 (build_base_fields): Adjust.
2594 (propagate_binfo_offsets): Remove last parameter. Adjust.
2595 (dfs_set_offset_for_unshared_vbases): Delete.
2596 (layout_virtual_bases): Adjust.
2597 (finish_struct_1): Adjust.
2598 (init_class_processing): Don't init access nodes.
2599 (dfs_get_primary_binfo): Delete.
2600 (get_primary_binfo): Adjust.
2601 (dump_class_hierarchy_r): Remove most derived arg, add IGO
2602 parameter. Adjust.
2603 (dump_class_hierarchy): Adjust.
2604 (finish_vtbls): Adjust.
2605 (get_original_base): Delete.
2606 (build_vtt_inits): Adjust.
2607 (dfs_build_secondary_vptr_vtt_inits): Adjust.
2608 (dfs_ctor_vtable_bases_queue_p): Adjust.
2609 (build_ctor_vtbl_group): Adjust.
2610 (dfs_accumulate_vtbl_inits): Adjust.
2611 (build_vtbl_initializer): Adjust.
2612 (build_vbase_offset_vtbl_entries): Adjust.
2613 (add_vcall_offset_vtbl_entries_1): Adjust.
2614 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
2615 (access_*_node): Remove.
2616 (CANONICAL_BINFO): Delete.
2617 (BINFO_UNSHARED_MARKED): Remove.
2618 (BINFO_MARKED): Set LANG_FLAG_0 directly.
2619 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
2620 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
2621 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
2622 Delete.
2623 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
2624 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2625 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
2626 Delete.
2627 (BINFO_DEPENDENT_BASE_P): New.
2628 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
2629 index.
2630 (markedp, unmarkedp): Adjust.
2631 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
2632 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
2633 find_vbase_instance, binfo_for_vbase): Delete.
2634 (copied_binfo, original_binfo): Declare.
2635 (finish_base_specifier): Add virtual_p arg.
2636 (unshare_base_binfos): Delete.
2637 (copy_base_binfos): Declare.
2638 (reverse_path): Delete.
2639 * cp/decl.c (xref_basetypes): Access and virtuality passed
2640 differently. Don't copy direct base binfos here. Call
2641 copy_base_binfos.
2642 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
2643 (initialize_vtbl_ptrs): Adjust.
2644 (expand_member_init): Adjust.
2645 * cp/parser.c (cp_parser_base_specifier): Adjust.
2646 * cp/pt.c (instantiate_class_template): Adjust.
2647 (get_template_base_recursive): Adjust.
2648 * cp/rtti.c (get_pseudo_ti_init): Adjust.
2649 (get_pseudo_ti_desc): Adjust.
2650 * cp/tree.c (unshare_base_binfos): Rename to ...
2651 (copy_base_binfos): ... here, reimplement.
2652 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
2653 (reverse_path): Remove.
2654 * cp/typeck.c (get_delta_difference): Adjust error messages.
2655 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
2656 * cp/search.c (lookup_base_r): Adjust.
2657 (dynamic_cast_base_recurse): Adjust.
2658 (canonical_binfo): Remove.
2659 (dfs_canonical_queue): Remove.
2660 (dfs_assert_unmarked_p): Remove.
2661 (assert_canonical_unmarked): Remove.
2662 (shared_marked_p, shared_unmarked_p): Remove.
2663 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
2664 (dfs_access_in_type): Adjust.
2665 (access_in_type): Adjust.
2666 (dfs_accessible_queue_p): Adjust.
2667 (dfs_accessible_p): Adjust.
2668 (is_subobject_of_p_1, is_subobject_of_p): Remove.
2669 (struct lookup_field_info): Remove from_dep_base_p field.
2670 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
2671 (lookup_field_r): Remove dependent base code.
2672 (lookup_member): Likewise.
2673 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
2674 (dfs_unmarked_real_bases_queue_p): Remove.
2675 (dfs_marked_real_bases_queue_p): Remove.
2676 (dfs_skip_vbases): Remove.
2677 (dfs_get_pure_virtuals): Adjust.
2678 (markedp, unmarkedp): Adjust.
2679 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
2680 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
2681 (dfs_unmark): Adjust.
2682 (dfs_get_vbase_types):Remove.
2683 (dfs_build_inheritance_graph_order): Remove.
2684 (get_vbase_types): Remove
2685 (dfs_find_vbase_instance): Remove.
2686 (find_vbase_instance): Remove.
2687 (dfs_debug_unmarkedp): Adjust.
2688 (dependent_base_p): Remove.
2689 (dfs_push_type_decls): Adjust.
2690 (dfs_push_decls): Adjust.
2691 (dfs_no_overlap_yet): Adjust.
2692 (copied_binfo): New function.
2693 (original_binfo): New function.
2694 (binfo_for_vbase): Remove.
2695
860c9ea6
ZW
26962003-02-18 Zack Weinberg <zack@codesourcery.com>
2697
2698 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
2699 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
2700 vectors, for speed.
2701
6b99d1c0
MM
27022003-02-18 Mark Mitchell <mark@codesourcery.com>
2703
2704 PR c++/9704
2705 * class.c (layout_class_type): In the 3.2 ABI, take into account
2706 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2707
2b59501b 27082003-02-18 Matt Austern <austern@apple.com>
40a4184c 2709
2b59501b
MA
2710 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
2711 nothing for C++.
2712 * cp/decl.c (wrapup_globals_for_namespace): Remove special
2713 handling of global namespace.
40a4184c 2714
e17aafd1
GK
27152003-02-18 Geoffrey Keating <geoffk@apple.com>
2716
2717 * cp-tree.h (rid_to_yy): Delete.
2718 (C_RID_YYCODE): Delete.
2719 (finish_file): Delete redundant declaration.
2720
04b03085
JM
27212003-02-18 Jason Merrill <jason@redhat.com>
2722
2723 PR c++/9623
2724 * decl.c (reshape_init): Don't mess with initializer labels.
2725
08162287
JM
2726 PR c++/9485
2727 * parser.c (cp_parser_postfix_expression): Set idk properly for
2728 object->scope::member.
2729
bf7c02dd
BE
27302003-02-18 Ben Elliston <bje@redhat.com>
2731
2732 PR other/7350
2733 * decl.c (duplicate_decls): Fix typo in comment.
2734
0f3a8219
MEC
27352003-02-17 Michael Elizabeth Chastain <mec@shout.net>
2736
c7adfa01 2737 PR debug/9717
0f3a8219
MEC
2738 * class.c (build_base_field): Mark fields for base classes with
2739 DECL_IGNORED_P.
2740
db77ef4c
KL
27412003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2742
2743 PR c++/9457
2744 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
2745 CONSTRUCTOR_ELTS only once.
2746
0df4ae96
KL
27472003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2748
2749 PR c++/9459
2750 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
2751 (dump_type_suffix): Likewise.
2752
86ac0575
NS
27532003-02-14 Nathan Sidwell <nathan@codesourcery.com>
2754
2755 * search.c: ANSIfy function declarations and definitions.
2756 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
2757 * call.c (build_method_call, resolve_scoped_fn_name,
2758 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
2759 calls.
2760 * class.c (handle_using_decl): Likewise.
2761 * decl.c (make_typename_type, make_unmound_class_template,
2762 start_decl, compute_array_index_type): Likewise.
2763 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
2764 * init.c (expand_member_init, build_member_call): Likewise.
2765 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
2766 resolve_typename_type): Likewise.
2767 * typeck.c (lookup_destructor, finish_class_member_access_exprm
2768 build_prememfunc_access_expr): Likewise.
2769
fd295cb2
GDR
27702003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
2771
2772 * decl2.c: Include "timevar.h".
2773 (namespace_ancestor): Time name lookup.
2774 (add_using_namespace): Likewise.
2775 (lookup_using_namespace): Likewise.
2776 (qualified_lookup_using_namespace): Likewise.
2777 (decl_namespace): Likewise.
2778 (lookup_arg_dependent): Likewise.
2779 * lex.c (do_identifier): Likewise.
2780 (do_scoped_id): Likewise.
2781 * pt.c (lookup_template_class): Likewise.
2782
62ed060f
AP
27832003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
2784
d9b2742a 2785 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
40a4184c 2786
22ffcc6f
GDR
27872003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
2788
2789 * decl.c: Include "timevar.h".
2790 (poplevel): Time name lookup.
2791 (find_binding): Likewise.
2792 (push_namespace): Likewise.
2793 (pop_nested_namespace): Likewise.
2794 (store_bindings): Likewise.
2795 (maybe_push_to_top_level): Likewise.
2796 (pop_from_top_level): Likewise.
2797 (push_local_name): Likewise.
2798 (pushtag): Likewise.
2799 (pushdecl): Likewise.
2800 (pushdecl_with_scope): Likewise.
2801 (pushdecl_namespace_level): Likewise.
2802 (pushdecl_top_level): Likewise.
2803 (pushdecl_class_level): Likewise.
2804 (push_class_level_binding): Likewise.
2805 (push_using_decl): Likewise.
2806 (push_using_directive): Likewise.
2807 (push_overloaded_decl): Likewise.
2808 (lookup_label): Likewise.
2809 (define_label): Likewise.
2810 (lookup_tag): Likewise.
2811 (lookup_tag_reverse): Likewise.
2812 (lookup_namespace_name): Likewise.
2813 (select_decl): Likewise.
2814 (unqualified_namespace_lookup): Likewise.
2815 (lookup_name_real): Likewise.
2816 (lookup_name_current_level): Likewise.
2817 (lookup_type_current_level): Likewise.
2818 (maybe_inject_for_scope_var): Likewise.
2819 (xref_tag): Likewise.
2820
2821 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
40a4184c 2822
6a540f3c
PE
28232003-02-12 Phil Edwards <pme@gcc.gnu.org>
2824
2825 * decl.c (build_enumerator): Remove unneeded test.
2826
7a93f739
DN
28272003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2828
2829 * cp-tree.h (struct lang_type_header): Make all fields unsigned
2830 char.
2831
b80f8ef3
MM
28322003-02-03 Mark Mitchell <mark@codesourcery.com>
2833
2834 PR c++/7129
2835 * call.c (z_candidate): Add args.
2836 (convert_class_to_reference): Set it.
2837 (implicit_conversion): Tidy.
2838 (add_candidate): Add args parameter.
2839 (add_function_candidate): Adjust call to add_candidate.
2840 (add_conv_candidate): Likewise.
2841 (build_builtin_candidate): Likewise.
2842 (build_user_type_conversion_1): Eliminate wasteful tree_cons
2843 usage.
2844 (build_new_function_call): Likewise.
2845 (build_object_call): Likewise.
2846 (add_candidates): New function.
2847 (build_new_op): Use it.
2848 (covert_like_real): Adjust call to build_over_call.
2849 (build_over_call): Remove args parameter.
2850 * operators.def: Add <?= and >?=.
2851
271bd540
RS
28522003-02-01 Richard Sandiford <rsandifo@redhat.com>
2853
2854 * typeck.c (build_indirect_ref): Don't check flag_volatile.
2855
db0f613d
KL
28562003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2857
2858 PR c++/8849
2859 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2860
1824b90d
NS
28612003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2862
2863 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
2864 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
2865 (BINFO_LANG_ELTS): New #define.
2866 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
2867
f099d360
GK
28682003-01-30 Geoffrey Keating <geoffk@apple.com>
2869
2870 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2871
5552b43c
MM
28722003-01-30 Mark Mitchell <mark@codesourcery.com>
2873
2874 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
2875 for class types.
2876 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
2877 rather than TYPE_LANG_FLAG_0.
2878 (TYPE_BUILT_IN): Remove.
2879 (TYPE_DEPENDENT_P): New macro.
2880 (TYPE_DEPENDENT_P_VALID): Likewise.
2881 (lang_type_class): Add fields_readonly.
2882 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
2883 * pt.c (dependent_type_p_r): New function, split out from ...
2884 (dependent_type_p): ... here. Memoize results.
2885 * search.c (dependent_base_p): Use dependent_type_p, not
2886 uses_template_parms.
2887 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
2888 for class types.
2889
14d22dd6
MM
28902003-01-29 Mark Mitchell <mark@codesourcery.com>
2891
2892 * call.c (build_field_call): Use build_new_op, not build_opfncall.
2893 (prep_operand): New function.
2894 (build_new_op): Use it. Remove dead code.
2895 * class.c (pushclass): Change "modify" parameter type from int to
2896 bool.
2897 (currently_open_class): Use same_type_p, not pointer equality.
2898 (push_nested_class): Adjust calls to pushclass, remove modify
2899 parameter.
2900 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
2901 (pushclass): Change prototype.
2902 (push_nested_class): Likewise.
2903 (grokoptypename): Remove.
2904 (build_opfncall): Remove.
2905 (value_dependent_expression_p): Declare.
2906 (resolve_typename_type): Likewise.
2907 (resolve_typename_type_in_current_instantiation): Likewise.
2908 (enter_scope_of): Remove.
2909 (tsubst): Remove.
2910 (tsubst_expr): Likewise.
2911 (tsubst_copy): Likewise.
2912 (tsubst_copy_and_build): Likewise.
2913 * decl.c (warn_about_implicit_typename_lookup): Remove.
2914 (finish_case_label): Return error_mark_node for erroneous labels.
2915 (start_decl): Adjust calls to push_nested_class.
2916 (grokfndecl): Call push_scope/pop_scope around call to
2917 duplicate_decls.
2918 (grokdeclarator): Do not call tsubst.
2919 (start_function): Adjust calls to push_nested_class.
2920 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
2921 (check_classfn): Use push_scope/pop_scope around type comparisions.
2922 (grokoptypename): Remove.
2923 (push_sscope): Adjust call to push_nested_class.
2924 * error.c (dump_type): Show cv-qualification of typename types.
2925 * init.c (build_member_call): Use build_new_op, not
2926 build_opfncall.
2927 * method.c (build_opfncall): Remove.
2928 * parser.c (cp_parser): Add allow_non_constant_expression_p and
2929 non_constant_expression_p.
2930 (cp_parser_constant_expression): Adjust prototype.
2931 (cp_parser_resolve_typename_type): Remove.
2932 (cp_parser_non_constant_expression): New function.
2933 (cp_parser_non_constant_id_expression): Likewise.
2934 (cp_parser_new): Set allow_non_constant_expression_p and
2935 non_constant_expression_p.
2936 (cp_parser_primary_expression): Reject `this' and `va_arg' in
2937 constant-expressions. Note that dependent names aren't really
2938 constant.
2939 (cp_parser_postfix_expression): Reject conversions to non-integral
2940 types in constant-expressions. Neither are increments or
2941 decrements.
2942 (cp_parser_unary_expression): Reject increments and decrements in
2943 constant-expressions.
2944 (cp_parser_direct_new_declarator): Adjust call to
2945 cp_parser_constant_expression.
2946 (cp_parser_cast_expression): Reject conversions to non-integral
2947 types in constant-expressions.
2948 (cp_parser_assignment_expression): Rejects assignments in
2949 constant-expressions.
2950 (cp_parser_expression): Reject commas in constant-expressions.
2951 (cp_parser_labeled_statement): Adjust call to
2952 cp_parser_constant_expression.
2953 (cp_parser_direct_declarator): Simplify array bounds, even in
2954 templates, when they are non-dependent. Use
2955 resolve_typename_type, not cp_parser_resolve_typename_type.
2956 (cp_parser_class_head): Use resolve_typename_type, not
2957 cp_parser_resolve_typename_type.
2958 (cp_parser_member_declaration): Adjust call to
2959 cp_parser_constant_expression.
2960 (cp_parser_constant_initializer): Likewise.
2961 (cp_parser_constructor_declarator): Use resolve_typename_type, not
2962 cp_parser_resolve_typename_type.
2963 (cp_parser_late_parsing_default_args): Adjust call to
2964 push_nested_class.
2965 * pt.c (tsubst): Give it internal linkage.
2966 (tsubst_expr): Likewise.
2967 (tsubst_copy): Likewise.
2968 (tsubst_copy_and_build): Likewise.
2969 (push_access_scope_real): Likewise.
2970 (tsubst_friend_class): Likewise.
2971 (instantiate_class_template): Adjust call to pushclass.
2972 (value_dependent_expression_p): Give it external linkage.
2973 Robustify.
2974 (resolve_typename_type): New function.
2975 * semantics.c (finish_call_expr): Use build_new_op, not
2976 build_opfncall.
2977 (begin_constructor_declarator): Remove.
2978 (begin_class_definition): Adjust call to pushclass.
2979 (enter_scope_of): Remove.
2980 * typeck.c (comptypes): Resolve typename types as appropriate.
2981 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2982 (build_x_compound_expr): Likewise.
2983 (build_modify_expr): Likewise.
2984 (build_x_modify_expr): Likewise.
2985 * typeck2.c (build_x_arrow): Likewise.
40a4184c 2986
be5a07ac
FJ
29872003-01-29 Fariborz Jahanian <fjahanian@apple.com>
2988
d9b2742a 2989 * pt.c (last_pending_template) Declare GTY().
be5a07ac 2990
710b73e6
KL
29912003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2992
2993 PR c++/8591
2994 * parser.c (cp_parser_elaborated_type_specifier): Convert
2995 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2996 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2997
f2ce60b8
NS
29982003-01-28 Nathan Sidwell <nathan@codesourcery.com>
2999
9ae58faf
NS
3000 PR c++/9437
3001 * pt.c (unify): Don't unify '*T' with 'U C::*'.
3002
f2ce60b8
NS
3003 PR c++/3902
3004 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3005 inside a declarator.
3006
a2ddc397
NS
30072003-01-27 Nathan Sidwell <nathan@codesourcery.com>
3008
3009 * class.c (update_vtable_entry_for_fn): Add index parameter.
3010 Generate vcall thunk for covariant overriding from a virtual
3011 primary base.
3012 (dfs_modify_vtables): Adjust.
3013
bbaab916
NS
30142003-01-25 Nathan Sidwell <nathan@codesourcery.com>
3015
3016 PR c++/9403
3017 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3018 template keyword.
3019 (cp_parser_base_specifier): Look for and consume a
3020 TEMPLATE keyword. Replace switch with array index.
3021
3022 PR c++/795
3023 * semantics.c (finish_non_static_data_member): Remember the
3024 field's type even in a template.
3025
3026 PR c++/9415
3027 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3028 already scoped.
40a4184c 3029
bbaab916
NS
3030 PR c++/8545
3031 * parser.c (cp_parser_cast_expression): Be more tentative.
3032
fb8eab96
KL
30332003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3034
3035 * cp-tree.h (flagged_type_tree_s): Remove.
3036 (check_for_new_type): Likewise.
3037 * typeck2.c (check_for_new_type): Likewise.
3038
c38e9817
NN
30392003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
3040
ee42dd9d
NN
3041 * dump.c: ANSIfy function declarations and definitions.
3042
c38e9817
NN
3043 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
3044
c006d942
MM
30452003-01-22 Mark Mitchell <mark@codesourcery.com>
3046
3047 PR c++/9354
3048 * init.c (build_new): Set the type of the new-expression, even
3049 when processing_templte_decl.
3050
3051 PR c++/9216
3052 * parser.c (cp_parser_primary_expression): Improve error message
3053 for templates used in an expression context.
3054
3055 PR c++/8696
3056 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3057 parse when encountering "typedef".
3058
94edc4ab
NN
30592003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3060
3061 * class.c, parser.c: ANSIfy function definitions and declarations.
3062
e0860732
MM
30632003-01-22 Mark Mitchell <mark@codesourcery.com>
3064
65a5559b
MM
3065 PR c++/9328
3066 * error.c (dump_decl): For an OVERLOAD, just print the name of the
3067 function; it doesn't make sense to try to print its type.
3068 * semantics.c (finish_typeof): Issue errors about invalid uses.
3069
e0860732
MM
3070 PR c++/9298
3071 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3072 function.
3073 (cp_parser_expression_statement): Use it.
3074 (cp_parser_explicit_instantiation): Likewise.
3075 * pt.c (do_decl_instantiation): Improve error handling logic.
40a4184c 3076
1fb3244a
MM
30772003-01-22 Mark Mitchell <mark@codesourcery.com>
3078
4eb6d609
MM
3079 PR c++/9384
3080 * parser.c (cp_parser_using_declaration): Issue error messages
3081 about name resolution failures here.
3082
1fb3244a
MM
3083 PR c++/9388
3084 * class.c (currently_open_derived_class): Use dependent_type_p.
3085 * cp-tree.h (dependent_type_p): New function.
3086 (dependent_template_arg_p): Likewise.
3087 (dependent_template_p): Likewise.
3088 (type_dependent_expression_p): Likewise.
3089 * parser.c (cp_parser_dependent_type_p): Remove.
3090 (cp_parser_value_dependent_type_p): Likewise.
3091 (cp_parser_type_dependent_expression_p): Likewise.
3092 (cp_parser_dependent_template_arg_p): Likewise.
3093 (cp_parser_dependent_template_id_p): Likewise.
3094 (cp_parser_dependent_template_p): Likewise.
3095 (cp_parser_diagnose_invalid_type_name): Replace
3096 cp_parser_dependent_type_p with dependent_type_p, etc.
3097 (cp_parser_primary_expresion): Likewise.
3098 (cp_parser_nested_name_specifier_opt): Likewise.
3099 (cp_parser_postfix_expression): Likewise.
3100 (cp_parser_unary_expression): Likewise.
3101 (cp_parser_template_name): Likewise.
3102 (cp_parser_class_name): Likewise.
3103 (cp_parser_lookup_name): Likewise.
3104 * pt.c (dependent_type_p): New function.
3105 (value_dependent_expression_p): Likewise.
3106 (type_dependent_expression_p): Likewise.
3107 (dependent_template_arg_p): Likewise.
3108 (dependent_template_id_p): Likewise.
3109 (dependent_template_p): Likewise.
40a4184c 3110
1fb3244a
MM
3111 PR c++/9285
3112 PR c++/9294
00b51d29 3113 * parser.c (cp_parser_simple_declaration): Return quickly when
d9b2742a 3114 encountering errors.
1fb3244a 3115
dd859b8a
KG
31162003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3117
3118 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3119
753225c1
JM
31202003-01-17 Jason Merrill <jason@redhat.com>
3121
3122 PR c++/9167, c++/9358
3123 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3124
77b996cc
JM
31252003-01-17 Jason Merrill <jason@redhat.com>
3126
3127 PR c++/9342
3128 * call.c (build_conditional_expr): Always do lvalue-rvalue
3129 conversion.
3130
5dae1114
MM
31312003-01-17 Mark Mitchell <mark@codesourcery.com>
3132
3133 PR c++/9294
3134 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3135 * cp-tree.h (BASELINK_BINFO): Adjust.
3136 (BASELINK_FUNCTIONS): Likewise.
3137 (BASELINK_ACCESS_BINFO): Likewise.
3138 (tree_baselink): New structure.
3139 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3140 (lang_tree_node): Add baselink.
3141 * decl.c (cp_tree_node_structure): Add BASELINK case.
3142 * search.c (build_baselink): Adjust.
3143 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
3144 test from TREE_LIST case.
3145
3146 PR c++/9272
3147 * parser.c (cp_parser_constructor_declarator_p): Do not assume
3148 that a constructor cannot be declared outside of its own class.
40a4184c 3149
5dae1114
MM
3150 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3151 be resolved, neither can the qualified name.
3152
3153 * rtti.c (get_pseudo_ti_desc): Fix thinko.
3154
a48cccea
JM
31552003-01-16 Jason Merrill <jason@redhat.com>
3156
3157 PR c++/8564
3158 * init.c (build_vec_init): Re-add maxindex parm.
3159 (perform_member_init, build_aggr_init): Pass it.
3160 (build_new_1): Pass it. Use an incomplete array type for full_type.
3161 * typeck.c (build_modify_expr): Pass it.
3162 * cp-tree.h: Adjust.
3163
cc23546e
JO
31642003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
3165
3166 * cp-tree.h (tsubst_copy_and_build): New declaration.
3167 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3168 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
3169 (tsubst_copy_and_build): New function.
3170
8fbc5ae7
MM
31712003-01-16 Mark Mitchell <mark@codesourcery.com>
3172
3173 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3174 (PARTIAL_INSTANTIATION_P): Remove.
3175 (IMPLICIT_TYPENAME_P): Likewise.
3176 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3177 (build_typename_type): Remove declaration.
3178 (parmlist_is_exprlist): Likewise.
3179 * decl.c (build_typename_type): Make it static, remove third
3180 parameter.
3181 (push_class_binding): Don't do implicit typename stuff.
3182 (make_typename_type): Likewise.
3183 (lookup_name_real): Likewise.
3184 (grokdeclarator): Don't try to convert declarations into
3185 initializations. Don't do implicit typename stuff.
3186 (parmlist_is_exprlist): Remove.
3187 (xref_basetypes): Simplify.
3188 * decl2.c (grokfield): Don't try to convert declarations into
3189 initializations.
3190 (build_anon_union_vars): Do this while processing templates, too.
3191 (finish_anon_union): Likewise.
3192 * error.c (dump_type): Remove implicit typename handling.
3193 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3194 (cp_parser_primary_expression): Correct handling of names not
3195 found by unqualified name lookup in templates.
3196 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3197 of types when possible.
3198 (cp_parser_simple_declaration): Complain intelligently about some
3199 invalid declarations.
3200 (cp_parser_member_declaration): Likewise.
3201 (cp_parser_constructor_declarator_p): Don't check when we're in a
3202 function scope.
3203 * pt.c (instantiate_class_template): Remove
3204 PARTIAL_INSTANTIATION_P gunk.
3205 * search.c (lookup_field_r): Don't build implicit typenames.
3206 (marked_pushdecls_p): Don't enter dependent base types.
3207 (unmarked_pushdecls_p): Likewise.
3208 * semantics.c (begin_class_definition): Remove implicit typename
3209 stuff.
3210
712becab
NS
32112003-01-16 Nathan Sidwell <nathan@codesourcery.com>
3212
3213 PR c++/9212
3214 * parser.c (cp_parser_direct_declarator): If accepting either
3215 abstract or named, the name must be an unqualified-id.
3216
fc555370
KG
32172003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3218
3219 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3220
dd1b7476
KG
32212003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3222
3223 * decl2.c (check_classfn): Fix uninitialized warning.
3224 (build_anon_union_vars): Likewise.
3225 * pt.c (tsubst_copy): Likewise.
3226
a7189b49
JO
32272003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
3228
3229 Further conform g++'s __vmi_class_type_info to the C++ ABI
3230 specification.
3231 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3232 the specification.
3233 (class_hint_flags): Likewise.
3234
cf22909c
KL
32352003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3236
3237 * config-lang.in: Add semantics.c to gtfiles.
3238 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3239 (saved_scope): Likewise.
3240 (type_lookups): Remove.
3241 (deferred_access): New structure.
3242 (type_access_control): Remove.
3243 (save_type_access_control): Likewise.
3244 (reset_type_access_control): Likewise.
3245 (decl_type_access_control): Likewise.
3246 (push_deferring_access_checks): Declare.
3247 (resume_deferring_access_checks): Likewise.
3248 (stop_deferring_access_checks): Likewise.
3249 (pop_deferring_access_checks): Likewise.
3250 (get_deferred_access_checks): Likewise.
3251 (pop_to_parent_deferring_access_checks): Likewise.
3252 (perform_deferred_access_checks): Likewise.
3253 (perform_or_defer_access_check): Likewise.
3254 * decl.c (make_typename_type): Use perform_or_defer_access_check.
3255 (make_unbound_class_template): Likewise.
3256 (grokdeclarator): Don't call decl_type_access_control.
3257 * parser.c (cp_parser_context): Remove deferred_access_checks
3258 and deferring_access_checks_p fields.
3259 (cp_parser_context_new): Adjust.
3260 (cp_parser): Remove access_checks_lists.
3261 (cp_parser_defer_access_check): Remove.
3262 (cp_parser_start_deferring_access_checks): Remove.
3263 (cp_parser_stop_deferring_access_checks): Remove.
3264 (cp_parser_perform_deferred_access_checks): Remove.
3265 (cp_parser_nested_name_specifier_opt): Use new deferred access
3266 functions.
3267 (cp_parser_simple_declaration): Likewise.
3268 (cp_parser_template_id): Likewise.
3269 (cp_parser_function_definition): Likewise.
3270 (cp_parser_class_specifier): Likewise.
3271 (cp_parser_lookup_name): Likewise.
3272 (cp_parser_single_declaration): Likewise.
3273 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3274 (cp_parser_parse_tentatively): Likewise.
3275 (cp_parser_parse_definitely): Likewise.
3276 (yyparse): Likewise.
3277 (cp_parser_init_declarator): Remove access_checks parameter.
3278 Use new deferred access functions.
3279 (cp_parser_function_definition_from_specifiers_and_declarator):
3280 Likewise.
3281 (cp_parser_class_head): Remove deferring_access_checks_p and
3282 saved_access_checks parameters. Use new deferred access functions.
3283 (cp_parser_member_specification_opt): Don't call
3284 reset_type_access_control.
3285 * search.c (type_access_control): Remove.
3286 * semantics.c: Include "gt-cp-semantics.h".
3287 (deferred_type_access_control): Remove.
3288 (deferred_access_stack): New variable.
3289 (deferred_access_free_list): Likewise.
3290 (push_deferring_access_checks): New function.
3291 (resume_deferring_access_checks): Likewise.
3292 (stop_deferring_access_checks): Likewise.
3293 (pop_deferring_access_checks): Likewise.
3294 (get_deferred_access_checks): Likewise.
3295 (pop_to_parent_deferring_access_checks): Likewise.
3296 (perform_deferred_access_checks): New function, adapted from
3297 cp_parser_perform_deferred_access_checks.
3298 (perform_or_defer_access_check): New function, adapted from
3299 cp_parser_defer_access_check.
3300 (current_type_lookups): Remove.
3301 (deferred_type_access_control): Likewise.
3302 (decl_type_access_control): Likewise.
3303 (save_type_access_control): Likewise.
3304 (reset_type_access_control): Likewise.
3305 (begin_function_definition): Adjust.
3306 (begin_class_definiton): Likewise.
3307
f576dfc4
JM
33082003-01-13 Jason Merrill <jason@redhat.com>
3309
3310 PR c++/8748
3311 * class.c (build_base_path): Take the address before calling save_expr.
3312
3313 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3314 all the ambiguous conversions are bad.
3315
3316 * class.c (maybe_warn_about_overly_private_class): Don't stop
3317 searching when we find a nonprivate method.
3318
3319 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3320
8fa1ad0e
MM
33212003-01-12 Mark Mitchell <mark@codesourcery.com>
3322
3323 * cp-tree.h (get_arglist_len_in_bytes): Remove.
3324
3325 PR c++/9264
3326 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3327 typeame types more robustly.
3328
15d2cb19
PE
33292003-01-11 Phil Edwards <pme@gcc.gnu.org>
3330
3331 * parser.c: Fix comment typos.
3332
a6f6052a
MM
33332003-01-10 Mark Mitchell <mark@codesourcery.com>
3334
99152b95 3335 PR c++/9099
a6f6052a
MM
3336 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3337 an object_type which is not a class type.
3338
3466b292
GK
33392003-01-10 Geoffrey Keating <geoffk@apple.com>
3340
3341 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3342 (cp_parser_late_parsing_default_args): Likewise.
3343
b2f29cd9
NN
33442003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
3345
3346 * cfns.gperf: ANSIfy function declarations.
3347 * cfns.h: Regenerate.
3348 * cp-tree.h: ANSIfy function declarations.
3349
2050a1bb
MM
33502003-01-10 Mark Mitchell <mark@codesourcery.com>
3351
3352 * cp-tree.h (reparse_absdcl_as_expr): Remove.
3353 (reparse_absdcl_as_casts): Likewise.
3354 (reparse_decl_as_expr): Likewise.
3355 (finish_decl_parsing): Likewise.
3356 * decl2.c (reparse_absdcl_as_expr): Remove.
3357 (reparse_absdcl_as_casts): Likewise.
3358 (repase_decl_as_expr): Likewise.
3359 (finish_decl_parsing): Likewise.
3360
3361 PR c++/9128
3362 PR c++/9153
3363 PR c++/9171
3364 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
3365 function.
3366 (cp_parser_nested_name_specifier_opt): Correct the
3367 check_dependency_p false.
3368 (cp_parser_postfix_expression): Fix formatting.
3369 (cp_parser_decl_specifier_seq): Avoid looking for constructor
3370 declarators when possible.
3371 (cp_parser_template_id): Avoid performing name-lookup when
3372 possible.
3373 (cp_parser_class_head): Do not count specializations when counting
3374 levels of templates.
3375 (cp_parser_constructor_declarator_p): Return immediately if
3376 there's no chance that the tokens form a constructor declarator.
3377 * rtti.c (throw_bad_typeid): Add comment. Do not return an
3378 expression with reference type.
3379 (get_tinfo_decl_dynamic): Do not return an expression with
3380 reference type.
3381 (build_typeid): Add comment. Do not return an expression with
3382 reference type.
3383 * typeck.c (build_class_member_access_expr): Improve handling of
3384 conditionals and comma-expressions as objects.
3385
45225759
NN
33862003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3387
d9b2742a
ZW
3388 * cfns.gperf: ANSIfy function declarations.
3389 * cfns.h: Regenerate.
3390 * cp-tree.h: ANSIfy function declarations.
3391 * parser.c: ANSIfy function declarations & definitions.
b2f29cd9 3392
45225759
NN
3393 * decl.c (bad_specifiers): Fix parameter order error I introduced.
3394
17211ab5
GK
33952003-01-09 Geoffrey Keating <geoffk@apple.com>
3396
3397 Merge from pch-branch:
3398
3399 2003-01-09 Geoffrey Keating <geoffk@apple.com>
3400
3401 Merge to tag pch-merge-20030102:
40a4184c 3402
17211ab5
GK
3403 * semantics.c (finish_translation_unit): Don't call finish_file.
3404 * parser.c: Don't include ggc.h.
3405 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
3406 read first token here. Don't allow PCH files after the first
3407 token is read.
3408 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
3409 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
3410 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
3411 (cp_parser_late_parsing_for_member): Don't duplicate call to
3412 cp_lexer_set_source_position_from_token.
3413 (cp_parser_late_parsing_default_args): Likewise.
3414 (yyparse): Call finish_file after clearing the_parser.
3415
3416 2002-12-11 Geoffrey Keating <geoffk@apple.com>
3417
3418 * Make-lang.in: Remove $(GGC_H) from all dependencies.
3419 (CXX_TREE_H): Add $(GGC_H).
40a4184c 3420 * class.c: Don't include ggc.h.
17211ab5
GK
3421 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
3422 (method_name_cmp): Likewise.
3423 (resort_data): New variable.
3424 (resort_field_decl_cmp): New.
3425 (resort_method_name_cmp): New.
3426 (resort_sorted_fields): New.
3427 (resort_type_method_vec): New.
3428 (finish_struct_methods): Delete cast.
3429 (finish_struct_1): Delete cast.
3430 * cp-tree.h: Include ggc.h.
3431 (struct lang_type_class): Add reorder attribute to field `methods'.
3432 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
3433 (resort_sorted_fields): New prototype.
3434 (resort_type_method_vec): New prototype.
3435 * call.c: Don't include ggc.h.
3436 * decl.c: Likewise.
3437 * decl2.c: Likewise.
3438 * init.c: Likewise.
3439 * lex.c: Likewise.
3440 * method.c: Likewise.
3441 * optimize.c: Likewise.
3442 * parse.y: Likewise.
3443 * pt.c: Likewise.
3444 * repo.c: Likewise.
3445 * search.c: Likewise.
3446 * semantics.c: Likewise.
3447 * spew.c: Likewise.
3448 * tree.c: Likewise.
3449
3450 * lang-specs.h: Remove comment.
3451
3452 2002-12-03 Geoffrey Keating <geoffk@apple.com>
3453
3454 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
3455 (operator_name_info): Mark to be saved for PCH, specify size.
3456 (assignment_operator_name_info): Likewise.
3457
3458 2002-11-19 Geoffrey Keating <geoffk@apple.com>
3459
3460 * decl.c (anon_cnt): Mark to be saved for PCH.
3461
3462 2002-10-25 Geoffrey Keating <geoffk@apple.com>
3463
3464 * lex.c (init_reswords): Delete now-untrue comment.
3465 Allocate ridpointers using GGC.
3466
3467 2002-10-04 Geoffrey Keating <geoffk@apple.com>
3468
3469 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
3470
3471 * g++spec.c (lang_specific_driver): Don't include standard
3472 libraries in `added'.
3473
3474 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
3475
3476 * decl2.c (finish_file): Call c_common_write_pch.
3477 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
3478
3479 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
3480
3481 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
3482 files when using g++.
3483 * lang-specs.h: Handle compiling C++ header files.
3484
ca5dd8b7
JJ
34852003-01-09 Jakub Jelinek <jakub@redhat.com>
3486
3487 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
3488
0f399e5f
KL
34892003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3490
3491 * pt.c (push_access_scope_real): Call push_to_top_level for
3492 function in namespace scope.
3493 (pop_access_scope): Call pop_from_top_level for function in
3494 namespace scope.
3495
c456a45a
JJ
34962003-01-09 Jakub Jelinek <jakub@redhat.com>
3497
3498 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
3499
2c6ce97e
CC
35002003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
3501
3502 * Make-lang.in (c++.install-common, c++.install-man,
3503 c++.uninstall): Prepend $(DESTDIR) to destination paths in
3504 all (un)installation commands.
3505 (c++.install-common): Rewrite $(LN) commands to support
3506 DESTDIR with "ln" as well as with "ln -s".
3507
f74dbcec
JM
35082003-01-08 Jason Merrill <jason@redhat.com>
3509
3510 * parser.c (cp_parser_primary_expression): See through explicitly
3511 scoped ALIAS_DECLs, too.
3512
11f6b451
NN
35132003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
3514
1774f99d
NN
3515 * decl.c: Remove some #if 0 code.
3516
11f6b451
NN
3517 * decl.c: ANSIfy function declarations.
3518
8caf4c38
MM
35192003-01-07 Mark Mitchell <mark@codesourcery.com>
3520
3521 * parser.c (cp_parser_asm_definition): Correct handling of omitted
3522 operands.
3523
2b59fc25
KL
35242003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3525
3526 PR c++/9030
3527 * decl.c (make_typename_type): Check access only when tf_error.
3528 (make_unbound_class_template): Likewise.
3529 * pt.c (saved_access_scope): New variable.
3530 (push_access_scope_real): New function.
3531 (push_access_scope): Likewise.
3532 (pop_access_scope): Likewise.
3533 (tsubst_default_argument): Use them.
3534 (instantiate_template): Likewise.
3535 (regenerate_decl_from_template): Likewise.
3536 (instantiate_decl): Likewise.
3537 (get_mostly_instantiated_function_type): Likewise.
3538
3f7617e4
NN
35392003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
3540
3541 * tree.c: Delete bogus #if 0 code.
3542
c9372112
AS
35432003-01-07 Andreas Schwab <schwab@suse.de>
3544
3545 * class.c (layout_class_type): Don't use
3546 PCC_BITFIELD_TYPE_MATTERS if not defined.
3547
8218bd34
MM
35482003-01-06 Mark Mitchell <mark@codesourcery.com>
3549
c10cdb3d
MM
3550 PR c++/9165
3551 * decl2.c (build_cleanup): Mark the object as used.
3552
69f794a7
MM
3553 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
3554 (hash_local_specialization): New function.
3555 (register_local_specialization): Revert 2003-01-05 change.
3556 (instantiate_decl): Use hash_local_specialization when creating
3557 the local_specializations table.
40a4184c 3558
4c4646b5
MM
3559 * decl2.c (mark_used): Do not synthesize thunks.
3560
63e5f567
MM
3561 * class.c (layout_class_type): Correct handling of unnamed
3562 bitfields wider than their types.
3563
8218bd34
MM
3564 PR c++/9189
3565 * parser.c (cp_parser): Remove default_arg_types. Update
3566 documentation for unparsed_functions_queues.
3567 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
3568 parameter.
3569 (cp_parser_new): Don't set parser->default_arg_types.
3570 (cp_parser_function_definition): Adjust usage of
3571 unparsed_funtions_queues.
3572 (cp_parser_class_specifier): Don't mess with
3573 parser->default_arg_types. Handle default argument processing in
3574 a separate phase from function body processing.
3575 (cp_parser_template_declaration_after_export): Adjust usage of
3576 unparsed_functions_queues.
3577 (cp_parser_late_parsing_for_member): Do not handle default
3578 arguments.
3579
62b8a44e
NS
35802003-01-06 Nathan Sidwell <nathan@codesourcery.com>
3581
3582 PR c++/9109
3583 * parser.c (cp_parser_declarator_kind): New enum.
3584 (cp_parser_declarator): Adjust.
3585 (cp_parser_direct_declarator): Adjust. Allow for either named or
3586 abstract declarator. Prefer abstract, if possible. Allow
3587 parenthesized function name.
3588 (cp_parser_condition): Adjust cp_parser_declarator call.
3589 (cp_parser_explicit_instantiation): Likewise.
3590 (cp_parser_init_declarator): Likewise.
3591 (cp_parser_type_id): Likewise.
3592 (cp_parser_function_definition): Likewise.
3593 (cp_parser_member_declaration): Likewise.
3594 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
3595 the tentative parsing.
3596 (cp_parser_exception_declaration): Likewise.
3597
ec194454
MM
35982003-01-05 Mark Mitchell <mark@codesourcery.com>
3599
3600 * parser.c (cp_parser_template_parameter): Adjust call to
3601 cp_parser_parameter_declaration.
3602 (cp_parser_parameter_declaration_list): Likewise.
3603 (cp_parser_parameter_declaration): Replace
3604 greater_than_is_operator_p with template_parm_p parameter. Do not
3605 cache tokens for template default arguments.
3606
3607 * pt.c (retrieve_local_specialization): Use htab_find, not
3608 htab_find_with_hash.
3609 (register_local_specialization): Use htab_find_slot, not
3610 htab_find_slot_with_hash.
3611 (instantiate_decl): Pass a hash function to htab_create.
40a4184c 3612
39b1af70
KG
36132003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3614
3615 * parser.c (cp_parser_binary_expression,
3616 cp_parser_multiplicative_expression,
3617 cp_parser_additive_expression, cp_parser_shift_expression,
3618 cp_parser_relational_expression, cp_parser_equality_expression,
3619 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3620 cp_parser_inclusive_or_expression,
3621 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
3622 cp_parser_binary_expression): Const-ify.
3623
1bb2cc34
MM
36242003-01-04 Mark Mitchell <mark@codesourcery.com>
3625
3626 * method.c (use_thunk): Disable access control while building the
3627 body of the thunk.
3628
3fd5abcf
NN
36292003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
3630
40a4184c 3631 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3fd5abcf
NN
3632 front end.
3633
9aad8f83
MA
36342003-01-03 Matt Austern <austern@apple.com>
3635
3636 * cp-tree.h (struct lang_type_class): add field for key method
3637 (cp_global_trees): rename dynamic_classes to keyed_classes
3638 (key_method): add definition
3639 * class.c (finish_struct_1): compute class's key method, and add
3640 the class to keyed_classes list if there is no key method.
3641 * decl.c (finish_function): add class to keyed_classes list if we
3642 see a definition of the class's key method.
3643 * pt.c (instantiate_class_template): add template specialization
3644 of a dynamic class to keyed_classes list.
3645 * decl2.c (key_method): remove
3646 (finish_file): iterate only through keyed_classes list when
3647 deciding whether to emit vtables, remove class from its list after
3648 we do the emission.
40a4184c 3649
6cce57b0
JM
36502003-01-02 Jason Merrill <jason@redhat.com>
3651
4e8dca1c
JM
3652 * call.c (build_conditional_expr): Stabilize lvalues properly.
3653 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
3654 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
3655 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
3656
3657 * call.c (convert_like_real): Call decl_constant_value for an
3658 IDENTITY_CONV even if there are no more conversions.
3659
3660 * cvt.c (build_up_reference): Don't push unnamed temps.
3661
3662 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
3663
3664 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
3665 for a backend struct.
3666
3667 * except.c (wrap_cleanups_r, build_throw): Make
3668 MUST_NOT_THROW_EXPRs void.
3669 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
3670
3671 * init.c (build_vec_delete_1): Pre-evaluate the base address.
3672
3673 * init.c (get_temp_regvar): Simplify logic.
3674
3675 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
3676 our replacement is a decl.
3677
6cce57b0
JM
3678 * decl.c (cp_make_fname_decl): Push the decls inside the
3679 outermost scope.
3680
31758337
NS
36812003-01-03 Nathan Sidwell <nathan@codesourcery.com>
3682
3683 PR c++/45, c++/3784
3684 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
3685 the same too.
3686
24c0ef37
GS
36872003-01-03 Graham Stott <graham.stott@btinternet.com>
3688
3689 * parser.c (struct cp_parser): Add access_checks_lists field
3690 (cp_parser_simple_declaration): Use.
40a4184c 3691 (cp_parser_init_declarator): Likewise.
24c0ef37 3692
5e8a153a
MM
36932003-01-02 Mark Mitchell <mark@codesourcery.com>
3694
1092805d
MM
3695 * parser.c (cp_parser_declaration): Accept the __extension__
3696 keyword before the declaration.
3697
4971227d
MM
3698 PR c++/2843
3699 * parser.c (cp_parser_parameter_declaration): Allow attributes to
3700 appear after the declarator.
3701
5e8a153a
MM
3702 * call.c (build_new_method_call): Fix typo in message format
3703 string.
3704
3beb3abf
MM
37052003-01-02 Mark Mitchell <mark@codesourcery.com>
3706
f7b5ecd9
MM
3707 * parser.c (cp_lexer_next_token_is): Declare it inline.
3708 (cp_lexer_set_source_position_from_token): Likewise.
3709 (cp_lexer_debugging_p): Likewise.
3710 (cp_parser_parsing_tentatively): Likewise.
3711 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
3712 to the cp_lexer_peek_token.
1092805d 3713
3beb3abf
MM
3714 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
3715 expression.
3716
43c6a96a
SB
37172003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3718
3719 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
3720 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
3721 cp/repo.c: Fix copyright years.
3722
c58b209a
NB
37232003-01-01 Neil Booth <neil@daikokuya.co.uk>
3724
3725 * lex.c: Remove superfluous include of cpplib.h.
3726 (CONSTRAINT): Define without conditions.
3727 (init_cp_pragma): Use c_register_pragma.
3728
7347c2c5
NB
37292002-12-31 Neil Booth <neil@daikokuya.co.uk>
3730
3731 * .cvsignore: Remove.
3732
f5adbb8d
SB
37332002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
3734
3735 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
3736 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
3737 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
3738 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
3739 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
3740 copyright header.
3741 * lex.h: parse.y is dead, so don't mention it. Also replace the
3742 copyright header with the default GNU copyright header.
3743
f1aba0a5
MM
37442002-12-31 Mark Mitchell <mark@codesourcery.com>
3745
eea9800f
MM
3746 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
3747 (lookup_name_namespace_only): Likewise.
3748 (begin_only_namespace_names): Likewise.
3749 (end_only_namespace_names): Likewise.
3750 * decl.c (only_namespace_names): Remove.
3751 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
3752 (lookup_name_real): Do not check only_namespace_names.
3753 (lookup_name_namespace_only): Remove.
3754 (begin_only_namespace_names): Likewise.
3755 (end_only_namespace_names): Likewise.
3756 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
3757 nested-name-specifiers more gracefully.
3758 (cp_parser_class_or_namespace_name): Avoid looking up namespace
3759 names when they cannot possibly appear.
3760 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
3761 (cp_parser_elaborated_type_specifier): Likewise.
3762 (cp_parser_namespace_name): Only look for namespace names.
3763 (cp_parser_lookup_name): Add is_namespace parameter.
3764 (cp_parser_lookup_name_simple): Adjust call to
3765 cp_parser_lookup_name.
3766
f1aba0a5
MM
3767 * parser.c (cp_parser_dependent_type_p): Fix thinko.
3768
eea9800f
MM
37692002-12-31 Neil Booth <neil@daikokuya.co.uk>
3770
3771 * .cvsignore: Update.
3772
3cfabe60
NS
37732002-12-31 Nathan Sidwell <nathan@codesourcery.com>
3774
3775 * class.c (modify_vtable_entry): Remove unused variable.
3776 (get_vcall_index): Always expect a non-thunk.
3777 (update_vtable_entry_for_fn): Combine covariant adjustments, when
3778 overriding a thunk. Pass get_vcall_index a non-thunk.
3779
3780 * decl2.c (finish_file): Mark undefined inlines as extern.
3781
92bc1323
MM
37822002-12-31 Mark Mitchell <mark@codesourcery.com>
3783
3784 * cp-tree.def (RETURN_INIT): Remove.
3785 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
3786 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
3787 (note_level_for_for): Remove.
3788 (note_level_for_try): Likewise.
3789 (note_level_for_catch): Likewise.
3790 (finish_named_return_value): Likewise.
3791 (do_pushlevel): Change prototype.
3792 (pending_lang_change): Remove.
3793 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
3794 sk_for.
3795 (note_level_for_for): Remove.
3796 (note_level_for_try): Likewise.
3797 (note_level_for_catch): Likewise.
3798 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
3799 * parser.c (cp_parser_context_free_list): Make it "deletable".
3800 (cp_parser_template_argument): Remove misleading comment.
3801 * pt.c (tsubst_expr): Remove RETURN_INIT code.
3802 * semantics.c (genrtl_named_return_value): Remove.
3803 (do_pushlevel): Take a scope kind as an argument.
3804 (begin_if_stmt): Adjust.
3805 (begin_while_stmt): Likewise.
3806 (begin_for_stmt): Likewise.
3807 (finish_for_init_stmt): Likewise.
3808 (begin_switch_stmt): Likewise.
3809 (begin_handler): Likewise.
3810 (begin_compound_stmt): Likewise.
3811 (finish_named_return_value): Remove.
3812 (cp_expand_stmt): Remove RETURN_INIT case.
3813 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
43c6a96a 3814
abda8efe
MM
38152002-12-31 Mark Mitchell <mark@codesourcery.com>
3816
3817 PR c++/9112
3818 * parser.c (cp_parser_direct_declarator): Handle erroneous
3819 parenthesized declarators correctly.
3820
eddcae5a
GDR
38212002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3822
3823 * cp-tree.h (pending_lang_change): Declare.
3824
c838d82f
MM
38252002-12-30 Mark Mitchell <mark@codesourcery.com>
3826
e5976695
MM
3827 * parser.c (cp_parser_context_free_list): New variable.
3828 (cp_parser_context_new): Use it.
3829 (cp_parser_error): Check return code from
3830 cp_parser_simulate_error.
3831 (cp_parser_simulate_error): Return a value.
3832 (cp_parser_id_expression): Optimize common case.
3833 (cp_parser_class_name): Likewise.
3834 (cp_parser_class_specifier): Adjust call to
3835 cp_parser_late_parsing_default_args.
3836 (cp_parser_lookup_name): Optimize common case.
3837 (cp_parser_late_parsing_for_member): Adjust call to
3838 cp_parser_late_parsing_default_args.
3839 (cp_parser_late_parsing_default_args): Add scope parameter.
3840 (cp_parser_require): Avoid creating the error message unless it's
3841 needed.
3842 (cp_parser_parse_definitely): Place free'd contexts on the free
3843 list.
3844
c838d82f
MM
3845 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
3846
c73aecdf
DE
38472002-12-30 David Edelsohn <edelsohn@gnu.org>
3848
3849 * parser.c (cp_parser_parameter_declaration_clause): Treat system
3850 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
3851
b599b135
NN
38522002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3853
43c6a96a 3854 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
b599b135
NN
3855 GCC, not GNU CC.
3856
946d5e45
MM
38572002-12-30 Mark Mitchell <mark@codesourcery.com>
3858
afd9b9dd
MM
3859 * parse.y: Remove.
3860 * spew.c: Likewise.
3861 * Make-lang.in (gt-cp-spew.h): Remove.
3862 * cp-tree.h (do_pending_lang_change): Remove.
3863 (do_identifier): Change prototype.
3864 (finish_id_expr): Remove.
3865 * decl.c (lookup_name_real): Remove yylex variable.
3866 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
3867 * lex.c (init_cpp_parse): Remove.
3868 (reduce_cmp): Likewise.
3869 (token_cmp): Likewise.
3870 (yychar): Likewise.
3871 (lastiddecl): Likewise.
3872 (token_count): Likewise.
3873 (reduce_count): Likewise.
3874 (yyhook): Likewise.
3875 (print_parse_statistics): Likewise.
3876 (do_pending_lang_change): Likewise.
3877 (do_identifier): Remove parsing parameter.
3878 * lex.h (lastiddecl): Remove.
3879 (looking_for_typename): Remove.
3880 (looking_for_template): Likewise.
3881 (pending_lang_change): Likewise.
3882 (yylex): Likewise.
3883 * semantics.c (finish_id_expr): Remove.
43c6a96a 3884
946d5e45
MM
3885 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
3886 thread" correctly.
3887
1c313945
NN
38882002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3889
3890 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
3891 end, not the C front end.
3892
8e268f72
NS
38932002-12-30 Nathan Sidwell <nathan@codesourcery.com>
3894
3895 * cp-tree.h (THUNK_TARGET): New macro.
3896 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
3897 (finish_thunk): Remove offset parms.
3898 * class.c (find_final_overrider): Look through thunks.
3899 (get_vcall_index): Use THUNK_TARGET.
3900 (update_vtable_entry_for_fn): Look through thunks. Set covariant
3901 fixed offset here. Adjust finish_thunk call.
3902 (build_vtbl_initializer): Adjust finish_thunk calls.
3903 * mangle.c (mangle_call_offset): Remove superfluous if.
3904 (mangle_thunk): Adjust.
3905 * method.c (make_thunk): Adjust.
3906 (finish_thunk): Adjust.
3907 (thunk_adjust): Remove assert.
3908 (use_thunk): Use THUNK_TARGET
3909 * dump1.c (cp_dump_tree): Adjust thunk dumping.
3910
3911 PR c++/9054
3912 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
3913 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
3914
848eed92
GDR
39152002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3916
3917 Remove traditional C constructs 4/n.
3918 * decl2.c (grok_method_quals, warn_if_unknown_interface,
3919 grok_x_components, cp_build_parm_decl, build_artificial_parm,
3920 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
3921 delete_sanity, check_member_template, check_java_method,
3922 check_classfn, finish_static_data_member_decl, grokfield,
3923 grokbitfield, grokoptypename, grok_function_init,
3924 cplus_decl_attributes, constructor_name, defer_fn,
3925 build_anon_union_vars, finish_anon_union, coerce_new_type,
3926 coerce_delete_type, comdat_linkage, maybe_make_one_only,
3927 key_method, import_export_vtable, import_export_class,
3928 output_vtable_inherit, import_export_decl, import_export_tinfo,
3929 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3930 set_guard, start_objects, finish_objects,
3931 start_static_storage_duration_function,
3932 finish_static_storage_duration_function, get_priority_info,
3933 start_static_initialization_or_destruction,
3934 finish_static_initialization_or_destruction,
3935 do_static_initialization, do_static_destruction,
3936 prune_vars_needing_no_initialization, write_out_vars,
3937 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3938 add_using_namespace, merge_functions, ambiguous_decl,
3939 lookup_using_namespace, lookup_using_namespace,
3940 qualified_lookup_using_namespace, set_decl_namespace,
3941 decl_namespace, current_decl_namespace, push_decl_namespace,
3942 pop_decl_namespace, push_scope, pop_scope, add_function,
3943 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3944 lookup_arg_dependent, do_namespace_alias,
3945 validate_nonmember_using_decl, do_nonmember_using_decl,
3946 do_toplevel_using_decl, do_local_using_decl,
3947 do_class_using_decl, do_using_directive, check_default_args,
3948 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
3949 * parser.c (cp_parser_class_head): Use booleanss.
3950 * decl.c (walk_globals, walk_vtables): Likewise.
3951 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3952 walk_globals): Change return type from 'int' to 'bool'.
3953 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3954 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3955 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3956 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3957 qualifier_flags, tinfo_base_init, generic_initializer,
3958 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3959 dfs_class_hint_unmark, class_hint_flags, class_initializer,
3960 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3961 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3962 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3963 * repo.c (repo_compile_flags, repo_template_declared,
3964 repo_template_defined, repo_class_defined, repo_get_id,
3965 repo_template_used, repo_vtable_used, repo_inline_used,
3966 repo_tinfo_used, repo_template_instantiated, extract_string,
3967 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3968 finish_repo): Likewise.
3969 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3970 cxx_print_xnode): Likewise..
3971 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3972 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3973 * cxxfilt.c (demangle_it, print_demangler_list, usage,
3974 standard_symbol_characters, hp_symbol_characters, main, fatal):
43c6a96a 3975 Likewise.
848eed92
GDR
3976 (strip_underscore): Change type from 'int' to 'bool'.
3977 (main): Use boolean constants.
3978
b746c5dc
GDR
39792002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3980
3981 Remove traditional C constructs 3/n.
3982 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3983 build_up_reference, warn_ref_binding, convert_to_reference,
3984 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3985 convert_to_void, convert, convert_force, build_type_conversion,
3986 build_expr_type_conversion, type_promotes_to,
3987 perform_qualification_conversions): Use C90 prototyping style.
3988 * decl2.c (grok_array_decl): Use boolean constant.
3989 (delete_sanity): Likewise.
3990 * typeck.c (build_unary_op): Likewise.
3991 * semantics.c (finish_switch_cond): Likewise.
3992 * parser.c (cp_parser_direct_new_declarator): Likewise.
3993 * init.c (build_new): Likewise.
3994
a723baf1
MM
39952002-12-27 Mark Mitchell <mark@codesourcery.com>
3996
3997 * Make-lang.in (po-generated): Remove parse.c.
3998 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
3999 ($(srcdir)/cp/parse.h): Remove target.
4000 ($(srcdir)/cp/parse.c): Likewise.
4001 (gt-cp-parse.h): Likewise.
4002 (gt-cp-parser.h): New target.
4003 (c++.distclean): Do not remove parse.output.
4004 (c++.maintainer-clean): Do not remove parse.c or parse.h.
4005 (cp/spew.o): Remove target.
4006 (cp/lex.o): Adjust dependencies.
4007 (cp/pt.o): Likewise.
4008 (cp/parse.o): Likewise.
4009 (cp/TAGS): Do not mention parse.c.
4010 (cp/parser.o): New target.
4011 * NEWS: Mention the new parser.
4012 * call.c (build_scoped_method_call): Simplify.
4013 (build_method_call): Likewise.
4014 (build_new_function_call): Adjust calls to add_function_candidate
4015 and add_template_candidate.
4016 (build_new_op): Improve handling of erroroneous operands.
4017 (convert_default_arg): Remove circular argument processing.
4018 (name_as_c_string): New function.
4019 (build_new_method_call): Use it.
4020 (perform_implicit_conversion): Use error_operand_p.
4021 * class.c (finish_struct_anon): Use constructor_name_p.
4022 (check_field_decls): Likewise.
4023 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4024 (resolve_address_of_overloaded_function): Likewise.
4025 (instantiate_type): Tweak pointer-to-member handling.
4026 (get_primary_binfo): Remove incorrect assertion.
4027 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4028 * cp-tree.h (DEFARG_TOKENS): New macro.
4029 (default_arg): New structure.
4030 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4031 (lang_tree_node): Add default_arg.
4032 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4033 (type_info_ref_type): New macro.
4034 (saved_scope): Make processing_explicit_instantiation a boolean.
4035 (check_access): New field.
4036 (unparsed_text): Remove.
4037 (language_function): Remove unparsed_inlines.
4038 (error_operand_p): New macro.
4039 (lang_decl): Adjust pending_inline_info.
4040 (DEFARG_POINTER): Remove.
4041 (tag_types): Add typenames.
4042 (lookup_ualified_name): Declare.
4043 (lookup_name_real): Likewise.
4044 (shadow_tag): Adjust prototype.
4045 (get_scope_of_declarator): Declare it.
4046 (process_next_inline): Remove it.
4047 (check_for_missing_semicolon): Likewise.
4048 (maybe_get_template_decl_from_type_decl): Declare it.
4049 (finish_label_stmt): Adjust prototype.
4050 (finish_non_static_data_meber): Declare it.
4051 (finish_pseudo_destructor_call_expr): Rename to ...
4052 (finish_pseudo_destructor_expr): ... this.
4053 (finish_compound_literal): Declare it.
4054 (begin_inline_definitions): Remove it.
4055 (init_spew): Remove.
4056 (peekyylex): Likewise.
4057 (arbitrate_lookup): Likewise.
4058 (frob_opname): Likewise.
4059 (maybe_snarf_defarg): Likewise.
4060 (add_defarg_fn): Likewise.
4061 (do_pending_defargs): Likewise.
4062 (done_pending_defargs): Likewise.
4063 (unprocessed_defarg_fn): Likewise.
4064 (replace_defarg): Likewise.
4065 (end_input): Likewise.
4066 (get_overloaded_fn): Likewise.
4067 * cvt.c (convert_to_reference): Improve error handling.
4068 * decl.c (lookup_name_real): Do not declare it static.
4069 (maybe_push_to_top_level): Set check_access.
4070 (identifier_type_value): Adjust call to lookup_name_real.
4071 (lookup_qualified_name): New method.
4072 (lookup_name_real): Remove special-case parsing code.
4073 (lookup_name-nonclass): Adjust call to lookup_name_real.
4074 (lookup_name_namespace_only): Likewise.
4075 (lookup_name): Likewise.
4076 (check_tag_decl): Return the type declared.
4077 (shadow_tag): Likewise.
4078 (register_dtor_fn): Tweak check_access.
4079 (grokfndecl): Use constructor_name_p.
4080 (get_scope_of_declarator): New function.
4081 (grokdeclarator): Obscure tweaks for slightly different declarator
4082 representations.
4083 (start_method): Return error_mark_node to indicate failure.
43c6a96a 4084 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
a723baf1
MM
4085 * decl2.c (constructor_name_full): Simplify.
4086 (constructor_name): Use it.
4087 (build_expr_from_tree): Adjust for changes to do new parser.
4088 (push_scope): Improve robustness.
4089 (validate_nonmember_using_decl): Process declarations, not names.
4090 (do_class_using_decl): Likewise.
4091 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4092 here.
4093 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4094 * expr.c (cxx_expand_expr): Handle BASELINKs.
4095 * init.c (member_init_ok_or_else): Issue more errors.
4096 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4097 * lex.c: Do not include parse.h.
4098 (yypring): Do not declare.
4099 (yylval): Likewise.
4100 (make_reference_declarator): Remove error-generating code.
4101 (rid_to_yy): Remove.
4102 (cxx_init): Do not call init_spew.
4103 (yypring): Remove.
4104 (check_for_missing_semicolon): Remove.
4105 * lex.h (got_scope): Remove.
4106 (got_object): Remove.
4107 * method.c (hack_identifier): Use finish_non_static_data_member.
4108 (implicitly_declare_fn): Adjust use of constructor_name.
4109 * parser.c: New file.
4110 * pt.c (parse.h): Do not include it.
4111 (maybe_get_template_decl_from_template): Do not declare it.
4112 (finish_member_template_decl): Tweak.
4113 (begin_explicit_instantiation): Adjust for
4114 processing_explicit_instantiation being boolean.
4115 (end_explicit_instantiation): Likewise.
4116 (maybe_process_partial_specialization): Tighten specialization
4117 test.
4118 (retrieve_local_specialization): Adjust ue of hash table.
4119 (eq_local_specializations): New function.
4120 (register_local_specialization): Likewise.
4121 (push_template_decl_real): Remove unnecessary test.
4122 (maybe_get_template_decl_from_type_decl): Don't make it static.
4123 (for_each_template_parm_r): Handle TYPEOF_TYPE.
4124 (tsubst_copy): Use retrieive_local_specialization to handle
4125 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
4126 Handle COMPONENT_REFs with pseudo-destructor-expressions.
4127 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4128 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4129 (unify): Tweak handling of CONST_DECLs.
4130 (regenerate_decl_from_template): Use push_nested_class.
4131 (template_for_substitution): New funciton.
4132 (instantiate_decl): Use it. Register parameters as local
4133 specializations.
4134 * rtti.c (init_rtti_processing): Set type_info_ref_type.
4135 (build_typeid): Use it.
4136 (get_typeid): Likeise.
4137 * search.c (accessible_p): Use check_access, not
4138 flag_access_control.
4139 (adjust_result_of_qualified_name_lookup): Pay attention to the
4140 context_class.
4141 * semantics.c (finish_asm_stmt): Adjust error handling.
4142 (finish_label_stmt): Return the statement.
4143 (finish_non_static_data_member): New function.
4144 (finish_class_expr): Handle BASELINKs.
4145 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4146 (finish_object_call_expr): Simplify handling during templates.
4147 (finish_pseudo_destructor_call_expr): Rename to ...
4148 (finish_pseudo_dtor_expr): ... this.
4149 (finish_compound_literal): New function.
4150 (begin_inline_definitions): Remove.
4151 (finish_sizeof): Remove special template handling.
4152 * spew.c: Do not include parse.h.
4153 * tree.c (get_overloaded_fn): Remove.
4154 * typeck.c (build_class_member_access_expr): Handle
4155 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
4156 (lookup_destructor): New function.
4157 (finish_class_member_access_expr): Use it.
4158 (convert_arguments): Simplify.
4159 (build_unary_op): Handle BASELINKs.
43c6a96a 4160
aac1406f
NS
41612002-12-26 Nathan Sidwell <nathan@codesourcery.com>
4162
eab5474f
NS
4163 PR c++/4803
4164 * decl2.c (mark_used): Defer inline functions.
4165 (finish_file): Merge deferred_fns loops. Check all used
4166 inline functions have a definition.
4167 * method.c (make_thunk): Thunks are not inline.
4168
aac1406f
NS
4169 PR c++/5116, c++/764
4170 * call.c (build_new_op): Make sure template class operands are
4171 instantiated.
4172
b9201622
NS
41732002-12-24 Nathan Sidwell <nathan@codesourcery.com>
4174
3e14cd30
NS
4175 PR C++/7964
4176 * cp-tree.h (resolve_scoped_fn_name): Prototype.
4177 * call.c (resolve_scoped_fn_name): New function. Deal with
4178 more template expansion. Broken out of ...
4179 * parse.y (parse_finish_call_expr): ... here. Call it.
4180 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4181 resolve_scoped_fn_name and build_call_from_tree.
4182
b9201622
NS
4183 PR c++/9053
4184 * decl.c (duplicate_decls): Templates may be disambiguated by
4185 return type.
43c6a96a 4186
b9201622
NS
4187 PR c++/8702
4188 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4189 conversion operators on failure.
4190
94be8403
GDR
41912002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4192
b746c5dc
GDR
4193 Remove traditional C constructs 2/n.
4194 * call.c (tourney, build_field_call, equal_functions, joust,
4195 compare_ics, build_over_call, build_java_interface_fn_ref,
4196 convert_like_real, op_error, build_object_call, resolve_args,
4197 build_vfield_ref, check_dtor_name, build_scoped_method_call,
4198 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4199 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4200 standard_conversion, reference_related_p,
4201 reference_compatible_p, convert_class_to_reference,
4202 direct_reference_binding, reference_binding,
4203 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4204 add_template_conv_candidate, any_viable, any_strictly_viable,
4205 build_this, splice_viable, print_z_candidates,
4206 build_user_type_conversion, build_new_function_call,
4207 conditional_conversion, build_conditional_expr, build_new_op,
4208 build_op_delete_call, enforce_access, call_builtin_trap,
4209 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4210 convert_default_arg, type_passed_as, convert_for_arg_passing,
4211 in_charge_arg_for_name, is_properly_derived_from,
4212 maybe_handle_implicit_object, maybe_handle_ref_bind,
4213 source_type, add_warning, can_convert, can_convert_arg,
4214 perform_implicit_conversion, can_convert_arg_bad,
4215 initialize_reference, add_conv_candidate,
4216 add_template_candidate_real, add_template_candidate): Ansify.
94be8403 4217
081cebb2
NS
42182002-12-22 Nathan Sidwell <nathan@codesourcery.com>
4219
4220 PR c++/8572
4221 * cp-tree.h (grokoptypename): Add SCOPE parameter.
4222 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4223 if in a template scope.
4224 * parse.y (unoperator): Return the scope.
4225 (operator_name): Adjust grokoptypename call.
4226
4f09be91
KL
42272002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4228
4229 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4230 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
4231 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4232
4639c5c6
KH
42332002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4234
4235 * ChangeLog: Fix a typo.
4236 * class.c: Fix comment typos.
4237 * cp-tree.h: Likewise.
4238
0ca7178c
JM
42392002-12-18 Jason Merrill <jason@redhat.com>
4240
4241 Handle anonymous unions at the tree level.
4242 C++ ABI change: Mangle anonymous unions using the name of their
4243 first named field (by depth-first search). Should not cause
4244 binary compatibility problems, though, as the compiler previously
4245 didn't emit anything for affected unions.
4246 * cp-tree.def (ALIAS_DECL): New tree code.
4247 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
4248 first field, not the largest.
4249 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
4250 push the decl, and write it out at namespace scope.
4251 * decl.c (lookup_name_real): See through an ALIAS_DECL.
4252 (pushdecl): Add namespace bindings for ALIAS_DECLs.
4253 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4254 of a decl which doesn't have one.
4255 * typeck.c (build_class_member_access_expr): Don't recurse if
4256 we already have the type we want.
4257
da9701a6
KL
42582002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4259
4260 PR c++/8099
4261 * friend.c (make_friend_class): Allow partial specialization
4262 when declaration is not a template friend.
4263
cab7a9a3
KL
42642002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4265
4266 PR c++/3663
4267 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4268 TREE_PROTECTED to created decl nodes.
4269
50cb9059
MM
42702002-12-18 Mark Mitchell <mark@codesourcery.com>
4271
4272 * class.c (build_base_field): Do not set DECL_PACKED on the
4273 FIELD_DECL.
4274
e220f0a4
GDR
42752002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
4276
4277 * cp-tree.h (struct tree_srcloc): Use location_t.
4278 (SOURCE_LOCUS): New.
4279 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4280
efc7052d
JM
42812002-12-17 Jason Merrill <jason@redhat.com>
4282
4283 * decl.c (finish_function): Also complain about no return in
4284 templates.
43c6a96a 4285 * semantics.c (finish_return_stmt): Also call check_return_expr in
efc7052d
JM
4286 templates.
4287 * typeck.c (check_return_expr): In a template, just remember that we
4288 saw a return.
4289
9f175208
JM
42902002-12-16 Jason Merrill <jason@redhat.com>
4291
89ea02fb
JM
4292 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4293 of the CALL_EXPR.
4294
9f175208
JM
4295 * semantics.c (do_pushlevel): Call pushlevel after adding the
4296 SCOPE_STMT.
4297 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4298 * parse.y (function_body): Go back to using compstmt.
4299 * decl.c (pushdecl): Skip another level to get to the parms level.
4300
4301 * call.c (build_new_method_call): Use is_dummy_object to determine
4302 whether or not to evaluate the object parameter to a static member
4303 function.
4304
4977bab6
ZW
43052002-12-14 Jason Merrill <jason@redhat.com>
4306
4307 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4308 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4309 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4310 don't bother with an AGGR_INIT_EXPR.
4311 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4312 just generate a new decl normally. Take return slot parm.
4313 * cp-tree.h: Adjust prototype.
4314
75c525d7
GDR
43152002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4316
4317 PR C++/8031
43c6a96a 4318 * cvt.c (convert_to_pointer_force): Don't try comparing against
75c525d7
GDR
4319 erronous type.
4320
8c6ae51f
GK
43212002-12-13 Geoffrey Keating <geoffk@apple.com>
4322
4323 * cp-tree.h: Have the multiple-include guards around
4324 the entire file.
4325
4977bab6
ZW
43262002-12-10 David Edelsohn <edelsohn@gnu.org>
4327
4328 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4329 for SPEW_DEBUG.
4330 (snarf_method): Same.
4331 (snarf_defarg): Same.
4332
d23faea1
MM
43332002-12-10 Mark Mitchell <mark@codesourcery.com>
4334
4335 PR c++/8372
4336 * pt.c (tsubst_copy): Handle destructor names more correctly.
4337
3932057c 43382002-12-10 Matt Austern <austern@apple.com>
d23faea1 4339
3932057c 4340 * cp-tree.h: get rid of needs_virtual_reinit bit.
43c6a96a 4341
dcba9b0f
MM
43422002-12-09 Mark Mitchell <mark@codesourcery.com>
4343
43c6a96a 4344 * NEWS: Document removal of in-class initialization extension for
dcba9b0f
MM
4345 static data members of non-arithmetic, non-enumeration type.
4346 * decl.c (check_static_variable_definition): Do not allow that
4347 extension.
4348 * decl2.c (grokfield): Do not call digest_init when processing
4349 templates.
4350
42b99e03
KG
43512002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4352
4353 * error.c (dump_expr): Fix format specifier warning.
4354
6c73ad72
GK
43552002-12-04 Geoffrey Keating <geoffk@apple.com>
4356
4357 * class.c (finish_struct_1): Correct comment.
4358 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
4359
8c048a52
GDR
43602002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4361
4362 PR C++/8799
4363 * error.c (dump_expr): Don't ever try to dump a non-existent
43c6a96a 4364 expression.
8c048a52 4365
4977bab6
ZW
43662002-12-03 Nathan Sidwell <nathan@codesourcery.com>
4367
4368 Implement covariant returns.
4369 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
4370 (struct lang_decl_flags): Add this_thunk_p flag.
4371 Rename vcall_offset to virtual_offset.
4372 (struct lang_decl): Rename delta to fixed_offset.
4373 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
4374 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
4375 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
4376 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
4377 (make_thunk): Add this_adjusting arg.
4378 (finish_thunk): Declare.
4379 (mangle_thunk): Add this_adjusting arg.
4380 * class.c (get_vcall_index): Use base function for lookup.
4381 (update_vtable_entry_for_fn): Generate covariant thunk.
4382 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
4383 (build_vtbl_initializer): Use base function for lookup.
4384 Finish covariant thunk here. Adjust thunk generation.
4385 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
4386 Adjust thunk dumping.
4387 * mangle.c (mangle_call_offset): New function.
4388 (mangle_thunk): Adjust for covariant thunks.
4389 * method.c (make_thunk): Adjust. Do not set name here.
4390 (finish_thunk): New function. Set name here.
4391 (use_thunk): Generate covariant thunks too.
4392 (thunk_adjust): New function.
4393 * search.c (covariant_return_p): Remove. Fold into ...
4394 (check_final_overrider): ... here. Simplify.
4395 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
4396
c203334d
JM
43972002-12-03 Jason Merrill <jason@redhat.com>
4398
c246c65d
JM
4399 PR c++/8674
4400 * call.c (build_over_call): Check specifically for TARGET_EXPR
4401 when eliding.
4402
4403 PR c++/8461, c++/8625
4404 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
4405 (cp_convert_parm_for_inlining): Remove.
43c6a96a 4406 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
c246c65d
JM
4407 Remove.
4408 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
4409 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
4410
c203334d
JM
4411 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
4412 an ambiguous conversion.
4413
ee7ecb29
MM
44142002-12-03 Mark Mitchell <mark@codesourcery.com>
4415
4416 PR c++/8688
4417 * decl.c (reshape_init): Handle erroneous initializers.
4418
5089de93
MM
44192002-12-02 Mark Mitchell <mark@codesourcery.com>
4420
4421 PR c++/8720
4422 * spew.c (remove_last_token): Make sure that last_chunk is set
4423 correctly.
4424
4425 PR c++/8615
4426 * error.c (dump_expr): Handle character constants with
4427 TREE_OVERFLOW set.
43c6a96a 4428
218e0eb6
KL
44292002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4430
4431 DR 180
4432 * decl.c (grokdeclarator): Require class-key for all friend class.
4433 Output the correct type and context in the error message.
4434
a82d6da5
MM
44352002-12-01 Mark Mitchell <mark@codesourcery.com>
4436
94fc547c
MM
4437 PR c++/5919
4438 * pt.c (unify): Use variably_modified_type_p to test validity of
4439 template argument types.
43c6a96a 4440
a82d6da5
MM
4441 PR c++/8727
4442 * cp-tree.h (lang_type_class): Add typeinfo_var.
4443 (CLASSTYPE_TYPEINFO_VAR): New macro.
4444 * rtti.c (get_tinfo_decl): Use it.
4445
4446 PR c++/8663
4447 * init.c (expand_member_init): Always get the main variant of a
4448 base class.
4449
c9f8536c
MM
44502002-12-01 Mark Mitchell <mark@codesourcery.com>
4451
4452 PR c++/8332
4453 PR c++/8493
4454 * decl.c (cxx_init_decl_processing): Use size_type_node, not
4455 c_size_type_node.
4456 * decl2.c (coerce_new_type): Likewise.
4457 * except.c (do_allocate_exception): Likewise.
4458
4977bab6
ZW
44592002-11-30 Zack Weinberg <zack@codesourcery.com>
4460
4461 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
4462 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
4463 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
4464 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4465 typeck2.c: Include coretypes.h and tm.h.
4466 * Make-lang.in: Update dependencies.
4467
c17707f1
MM
44682002-11-30 Mark Mitchell <mark@codesourcery.com>
4469
328de7c2
MM
4470 PR c++/8227
4471 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
4472 (check_initializer): Validate the type of the initialized
4473 variable, even if the initializer is absent.
4474 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
43c6a96a 4475
c17707f1
MM
4476 PR c++/8214
4477 * typeck.c (convert_for_assignment): Do not use
4478 decl_constant_value on the operand.
4479
65f8b0fb
MM
4480 PR c++/8511
4481 * pt.c (instantiate_decl): Handle template friends defined outside
4482 of the class correctly.
4483
f6a83eb0
JB
44842002-11-29 Joe Buck <jbuck@synopsys.com>
4485
4486 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
4487 anonymous structs.
43c6a96a 4488
ff944b49
MM
44892002-11-29 Mark Mitchell <mark@codesourcery.com>
4490
4491 * class.c (walk_subobject_offsets): Recur on binfos as well as on
4492 types.
4493 (layout_nonempty_base_or_field): Pass it a binfo when processing a
4494 base class.
4495 (layout_empty_base): Likewise.
4496 (build_base_field): Likewise.
43c6a96a 4497
21b3d0ba
MM
44982002-11-27 Mark Mitchell <mark@codesourcery.com>
4499
4500 * class.c (build_base_field): Make sure we get the canonical base
4501 when descending through primary bases.
4502
a16f2357
GK
45032002-11-26 Geoffrey Keating <geoffk@apple.com>
4504
4505 * decl.c (check_initializer): Don't error on initialisation of
4506 a scalar with a brace-enclosed expression.
4507
688f6688
NS
45082002-11-26 Nathan Sidwell <nathan@codesourcery.com>
4509
4510 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
4511 (template_parms_equal): Remove prototype.
4512 * typeck.c (buuld_indirect_ref): Reformat.
4513
4977bab6
ZW
45142002-11-25 Jason Merrill <jason@redhat.com>
4515
4516 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
4517 and a DO_STMT.
4518
b82ddab4
MM
45192002-11-25 Mark Mitchell <mark@codesourcery.com>
4520
2003cd37
MM
4521 * tree.c (cp_build_qualified_type_real): Correct handling of
4522 array types.
4523 * class.c (walk_subobject_offsets): Fix thinko.
4524 (build_base_field): Record offsets of empty bases in primary
4525 virtual bases.
4526 (layout_class_type): Record offsets of empty bases in fields.
43c6a96a 4527
b82ddab4
MM
4528 * search.c (is_subobject_of_p_1): Fix thinko.
4529 (lookup_field_queue_p): Likewise.
4530
8a874cb4
MM
45312002-11-24 Mark Mitchell <mark@codesourcery.com>
4532
4533 * class.c (layout_class_type): Reuse tail padding when laying out
4534 virtual bases.
4535
05abed76
MM
45362002-11-22 Mark Mitchell <mark@codesourcery.com>
4537
4538 * rtti.c (qualifier_flags): Fix thinko.
4539
4977bab6
ZW
45402002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4541
4542 Remove traditional C constructs 1/n.
4543 * cp-tree.h (init_method, set_mangled_name_for_decl,
4544 build_opfncall, hack_identifier, make_thunk, use_thunk,
4545 synthesize_method, implicitly_declare_fn,
4546 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
4547 maybe_clone_body): Remove use of PARAMS.
4548
4549 * method.c (do_build_assign_ref, do_build_copy_constructor,
4550 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
4551 Likewise.
4552 (synthesize_method): Use 'bool' type and constants instead of
4553 'int'.
4554 (locate_copy): Likewise.
4555 (implicitly_declare_fn): Likewise.
4556
4557 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
4558 Remove old-style declaration.
4559 (maybe_clone_body): Use 'bool' type and constants.
4560
1c83ea9f
GN
45612002-11-21 Glen Nakamura <glen@imodulo.com>
4562
4563 PR c++/8342
4564 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
4565 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
4566 of the branches of a COND_EXPR.
4567
ad2ae3b2
MM
45682002-11-19 Mark Mitchell <mark@codesourcery.com>
4569
4570 * pt.c (for_each_template_parm): Free allocated memory.
4571 * search.c (is_subobject_of_p_1): New function.
4572 (is_subobject_of_p): Avoid walking virtual bases multiple times.
4573
f3226a90
JT
45742002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
4575
4576 * g++spec.c (lang_specific_spec_functions): New.
4577
90024bdc
KH
45782002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4579
4580 * ChangeLog: Follow spelling conventions.
4581 * class.c: Likewise.
4582 * decl2.c: Likewise.
4583
fa7b533b
ZW
45842002-11-14 Zack Weinberg <zack@codesourcery.com>
4585
4586 * search.c (dfs_push_decls): Do not try to reorder elements
4587 3..n of method_vec if method_vec has only two elements.
4588 Reverse order of two tests to avoid accessing unallocated
4589 memory.
4590
95675950
MM
45912002-11-14 Mark Mitchell <mark@codesourcery.com>
4592
4593 * class.c (dfs_find_final_overrider): Adjust so that the most
4594 derived object is a binfo, rather than a class type.
4595 (find_final_overrider): Likewise.
4596 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
4597 (add_vcall_offset): Likewise.
4598
5c74d5b0
KL
45992002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4600
4601 PR c++/8389
4602 * pt.c (instantiate_template): Push class scope for member
4603 functions.
4604 (get_mostly_instantiated_function_type): Likewise. Don't call
4605 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
4606 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
4607 * mangle.c (write_encoding, write_unqualified_name): Adjust.
4608
4f2c9d7e
MM
46092002-11-07 Mark Mitchell <mark@codesourcery.com>
4610
e6a66567
MM
4611 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
4612 vcall offfsets. Split out ...
4613 (add_vcall_offset): ... new function.
4614
4f2c9d7e
MM
4615 PR c++/8338
4616 * pt.c (for_each_template_parm): Add htab parameter.
4617 (process_partial_specialization): Adjust call.
4618 (push_template_decl_real): Likewise.
4619 (pair_fn_data): Add visited.
4620 (for_each_template_parm_r): Avoid walking duplicates more than
4621 once.
4622 (uses_template_parms): Adjust call to for_each_template_parm.
4623
f72ab53b
MM
46242002-11-07 Mark Mitchell <mark@codesourcery.com>
4625
4626 * class.c (add_implicitly_declared_members): Put implicitly
4627 declared functions at the end of TYPE_METHODs when -fabi-version
4628 is at least 2.
4629
0a288b9a
GK
46302002-11-05 Geoffrey Keating <geoffk@apple.com>
4631
4632 * decl2.c (finish_file): Correct spelling.
4633
548502d3
MM
46342002-11-03 Mark Mitchell <mark@codesourcery.com>
4635
4636 * call.c (build_special_member_call): Do not try to lookup VTTs by
4637 name.
4638 * class.c (vtbl_init_data): Add generate_vcall_entries.
4639 (get_vtable_decl): Do not look up virtual tables by name.
4640 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
4641 (set_primary_base): Do not set CLASSTYPE_RTTI.
4642 (determine_primary_base): Likewise.
4643 (get_matching_virtual): Remove.
4644 (get_vcall_index): New function.
4645 (update_vtable_entry_for_fn): Do not try to use virtual thunks
4646 when they are not required. Assign vcall indices at this point.
4647 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
4648 Do update dynamic_classes.
4649 (build_vtt): Do not add VTTs to the symbol table.
4650 (build_ctor_vtbl_group): Likewise.
4651 (build_vtbl_initializer): Simplify handling of vcall indices.
4652 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
4653 for the most derived class.
4654 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
4655 the vtable.
4656 * cp-tree.h (dynamic_classes): New macro.
4657 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
4658 (CLASSTYPE_RTTI): Remove.
4659 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
4660 (CLASSTYPE_VCALL_INDICES): New macro.
4661 (CLASSTYPE_VTABLES): Likewise.
4662 (BV_USE_VCALL_INDEX_P): Remove.
4663 (build_vtable_path): Remove.
4664 * decl2.c (finish_vtable_vardecl): Remove.
4665 (key_method): Remove #if 0'd code.
4666 (finish_vtable_vardecl): Rename to ...
4667 (maybe_emit_vtables): ... this.
4668 (finish_file): Use it.
4669 * search.c (look_for_overrides_here): Update comment.
4670
04d57dd5
ZW
46712002-11-01 Zack Weinberg <zack@codesourcery.com>
4672
4673 PR c/7353 redux
4674 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
4675
bab076f7
JM
46762002-10-30 Jason Merrill <jason@redhat.com>
4677
4678 PR c++/8186
4679 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
4680 * call.c (convert_for_arg_passing): Set it.
4681 * except.c (stabilize_throw_expr): Recurse for such an arg.
4682
14b4829d
MM
46832002-10-31 Mark Mitchell <mark@codesourcery.com>
4684
4685 * cp-tree.h (lang_decl_flags): Remove init_priority.
4686 (lang_decl): Add delta.
4687 (GLOBAL_INIT_PRIORITY): Remove.
4688 (THUNK_DELTA): Revise definition.
4689 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
4690 * dump.c (cp_dump_tree): Don't dump it.
4691
8c081e84
MM
46922002-10-30 Mark Mitchell <mark@codesourcery.com>
4693
4694 PR c++/8160
4695 * typeck2.c (process_init_constructor): Call complete_array_type.
4696
4697 PR c++/8149
4698 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 4699
7088fca9
KL
47002002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4701
4702 Core issue 287, PR c++/7639
4703 * cp-tree.h (lang_type_class): Add decl_list field.
4704 (CLASSTYPE_DECL_LIST): New macro.
4705 (maybe_add_class_template_decl_list): Add declaration.
4706 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
4707 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
4708 (maybe_add_class_template_decl_list): New function.
4709 (add_implicitly_declared_members): Use it.
4710 * decl.c (maybe_process_template_type_declaration): Likewise.
4711 (pushtag): Likewise.
4712 * friend.c (add_friend): Likewise.
4713 (make_friend_class): Likewise.
4714 * semantics.c (finish_member_declaration): Likewise.
4715 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
4716 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
4717 to process members and friends in the order of declaration.
4718
5633b37c
MM
47192002-10-29 Mark Mitchell <mark@codesourcery.com>
4720
4721 PR c++/8287
4722 * decl.c (finish_destructor_body): Create the label to jump to
4723 when returning from a destructor here.
4724 (finish_function_body): Rather than here.
4725
f65e1183
ZW
47262002-10-25 Zack Weinberg <zack@codesourcery.com>
4727
4728 PR c++/7266
4729 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
4730 SCOPE_REF is not null before dereferencing it.
4731
bb5e8a7f
MM
47322002-10-25 Mark Mitchell <mark@codesourcery.com>
4733
e93ee644
MM
4734 * call.c (build_over_call): Use DECL_CONTEXT, not
4735 DECL_VIRTUAL_CONTEXT.
4736 * class.c (modify_vtable_entry): Don't mess with
4737 DECL_VIRTUAL_CONTEXT.
4738 (set_vindex): Remove.
4739 (set_primary_base): Remove vfuns_p parameter.
4740 (determine_primary_base): Likewise.
4741 (modify_all_vtables): Likewise.
4742 (layout_class_type): Likewise. Adjust calls to other functions
4743 accordingly.
4744 (finish_struct_1): Adjust calls to modified functions. Set
4745 DECL_VINDEX here.
4746 * cp-tree.h (lang_type_class): Remove vsize.
4747 (CLASSTYPE_VSIZE): Remove.
4748 (lang_decl): Remove thunks.
4749 (DECL_THUNKS): Adjust.
4750 (DECL_VIRTUAL_CONTEXT): Remove.
4751 (duplicate_decls): Don't copy it.
4752 * pt.c (build_template_decl): Don't set it.
4753 (tsubst_decl): Likewise.
4754 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 4755
bb5e8a7f
MM
4756 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
4757 (build_vtable_entry): Remove.
4758 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
4759 (lang_decl): Add thunks.
4760 (DECL_THUNKS): New macro.
4761 * decl.c (duplicate_decls): Copy it.
4762 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
4763 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 4764
6eb35968
DE
47652002-10-24 David Edelsohn <edelsohn@gnu.org>
4766
4767 PR c++/7228
4768 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
4769 lang_type structure exists before accessing field.
4770 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
4771 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
4772 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
4773 * class.c (check_field_decls): Use new macros.
4774 * typeck2.c (process_init_constructor): Remove redundant check for
4775 existence of lang_type structure.
4776
0cee073d
MM
47772002-10-24 Mark Mitchell <mark@codesourcery.com>
4778
ba9a991f
MM
4779 * class.c (end_of_base): New method.
4780 (end_of_class): Use it. Check indirect virtual bases.
4781
0cee073d
MM
4782 * class.c (check_field_decls): Fix typo.
4783
e6f052b7
MM
47842002-10-23 Mark Mitchell <mark@codesourcery.com>
4785
6b607ffd
MM
4786 PR c++/8067
4787 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
4788 related variables.
4789
e6f052b7
MM
4790 PR c++/7679
4791 * spew.c (next_token): Do not return an endless stream of
4792 END_OF_SAVED_INPUT tokens.
4793 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
4794 the cached token stream.
4795 (snarf_defarg): Likewise.
4796
8bcefb43
ZW
47972002-10-23 Zack Weinberg <zack@codesourcery.com>
4798
4799 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
4800 variably_modified_type_p.
4801 * cp-tree.h: Remove prototype of variably_modified_type_p.
4802 * tree.c (variably_modified_type_p): Remove; now implemented
4803 in language-independent code.
4804
ad4f9910
MM
48052002-10-22 Mark Mitchell <mark@codesourcery.com>
4806
4807 PR c++/6579
4808 * spew.c (snarf_parenthesized_expression): New function.
4809 (snarf_block): Use it.
4810
3961e8fe
RH
48112002-10-22 Richard Henderson <rth@redhat.com>
4812
4813 * method.c (use_thunk): Always compute vcall_value; assert that
4814 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
4815 for vcall thunks as well.
4816
5ec1192e
MM
48172002-10-21 Mark Mitchell <mark@codesourcery.com>
4818
7ba539c6
MM
4819 * class.c (empty_base_at_nonzero_offset_p): New function.
4820 (layout_nonempty_base_or_field): Do not check for conflicts when
4821 laying out a virtual base using the GCC 3.2 ABI.
4822 (build_base_field): Correct checking for presence of empty classes
90024bdc 4823 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 4824
e3ccdd50
MM
4825 * class.c (include_empty_classes): Use normalize_rli.
4826 (layout_class_type): Likewise.
4827
42328048
MM
4828 * decl.c (reshape_init): Tweak handling of character arrays.
4829
5ec1192e
MM
4830 PR c++/8218
4831 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
4832 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
4833 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
4834 (check_field_decls): Likewise.
4835 (layout_class_type): Likewise.
4836 (finish_struct_1): Initialize it.
4837 (walk_subobject_offsets): Use it to prune searches.
4838
eb0424da
MM
48392002-10-20 Mark Mitchell <mark@codesourcery.com>
4840
4841 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
4842 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
4843 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 4844
4a7510cb
ZW
48452002-10-18 Zack Weinberg <zack@codesourcery.com>
4846
4847 * decl.c (start_decl): Point users of the old initialized-
4848 typedef extension at __typeof__.
4849
483ab821
MM
48502002-10-18 Mark Mitchell <mark@codesourcery.com>
4851
4852 * Make-lang.in (method.o): Depend on TARGET_H.
4853 * method.c (target.h): Include it.
4854 (use_thunk): Use target hooks. Use vcall thunks, if available.
4855
e4f4feba
MM
48562002-10-18 Mark Mitchell <mark@codesourcery.com>
4857
4858 * class.c (base_derived_from): Make sure return value is a bool.
4859
9368208b
MM
48602002-10-18 Mark Mitchell <mark@codesourcery.com>
4861
4862 * class.c (find_final_overrider_data_s): Remove overriding_fn and
4863 overriding_base.
4864 (dfs_base_derived_from): New function.
4865 (base_derived_from): Likewise.
4866 (dfs_find_final_overrider): Use base_derived_from.
4867 (find_final_overrider): Adjust.
4868
5275f2bf
JM
48692002-10-18 Jason Merrill <jason@redhat.com>
4870
4871 PR c++/8080
4872 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
4873 with condition decls in a template.
4874
8a188e24
NS
48752002-10-17 Nathan Sidwell <nathan@codesourcery.com>
4876
4877 * class.c (add_method): Compare template parms too.
4878
b216f69b
MM
48792002-10-17 Mark Mitchell <mark@codesourcery.com>
4880
982216be
MM
4881 PR c++/7584
4882 * class.c (handle_using_decl): Allow the declaration used to be
4883 from an ambiguous base.
4884
d768a589
MM
4885 * pt.c (convert_template_argument): Revert this change:
4886 2002-10-16 Mark Mitchell <mark@codesourcery.com>
4887 * pt.c (convert_template_argument): Do not fold non-type
4888 template rguments when inside a template.
4889
b216f69b
MM
4890 * init.c (expand_default_init): Handle brace-enclosed initializers
4891 correctly.
4892
2303a079
MM
48932002-10-16 Mark Mitchell <mark@codesourcery.com>
4894
d3133e68
MM
4895 * mangle.c (write_expression): Correct handling of enumeration
4896 constants.
4897 (write_template_arg): Likewise.
4898 * pt.c (convert_template_argument): Do not fold non-type template
4899 arguments when inside a template.
4900
2303a079
MM
4901 PR c++/7478
4902 * cvt.c (convert_to_reference): Allow references as the incoming
4903 type.
4904
451c0899
MM
49052002-10-16 Mark Mitchell <mark@codesourcery.com>
4906
4907 PR c++/7524
4908 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
4909 build_qualified_type.
4910
da6eec72
RH
49112002-10-15 Richard Henderson <rth@redhat.com>
4912
4913 * error.c (dump_expr): Use real_to_decimal directly, and with
4914 the new arguments.
4915
3fa3c4bd
MM
49162002-10-15 Mark Mitchell <mark@codesourcery.com>
4917
4918 * decl.c (reshape_init): Fix typo.
4919
4920 * cp-tree.h (operator_name_info_t): Add arity.
4921 * lex.c (init_operators): Initialize it.
4922 * mangle.c (write_conversion_operator_name): New function.
4923 (write_unqualified_name): Use it.
4924 (write_template_args): Accept template arguments as a TREE_LIST.
4925 (write_expression): Adjust handling of qualified names to match
4926 specification.
4927
1a55127d
JM
49282002-10-15 Jason Merrill <jason@redhat.com>
4929
4930 * call.c (call_builtin_trap): New fn.
4931 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
4932 (build_call): Don't set current_function_returns_abnormally outside
4933 a function.
4934
58731fd1
MM
49352002-10-14 Mark Mitchell <mark@codesourcery.com>
4936
4937 * class.c (check_field_decls): Remove empty_p parameter. Instead,
4938 clear CLASSTYPE_EMPTY_P.
4939 (build_base_field): Likewise.
4940 (build_base_fields): Likewise.
4941 (check_bases_and_members): Likewise.
4942 (create_vtbl_ptr): Likewise.
4943 (layout_class_type): Likewise. Ensure that empty classes have
4944 size zero when used as base classes in the 3.2 ABI.
4945 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4946 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
4947 parameter.
4948 (is_empty_class): Correct definition when using post-3.2 ABI.
4949 * cp-tree.h (lang_type_class): Add empty_p.
4950 (CLASSTYPE_EMPTY_P): New macro.
4951
6742d92b
NS
49522002-10-12 Nathan Sidwell <nathan@codesourcery.com>
4953
4954 * init.c (build_delete): Do not apply save_expr for arrays.
4955 (build_vec_delete): Likewise.
4956
77631fa7
MM
49572002-10-14 Mark Mitchell <mark@codesourcery.com>
4958
4a7510cb 4959 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
4960 whose type is an array with unspecified bounds.
4961
77631fa7
MM
4962 PR c++/7176
4963 * lex.c (do_identifier): Add another option for the parsing
4964 parameter.
4965 * parse.y (do_id): Use it.
4966
2ee366b5
GDR
49672002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
4968
4969 PRs C++/6803, C++/7721 and C++/7803
4970 * decl.c (grokdeclarator): Gracefully handle template-name as
4971 decl-specifier.
4972
01c3fb15
JM
49732002-10-11 Jason Molenda <jmolenda@apple.com>
4974
4975 * init.c (build_field_list): Provide uses_unions_p with a default
4976 value.
4977
8e3df2de
MM
49782002-10-11 Mark Mitchell <mark@codesourcery.com>
4979
dac45b5c
MM
4980 PR c++/5661
4981 * cp-tree.h (variably_modified_type_p): New function.
4982 (grokdeclarator) Tighten check for variably modified types as
4983 fields.
4984 * pt.c (convert_template_argument): Do not allow variably modified
4985 types as template arguments.
4a7510cb 4986 * tree.c (variably_modified_type_p): New function.
dac45b5c 4987
8e3df2de
MM
4988 * NEWS: Document removal of "new X = ..." extension.
4989 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4990 brace-enclosed initializers.
4991 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4992 (initialize_local_var): Remove declaration.
4993 (expand_static_init): Likewise.
4994 * decl.c (next_initializable_field): New function.
4995 (reshape_init): Likewise.
4996 (check_initializer): Use them. Build dynamic initializer for
4997 aggregates here too.
4998 (initialize_local_var): Simplify, and incorporate cleanup
4999 insertion code as well.
5000 (destroy_local_var): Remove.
5001 (cp_finish_decl): Tidy.
5002 (expand_static_init): Fold checks for whether or not a variable
5003 needs initialization into this function. Simplify.
5004 * decl2.c (do_static_initialization): Simplify.
5005 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5006 be done for us automatically.
5007 (expand_default_init): Handle brace-enclosed initializers
5008 correctly.
5009 (expand_aggr_init_1): Remove RTL-generation code.
5010 (build_vec_init): Remove "new X = ..." support.
5011 * parse.y (new_initializer): Likewise.
5012 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5013 brace-enclosed initializer.
5014 (create_pseudo_type_info): Likewise.
5015 * typeck2.c (store_init_value): Don't try to handle digest_init
5016 being called more than once.
5017 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 5018
7bdfd72e
KG
50192002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5020
5021 * decl.c (typename_hash): Use htab_hash_pointer.
5022
e89fe41c
JW
50232002-10-10 Jim Wilson <wilson@redhat.com>
5024
5025 * decl.c (duplicate_decls): Don't call decl_attributes.
5026
95f79357
ZW
50272002-10-09 Zack Weinberg <zack@codesourcery.com>
5028
85cd7be8 5029 PR c/7353
95f79357
ZW
5030 * decl.c (start_decl): Unconditionally issue error for
5031 'typedef foo = bar'.
5032 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5033 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5034
10a38dba
KG
50352002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5036
5037 * decl2.c (prune_vtable_vardecl): Delete unused function.
5038
edebf865
MM
50392002-10-03 Mark Mitchell <mark@codesourcery.com>
5040
5041 PR c++/7754
5042 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5043 procesing template functions.
5044 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5045 type. Call layout_decl.
5046 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5047
01f4137f
RH
50482002-10-07 Richard Henderson <rth@redhat.com>
5049
5050 * decl2.c, pt.c: Revert c++/7754 fix.
5051
eb55ce4b
KL
50522002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5053
5054 PR c++/7804
5055 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5056
bd9bb3d2
MM
50572002-10-03 Mark Mitchell <mark@codesourcery.com>
5058
43c6a96a 5059 PR c++/7931
bd9bb3d2
MM
5060 * pt.c (for_each_template_parm_r): Handle BASELINKs.
5061
5062 PR c++/7754
5063 * decl2.c (finish_anon_union): Do not expand anonymous unions when
5064 procesing template functions.
5065 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5066 type. Call layout_decl.
5067 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5068
6397d80b
MM
50692002-10-03 Mark Mitchell <mark@codesourcery.com>
5070
5071 PR c++/8006
5072 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5073 template parameters.
5074 (globals): Add entity and need_abi_warning.
5075 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5076 CLASSTYPE_TEMPLATE_INFO.
5077 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5078 TYPE_TI_TEMPLATE.
5079 (write_prefix): Handle typename types correctly.
5080 (write_template_prefix): Handle template template parameters
5081 correctly.
5082 (start_mangling): Add entity parameter.
5083 (finish_mangling): Warn about names whose mangling will change.
5084 (mangle_decl_string): Adjust.
5085 (mangle_type_string): Likewise.
5086 (mangle_special_for_type): Likewise.
5087 (mangle_ctor_vtbl_for_type): Likewise.
5088 (mangle_thunk): Likewise.
5089 (mangle_guard_variable): Likewise.
5090 (mangle_ref_init_variable): Likewise.
5091
2282d28d
MM
50922002-10-02 Mark Mitchell <mark@codesourcery.com>
5093
5094 PR c++/7188.
5095 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5096 * cp-tree.h (emit_base_init): Rename to ....
5097 (emit_mem_initializers): ... this.
5098 (expand_member_init): Change prototype.
5099 * init.c (perform_member_init): Compute explicit, rather than
5100 requiring it as a parameter.
5101 (sort_member_init): Rename to ...
5102 (sort_mem_initializers): ... this. Process bases and data members
5103 together.
5104 (sort_base_init): Remove.
5105 (emit_base_init): Rename to ...
5106 (emit_mem_initializers): ... this.
5107 (expand_aggr_vbase_init_1): Remove.
5108 (construct_virtual_bases): Rename to ...
5109 (construct_virtual_base): ... this.
5110 (expand_member_init): Rework handling of base initializers.
5111 * method.c (do_build_copy_constructor): Use
5112 finish_mem_initializers.
5113 * parse.y (member_init): Adjust calls to expand_member_init.
5114 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5115 (tsubst_initializer_list): Use expand_member_init.
5116 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
5117
51182002-10-02 Matt Austern <austern@apple.com>
5119 * decl.c (walk_vtables_r): Fixed typo that caused result to
5120 never get a nonzero value.
95f79357 5121
f963b5d9
RS
51222002-10-02 Roger Sayle <roger@eyesopen.com>
5123
5124 PR optimization/6627
5125 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5126 from here, and move it to tree.h.
5127 * decl.c (cxx_init_decl_processing): If storing the vbit
5128 in function pointers, ensure that force_align_functions_log
5129 is atleast one.
5130
69788039
MA
51312002-10-02 Matt Austern <austern@apple.com>
5132
5133 * class.c (check_field_decls): Changed warning about const member
5134 variables so that it doesn't get issued for a class aggregate.
95f79357 5135
d881ff25
MM
51362002-10-01 Mark Mitchell <mark@codesourcery.com>
5137
5138 * decl.c (cp_finish_decl): Make sure array types are laid out,
5139 even if the array bounds are unknown.
5140
2e88ae22
SE
51412002-10-01 Steve Ellcey <sje@cup.hp.com>
5142
d881ff25 5143 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
5144 to build1.
5145
b4c20e52
MM
51462002-10-01 Mark Mitchell <mark@codesourcery.com>
5147
d881ff25
MM
5148 * decl.c (cp_finish_decl): Make sure array types are laid out,
5149 even if the array bounds are unknown.
5150
b4c20e52
MM
5151 * decl.c (cp_finish_decl): Correct check for dynamic
5152 initialization of thread-local storage.
5153
5a9a1961
NS
51542002-09-30 Nathan Sidwell <nathan@codesourcery.com>
5155
5156 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5157 overloaded.
5158
7befdb9f
SE
51592002-09-30 Steve Ellcey <sje@cup.hp.com>
5160
5161 * class.c (build_vtbl_initializer): Add cast.
5162 (add_vcall_offset_vtbl_entries_1):
5163 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5164
17bbb839
MM
51652002-09-30 Mark Mitchell <mark@codesourcery.com>
5166
5167 * class.c (walk_subobject_offsets): Correct the calculation of
5168 offsets for virtual bases. Correct the counting of array
5169 elements.
5170 (layout_nonempty_base_or_field): Simplify. Correct the
5171 calculation of offsets to be propagated through the binfo
5172 hierarchy.
5173 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5174 Add the FIELD_DECL to TYPE_FIELDS.
5175 (build_base_fields): Adjust accordingly.
5176 (layout_virtual_bases): Use build_base_field.
5177 (end_of_class): Return a tree, not an integer.
5178 (warn_about_ambiguous_direct_bases): Rename to ...
5179 (warn_about_ambiguous_bases): ... this.
5180 (include_empty_classes): New function.
5181 (layout_class_type): Create an alternative version of the type to
5182 be used when as a base class type. Do not call
5183 finish_record_layout until we are done laying out the class.
5184 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
5185 as_base.
5186 (CLASSTYPE_SIZE): Reimplement.
5187 (CLASSTYPE_SIZE_UNIT): Likewise.
5188 (CLASSTYPE_ALIGN): Likweise.
5189 (CLASSTYPE_USER_ALIGN): Likewise.
5190 (CLASSTYPE_AS_BASE): New macro.
5191 (DECL_INITIALIZED_P): Likewise.
5192 (extract_init): Remove prototype.
5193 (build_forced_zero_init): Rename to ...
5194 (build_zero_init): ... this.
5195 (force_store_init_value): Remove.
5196 * decl.c (obscure_complex_init): Remove.
5197 (duplicate_decls): Copy DECL_INITIALIZED_P.
5198 (check_initializer): Do not leave junk in DECL_INITIAL.
5199 (cp_finish_decl): Handle zero-initialization of entities with
5200 static storage duration.
5201 * expr.c (extract_init): Remove.
5202 * init.c (build_forced_zero_init): Remove.
5203 (build_zero_init): New function.
5204 (build_default_init): Use it.
5205 (build_field_list): Skip FIELD_DECLs for base subobjects.
5206 (push_base_cleanups): Likewise.
5207 * method.c (do_build_assign_ref): Likewise.
5208 (synthesize_exception_spec): Likewise.
5209 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5210 (regenerate_decl_from_template): To not set DECL_INITIAL for a
5211 static data member whose initialization took place in its class.
5212 (instantiate_decl): Do not pass an initializer to cp_finish_decl
5213 in that situation.
5214 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5215 (dfs_unuse_fields): Likewise.
5216 * tree.c (pod_type_p): Handle error_mark_node.
5217 (zero_init_p): Likewise.
95f79357 5218 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
5219 subobjects.
5220 * typeck2.c (store_init_value): Remove #if 0'd code.
5221 (force_store_init_value): Remove.
5222 (process_init_constructor): Use build_zero_init.
95f79357 5223
03357c23
NS
52242002-09-29 Nathan Sidwell <nathan@codesourcery.com>
5225
5226 PR c++/7788
5227 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5228
27631dae
KH
52292002-09-29 Kazu Hirata <kazu@cs.umass.edu>
5230
5231 * cp-tree.h: Fix comment typos.
5232 * decl.c: Likewise.
5233 * pt.c: Likewise.
5234
956d9305
MM
52352002-09-25 Mark Mitchell <mark@codesourcery.com>
5236
5237 * cp/class.c (contains_empty_class_p): New method.
5238 (walk_subobject_offsets): Correct computation of field offset.
5239 (layout_empty_base): Correct placement of emtpy base classes.
5240 (layout_class_type): Warn about ABI changes.
5241
2d3e278d
MM
52422002-09-23 Mark Mitchell <mark@codesourcery.com>
5243
5244 * cp/class.c (layout_virtual_bases): Do not round the size of the
5245 type to a multiple of the alignment before laying out virtual bases.
5246 (layout_class_type): Correct handling of bit-fields that are wider
5247 than their type inside unions. Round the size of the type to a
5248 even number of bytes when computing the size without virtual
5249 bases.
5250 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 5251
838dfd8a
KH
52522002-09-21 Kazu Hirata <kazu@cs.umass.edu>
5253
5254 * ChangeLog: Follow spelling conventions.
5255 * ChangeLog.2: Likewise.
5256 * call.c: Likewise.
5257 * class.c: Likewise.
5258 * cp-tree.h: Likewise.
5259 * cvt.c: Likewise.
5260 * decl.c: Likewise.
5261 * decl2.c: Likewise.
5262 * except.c: Likewise.
5263 * friend.c: Likewise.
5264 * g++spec.c: Likewise.
5265 * init.c: Likewise.
5266 * lex.c: Likewise.
5267 * mangle.c: Likewise.
5268 * method.c: Likewise.
5269 * operators.def: Likewise.
5270 * optimize.c: Likewise.
5271 * pt.c: Likewise.
5272 * rtti.c: Likewise.
5273 * search.c: Likewise.
5274 * semantics.c: Likewise.
5275 * spew.c: Likewise.
5276 * tree.c: Likewise.
5277 * typeck.c: Likewise.
5278
9ced0328
DP
52792002-09-18 Devang Patel <dpatel@apple.com>
5280
5281 * cp/cp-tree.h: New prototype for walk_vtabls().
5282 * cp/decl.c (walk_vtables_r): New function.
5283 (struct cp_binding_level): Add new members, namespaces,
5284 names_size and vtables.
5285 (add_decl_to_level): Add decl in namespaces or vtables
5286 chain, if conditions match.
5287 (walk_vtables): New function.
5288 (walk_namespaces_r): Travers separate namespace chain
5289 for namespace decls.
5290 (wrapup_globals_for_namespace): Use names_size instead
5291 of list_length().
5292 * cp/decl2.c (finish_file): Use walk_vtables() instead of
5293 walk_globals() to walk vtable decls.
5294
dd29188b
NS
52952002-09-18 Nathan Sidwell <nathan@codesourcery.com>
5296
5297 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5298 ICE with invalid pointers & references.
5299
f989ed67
ZW
53002002-09-17 Zack Weinberg <zack@codesourcery.com>
5301
5302 * Make-lang.in: Remove all references to the demangler.
5303 * cxxfilt.c: Moved to binutils.
5304
171d2f50
NS
53052002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5306
3ec83083
NS
5307 PR c++/7718
5308 * pt.c (tsubst_decl): Remove assert.
5309
171d2f50
NS
5310 Remove DR 295 implementation.
5311 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5312 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5313 about ignoring volatile qualifiers.
5314
5315 * search.c (lookup_member): Correct documentation.
5316
36a5eadd
GK
53172002-09-16 Geoffrey Keating <geoffk@apple.com>
5318
5319 * cp-tree.h (union lang_tree_node): Add chain_next option.
5320
28c56d25
NS
53212002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5322
7979434d
NS
5323 * parse.y (parse_finish_call_expr): Check lookup_member result.
5324
28c56d25
NS
5325 PR c++/7015
5326 * semantic.c (finish_asm_stmt): Fix operand/output_operands
5327 thinko.
5328 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5329
3baab484
NS
53302002-09-15 Nathan Sidwell <nathan@codesourcery.com>
5331
5332 PR c++/7919
5333 * call.c (build_over_call): Convert this pointer for fns found by
5334 using decls.
5335
d30d6e7a
KH
53362002-09-15 Kazu Hirata <kazu@cs.umass.edu>
5337
5338 * ChangeLog: Follow spelling conventions.
5339 * ChangeLog.1: Likewise.
5340
c8460010
NS
53412002-09-14 Nathan Sidwell <nathan@codesourcery.com>
5342
5343 PR c++/7768
5344 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5345
c6002625
KH
53462002-09-14 Kazu Hirata <kazu@cs.umass.edu>
5347
5348 * error.c: Fix comment formatting.
5349 * except.c: Likewise.
5350 * expr.c: Likewise.
5351 * friend.c: Likewise.
5352 * g++spec.c: Likewise.
5353 * init.c: Likewise.
5354 * lex.c: Likewise.
5355 * mangle.c: Likewise.
5356 * method.c: Likewise.
5357 * optimize.c: Likewise.
5358 * pt.c: Likewise.
5359 * rtti.c: Likewise.
5360 * search.c: Likewise.
5361 * semantics.c: Likewise.
5362 * spew.c: Likewise.
5363 * tree.c: Likewise.
5364 * typeck.c: Likewise.
5365 * typeck2.c: Likewise.
5366
46dd3884
GDR
53672002-09-13 Matt Austern <austern@apple.com>
5368
4a7510cb 5369 PR C++/7828
46dd3884
GDR
5370 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
5371 * cp/call.c: Change call-by-const-reference mechanism to use
5372 non_cast_lvalue_p when deciding whether the create a temporary.
5373 We need a temporary when passing, e.g. (long) x by const ref.
5374
712467a4
NS
53752002-09-13 Nathan Sidwell <nathan@codesourcery.com>
5376
5377 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
5378
a1c65f9f
KH
53792002-09-13 Kazu Hirata <kazu@cs.umass.edu>
5380
5381 * decl.c: Fix comment formatting.
5382 * decl2.c: Likewise.
5383
00a17e31
KH
53842002-09-12 Kazu Hirata <kazu@cs.umass.edu>
5385
5386 * call.c: Fix comment formatting.
5387 * class.c: Likewise.
5388 * cp-lang.c: Likewise.
5389 * cp-tree.h: Likewise.
5390 * cvt.c: Likewise.
5391
3fd9d606
ZW
53922002-09-11 Zack Weinberg <zack@codesourcery.com>
5393
5394 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
5395 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
5396 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
5397 minor adjustments (use version_string, eliminate yet another
5398 duplicate of xmalloc)
5399
2515a7ea
KG
54002002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5401
5402 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
5403
5aa3396c
JM
54042002-09-05 Jason Merrill <jason@redhat.com>
5405
5406 * typeck2.c (add_exception_specifier): Only pedwarn for an
5407 incomplete type.
5408 (require_complete_eh_spec_types): New fn.
5409 (cxx_incomplete_type_diagnostic): Also support pedwarning.
5410 * typeck.c (complete_type_or_diagnostic): Likewise.
5411 * call.c (build_call): Call require_complete_eh_spec_types.
5412 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
5413 on an incomplete type.
5414
23ccd1f3
JJ
54152002-09-04 Jakub Jelinek <jakub@redhat.com>
5416
5417 * decl.c (start_cleanup_fn): Clear interface_only before
5418 start_function, restore it afterwards.
5419
4977bab6
ZW
54202002-09-02 Nathan Sidwell <nathan@codesourcery.com>
5421
5422 * cp-tree.h (finish_builtin_type): Remove.
5423 * decl2.c (finish_builtin_type): Move to common code.
5424 * decl.c (build_ptrmemfunc_type): Adjust.
5425 * rtti.c (create_pseudo_type_info): Adjust.
5426 (create_tinfo_types): Adjust.
5427
d99f015c
JM
54282002-08-31 Jason Merrill <jason@redhat.com>
5429
5430 * cp-lang.c (cp_expr_size): Allow initialization from a
5431 CONSTRUCTOR.
5432
8a3c9180
RH
54332002-08-30 Richard Henderson <rth@redhat.com>
5434
c9989d09 5435 PR opt/7515
8a3c9180
RH
5436 * tree.c: Include target.h.
5437 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
5438 don't bind locally.
5439 * Makefile.in (tree.o): Update.
5440
eca7f13c
MM
54412002-08-27 Mark Mitchell <mark@codesourcery.com>
5442
5443 * class.c (layout_virtual_bases): Warn about bugs in G++ that
5444 result in incorrect object layouts.
5445 (layout_class_type): Likewise.
f989ed67 5446
13d3f0b6
MA
54472002-08-24 Matt Austern <austern@apple.com>
5448
5449 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
5450 are allowable.
5451 (real_lvalue_p): Update caller.
5452 (lvalue_p): Ditto.
5453 (non_cast_lvalue_or_else): New.
5454 * tree.h: Declare it.
f989ed67 5455 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 5456
5b770a96
MM
54572002-08-22 Mark Mitchell <mark@codesourcery.com>
5458
5459 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
5460 and COND_EXPR specially; fix error message output.
5461
d65b1d77
JM
54622002-08-22 Jason Merrill <jason@redhat.com>
5463
5464 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
5465 * semantics.c (nullify_returns_r): Likewise.
5466
8a5f4379
GDR
54672002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
5468
5469 Fix PR/7621
5470 * typeck.c (finish_class_member_access_expr): Diagnose cases where
5471 name lookup finds nothing.
5472
5d764395
JM
54732002-08-15 Jason Merrill <jason@redhat.com>
5474
5475 * semantics.c (finish_then_clause): Remove redundant assignment.
5476 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
5477 extra binding level outside the if/switch statement.
5478 (finish_while_cond, finish_for_cond): Rewrite complex condition
5479 into the loop body.
5480
c01b9ec8
AO
54812002-08-15 Alexandre Oliva <aoliva@redhat.com>
5482
5483 * parse.y (sizeof, alignof, typeof): New non-terminals to
5484 increment skip_evaluation. Replace terminals with them and
5485 decrement skip_evaluation at the end of rules using them.
5486 * decl2.c (mark_used): Don't assemble_external if
5487 skipping evaluation.
5488
e8fe46d4
GDR
54892002-08-15 Gabriel Dos Reis <gdr@nerim.net>
5490
5491 Fix PR/7504
5492 * parse.y (parse_finish_call_expr): Handle incomplete
5493 type used to name a scope.
5494
eac5ce6c
NS
54952002-08-15 Nathan Sidwell <nathan@codesourcery.com>
5496
5497 PR c++/7598
5498 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
5499 regression caused by my 2002-08-08 patch.
5500
22eadedb
MM
55012002-08-13 Mark Mitchell <mark@codesourcery.com>
5502
5503 * decl.c (pushdecl_class_level): Honor requests to bind names to
5504 OVERLOADs.
5505
e65e6212
KG
55062002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5507
5508 * decl2.c (build_call_from_tree): Fix uninitialized variable.
5509 * parse.y (parse_finish_call_expr): Likewise.
5510 * repo.c (old_args, old_dir, old_main): Const-ify.
5511
3e72ec9a
GDR
55122002-08-11 Gabriel Dos Reis <gdr@nerim.net>
5513
d78e771d 5514 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
3e72ec9a
GDR
5515 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
5516 * optimize.c (maybe_clone_body): Likewise.
5517 * pt.c (tsubst_enum): Likewise.
5518 (lookup_template_class): Likewise.
5519 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
5520
f749a36b
NB
55212002-08-10 Neil Booth <neil@daikokuya.co.uk>
5522
5523 * lang-specs.h: Remove -ansi.
5524
3ebf5204
NS
55252002-08-10 Nathan Sidwell <nathan@codesourcery.com>
5526
5527 * tree.c (maybe_dummy_object): Replace // with /* */
5528
9e259dd1
MM
55292002-08-09 Mark Mitchell <mark@codesourcery.com>
5530
5531 * call.c (standard_conversion): Use build_ptrmem_type.
5532 * cp-tree.h (build_ptrmem_type): New function.
5533 (adjust_result_of_qualified_name_lookup): Likewise.
5534 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
5535 static data members.
5536 (build_ptrmem_type): New function.
5537 (grokdeclarator): Do not use build_offset_type when encountering a
5538 qualified name.
5539 * parse.y (parse_finish_call_expr): Use
5540 adjust_result_of_qualified_name_lookup.
5541 * search.c (adjust_result_of_qualified_name_lookup): New function.
5542 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
5543 accessing OFFSET_TYPEs directly.
f989ed67 5544
0e339752
MS
55452002-08-08 Mike Stump <mrs@apple.com>
5546
5547 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
5548 (type_decays_to): Likewise.
5549 * class.c (find_final_overrider): Likewise.
5550 (maybe_note_name_used_in_class): Likewise.
5551 * decl.c (current_tmpl_spec_kind): Likewise.
5552 (add_binding): Likewise.
5553 (push_class_binding): Likewise.
5554 (duplicate_decls): Likewise.
5555 (layout_var_decl): Likewise.
5556 (grokfndecl): Likewise.
5557 (grokdeclarator): Likewise.
5558 (check_default_argument): Likewise.
5559 * decl2.c (handle_class_head): Likewise.
5560 * error.c (dump_template_decl): Likewise.
5561 * init.c (build_offset_ref): Likewise.
5562 * pt.c (check_specialization_scope): Likewise.
5563 (determine_specialization): Likewise.
5564 (check_explicit_specialization): Likewise.
5565 (maybe_check_template_type): Likewise.
5566 (process_partial_specialization): Likewise.
5567 (check_default_tmpl_args): Likewise.
5568 (push_template_decl_real): Likewise.
5569 (convert_template_argument): Likewise.
5570 (try_class_unification): Likewise.
5571 (get_bindings_real): Likewise.
5572 (do_decl_instantiation): Likewise.
5573 * semantics.c (begin_function_definition): Likewise.
5574 (finish_member_declaration): Likewise.
5575 (check_multiple_declarators): Likewise.
5576 * typeck.c (comp_array_types): Likewise.
5577 (comptypes): Likewise.
5578 (expr_sizeof): Likewise.
5579 (build_binary_op): Likewise.
5580 (dubious_conversion_warnings): Likewise.
5581 (check_return_expr): Likewise.
b6ce26ac 5582
a6f5b2d3
MM
55832002-08-08 Mark Mitchell <mark@codesourcery.com>
5584
5585 * typeck.c (build_class_member_access_expr): Do not return
5586 error_mark_node when no error has occurred.
b6ce26ac 5587
c93a26f5
NS
55882002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5589
5590 * typeck.c (build_component_addr): Remove.
5591 (build_unary_op): Just check it's not a bitfield, and then build
5592 an ADDR_EXPR.
5593
5bfc90de
NS
55942002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5595
5596 * class.c (convert_to_base): Correct check for error_mark_node.
5597 (create_vtable_ptr): Remove unused VFUNS_P parm.
5598
22aa533e
NS
55992002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5600
5601 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
5602
50ad9642
MM
56032002-08-07 Mark Mitchell <mark@codesourcery.com>
5604
5605 Rework build_component_ref.
5606 * call.c (build_vfield_ref): Do not go through build_component_ref.
5607 (build_field_call): Use build_class_member_access_expr.
5608 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
5609 (build_object_call): Likewise.
5610 * class.c (convert_to_base): New function.
5611 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
5612 (instantiate_type): Handle BASELINKs.
5613 * cp-tree.def (BASELINK): New tree code.
5614 * cp-tree.h (BASELINK_P): Reimplement.
5615 (SET_BASELINK_P): Remove.
5616 (BASELINK_BINFO): Reimplement.
5617 (BASELINK_FUNCTIONS): Likewise.
5618 (BASELINK_ACCESS_BINFO): Likewise.
5619 (BASELINK_OPTYPE): Likewise.
5620 (convert_to_base): New function.
5621 (name_p): Likewise.
5622 (build_object_ref): Remove.
5623 (build_component_ref_1): Likewise.
5624 (build_component_ref): Likewise.
5625 (build_x_component_ref): Likewise.
5626 (build_class_member_access_expr): New function.
5627 (finish_class_member_access_expr): Likewise.
5628 (build_ptrmemfunc_access_expr): Likewise.
5629 * decl.c (grokdeclarator): Handle BASELINKs.
5630 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
5631 finish_class_member_access_expr.
5632 (arg_assoc): Handle BASELINKs.
5633 (do_class_using_decl): Likewise.
5634 * error.c (dump_decl): Likewise.
5635 (dump_expr): Use build_ptrmemfunc_access_expr.
5636 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
5637 destructors.
5638 (build_throw): Use BASELINK_FUNCTIONS.
5639 * init.c (perform_member_init): Use
5640 build_class_member_access_expr.
5641 (build_offset_ref): Handle BASELINKs. Use
5642 build_class_member_access_expr.
5643 * method.c (hack_identifier): Likewise.
5644 * parse.y (do_id): Use BASELINK, not TREE_LIST.
5645 (primary): Remove uses of build_object_ref.
5646 * pt.c (lookup_template_function): Handle BASELINKs.
5647 (resolve_overloaded_unification): Likewise.
5648 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
5649 (lookup_field): Use BASELINK, not TREE_LIST.
5650 (lookup_fnfiels): Likewise.
5651 (setup_class_bindings): Likewise.
5652 * semantics.c (finish_object_call_expr): Do not use
5653 build_method_call when we already know what function is being
5654 called.
5655 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
5656 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
5657 TREE_CHAIN.
5658 (name_p): New function.
5659 * typeck.c (build_object_ref): Remove.
5660 (build_component_ref_1): Likewise.
5661 (build_x_component_ref): Likewise.
5662 (build_class_member_access_expr): New function.
5663 (finish_class_member_access_expr): Likewise.
5664 (build_ptrmemfunc_access_expr): Likewise.
5665 (get_member_function_from_ptrfunc): Use
5666 build_ptrmemfunc_access_expr.
5667 (build_binary_op): Likewise.
5668 (build_unary_op): Likewise.
5669 (build_ptrmemfunc): Likewise.
5670 (pfn_from_ptrmemfunc): Likewise.
5671 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 5672
0b6f2917
NB
56732002-08-07 Neil Booth <neil@daikokuya.co.uk>
5674
5675 * Make-lang.in (CXX_C_OBJS): Update.
5676 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
5677 * cp-tree.h (cxx_decode_option): Remove.
5678 * decl2.c (compare_options, lang_f_options, unsupported_options,
5679 cxx_decode_option): Remove.
5680
1e14c7f0
GDR
56812002-08-06 Gabriel Dos Reis <gdr@nerim.net>
5682
5683 * typeck.c (build_x_unary_op): Handle pointer-to-member.
5684
b3426eb9
GK
56852002-08-05 Geoffrey Keating <geoffk@redhat.com>
5686
5687 * class.c: Don't include obstack.h.
b6ce26ac 5688 (popclass):
b3426eb9
GK
5689 * decl2.c: Delete bogus comment.
5690 * error.c: Don't include obstack.h.
5691 * except.c: Likewise.
5692 (dump_type): Correct comment.
5693 * method.c: Don't include obstack.h.
5694 * tree.c: Likewise.
5695
201fbb7f
GDR
56962002-08-04 Gabriel Dos Reis <gdr@nerim.net>
5697
5698 Fix PR/2213
5699 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
5700 expressions to pointer-to-data-member of pointer-to-member-functions.
5701
6d9f628e
GK
57022002-08-04 Geoffrey Keating <geoffk@redhat.com>
5703
5704 * cvt.c (ocp_convert): Delete obsolete code.
5705 * parse.y (permanent_obstack): Delete declaration.
5706 * pt.c (permanent_obstack): Delete declaration.
5707 * repo.c (permanent_obstack): Delete declaration.
5708 (open_repo_file): Use xmalloc instead of permanent_obstack.
5709 (init_repo): Use xstrdup instead of permanent_obstack.
5710
dd98e14f
NS
57112002-08-04 Nathan Sidwell <nathan@codesourcery.com>
5712
5713 * cp-tree.h (VF_DERIVED_VALUE): Remove.
5714 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
5715
e6858a84
NS
57162002-08-03 Nathan Sidwell <nathan@codesourcery.com>
5717
5718 PR 7470.
5719 C++ ABI change - vfunc ordering.
5720 * class.c (add_virtual_function): Remove.
5721 (dfs_modify_all_vtables): Take list of all declared
5722 virtuals. Assign all that are not in primary base.
5723 (check_for_override): Adjust comments.
5724 (create_vtable_ptr): Take single list of virtuals. Build chain
5725 of declared virtuals here.
5726 (layout_class_type): Take single list of virtuals. Adjust.
5727 (finish_struct_1): Keep virtuals on single list. Adjust.
5728
55765de4
MM
57292002-08-02 Mark Mitchell <mark@codesourcery.com>
5730
5731 * init.c (build_member_call): Use build_new_method_call, not
5732 build_method_call.
5733
d0067571
KW
57342002-08-02 Krister Walfridsson <cato@df.lth.se>
5735
5736 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
5737
4a34e0e8
MM
57382002-08-02 Mark Mitchell <mark@codesourcery.com>
5739
5740 * call.c (build_method_call): Issue a more helpful error message
5741 about ambiguous method names.
5742
41ab2ae2
NS
57432002-08-02 Nathan Sidwell <nathan@codesourcery.com>
5744
5745 * tree.c (build_shared_int_cst): Make cache file scope, and
5746 GTY it.
5747
367aa585
JM
57482002-08-02 Jason Merrill <jason@redhat.com>
5749
a77a9a18
JM
5750 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
5751 (cp_expr_size): New fn.
5752 * call.c (build_over_call): Lose empty class hackery.
5753 (convert_arg_to_ellipsis): Promote non-POD warning to error.
5754 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
5755
367aa585
JM
5756 * semantics.c (expand_body): Do tree optimization in the function
5757 context, too.
5758
4078b403
NB
57592002-08-01 Neil Booth <neil@daikokuya.co.uk>
5760
5761 * cp-tree.h: Move all warning and flag declarations to c-common.h.
5762 * decl.c: Move all warning and flag variables to c-common.c.
5763 * decl2.c: Move all warning and flag variables to c-common.c.
5764 * lex.c (flag_digraphs): Remove.
5765 (warn_traditional): Now in c-common.c.
5766
4ba126e4
MM
57672002-07-31 Mark Mitchell <mark@codesourcery.com>
5768
5769 * call.c (build_field_call): Do not look up the field by name.
5770 (build_method_call): Simplify.
5771 (struct z_candidate): Add access_path and conversion_path. Remove
5772 basetype_path.
5773 (convert_class_to_reference): Adjust use of
5774 add_function_candidate.
5775 (add_candidate): Add conversion_path argument.
5776 (add_function_candidate): Use it.
5777 (add_conv_dndidate): Likewise.
5778 (build_builtin_candidate): Likewise.
5779 (add_template_candidate_real): Add conversion_path argument.
5780 (add_template_conv_candidate): Likewise.
5781 (add_template_candidate): Likewise.
5782 (build_user_type_conversion_1): Use it.
5783 (build_new_function_call): Remove name lookup code. Adjust use of
5784 add_template_candidate and add_function_candidate.
5785 (build_new_op): Likewise.
5786 (convert_like_real): Use build_special_member_call.
5787 (build_over_call): Use cand->conversion_path.
5788 (build_special_member_call): New method.
5789 (build_new_method_call): Remove name lookup code.
5790 * cp-tree.def (OFFSET_REF): Update documentation.
5791 (TEMPLATE_ID_EXPR): Likewise.
5792 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
5793 (BASELINK_OPTYPE): Likewise.
5794 (build_new_method_call): Adjust prototype.
5795 (build_special_member_call): New method.
5796 (build_baselink): New method.
5797 (build_offset_ref_call_from_tree): Likewise.
5798 (build_call_from_tree): Likewise.
5799 (finish_qualified_call_expr): Remove.
5800 (finish_call_expr): Adjust prototype.
5801 (build_x_function_call): Remove.
5802 * cvt.c (ocp_convert): Use build_special_member_call.
5803 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
5804 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
5805 CALL_EXPR.
5806 (build_offset_ref_call_from_tree): New function.
5807 (build_call_from_tree): Likewise.
5808 * init.c (expand_cleanup): Use build_special_member_call.
5809 (expand_default_init): Likewise.
5810 (build_member_call): Use finish_call_expr.
5811 (build_new_1): Use build_special_member_call.
5812 (push_base_cleanups): Likewise.
5813 * method.c (do_build_assign_ref): Likewise.
5814 * parse.y (template_id): Do not pass a COMPONENT_REF to
5815 lookup_template_function.
5816 (primary): Use parse_finish_call_epxr, not finish_call_expr.
5817 (parse_finish_call_expr): New function.
5818 * pt.c (lookup_template_function): Add assertions.
5819 * search.c (lookup_base): Allow T to be a binfo.
5820 (build_baselink): New function.
5821 (lookup_member): Use it.
5822 * semantics.c (finish_call_expr): Do not do name lookup.
5823 (finish_object_call_expr): Remove #if 0'd code.
5824 (finish_qualified_call_expr): Remove.
5825 * typeck.c (build_x_function_call): Remove.
5826 (build_static_case): Use build_special_member_call.
5827 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 5828
60b8aa94
FS
58292002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5830
5831 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
5832
8a4a7242
GDR
58332002-07-30 Gabriel Dos Reis <gdr@nerim.net>
5834
5835 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
5836
03fc215c
NS
58372002-07-30 Nathan Sidwell <nathan@codesourcery.com>
5838
5839 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
5840 documentation.
5841
3f16a8f3
AM
58422002-07-29 Alan Modra <amodra@bigpond.net.au>
5843
5844 * cp-tree.h: Comment typo fix.
5845
c03d566f
RE
58462002-07-29 Richard Earnshaw <rearnsha@arm.com>
5847
5848 * spew.c (space_for_token): Allocate zeroed memory for a new token
5849 chunk.
5850
c2ef6d34
RS
58512002-07-27 Roger Sayle <roger@eyesopen.com>
5852
5853 * decl.c (builtin_function_1): No need to explicitly mark
5854 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
5855
a3926fe1
RS
58562002-07-27 Roger Sayle <roger@eyesopen.com>
5857
5858 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
5859
8e51619a
JM
58602002-07-26 Jason Merrill <jason@redhat.com>
5861
5862 * call.c (build_over_call): Likewise.
5863 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
5864 (convert_for_arg_passing): New fn.
5865 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
5866 (type_passed_as): New fn.
5867 * pt.c (tsubst_decl): Use it.
5868 * decl2.c (cp_build_parm_decl): New fn.
5869 (build_artificial_parm): Use it.
5870 (start_static_storage_duration_function): Likewise.
5871 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
5872 (grokparms): Don't mess with DECL_ARG_TYPE.
5873 * typeck.c (convert_arguments): Use convert_for_arg_passing.
5874 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5875 Define.
5876 * cp-tree.h: Declare new fns.
b6ce26ac 5877
c372b0fa
NB
58782002-07-26 Neil Booth <neil@daikokuya.co.uk>
5879
5880 * cp-tree.h (flag_operator_names): Remove.
5881 * decl2.c (flag_operator_names): Remove.
5882 (lang_f_options): Remove operator-names.
5883 * lex.c (D_OPNAME): Remove.
5884 (reswords): Remove operator names.
5885 (rid_to_yy): Remove operator names.
5886 (init_reswords): No need to handle D_OPNAME.
5887 * spew.c (read_process_identifier): There are no operator
5888 names.
5889
558ee214
JM
58902002-07-26 Jason Merrill <jason@redhat.com>
5891
5892 * dump.c (cp_dump_tree): Call c_dump_tree.
5893 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5894
81a1552d
NB
58952002-07-25 Neil Booth <neil@daikokuya.co.uk>
5896
5897 * error.c (print_whitespace): Remove.
5898 * g++spec.c (LIBUNWIND): Move.
5899 * mangle.c (mangled_position, write_signed_number): Remove.
5900
cad2c6b6
NB
59012002-07-25 Neil Booth <neil@daikokuya.co.uk>
5902
5903 * decl2.c (cxx_decode_option): Similarly.
5904
ea793912
GDR
59052002-07-25 Gabriel Dos Reis <gdr@nerim.net>
5906
5907 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
5908 (cxx_sizeof_or_alignof_type): Take a third argument.
5909 (cxx_sizeof): Adjust definition.
5910 (cxx_alignof): Likewise.
5911 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
5912 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
5913 complaining.
5914 (c_sizeof_nowarn): Remove definition.
5915 (build_unary_op): Use cxx_sizeof_nowarn.
5916
3cfab7ec
GK
59172002-07-24 Geoffrey Keating <geoffk@redhat.com>
5918
5919 * tree.c (cp_build_qualified_type_real): When copying
5920 pointer-to-method types, unshare the record that holds
5921 the cached pointer-to-member-function type.
5922
c0667597
NB
59232002-07-23 Neil Booth <neil@daikokuya.co.uk>
5924
5925 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
5926
fa72b064
GDR
59272002-07-23 Gabriel Dos Reis <gdr@nerim.net>
5928
5929 Fix PR/7363:
5930 * typeck.c (cxx_sizeof_or_alignof_type): New function.
5931 (c_sizeof): Remove definition.
5932 (expr_sizeof): Use cxx_sizeof.
5933 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5934 * decl.c (finish_destructor_body): Use cxx_sizeof.
5935 * semantics.c (finish_alignof): Likewise.
5936 (finish_alignof): Use cxx_alignof.
5937 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5938 (cxx_sizeof_or_alignof_type): Declare.
5939 (my_friendly_assert): Move to ../c-common.h.
5940
4fa31c2a
NB
59412002-07-23 Neil Booth <neil@daikokuya.co.uk>
5942
5943 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5944
0e902d98
KL
59452002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5946
5947 PR c++/7347, c++/7348
5948 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5949 * decl.c (make_typename_type): Use it.
5950 (make_unbound_class_template): Likewise.
5951 (lookup_name_real): Don't call type_access_control if scope is
5952 template parameter dependent.
5953 * parse.y (template_arg): Call make_unbound_class_template with
5954 tf_parsing set.
5955 (nest_name_specifier): Call make_typename_type with tf_parsing set.
5956 (typename_sub0): Likewise.
5957 (typename_sub1): Likewise.
5958 (instantiate_decl): Push class scope.
5959 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5960 for both static variable and member function template.
5961 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5962 and arguments.
5963 * search.c (type_access_control): Do type access for TEMPLATE_DECL
5964 too.
5965
b886c620
RS
59662002-07-20 Roger Sayle <roger@eyesopen.com>
5967
5968 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5969 test by using positive_option. Make whitespace consistent.
5970
7a561142
GDR
59712002-07-20 Gabriel Dos Reis <gdr@nerim.net>
5972
fa72b064 5973 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
5974 members with 'locus'. Adjust use throughout.
5975 (struct feed): Likewise.
5976 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5977 Adjust use.
5978 (snarf_defarg): Use error(), not error_with_file_and_line().
5979
059ba716
CD
59802002-07-19 Chris Demetriou <cgd@broadcom.com>
5981
5982 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5983 cpp_options is included.
5984
d955f6ea
KL
59852002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5986
5987 PR c++/2862, c++/2863
5988 * pt.c (determine_specialization): Compare the length of
5989 TYPE_ARG_TYPES. Tidy.
5990
d03d18e8
KL
59912002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5992
5993 PR c++/3797
5994 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 5995 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
5996 instantiation olddecl.
5997
ba59df78
KL
59982002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5999
6000 PR c++/4802, c++/5387
6001 * decl.c (make_typename_type): Use enforce_access.
6002
58f05188
SS
60032002-07-17 Scott Snyder <snyder@fnal.gov>
6004
6005 PR c++/7320
6006 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6007
04ec0065
MM
60082002-07-12 Mark Mitchell <mark@codesourcery.com>
6009
6010 * class.c (add_method): Correct handling of conversion operators.
6011
f0ab6bf2
MM
60122002-07-11 Mark Mitchell <mark@codesourcery.com>
6013
6014 PR c++/7224
6015 * class.c (add_method): Simplify.
6016
34902e16
JM
60172002-07-11 Jason Merrill <jason@redhat.com>
6018
6019 PR c++/7279
6020 * tree.c (cp_copy_res_decl_for_inlining): Also copy
6021 TREE_ADDRESSABLE.
6022
6e04241f
GS
60232002-07-10 Graham Stott <graham.stott@btinternet.com>
6024
6025 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 6026 Pass depth as int pointer.
6e04241f 6027
8ac9d31f
TJ
60282002-07-11 Tim Josling <tej@melbpc.org.au>
6029
b6ce26ac 6030 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
6031
6032 * config-lang.in (gtfiles): Add files needed for this front end.
6033
15c7fb9c
MM
60342002-07-10 Mark Mitchell <mark@codesourcery.com>
6035
6036 * cp-tree.h (unqualified_name_lookup_error): Declare it.
6037 (begin_function_definition): Adjust prototype.
6038 * lex.c (unqualified_name_lookup_error): New function, split out
6039 from ...
6040 (do_identifier): ... here.
6041 * parse.y (parse_begin_function_definition): New function.
6042 (fn.def1): Use it.
6043 * semantics.c (begin_function_definition): Accept decl-specifiers
6044 and attributes as separate parameters.
6045
abf92e26
JM
60462002-07-10 Jason Merrill <jason@redhat.com>
6047
6048 PR c++/6255
6049 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6050 modifying the old one.
6051
8ba658ee
MM
60522002-07-09 Mark Mitchell <mark@codesourcery.com>
6053
6054 * cp-tree.h (constructor_name_p): Declare it.
6055 (check_template_template_default_arg): Likewise.
6056 * class.c (handle_using_decl): Use constructor_name_p.
6057 * decl.c (grokdeclarator): Likewise.
6058 * decl2.c (constructor_name_p): Define it.
6059 * init.c (build_member_call): Use constructor_name_p.
6060 * parse.y (template_parm): Use check_template_template_default_arg.
6061 * pt.c (check_explicit_specialization): Use constructor_name_p.
6062 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 6063
d5372501
KL
60642002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6065
6066 * pt.c (can_complete_type_without_circularity): Add static to
6067 function definition.
6068
594bb0e7
MM
60692002-07-08 Mark Mitchell <mark@codesourcery.com>
6070
6071 * cp-tree.h (have_extern_spec): Declare it
6072 * decl.c (have_extern_spec): Define it.
6073 (start_decl): Eliminate use of used_extern_spec.
6074 (start_function): Likewise.
6075 * parse.y (have_extern_spec): Remove declaration.
6076 (used_extern_spec): Likewise.
6077 (frob_specs): Eliminate use of used_extern_spec.
6078 (.hush_warning): Likewise.
6079
eb8845be
MM
60802002-07-07 Mark Mitchell <mark@codesourcery.com>
6081
6082 * Make-lang.in (cp/parse.o): Depend on decl.h.
6083 * cp-tree.h (do_decl_instantiation): Change prototype.
6084 * parse.y: Include decl.h.
6085 (parse_decl_instantiation): New function.
6086 (explicit_instantiation): Use it.
6087 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6088 and DECLSPECS.
b6ce26ac 6089
78abea27
RS
60902002-07-07 Roger Sayle <roger@eyesopen.com>
6091
6092 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6093 constructor and destructor tests when passed a TEMPLATE_DECL.
6094
98c07d7b
JM
60952002-07-05 Jason Merrill <jason@redhat.com>
6096
212e17fd
JM
6097 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6098 pointers.
6099
98c07d7b
JM
6100 PR optimization/7145
6101 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6102
c6f553d1
NS
61032002-07-05 Nathan Sidwell <nathan@codesourcery.com>
6104
6105 Repair damage on weak-impared targets caused by my previous patch.
6106 * cp-tree.h (import_export_tinfo): Add parameter.
6107 * decl2.c (import_export_tinfo): Add parameter, post adjust
6108 DECL_COMDAT.
6109 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6110 import_export_tinfo.
6111
b2153b98
KL
61122002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6113
6114 PR c++/6944
6115 * init.c (build_aggr_init): Remove qualifiers of init before calling
6116 build_vec_init.
6117 (build_vec_init): Flatten multi-dimensional array during cleanup.
6118 (build_vec_delete_1): Abort if the type of each element is array.
6119
492ff760
GS
61202002-07-03 Graham Stott <graham.stott@btinternet.com>
6121
6122 * pt.c (instantiate_class_template): Fix typo.
6123
04c4491d
KL
61242002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6125
06728f70
KL
6126 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6127 by CVS conflict in my last patch.
04c4491d 6128
17f29637
KL
61292002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6130
6131 PR c++/6716
6132 * pt.c (can_complete_type_without_circularity): New function.
6133 (instantiate_class_template): Use it.
06728f70
KL
6134 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6135 message due to incomplete fields.
17f29637 6136
5d69ba1f
MM
61372002-07-01 Mark Mitchell <mark@codesourcery.com>
6138
6139 PR c++/7112
6140 * mangle.c (write_expression): Add mangling for sizeof when
6141 applied to a type.
6142 * operators.def: Remove stale comment.
6143
d689a8f1
NS
61442002-06-30 Nathan Sidwell <nathan@codesourcery.com>
6145
6146 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6147 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6148 (tinfo_decl_type): Replace with ...
6149 (type_info_ptr_type): ... this.
6150 (import_export_tinfo): Declare.
6151 (tinfo_decl_p): Rename to ...
6152 (unemitted_tinfo_decl_p): ... this.
6153 * decl2.c (import_export_decl): Break out tinfo handling into ...
6154 (import_export_tinfo): ... here. New function.
6155 (finish_file): Adjust.
6156 * rtti.c (TINFO_REAL_NAME): New macro.
6157 (init_rtti_processing): Create the tinfo types.
6158 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6159 (get_tinfo_decl): Adjust.
6160 (get_tinfo_ptr): New function.
6161 (get_type_id): Use it.
6162 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6163 (ptr_initializer): Use get_tinfo_ptr.
6164 (ptm_initializer): Likewise.
6165 (synthesize_tinfo_var): Break into ...
6166 (get_pseudo_ti_init): ... this. Just create the initializer.
6167 (get_pseudo_ti_desc): .. and this.
6168 (create_real_tinfo_var): Remove.
6169 (create_pseudo_type_info): Don't create the vtable decl here.
6170 (get_vmi_pseudo_type_info): Remove.
6171 (create_tinfo_types): Adjust.
6172 (tinfo_decl_p): Rename to ...
6173 (unemitted_tinfo_decl_p): ... here. Adjust.
6174 (emit_tinfo_decl): Adjust. Create the initializer.
6175
5ce49b4b
MM
61762002-06-27 Mark Mitchell <mark@codesourcery.com>
6177
6178 PR c++/6695
6179 * pt.c (tsubst_friend_class): Substitute into the context of the
6180 friend before using it.
6181
88e5899c
MM
61822002-06-26 Mark Mitchell <mark@codesourcery.com>
6183
6184 * cp-tree.h (xref_tag): Change prototype.
6185 (handle_class_head): Likewise.
6186 (build_x_component_ref): Likewise.
6187 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6188 (xref_tag): Take attributes as a separate parameter.
6189 (xref_tag_from_type): Adjust call to xref_tag.
6190 * decl2.c (build_expr_from_tree): Adjust call to
6191 build_x_component_ref.
6192 (handle_class_head): Take attributes as a separate parameter.
6193 * parse.y (parse_xref_tag): New function.
6194 (parse_handle_class_head): Likewise.
6195 (primary): Use parse_xref_tag.
6196 (class_head_decl): Use parse_handle_class_head.
6197 (class_head_defn): Likewise.
6198 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6199 (build_dynamic_cast_1): Likewise.
6200 (create_pseudo_type_info): Likewise.
6201 (emit_support_tinfos): Likewise.
6202 * typeck.c (build_object_ref): Adjust call to
6203 build_x_component_ref.
6204 (build_x_component_ref): Remove protect parameter.
b6ce26ac 6205
da15dae6
MM
62062002-06-25 Mark Mitchell <mark@codesourcery.com>
6207
6208 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6209 * class.c (handle_using_decl): Likewise.
6210 (instantiate_type): Likewise.
6211 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6212 (xref_basetypes): Change prototype.
6213 (begin_mem_initializers): New function.
6214 (get_overloaded_fn): Likewise.
6215 * decl.c (xref_basetypes): Simplify.
6216 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6217 * init.c (build_offset_ref): Likewise.
6218 * parse.y (base_init): Use begin_mem_initializers().
6219 (structsp): Adjust call to xref_basetypes.
6220 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6221 (instantiate_class_template): Adjust call to xref_basetypes.
6222 * semantics.c (begin_mem_initializers): New function.
6223 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6224 (really_overlaoded_fn): Likewise.
6225 (get_overloaded_fn): New function.'
6226 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 6227
5f261ba9
MM
62282002-06-24 Mark Mitchell <mark@codesourcery.com>
6229
6230 * cp-tree.h (SCALAR_TYPE_P): New macro.
6231 (check_for_out_of_scope_variable): New function.
6232 (at_class_scope_p): Likewise.
6233 (finish_fname): Likewise.
6234 * class.c (finish_struct): Use at_function_scope_p.
6235 * decl.c (check_for_out_of_scope_variable): New function, split
6236 out from do_identifier.
6237 (finish_enum): Use at_function_scope_p.
6238 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6239 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
6240 (primary): Use at_function_scope_p.
6241 * search.c (at_class_scope_p): New function.
6242 * semantics.c (finish_fname): Likewise.
6243 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 6244
80b1331c
MM
62452002-06-23 Mark Mitchell <mark@codesourcery.com>
6246
6247 * parse.y (parse_scoped_id): New function.
6248 (primary): Use it.
6249 * cp-tree.h (do_scoped_id): Adjust declaration.
6250 * lex.c (do_scoped_id): Remove call to yylex.
6251 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6252 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6253 expanding it inline.
b6ce26ac 6254
08c7ae5a
MT
62552002-06-23 Matt Thomas <matt@3am-software.com>
6256
6257 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6258 "#if VMS_TARGET".
6259
eb6b51b9
KG
62602002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6261
6262 * mangle.c (integer_type_codes): Const-ify.
6263
aa8dea09
RH
62642002-06-20 Richard Henderson <rth@redhat.com>
6265
6266 PR c++/6747
f989ed67
ZW
6267 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6268 Call put_var_into_stack.
aa8dea09 6269
62c71f4b
KG
62702002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6271
6272 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6273 array size calculation.
6274
aa16c0fa
KL
62752002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6276
6277 PR c++/6892
6278 * pt.c (tsubst_expr): Handle FILE_STMT.
6279
342cea95
KL
62802002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6281
6282 PR c++/6723
6283 * pt.c (lookup_template_class): Don't build complete argument of
6284 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6285 argument.
6286
84d901be
AD
62872002-06-19 Akim Demaille <akim@epita.fr>
6288
6289 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6290 decl.h's TYPENAME.
6291 * spew.c, lex.c: Adjust.
6292 * parse.y (explicit_instantiation): Add empty action to override
6293 the default $$ = $1 where it introduces a type clash.
6294
83b14b88
JM
62952002-06-14 Jason Merrill <jason@redhat.com>
6296
18ba380b
JM
6297 * semantics.c (begin_for_stmt): Push the 'for' scope before
6298 adding the FOR_STMT.
6299
83b14b88
JM
6300 C++ ABI changes.
6301 * class.c (build_base_field): Set DECL_PACKED.
6302 (layout_class_type): Don't use tail padding of PODs.
6303 * mangle.c (write_unqualified_name): Fix template conversion op
6304 mangling.
6305
fd852454
RH
63062002-06-16 Richard Henderson <rth@redhat.com>
6307
6308 PR opt/6793
6309 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6310 after template instantiation.
6311
750491fc
RH
63122002-06-16 Richard Henderson <rth@redhat.com>
6313
6314 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6315
f7d3c5f0
GDR
63162002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
6317
6318 * cp-tree.h (compiler_error): Remove declaration.
6319 * lex.c (compiler_error): Remove definition.
6320
893a047c
SE
63212002-06-14 Steve Ellcey <sje@cup.hp.com>
6322
6323 * g++spec.c (LIBUNWIND): New.
6324 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6325
a6f5e048
RH
63262002-06-13 Jessica Han <jessica@cup.hp.com>
6327
6328 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6329 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6330 (build_vbase_offset_vtbl_entries): Likewise.
6331 * rtti.c (build_headof): Likewise.
6332 (get_tinfo_decl_dynamic): Likewise.
6333 (create_pseudo_type_info): Likewise.
6334
e4dadd2a
SS
63352002-06-12 Stan Shebs <shebs@apple.com>
6336
6337 * mpw-config.in: Remove file, no longer used.
6338 * mpw-make.sed: Ditto.
6339
09e77dee
ZW
63402002-06-07 Zack Weinberg <zack@codesourcery.com>
6341
6342 * decl2.c: Update call to cpp_handle_option.
6343
4bafaa6f
L
63442002-06-07 H.J. Lu (hjl@gnu.org)
6345
6346 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6347
3cb8660c
GDR
63482002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6349
6350 * error.c (cp_error_at): Fix typo.
6351
47b69537
GDR
63522002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
6353
6354 * error.c (cp_diagnostic_starter): Adjust call.
6355 (maybe_print_instantiation_context): Change prototype to take a
6356 'diagnostic_info *'.
6357 (print_instantiation_full_context): Likewise.
6358 (print_instantiation_partial_context): Likewise.
6359 (cp_diagnostic_starter): Likewise.
6360 (cp_diagnostic_finalizer): Likewise.
6361 (cp_print_error_function): Likewise.
6362 (cp_printer): Take a secondary parameter as a 'text_info *'.
6363 Remove output_state savings. Adjust calls.
6364
e2500fed
GK
63652002-06-03 Geoffrey Keating <geoffk@redhat.com>
6366
6367 * pt.c (inline_parm_levels): Mark for GC.
6368
6369 * mangle.c (start_mangling): Allocate G.substitutions here...
6370 (init_mangle): ... rather than here.
6371 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
6372 * spew.c (yylexstring): Don't use VARRAY_FREE.
6373 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
6374 * decl2.c (pending_statics): Use gengtype to mark.
6375 (deferred_fns): Likewise.
6376 (ssdf_decls): Likewise.
6377 (init_decl2): Delete.
6378 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
6379 (cxx_init_decl_processing): Don't call init_decl2.
6380 (cxx_pop_function_context): Don't use VARRAY_FREE.
6381 * cp-tree.h (struct saved_scope): No need for special marking
6382 of varrays.
6383 (struct language_function): Likewise.
6384 (local_classes): Use gengtype to mark.
6385 (init_decl2): Delete prototype.
6386 * class.c (init_class_processing): Don't use
6387 ggc_add_tree_varray_root.
6388 (build_vtbl_initializer): Don't use VARRAY_FREE.
6389
6390 * decl.c (typename_compare): Don't use same_type_p.
6391
6392 * decl.c: Include hashtab.h instead of hash.h.
6393 (typename_hash): Update to use htab_h.
6394 (typename_compare): Likewise.
6395 (typename_htab): Use gengtype to mark.
6396 (build_typename_type): Update to use htab_h.
6397 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
6398
6399 * Make-lang.in (gt-cp-tree.h): New rule.
6400 (cp/tree.o): Depend on gt-cp-tree.h.
6401 * config-lang.in (gtfiles): Add cp/tree.c.
6402 * tree.c: Include gt-cp-tree.h.
6403 (list_hash_table): Use gengtype to mark.
6404 (init_tree): Use gengtype to mark trees.
6405
6406 * Make-lang.in (cp/decl.o): Add debug.h dependency.
6407 * call.c (struct z_candidate): Use gengtype.
6408 (USER_CONV_CAND): Use WRAPPER_ZC.
6409 (convert_class_to_reference): Use build_zc_wrapper.
6410 (build_type_conversion_1): Likewise.
6411 (build_over_call): Use WRAPPER_ZC.
6412 (add_warning): Use build_zc_wrapper.
6413 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
6414 * cp-tree.h (struct lang_identifier): Use gengtype.
6415 (struct template_parm_index_s): Likewise.
6416 (struct ptrmem_cst): Likewise.
6417 (struct tree_binding): Likewise.
6418 (struct tree_overload): Likewise.
6419 (struct tree_srcloc): Likewise.
6420 (struct tree_wrapper): Likewise. Also modify to have a pointer
6421 to struct z_candidate rather than void.
6422 (enum cp_tree_node_structure_enum): New.
6423 (union lang_tree_node): New.
6424 (cxx_mark_tree): Delete prototype.
6425 (cp_tree_node_structure): New prototype.
6426 (build_ptr_wrapper): Delete prototype.
6427 (build_int_wrapper): Delete prototype.
6428 (build_zc_wrapper): New prototype.
6429 * decl.c: Include debug.h
6430 (cxx_mark_tree): Delete.
6431 (cp_tree_node_structure): New.
6432 * tree.c (build_ptr_wrapper): Delete.
6433 (build_int_wrapper): Delete.
6434 (build_zc_wrapper): New.
6435
6436 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
6437 Correct typo. Patch from k_fukui@highway.ne.jp.
6438
6439 * semantics.c (current_stmt_tree): Update for change to
6440 struct language_function.
6441 (finish_mem_initializers): Likewise.
6442 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
6443 * cp-tree.h (struct language_function): Rename from
6444 cp_language_function. Change all uses.
6445 (cp_function_chain): Don't need to cast.
6446
6447 * class.c (duplicate_tag_error): Reset discriminator.
6448 (check_bases_and_members): Update for data structure changes.
6449 * cp-tree.h (struct lang_id2): Use gengtype.
6450 (flagged_type_tree): Likewise.
6451 (SET_LANG_ID): Use GGC on struct lang_id2.
6452 (struct cp_language_function): Use gengtype. Remove field
6453 'x_vcalls_possible_p'.
6454 (current_vcalls_possible_p): Delete.
6455 (struct lang_type_header): New.
6456 (struct lang_type_class): Rename from struct lang_type. Include
6457 struct lang_type_header.
6458 (struct lang_type_ptrmem): New.
6459 (struct lang_type): New.
6460 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
6461 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
6462 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
6463 (struct lang_decl_flags): Use gengtype. Add discriminators.
6464 (struct lang_decl): Use gengtype. Add and use discriminators.
6465 Update the macros that reference moved fields.
6466 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
6467 (SET_DECL_THUNK_P): Set discriminator too.
6468 (clear_inline_text_obstack): Delete prototype.
6469 (finish_inline_definitions): Delete prototype.
6470 (mark_pending_inlines): Delete prototype.
6471 (lang_check_failed): New prototype.
6472 * decl.c (struct named_label_use_list): Use gengtype.
6473 (struct named_label_list): Likewise.
6474 (mark_binding_level): Delete.
6475 (mark_named_label_lists): Delete.
6476 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
6477 (cxx_init_decl_processing): Use generated marker routine.
6478 (begin_destructor_body): Delete dead set to
6479 current_vcalls_possible_p.
6480 (mark_lang_function): Delete.
6481 (mark_cp_function_context): Delete.
6482 (lang_mark_tree): Use generated marker routines.
6483 * decl2.c (start_objects): Set discriminator when setting
6484 GLOBAL_INIT_PRIORITY.
6485 * lex.c (retrofit_lang_decl): Set discriminators.
6486 (copy_lang_type): Update for changes to lang_type structure.
6487 (cp_make_lang_type): Set discriminator.
6488 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
6489 * search.c: Include ggc.h.
6490 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
6491 (finish_inline_definitions): Delete.
6492 * spew.c (struct token): Use gengtype.
6493 (struct token_chunk): New.
6494 (struct unparsed_text): Use gengtype. Store tokens in chunks.
6495 (struct feed): Use gengtype.
6496 (feed_obstack): Delete.
6497 (feed): Mark as GC root.
6498 (pending_inlines): Mark as GC root.
6499 (pending_inlines_tail): Likewise.
6500 (processing_these_inlines): Likewise.
6501 (token_obstack): Make static.
6502 (first_token): Likewise.
d30d6e7a 6503 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
6504 (clear_inline_text_obstack): Delete.
6505 (feed_input): Use GC for struct feed. Update for changes to
6506 struct unparsed_text.
6507 (mark_pending_inlines): Delete.
6508 (next_token): Rename from add_token. Change all callers. Update
6509 for changes to struct unparsed_text.
6510 (space_for_token): New.
6511 (remove_last_token): New.
6512 (alloc_unparsed_text): New.
6513 (snarf_block): Take an unparsed_text. Update for changes to struct
6514 unparsed_text.
6515 (snarf_method): Update for changes to struct unparsed_text.
6516 (snarf_defarg): Update for changes to struct unparsed_text.
6517 * tree.c (lang_check_failed): New.
6518
6519 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
6520 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
6521 (cp/spew.o): Add dependency on gt-<filename>.h.
6522 (cp/decl2.o): Add dependency on gt-<filename>.h.
6523 (cp/call.o): Add dependency on gt-<filename>.h.
6524 (cp/pt.o): Add dependency on gt-<filename>.h.
6525 (cp/repo.o): Add dependency on gt-<filename>.h.
6526 (cp/parse.o): Add dependency on gt-<filename>.h.
6527 * call.c: Use gengtype for roots.
6528 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
6529 decl2.c parse.y pt.c repo.c spew.c.
6530 * cp-tree.h: Use gengtype for roots.
6531 (struct saved_scope): Use GGC, gengtype.
6532 (cp_parse_init): Delete prototype.
6533 (init_pt): Delete prototype.
6534 * decl.c: Use gengtype for roots.
6535 (mark_saved_scope): Delete.
6536 (cxx_init_decl_processing): Don't call deleted initilisation
6537 routines.
6538 (signed_size_zero_node): Delete, unused.
6539 * decl.h: Use gengtype for roots.
6540 * decl2.c: Use gengtype for roots.
6541 * lex.h: Use gengtype for roots.
6542 * parse.y: Use gengtype for roots.
6543 (cp_parse_init): Delete.
6544 * pt.c: Use gengtype for roots.
6545 (init_pt): Delete.
6546 * repo.c: Use gengtype for roots.
6547 * spew.c: Use gengtype for roots.
6548
6549 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
6550 (cp/decl.o): Add dependency on gtype-cp.h.
6551 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
6552 Include gtype-cp.h. Allow for filename changes.
6553
6554 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
6555 (cp/decl.o): Add cp/gt-decl.h dependency.
6556 * config-lang.in (gtfiles): New.
6557 * tree.h: Rename struct binding_level to struct cp_binding_level.
6558 * decl.c: Rename struct binding_level to struct cp_binding_level.
6559 Include cp/gt-decl.h.
6560 (struct cp_binding_level): Use gengtype.
6561 (make_binding_level): Use GGC on struct cp_binding_level.
6562 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
6563 (cxx_init_decl_processing): Mark free_binding_level as
6564 deletable.
6565
6566 * decl.c (mark_cp_function_context): Update calling sequence.
6567
6568 * decl.c (start_function): Don't free 'struct
6569 cp_language_function'.
6570 (pop_cp_function_context): Likewise.
6571 (save_function_data): Allocate it using GC.
6572 * semantics.c (genrtl_start_function): Don't free 'struct
6573 cp_language_function'.
6574
8b968bd1
MW
65752002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
6576
6577 * lang-specs.h: Use cpp_debug_options.
6578
11ad4784
ZW
65792002-05-28 Zack Weinberg <zack@codesourcery.com>
6580
6581 * mangle.c, tree.c: Include real.h.
6582 * Make-lang.in: Update dependency lists.
6583
81a75f0f
NB
65842002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
6585
6586 * lex.c: Don't include c-lex.h.
6587 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
6588
a97d1398
NB
65892002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
6590
6591 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
6592
6f001fdf
RH
65932002-05-22 Richard Henderson <rth@redhat.com>
6594
6595 * decl.c (obscure_complex_init): Check for VAR_DECL
6596 before using DECL_THREAD_LOCAL.
6597
7a1f3f5f
RH
65982002-05-22 Richard Henderson <rth@redhat.com>
6599
6600 * decl.c (check_tag_decl): Handle RID_THREAD.
6601 (obscure_complex_init): Reject run-time init of tls.
6602 (grokvardecl, grokdeclarator): Handle RID_THREAD.
6603 * lex.c (reswords): Add __thread.
6604 (rid_to_yy): Map RID_THREAD to SCSPEC.
6605
e5f3b786
NB
66062002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
6607
6608 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
6609 * cp-tree.h (cxx_post_options): Kill.
6610 * cp-lex.c (cxx_post_options): Kill.
6611
3d78f2e9
RH
66122002-05-21 Richard Henderson <rth@redhat.com>
6613
6614 * lex.c (rid_to_yy): Add RID_THREAD.
6615
c8a3d889
AO
66162002-05-21 Alexandre Oliva <aoliva@redhat.com>
6617
6618 * init.c (build_vec_init): Test for trivial copy-assignment when
6619 copy-assigning arrays.
6620
500abaa8
AJ
66212002-05-20 Andreas Jaeger <aj@suse.de>
6622
6623 * init.c (build_default_init): Remove unused variable.
6624
ecc42c14
AO
66252002-05-20 Alexandre Oliva <aoliva@redhat.com>
6626
6627 * call.c (any_strictly_viable): New.
6628 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
6629
4e664ef1
KL
66302002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6631
6632 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
6633
07782718
KL
66342002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6635
6636 PR c++/186, DR 259
6637 * pt.c (do_decl_instantiation): Don't complain explicit
6638 instantiation after explicit specialization.
6639 (do_type_instantiation): Likewise.
6640
23b4deba
AO
66412002-05-19 Alexandre Oliva <aoliva@redhat.com>
6642
6643 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
6644 renamed from...
6645 (complete_type_or_else): ... this. Redefined as macro.
6646 (cxx_incomplete_type_diagnostic): Declare.
6647 (cxx_incomplete_type_error): Define as macro.
6648 * init.c (build_delete): Warn about incomplete types other than
6649 void, and use the built-in operator delete for them.
6650 * typeck.c (complete_type_or_diagnostic): Renamed from
6651 complete_type_or_else. Added warn_only argument, passed to...
6652 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
6653 warnings or errors depending on new warn_only argument. Renamed
6654 from...
6655 (cxx_incomplete_type_error): ... this. New implementation in
6656 terms of cxx_incomplete_type_diagnostic.
6657
b41d214e
JM
66582002-05-18 Jason Merrill <jason@redhat.com>
6659
98c07d7b 6660 PR c++/6611
b41d214e
JM
6661 * decl2.c (import_export_decl): If we clear
6662 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
6663
e2005c8d
KL
66642002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6665
6666 PR c++/6620
6667 * pt.c (verify_class_unification): Don't check if PARM is template
6668 parameter dependent. Simplify.
6669 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
6670 parameter dependent expression.
6671
ff48be5c
JM
66722002-05-14 Jason Merrill <jason@redhat.com>
6673
6674 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
6675 Do set DECL_COMDAT.
6676 (synthesize_tinfo_var): Take the public decl.
6677 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
6678 (emit_tinfo_decl): Adjust. Call import_export_decl.
6679 * decl2.c (import_export_decl): Simplify tinfo decl handling.
6680
94e6e4c4
AO
66812002-05-14 Alexandre Oliva <aoliva@redhat.com>
6682
6683 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 6684 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
6685 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
6686 * class.c (check_field_decls): Test non_zero_init.
6687 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
6688 zero-to-NULL conversions.
6689 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
6690 type that needs zero-initialization without zeros.
6691 (check_initializer_decl): Compute zero-initializer for types
6692 that require a non-trivial one.
6693 * init.c (build_forced_zero_init): New function.
6694 (build_default_init): Use it.
6695 * tree.c (zero_init_p): New function.
6696 * typeck2.c (force_store_init_value): New function.
6697 (process_init_constructor): Create non-trivial zero-initializers
6698 for array members and class fields.
6699
e5f5feea
NB
67002002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
6701
6702 * lang-specs.h: Remove redundant -lang-c++.
6703
f63ab951
JM
67042002-05-13 Jason Merrill <jason@redhat.com>
6705
6706 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
6707 (fixed_type_or_null): See through reference vars.
6708 (build_base_path): Vtable contents are constant.
6709 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6710
0d08ea48
JM
67112002-05-12 Jason Merrill <jason@redhat.com>
6712
6713 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
6714 structs are safe.
6715
3df89291
NB
67162002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
6717
6718 * cp-tree.h (flag_ansi): Remove.
6719 * decl2.c (flag_ansi): Remove.
6720 (cxx_decode_option): Set flag_iso and flag_undef.
6721
c87978aa
JM
67222002-05-09 Jason Merrill <jason@redhat.com>
6723
6724 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
6725 Use subtraction rather than a bitmask to get the index.
6726 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
6727
6728 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
6729
a5a49440
NB
67302002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
6731
6732 * Make-lang.in (decl2.o): Update.
6733 * cp-tree.h (warn_multichar): Remove.
6734 * decl2.c: Include c-common.h.
6735 (warn_multichar): Remove.
6736
609688f3
JM
67372002-05-03 Jason Merrill <jason@redhat.com>
6738
0abc082a
JM
6739 * tree.c (build_cplus_array_type): Only const and volatile get
6740 special handling.
6741
609688f3
JM
6742 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
6743
8b16faa2
MM
67442002-04-30 Mark Mitchell <mark@codesourcery.com>
6745
394ab947 6746 ABI change, returning simple classes from functions.
8b16faa2
MM
6747 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
6748 TYPE_HAS_TRIVIAL_INIT_REF is false or
6749 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
6750
ac905924
JM
67512002-04-30 Jason Merrill <jason@redhat.com>
6752
2cb008af 6753 PR debug/6436
ac905924
JM
6754 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
6755 anonymous class with a typedef if there are attributes.
6756
e6e81f1c 67572002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 6758
e6e81f1c 6759 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 6760
3a73bffb
JJ
67612002-04-29 Jakub Jelinek <jakub@redhat.com>
6762
6763 PR c++/6477
6764 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
6765 non-NULL first.
6766
33dd07ee
MM
67672002-04-29 Mark Mitchell <mark@codesourcery.com>
6768
6769 PR c++/6492
6770 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
6771 enter that scope before name lookup.
6772
6773 PR c++/6486
6774 * method.c (do_build_copy_constructor): Avoid building
6775 cv-qualified reference types.
500abaa8 6776
4bd7c270
NS
67772002-04-29 Nathan Sidwell <nathan@codesourcery.com>
6778
6779 PR c++/5719
500abaa8 6780 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
6781 by value. operator% should.
6782
45806a3f
FS
67832002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6784
6785 PR c/6343
6786 * decl.c (duplicate_decls): Call merge_weak.
6787
94a50397
RH
67882002-04-26 Richard Henderson <rth@redhat.com>
6789
6790 * parse.y (malloced_yyss, malloced_yyvs): New.
6791 (yyoverflow): Re-add. Set them.
6792 (free_parser_stacks): New.
6793
7d793e9b
MM
67942002-04-26 Mark Mitchell <mark@codesourcery.com>
6795
6796 PR c++/6497
6797 * method.c (do_build_assign_ref): Pass a derivation to
6798 build_method_call when calling base class assignment operators.
6799
bde3c0c0
RH
68002002-04-26 Richard Henderson <rth@redhat.com>
6801
6802 * parse.y (yyoverflow): Revert.
6803
b84a3874
RH
68042002-04-26 Richard Henderson <rth@redhat.com>
6805
6806 PR c/3581
6807 * parse.y (string): Remove. Update all uses to use STRING
6808 instead, and not call combine_strings.
6809 * rtti.c (tinfo_name): Use fix_string_type.
6810 * semantics.c (finish_asm_stmt): Don't call combine_strings.
6811 * spew.c (yylexstring): New.
6812 (read_token): Use it.
6813
6052bef0
RH
68142002-04-25 Richard Henderson <rth@redhat.com>
6815
6816 PR c/2161
6817 * parse.y (yyoverflow): New.
6818
8d1f0f67
JM
68192002-04-25 Jason Merrill <jason@redhat.com>
6820
6821 PR c++/5607
6822 * search.c (check_final_overrider): No longer static.
6823 * class.c (update_vtable_entry_for_fn): Call it.
6824 * cp-tree.h: Adjust.
6825
ff45c01e
NB
68262002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
6827
6828 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6829 * cp-tree.h (cxx_set_yydebug): Die.
6830 * lex.c (YYDEBUG): Get from c-lex.h.
6831 (cxx_set_yydebug): Remove.
6832 * parse.y: Include c-lex.h.
6833 (YYDEBUG): Get from c-lex.h.
6834
a62d375f
MM
68352002-04-24 Mark Mitchell <mark@codesourcery.com>
6836
6837 PR c++/6438.
6838 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
6839 void.
6840
349ae713
NB
68412002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
6842
6843 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
6844 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
6845 Redefine.
6846 * cp-tree.h (cp_attribute_table): Rename.
6847 * decl.c (lang_attribute_table): Remove declaration.
6848 (cxx_init_decl_processing): Don't set it.
6849 * tree.c (cp_attribute_table): Rename.
6850
b602511f
JM
68512002-04-24 Jason Merrill <jason@redhat.com>
6852
985723ce
JM
6853 PR c++/6331
6854 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
6855 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
6856 The pedwarn for array assignment is now unconditional.
6857 * tree.c (build_cplus_array_type_1): Still process simple array types
6858 normally in templates.
985723ce 6859
b602511f
JM
6860 PR c++/6395
6861 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
6862 stuff for comdats.
6863
29cece2e
JJ
68642002-04-23 Jakub Jelinek <jakub@redhat.com>
6865
6866 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
6867 node with attributes.
6868
515387dc
DB
68692002-2-23 David O'Brien <obrien@FreeBSD.org>
6870
6871 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
6872 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
6873
77adef84
MM
68742002-04-23 Mark Mitchell <mark@codesourcery.com>
6875
6876 PR c++/6256:
6877 * pt.c (tsubst_friend_class): Handle templates with explicit
6878 nested names.
6879
6880 PR c++/6331:
6881 * typeck.c (merge_types): Remember the cv-qualification of pointer
6882 types when merging them.
6883
b03e38e1
NB
68842002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
6885
6886 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
6887 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
6888 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6889 cxx_mark_function_context): New.
6890 * decl.c (push_cp_function_context, pop_cp_function_context,
6891 mark_cp_function_context): Rename for consistency.
6892 (cxx_init_decl_processing): Don't set old hooks.
6893
ab393bf1
NB
68942002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
6895
6896 * call.c (convert_type_from_ellipsis): Rename, update.
6897 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
6898 * cp-tree.h (convert_type_from_ellipsis): Rename.
6899 * decl.c (cxx_init_decl_processing): Don't set hook.
6900
7a228918
NB
69012002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
6902
6903 * call.c (build_new_method_call): Update.
6904 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
6905 * cp-tree.h (cxx_incomplete_type_error): New.
6906 * decl.c (grokdeclarator, grokparms): Update.
6907 * decl2.c (check_classfn): Update.
6908 * pt.c (tsubst): Update.
6909 * typeck.c (complete_type_or_else, expr_sizeof,
6910 decay_conversion): Update.
6911 * typeck2.c (incomplete_type_error): Rename.
6912 (add_exception_specifier): Update.
6913
8152c320
JM
69142002-04-18 Jason Merrill <jason@redhat.com>
6915
6916 PR c++/5658
6917 * search.c (setup_class_bindings): A class template qualifies as a
6918 type binding.
6919
32121b96
JJ
69202002-04-17 Jakub Jelinek <jakub@redhat.com>
6921
6922 PR c++/6316
6923 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
6924 before expanding.
6925
b2123dc0
MM
69262002-04-16 Mark Mitchell <mark@codesourcery.com>
6927
6928 * init.c (begin_init_stmts): Remove commented out code.
6929 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6930 * semantics.c (begin_gobal_stmt_expr): Adjust call to
6931 expand_start_stmt_expr.
500abaa8 6932
0f268005
MM
69332002-04-15 Mark Mitchell <mark@codesourcery.com>
6934
6935 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6936 dso_handle itself, to __cxa_atexit.
6937
bd6bec6b
GDR
69382002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6939
6940 * error.c (cxx_print_error_function): Adjust call to macros.
6941
0f490a2b
JJ
69422002-04-14 Jakub Jelinek <jakub@redhat.com>
6943
6944 * class.c (layout_virtual_bases): Do all dsize computation on trees.
6945
85b7def6
JM
69462002-04-14 Jason Merrill <jason@redhat.com>
6947
6948 * typeck.c (get_member_function_from_ptrfunc): Don't do
6949 gratuitious division and multiplication on
6950 ptrmemfunc_vbit_in_delta targets.
6951
0481bc21
MM
69522002-04-12 Mark Mitchell <mark@codesourcery.com>
6953
6954 PR c++/5373.
6955 * semantics.c (finish_expr_stmt): Remember the type of the
6956 expression before any conversions are performed.
6957
9928a3d5
MM
69582002-04-12 Mark Mitchell <mark@codesourcery.com>
6959
6960 PR c++/5189.
6961 * call.c (add_template_candidate_real): Do not treat member
6962 templates as copy constructors.
6963
c740732f
MM
69642002-04-12 Mark Mitchell <mark@codesourcery.com>
6965
6966 * decl.c (duplicate_decls): Do not copy the RTL for a variable
6967 declaration if the old variable had an incomplete type and the new
6968 variable does not.
6969 (complete_vars): Do not call layout_decl for completed variables.
6970
4782bd5b
RS
69712002-04-12 Richard Sandiford <rsandifo@redhat.com>
6972
6973 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6974 with an explicit one.
6975 (follow_tag_typedef): New.
6976 (lookup_tag): Use it to extract the tag of an explicit typedef.
6977 (xref_tag): Likewise.
6978
2f4d058f
AH
69792002-04-11 Andrew Haley <aph@redhat.com>
6980
6981 * typeck.c (type_after_usual_arithmetic_conversions):
6982 If two types have the same variant, return immediately.
500abaa8 6983 When two floating-point operands are the same precision:
2f4d058f
AH
6984 convert to float if one of the operands is float;
6985 if neither operand is one of the standard types, return the type
6986 of the first operand.
500abaa8 6987
ba3307c0
NS
69882002-04-10 Nathan Sidwell <nathan@codesourcery.com>
6989
6990 PR c++/5507
6991 * decl.c (make_typename_type): Remove implicit typenameness.
6992
cd6af0c1
JM
69932002-04-09 Jason Merrill <jason@redhat.com>
6994
edf5cd1d
JM
6995 PR optimization/6189
6996 * semantics.c (genrtl_start_function): Don't free
6997 DECL_SAVED_FUNCTION_DATA for inline functions.
6998
cd6af0c1
JM
6999 * init.c (build_member_call): For now, don't convert to
7000 intermediate base if it would cause an error.
7001
224e6091
PC
70022002-04-08 Paolo Carlini <pcarlini@unitus.it>
7003
7004 * parse.y (namespace_qualifier, maybe_identifier,
7005 begin_explicit_instantiation, end_explicit_instantiation,
7006 apparent_template_type, .finish_template_type,
7007 do_id, maybe_init, defarg_again, component_decl_1):
7008 Add ending ';', in accordance with POSIX.
7009
0154eaa8
MM
70102002-04-06 Mark Mitchell <mark@codesourcery.com>
7011
7012 PR c++/5571
7013 * class.c (layout_class_type): Remember incomplete static
7014 variables.
7015 (finish_struct_1): Call complete_vars, not
7016 hack_incomplete_structures.
7017 * cp-tree.h (hack_incomplete_structures): Rename to ...
7018 (complete_vars): ... this.
7019 (struct saved_scope): Remove incomplete.
7020 (namespace_scope_incomplete): Remove.
7021 * decl.c (struct binding_level): Remove incomplete.
7022 (incomplete_vars): New variable.
7023 (mark_binding_level): Don't mark incomplete.
7024 (print_binding_level): Don't print it.
7025 (mark_saved_scope): Don't mark incomplete.
7026 (pushdecl): Use maybe_register_incopmlete_var.
7027 (cxx_init_decl_processing): Register incomplete_vars for GC.
7028 (start_decl_1): Clarify error message.
7029 (hack_incomplete_vars): Remove.
7030 (maybe_register_incomplete_var): New function.
7031 (complete_vars): Likewise.
7032
f62ea157
JM
70332002-04-06 Jason Merrill <jason@redhat.com>
7034
03da5286
JM
7035 PR c++/4934
7036 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7037 set before checking it.
7038
a29e1034
JM
7039 PR c++/525
7040 * init.c (build_member_call): Use build_scoped_ref.
7041 (resolve_offset_ref): Likewise.
7042 * call.c (build_scoped_method_call): Likewise.
500abaa8 7043 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
7044 wrong.
7045 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7046 * cp-tree.h: Adjust.
500abaa8 7047
a29e1034
JM
7048 * init.c (push_base_cleanups): Just use build_scoped_method_call.
7049
f62ea157 7050 PR c++/6179
500abaa8 7051 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
7052 synthesize_exception_spec.
7053
78ef5b89
NB
70542002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7055
7056 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7057 * cvt.c: Update comment.
7058 * init.c (expand_cleanup_for_base): Update.
7059 * semantics.c (finish_parenthesized_expr): Update.
7060 * typeck.c (cp_truthvalue_conversion): Update.
7061
dffa4176
JM
70622002-04-04 Jason Merrill <jason@redhat.com>
7063
659e5a7a
JM
7064 * semantics.c (finish_eh_cleanup): New fn.
7065 * cp-tree.h: Add prototype.
500abaa8 7066 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
7067 finish_eh_cleanup.
7068 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7069 * cp-tree.h: Remove references.
7070 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7071 * dump.c (cp_dump_tree): Likewise.
7072 * pt.c (tsubst_expr): Likewise.
7073 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7074 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7075 * tree.c (cp_statement_code_p): Likewise.
7076
7077 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7078
7079 PR c++/5636
7080 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7081 cleanup for nrv.
7082
dffa4176
JM
7083 PR c++/5104
7084 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7085 specifiers.
7086 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7087
ef4f94ac
RH
70882002-04-03 Richard Henderson <rth@redhat.com>
7089
7090 * cp-lang.c (cxx_warn_unused_global_decl): New.
7091 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7092
599bba86
NB
70932002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
7094
7095 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7096 * tree.c (init_tree): Don't set hook.
7097
cba2004a
RS
70982002-04-03 Roger Sayle <roger@eyesopen.com>
7099
7100 PR c++/5998:
7101 * decl.c (duplicate_decls): Don't mess with assembler names when
7102 redeclaring builtin functions as static.
7103
dffd7eb6
NB
71042002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7105
7106 * call.c (build_addr_func): Update.
7107 * class.c (resolve_address_of_overloaded_function): Update.
7108 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7109 * cp-tree.h (cxx_mark_addressable): New.
7110 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7111 * decl2.c (build_cleanup): Update.
7112 * except.c (build_throw): Update.
7113 * init.c (resolve_offset_ref): Update.
7114 * pt.c (convert_nontype_argument): Update.
7115 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7116 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7117 unary_complex_lvalue): Update.
7118 (mark_addressable): Rename.
7119
04a9d080
RS
71202002-04-01 Roger Sayle <roger@eyesopen.com>
7121
7122 PR c++/5998:
7123 * decl.c (duplicate_decls): Overwrite the RTL when (and only
7124 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
7125 but follow the SET_DECL_RTL idiom used elsewhere in the function.
7126
ceef8ce4
NB
71272002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7128
7129 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7130 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7131 * decl.c (grokdeclarator): Update.
7132 * mangle.c (write_integer_cst): Update.
7133 * typeck.c (build_binary_op): Update.
7134
48a7a235
NB
71352002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7136
7137 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7138 * lex.c (cxx_init): Don't set hook.
7139
7cb32822
NB
71402002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7141
7142 * Make-lang.in (error.o): Update.
7143 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7144 * cp-tree.h (struct diagnostic_context): Predeclare.
7145 (cxx_print_error_function): New.
7146 * error.c: Include langhooks-def.h.
7147 (lang_print_error_function): Rename. Update.
7148 (init_error): Don't set hook.
7149
b0c48229
NB
71502002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7151
7152 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7153 Redefine.
7154 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7155 * decl.c (finish_enum): Similarly.
7156 * error.c (dump_type): Similarly.
7157 * lex.c (cxx_init): Similarly.
7158 * mangle.c (write_builtin_type): Similarly.
7159 * typeck.c (comptypes): Similarly.
7160
d52e4867
RS
71612002-03-28 Roger Sayle <roger@eyesopen.com>
7162
7163 PR c++/5998:
7164 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7165 in the g++ front-end.
7166 (duplicate_decl): Allow redefinition of anticipated built-ins.
7167 Fix inlining problem by over-writing the old DECL_RTL.
7168 (lookup_namespace_name): Fail to find an identifier in the
7169 specified namespace if its still anticipated.
7170 (builtin_function_1): New function split out from builtin_function
7171 to create a builtin in the current namespace with given context.
7172 (builtin_function): Call builtin_function_1 to define the
7173 appropriate builtins in both the std and global namespaces.
7174 (select_decl): Don't test for anticipated decls here.
7175 (unqualified_namespace_lookup): Instead ignore them whilst
7176 searching through scopes and namespaces.
7177 * decl2.c (do_nonmember_using_decl): If a using declaration
7178 specifies an anticipated built-in function, mark it as no longer
7179 anticipated in that scope.
7180 (ambiguous_decl): Avoid resolving to an anticipated decl.
7181 * lex.c (do_scoped_id): Fail to find an identifier in the global
7182 namespace if its still anticipated.
7183
f1e639b1
NB
71842002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7185
7186 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7187 * cp-tree.h (cp_make_lang_type): Rename.
7188 * lex.c (cp_make_lang_type): Rename.
7189 (make_aggr_type): Update.
7190 * tree.c (init_tree): Don't set make_lang_type_fn.
7191
c7f4981a
JJ
71922002-03-29 Jakub Jelinek <jakub@redhat.com>
7193
7194 PR c++/6073
7195 * class.c (finish_struct_1): Update static field's DECL_MODE even
7196 if its type is a variant of t.
7197
7ffb4fd2
NB
71982002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7199
7200 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7201 * cp-tree.h (cxx_insert_default_attributes): New.
7202 * decl.c (insert_default_attributes): Rename.
7203
cd4e8331
MM
72042002-03-27 Mark Mitchell <mark@codesourcery.com>
7205
7206 PR c++/4884
7207 * call.c (build_op_delete_call): Allow for the fact the placement
7208 may be a COMPOUND_EXPR.
500abaa8 7209
c9d892a8
NB
72102002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7211
7212 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7213 * cp-tree.h (init_cplus_expand): Remove.
7214 (cxx_expand_expr): New.
7215 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7216 fix prototype.
7217 (init_cplus_expand): Remove.
7218 * lex.c (cxx_init): Don't call init_cplus_expand.
7219
46ff5047
MM
72202002-03-26 Mark Mitchell <mark@codesourcery.com>
7221
7222 PR c++/4884.
7223 * init.c (build_new_1): Allow for the fact the result of
7224 build_function_call may be a COMPOUND_EXPR.
7225
6d4c57a0
NS
72262002-03-26 Nathan Sidwell <nathan@codesourcery.com>
7227
7228 PR c++/5682
7229 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7230 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7231 (dfs_skip_nonprimary_vbases_markedp): Remove.
7232 * search.c (get_shared_vbase_if_not_primary): Remove.
7233 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7234 (dfs_skip_nonprimary_vbases_markedp): Remove.
7235 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7236 (dfs_marked_real_bases_queue_p): Likewise.
7237
4f0ade92
NB
72382002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7239
7240 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7241 * cp-tree.h (cxx_mark_tree): New.
7242 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7243
c88770e9
NB
72442002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7245
7246 * cp-tree.h (cxx_maybe_build_cleanup): New.
7247 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7248 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7249 * tree.c (build_target_expr): Update.
7b3e5198 7250 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 7251
aaf93206
NB
72522002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
7253
7254 * decl2.c (cxx_decode_option): Handle -E.
7255 * lang-specs.h (default_compilers): Preprocess with cc1plus.
7256 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7257
e756a7da
JJ
72582002-03-23 Jakub Jelinek <jakub@redhat.com>
7259
7260 PR c++/6037
7261 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7262
ea9264e9
GDR
72632002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7264
7265 * error.c (dump_type): Be careful about implicit typenames.
7266
acb044ee
GDR
72672002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7268
7269 PR C++/3656
7270 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 7271 classes.
acb044ee 7272
b216cd4a
ZW
72732002-03-22 Zack Weinberg <zack@codesourcery.com>
7274
7275 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7276 REAL_IS_NOT_DOUBLE.
7277
9181f8db
JK
72782002-03-22 Jeff Knaggs <jknaggs@redhat.com>
7279
cd6af0c1
JM
7280 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7281 an index into the vtable_entry array regardless of
9181f8db
JK
7282 TARGET_PTRMEMFUNC_VBIT_LOCATION.
7283
e019cf95
AH
72842002-03-21 Aldy Hernandez <aldyh@redhat.com>
7285
84d901be 7286 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 7287
43577e6b
NB
72882002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7289
7290 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7291 insert_block, getdecls, global_bindings_p): New.
7292
8c152bad
NS
72932002-03-20 Nathan Sidwell <nathan@codesourcery.com>
7294
7295 PR c++/4361
7296 * mangle.c (struct globals) Add internal_mangling_p member.
7297 (write_template_param): Do internal mangling, if needed.
7298 (mangle_conv_op_name_for_type): Request internal mangling.
7299
e3fe84e5
JM
73002002-03-20 Jason Merrill <jason@redhat.com>
7301
7302 PR c++/2136
7303 * init.c (build_delete): Check access for a member op delete here.
7304 * decl2.c (delete_sanity): Not here.
7305
ea122333
JM
73062002-03-19 Jason Merrill <jason@redhat.com>
7307
7308 PR c++/5118
7309 * class.c (get_vfield_name): Use the constructor_name.
7310
7afff7cf
NB
73112002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7312
7313 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7314 * cp-tree.h (lang_printable_name): Rename.
7315 * error.c (lang_decl_name): Use new hook.
7316 * lex.c (cxx_init): Remove old hook.
7317 * pt.c (tsubst_decl): Use new hook.
7318 * tree.c (lang_printable_name): Rename.
7319
ff77ac85
EB
73202002-03-18 Eric Botcazou <ebotcazou@multimania.com>
7321
7322 PR c++/3882
7323 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7324 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7325 only after recording the declaration.
7326
ffd696af
JM
73272002-03-18 Jason Merrill <jason@redhat.com>
7328
097955f2
JM
7329 PR c++/2039
7330 * init.c (resolve_offset_ref): Hand off to build_component_ref.
7331
b663bcf3
JM
7332 PR c++/4222, c++/5995
7333 * call.c (build_over_call): Fix empty class logic.
7334
0f4237c2
JM
7335 PR c++/3870
7336 * cp-tree.h (struct saved_scope): Add last_parms field.
7337 * decl.c (maybe_push_to_top_level): Save last_function_parms.
7338 (pop_from_top_level): Restore it.
7339
001ad76c
JM
7340 PR c++/4377
7341 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
7342 NON_LVALUE_EXPRs.
7343
7344 PR c++/4003
ed2fa432
JM
7345 * pt.c (tsubst_friend_function): Use decl_namespace_context.
7346
ffd696af
JM
7347 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7348 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7349 type with a nontrivial destructor.
7350
f2606a97
JM
73512002-03-17 Jason Merrill <jason@redhat.com>
7352
7353 PR c++/4460
7354 * class.c (build_base_path): Virtual base layout is fixed in
7355 in-charge [cd]tors.
7356
52dabb6c
NB
73572002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
7358
7359 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7360 * parse.y (yyparse): Remove macro.
7361
beb9c8a2
JM
73622002-03-17 Jason Merrill <jason@redhat.com>
7363
7364 PR c++/5757
7365 * init.c (build_new_1): Pass the right pointer to op delete.
7366
5dd236e2
NS
73672002-03-16 Nathan Sidwell <nathan@codesourcery.com>
7368
7369 PR c++/4361
7370 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
7371 conversion operators go.
7372 (struct lang_decl_flags): Add template_conv_p and unused
7373 bitfields.
7374 (DECL_TEMPLATE_CONV_FN_P): New macro.
7375 * call.c (build_user_type_conversion_1): Don't check second type
7376 conversion of overload set first.
7377 * class.c (add_method): Make sure templated conversion operators
7378 all end up on slot 2.
7379 * lex.c (do_identifier): A conversion operator token might be
7380 satisfied by a templated conversion operator.
5dd236e2
NS
7381 * pt.c (check_explicit_specialization): Use
7382 CLASSTYPE_FIRST_CONVERSION_SLOT.
7383 (template_parm_this_level_p): New function.
7384 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 7385 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
7386 the first slot.
7387 * typeck.c (build_component_ref): Preserve the type of an
7388 conversion operator name on the overload type.
7389 (build_x_function_call): Retrieve the conversion operator name.
7390
0ba20759
RH
73912002-03-15 Richard Henderson <rth@redhat.com>
7392
7393 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
7394
6e4ae815
MM
73952002-03-15 Mark Mitchell <mark@codesourcery.com>
7396
7397 * cp-tree.h (CLEANUP_DECL): Remove.
7398 (CLEANUP_EXPR): Likewise.
7399 * decl.c (destroy_local_var): Simplify.
7400 (maybe_build_cleanup): Tidy.
7401 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
7402 * semantics.c (cp_expand_stmt): Likewise.
7403 * cp/tree.c (cp_statement_code_p): Likewise.
7404
5cc90635
JM
74052002-03-15 Jason Merrill <jason@redhat.com>
7406
6da794e8
JM
7407 PR c++/5857
7408 * decl.c (duplicate_decls): Use merge_types instead of common_type.
7409 * typeck.c (common_type): Just hand off to
7410 type_after_usual_arithmetic_conversions and
7411 composite_pointer_type.
7412 (merge_types): New fn.
7413 (commonparms): Use it instead of common_type.
7414 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
7415 (composite_pointer_type): Also handle attributes.
7416 * cp-tree.h: Declare merge_types.
7417
5cc90635
JM
7418 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
7419 variables.
7420 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
7421
ecb0eece
RH
74222002-03-14 Richard Henderson <rth@redhat.com>
7423
7424 * decl.c: Include c-pragma.h.
7425 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
7426 * Make-lang.in: Update dependencies.
7427
d3f129b3
JJ
74282002-03-14 Jakub Jelinek <jakub@redhat.com>
7429
f6562b37 7430 PR c++/5908
d3f129b3
JJ
7431 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
7432 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
7433
049e6879
RS
74342002-03-12 Richard Sandiford <rsandifo@redhat.com>
7435
7436 * mangle.c (write_builtin_type): Handle 128-bit integers even if
7437 they are not a standard integer type.
7438
872c9284
RS
74392002-03-12 Richard Sandiford <rsandifo@redhat.com>
7440
7441 * cp-tree.h (init_init_processing): Remove declaration.
7442 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
7443 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
7444
2f9834e8
KG
74452002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7446
7447 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
7448 Define.
7449 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
7450 tree_code_length.
7451 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
7452 cplus_tree_code_name): Delete.
7453 (cxx_init): Don't call add_c_tree_codes, instead set
7454 lang_unsafe_for_reeval. Don't try to copy into the various
7455 tree_code arrays.
7456
df867456
NS
74572002-03-12 Nathan Sidwell <nathan@codesourcery.com>
7458
7459 PR c++/5659
7460 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
7461 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
7462 definitions.
7463
ab04e34b
NS
74642002-03-11 Nathan Sidwell <nathan@codesourcery.com>
7465
7466 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
7467 DR209 is now not a defect.
7468 * cp-tree.h (skip_type_access_control): Remove.
7469 * decl.c (grokdeclarator): Do type access control for friend
7470 declarations.
7471 * semantics.c (decl_type_access_control): Don't reset
7472 current_type_lookups.
7473 (save_type_access_control): Always save the lookups.
7474 (skip_type_access_control): Remove.
7475 (finish_class_definition): Don't change type_lookups.
7476
999cc24c
NS
74772002-03-11 Nathan Sidwell <nathan@codesourcery.com>
7478
7479 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
7480 It is incorrect.
7481 * typeck.c (build_static_cast): Compare non-qualified types
7482 with pointer to member conversions.
7483
61eece67
DN
74842002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
7485 Daniel Berlin <dan@dberlin.org>
7486
7487 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
7488 (cxx_get_alias_set): Use it.
7489
644d28d4
KG
74902002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7491
7492 * cp-tree.h (stabilize_expr): Prototype.
7493
7e326356
CR
74942002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
7495
7496 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
7497 conditional return void.
7498
24965e7a
NB
74992002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
7500
7501 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
7502 * cp-tree.h (cxx_unsave): New.
7503 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
7504 (init_tree): Update.
7505
ca7558fc
KG
75062002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7507
7508 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
7509 explicit sizeof/sizeof.
7510 * decl2.c (cxx_decode_option): Likewise.
7511 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
7512
fd87b7a7
NS
75132002-03-02 Nathan Sidwell <nathan@codesourcery.com>
7514
7515 PR c++/775
7516 * decl.c (lookup_tag): Only reject enum/class mismatch, not
7517 class/union mismatch.
7518 * parse.y (check_class_key): New function.
7519 (structsp): Call it.
7520
bfba94bd
MM
75212002-03-01 Michael Matz <matz@suse.de>
7522
7523 * typeck.c (cp_pointer_int_sum): Complete inner type which is
7524 used later by size_in_bytes().
7525
fdc9bf29
PE
75262002-03-01 Phil Edwards <pme@gcc.gnu.org>
7527
7528 * cp-tree.h: Require __GNUC__ to be #defined.
7529 (build_init): Add missing prototype.
7530
6f30f1f1
JM
75312002-03-01 Jason Merrill <jason@redhat.com>
7532
7533 * except.c: Don't include decl.h or obstack.h. Do include
7534 tree-inline.h.
7535 (build_throw): Destroy temporaries from the thrown
500abaa8 7536 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
7537 temporary directly into the exception object.
7538 (stabilize_throw_expr): New function.
7539 (wrap_cleanups_r): New function.
7540 * tree.c (stabilize_expr): New function.
7541 * init.c (build_init): New function.
7542 * Make-lang.in (cp/except.o): Adjust .h deps.
7543
46cfb101
JM
75442002-02-28 Jason Merrill <jason@redhat.com>
7545
07f521fc
JM
7546 * search.c (lookup_base_r): Don't clear is_non_public just because
7547 we found a friendly scope.
7548
46cfb101
JM
7549 * decl.c (finish_function): Only warn about missing return
7550 statement with -Wreturn-type.
7551
63e1b1c4
NB
75522002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
7553
7554 * class.c (build_clone): Update.
7555 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7556 * cp-tree.h (cxx_dup_lang_specific_decl): New.
7557 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
7558 (copy_decl): Update.
7559 * method.c (make_thunk): Update.
7560
f458d1d5
ZW
75612002-02-27 Zack Weinberg <zack@codesourcery.com>
7562
7563 * decl2.c: Delete traditional-mode-related code copied from
7564 the C front end but not used, or used only to permit the
7565 compiler to link.
7566
500abaa8 75672002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
7568
7569 PR c++/4093
7570 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
7571 to void.
7572
25c8b645
JJ
75732002-02-22 Jakub Jelinek <jakub@redhat.com>
7574
7575 PR other/5746
7576 * semantics.c (finish_switch_cond): Don't call get_unwidened
7577 if error_mark_node.
7578
4f2b0fb2
NS
75792002-02-22 Nathan Sidwell <nathan@codesourcery.com>
7580
7581 PR c++/2645, DR 295
7582 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
7583 tf_keep_type_decl.
7584 (make_typename_type): Use tsubst_flags_t.
7585 * decl.c (make_typename_type): Adjust. Return non-artificial
7586 TYPE_DECLs, if required.
7587 (grokdeclarator): Simplify CVR qualification handling. Allow bad
7588 qualifiers on typedef types.
7589 * decl2.c (handle_class_head): Adjust make_typename_type call.
7590 * parse.y (nested_name_specifier): Likewise.
7591 (typename_sub0): Likewise.
7592 (typename_sub1): Likewise.
7593 * pt.c (convert_template_argument): Adjust make_typename_type
7594 return value.
7595 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 7596 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
7597 on template type parms.
7598 (instantiate_decl): Recheck substitutions to give warnings on bad
7599 qualifications.
7600 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
7601
8fc2ba41
AH
76022002-02-21 Aldy Hernandez <aldyh@redhat.com>
7603
84d901be 7604 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 7605
84d901be
AD
7606 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
7607 unless DECL_ALWAYS_INLINE.
8fc2ba41 7608
7552da58
JJ
76092002-02-20 Jakub Jelinek <jakub@redhat.com>
7610
7611 * typeck.c (cp_pointer_int_sum): Renamed from
7612 pointer_int_sum, call pointer_int_sum.
7613
00fae85d
JJ
76142002-02-20 Jakub Jelinek <jakub@redhat.com>
7615
7616 * decl.c (duplicate_decls): Return 0 if issued error about
7617 redeclaration.
7618
6ea868b7
JM
76192002-02-19 Jason Merrill <jason@redhat.com>
7620
500abaa8 7621 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
7622 M1AKFvvE, not MK1AFvvE.
7623 * mangle.c (write_function_type): Write cv-quals for member
7624 function type here.
7625 (write_pointer_to_member_type): Not here.
7626
c02f5e29
JM
76272002-02-18 Jason Merrill <jason@redhat.com>
7628
7629 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
7630 (do_decl_instantiation): Likewise.
7631
624a5800
CR
76322002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
7633
7634 PR c++/5685
7635 * decl.c (duplicate_decls): Make warning unconditional
7636 if duplicate default argument declarations are present.
7637
f6f8ada3
JJ
76382002-02-17 Jakub Jelinek <jakub@redhat.com>
7639
7640 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
7641 shortening.
7642
8d6e459d
NS
76432002-02-15 Nathan Sidwell <nathan@codesourcery.com>
7644
7645 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
7646 remove incorrect comment. Move #if 0'd code to common path. Use
7647 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
7648
ca4feb54
JM
76492002-02-13 Jason Merrill <jason@redhat.com>
7650
57d5032b
JM
7651 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
7652 (finish_function): Don't warn if current_function_returns_null.
7653
bb26522d
JM
7654 * typeck2.c (digest_init): Do handle values of vector type.
7655
ca4feb54
JM
7656 * typeck2.c (digest_init, process_init_constructor): Treat vectors
7657 like arrays.
7658
e6b9638b
JM
76592002-02-11 Jason Merrill <jason@redhat.com>
7660
7661 * parse.y (reserved_declspecs): Don't handle attributes.
7662 (reserved_typespecquals): Handle them here.
7663 * Make-lang.in (parse.c): Adjust expected conflicts.
7664
1cf537c5
JJ
76652002-02-08 Jakub Jelinek <jakub@redhat.com>
7666
7667 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
7668 instead of compstmt.
7669 (compstmt_or_stmtexpr): Renamed from compstmt.
7670 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
7671
c2ea3a40
NS
76722002-02-07 Nathan Sidwell <nathan@codesourcery.com>
7673
7674 Rename instantiate_type_flags to tsubst_flags_t & expand use.
7675 * cp-tree.h (instantiate_type_flags): Rename to ...
7676 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
7677 add tf_warning flag.
7678 (instantiate_type): Adjust prototype.
7679 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
7680 do_type_instantiation, cp_build_qualified_type_real): Likewise.
7681 cp_build_qualified_type: Adjust.
7682 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
7683 tf_*.
7684 * call.c (standard_conversion): Rename itf_* to tf_*.
7685 (reference_binding): Likewise.
7686 (convert_like_real): Likewise.
7687 * cvt.c (cp_convert_to_pointer): Likewise.
7688 (convert_to_reference): Likewise.
7689 * decl.c (lookup_namespace_name): Use tf_* flags.
7690 (make_typename_type): Likewise.
7691 (grokdeclarator): Likewise.
7692 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
7693 (coerce_template_template_parms, convert_template_argument,
7694 coerce_template_parms, maybe_get_template_decl_from_type_decl,
7695 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
7696 instantiate_class_template, tsubst_template_arg_vector,
7697 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 7698 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 7699 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 7700 instantiate_template, fn_type_unification,
500abaa8
AJ
7701 resolve_overloaded_unification, verify_class_unification,
7702 unify, get_bindings_real, do_type_instantiation,
7703 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
7704 tsubst_initializer_list, tsubst_enum,
7705 get_mostly_instantiated_function_type,
7706 invalid_nontype_parm_type_p): Likewise.
7707 * tree.c (cp_build_qualified_type_real): Likewise.
7708 * typeck.c (build_binary_op): Rename itf_* to tf_*.
7709 (build_ptrmemfunc): Likewise.
7710 (convert_for_assignment): Likewise.
7711
d5614afb
NS
77122002-02-07 Nathan Sidwell <nathan@codesourcery.com>
7713
7714 PR c++/109
7715 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 7716 dependent types.
d5614afb
NS
7717 * decl2.c (handle_class_head): Don't push into template parm contexts.
7718 * pt.c (push_template_decl_real): Template parm contexts are never
7719 being defined.
7720
1af6141b
AO
77212002-02-05 Alexandre Oliva <aoliva@redhat.com>
7722
7723 * class.c: Include target.h.
7724 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
7725 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
7726 bit-field layout.
7727 * Make-lang.in: Adjust deps.
7728
d8a6f584
JM
77292002-02-05 Jason Merrill <jason@redhat.com>
7730
7731 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
7732
6f9fdf4d
JJ
77332002-02-04 Jakub Jelinek <jakub@redhat.com>
7734
7735 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
7736 (finish_switch_cond): Set SWITCH_TYPE.
7737
14691f8d
RH
77382002-02-04 Richard Henderson <rth@redhat.com>
7739
7740 * method.c (use_thunk): Always initialize the block tree. Reindent.
7741 * semantics.c (expand_body): Emit thunks after function, not before.
7742
e89a6075
JM
77432002-02-04 Jason Merrill <jason@redhat.com>
7744
7745 * decl.c (start_function): Call cplus_decl_attributes immediately
7746 after grokdeclarator.
7747
7748 * decl.c (start_function): Combine DECL_RESULT handling code.
7749
9780c24f
JM
77502002-02-03 Jason Merrill <jason@redhat.com>
7751
7752 * xref.c: Remove.
7753 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
7754 (cp/xref.o): Remove dependencies.
7755 * class.c (finish_struct_1, check_methods): Don't call xref fns.
7756 (finish_struct_1): Likewise.
7757 * friend.c (make_friend_class): Likewise.
7758 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
7759 * spew.c (read_process_identifier): Likewise.
7760
65f36ac8
JM
77612002-02-01 Jason Merrill <jason@redhat.com>
7762
efe49da0 7763 PR c++/4872
500abaa8 7764 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
7765 no return statement and no abnormal exit.
7766 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
7767 (current_function_returns_abnormally): New macro.
7768 * call.c (build_call): Set it.
7769
f2d9afec
JM
7770 * typeck.c (build_component_ref): Always complain about offsetof
7771 constructs on non-PODs. Only make it an error for members of
7772 virtual bases.
7773
65f36ac8
JM
7774 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
7775 (dump_function_decl): Always dump parms.
7776
7777 * decl2.c (finish_static_data_member_decl): Complain about a local
7778 class with a static data member.
7779
7780 PR c++/4286
7781 * search.c (lookup_field_1): Don't xref a static data member
7782 just because we looked it up.
7783
98884b26
JM
77842002-01-31 Jason Merrill <jason@redhat.com>
7785
b88c0704
JM
7786 * Make-lang.in (parse.c): Handle .output file.
7787
a588fe25
JM
7788 PR c++/3395
7789 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
7790 not TREE_TYPE.
7791 * semantics.c (finish_class_definition): Adjust.
7792
98884b26
JM
7793 Allow attributes in parms and casts.
7794 * parse.y (named_parm): Don't strip attrs.
7795 (declmods): Remove 'attributes' production.
7796 (nonempty_cv_qualifiers): Accept attributes.
7797 (ATTRIBUTE): Give precedence.
7798 * decl.c (groktypename): Handle attributes.
7799 (grokparms): Likewise.
7800
ffdeea47
JJ
78012002-01-29 Jakub Jelinek <jakub@redhat.com>
7802
7803 * decl2.c (cxx_decode_option): Pass 0 as last argument to
7804 cpp_handle_option.
7805 * lang-specs.h: Use cpp_unique_options instead of cpp_options
7806 when used together with cc1_options.
7807
b8b98c66
NS
78082002-01-29 Nathan Sidwell <nathan@codesourcery.com>
7809
7810 PR c++/5132
7811 * typeck2.c (digest_init): Make sure non-array core type is
7812 instantiated.
7813 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
7814 constructor, rather than build a new one.
7815 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
7816 PURPOSE of constructor elts.
7817
7437519c
ZW
78182002-01-23 Zack Weinberg <zack@codesourcery.com>
7819
7820 * Make-lang.in (parse.c): Adjust expected number of
7821 shift-reduce conflicts.
7822 (decl.o): Depend on diagnostic.h.
7823 * decl.c: Include diagnostic.h.
7824 (grokdeclarator): Check for null pointer.
7825 (finish_function): Don't abort when
7826 current_binding_level->parm_flag != 1, if errors have
7827 occurred; throw away the statement tree and extra binding
7828 levels, and continue.
7829 * lex.c (note_list_got_semicolon): Check for null pointer.
7830 * method.c (hack_identifier): Just return error_mark_node if
7831 value is error_mark_node.
7832 * parse.y (primary: TYPEID(type_id)): No need to use
7833 TYPE_MAIN_VARIANT here.
7834 (handler_seq): Accept an empty list of catch clauses and
7835 generate a fake handler block to avoid later crashes.
7836 (ansi_raise_identifier): Accept the error token too.
7837 * semantics.c (begin_class_definition,
7838 finish_class_definition): Check for error_mark_node.
7839
c588e52b
ZW
78402002-01-23 Zack Weinberg <zack@codesourcery.com>
7841
7842 * typeck2.c (friendly_abort): Delete definition.
7843 * cp-tree.h (friendly_abort): Don't prototype.
7844 (my_friendly_assert): Use fancy_abort.
7845
d55ecaa4
CR
78462002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7847
7848 * cp-tree.h (my_friendly_abort): Remove.
7849
0a01c261
JJ
78502002-01-23 Jakub Jelinek <jakub@redhat.com>
7851
7852 * spew.c (pending_inlines, pending_inlines_tail,
7853 processing_these_inlines): Make static.
7854 (mark_pending_inlines): Remove static.
7855 (begin_parsing_inclass_inline): If in function, save pi
7856 for GC to cp_function_chain->unparsed_inlines instead.
7857 (process_next_inline): Likewise.
7858 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
7859 (mark_pending_inlines): Add prototype.
7860 * decl.c (spew_debug): Remove unused extern.
7861 (mark_lang_function): Call mark_pending_inlines.
7862
a98facb0
CR
78632002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7864
c588e52b
ZW
7865 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
7866 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
7867 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
7868 Change my_fancy_abort() to abort().
7869
f893c16e
JM
78702002-01-23 Jason Merrill <jason@redhat.com>
7871
608afcc5
JM
7872 PR c++/5453
7873 * class.c (fixed_type_or_null): Fix thinko.
7874
f893c16e
JM
7875 PR c++/3331
7876 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 7877
b2115575
JM
7878 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
7879
f893c16e
JM
78802002-01-22 Jason Merrill <jason@redhat.com>
7881
b5856475
JM
7882 * parse.y (function_body): Suppress the block for the outermost
7883 curly braces.
7884 * decl.c (pushdecl): Don't try to skip it.
7885 (begin_function_body): Keep the block we create, not the next one.
7886 * init.c (emit_base_init): Don't mess with keep_next_level.
7887
6bc34b14
JM
7888 * class.c (build_base_path): Tweak formatting.
7889
3807621a
NS
78902002-01-19 Nathan Sidwell <nathan@codesourcery.com>
7891
7892 Fix regression introduced with patch for c++/775
7893 * parse.y (class_head_defn): Check for template specializations
7894 with a different class-key.
7895
cdd2559c
JM
78962002-01-17 Jason Merrill <jason@redhat.com>
7897
7898 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
7899 (begin_function_body): Call them and keep_next_level.
7900 * init.c (emit_base_init): Call keep_next_level.
7901 * semantics.c (setup_vtbl_ptr): Lose.
7902 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
7903 (vtbls_set_up_p): Lose.
7904 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
7905 * method.c (do_build_copy_constructor): Likewise.
7906 (synthesize_method): Call finish_mem_initializers.
7907 * parse.y (nodecls): Likewise.
ad6b1795
JM
7908
7909 * error.c (dump_type_suffix): Print the exception specs before
7910 recursing.
7911 (dump_function_decl): Here, too.
7912
7913 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
7914
195a5def
IR
79152002-01-10 Ira Ruben <ira@apple.com>
7916
6bc34b14 7917 PR c++/907
195a5def
IR
7918 * decl.c (start_method): Handle attrlist.
7919
f21ee879
JJ
79202002-01-10 Jakub Jelinek <jakub@redhat.com>
7921
7922 * decl2.c (max_tinst_depth): Increase default limit to 500.
7923
79242002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
7925
7926 * spew.c (YYCHAR): Uppercase macro parameter and add
7927 parenthesis.
7928 (YYCODE): Likewise.
7929 (NAME): Uppercase macro parameter.
7930
c3af729a
GS
79312002-01-09 Graham Stott <grahams@redhat.com>
7932
6bc34b14 7933 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 7934
c3af729a
GS
7935 * semantics.c (FINISH_COND): Uppercase macro paramaters and
7936 add parenthesis.
7937
91800747
GS
79382002-01-08 Graham Stott <grahams@redhat.com>
7939
7940 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7941 (PALLOC): Uppercase macro parameter and whitespace.
7942 (SALLOC): Uppercase macro parameter.
7943 (SFREE): Uppercase macros parameter, add parenthese and
7944 whitespace.
7945 (STREQL): Uppercase macro parameter and whitespace.
7946 (STRNEQ): Likewise.
7947 (STRLSS): Likewise.
7948 (STRLEQ): Likewise.
7949 (STRGTR): Likewise.
7950 (STRGEQ): Likewise.
7951
7952 * call.c (convert_like): Add parenthesis and wrap.
7953 (convert_like_with_context): Likewise.
7954 (ICS_RANK): Whitespace.
7955 (NEED_TEMPORARY_P): Remove parenthesis.
7956
7957 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7958 whitespace.
7959 (VTT_MARKED_BINFO_P): Likewise.
7960
7961 * decl.c (BINDING_LEVEL): Add parenthesis.
7962 (DEF_OPERATOR): Likewise.
7963
91800747
GS
7964 * mangle.c (MANGLE_TRACE): Add parenthesis.
7965 (MANGLE_TRACE_TREE): Likewise.
7966 (write_signed_number): Likewise.
7967 (write_unsigned_number): Likewise.
7968
7969 * pt.c (ccat): Uppercase macro parameter.
7970 (cat): Likewise
7971
7972 * search.c (SET_BINFO_ACCESS): Add parenthesis.
7973
15eb1e43
JM
79742002-01-07 Jason Merrill <jason@redhat.com>
7975
7976 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7977 to pedwarn.
7978
6bc34b14 7979 PR c++/3536
15eb1e43
JM
7980 * method.c (make_thunk): If !flag_weak, give the thunk the
7981 function's linkage.
7982 (use_thunk): Here, too.
7983
b34c06e3
GS
79842002-01-07 Graham Stott <grahams@redhat.com>
7985
6bc34b14
JM
7986 * error.c: Update copyright date.
7987 (print_scope_operator): Add parenthesis.
7988 (print_left_paren): Likewise.
7989 (print_right_paren): Likewise.
7990 (print_left_bracket): Likewise.
7991 (print_right_bracket): Likewise.
7992 (print_template_argument_list_start): Likewise.
7993 (print_template_argument_list_end): Likewise.
7994 (print_non_consecutive_character): Likewise.
7995 (print_tree_identifier): Likewise.
7996 (print_identifier): Likewise.
7997 (NEXT_CODE): Uppercase macro parameter.
7998 (ident_fndecl): Delete unused.
7999 (GLOBAL_THING): Likewise.
b34c06e3 8000
98e40e83
GS
80012002-01-06 Graham Stott <grahams@redhat.com>
8002
8003 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8004 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8005 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8006 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8007 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8008 (C_IS_RESERVED_WORD): Uppercase macro parameter.
8009 (C_RID_YYCODE) Likewise.
8010 (ptrmem_cst): Use rtx.
8011 (LOCAL_BINDING_P): Add whitespace.
8012 (INHERITED_VALUE_BINDING_P): Likewise.
8013 (BINDING_SCOPE): Wrap long line.
8014 (BINDING_HAS_LEVEL_P): Remove parenthesis.
8015 (BINDING_VALUE): Wrap long line.
8016 (BINDING_TYPE): Whitespace.
8017 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8018 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 8019 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
8020 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8021 (same_type_p): Uppercase macro parameters.
8022 (same_type_ignoring_top_level_qualifiers_p): Likewise.
8023 (OVL_FUNCTION): Wrap long line.
8024 (OVL_CHAIN): Whitespace.
b34c06e3 8025 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
8026 (OVL_NEXT): Whitespace.
8027 (OVL_USED): Likewise.
8028 (IDENTIFIER_TYPE_VALUE): Likewise.
8029 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8030 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8031 (LANG_ID_FIELD): Whitespace.
8032 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8033 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8034 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8035 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8036 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8037 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8038 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8039 (IDENTIFIER_VIRTUAL_P): Likewise.
8040 (IDENTIFIER_OPNAME_P): Likewise.
8041 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8042 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8043 (C_SET_EXP_ORIGINAL_CODE): Likewise.
8044 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8045 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8046 (IS_AGGR_TYPE): Uppercase macro parameter.
8047 (CLASS_TYPE_P): Likewise.
8048 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8049 (IS_AGGR_TYPE_2): Whitespace.
8050 (TAGGED_TYPE_P): Uppercase macro parameter.
8051 (TYPE_BUILT_IN): Whitespace.
8052 (TYPE_FOR_JAVA): Likewise.
8053 (FUNCTION_ARG_CHAIN): Remove parenthesis.
8054 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8055 (FUNCTION_FIRST_USER_PARAM): Likewise.
8056 (PROMOTES_TO_AGGR_TYPE): Whitespace.
8057 (DERIVED_FROM_P): Add parenthesis and wrap.
8058 (UNIQUELY_DERIVED_FROM_P): Likewise.
8059 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8060 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8061 (CLASSTYPE_USE_TEMPLATE): Whitespace.
8062 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8063 (TYPE_GETS_DELETE): Add parenthesis.
8064 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8065 (TYPE_HAS_ASSIGN_REF): Likewise,
8066 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8067 (TYPE_HAS_INIT_REF): Likewise.
8068 (TYPE_HAS_CONST_INIT_REF): Likewise.
8069 (TYPE_BEING_DEFINED): Likewise.
8070 (TYPE_LANG_SPECIFIC): Likewise.
8071 (CLASSTYPE_RTTI): Likewise.
8072 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8073 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8074 (TYPE_OVERLOADS_ARROW): Likewise.
8075 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8076 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8077 (CLASSTYPE_METHOD_VEC): Likewise.
8078 (CLASSTYPE_MARKED_N): Likewise.
8079 (CLASSTYPE_MARKED): Likewise.
8080 (CLASSTYPE_MARKED2): Likewise.
8081 (CLASSTYPE_MARKED3): Likewise.
8082 (CLASSTYPE_MARKED4): Likewise.
8083 (CLASSTYPE_MARKED5): Likewise.
8084 (CLASSTYPE_MARKED6): Likewise.
8085 (SET_CLASSTYPE_MARKED): Whitespace.
8086 (CLEAR_CLASSTYPE_MARKED): Likewise.
8087 (SET_CLASSTYPE_MARKED2): Likewise.
8088 (CLEAR_CLASSTYPE_MARKED2): Likewise.
8089 (SET_CLASSTYPE_MARKED3): Likewise.
8090 (CLEAR_CLASSTYPE_MARKED3): Likewise.
8091 (SET_CLASSTYPE_MARKED4): Likewise.
8092 (CLEAR_CLASSTYPE_MARKED4): Likewise.
8093 (SET_CLASSTYPE_MARKED5): Likewise.
8094 (CLEAR_CLASSTYPE_MARKED5): Likewise.
8095 (SET_CLASSTYPE_MARKED6): Likewise.
8096 (CLEAR_CLASSTYPE_MARKED6): Likewise.
8097 (CLASSTYPE_TAGS): Likewise.
8098 (CLASSTYPE_VSIZE): Likewise.
8099 (CLASSTYPE_VBASECLASSES): Likewise.
8100 (CANONICAL_BINFO): Add parenthesis.
8101 (CLASSTYPE_SIZE(NODE): Likewise.
8102 (CLASSTYPE_SIZE_UNIT): Likewise.
8103 (CLASSTYPE_ALIGN(NODE): Likewise.
8104 (CLASSTYPE_USER_ALIGN): Likewise.
8105 (TYPE_JAVA_INTERFACE): Likewise.
8106 (CLASSTYPE_PURE_VIRTUALS): Likewise.
8107 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8108 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8109 (CLASSTYPE_HAS_MUTABLE): Likewise.
8110 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8111 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8112 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8113 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8114 (CLASSTYPE_INTERFACE_ONLY): Likewise.
8115 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8116 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8117 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8118 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8119 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8120 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8121 (BINFO_UNSHARED_MARKED): Whitespace.
8122 (BINFO_MARKED): Whitespace and wrap.
8123 (SET_BINFO_MARKED): Likewise.
8124 (CLEAR_BINFO_MARKED): Likewise.
8125 (BINFO_VTABLE_PATH_MARKED): Likewise.
8126 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8127 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8128 (BINFO_SUBVTT_INDEX): Remove parenthesis.
8129 (BINFO_VPTR_INDEX): Likewise.
8130 (BINFO_PRIMARY_BASE_OF): Likewise,
8131 (CLASSTYPE_VFIELDS): Whitespace.
8132 (VF_DERIVED_VALUE): Wrap long line.
8133 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
8134 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8135 (DEFARG_POINTER): Whitespace.
8136 (DECL_NEEDED_P): Remove parenthesis.
8137 (DECL_LANGUAGE): Whitespace.
8138 (SET_DECL_LANGUAGE): Add parenthesis.
8139 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8140 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8141 (DECL_IN_AGGR_P): Whitespace.
8142 (DECL_FRIEND_P): Likewise.
8143 (DECL_BEFRIENDING_CLASSES): Likewise.
8144 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8145 (DECL_NONCONVERTING_P): Whitespace.
8146 (DECL_PURE_VIRTUAL_P): Likewise.
8147 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8148 (DECL_PENDING_INLINE_INFO): Whitespace.
8149 (DECL_SORTED_FIELDS): Likewise.
8150 (DECL_DEFERRED_FN): Likewise.
8151 (DECL_TEMPLATE_INFO): Likewise.
8152 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8153 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8154 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8155 (TMPL_ARGS_LEVEL): Likewise.
8156 (SET_TMPL_ARGS_LEVEL): Likewise.
8157 (INNERMOST_TEMPLATE_PARMS): Whitespace.
8158 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8159 (INTEGRAL_CODE_P(CODE): Add parenthesis.
8160 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8161 (TYPE_HAS_CONSTRUCTOR): Whitespace.
8162 (TREE_HAS_CONSTRUCTOR): Likewise.
8163 (TYPE_HAS_DESTRUCTOR): Likewise.
8164 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8165 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8166 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8167 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8168 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8169 (TYPE_PTRMEMFUNC_P): Likewise.
8170 (TYPE_PTRMEMFUNC_FLAG): Likewise.
8171 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8172 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8173 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8174 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8175 (DECL_ACCESS): Whitespace.
8176 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8177 (DECL_GLOBAL_DTOR_P): Likewise.
8178 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 8179 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
8180 (DECL_TEMPLATE_RESULT): Likewise.
8181 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8182 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8183 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8184 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8185 (PRIMARY_TEMPLATE_P): Add parenthesis.
8186 (DECL_USE_TEMPLATE): Whitespace.
8187 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8188 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8189 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8190 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8191 (CALL_DECLARATOR_PARMS): Remove parenthesis.
8192 (CALL_DECLARATOR_QUALS): Likewise.
8193 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8194 (TEMP_NAME_P): Wrap.
8195 (VFIELD_NAME_P): Likewise.
8196 (B_SET): Uppercase macro parameters and add parenthesis.
8197 (B_CLR): Likewise.
8198 (B_TST): Likewise.
8199 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8200 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8201 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8202 (same_or_base_type_p): Likewise.
8203 (cp_deprecated): Likewise.
98e40e83 8204
c28abdf0
RH
82052002-01-05 Richard Henderson <rth@redhat.com>
8206
15eb1e43 8207 * semantics.c (expand_body): Revert last change.
c28abdf0 8208
f11ee281
JM
82092002-01-04 Jason Merrill <jason@redhat.com>
8210
195a5def 8211 PR c++/4122
f11ee281
JM
8212 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8213 lost primary.
8214
8215 * class.c (build_vtbl_initializer): Check for a lost primary
8216 before calculating the vtable entry to throw away.
8217
a4200657
JM
82182002-01-02 Jason Merrill <jason@redhat.com>
8219
8220 * semantics.c (expand_body): Call outlining_inline_function when
8221 emitting an inline function out of line.
8222
40e593d7
NS
82232002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8224
8225 PR c++/5116, c++/764 reversion
8226 * call.c (build_new_op): Revert the instantiations. They are
8227 incorrect.
c588e52b 8228
323728aa
NS
82292002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8230
8231 PR c++/5089
8232 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8233
46c895ac
NS
82342002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8235
8236 PR c++/3716
8237 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8238 (tsubst, case POINTER_TYPE): Handle pmfs here.
8239 (tsubst, case OFFSET_TYPE): Check it is not an offset to
8240 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8241
833aa4c4
NS
82422002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8243
8244 PR c++/35
8245 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8246 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8247 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8248 PARM_DECL.
8249 (tsubst_template_parms): Break up loop statements.
8250 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8251 parm PARM_DECLs don't get promoted.
8252
18976b21
NS
82532002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8254
8255 PR c++/5123
8256 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8257 (build_x_function_call): Cope with a COMPONENT_REF containing a
8258 TEMPLATE_ID_EXPR.
8259
303d1c55
NS
82602002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8261
8262 PR c++/5213
8263 * pt.c (convert_template_argument): Be more careful determining
8264 when RECORD_TYPE templates are or are not templates.
8265
d46a33b3
NS
82662002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8267
8268 PR c++/775
8269 * cp-tree.h (handle_class_head): Adjust prototype.
8270 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8271 parameters. Use for all class heads.
8272 * parse.y (named_class_head_sans_basetype, named_class_head,
8273 named_complex_class_head_sans_basetype,
8274 named_class_head_sans_basetype_defn,
8275 unnamed_class_head): Remove.
8276 (class_head, class_head_apparent_template): Recognize class heads
8277 (class_head_decl, class_head_defn): New reductions. Process class
8278 heads.
8279 (structsp): Adjust class definition and class declaration
8280 reductions.
8281 (maybe_base_class_list): Give diagnostic on empty list.
8282
4542128e
NS
82832002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8284
8285 PR c++/4379
8286 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8287 single non-static member.
8288 (unary_complex_lvalue): If it cannot be a pointer to member, don't
8289 make it so. Check it is not pointer to reference.
8290
903c6234
NS
82912002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8292
8293 PR c++/5132
8294 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8295 are processing a template decl.
8296
477558bf
NS
82972002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8298
8299 PR c++/5116, c++/764
8300 * call.c (build_new_op): Make sure template class operands are
8301 instantiated. Simplify arglist construction.
8302
41f5d4b1
NS
83032001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8304
8305 * call.c (build_user_type_conversion_1): Use my_friendly_assert
8306 rather than if ... abort.
8307 * cvt.c (convert_to_reference): Likewise.
8308 * semantics.c (setup_vtbl_ptr): Likewise.
8309 * pt.c (lookup_template_class): Comment typo.
c588e52b 8310
f3368a90
NS
83112001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8312
8313 PR c++/5125
8314 * pt.c (push_template_decl_real): Make sure DECL has
8315 DECL_LANG_SPECIFIC.
8316
03c9c274
NS
83172001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8318
8319 PR c++/335
8320 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8321 for non-reference fields.
8322 * typeck.c (require_complete_type): Use resolve_offset_ref).
8323
7d8e8369
NS
83242001-12-26 Nathan Sidwell <nathan@codesourcery.com>
8325
8326 PR c++/196
03c9c274 8327 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 8328
a56ca899
NS
83292001-12-24 Nathan Sidwell <nathan@codesourcery.com>
8330
8331 PR c++/160
8332 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8333 up. Don't stabilize_references when initializing a reference.
8334
0b5826ac
KG
83352001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8336
8337 * decl2.c (lang_f_options): Const-ify.
8338
38be19f6
JM
83392001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8340
8341 * config-lang.in (diff_excludes): Remove.
8342
2e4cf9dc
NS
83432001-12-19 Nathan Sidwell <nathan@codesourcery.com>
8344
8345 PR c++/90
8346 * typeck.c (build_function_call_real): Use original function
8347 expression for errors.
8348
00e4119c
JM
83492001-12-18 Jason Merrill <jason@redhat.com>
8350
195a5def 8351 PR c++/3242
00e4119c
JM
8352 * class.c (add_method): Do compare 'this' quals when trying to match a
8353 used function. Don't defer to another used function.
8354
3ad97789
NS
83552001-12-18 Nathan Sidwell <nathan@codesourcery.com>
8356
8357 * pt.c (instantiate_clone): Remove, fold into ...
8358 (instantiate_template): ... here. Simplify by removing mutual
8359 recursion.
8360 * typeck2.c (build_m_component_ref): Don't cv qualify the function
8361 pointed to by a pointer to function.
8362 * class.c (delete_duplicate_fields_1): Typo.
8363
f21add07
JM
83642001-12-18 Jason Merrill <jason@redhat.com>
8365
8366 C++ ABI change: destroy value arguments in caller.
8367 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
8368 create an extra binding level for the parameters.
8369 * decl.c (store_parm_decls): Don't do parameter cleanups.
8370
ea50ad82
NS
83712001-12-18 Nathan Sidwell <nathan@codesourcery.com>
8372
8373 * call.c (build_new_method_call): Use '%#V'.
8374 * error.c (cv_to_string): Use V parameter to determine padding.
8375
3855d0d1
JM
83762001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
8377
8378 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
8379 spellings in messages.
8380
33bd39a2
ZW
83812001-12-17 Zack Weinberg <zack@codesourcery.com>
8382
8383 * cp-tree.h: Delete #defines for cp_error, cp_warning,
8384 cp_pedwarn, and cp_compiler_error.
8385 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
8386 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
8387 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
8388 typeck2.c: Change calls to the above macros to use their
8389 language-independent equivalents: error, warning, pedwarn, and
8390 internal_error respectively.
8391
317c26c3
NB
83922001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
8393
8394 * decl2.c (finish_file): Remove back_end_hook.
8395
aba649ba
JM
83962001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8397
8398 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
8399 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
8400 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
8401
1737c953
JM
84022001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
8403
8404 * lang-options.h: Use American spelling in messages.
8405
4a90862e
JM
84062001-12-13 Jason Merrill <jason@redhat.com>
8407
ade3dc07
JM
8408 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
8409
8410 Use cleanups to run base and member destructors.
8411 * init.c (push_base_cleanups): New function, split out from...
8412 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
8413 * decl.c (finish_destructor_body): Move vbase destruction code to
8414 push_base_cleanups.
8415 (begin_function_body, finish_function_body): New fns.
8416 (finish_function): Move [cd]tor handling and call_poplevel to
8417 finish_function_body.
8418 (pushdecl): Skip the new level.
8419 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
8420 (setup_vtbl_ptr): Call push_base_cleanups.
8421 * method.c (synthesize_method): Call {begin,end}_function_body.
8422 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
8423 * cp-tree.h: Declare new fns.
8424 * parse.y (function_body, .begin_function_body): New nonterminals.
8425 (fndef, pending_inline, function_try_block): Use function_body.
8426 (ctor_initializer_opt, function_try_block): No longer has a value.
8427 (base_init): Remove .set_base_init token.
8428 (.set_base_init, compstmt_or_error): Remove.
8429 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
8430
4a90862e
JM
8431 * optimize.c (maybe_clone_body): Fix parameter updating.
8432
a0de9d20
JM
84332001-12-12 Jason Merrill <jason@redhat.com>
8434
8435 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
8436 * semantics.c (genrtl_start_function): Don't pass
8437 parms_have_cleanups or push an extra binding level.
8438 (genrtl_finish_function): Lose cleanup_label cruft.
8439
8440 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
8441 (ctor_label): Remove.
8442 * semantics.c (finish_return_stmt): Lose ctor_label support.
8443 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 8444 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
8445 dtor_label.
8446
8447 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
8448 check for [cd]tors.
8449 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
8450
8451 * decl.c (finish_function): Check VMS_TARGET, not VMS.
8452
8453 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
8454 (end_cleanup_fn): And poplevel.
8455
8456 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
8457 if we're in a template.
8458
dc5c569a
JJ
84592001-12-12 Jakub Jelinek <jakub@redhat.com>
8460
8461 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
8462 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
8463 THIS_NAME_P): Delete.
8464 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
8465 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
8466 with internal naming scheme.
8467 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
8468
ad1a6d45
NS
84692001-12-12 Nathan Sidwell <nathan@codesourcery.com>
8470
8471 * decl.c (grokdeclarator): Deprecated implicit typename use.
8472
270d8c65
NS
84732001-12-11 Nathan Sidwell <nathan@codesourcery.com>
8474
8475 PR g++/51
8476 * parse.y (frob_specs): Indicate it is a language linkage which
8477 contained the extern.
8478 * decl.c (grokdeclarator): Allow extern language linkage with
8479 other specifiers.
8480
9aaceb4b
NS
84812001-12-10 Nathan Sidwell <nathan@codesourcery.com>
8482
8483 PR g++/72
8484 * decl.c (add_binding): Don't reject duplicate typedefs involving
8485 template parameters.
8486
a23c9413
NB
84872001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
8488
8489 * parse.y, semantics.c: Similarly.
8490
9aaceb4b 84912001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
8492
8493 PR g++/87
8494 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
8495 (copy_args_p): Rename to ...
8496 (copy_fn_p): ... here.
8497 (grok_special_member_properties): New function.
8498 (grok_op_properties): Lose VIRTUALP parameter.
8499 (copy_assignment_arg_p): Remove.
8500 * call.c (build_over_call): Use copy_fn_p.
8501 * decl.c (grokfndecl): Reformat. Adjust call to
8502 grok_op_properties.
8503 (copy_args_p): Rename to ...
8504 (copy_fn_p): ... here. Reject template functions. Check for pass
8505 by value.
8506 (grok_special_member_properties): Remember special functions.
8507 (grok_ctor_properties): Don't remember them here, just check.
8508 (grok_op_properties): Likewise.
8509 (start_method): Call grok_special_member_properties.
8510 * decl2.c (grokfield): Likewise.
8511 (copy_assignment_arg_p): Remove.
8512 (grok_function_init): Don't remember abstract assignment here.
8513 * pt.c (instantiate_class_template): Call
8514 grok_special_member_properties.
8515 (tsubst_decl): Adjust grok_op_properties call.
8516
bdd8737f
AH
85172001-12-08 Aldy Hernandez <aldyh@redhat.com>
8518
33bd39a2
ZW
8519 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
8520 RID_TYPES_COMPATIBLE_P.
bdd8737f 8521
46af705a
JDA
85222001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8523
8524 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
8525 call to build_aggr_init.
8526 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
8527
cb97d97d
NB
85282001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
8529
8530 * parse.y: Replace uses of the string non-terminal with STRING.
8531 Don't perform string concatentaion here.
8532 (string): Remove non-terminal.
8533 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
8534
742a37d5
JM
85352001-12-05 Jason Merrill <jason@redhat.com>
8536
8537 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
8538 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
8539 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
8540 * pt.c (push_tinst_level): No longer static.
8541 * cp-tree.h: Declare them.
8542
8543 * init.c (resolve_offset_ref): Don't check access for the base
8544 conversion to access a FIELD_DECL.
8545
8546 * cp-tree.h (TYPE_REFFN_P): New macro.
8547 * decl.c (bad_specifiers): Check it, too.
8548
8549 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
8550 on the __*_type_info type if we haven't seen a definition.
8551
26f943fd
NB
85522001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
8553
8554 * decl.c: Include c-common.h.
8555 (shadow_warning): Move to c-common.c.
8556
d2a6f3c0 85572001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
37a08a29
RK
8558
8559 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
8560
9471d3e2
NS
85612001-12-04 Nathan Sidwell <nathan@codesourcery.com>
8562
8563 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
8564
713ccd0c
NS
85652001-12-04 Nathan Sidwell <nathan@codesourcery.com>
8566
8567 PR g++/164
8568 * init.c (sort_base_init): Allow binfos to be directly specified.
8569 * method.c (do_build_copy_constructor): Explicitly convert to the
8570 base instance.
8571 (do_build_assign_ref): Likewise.
8572
591382c4
HPN
85732001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
8574
8575 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
8576 declaration and initialization.
8577
c725bd79
NB
85782001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
8579
8580 * typeck2.c: Remove leading capital from diagnostic messages, as
8581 per GNU coding standards.
8582
a5d7c4a3
MK
85832001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
8584
8585 PR c++/3394
9fe038e8
HPN
8586 * decl.c (xref_basetypes): Handle attributes between
8587 'class' and name.
a5d7c4a3 8588
f1880e13
NS
85892001-12-03 Nathan Sidwell <nathan@codesourcery.com>
8590
8591 PR g++/3381
8592 * parse.y (named_complex_class_head_sans_basetype): Add new
8593 reduction.
8594 * Make-lang.in (parse.c): Adjust expected conflict count.
8595
ff668506
JM
85962001-12-03 Jason Merrill <jason@redhat.com>
8597
8598 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
8599 immediate binfos for our virtual bases.
8600
1f978f5f
NB
86012001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
8602
8603 * call.c (build_java_interface_fn_ref): Similarly.
8604 * except.c (is_admissible_throw_operand): Similarly.
8605 * init.c (build_java_class_ref): Similarly.
8606 * xref.c (open_xref_file): Similarly.
8607
357351e5
NB
86082001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
8609
8610 * class.c (finish_struct): Remove trailing periods from messages.
8611 * decl.c (check_tag_decl): Similarly.
8612 * lex.c (cxx_set_yydebug): Similarly.
8613 * typeck2.c (friendly_abort): Similarly.
8614
998979e6
MM
86152001-11-29 Mark Mitchell <mark@codesourcery.com>
8616
8617 PR c++/3048
8618 * cp-tree.h (ovl_member): Remove.
33bd39a2 8619 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
8620 specially.
8621 * tree.c (ovl_member): Remove.
8622
7d5b8b11
MM
86232001-11-29 Mark Mitchell <mark@codesourcery.com>
8624
8625 PR c++/4842
8626 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
8627 FUNCTION_DECL, as input.
8628 (mark_overriders): Remove.
8629 (warn_hidden): Rework for the new ABI.
8630
b67db529
MM
86312001-11-29 Mark Mitchell <mark@codesourcery.com>
8632
8633 PR c++/3471
8634 * call.c (convert_like_real): Do not build additional temporaries
8635 for rvalues of class type.
8636
2db1ab2d
NS
86372001-11-28 Nathan Sidwell <nathan@codesourcery.com>
8638
8639 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
8640 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
8641 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
8642 (DERIVED_FROM_P): Likewise.
8643 (enum base_access): Renumber, add ba_quiet bit mask.
8644 (get_binfo): Remove.
8645 (get_base_distance): Remove.
8646 (binfo_value): Remove.
8647 (ACCESSIBLY_DERIVED_FROM_P): Remove.
8648 * call.c (standard_conversion): Use lookup_base.
8649 * class.c (strictly_overrides): Likewise.
8650 (layout_virtual_bases): Likewise.
8651 (warn_about_ambiguous_direct_bases): Likewise.
8652 (is_base_of_enclosing_class): Likewise.
8653 (add_vcall_offset_vtbl_entries_1): Likewise.
8654 * cvt.c (build_up_reference): Adjust comment.
8655 * init.c (build_member_call): Reformat.
8656 * search.c (get_binfo): Remove.
8657 (get_base_distance_recursive): Remove.
8658 (get_base_distance): Remove.
8659 (lookup_base_r): Tweak.
8660 (lookup_base): Add ba_quiet control. Complete the types here.
8661 (covariant_return_p): Use lookup_base.
8662 * tree.c (binfo_value): Remove.
8663 (maybe_dummy_object): Use lookup_base.
8664 * typeck.c (build_static_cast): Use lookup_base.
8665 (get_delta_difference): Likewise.
8666 * typeck2.c (binfo_or_else): Use lookup_base.
8667 (build_scoped_ref): Add back error_mark_check.
8668 (build_m_component_ref): Use lookup_base.
8669
d3945f0a
JM
86702001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
8671
8672 * Make-lang.in (c++.generated-manpages): New dummy target.
8673
d2a6f3c0 86742001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ac79cd5a
RK
8675
8676 * Make-lang.in (cp-lang.o): Depends on c-common.h.
8677 * cp-lang.c (c-common.h): Include.
8678 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
8679 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
8680 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
8681
4d6baafa
NB
86822001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
8683
8684 * decl2.c (c_language): Move to c-common.c.
8685 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
8686 functions.
8687 (cxx_init): Update.
8688
5b0c5896
JM
86892001-11-26 Jason Merrill <jason@redhat.com>
8690
8691 * call.c (joust): Remove COND_EXPR hack.
8692
4bdd26e6
AH
86932001-11-25 Aldy Hernandez <aldyh@redhat.com>
8694
195a5def 8695 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 8696 space.
33bd39a2 8697
338d90b8
NS
86982001-11-25 Nathan Sidwell <nathan@codesourcery.com>
8699
8700 PR g++/3145
8701 * class.c (build_vbase_pointer): Remove.
8702 (build_vbase_path): Remove.
8703 (build_base_path): New function.
8704 * cp-tree.h (base_access, base_kind): New enumerations.
8705 (build_base_path): Declare.
8706 (convert_pointer_to_real): Remove.
8707 (convert_pointer_to): Remove.
8708 (lookup_base): Declare.
8709 (convert_pointer_to_vbase): Remove.
8710 * call.c (build_scoped_method_call): Use lookup_base &
8711 build_base_path instead of convert_pointer_to_real,
8712 get_base_distance & get_binfo.
8713 (build_over_call): Likewise.
8714 * cvt.c (cp_convert_to_pointer): Likewise.
8715 (convert_to_pointer_force): Likewise.
8716 (build_up_reference): Likewise.
8717 (convert_pointer_to_real): Remove.
8718 (convert_pointer_to): Remove.
8719 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
8720 instead of convert_pointer_to_vbase & build_vbase_path.
8721 (emit_base_init): Use build_base_path instead of
8722 convert_pointer_to_real.
8723 (expand_virtual_init): Lose unrequired conversions.
8724 (resolve_offset_ref): Use lookup_base and build_base_path
8725 instead of convert_pointer_to.
8726 * rtti.c (build_dynamic_cast_1): Use lookup_base &
8727 build_base_path instead of get_base_distance & build_vbase_path.
8728 * search.c (get_vbase_1): Remove.
8729 (get_vbase): Remove.
8730 (convert_pointer_to_vbase): Remove.
07f521fc 8731 (lookup_base_r): New function.
338d90b8
NS
8732 (lookup_base): New function.
8733 * typeck.c (require_complete_type): Use lookup_base &
8734 build_base_path instead of convert_pointer_to.
8735 (build_component_ref): Likewise.
8736 (build_x_function_call): Likewise.
8737 (get_member_function_from_ptrfunc): Likewise.
8738 (build_component_addr): Likewise.
8739 * typeck2.c (build_scoped_ref): Likewise.
8740
89d684bb
BM
87412001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8742
8743 * cp-tree.h (CP_TYPE_QUALS): Removed.
8744 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 8745 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 8746 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 8747 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
8748 lang-hooks prototype.
8749 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
8750 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
8751 CP_TYPE_QUALS changed to cp_type_quals.
8752 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
8753 (CXX_C_OBJS): Remove c-dump.o.
8754
12eb9f93 87552001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
8756
8757 PR c++/3637
12eb9f93
MM
8758 * pt.c (lookup_template_class): Ensure that all specializations
8759 are registered on the list corresponding to the most general
8760 template.
8761
87622001-11-20 Mark Mitchell <mark@codesourcery.com>
8763
2d2e8123 8764 * call.c (non_reference): Add documentation.
33bd39a2 8765 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
8766 from conversion operators.
8767 (maybe_handle_ref_bind): Simplify.
8768 (compare_ics): Correct handling of references.
8769
78a40378
MM
87702001-11-19 John Wilkinson <johnw@research.att.com>
8771
8772 * dump.c (dump_op): New function.
8773 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
8774 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
8775 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 8776
78a40378
MM
87772001-11-19 Mark Mitchell <mark@codesourcery.com>
8778
8779 PR4629
8780 * semantics.c (finish_sizeof): Make sure that expression created
8781 while processing a template do not have a type.
8782 (finish_alignof): Likewise.
8783 * typeck.c (c_sizeof): Likewise.
8784 (expr_sizeof): Likewise.
8785
22703ccc
NB
87862001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
8787
8788 * lex.c (cxx_finish): Call c_common_finish.
8789 (finish_parse): Remove.
8790
b3faacfd
KL
87912001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8792
8793 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
8794 when displaying error message about missing array bounds.
8795
873ff987
KL
87962001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8797
8798 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
8799 CONST_CAST_EXPR.
8800 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
8801
08f3a861
NB
88022001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
8803
8804 * cp-tree.h (print_class_statistics): Restore.
8805
8a2b77e7
JM
88062001-11-15 Jason Merrill <jason@redhat.com>
8807
3b1a4132
JM
8808 * method.c (use_thunk): Don't emit debugging information for thunks.
8809
8a2b77e7
JM
8810 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
8811 * decl.c (make_typename_type): Handle getting a class template.
8812 * search.c (lookup_field_r): A class template is good enough for
8813 want_type.
8814
8815 * call.c (convert_like_real): Only use cp_convert for the bad part.
8816 (standard_conversion): Also allow bad int->enum.
8817 * typeck.c (ptr_reasonably_similar): Also allow functions to
8818 interconvert. Pointers to same-size integers are reasonably
8819 similar.
8820
8821 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
8822 give it void type.
8823
36a68fe7
NS
88242001-11-15 Nathan Sidwell <nathan@codesourcery.com>
8825
8826 PR g++/3154
8827 * init.c (sort_base_init): Remove unreachable code.
8828 (expand_member_init): Adjust comment to reflect reality. Simplify
8829 and remove unreachable code.
8830
f5e99456
NB
88312001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
8832
8833 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
8834 (cxx_init): Update prototype.
8835 * decl.c (init_decl_processing): Rename. Move null node init
8836 to its creation time.
8837 * lex.c (cxx_init_options): Update.
8838 (cxx_init): Combine with old init_parse; also call
8839 cxx_init_decl_processing.
8840
fe5b6c1c
RS
88412001-11-14 Richard Sandiford <rsandifo@redhat.com>
8842
8a2b77e7
JM
8843 * decl.c (check_initializer): Try to complete the type of an
8844 array element before checking whether it's complete. Don't
8845 complain about arrays with complete element types but an
8846 unknown size.
8847 (cp_finish_decl): Build the hierarchical constructor before
8848 calling maybe_deduce_size_from_array_init.
fe5b6c1c 8849
77bd67cb
JM
88502001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
8851
8852 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
8853
b02922a4
NS
88542001-11-13 Nathan Sidwell <nathan@codesourcery.com>
8855
8856 PR g++/4206
8857 * parse.y (already_scoped_stmt): Remove.
8858 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
8859
abfc1ef6
L
88602001-11-12 H.J. Lu <hjl@gnu.org>
8861
195a5def 8862 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
8863 function is always `true'.
8864
5d69f816
NB
88652001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8866
8867 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
8868 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
8869 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
8870 * cp-tree.h (print_class_statistics): Remove.
8871 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
8872 cxx_print_identifier, cxx_set_yydebug): New.
8873 * lex.c (set_yydebug): Rename c_set_yydebug.
8874 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
8875 lang_print_xnode): Rename.
8876 * tree.c (print_lang_statistics): Rename.
8877
4fdc14ca
KG
88782001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8879
8880 * class.c (dump_array): Fix format specifier warning.
8881
3ac88239
NB
88822001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8883
8884 * cp-lang.c (LANG_HOOKS_NAME): Override.
8885 (struct lang_hooks): Constify.
8886 * lex.c (cxx_init_options): Update.
8887 (lang_identify): Remove.
33bd39a2 8888 * parse.y (language_string): Remove.
3ac88239 8889
b21d216c
AF
88902001-11-08 Andreas Franck <afranck@gmx.de>
8891
8892 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
8893 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
8894 suggested by autoconf.
8895 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
8896 (c++.install-common): Use the transformed target alias names.
8897
d23c55c2
NB
88982001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8899
8900 * Make-lang.in: Update.
8901 * cp-lang.c: Include langhooks-def.h.
8902
2a2b1d56
KL
89032001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8904
8905 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
8906
76648a8b
KG
89072001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8908
8909 * lex.c (copy_lang_type): Add static prototype.
8910
fccef71e
KL
89112001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8912
8913 * pt.c (unify): Handle SCOPE_REF.
8914
19989812
JJ
89152001-11-01 Jakub Jelinek <jakub@redhat.com>
8916
8917 * tree.c (cp_copy_res_decl_for_inlining): Adjust
8918 DECL_ABSTRACT_ORIGIN for the return variable.
8919
5b7874aa
ZW
89202001-10-31 Zack Weinberg <zack@codesourcery.com>
8921
8922 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8923
306ef644
JM
89242001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
8925
8926 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
8927 semantics.c, spew.c: Fix spelling errors.
8928
76543000
KL
89292001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8930
8931 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8932
37207ee7
ZW
89332001-10-25 Zack Weinberg <zack@codesourcery.com>
8934
8935 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8936 pop_everything.
8937
d2a6f3c0 89382001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
8939
8940 * cp-lang.c (cxx_get_alias_set): New function.
8941 Point LANG_HOOKS_GET_ALIAS_SET to it.
8942
f1e09fa2 89432001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
8944
8945 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8946 * cp-tree.h (make_unbound_class_template): Prototype new function.
8947 * decl.c (make_unbound_class_template): New function.
8948 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8949 * error.c (dump_type): Likewise.
8950 * mangle.c (write_type): Likewise.
8951 * parse.y (template_parm): Likewise.
8952 (template_argument): Use make_unbound_class_template.
8953 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8954 (tsubst): Likewise.
8955 (tsubst_copy): Likewise.
8956 (unify): Likewise.
8957 * tree.c (walk_tree): Likewise.
8958 * typeck.c (comptypes): Likewise.
8959
0df6c2c7
KG
89602001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8961
8962 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8963 extra calls into fewer ones.
8964
97055d5c
AO
89652001-10-18 Alexandre Oliva <aoliva@redhat.com>
8966
8967 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8968 Warn when merging inline with attribute noinline.
8969 (start_decl, start_function): Warn if inline and attribute
8970 noinline appear in the same declaration.
8971
b5823a44
L
89722001-10-16 H.J. Lu <hjl@gnu.org>
8973
8974 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8975 for tree checking disabled.
8976
dc8ad298
HPN
89772001-10-16 Hans-Peter Nilsson <hp@axis.com>
8978
8979 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8980 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8981
d9f818d9
RS
89822001-10-15 Richard Sandiford <rsandifo@redhat.com>
8983
8984 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8985 (unify): Only handle MINUS_EXPR specially if the above flag is set
8986 and the subtracted constant is 1. Clear the flag on recursive calls.
8987 Set it when unifying the maximum value in an INTEGER_TYPE's range.
8988
e1be26f4
RS
89892001-10-15 Richard Sandiford <rsandifo@redhat.com>
8990
8991 * decl.c (bad_specifiers): Don't allow exception specifications
8992 on any typedefs.
8993
a5da89c6
NB
89942001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
8995
8996 * cp/lex.c (init_cp_pragma): Similarly.
8997
4f96ff63
KL
89982001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8999
9000 * pt.c (lookup_template_class): Build complete template arguments
9001 for BOUND_TEMPLATE_TEMPLATE_PARM.
9002
11e74ea6
KL
90032001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9004
9005 * cp-tree.h (TYPE_BINFO): Update comment.
9006 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9007 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9008 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9009 (copy_type): Prototype new function.
9010 * lex.c (copy_lang_decl): Gather tree node statistics.
9011 (copy_lang_type): New function.
9012 (copy_type): Likewise.
9013 (cp_make_lang_type): Create lang_type for
9014 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
9015 and BOUND_TEMPLATE_TEMPLATE_PARM.
9016 * pt.c (tsubst): Use copy_type instead of copy_node.
9017 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9018
f5d47abd
KL
90192001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9020
9021 * pt.c (determine_specialization): Ignore functions without
9022 DECL_TEMPLATE_INFO.
9023
e60505a5
NS
90242001-10-12 Nathan Sidwell <nathan@codesourcery.com>
9025
9026 PR g++/4476
9027 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9028
6f32162a
JM
90292001-10-11 Jason Merrill <jason_merrill@redhat.com>
9030
9031 * typeck2.c (store_init_value): Don't re-digest a bracketed
9032 initializer.
9033
9034 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9035 ANON_AGGR_TYPE_P.
9036
4a8d0c9c
RH
90372001-10-11 Richard Henderson <rth@redhat.com>
9038
9039 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9040 of an asm statement.
9041 (build_vtbl_ref_1): Split out from build_vtbl_ref.
9042 (build_vfn_ref): Use it to handle vtable descriptors before
9043 calling build_vtable_entry_ref.
9044 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9045
84b72302
RH
90462001-10-10 Richard Henderson <rth@redhat.com>
9047
37207ee7 9048 * parse.y (asm_operand): Allow named operands.
84b72302 9049 * semantics.c (finish_asm_stmt): Tweek for changed location
4639c5c6 9050 of the operand constraint.
84b72302 9051
48c8b0be 90522001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
9053
9054 * call.c (standard_conversion): Add bad conversion between
9055 integers and pointers.
9056 (convert_like_real): Don't use convert_for_initialization for bad
9057 conversions; complain here and use cp_convert.
9058 (build_over_call): Don't handle bad conversions specially.
9059 (perform_implicit_conversion): Allow bad conversions.
9060 (can_convert_arg_bad): New fn.
9061 * cp-tree.h: Declare it.
9062 * typeck.c (convert_for_assignment): Use it.
9063 (ptr_reasonably_similar): Any target type is similar to void.
9064
19551f29
AO
90652001-10-08 Alexandre Oliva <aoliva@redhat.com>
9066
9067 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9068 (cp/cp-lang.o): New rule.
9069 * cp-tree.h: Declare hooks.
9070 * tree.c: Make hooks non-static.
9071 (init_tree): Don't initialize hooks here.
9072 * lex.c: Likewise. Move definition of lang_hooks to...
9073 * cp-lang.c: ... new file.
9074
31ed8fea
RH
90752001-10-08 Richard Henderson <rth@redhat.com>
9076
9077 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9078 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9079
8b60264b
KG
90802001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9081
9082 * class.c (build_vtable_entry_ref): Const-ify.
9083 * decl.c (predefined_identifier,
37207ee7 9084 initialize_predefined_identifiers): Likewise.
8b60264b
KG
9085 * init.c (build_new_1): Likewise.
9086 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9087 Likewise.
9088
bc4c7159
AO
90892001-10-05 Alexandre Oliva <aoliva@redhat.com>
9090
9091 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9092 (INSNS_PER_STMT): Likewise.
9093 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9094 (copy_body, initialize_inlined_parameters): Likewise.
9095 (declare_return_variable, inlinable_function_p): Likewise.
9096 (expand_call_inline, expand_calls_inline): Likewise.
9097 (optimize_inline_calls, clone_body): Likewise.
9098 * tree.c (walk_tree): Moved to ../tree-inline.c.
9099 (walk_tree_without_duplicates): Likewise.
9100 (copy_tree_r, remap_save_expr): Likewise.
9101
25af8512
AO
91022001-10-04 Alexandre Oliva <aoliva@redhat.com>
9103
9104 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9105 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9106 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9107 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9108 (flag_inline_trees): Moved declaration to ../tree-inline.h.
9109 (walk_tree): Moved declaration to ../tree-inline.h.
9110 (walk_tree_without_duplicates, copy_tree_r): Likewise.
9111 (remap_save_expr): Likewise.
9112 * decl.c: Include tree-inline.h.
9113 (lang_mark_tree): Don't mark inlined_fns.
9114 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9115 * optimize.c: Include tree-inline.h.
9116 (optimize_inline_calls): Move declaration to ../tree.h, as
9117 non-static.
9118 (remap_decl): Use language-independent constructs and hooks.
9119 (remap_block, copy_body_r, declare_return_variable): Likewise.
9120 (inlinable_function_p): Likewise. Don't test for
9121 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9122 no longer language-specific.
9123 (optimize_inline_calls): Likewise. Make it non-static. Moved
9124 call of dump_function to...
9125 (optimize_function): Here...
9126 (clone_body): New function, extracted from...
9127 (maybe_clone_body): ... here. Build decl_map locally and pass
9128 it on to clone_body.
9129 * pt.c, semantics.c: Include tree-inline.h.
9130 * tree.c: Likewise.
9131 (cp_walk_subtrees): New language-specific hook for tree inlining.
9132 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9133 cp_is_overload_p, cp_auto_var_in_fn_p,
9134 cp_copy_res_decl_for_inlining): Likewise.
9135 (walk_tree): Move language-specific constructs into...
9136 (cp_walk_subtrees): this new function.
9137 (copy_tree_r): Use language-independent constructs and hooks.
9138 (init_tree): Initialize tree inlining hooks.
9139 (remap_save_expr): Adjust prototype so that the declaration
9140 does not require the definition of splay_tree.
9141
6a4af81f
JDA
91422001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
9143
9144 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9145 to build the declaration instead of the declaration itself.
9146
0caee1c6
JM
91472001-10-02 Jason Merrill <jason_merrill@redhat.com>
9148
48c8b0be
JM
9149 * decl2.c (cxx_decode_option): Add 'else'.
9150
0caee1c6
JM
9151 * spew.c (end_input): No longer static.
9152 * cp-tree.h: Declare it.
9153 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9154
80a497e4
JM
91552001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9156
9157 * call.c (build_over_call), typeck.c (build_function_call_real):
9158 Pass type attributes to check_function_format rather than name or
9159 assembler name. Don't require there to be a name or assembler
9160 name to check formats.
9161
6431177a
JM
91622001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9163
9164 * decl.c (init_decl_processing): Don't call
9165 init_function_format_info. Initialize lang_attribute_table
9166 earlier.
9167 (builtin_function): Call decl_attributes.
9168 (insert_default_attributes): New.
9169
55b3d665
JM
91702001-10-01 Jason Merrill <jason_merrill@redhat.com>
9171
9172 * decl.c (grokdeclarator): Copy array typedef handling from C
9173 frontend.
9174
9175 * decl.c (grokdeclarator): Copy too-large array handling from C
9176 frontend.
9177
9f57ca19
AO
91782001-09-29 Alexandre Oliva <aoliva@redhat.com>
9179
9180 * config-lang.in (target_libs): Added target-gperf, so that we
9181 don't try to build it if C++ is disabled.
9182
749ced52
ZW
91832001-09-23 Zack Weinberg <zack@codesourcery.com>
9184
9185 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9186 (cp/errfn.o): Delete rule.
9187 (cp/error.o): Depend on flags.h.
9188 * errfn.c: Delete file.
9189 * cp-tree.h: Declare warn_deprecated. Remove definitions of
9190 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9191 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9192 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9193 internal_error respectively. Make cp_deprecated into a macro.
9194 Don't define cp_printer typedef or declare cp_printers.
9195 * error.c: Include flags.h.
9196 Delete: struct tree_formatting_info, print_function_argument_list,
9197 print_declaration, print_expression, print_function_declaration,
9198 print_function_parameter, print_type_id, print_cv_qualifier_seq,
9199 print_type_specifier_seq, print_simple_type_specifier,
9200 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9201 print_parameter_declaration_clause, print_exception_specification,
9202 print_nested_name_specifier, and definition of cp_printers.
9203 (locate_error): New function.
9204 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9205 rewritten in terms of locate_error and diagnostic.c.
9206 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9207 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
9208 (init_error): Adjust to match.
9209
d2a6f3c0 92102001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
bb9f8221
RK
9211
9212 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9213
67231816
RH
92142001-09-21 Richard Henderson <rth@redhat.com>
9215
9216 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9217 (build_vtbl_initializer): Likewise.
9218 (build_vfn_ref): New.
9219 * cp-tree.h: Declare it.
9220 * call.c (build_over_call): Use it.
9221 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9222 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9223
d2a6f3c0 92242001-09-21 J"orn Rennecke <amylaar@redhat.com>
c9574c9f
R
9225
9226 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9227
91d231cb
JM
92282001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
9229
9230 Table-driven attributes.
9231 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9232 * decl2.c (cplus_decl_attributes): Only take one attributes
9233 parameter.
9234 * cp-tree.c (cplus_decl_attributes): Update prototype.
9235 * class.c (finish_struct), decl.c (start_decl, start_function),
9236 decl2.c (grokfield), friend.c (do_friend), parse.y
9237 (parse_bitfield): Update calls to cplus_decl_attributes.
9238 * decl.c (grokdeclarator): Take a pointer to a single ordinary
9239 attribute list.
9240 * decl.h (grokdeclarator): Update prototype.
9241 * decl2.c (grokfield): Take a single ordinary attribute list.
9242 * friend.c (do_friend): Likewise.
9243 * decl.c (shadow_tag, groktypename, start_decl,
9244 start_handler_parms, grokdeclarator, grokparms, start_function,
9245 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9246 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9247 (process_template_parm, do_decl_instantiation): Pass single
9248 ordinary attribute lists around.
9249 * decl.c (grokdeclarator): Correct handling of nested attributes.
9250 Revert the patch
9251 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9252 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9253 not the left.
9254 .
9255 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9256 (cp_attribute_table): Declare.
9257 * decl.c (valid_lang_attribute): Don't define.
9258 (lang_attribute_table): Define.
9259 (init_decl_processing): Initialize lang_attribute_table instead of
9260 valid_lang_attribute.
9261 * tree.c (cp_valid_lang_attribute): Remove.
9262 (handle_java_interface_attribute, handle_com_interface_attribute,
9263 handle_init_priority_attribute): New functions.
9264 (cp_attribute_table): New array.
9265 * decl2.c (import_export_class): Don't use
9266 targetm.valid_type_attribute.
9267
a1bda5f1
GDR
92682001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9269
e6b9638b
JM
9270 * Make-lang.in (cp/error.o): Depend on real.h
9271 * error.c: #include "real.h"
a1bda5f1 9272
cb6edbcb
KG
92732001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9274
9275 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9276 xmalloc/strcpy/strcat.
9277
83182544
KG
92782001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9279
9280 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9281 Const-ification.
9282 * pt.c (tsubst_decl): Likewise.
9283
40008eda
KG
92842001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9285
9286 * decl2.c (lang_f_options): Const-ification.
9287 * lex.c (cplus_tree_code_name): Likewise.
9288 * spew.c (yyerror): Likewise.
9289
39e78d8b
NS
92902001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9291
9292 PR c++/3986
9293 * class.c (force_canonical_binfo_r): Check & move an indirect
9294 primary base first.
9295 (force_canonical_binfo): Check that it's not already
9296 canonical.
9297 (mark_primary_virtual_base): Remove BINFO parameter.
9298 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9299
6d0a3f67
NS
93002001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9301
9302 Remove TYPE_NONCOPIED_PARTS.
9303 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9304 CLASSTYPE_PURE_VIRTUALS.
9305 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9306 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 9307 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
9308 (finish_struct_1): ... call it here.
9309
4f8e1232
MM
93102001-09-04 Mark Mitchell <mark@codesourcery.com>
9311
9312 * decl.c (duplicate_decls): Remove code deadling with
9313 DECL_SAVED_INSNS.
9314 * decl2.c (finish_file): Likewise.
9315 * pt.c (instantiate_decl): Likewise.
9316 * semantics.c (expand_body): Don't defer local functions if
9317 they wouldn't be deferred for some other reason. Don't
9318 generate RTL for functions that will not be emitted.
9319 (genrtl_start_function): Remove code deadling with
9320 DECL_SAVED_INSNS.
9321 (genrtl_finish_function): Likewise.
9322
da86f08f
NS
93232001-09-04 Nathan Sidwell <nathan@codesourcery.com>
9324
9325 PR c++/4203
9326 * call.c (build_over_call): Do not optimize any empty base
9327 construction.
9328
38066e83
KL
93292001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9330
9331 * error.c (dump_template_decl): Output template parameters
9332 together with their specifiers.
9333 Output `class' prefix for template template parameter.
9334 (dump_decl): Fix formatting.
9335
598e9ba5 93362001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 9337
598e9ba5
KG
9338 * optimize.c (inlinable_function_p): Allow only smaller single
9339 functions. Halve inline limit after reaching recursive limit.
749ced52 9340
f232e4a5
JR
93412001-08-30 Joern Rennecke <amylaar@redhat.com>
9342 Jason Merrill <jason_merrill@redhat.com>
9343
9344 * class.c (build_vtable_entry_ref): Subtract in char*, not
9345 ptrdiff_t.
9346
0213a355
JM
93472001-08-23 Jason Merrill <jason_merrill@redhat.com>
9348
9349 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9350 (build_cplus_array_type): Use cp_build_qualified_type, not
9351 TYPE_MAIN_VARIANT, to get an unqualified version.
9352
9353 * decl2.c (grok_alignof): Lose.
9354 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
9355 * typeck.c (c_alignof): Lose.
9356 * semantics.c (finish_sizeof, finish_alignof): New.
9357 * parse.y: Use them.
9358 * cp-tree.h: Declare them.
9359
fd10dd09
JM
93602001-08-22 Jason Merrill <jason_merrill@redhat.com>
9361
9362 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
9363 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
9364 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
9365
baeb4732
JJ
93662001-08-19 Jakub Jelinek <jakub@redhat.com>
9367
9368 * typeck2.c (add_exception_specifier): Only require complete type if
9369 not in processing template declaration.
9370
1c0cc57e
KG
93712001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9372
9373 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
9374 GNU_xref_start_scope and GNU_xref_end_scope.
9375
9376 * tree.c (TYPE_HASH): Moved to ../tree.h.
9377
9a52d09b
MM
93782001-08-16 Mark Mitchell <mark@codesourcery.com>
9379
9380 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
9381 on COMPOUND_EXPRs.
9382
b5d1cbd2
RH
93832001-08-14 Richard Henderson <rth@redhat.com>
9384
9385 * class.c, cp-tree.h (build_vfn_ref): Remove.
9386 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
9387
63d6f87a
MM
93882001-08-13 Mark Mitchell <mark@codesourcery.com>
9389
9390 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
9391 empty class assignment as having side-effects to avoid
9392 spurious warnings.
9393
e78d8e51
ZW
93942001-08-13 Zack Weinberg <zackw@panix.com>
9395
9396 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
9397 * except.c: Include libfuncs.h.
9398
a60af04a
GDR
93992001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9400
9401 * decl.c (grokdeclarator): Clarify diagnostic message.
9402
3605b283
KL
94032001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9404
9405 * decl2.c (do_nonmember_using_decl): Replace using directive
9406 with using declaration in the error message.
9407
4d5f3fbd
KL
94082001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9409
9410 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
9411 criterion to avoid rebuilding expression tree instead of
9412 processing_template_decl.
9413
07b2f2fd
JM
94142001-08-07 Jason Merrill <jason_merrill@redhat.com>
9415
9416 Support named return value optimization for inlines, too.
9417 * decl.c (finish_function): Nullify returns here.
9418 * semantics.c (genrtl_start_function): Not here.
9419 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
9420 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
9421 Also nullify the CLEANUP_STMT for the nrv.
9422 * cp-tree.h: Declare it.
9423 * optimize.c (declare_return_variable): Replace the nrv with the
9424 return variable.
9425 * typeck.c (check_return_expr): Be more flexible on alignment check.
9426 Ignore cv-quals when checking for a matching type.
9427
2cc07db4
RH
94282001-08-09 Richard Henderson <rth@redhat.com>
9429
9430 * decl2.c (finish_objects): Use target hooks instead of
9431 assemble_constructor and assemble_destructor.
9432
0ca179b2
JDA
94332001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9434
9435 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
9436
0830ae44
NS
94372001-08-07 Nathan Sidwell <nathan@codesourcery.com>
9438
9439 PR c++/3820
9440 Stop using TYPE_NONCOPIED_PARTS.
9441 * call.c (build_over_call): Be careful when copy constructing
9442 or assigning to an empty class.
9443 * class.c (check_bases_and_members): It has a
9444 COMPLEX_ASSIGN_REF if it has a vptr.
9445 (layout_class_type): Don't add empty class padding to
9446 TYPE_NONCOPIED_PARTS.
9447 (finish_struct_1): Don't add the VFIELD either.
9448 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
9449 initialization.
9450
59a13e0f
JM
94512001-08-07 Jason Merrill <jason_merrill@redhat.com>
9452
9453 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
9454
47907859
RH
94552001-08-06 Richard Henderson <rth@redhat.com>
9456
9457 * decl2.c (finish_objects): Pass a symbol_ref and priority to
9458 assemble_{constructor,destructor}. Remove priority handling.
9459
eac69b8a
GDR
94602001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9461
9462 Don't allow template-id in using-declaration.
9463 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
9464 (do_class_using_decl): Likewise.
9465
ef6e958a
NB
94662001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9467
9468 * cp/spew.c (read_token): No need to pop buffers.
9469
dff94ad7
SS
94702001-08-02 Stan Shebs <shebs@apple.com>
9471
9472 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
9473 (fnaddr_from_vtable_entry): Remove decl.
9474 * method.c (use_thunk): Update comment.
9475
026c3f13
AC
94762001-08-01 Andrew Cagney <ac131313@redhat.com>
9477
9478 * repo.c (get_base_filename): Change return value to const char
9479 pointer.
9480
1dbb6023
NS
94812001-08-02 Nathan Sidwell <nathan@codesourcery.com>
9482
9483 Kill -fhonor-std.
9484 * NEWS: Document.
9485 * cp-tree.h (flag_honor_std): Remove.
9486 (CPTI_FAKE_STD): Remove.
9487 (std_node): Remove comment about it being NULL.
9488 (fake_std_node): Remove.
9489 * decl.c (in_fake_std): Remove.
9490 (walk_namespaces_r): Remove fake_std_node check.
9491 (push_namespace): Remove in_fake_std code.
9492 (pop_namespace): Likewise.
9493 (lookup_name_real): Remove fake_std_node check.
9494 (init_decl_processing): Always create std_node. Always add
9495 std:: things there.
9496 (builtin_function): Always put non '_' fns in std.
9497 * decl2.c (flag_honor_std): Remove.
9498 (lang_f_options): Remove honor-std.
9499 (unsupported_options): Add honor-std.
9500 (set_decl_namespace): Remove fake_std_node check.
9501 (validate_nonmember_using_decl): Likewise.
9502 (do_using_directive): Likewise.
9503 (handle_class_head): Likewise.
9504 * dump.c (cp_dump_tree): Likewise.
9505 * except.c (init_exception_processing): Adjust.
9506 * init.c (build_member_call): Remove fake_std_node check.
9507 (build_offset_ref): Likewise.
9508 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
9509 * rtti.c (init_rtti_processing): Adjust.
9510
6ad7895a
APB
95112001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9512
9513 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
9514 operand while calling cp_tree_equal.
9515
befe7c61
NS
95162001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9517
9518 The 3.0 ABI no longer has vbase pointer fields.
9519 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
9520 FORMAT_VBASE_NAME): Remove.
9521 * method.c (do_build_copy_constructor): Adjust.
9522 (do_build_assign_ref): Adjust.
9523 * search.c (lookup_field_r): Adjust.
9524 * typeck.c (build_component_ref): Adjust.
9525
9526 The 3.0 ABI always has a vtable pointer at the start of every
9527 polymorphic class.
9528 * rtti.c (build_headof_sub): Remove.
9529 (build_headof): Adjust.
9530 (get_tinfo_decl_dynamic): No need to check flag_rtti
9531 here. Adjust.
9532 (create_real_tinfo_var): Explain why we need a hidden name.
9533
20dde49d
NS
95342001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9535
9536 PR c++/3631
9537 * class.c (update_vtable_entry_for_fn): The fixed adjustment
9538 of a virtual thunk should be from declaring base.
9539
b7ad2f8b
NS
95402001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9541
9542 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
9543 the shared virtual base, so preserving inheritance graph order.
9544
57cb6d52
AJ
95452001-07-30 Andreas Jaeger <aj@suse.de>
9546
749ced52 9547 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 9548
594280a3
RH
95492001-07-28 Richard Henderson <rth@redhat.com>
9550
9551 * method.c (pending_inlines): Remove.
9552
0ab142b0
NS
95532001-07-27 Nathan Sidwell <nathan@codesourcery.com>
9554
9555 * class.c (mark_primary_virtual_base): Don't adjust base
9556 offsets here.
9557 (dfs_unshared_virtual_bases): Adjust them here.
9558 (mark_primary_bases): Explain why we adjust at the end.
9559
d60d223b
NS
95602001-07-27 Nathan Sidwell <nathan@codesourcery.com>
9561
9562 * class.c (finish_struct_1): When copying the primary base's
9563 VFIELD, make sure we find it is at offset zero.
9564
db3ef87b
KL
95652001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9566
9567 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
9568 tsubst_expr for default template arguments.
9569
312b7c9d
NS
95702001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9571
d60d223b 9572 PR c++/3621
312b7c9d 9573 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 9574 nonzero.
312b7c9d 9575
648c2206
NS
95762001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9577
9578 PR c++/3624
9579 * call.c (resolve_args): Simplify, call
9580 convert_from_reference.
9581 (build_new_op): Resolve and convert from reference ARG1
9582 earlier. Adjust ARG2 & ARG3 resolve and conversion.
9583
969fd501
NS
95842001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9585
9586 * decl.c (last_function_parm_tags): Remove.
9587 (current_function_parm_tags): Remove.
9588 (init_decl_processing): Adjust.
9589 (start_function): Adjust.
9590 (store_parm_decls): Adjust.
9591
9592 PR c++/3152
9593 * decl.c (grokdeclarator): Detect when a function typedef is
9594 declaring a function, and create last_function_parms correctly.
9595
08ac397c 95962001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 9597
08ac397c
JM
9598 * call.c (joust): Only prefer a non-builtin candidate to a builtin
9599 one if they have the same signature.
9600
9601 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
9602 it rather than toplevel_bindings_p. Give it a mangled name if static.
9603 (convert_to_reference): Adjust.
9604 * decl2.c (get_temp_name): Lose.
9605 * mangle.c (mangle_ref_init_variable): New fn.
9606 (mangle_guard_variable): Strip the ref-init header.
9607 * cp-tree.h: Adjust.
9608 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
9609 initializer.
9610 (grok_reference_init): Always use DECL_INITIAL.
9611
40260429
NS
96122001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9613
9614 PR c++/3416
9615 * call.c (build_conditional_expr): Recheck args after
9616 conversions.
9617 * cp-tree.h (build_conditional_expr): Move to correct file.
9618 * typeck.c (decay_conversion): Diagnose any unknown types
9619 reaching here.
9620 (build_binary_op): Don't do initial decay or default
9621 conversions on overloaded functions.
9622 (build_static_cast): Don't do a decay conversion here.
9623
ab085207
NS
96242001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9625
9626 PR c++/3543
9627 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
9628 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
9629
0abe00c5
NS
96302001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9631
9632 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
9633 (create_vtbl_ptr): ... here.
9634
90b1ca2f
NS
96352001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9636
9637 * class.c (build_vbase_offset_vbtl_entries): Look for
9638 non-primary base of which we are a sub vtable.
9639
cfe5dc31
PE
96402001-07-24 Phil Edwards <pme@sources.redhat.com>
9641
9642 * semantics.c (finish_this_expr): Remove unused code.
9643
7f54a851
NS
96442001-07-24 Nathan Sidwell <nathan@codesourcery.com>
9645
9646 Simplify rtti, now we've only one ABI.
9647 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
9648 CPTI_TINFO_VAR_ID.
9649 (tinfo_decl_id, tinfo_var_id): Remove.
9650 (get_typeid_1): Remove.
9651 * rtti.c
9652 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
9653 (typeid_ok_p): New function.
9654 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
9655 (get_tinfo_decl): Remove old abi documentation.
9656 (tinfo_from_decl): Remove.
9657 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
9658 (get_typeid_1): Remove.
9659 (get_base_offset): Remove.
9660 (synthesize_tinfo_var): Absorb get_base_offset.
9661 (create_real_tinfo_var): Don't use tinfo_decl_id.
9662
18fee3ee
GS
96632001-07-23 Graham Stott <grahams@redhat.com>
9664
d30d6e7a 9665 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
9666 variable has_two_argument_delete_p.
9667
c4372ef4
NS
96682001-07-21 Nathan Sidwell <nathan@codesourcery.com>
9669
9670 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
9671 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
9672 (CPTI_INDEX_IDENTIFIER): Remove.
9673 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
9674 (delta2_identifier): Remove.
9675 (index_identifier): Remove.
9676 (pfn_or_delta2_identifier): Remove.
9677 (flag_vtable_thunks): Remove.
9678 (VTABLE_DELTA2_NAME): Remove.
9679 (VTABLE_INDEX_NAME): Remove.
9680 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
9681 (vfunc_ptr_type_node): Adjust.
9682 (VTABLE_NAME_PREFIX): Adjust.
9683 (build_vfn_ref): Lose first parameter.
9684 (fixup_all_virtual_upcast_offsets): Remove.
9685 * decl.c (initialize_predefined_identifiers): Remove
9686 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
9687 (init_decl_processing): Remove no-vtable-thunk code.
9688 * decl2.c (flag_vtable_thunks): Remove.
9689 (mark_vtable_entries): Remove no-vtable-thunk code.
9690 * error.c (dump_decl): Remove no-vtable-thunk code.
9691 (dump_expr): Adjust ptr to member function code.
9692 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
9693 code.
9694 * rtti.c (build_headof): Remove no-vtable-thunk code.
9695 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
9696 * search.c (get_base_distance): Remove expand_upcast_fixups case.
9697 (virtual_context) Remove.
9698 (expand_upcast_fixups): Remove.
9699 (fixup_virtual_upcast_offsets): Remove.
9700 (fixup_all_virtual_upcast_offsets): Remove.
9701 * typeck.c (get_member_function_from_ptrfunc): Remove
9702 no-vtable-thunk code.
9703 * call.c (build_over_call): Adjust call to build_vfn_ref.
9704 * class.c (build_vfn_ref): Lose first parameter. Remove
9705 no-vtable-thunk code.
9706 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
9707 (build_vtable_entry): Remove no-vtable-thunk code.
9708
3461fba7
NS
97092001-07-20 Nathan Sidwell <nathan@codesourcery.com>
9710
9711 Remove old-abi remnants. Remove comments about old abi
838dfd8a 9712 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
9713 * cp-tree.h: Adjust comments.
9714 (vbase_offsets_in_vtable_p): Delete.
9715 (vcall_offsets_in_vtable_p): Delete.
9716 (vptrs_present_everywhere_p): Delete.
9717 (all_overridden_vfuns_in_vtables_p): Delete.
9718 (merge_primary_and_secondary_vtables_p): Delete.
9719 (TYPE_CONTAINS_VPTR_P): Adjust.
9720 (VTT_NAME_PREFIX): Remove.
9721 (CTOR_VTBL_NAME_PREFIX): Remove.
9722 (init_vbase_pointers): Remove.
9723 * class.c: Adjust coments.
9724 (build_vbase_pointer_fields): Delete.
9725 (build_vbase_pointer): Remove old-abi code.
9726 (build_secondary_vtable): Likewise.
9727 (modify_all_vtables): Likewise.
9728 (create_vtable_ptr): Likewise.
9729 (layout_class_type): Likewise.
9730 (finish_struct_1): Likewise.
9731 (finish_vtbls): Likewise.
9732 (dfs_finish_vtbls): Delete.
9733 (build_vbase_offset_vtbl_entries): Remove old-abi code.
9734 * cvt.c: Adjust comments.
9735 * decl.c: Adjust comments.
9736 * decl2.c: Adjust comments.
9737 * init.c: Adjust comments.
9738 (construct_virtual_bases): Remove old-abi code.
9739 * lang-specs.h: Remove -fno-new-abi.
9740 * mangle.c: Adjust comments.
9741 * rtti.c: Adjust comments.
9742 (get_base_offset): Remove old-abi-code.
9743 * search.c: Adjust comments.
9744 (dfs_init_vbase_pointers): Remove.
9745 (dfs_vtable_path_unmark): Remove.
9746 (init_vbase_pointers): Remove.
9747 * semantics.c: Adjust comments.
9748 (emit_associated_thunks): Remove old-abi code.
9749 * typeck.c: Adjust comments.
9750
1c432a87
DB
97512001-07-20 Daniel Berlin <dan@cgsoftware.com>
9752
9753 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
9754 params.h.
9755
b7076960
MM
97562001-07-19 Mark Mitchell <mark@codesourcery.com>
9757
9758 * class.c (finish_struct_anon): Forbid nested classes.
9759
2b85879e
NB
97602001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
9761
9762 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
9763 * optimize.c: Include debug.h.
9764 (maybe_clone_body): Use debug hook.
9765 * semantics.c: Include debug.h.
9766 (expand_body): Use debug hook.
9767
c60e94a7
NB
97682001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
9769
9770 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
9771
dbc957f1
MM
97722001-07-18 Mark Mitchell <mark@codesourcery.com>
9773
9774 * class.c (type_requires_array_cookie): New function.
9775 (check_methods): Don't try to figure out whether the type needs a
9776 cookie here.
9777 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
9778 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
9779 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
9780 * pt.c (instantiate_class_template): Don't set
9781 TYPE_VEC_DELETE_TAKES_SIZE.
9782 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 9783
7ba0b0f7 97842001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 9785 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
9786
9787 * NEWS (Changes in GCC 3.0): Fix typo.
9788
59387d2e
JM
97892001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
9790
9791 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
9792 which attributes are to be attached, and a flags argument. Update
9793 call to decl_attributes.
9794 (grokfield): Update call to decl_attributes.
9795 * class.c (finish_struct): Update call to cplus_decl_attributes.
9796 * cp-tree.h (cplus_decl_attributes): Update prototype.
9797 * decl.c (start_decl, grokdeclarator, start_function): Update
9798 calls to decl_attributes and cplus_decl_attributes.
9799 * friend.c (do_friend): Update call to cplus_decl_attributes.
9800 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
9801
7ed47c04
MM
98022001-07-12 Mark Mitchell <mark@codesourcery.com>
9803
9804 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
9805 for `register' variables with an asm-specification.
9806
40b18c0a
MM
98072001-07-11 Mark Mitchell <mark@codesourcery.com>
9808
9809 * semantics.c (finish_asm_stmt): Mark the output operands
9810 to an asm addressable, if necessary.
9811
517c3b80
BE
98122001-07-11 Ben Elliston <bje@redhat.com>
9813
219670f1
BE
9814 * Revert this change -- there is a subtle bug.
9815
517c3b80
BE
9816 PR c++/80
9817 * decl.c (finish_enum): New "attributes" argument; pass it to
9818 cplus_decl_attributes. Use a narrower type if the enum is packed.
9819 * cp-tree.h (finish_enum): Adjust prototype.
9820 * parse.y (enum_head): New non-terminal.
9821 (structsp): Use it. Enums now may be preceded or followed by
9822 optional attributes -- pass their chained tree to finish_enum().
9823 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
9824
2ba9c47e
MM
98252001-07-10 Mark Mitchell <mark@codesourcery.com>
9826
9827 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
9828 variables.
9829
35241192
JM
98302001-07-10 Jason Merrill <jason_merrill@redhat.com>
9831
9832 * semantics.c (cp_expand_stmt): Fix for null
9833 current_function_return_value.
9834
07167a18
JM
98352001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
9836
9837 * call.c (build_op_delete_call): Initialize fn.
9838 (convert_like_real): Delete conditional.
9839 (joust): Initialize *w and *l.
9840 * class.c: Add prototype for binfo_ctor_vtable.
9841 (get_primary_binfo): Initialize result.
9842 * init.c (build_java_class_ref): Initialize name.
ae818d3b 9843
35241192
JM
98442001-07-09 Erik Rozendaal <dlr@acm.org>
9845
ae818d3b
ER
9846 * typeck.c (unary_complex_lvalue): Do not duplicate the
9847 argument to modify, pre-, or post-increment when used as an
9848 lvalue and when the argument has side-effects.
9849
12a68f1f
JM
98502001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9851
9852 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9853 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
9854 cplus_decl_attributes even if attrs is NULL.
9855 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9856
f7a4cec0
JM
98572001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9858
9859 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
9860 calls to decl_attributes.
9861
c80106a4
IR
98622001-07-06 Ira Ruben <ira@apple.com>
9863
ae818d3b 9864 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
9865 be DECL_TEMPLATE_RESULT.
9866
dac65501
KL
98672001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9868
9869 * cp-tree.h (copy_template_template_parm): Rename to ...
9870 (bind_template_template_parm): ... here.
9871 * tree.c (copy_template_template_parm): Rename to ...
9872 (bind_template_template_parm): ... here. Remove the case when
9873 NEWARGS is NULL_TREE.
9874 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
9875 BOUND_TEMPLATE_TEMPLATE_PARM.
9876 * pt.c (lookup_template_class): Adjust.
9877
01f9e964
JM
98782001-07-05 Jason Merrill <jason_merrill@redhat.com>
9879
9880 * cvt.c (convert_lvalue): New fn.
9881 * cp-tree.h: Declare it.
9882 * method.c (do_build_assign_ref): Use it.
9883 (do_build_copy_constructor): Convert parm to base types
9884 before calling base constructors.
9885
9886 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
9887 DECL_USER_ALIGN. Check flag_elide_constructors instead of
9888 optimize.
9889 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
9890
6be77748
NS
98912001-07-02 Nathan Sidwell <nathan@codesourcery.com>
9892
9893 * optimize.c (optimize_inline_calls): New function, broken out
9894 of ...
9895 (optimize_function): ... here. Call it. Don't inline if it is
9896 a thunk.
9897 (dump_function): Print name of dump flag causing this dump.
9898 * semantics.c (expand_body): Move thunk inline check to
9899 optimize_function.
9900
8d8e52be
JM
99012001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
9902
9903 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
9904 (comptypes): Use target.comp_type_attributes.
9905
5a0db193
NS
99062001-06-29 Nathan Sidwell <nathan@codesourcery.com>
9907
9908 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
9909
46f018e1
GDR
99102001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9911
9912 * error.c (lang_print_error_function): Add a `diagnostic_context *'
9913 parameter. Tweak.
9914
501990bb
NB
99152001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9916
9917 * decl2.c (import_export_class): Update.
9918
f68fc4db
GDR
99192001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9920
9921 * error.c (init_error): Adjust settings.
9922
9596ddd6
GDR
99232001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9924
9925 * error.c (init_error): Adjust settings.
9926
c93586fa
RS
99272001-06-19 Richard Sandiford <rsandifo@redhat.com>
9928
9929 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9930 return pointers to data members by reference rather than by value.
9931
0d97bf4c
JM
99322001-06-18 Jason Merrill <jason_merrill@redhat.com>
9933
9934 Implement the Named Return Value optimization.
9935 * cp-tree.h (struct cp_language_function): Add x_return_value.
9936 (current_function_return_value): Now a macro.
9937 * decl.c: Don't define it.
9938 (define_label, finish_case_label): Don't clear it.
9939 (init_decl_processing): Don't register it with GC.
9940 * semantics.c (genrtl_finish_function): Don't check it for
9941 no_return_label. Copy the RTL from the return value to
9942 current_function_return_value and walk, calling...
9943 (nullify_returns_r): ...this new fn.
9944 * typeck.c (check_return_expr): Set current_function_return_value.
9945
13de7ec4
JM
99462001-06-15 Jason Merrill <jason_merrill@redhat.com>
9947
9948 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9949 sharing a ctor vtable with. Merge code for cases 1 and 2.
9950 (binfo_ctor_vtable): New fn.
9951 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9952
3ea099f1
JM
99532001-06-14 Jason Merrill <jason_merrill@redhat.com>
9954
9955 * class.c (dfs_find_final_overrider): Fix logic.
9956
9957 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9958 virtual thunk instead of non-virtual.
9959 (get_matching_virtual): Uncomment.
9960
9961 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9962 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
9963 PARM, not ARG.
9964
87326ba8
NS
99652001-06-14 Nathan Sidwell <nathan@codesourcery.com>
9966
9967 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9968 we've not emerged from the hierarchy of RTTI_BINFO on reaching
9969 a non-virtual base.
9970
e065a36e
MM
99712001-06-13 Mark Mitchell <mark@codesourcery.com>
9972
9973 * NEWS: Update release number.
9974
623fe76a
NS
99752001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9976
9977 PR c++/3130, c++/3131, c++/3132
9978 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9979 * class.c (force_canonical_binfo_r): Move
9980 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9981 virtual bases unless they're primary and what they're primary
9982 too has been moved.
9983 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9984 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9985 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9986 derived binfo.
9987 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9988 (layout_nonempty_base_or_field): Add most derived type
9989 parameter. Adjust.
9990 (layout_empty_base): Likewise.
9991 (build_base_field): Likewise.
9992 (build_base_fields): Likewise.
9993 (propagate_binfo_offsets): Add most derived type
9994 parameter. Skip non canonical virtual bases too.
9995 (dfs_set_offset_for_unshared_vbases): Don't skip primary
9996 bases. Do skip canonical bases.
9997 (layout_virtual_bases): Adjust.
9998 (layout_class_type): Adjust.
9999 (dfs_get_primary_binfo): Build list of virtual primary base
10000 candidates.
10001 (get_primary_binfo): Check that the shared virtual primary
10002 base candidate was found first.
10003 (accumulate_vtbl_inits): Don't do anything for non-vptr
10004 containing binfos. For case 1 primary virtual bases, keep
10005 checking that we've not emerged from the hierarchy of RTTI_BINFO.
10006
7bdcf888
NS
100072001-06-12 Nathan Sidwell <nathan@codesourcery.com>
10008
10009 PR c++/3089
10010 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10011 hierarchy looking for primary bases for a ctor
10012 vtable. Recursively call oneself, if we meet our primary via
10013 this route and haven't met it yet via inheritance graph order.
10014
25b5b465
MM
100152001-06-11 Mark Mitchell <mark@codesourcery.com>
10016
10017 * lang-options.h: Emit documentation for -fno-honor-std, not
10018 -fhonor-std.
10019
eb2d0614
AO
100202001-06-10 Alexandre Oliva <aoliva@redhat.com>
10021
10022 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10023 Don't clobber delta.
10024 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10025
2a2b2d43
GDR
100262001-06-10 Mark Mitchell <mark@codesourcery.com>
10027 Gabriel Dos Reis <gdr@codesourcery.com>
10028
10029 * Make-lang.in (cp/call.o): Depend on diagnostic.h
10030 (cp/typeck.o): Depend on diagnostic.h
10031 (cp/typeck2.o): Depend on diagnostic.h
07167a18 10032 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
10033 * typeck.c: #include diagnostic.h
10034 (convert_for_initialization): Remove extern declaration for
10035 warningcount and errorcount.
10036
10037 * call.c: #include diagnostic.h
10038 (convert_like_real): Remove extern declaration for warnincount and
07167a18 10039 errorcount.
2a2b2d43
GDR
10040
10041 * repo.c: #include diagnostic.h
10042 * typeck2.c: #include diagnostic.h
10043
06d5e633
NS
100442001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10045
10046 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10047 in previous change.
10048
9ac1bd2e
NS
100492001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10050
10051 PR c++/2929
10052 * friend.c (do_friend): Use push_decl_namespace for classes at
10053 namespace scope.
10054
85a9a0a2
NS
100552001-06-08 Nathan Sidwell <nathan@codesourcery.com>
10056 Jason Merrill <jason_merrill@redhat.com>
10057
10058 PR c++/3061
10059 * class.c (build_secondary_vtable): Use assert, rather than an error
10060 message.
10061 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10062 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10063 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10064 Don't set BINFO_VTABLE for a primary virtual base.
10065
daa8df65
MM
100662001-06-07 Mark Mitchell <mark@codesourcery.com>
10067
10068 * decl.c (duplicate_decls): Update source position information
10069 when a template function is defined.
10070
37344b9b
PE
100712001-06-07 Phil Edwards <pme@sources.redhat.com>
10072
10073 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
10074
fcebb2dd
NS
100752001-06-07 Nathan Sidwell <nathan@codesourcery.com>
10076
10077 PR c++/2914
10078 * decl.c (pushtag): Don't push into a complete type's scope.
10079
d0cd8b44
JM
100802001-06-06 Jason Merrill <jason_merrill@redhat.com>
10081
10082 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10083 (struct lang_decl_flags): Lose generate_with_vtable_p.
10084 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10085 * class.c (copy_virtuals): Adjust.
10086 * decl2.c (mark_vtable_entries): Adjust.
10087 * method.c (make_thunk, build_vtable_entry): Adjust.
10088 * class.c (update_vtable_entry_for_fn): Only look as far as the
10089 first defining class.
07167a18 10090 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 10091 defined in a lost primary virtual base.
07167a18 10092 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
10093 the lost primary case and the normal case.
10094 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10095 (get_vfield_offset, get_derived_offset): Lose.
10096 (dfs_find_final_overrider): Use look_for_overrides_here.
10097 (get_matching_virtual): New fn.
10098 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10099 not BV_VCALL_INDEX.
10100 * search.c (look_for_overrides_here): Split out from...
10101 (look_for_overrides_r): Here.
10102
10103 * class.c (find_final_overrider): Return error_mark_node on error.
10104
10105 * decl2.c (key_method): #if 0 accidental change.
10106
acf97e0b
JDA
101072001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
10108
10109 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10110 (build_over_call): Likewise.
10111 * decl.c (grokparms): Likewise.
10112 * pt.c (tsubst_decl): Likewise.
10113 * typeck.c (convert_arguments): Likewise.
10114
7e9abee9
MM
101152001-06-05 Mark Mitchell <mark@codesourcery.com>
10116
47ee8904
MM
10117 * semantics.c (begin_class_definition): Robustify.
10118
7e9abee9
MM
10119 * pt.c (instantiate_decl): Tell the repository code about the
10120 clones, not the cloned functions.
10121 * repo.c (repo_template_used): Explicitly instantiate the cloned
10122 function, not the clones.
10123
bea09693
NS
101242001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10125
10126 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10127 ICS_BAD_FLAG on created conversion.
10128 (compare_ics): Break out rank.
10129
8f7550ca
NS
101302001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10131
10132 * decl.c (xref_tag): Remove extraneous %s on dependent name
10133 lookup warning.
10134
442e01b6
NS
101352001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10136
10137 * class.c (layout_vtable_decl): Fix off by one error on
10138 build_index_type.
10139 (build_vtt): Likewise.
10140 (build_ctor_vtbl_group): Likewise.
10141
b7442fb5
NS
101422001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10143
10144 * class.c (maybe_indent_hierarchy): New function.
10145 (dump_class_hierarchy_r): Add flags. Dump extra binfo
10146 information, if enabled. Use maybe_indent_hierarchy. Adjust
10147 output format.
10148 (dump_class_hierarchy): Adjust prototype. Adjust output format.
10149 (dump_array, dump_vtable, dump_vtt): New functions.
10150 (finish_struct_1): Adjust hierarchy dumping.
10151 (initialize_vtable): Call dump_vtable.
10152 (build_vtt): Call dump_vtt.
10153 (build_ctor_vtbl_group): Call dump_vtable.
10154 * decl2.c (flag_dump_class_layout): Remove.
10155 (cxx_decode_option): Remove dump translation unit
10156 and dump class hierarchy check. Call dump_switch_p.
10157 (finish_file): Adjust dumping.
10158 (dump.c): Only dump base classes if not TDF_SLIM.
10159 Only dump namespace members if not TDF_SLIM.
10160 * optimize.c (dump_function): New function.
10161 (optimize_function): Call dump_function.
10162 * semantics.c (expand_body): Use dump_enabled_p.
10163
e5410b32
NS
101642001-06-01 Nathan Sidwell <nathan@codesourcery.com>
10165
10166 PR g++/2936
10167 Part missed from first commit
10168 * decl2.c (finish_anon_union): Copy context.
10169
e97c9488
NS
101702001-05-30 Nathan Sidwell <nathan@codesourcery.com>
10171
10172 PR g++/2936
e97c9488
NS
10173 * optimize.c (remap_decl): Remap anonymous aggregate members too.
10174
87d9ac49
NS
101752001-05-26 Nathan Sidwell <nathan@codesourcery.com>
10176
10177 PR g++/2823
10178 * semantics.c (expand_body): Don't optimize thunks.
10179
88657302
RH
101802001-05-25 Sam TH <sam@uchicago.edu>
10181
10182 * cp-tree.h lex.h: Fix header include guards.
10183
101842001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
10185
10186 * decl.c (init_decl_processing): Tweak.
10187
0b1161fc
MM
101882001-05-24 Mark Mitchell <mark@codesourcery.com>
10189
10190 * decl.c (duplicate_decls): Tidy.
10191 (init_decl_processing): Always set flag_no_builtin.
10192
6f56d925
NS
101932001-05-24 Nathan Sidwell <nathan@codesourcery.com>
10194
10195 PR c++/2184
10196 * decl2.c (do_local_using_decl): Push the decls, even in a
10197 template.
10198
39e0656d
MM
101992001-05-22 Mark Mitchell <mark@codesourcery.com>
10200
10201 * optimize.c (initialize_inlined_parameters): Don't set
10202 TREE_READONLY for a VAR_DECL taking the place of an inlined
10203 PARM_DECL.
10204
0401d499
JM
102052001-05-22 Jason Merrill <jason_merrill@redhat.com>
10206
10207 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10208 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10209 attribute.
10210
14fc3426
JM
102112001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
10212
10213 * parse.y: Refer to compound literals as such, not as
10214 constructor-expressions.
10215
3f41ffd8
MM
102162001-05-21 Mark Mitchell <mark@codesourcery.com>
10217
10218 * call.c (build_op_delete_call): Ignore exception-specifications
10219 when looking for matching delete operators.
10220 * init.c (build_new_1): Compute whether or not the allocation
10221 function used is a placement allocation function or not, and
10222 communicate this information to build_op_delete_call.
10223
1a6025b4
JM
102242001-05-21 Jason Merrill <jason_merrill@redhat.com>
10225
90ecce3e
JM
10226 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
10227 (build_vtbl_ref): Adjust.
10228 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10229 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10230 Re-add vtable-gc.
10231 (unsupported_options): Correspondingly.
10232
10233 * decl2.c (maybe_make_one_only): Check flag_weak, not
10234 supports_one_only().
10235
1a6025b4
JM
10236 * cp-tree.def (START_CATCH_STMT): Lose.
10237 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
10238 * tree.c (cp_statement_code_p): Don't case it.
10239 * semantics.c (cp_expand_stmt): Likewise.
10240 * cp-tree.h (START_CATCH_TYPE): Lose.
10241 (HANDLER_TYPE): New.
10242 * except.c (expand_start_catch_block): Don't start any blocks.
10243 Return the type.
10244 (expand_end_catch_block): Don't end any blocks.
10245 * parse.y (handler): Don't pass anything from finish_handler_parms
10246 to finish_handler.
10247 * pt.c (tsubst_expr): Likewise.
10248 * semantics.c (begin_handler): Call note_level_for_catch here.
10249 (finish_handler_parms): Don't return anything.
10250 (genrtl_catch_block, begin_catch_block): Lose.
10251 (genrtl_handler): Call expand_start_catch here.
10252
102532001-05-18 Jason Merrill <jason_merrill@redhat.com>
10254
10255 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10256 (get_vtable_decl, build_vtt): Not here.
10257
d30a825a
NS
102582001-05-20 Nathan Sidwell <nathan@codesourcery.com>
10259
10260 PR c++/2781
10261 * optimize.c (update_cloned_parm): Copy addressability and other
10262 flags.
10263
3b82c249
KL
102642001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10265
10266 * pt.c (determine_specialization): Ignore artificial functions.
10267
2a967f3d
NB
102682001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
10269
10270 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10271 (C_RID_CODE): Remove.
10272 * lex.c (cxx_init_options): Call set_identifier_size. Update.
10273 (init_parse): Don't do it here.
10274
f99df08e
DN
102752001-05-18 Diego Novillo <dnovillo@redhat.com>
10276
10277 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10278 function declaration to avoid stripping the symbol's attributes.
10279
2b0cbc5d
NS
102802001-05-18 Nathan Sidwell <nathan@codesourcery.com>
10281
10282 * decl.c (pushdecl): Adjust error string.
10283 (xref_tag): Adjust friend class injection warning. Remove the
10284 inherited name from the class shadowed scope.
10285
e6855a2d
MM
102862001-05-17 Mark Mitchell <mark@codesourcery.com>
10287
10288 * except.c (cp_protect_cleanup_actions): New function.
07167a18 10289 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
10290 here. Do set lang_protect_cleanup_actions.
10291
cc469ee9
NS
102922001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10293
10294 * spew.c (read_token): Call yyerror on all unexpected tokens.
10295
3f0a9b35
NS
102962001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10297
10298 * init.c (member_init_ok_or_else): Take a tree rather than
10299 string for name.
10300 (expand_member_init): Adjust.
10301
8d0cb60d
NC
103022001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
10303
10304 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 10305 decls if the first decl is a friend.
8d0cb60d 10306
1f730ff7
ZW
103072001-05-12 Zack Weinberg <zackw@stanford.edu>
10308
10309 * except.c (choose_personality_routine): Export. Add
10310 explanatory comment. Take an enum languages, not a boolean.
10311 (initialize_handler_parm): Adjust to match.
10312 * cp-tree.h: Prototype choose_personality_routine.
10313 * lex.c (handle_pragma_java_exceptions): New function.
10314 (init_cp_pragma): Register #pragma GCC java_exceptions.
10315
90e0c410
NB
103162001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10317
10318 * method.c (build_mangled_C99_name): Remove unused prototype.
10319
cb7fdde2
AO
103202001-05-12 Alexandre Oliva <aoliva@redhat.com>
10321
10322 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10323 * typeck.c (get_member_function_from_ptrfunc,
10324 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10325 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
10326
10327 Reverted Geoff Keating's 2001-05-03's patch.
10328
401deb20
IR
103292001-05-11 Ira Ruben <ira@apple.com>
10330
10331 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10332
8e93d446
NB
103332001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
10334
10335 * cp-tree.h (finish_label_expr, lookup_label): Delete.
10336 * parse.y: Update for '&&'; don't issue warning here.
10337 * semantics.c (finish_label_expr): Delete.
10338
5cdba4ff
MM
103392001-05-07 Mark Mitchell <mark@codesourcery.com>
10340
10341 * splay-tree.h (splay_tree_max): New function.
10342 (splay_tree_min): Likewise.
10343
8e9eff6b
GK
103442001-05-03 Geoffrey Keating <geoffk@redhat.com>
10345
10346 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10347 (pfn_vflag_identifier): Define.
10348 Update comment about layout of pointer functions.
10349 (build_ptrmemfunc1): Update prototype.
10350 (expand_ptrmemfunc_cst): Update prototype.
10351 * decl.c (initialize_predefined_identifiers): Initialize
10352 pfn_vflag_identifier.
10353 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10354 an extra field to the type.
07167a18 10355 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
10356 expand_ptrmemfunc_cst and build_ptrmemfunc1.
10357 * typeck.c (get_member_function_from_ptrfunc): When
10358 FUNCTION_BOUNDARY < 16, look at additional field to determine
10359 if a pointer-to-member is a real pointer or a vtable offset.
10360 (build_ptrmemfunc1): Add new parameter to contain extra field.
10361 (build_ptrmemfunc): Pass the extra field around.
10362 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
10363 (pfn_from_ptrmemfunc): Ignore the extra field.
10364
acc72c37
MM
103652001-05-03 Mark Mitchell <mark@codesourcery.com>
10366
10367 * cp-tree.h (flag_inline_trees): Update documentation.
10368 * decl.c (init_decl_processing): Adjust handling of
10369 flag_inline_functions and flag_inline_trees to support -O3.
10370 (grokfndecl): Set DECL_INLINE on all functions if that's what
10371 the user requested.
10372 (save_function_data): Clear DECL_INLINE in
10373 current_function_cannot_inline is non-NULL.
10374 * decl2.c (flag_inline_trees): Update documentation.
10375
5158d7ee
NS
103762001-05-03 Nathan Sidwell <nathan@codesourcery.com>
10377
10378 * dump.c (cp_dump_tree, USING_STMT case): New case.
10379 * tree.c (cp_statement_code_p): Add USING_STMT.
10380 * decl2.c (do_using_directive): Add the using directive statement.
10381
10382 * tree.c (walk_tree): Reformat an if block.
10383
80f5bb34
MM
103842001-05-02 Mark Mitchell <mark@codesourcery.com>
10385
10386 * decl.c (compute_array_index_type): Don't try to do anything with
10387 the indices when processing a template.
10388
3e411c3f
KG
103892001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10390
10391 * call.c: NULL_PTR -> NULL.
10392 * class.c: Likewise.
10393 * cvt.c: Likewise.
10394 * decl.c: Likewise.
10395 * decl2.c: Likewise.
10396 * except.c: Likewise.
10397 * init.c: Likewise.
10398 * rtti.c: Likewise.
10399 * search.c: Likewise.
10400 * tree.c: Likewise.
10401 * typeck.c: Likewise.
10402 * typeck2.c: Likewise.
10403
46188dca
MM
104042001-05-02 Mark Mitchell <mark@codesourcery.com>
10405
10406 * decl2.c (do_using_directive): Revert previous patch.
10407
9da99f7d
NS
104082001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10409
10410 * cp-tree.def (USING_STMT): New statement node.
10411 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
10412 * decl2.c (do_using_directive): Add USING_STMT to statement
10413 tree. Don't emit errors when processing template decl.
10414 * pt.c (tsubst_expr, USING_STMT case): New case.
10415 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
10416
4b48a93e
NS
104172001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10418
10419 * call.c (build_new_op): Convert args from reference here.
10420 (build_conditional_expr): Don't convert here.
10421
1bcea8d7
NS
104222001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10423
10424 * spew.c (last_token_id): New static variable.
10425 (read_token): Set it here.
10426 (yyerror): Use it here.
10427
d72040f5
RH
104282001-04-30 Richard Henderson <rth@redhat.com>
10429
749ced52 10430 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
10431 * decl.c: Likewise.
10432
c3aac512
MM
104332001-04-30 Mark Mitchell <mark@codesourcery.com>
10434
10435 * gxxint.texi: Remove.
10436 * Make-lang.in: Remove all traces of gxxint.texi.
10437
d2a6f3c0 104382001-04-30 Mark P Mitchell <mark@codesourcery.com>
5fd893d5
MM
10439
10440 * decl2.c (start_static_initialization_or_destruction): Correct
10441 logic to handle the -fno-use-cxa-atexit case.
10442
d60e5448
MM
104432001-04-30 Mark Mitchell <mark@codesourcery.com>
10444
10445 * optimize.c (update_cloned_parm): New function.
10446 (maybe_clone_body): Use it. Update the `this' parameter too.
10447
7200764f
JM
104482001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
10449
10450 * decl2.c (unsupported_options): Add new-abi.
10451 * lang-options.h: Remove no longer supported options.
10452
2d46ec83
NS
104532001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10454
10455 * except.c (can_convert_eh): Don't check template parms,
10456 typename types etc.
10457
02a1a68c
NS
104582001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10459
10460 * optimize.c (maybe_clone_body): Copy parameter names and locations.
10461
5f6eeeb3
NS
104622001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10463
10464 * cp-tree.h (adjust_clone_args): Prototype new function.
10465 * class.c (adjust_clone_args): New function.
10466 * decl.c (start_function): Call it for in charge ctors.
10467
1b28d441
MM
104682001-04-26 Mark Mitchell <mark@codesourcery.com>
10469
10470 * method.c (use_thunk): Make sure that thunks really are emitted
10471 when requested.
10472
0576ec13
NS
104732001-04-26 Nathan Sidwell <nathan@codesourcery.com>
10474
10475 * mangle.c (write_chars): New macro.
10476 (hwint_to_ascii): New function
10477 (write_number): Use it.
10478 (write_integer_cst): Deal with really big numbers.
10479
b96ada87
MM
104802001-04-25 Mark Mitchell <mark@codesourcery.com>
10481
10482 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
10483 the clone.
10484
6bda7a5e
NS
104852001-04-25 Nathan Sidwell <nathan@codesourcery.com>
10486
10487 * decl.c (grokdeclarator): Set context of namespace scope
10488 TYPE_DECLS.
10489
11fe225a
ZW
104902001-04-24 Zack Weinberg <zackw@stanford.edu>
10491
10492 * cp/optimize.c: Include hashtab.h.
10493 (struct inline_data): Add tree_pruner.
10494 (expand_call_inline, expand_calls_inline): Use it when calling
10495 walk_tree.
10496 (optimize_function): Initialize and free tree_pruner.
10497
0ba8a114
NS
104982001-04-24 Nathan Sidwell <nathan@codesourcery.com>
10499
10500 Lazy __FUNCTION__ generation.
10501 * cp-tree.def (FUNCTION_NAME): Remove.
10502 * cp-tree.h (function_name_declared_p): Remove.
10503 (cp_fname_init): Prototype.
10504 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
10505 don't call declare_function_name. Call start_fname_decls.
10506 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
10507 clobber the line number.
10508 (cp_fname_init): New function.
10509 (start_function): Call start_fname_decls.
10510 (finish_function): Call finish_fname_decls.
10511 * lex.c (reswords): Add slots for __FUNCTION__ et al.
10512 (rid_to_yy): Add mappings for __FUNCTION__ et al.
10513 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
10514 * parse.y (VAR_FUNC_NAME): New token.
10515 (primary): Add VAR_FUNC_NAME.
10516 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
10517 generation.
10518 (tsubst, FUNCTION_NAME case): Remove.
10519 (tsubst_copy, FUNCTION_NAME case): Remove.
10520 (tsubst_expr, DECL_STMT case): Be careful with a
10521 DECL_PRETTY_FUNCTION_P.
10522 (instantiate_decl): Remove function_name_declared_p.
10523 * semantics.c (begin_compound_statement): Don't call
10524 declare_function_name here.
10525 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
10526 (finish_translation_unit): Call finish_fname_decls.
10527 (expand_body): Remove function_name_declared_p.
10528 * typeck2.c (digest_init): Allow any ERROR_MARK.
10529
dfbb4f34
NS
105302001-04-24 Nathan Sidwell <nathan@codesourcery.com>
10531
10532 * pt.c (tsubst_decl): Use VOID_TYPE_P.
10533 * semantics.c: Fix some typos.
10534
e2584c52
PE
105352001-04-23 Phil Edwards <pme@sources.redhat.com>
10536
10537 * cp/decl2.c (flag_honor_std): Always initialize to 1.
10538
d4c3ec27
KG
105392001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10540
10541 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
10542
2ac8a0f9
JM
105432001-04-23 Jason Merrill <jason_merrill@redhat.com>
10544
10545 * except.c (build_throw): Wrap the initialization of the exception
10546 object in a MUST_NOT_THROW_EXPR.
10547 (do_free_exception): #if 0.
10548
968b956a
MM
105492001-04-20 Mark Mitchell <mark@codesourcery.com>
10550
10551 * cp-tree.h (finish_enum): Change prototype.
10552 * decl.c (finish_enum): Reorganize.
10553 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 10554
aa1826e2
NS
105552001-04-20 Nathan Sidwell <nathan@codesourcery.com>
10556
10557 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
10558 't' case.
10559
06d9f09f
NS
105602001-04-20 Nathan Sidwell <nathan@codesourcery.com>
10561
10562 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
10563 (layout_empty_base): Return at end flag.
10564 (build_base_field): Likewise.
10565 (build_base_fields): Likewise.
10566 (layout_virtual_bases): Don't add 1 to eoc value.
10567 (end_of_class): Use full size for empty bases.
10568 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
10569 empty bases. Don't add 1 to eoc value. Only add trailing padding
10570 if we're an empty class with no empty bases.
10571 (dump_class_hierarchy): Dump size and alignment.
10572
351a0f00
JJ
105732001-04-20 Jakub Jelinek <jakub@redhat.com>
10574
10575 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
10576 ICS_BAD_FLAG.
10577
881cae05
JJ
105782001-04-20 Jakub Jelinek <jakub@redhat.com>
10579
10580 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
10581 is found, look first if name does not match the structure name.
10582
5d2ed28c
MM
105832001-04-19 Mark Mitchell <mark@codesourcery.com>
10584
10585 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
10586 set.
10587 (SET_DECL_LANGUAGE): New macro.
10588 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
10589 (pushdecl): Likewise.
10590 (build_library_fn_1): Likewise.
10591 (build_cp_library_fn): Likewise.
10592 (grokfndecl): Likewise.
10593 (grokvardecl): Mark `extern "C"' variables as having C linkage.
10594 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
10595 * lex.c (retrofit_lang_decl): Likewise.
10596 * mangle.c (mangle_decl_string): Don't mangle the names of
10597 variables declared with C language linkage.
10598 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 10599
41251458
JDA
106002001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
10601
10602 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
10603 flag_access_control from uninitialized storage.
10604
1b4a93f7
MM
106052001-04-15 Mark Mitchell <mark@codesourcery.com>
10606
24272dc0
MM
10607 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
10608 * mangle.c (write_pointer_to_member_type): Fix mangling of
10609 pointers to cv-qualified member function types.
10610
1b4a93f7
MM
10611 * init.c (build_delete): Create a SAVE_EXPR for the address if
10612 we're going to use it more than once.
10613
530ec96d
MM
106142001-04-13 Mark Mitchell <mark@codesourcery.com>
10615
10616 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
10617 (expand_ptremfunc_cst): Change prototype.
10618 (delta2_from_ptrmemfunc): Remove.
10619 * expr.c (cplus_expand_constant): Adjust call to
10620 expand_ptrmemfunc_cst.
10621 * typeck.c (build_ptrmemfunc1): Simplify.
10622 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
10623 results in a constant.
10624 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
10625 (delta2_from_ptrmemfunc): Remove.
10626 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 10627
ee8fc32b
JM
106282001-04-12 Jason Merrill <jason_merrill@redhat.com>
10629
10630 * cp-tree.h (decl_namespace_list): New macro.
10631 (struct saved_scope): Add decl_ns_list.
10632 * decl.c (mark_saved_scope): Mark it.
10633 * decl2.c: Lose static decl_namespace_list.
10634 (init_decl2): Don't save it.
10635
48857160
KG
106362001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10637
10638 * cp-tree.h (warn_return_type, yylex): Delete redundant
10639 declarations.
11fe225a 10640
48857160
KG
10641 * decl.c (current_class_depth, global_namespace): Likewise.
10642
10643 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
10644
10645 * repo.c (flag_use_repository): Likewise.
10646
845e14ed
KG
106472001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10648
10649 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
10650 set_block, pushdecl, getdecls, gettags, init_decl_processing,
10651 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
10652 lvalue_or_else, print_lang_statistics, comp_target_types,
10653 unsigned_type, signed_type, signed_or_unsigned_type,
10654 build_function_call, mark_addressable, incomplete_type_error):
10655 Delete redundant declarations.
10656
1951a1b6
JM
106572001-04-11 Jason Merrill <jason_merrill@redhat.com>
10658
10659 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
10660 (TYPE_ANONYMOUS_P): New macro.
10661 (TAGGED_TYPE_P): New macro.
10662 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
10663 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
10664 * tree.c (no_linkage_helper): Likewise.
10665 * semantics.c (begin_class_definition): Likewise.
10666 * pt.c (convert_template_argument): Likewise.
10667 * lex.c (check_for_missing_semicolon): Likewise.
10668
0fb3018c
NS
106692001-04-12 Nathan Sidwell <nathan@codesourcery.com>
10670
10671 * class.c (dfs_unshared_virtual_bases): New function.
10672 (mark_primary_bases): Call it.
10673 (check_bases): Ignore virtual bases when determining
10674 nearly-emptiness.
10675
bbb53468
NS
106762001-04-12 Nathan Sidwell <nathan@codesourcery.com>
10677
10678 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
10679
9b7949d5
MM
106802001-04-11 Mark Mitchell <mark@codesourcery.com>
10681
10682 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
10683 cloned function to the clone.
10684
d6684bc8
KG
106852001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10686
10687 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
10688
10689 * semantics.c: Include expr.h.
10690
a2095778
NS
106912001-04-11 Nathan Sidwell <nathan@codesourcery.com>
10692
10693 * method.c (implicitly_declare_fn): Commonize code for copy ctor
10694 and assignment op. Set TREE_USED for parameter.
10695
78b45a24
MM
106962001-04-10 Mark Mitchell <mark@codesourcery.com>
10697
10698 * class.c (find_final_overrider_data): Add `candidates'.
10699 (dfs_find_final_overrider): Don't issue error messages
10700 prematurely.
10701 (find_final_overrider): Issue error messages here.
10702 (build_base_field): Don't warn about amgibuous direct bases here.
10703 (warn_about_ambiguous_direct_bases): New function.
10704 (layout_class_type): Use it.
10705
0450d74d
RH
107062001-04-10 Richard Henderson <rth@redhat.com>
10707
10708 * typeck.c (build_array_ref): Push the array reference inside
10709 COMPOUND_EXPR and COND_EXPR.
10710
79065db2
MM
107112001-04-05 Mark Mitchell <mark@codesourcery.com>
10712
10713 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
10714 * decl.c (duplicate_decls): Adjust accordingly.
10715 (maybe_commonize_var): Likewise.
10716 (grokfndecl): Likewise.
10717 (start_function): Likewise.
10718 (start_method): Likewise.
10719 * decl2.c (key_method): Likewise.
10720 (import_export_decl): Likewise.
10721 * method.c (implicitly_declare_fn): Likewise.
10722 * optimize.c (maybe_clone_body): Likewise.
11fe225a 10723
fdecbf8a
BK
107242001-04-05 Benjamin Kosnik <bkoz@redhat.com>
10725
b03eced6 10726 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 10727
d2a6f3c0 107282001-04-05 J"orn Rennecke <amylaar@redhat.com>
0b4c1646
R
10729
10730 * search.c (get_dynamic_cast_base_type): When building a new
10731 constant, set its type to ssizetype.
10732
e59d6709
JJ
107332001-04-04 Jakub Jelinek <jakub@redhat.com>
10734
10735 * optimize.c (expand_call_inline): Only add newly inlined statements
10736 into inlined_stmts.
10737
0c918ce5
MM
107382001-04-03 Mark Mitchell <mark@codesourcery.com>
10739
10740 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
10741 (OPERATOR_FORMAT): Likewise.
10742 (OPERATOR_TYPENAME_FORMAT): Likewise.
10743 * operators.def: Remove old name-mangling information.
10744 * decl.c (grok_op_properties): Adjust accordingly.
10745 * lex.c (init_operators): Likewise.
10746 * rtti.c (get_tinfo_decl): Issue error messages about types that
10747 have variable size.
10748
92788413
MM
107492001-04-03 Mark Mitchell <mark@codesourcery.com>
10750
11fe225a 10751 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
10752 when processing an inline member function.
10753 * semantics.c (expand_body): Call import_export_decl before
10754 emitting inline functions.
10755
52a11cbf
RH
107562001-03-28 Richard Henderson <rth@redhat.com>
10757
10758 IA-64 ABI Exception Handling:
10759 * cp-tree.def (EH_SPEC_BLOCK): New.
10760 (MUST_NOT_THROW_EXPR): New.
10761 * cp-tree.h: Update changed function declarations.
10762 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
10763 (CPTI_CALL_UNEXPECTED): New.
10764 (struct cp_language_function): Rename x_eh_spec_try_block
10765 to x_eh_spec_block.
10766 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 10767 * decl.c (current_binding_level): If no current function
52a11cbf
RH
10768 bindings, revert to scope_chain.
10769 (initialize_predefined_identifiers): Remove __cp_push_exception.
10770 (store_parm_decls): Use begin_eh_spec_block.
10771 (finish_function): Use finish_eh_spec_block.
10772 (mark_lang_function): Update for name changes.
10773 * decl2.c (finish_file): No mark_all_runtime_matches.
10774 * dump.c (cp_dump_tree): Handle new tree codes.
10775 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
10776 * except.c (catch_language_init, catch_language): Remove.
10777 (init_exception_processing): Don't set language code.
10778 Initialize call_unexpected_node, protect_cleanup_actions,
10779 eh_personality_libfunc, lang_eh_runtime_type.
10780 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
10781 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
10782 (prepare_eh_type): Split out type canonicalizations ...
10783 (build_eh_type_type): ... from here.
10784 (build_eh_type_type_ref): Remove.
10785 (mark_all_runtime_matches): Remove.
10786 (build_exc_ptr): New.
10787 (do_begin_catch, do_end_catch): New.
10788 (do_pop_exception): Remove.
10789 (build_terminate_handler): Remove.
10790 (choose_personality_routine): Split out language choice from ...
10791 (initialize_handler_parm): ... here.
10792 Use MUST_NOT_THROW_EXPR.
10793 (expand_start_catch_block): Use do_begin_catch. Simplify Java
10794 exception object handling.
10795 (expand_start_eh_spec, expand_end_eh_spec): Remove.
10796 (expand_exception_blocks, alloc_eh_object): Remove.
10797 (begin_eh_spec_block, finish_eh_spec_block): New.
10798 (do_allocate_exception, do_free_exception): New.
10799 (expand_throw): Merge into ...
10800 (build_throw): ... here. Update for abi.
10801 * expr.c (cplus_expand_expr): No expand_internal_throw.
10802 Handle MUST_NOT_THROW_EXPR.
10803 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
10804 * semantics.c (*) Update for except.h name changes.
10805 (genrtl_try_block): No protect_with_terminate.
10806 (genrtl_eh_spec_block): New.
10807 (genrtl_handler): Don't emit the goto here.
10808 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
10809 (genrtl_finish_function): Don't expand_exception_blocks.
10810 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
10811
826840d9
RH
108122001-03-28 Richard Henderson <rth@redhat.com>
10813
10814 * decl.c (struct named_label_list): Rename eh_region to
10815 in_try_scope, add in_catch_scope.
10816 (struct binding_level): Rename eh_region to is_try_scope,
10817 add is_catch_scope.
10818 (note_level_for_try): Rename from note_level_for_eh.
10819 (note_level_for_catch): New.
10820 (poplevel): Copy both is_try_scope and is_catch_scope to
10821 the named_label_list struct.
10822 (check_previous_goto_1): Don't check for catch block via
10823 DECL_ARTIFICIAL; use in_try_scope instead.
10824 (check_goto): Likewise.
10825 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
10826 * except.c (expand_start_catch_block): Call note_level_for_catch.
10827 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
10828
531073e7
RH
108292001-03-27 Richard Henderson <rth@redhat.com>
10830
10831 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
10832 exceptions_via_longjmp.
10833
8653a2c3
PE
108342001-03-27 Phil Edwards <pme@sources.redhat.com>
10835
10836 * pt.c (check_default_tmpl_args): Make error messages clearer.
10837
108382001-03-26 Phil Edwards <pme@sources.redhat.com>
10839
10840 * error.c: Also undefine 'A' macro used for cp_printers definition.
10841
911e6107
KG
108422001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10843
10844 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10845
005a5cb0
MY
108462001-03-26 Mike Yang <yang@research.att.com>
10847 Mark Mitchell <mark@codesourcery.com>
10848
10849 * dump.c (dump_access): New function.
10850 (cp_dump_tree): Use it. Dump basetype information for class
10851 types.
10852
b850de4f
MM
108532001-03-26 Mark Mitchell <mark@codesourcery.com>
10854
10855 * Makefile.in (optimize.o): Depend on params.h.
10856 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
10857 (init_decl_processing): Set flag_no_inline when doing
10858 inlining-on-trees.
10859 * optimize.c: Include params.h.
10860 (struct inline_data): Improve documentation of FNS. Add
10861 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
10862 (INSNS_PER_STMT): New macro.
10863 (remap_block): Use CLONING_P.
10864 (inlinable_function_p): Don't inline big functions.
10865 (expand_call_inline): Keep track of how much inlining we've done.
10866 (optimize_function): Set FIRST_INLINED_FN.
10867 (maybe_clone_body): Set CLONING_P.
10868 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
10869 tree nodes.
10870 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
10871 rest_of_compilation. Clear DECL_RTL for local variables
10872 afterwards.
10873 (clear_decl_rtl): New function.
11fe225a 10874
788bf0e3
NS
108752001-03-26 Nathan Sidwell <nathan@codesourcery.com>
10876
10877 Implement DR 209
10878 * cp-tree.h (skip_type_access_control,
10879 reset_type_access_control): Prototype.
10880 * decl.c (grokdeclarator): Access of friends is not checked.
10881 * parse.y (component_decl_list): Reset type access control.
10882 * semantics.c (decl_type_access_control): Clear
10883 current_type_lookups.
10884 (save_type_access_control): Don't save if not deferring.
10885 (skip_type_access_control, reset_type_access_control): New
10886 functions.
10887 (begin_class_definition): Do type access control for basetypes.
10888 Start deferred access control.
10889 (finish_class_definition): Resume immediate access control if
10890 this is a local class.
10891
730e1556
KG
108922001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10893
10894 * class.c (add_method): Use memcpy/memmove, not bcopy.
10895
10896 * decl.c (duplicate_decls): Likewise.
10897
f1a0345c
JJ
108982001-03-23 Jakub Jelinek <jakub@redhat.com>
10899
10900 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
10901 not `_'.
10902
8e4ce833
JJ
109032001-03-23 Jakub Jelinek <jakub@redhat.com>
10904
10905 * decl.c (local_names): Define.
10906 (push_local_name): New.
10907 (grok_reference_init): Return init if initializing static reference
10908 variable with non-constant instead of emitting it.
10909 Move expand_static_init call to cp_finish_decl.
10910 (layout_var_decl): Call push_local_name.
10911 (maybe_commonize_var): Allow inlining functions even if they have
10912 static local variables, use comdat_linkage for them if flag_weak.
10913 (check_initializer): Call obscure_complex_init if
838dfd8a 10914 grok_reference_init returned nonzero.
8e4ce833
JJ
10915 (save_function_data): Clear x_local_names.
10916 (pop_cp_function_context): Free x_local_names.
10917 (mark_inlined_fns): Remove.
10918 (mark_lang_function): Mark x_local_names.
10919 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
10920 Mark inlined_fns as tree, remove call to mark_inlined_fns.
10921 * class.c (alter_access): Ensure DECL_ACCESS is never set if
10922 DECL_DISCRIMINATOR_P.
10923 * cp-tree.h (cp_language_function): Add x_local_names.
10924 (lang_decl_flags): Add discriminator into u2.
10925 (lang_decl_inlined_fns): Remove.
10926 (lang_decl): inlined_fns is now a TREE_VEC.
10927 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
10928 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
10929 TREE_VEC, not a custom structure.
10930 (optimize_function): Likewise.
10931 * mangle.c (discriminator_for_local_entity): Discriminate among
10932 VAR_DECL local entities.
10933 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10934 is not valid.
10935
60c87482
BM
109362001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
10937
10938 Add support for Java interface method calls.
10939 * cp-tree.h (struct lang_type): Add java_interface flag.
10940 (TYPE_JAVA_INTERFACE): New macro.
10941 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10942 by setting TYPE_JAVA_INTERFACE.
10943 * call.c (java_iface_lookup_fn): New static.
11fe225a 10944 (build_over_call): If calling a method declared in a
60c87482
BM
10945 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10946 expression which resolves the function address.
10947 (build_java_interface_fn_ref): New function.
10948
94c7f30b
RH
109492001-03-22 Richard Henderson <rth@redhat.com>
10950
10951 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10952 * except.c: Don't include it.
10953
fd8b7a0e 109542001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 10955 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
10956
10957 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10958 New nonterminals.
10959 (data_def, component_decl): Add reductions to bad_decl.
10960
a1c2b86d
JJ
109612001-03-22 Jakub Jelinek <jakub@redhat.com>
10962
10963 * method.c (do_build_assign_ref): Don't use build_modify_expr for
10964 anonymous aggregates, since they don't have assignment operator
10965 method.
10966 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10967 assignment operators for anonymous structure fields.
10968
46ccf50a
JM
109692001-03-21 Jason Merrill <jason@redhat.com>
10970
10971 * pt.c (instantiate_decl): Abort if we see a member constant
10972 instantiation that doesn't already have its initializer.
10973 Downgrade explicit instantiation without definition to pedwarn.
10974
10975 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10976 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10977 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10978
10979 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10980 (pending_vtables): Remove.
10981 * decl2.c (pending_vtables): Remove.
10982 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10983 CLASSTYPE_VTABLE_NEEDS_WRITING.
10984 (import_export_class): Likewise.
10985 (init_decl2): Don't mark pending_vtables.
10986 * lex.c (handle_pragma_vtable): Just sorry.
10987 * pt.c (instantiate_class_template): Don't mess with
10988 CLASSTYPE_VTABLE_NEEDS_WRITING.
10989 (mark_class_instantiated): Likewise.
10990 * ptree.c (print_lang_type): Don't print it.
10991 * semantics.c (begin_class_definition): Don't set it.
10992
10993 * pt.c (template_tail): Replace with last_pending_template.
10994 (maybe_templates, maybe_template_tail): Remove.
10995 (add_pending_template): Adjust.
10996 (instantiate_pending_templates): Adjust.
10997
10998 * cp-tree.h (struct saved_scope): Remove lang_stack field.
10999 (current_lang_stack): Remove.
11000 * decl.c (maybe_push_to_top_level): Don't initialize it.
11001 (duplicate_decls): Use current_lang_depth.
11002 (xref_basetypes): Likewise.
11003 * class.c (current_lang_depth): New fn.
11004 (push_lang_context): Use more varray functionality.
11005 (pop_lang_context): Likewise.
64d9c3fe
JM
11006
11007 * error.c (GLOBAL_THING): Always use '__'.
11008
1c06710a
MM
110092001-03-21 Mark Mitchell <mark@codesourcery.com>
11010
71cb9286
MM
11011 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11012
1c06710a
MM
11013 * mangle.c (mangle_decl_string): Mangle the names of overloaded
11014 operators, even when they have `extern "C"' linkage.
11015
92643fea
MM
110162001-03-19 Mark Mitchell <mark@codesourcery.com>
11017
11018 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11019 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11020 where it's not necessary.
11021 (add_method): Remove optimization involving comparison of
11022 DECL_ASSEMBLER_NAME.
11023 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11024 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11025 where it's not necessary.
11026 (check_methods): Likewise.
11027 (build_clone): Likewise.
11028 (built_vtt): Likewise.
11029 * cp-tree.h (DECL_NEEDED_P): Likewise.
11030 * decl.c (pushtag): Likewise.
11031 (duplicate_decls): Likewise.
11032 (pushdecl): Likewise.
11033 (builtin_function): Likewise.
11034 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11035 (build_cp_library_fn): Likewise.
11036 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11037 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11038 where it's not necessary.
11039 (make_rtl_for_nonlocal_decl): Likewise.
11040 (cp_finish_decl): Likewise.
11041 (grokfndecl): Likewise.
11042 (grokvardecl): Likewise.
11043 (grokdeclarator): Likewise.
11044 (start_function): Likewise.
11045 (cp_missing_return_ok_p): Likewise.
11046 * decl2.c (grokclassfn): Likewise.
11047 (check_classfn): Likewise.
11048 (finish_static_data_member_decl): Likewise.
11049 (grokfield): Likewise.
11050 * error.c (GLOBAL_IORD_P): Remove.
11051 (dump_global_iord): Improve output.
11052 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11053 * except.c (nothrow_libfn_p): Summarily reject any function not in
11054 namespace-scope.
11055 * init.c (build_java_class_ref): Don't explicitly set
11056 DECL_ASSEMBLER_NAME after calling mangle_decl.
11057 * mangle.c (mangle_decl_string): Handle extern "C" functions.
11058 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11059 * method.c (set_mangled_name_for_decl): Don't explicitly set
11060 DECL_ASSEMBLER_NAME after calling mangle_decl.
11061 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11062 IDENTIFIER_GLOBAL_VALUE for the thunk.
11063 * pt.c (set_mangled_name_for_template_decl): Remove.
11064 (check_explicit_specialization): Don't use it.
11065 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11066 (tsubst_friend_function): Likewise.
11067 (tsubst_decl): Likewise.
11068 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11069 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11070 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
11071 where it's not necessary.
11072 (tinfo_base_init): Likewise.
11073 (create_real_tinfo_var): Likewise.
11074 * search.c (looup_field_1): Likewise.
11075 * semantics.c (finish_named_return_value): Likewise.
11076 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 11077
d064d75a
GDR
110782001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
11079
11080 Correct semantics restrictions checking in throw-expression.
11081 * except.c (is_admissible_throw_operand): New function.
11082 (build_throw): Use it.
11083
a3eab619
MM
110842001-03-14 Mark Mitchell <mark@codesourcery.com>
11085
11086 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11087 and its ilk.
11088
19e7881c
MM
110892001-03-14 Mark Mitchell <mark@codesourcery.com>
11090
11091 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11092 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11093 * decl.c (duplicate_decls): Likewise.
11094 (builtin_function): Likewise.
11095 (build_library_fn): Likewise.
11096 (build_cp_library_fn): Likewise.
11097 (check_initializer): Likewise.
11098 (cp_finish_decl): Likewise.
11099 * decl2.c (grokfield): Likewise.
11100 (grok_function_init): Remove #if 0'd code.
11101 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11102 * friend.c (do_friend): Likewise.
11103 * init.c (get_temp_regvar): Likewise.
11104 * method.c (make_thunk): Likewise.
11105 * pt.c (tsubst_friend_function): Likewise.
11106 (tsubst_decl): Likewise.
11107 (regenerate_decl_from_template): Likewise.
11108 * semantics.c (genrtl_named_return_value): Likewise.
11109 (expand_body): Likewise.
11110 (genrtl_finish_function): Likewise.
11111 * tree.c (cp_tree_equal): Likewise.
11fe225a 11112
78fe06c2
NS
111132001-03-12 Nathan Sidwell <nathan@codesourcery.com>
11114
11115 * call.c (convert_like_real): Add extra semantics to INNER
11116 parameter. Don't convert to temporary if a user conversion
11117 gives us an lvalue that we're about to bind to a reference.
11118 Set INNER to indicate pending reference binding on recursive
11119 calls.
11120
b3e68a79
NB
111212001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11122
11123 * cp/lex.c: Delete duplicate pending_lang_change.
11124
111252001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11126
11127 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11128 Similarly.
11129 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11130 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11131
11642c3a
ZW
111322001-03-09 Zack Weinberg <zackw@stanford.edu>
11133
11134 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11135
bb6852eb 111362001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
11137
11138 * cp-tree.h (set_identifier_local_value): Remove unused decl.
11139
cc937581
ZW
111402001-03-06 Zack Weinberg <zackw@stanford.edu>
11141
11142 * spew.c: Remove references to CPP_OSTRING.
11143
d1188d91
AH
111442001-03-06 Andrew Haley <aph@redhat.com>
11145
11146 * typeck.c (convert_arguments): Check that we have an fndecl.
11147
4eaf1d5b
AH
111482001-03-05 Andrew Haley <aph@redhat.com>
11149
11150 * typeck.c (convert_arguments): Don't do ellipsis conversion for
11151 __built_in_constant_p.
11152
7eeb553c
NS
111532001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11154
11155 * typeck.c (build_static_cast): Allow enum to enum conversions
11156 as per DR 128.
11157
d282fcb2
NS
111582001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11159
11160 * class.c (check_field_decls): Pointers to member do not a
11161 non-pod struct make, as per DR 148.
11162
f86fdf68
NS
111632001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11164
11165 * call.c (joust): cp_pedwarn when using gnu extension concerning
11166 worst conversion sequences.
11167
d6edb99e
ZW
111682001-03-01 Zack Weinberg <zackw@stanford.edu>
11169
11170 * decl.c: Replace all uses of 'boolean' with 'bool'.
11171
f7143427
ZW
111722001-03-01 Zack Weinberg <zackw@stanford.edu>
11173
11174 * lang-specs.h: Add zero initializer for cpp_spec field to
11175 all array elements that need one. Don't put an #ifdef inside
11176 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11177 use it.
11178
fbfe8c9e
NS
111792001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11180
11181 Implement using decls inside template functions.
11182 * decl2.c (validate_nonmember_using_decl): Don't special case
11183 fake_std_node in the global namespace. Don't reject early when
11184 processing a template.
11185 (do_local_using_decl): Add to statement tree. Don't do further
11186 processing when building a template.
11187 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11188
4d24a889
NS
111892001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11190
11191 * decl2.c (do_nonmember_using_decl): Don't complain if we find
11192 same function. Do complain about ambiguating extern "C"
11193 declarations.
11194
e5844e6d
NS
111952001-02-28 Nathan Sidwell <nathan@codesourcery.com>
11196
11197 Remove floating point and complex type template constant parms.
11198 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11199 COMPLEX_TYPE extensions.
11200 (invalid_nontype_parm_type_p): Likewise.
11201
788f238c
JO
112022001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
11203
11204 * except.c (call_eh_info): Revert "match_function"'s type.
11205
73ea87d7
NS
112062001-02-27 Nathan Sidwell <nathan@codesourcery.com>
11207
11208 Fix ctor vtable vcall offsets.
11209 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11210 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11211 (get_matching_base): Remove.
11212 (get_original_base): New function.
11fe225a 11213 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
11214 Use a virtual thunk for a ctor vtable with an index
11215 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11216 primary base within a constructor vtable. Only set
11217 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11218 when primary base has been lost.
11219 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11220
fe730161
JO
112212001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
11222
11223 * call.c (joust): Ensure more_specialized()'s argument length
11224 parameter has correct value for constructors.
11225
e5dd4aad
NS
112262001-02-26 Nathan Sidwell <nathan@codesourcery.com>
11227
11228 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 11229
e5dd4aad
NS
11230 * decl.c (mark_inlined_fns): Prototype.
11231
25200ab2
MM
112322001-02-22 Mark Mitchell <mark@codesourcery.com>
11233
11234 * spew.c (yylex): Correct handling of friends.
11235
f58c04ac
MM
112362001-02-22 Mark Mitchell <mark@codesourcery.com>
11237
11238 * mangle.c (write_encoding): Pass write_function_type the
11239 FUNCTION_DECL for the function being encoded.
11240 (write_function_type): Pass it along to write_bare_function_type.
11241 (write_bare_function_type): Pass it along to write_method_parms.
11242 (write_method_parms): Don't mangle the compiler-generated
11243 parameters to a constructor or destructor.
11244
9c96f3f8
AJ
112452001-02-22 Andreas Jaeger <aj@suse.de>
11246
11247 * optimize.c: Include toplev.h for
11248 note_deferral_of_defined_inline_function prototype.
11249
b3bae5e2
JJ
112502001-02-22 Jakub Jelinek <jakub@redhat.com>
11251
11252 * cp-tree.h (struct lang_decl_inlined_fns): New.
11253 (struct lang_decls): Add inlined_fns.
11254 (DECL_INLINED_FNS): New macro.
11255 * optimize.c (struct inline_data): Add inlined_fns.
11256 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11257 (inlinable_function_p): Likewise, fix typo in comment,
11258 function is not inlinable if it already inlined function currently
11259 being optimized.
306ef644 11260 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
11261 (optimize_function): Initialize inlined_fns.
11262 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11263 * decl.c (mark_inlined_fns): New function.
11264 (lang_mark_tree): Call it.
11265
5daf7c0a
JM
112662001-02-21 Jason Merrill <jason@redhat.com>
11267
11268 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11269 (DECL_UNINLINABLE): Move to middle-end.
11270
11271 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11272 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11273 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11274 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11275 parms and outer BLOCK. note_deferral_of_defined_inline_function.
11276
11277 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11278 second parm of op=.
11279
2c0fc02d
MM
112802001-02-19 Mark Mitchell <mark@codesourcery.com>
11281
11282 * decl2.c (set_decl_namespace): Allow explicit instantiations in
11283 any namespace.
11284
612164eb
KL
112852001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11286
11287 * optimize.c (expand_call_inline): Don't walk subtrees of type
11288 nodes.
11289
69a59a49
MM
112902001-02-18 Mark Mitchell <mark@codesourcery.com>
11291
11292 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11293 for a destructor.
11294
e0fff4b3
JM
112952001-02-18 Jason Merrill <jason@redhat.com>
11296
11297 Do put the VTT parameter in DECL_ARGUMENTS.
11298 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11299 (current_vtt_parm): New macro.
11300 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11301 (DECL_HAS_VTT_PARM_P): New macro.
11302 (DECL_VTT_PARM): Remove.
11303 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11304 * decl.c (duplicate_decls): Only copy the operator code if
11305 appropriate.
11306 (start_function): Set current_vtt_parm.
11307 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 11308 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
11309 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
11310 * class.c (build_clone): Maybe remove the VTT parm.
11311 * optimize.c (maybe_clone_body): Set up the VTT parm.
11312 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11313 * call.c (build_over_call): Just allow the VTT arg.
11314 * method.c (make_thunk): Don't set DECL_VTT_PARM.
11315 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11316 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11317 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11318 * error.c (dump_function_decl): Likewise.
11319 * call.c (build_user_type_conversion_1, convert_like_real): Abort
11320 if we try to call a constructor with in-charge or VTT parms.
11321 * method.c (skip_artificial_parms_for): New fn.
11322 * call.c (add_function_candidate, build_over_call): Call it.
11323 * call.c (build_new_method_call): Use current_vtt_parm.
11324 * init.c (expand_virtual_init): Likewise.
11325 * class.c (same_signature_p): No longer static.
11326 * cp-tree.h: Declare it.
11327 * search.c (look_for_overrides_r): Use it.
11328
c750255c
MM
113292001-02-17 Mark Mitchell <mark@codesourcery.com>
11330
8fa33dfa
MM
11331 * cp-tree.h (new_abi_rtti_p): Remove.
11332 (name_mangling_version): Likewise.
11333 (flag_do_squangling): Likewise.
11334 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11335 * decl.c (grokfndecl): Likewise.
11336 * decl2.c (name_mangling_version): Remove.
11337 (flag_do_squangling): Likewise.
11338 (lang_f_options): Remove `squangle'.
11339 (unsupported_options): Add `squangle'.
11340 (cxx_decode_option): Issue a warning about uses of
11341 -fname-mangling-version.
11342 (finish_file): Remove old ABI support.
11343 * pt.c (check_explicit_specialization): Likewise.
11344 (tsubst_decl): Likewise.
11345 * rtti.c (init_rtti_processing): Likewise.
11346 (build_headof): Likewise.
11347 (get_tinfo_decl_dynamic): Likewise.
11348 (tinfo_from_decl): Likewise.
11349 (build_dynamic_cast_1): Likewise.
11350 (synthesize_tinfo_var): Likewise.
12fa82db
MM
11351 * init.c (build_new): Allow enumeration types for the array-bounds
11352 in a direct-new-declarator.
11353
11354 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
11355
c750255c
MM
11356 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
11357 TREE_PROTECTED from the template being specialized.
11358
a714e5c5
JM
113592001-02-17 Jason Merrill <jason@redhat.com>
11360
11361 * decl2.c (build_artificial_parm): Set TREE_READONLY.
11362
9c96f3f8 11363 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
11364 pointer-to-function or -member-function type.
11365 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
11366 a pmf.
11367
8084b91e
MM
113682001-02-17 Mark Mitchell <mark@codesourcery.com>
11369
11370 * call.c (check_dtor_name): Handle template names correctly.
11371
48f22ed2
JM
113722001-02-16 Jason Merrill <jason@redhat.com>
11373
11374 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
11375 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
11376 * optimize.c (maybe_clone_body): Don't substitute it.
11377 * call.c (build_new_method_call): Check in_chrg instead.
11378 * init.c (expand_virtual_init): Likewise.
11379
e8186ecf
GDR
113802001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
11381
11382 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
11383 class-type introduces at least a type-name.
11384
2c1be322
JJ
113852001-02-16 Jakub Jelinek <jakub@redhat.com>
11386
11387 * call.c (convert_like_real): Create a temporary for non-lvalue.
11388
aab8454a
JO
113892001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
11390
11391 * cp-tree.h: Fix typos in comments.
11392
a901fa64
JM
113932001-02-16 Jason Merrill <jason@redhat.com>
11394
11395 * optimize.c (remap_block): If we're compiling a clone, pass the
11396 new block to insert_block.
11397
8853373c
MM
113982001-02-16 Mark Mitchell <mark@codesourcery.com>
11399
11400 * semantics.c (finish_asm_stmt): Robustify.
11401
b60ecc04
MM
114022001-02-15 Mark Mitchell <mark@codesourcery.com>
11403
11404 * pt.c (push_template_decl_real): Don't remangle the name of a
11405 class template.
11406
e658449e
JM
114072001-02-15 Jim Meyering <meyering@lucent.com>
11408
fd48c9b5
DD
11409 * Make-lang.in (c++.install-common): Depend on installdirs.
11410 (c++.install-info): Likewise.
11411 (c++.install-man): Likewise.
e658449e 11412
f1a3f197
MM
114132001-02-15 Mark Mitchell <mark@codesourcery.com>
11414
11415 * typeck2.c (build_m_component_ref): Robustify.
11416
8826b15b
AO
114172001-02-15 Alexandre Oliva <aoliva@redhat.com>
11418
11419 * friend.c (do_friend): Don't take the nested [template] class
11420 into account when deciding whether to warn about the friend
11421 function not referring to a template function.
11422
7161c1a5
JJ
114232001-02-14 Jakub Jelinek <jakub@redhat.com>
11424
11425 * typeck.c (build_unary_op): Clarify error message.
11426
4806765e
AH
114272001-02-08 Aldy Hernandez <aldyh@redhat.com>
11428
a901fa64
JM
11429 * parse.y (component_constructor_declarator): allow optional
11430 parentheses around constructor class name.
4806765e 11431
bfc8e1e2
NS
114322001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11433
11434 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
11435 section.
11436 * init.c (emit_base_init): Remove incorrect comment about
11437 virtual bases.
11438 * method.c (make_thunk): Fix comment alignment.
11439
394fd776
NS
114402001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11441
11442 Kill remnants of this is variable.
11443 * cp-tree.h (flag_this_is_variable): Remove.
11444 * decl2.c (flag_this_is_variable): Remove.
11445 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
11446 (build_vbase_path): The path is non-static, even in a cdtor.
11447 (resolves_to_fixed_type_p): Add additional return value.
11448 * search.c (init_vbase_pointers): Adjust.
11449 * tree.c (lvalue_p_1): Adjust.
11450 * typeck.c (mark_addressable): Adjust.
11451
d0ab7624
NS
114522001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11453
11454 * pt.c (unify): Don't check cv quals of array types.
11455
7773899b
NS
114562001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11457
11458 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
11459 check whether we already have the type.
11460
52682a1b
MM
114612001-02-13 Mark Mitchell <mark@codesourcery.com>
11462
11463 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
11464 * call.c (build_op_delete_call): Simplify to remove duplicate
11465 code.
11466 * class.c (clone_function_decl): Don't build the deleting variant
11467 of a non-virtual destructor.
11468 * decl.c (finish_destructor_body): Don't call delete if this is a
11469 non-virtual destructor.
11470 * init.c (build_delete): Explicitly call `operator delete' when
11471 deleting an object with a non-virtual destructor.
9c96f3f8 11472
3b6bd115
JM
114732001-02-13 Jason Merrill <jason@redhat.com>
11474
11475 * lang-specs.h: Add more __EXCEPTIONS.
11476
45abaea8
NS
114772001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11478
11479 * typeck2.c (process_init_constructor): Check
11480 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
11481
996065b4
NS
114822001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11483
11484 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
11485 Remove spurious information in comment. Allow further
11486 adjustments of REFERENCE_TYPE args.
11487
82c18d5c
NS
114882001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11489
11490 * errfn.c (cp_deprecated): Tweak diagnostic text.
11491 * parse.y (new_initializer): Deprecate initializer lists
11492 extension.
11493
1f84ec23
MM
114942001-02-12 Mark Mitchell <mark@codesourcery.com>
11495
11496 Remove old ABI support.
11497
8c310e3f
MM
114982001-02-11 Mark Mitchell <mark@codesourcery.com>
11499
b1012f1b
MM
11500 * decl2.c (flag_vtable_thunks): Always set it to 1.
11501 (flag_new_abi): Likewise.
11502 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 11503
8c310e3f
MM
11504 * Makefile.in (g++spec.o): Fix typo.
11505
3b635dfc
JM
115062001-02-09 Jason Merrill <jason@redhat.com>
11507
11508 * lang-specs.h: Restore definition of __EXCEPTIONS.
11509
bd0d5d4a
JM
115102001-02-08 Jason Merrill <jason@redhat.com>
11511
11512 * search.c (shared_member_p): New function.
11513 (lookup_field_r): Use it.
11514 * cp-tree.h (SHARED_MEMBER_P): Remove.
11515
11516 * method.c (process_overload_item): Handle template-dependent array
11517 bounds.
11518 * pt.c (type_unification_real): If we end up with undeduced nontype
11519 parms, try again.
11520
11521 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
11522 types.
11523
11524 * typeck2.c (friendly_abort): Don't say anything if we have
11525 earlier errors or sorries.
11526
9c96f3f8 11527 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
11528 wchar_t. Ignore if in_system_header.
11529
11530 * decl.c (maybe_push_cleanup_level): New fn...
11531 (start_decl_1): ...split out from here.
11532 * cvt.c (build_up_reference): Use it.
11533 * cp-tree.h: Declare it.
11534
a9374841
MM
115352001-02-07 Mark Mitchell <mark@codesourcery.com>
11536
9c96f3f8 11537 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
11538 spec.
11539
a87b4257
NS
115402001-02-06 Nathan Sidwell <nathan@codesourcery.com>
11541
11542 * pt.c (lookup_template_class): Make sure it's a primary
11543 template or template_template_parm when called from the parser.
11544 (instantiate_template_class): Add assertion.
11545
518fed76
AO
115462001-02-05 Alexandre Oliva <aoliva@redhat.com>
11547
11548 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
11549 from error_mark_node.
11550
9965d119
NS
115512001-02-05 Nathan Sidwell <nathan@codesourcery.com>
11552
11553 Fix specification and implementation bugs in V3 ABI
11554 construction vtables.
11555 * cp-tree.h (flag_dump_class_layout): New flag.
11556 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
11557 (BINFO_LOST_PRIMARY_P): New flag.
11558 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
11559 (BINFO_PRIMARY_MARKED_P): Rename to ...
11560 (BINFO_PRIMARY_P): ... here.
11561 (binfo_via_virtual): New prototype.
11562 * decl2.c (flag_dump_class_layout): New flag.
11563 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
11564 use `=' as a file name separator.
11565 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
11566 bases.
11567 (build_vtbl_address): If this is a virtual primary base, then
11568 get the vtbl of what it is ultimately primary for.
11569 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
11570 for BINFO_PRIMARY_P.
11571 (dfs_skip_nonprimary_vbases_markedp): Likewise.
11572 (get_shared_vbase_if_not_primary): Likewise.
11573 (dfs_get_pure_virtuals): Likewise.
11574 (expand_upcast_fixups): Likewise.
11575 (fixup_virtual_upcast_offsets): Likewise.
11576 (dfs_find_vbase_instance): Likewise.
11577 (find_vbase_instance): Likewise.
11578 (binfo_from_vbase): Adjust comment to reflect reality.
11579 (binfo_via_virtual): New function.
11580 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
11581 for binfo walking during VTT construction.
11582 (dfs_mark_primary_bases): Remove.
11583 (force_canonical_binfo_r): New function.
11584 (force_canonical_binfo): New function.
11585 (mark_primary_virtual_base): New function.
11586 (mark_primary_bases): Walk in inheritance graph order, use
11587 mark_primary_virtual_base.
11588 (determine_primary_base): Use some more intermediate variables.
11589 (dfs_find_final_overrider): Don't check for overriding along a
11590 virtual path.
11591 (dfs_modify_vtables): Walk into primary virtual bases too.
11592 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
11593 (build_base_fields): Likewise.
11594 (dfs_set_offset_for_unshared_vbases): Likewise.
11595 (layout_virtual_bases): Likewise.
11596 (end_of_class): Likewise.
11597 (finish_struct_1): Call dump_class_hierarchy, if requested.
11598 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
11599 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
11600 (dump_class_hierarchy): Add file parameter. Append to file, if
11601 required.
11602 (finish_vtbls): Adjust accumulate_vtbl_inits call.
11603 Use canonical base for virtual bases.
11604 (build_vtt): Add more comments. Adjust build_vtt_inits call.
11605 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
11606 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
11607 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
11608 virtual VTTs.
11609 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
11610 from DATA. We want virtual primary bases and all bases via virtual.
11611 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
11612 virtual base when not a construction vtable.
11613 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
11614 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
11615 Use canonical bases when processing virtual bases.
11616 (accumulate_vtbl_inits): We're interested in any base via a
11617 virtual path.
11618 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
11619 within a construction vtable, determine what is being overridden.
11620 (build_vtbl_initializer): Add more comments
11621 (add_vcall_offset_vtbl_entries_1): Adjust comment.
11622 (build_rtti_vtbl_entries): Check if the base has lost its
11623 primary.
11624
39d6f2e8
MM
116252001-02-05 Mark Mitchell <mark@codesourcery.com>
11626
11627 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
11628
d2a6f3c0 116292001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
11630
11631 * decl.c (pushdecl): Call abort instead of fatal.
11632 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
11633 * init.c (build_new_1): Likewise.
11634 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
11635 * decl.c (build_typename_type): hash_table_init now returns void.
11636 decl.c (init_decl_processing): Make an error non-fatal.
11637
97458258
MM
116382001-02-04 Mark Mitchell <mark@codesourcery.com>
11639
11640 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
11641 Document.
11642 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11643 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11644 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11645 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11646 * decl.c (maybe_commonize_var): Use the new name-mangling where
11647 appropriate.
11648 * decl2.c (comdat_linkage): Enhance comments. Make all
11649 compiler-generated things static, if COMDAT is not available.
11650 (get_tinfo_decl): Do not make typeinfo objects that belong in the
11651 library COMDAT.
11652 (tinfo_base_init): Use the correct mangled name for typeinfo
11653 strings, and push them into the global scope.
11654 (typeinfo_in_lib_p): New function.
11655 (synthesize_tinfo_var): Use it.
11656 (create_real_tinfo_var): Likewise.
9c96f3f8 11657
55de1b66
JJ
116582001-02-03 Jakub Jelinek <jakub@redhat.com>
11659
11660 * decl.c (push_class_binding): Use context_for_name_lookup instead
11661 of CP_DECL_CONTEXT.
11662 * search.c (context_for_name_lookup): Remove static. Check for NULL
11663 context in the loop.
11664 * cp-tree.h (context_for_name_lookup): Add prototype.
11665
e92730aa
JJ
116662001-02-02 Jakub Jelinek <jakub@redhat.com>
11667
11668 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
11669 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
11670 Remove.
11671 * call.c (convert_class_to_reference, build_user_type_conversion_1,
11672 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
11673
049f6ec9
MM
116742001-02-02 Mark Mitchell <mark@codesourcery.com>
11675
11676 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
11677 of macros used when compiling g++spec.c.
11678 * g++spec.c (lang_specific_driver): Link with the shared
11679 libgcc by default.
11680
718b8ea5
JM
116812001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
11682
11683 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
11684 make_reference_declarator, make_call_declarator), method.c
11685 (implicitly_declare_fn), parse.y (namespace_using_decl,
11686 notype_unqualified_id, expr_or_declarator, new_type_id,
11687 after_type_declarator, direct_after_type_declarator,
11688 notype_declarator, complex_notype_declarator,
11689 complex_direct_notype_declarator, qualified_id,
11690 notype_qualified_id, overqualified_id, direct_new_declarator,
11691 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
11692 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
11693 instead of build_parse_node.
11694
f2d1f0ba
KG
116952001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11696
11697 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
11698 (minus_one_node): Moved to top level gcc directory. Renamed
11699 to integer_minus_one_node.
11700
11701 * init.c (init_init_processing): Don't set minus_one_node.
11702 (build_vec_init): Use integer_minus_one_node.
11703
11704 * rtti.c (get_tinfo_decl_dynamic): Likewise.
11705
6001735e
JJ
117062001-01-28 Jakub Jelinek <jakub@redhat.com>
11707
11708 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
11709 identical and they would be replaced with constant, remove
11710 MODIFY_EXPR from the tree.
11711
c913b6f1
KG
117122001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11713
11714 * Make-lang.in: Remove all dependencies on defaults.h.
11715 * call.c: Don't include defaults.h.
11716 * decl.c: Likewise.
11717 * decl2.c: Likewise.
11718 * except.c: Likewise.
11719 * pt.c: Likewise.
11720 * rtti.c: Likewise.
11721 * tree.c: Likewise.
11722 * typeck.c: Likewise.
11723
324ffb8c
JJ
117242001-01-25 Jakub Jelinek <jakub@redhat.com>
11725
11726 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
11727 operators even in "C" linkage.
11728 * method.c (set_mangled_name_for_decl): Likewise.
11729 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
11730 overloaded operators in "C" linkage.
11731
4b2811e9
NS
117322001-01-24 Nathan Sidwell <nathan@codesourcery.com>
11733
11734 * pt.c (tsubst_decl): Remove IN_DECL parameter.
11735 (tsubst_arg_types): Check parameter is not void.
11736 (tsubst): Adjust tsubst_decl call.
11737
d8caf48e
NS
117382001-01-24 Nathan Sidwell <nathan@codesourcery.com>
11739
11740 * call.c (add_builtin_candidate): Quote std properly, from
11741 previous change.
11742
08511114
KL
117432001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11744
11745 * pt.c (check_explicit_specialization): Clone constructors and
11746 destructors.
11747
92ecdfb7
NS
117482001-01-23 Nathan Sidwell <nathan@codesourcery.com>
11749
11750 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
11751 indicates anything special about template depth. Make sure we
11752 only count the user visible template classes.
11753
4cff6abe
NS
117542001-01-23 Nathan Sidwell <nathan@codesourcery.com>
11755
11756 * call.c (build_conv): Typo in comment.
11757 (add_builtin_candidate): Add more explanation.
11758 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
11759 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
11760 when we have enumeral types.
11761 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
11762 candidates for relops and eqops.
11763 (joust): Simplify control flow. Allow a non-template user
11764 function to hide a builtin.
11765
62e4a758
NS
117662001-01-22 Nathan Sidwell <nathan@codesourcery.com>
11767
11768 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
11769 (more_specialized): Add deduction parameter.
11770 * call.c (joust): Adjust more_specialized call.
11771 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
11772 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
11773 (get_bindings_order): Remove.
11774 (get_bindings_real): Add DEDUCE parameter.
11775 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
11776 REFERENCE_TYPE jig for DEDUCE_ORDER.
11777 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
11778 maybe_adjust_types_for_deduction.
11779 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
11780 directly.
11781 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
11782 (check_cv_quals_for_unify): Use new unify qualifier flags.
11783 (unify): Clear new unify qualifier flags.
11784 (get_bindings_real): Add DEDUCE parameter.
11785 (get_bindings): Adjust call to get_bindings_real.
11786 (get_bindings_overload): Likewise.
11787 (most_specialized_instantiation): Adjust call to
11788 more_specialized.
11789
2a2a9e5a
JM
117902001-01-19 Jason Merrill <jason@redhat.com>
11791
11792 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
11793
11794 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
11795 -fnew-abi.
11796
60696c53
JM
117972001-01-19 Ute Pelkmann <scope.muc@t-online.de>
11798
11799 * decl2.c (arg_assoc_class): Fix double iteration logic.
11800
118012001-01-19 Jason Merrill <jason@redhat.com>
11802
11803 * init.c (build_delete): Always call convert_force to strip cv-quals.
11804
11805 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
11806 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
11807 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
11808
1e00f18c
NS
118092001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11810
11811 * search.c (get_vbase_1): Count only virtual bases.
11812
e13bced2
NS
118132001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11814
11815 * class.c (duplicate_tag_error): Robustify flag clearing.
11816
f9c244b8
NS
118172001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11818
11819 * cp-tree.h (lookup_template_class): Add complain parm.
11820 * decl.c (lookup_namespace_name): Adjust call to
11821 lookup_template_class.
11822 (make_typename_type): Likewise.
11823 * semantics.c (finish_template_type): Likewise.
11824 * pt.c (lookup_template_class): Add complain parm. Adjust.
11825 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
11826 (tsubst): Likewise.
11827
08c2df0f
NS
118282001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11829
11830 * pt.c (copy_default_args_to_explicit_spec): Preserve
11831 object's CV quals. Reorganize.
11832
f5ceeec8
NS
118332001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11834
11835 * typeck.c (build_modify_expr): Say `initialization' for
11836 INIT_EXPRs.
11837 * init.c (build_default_init): Convert to enumeral type, if
11838 needed.
11839
a1cfa434
JJ
118402001-01-18 Jakub Jelinek <jakub@redhat.com>
11841
11842 * parse.y (nomods_initdcl0): Properly set things up for
11843 initdcl0_innards.
11844
028d1f20
NS
118452001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11846
11847 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
11848 (type_unification_real): Set it.
11849 (unify): Use it.
11850
9f724b6a
NS
118512001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11852
11853 * decl.c (finish_destructor_body): Convert to vbase pointer here.
11854
522d6614
NS
118552001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11856
11857 * semantics.c (begin_class_definition): Check we're not inside a
11858 template parm list.
11859
7f805b8f
NS
118602001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11861
11862 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
11863 BASELINK_P.
11864
dc3799c1
KL
118652001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11866
11867 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
11868 * call.c (build_over_call): Add comment.
11869
bb37c4a5
DB
118702001-01-16 Daniel Berlin <dberlin@redhat.com>
11871
826840d9
RH
11872 * cvt.c (ocp_convert): Handle vector type conversion
11873 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 11874
a26e7fb5
PE
118752001-01-16 Phil Edwards <pme@sources.redhat.com>
11876
11877 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
11878 was given.
11879
11b810f1
NS
118802001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11881
11882 * pt.c (check_nontype_parm): Rename to ...
11883 (invalid_nontype_parm_type_p): ... here.
11884 (process_template_parm): Adjust.
11885 (convert_template_argument): Adjust.
11886
db3f4e4e
NS
118872001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11888
11889 * pt.c (check_nontype_parm): New function.
11890 (process_template_parm): Use it.
11891 (convert_template_argument): Use it.
11892 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
11893 member.
11894
ea4f1fce
JO
118952001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
11896
11897 * tree.c: Add defaults.h
11898 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
11899 * Make-lang.in (cp/tree.o): Add defaults.h.
11900
1312c143
JM
119012001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11902
11903 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
11904
4bc1997b
JM
119052001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11906
11907 * g++.1: Change to be ".so man1/gcc.1".
11908
23de1fbf
JM
119092001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11910
11911 * Make-lang.in (c++.info, c++.install-info): Build and install g++
11912 internals info.
11913 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
11914 ($(srcdir)/cp/g++int.info): New target.
11915 * gxxint.texi: Add info directory entry. Use @@ in email address.
11916 * .cvsignore: Update.
11917
0949f723
NS
119182001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11919
11920 * typeck.c (build_c_cast): Do template processing earlier.
11921 Always pedwarn on array casts.
11922
a8641661
NS
119232001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11924
11925 * friend.c (make_friend_class): Make sure a templated class is
11926 actually a template.
11927
844511c8
NS
119282001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11929
11930 * decl2.c (get_guard): Set linkage from guarded decl.
11931
96a1e32d
NS
119322001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11933
11934 * call.c (convert_default_arg): Check for unprocessed
11935 DEFAULT_ARG.
11936 * cp-tree.h (replace_defarg): Move to spew.c.
11937 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11938 spew.c, which is where they really are.
11939 (done_pending_defargs): Declare.
11940 (unprocessed_defarg_fn): Declare.
11941 * decl.c (replace_defarg): Move to spew.c
11942 * parse.y (structsp): Call done_pending_defargs.
11943 * spew.c (defarg_fns): Rearrange list structure.
11944 (defarg_fnsdone): New static variable.
11945 (defarg_depfns): New static variable.
11946 (init_spew): Adjust.
11947 (add_defarg_fn): Store the type in TREE_TYPE.
11948 (do_pending_defargs): Detect and deal with ordering constraints
11949 and circularity.
11950 (done_pending_defargs): New function.
11951 (unprocessed_defarg_fn): New function.
11952 (replace_defarg): Moved from decl.c. Robustify. Don't save
11953 if circularity detected.
11954
34e225a3
NS
119552001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11956
11957 * pt.c (unify): Check array has a domain, before checking
11958 whether it is variable sized.
11959
98979fe0
NS
119602001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11961
11962 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11963 parameters with pointers to arrays of unknown bound.
11964
b37bf5bd
NS
119652001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11966
11967 * parse.y (template_parm_header, template_spec_header): New
11968 reductions. Split out from ...
11969 (template_header): ... here. Use them.
11970 (template_template_parm): Use template_parm_header.
11971 * semantics.c (finish_template_template_parm): Add assert.
11972
6c418184
MM
119732001-01-10 Mark Mitchell <mark@codesourcery.com>
11974
792508b5
MM
11975 * mangle.c (write_builtin_type): Fix thinko.
11976
8afa707f
MM
11977 * pt.c (copy_default_args_to_explicit_spec_1): New function.
11978 (copy_default_args_to_explicit_spec): Likewise.
11979 (check_explicit_specialization): Use it.
11980
6c418184
MM
11981 * class.c (finish_struct_1): Remove last argument in call to
11982 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11983 * decl.c (builtin_function): Likewise.
11984 (build_cp_library_fn): Likewise.
11985 (check_initializer): Likewise.
11986 (make_rtl_for_nonlocal_decl): Likewise.
11987 (cp_finish_decl): Likewise.
11988 (start_function): Likewise.
11989 * decl2.c (finish_anon_union): Likewise.
11990 * friend.c (do_friend): Likewise.
11991 * init.c (build_java_class_ref): Likewise.
11992 * method.c (make_thunk): Likewise.
11993 * pt.c (tsubst_friend_function): Likewise.
11994 * semantics.c (expand_body): Likewise.
11995
31d95fc6
MM
119962001-01-10 Mark Mitchell <mark@codesourcery.com>
11997
11998 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11999 looking at DECL_CLONED_FUNCTION for non-functions.
12000
31bb3027
NS
120012001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12002
12003 * error.c (dump_template_parameter): Use parm to determine how
12004 to print default value.
12005
fd3f43e7
NS
120062001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12007
12008 * class.c (duplicate_tag_error): Clear more flags.
12009
042b4c4e
NS
120102001-01-10 Nathan Sidwell <nathan@codesourcery.com>
12011
12012 * call.c (build_new_method_call): Use binfo_for_vbase.
12013
a7537031
JM
120142001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
12015
12016 * cp-tree.h (flag_cond_mismatch): Don't declare.
12017 * decl2.c (flag_cond_mismatch): Don't define.
12018 (lang_f_options): Remove cond-mismatch.
12019 (unsupported_options): Add cond-mismatch.
12020
186c0fbe
NS
120212001-01-09 Nathan Sidwell <nathan@codesourcery.com>
12022
12023 * class.c (handle_using_decl): Reject using of constructor name
12024 of sourcing class. Allow injecting of a method with same name as
12025 nested class. Fixup error messages.
12026
28ec8d6b
JM
120272001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
12028
12029 * decl2.c (lang_decode_option): Handle -Wformat=2.
12030
3febd123
NS
120312001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12032
12033 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12034 initialized_in_class.
12035 (DECL_DEFINED_IN_CLASS_P): Rename to ...
12036 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12037 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12038 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12039 * pt.c (check_default_tmpl_args): Adjust for
12040 DECL_INITIALIZED_IN_CLASS_P.
12041 (instantiate_class_template): Likewise.
12042 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 12043
3febd123
NS
12044 * class.c (finish_struct): Constify saved_filename.
12045
1f0d71c5
NS
120462001-01-08 Nathan Sidwell <nathan@codesourcery.com>
12047
12048 * class.c (duplicate_tag_error): Adjust diagnostic.
12049 (finish_struct): Locally set location to start of struct.
12050 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12051
5bf15e84 120522001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
12053
12054 * decl.c (struct binding_level): Adjust class_shadowed comments
12055 to reflect reality.
aba649ba 12056 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
12057 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12058 Don't set TREE_VALUE on the class_shadowed list.
12059
23d4e4cc 120602001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
12061
12062 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
12063 * init.c (build_java_class_ref): When using the new ABI, search
12064 `class$' and have it mangled with `mangle_decl.'
12065 * mangle.c (write_java_integer_type_codes): New function.
12066 (write_builtin_type): Detect and mangle Java integer and real
12067 types.
9c96f3f8 12068
0c58da3e
MM
120692001-01-07 Mark Mitchell <mark@codesourcery.com>
12070
12071 * decl2.c (grokfield): Don't accept `asm' specifiers for
12072 non-static data members.
12073
45b8ddb4
KG
120742001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12075
12076 * expr.c (cplus_expand_expr): Don't reset `target'.
12077
96302433
NB
120782001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
12079
826840d9 12080 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 12081
220bce48
NS
120822001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12083
12084 * parse.y (template_datadef): Check for error_mark_node.
12085
bfa2cb33
NS
120862001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12087
12088 * cp-tree.def (DEFAULT_ARG): Make `x' class.
12089
eaa7c03f
JM
120902001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
12091
12092 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12093 (record_builtin_type): Make non-static.
12094 (flag_short_double): Don't declare.
12095 (init_decl_processing): Remove the creation of many tree nodes now
12096 in c_common_nodes_and_builtins.
12097 (build_void_list_node): New function.
12098 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12099 * cp-tree.h (flag_short_wchar): Don't declare.
12100
3af4c257
MM
121012001-01-04 Mark Mitchell <mark@codesourcery.com>
12102
12103 * call.c (build_conv): Don't use build1 for USER_CONV.
12104 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12105
03dc0325
JM
121062001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
12107
12108 * lex.c (lang_init): Call c_common_lang_init.
12109
3c505507
NS
121102001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12111
12112 * search.c (lookup_fnfields_here): Remove.
12113 (look_for_overrides_r): Use lookup_fnfields_1.
12114 Ignore functions from using declarations.
12115
03378143
NS
121162001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12117
12118 Implement exceptions specifiers for implicit member functions.
12119 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12120 * method.c (synthesize_exception_spec): New function.
12121 (locate_dtor, locate_ctor, locate_copy): New functions.
12122 (implicitly_declare_fn): Generate the exception spec too.
12123 * search.c (check_final_overrider): Check artificial functions
12124 too.
9c96f3f8 12125 * typeck2.c (merge_exception_specifiers): New function.
03378143 12126
f30efcb7
JM
121272001-01-03 Jason Merrill <jason@redhat.com>
12128
12129 * init.c (build_default_init): New fn.
12130 (perform_member_init): Split out from here.
12131 (build_new_1): Use it. Simplify initialization logic.
12132 (build_vec_init): Take an array, rather than a pointer and maxindex.
12133 Speed up simple initializations. Don't clean up if we're assigning.
12134 * cp-tree.h: Adjust.
12135 * decl2.c (do_static_initialization): Remove TREE_VEC case.
12136 * parse.y (new_initializer): Return void_zero_node for ().
12137 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12138 * typeck2.c (digest_init): Only complain about user-written
12139 CONSTRUCTORs.
12140
a412bf75
MS
121412000-12-22 Mike Stump <mrs@wrs.com>
12142
12143 * decl2.c: (max_tinst_depth): Increase to 50.
12144
4890c2f4
MM
121452001-01-02 Mark Mitchell <mark@codesourcery.com>
12146
12147 * class.c (invalidate_class_lookup_cache): Zero the
12148 previous_class_values.
12149 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12150 TREE_INT_CST_HIGH.
12151 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12152 * decl.c (free_bindings): New variable.
12153 (push_binding): Don't create a new binding if we have one on the
12154 free list.
12155 (pop_binding): Put old bindings on the free list.
12156 (init_decl_processing): Use size_int, not build_int_2.
12157 Register free_bindings as a GC root.
12158 (cp_make_fname_decl): Use size_int, not build_int_2.
12159 (push_inline_template_parms_recursive): Likewise.
12160 (end_template_parm_list): Likewise.
688f6688 12161 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
12162 (tsubst_template_parms): Use size_int, not build_int_2.
12163 (tsubst): Likewise.
12164 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 12165
4f78b9a8
RH
121662001-01-02 Richard Henderson <rth@redhat.com>
12167
12168 * parse.y (asm): Set ASM_INPUT_P.
12169
3c8c2a0a
JM
121702001-01-02 Jason Merrill <jason@redhat.com>
12171
96d6c610
JM
12172 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12173 for v3 ABI.
12174
12175 * typeck.c (cp_truthvalue_conversion): New fn.
12176 * cvt.c (ocp_convert): Use it.
12177
12178 * cp-tree.h: Lose c-common.c decls.
12179
12180 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12181 * cvt.c (convert_to_void): Use type_unknown_p.
12182
9c96f3f8 12183 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
12184 pointer-to-member types.
12185
12186 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
12187 parse.y as C.
12188
12189 * call.c (build_new_method_call): Do evaluate the object parameter
12190 when accessing a static member.
12191 * typeck.c (build_component_ref): Likewise.
12192
d363e7bf
AJ
121932001-01-02 Andreas Jaeger <aj@suse.de>
12194
12195 * decl.c (cp_missing_noreturn_ok_p): New.
12196 (init_decl_processing): Set lang_missing_noreturn_ok_p.
12197
77f5250d
JJ
121982000-12-29 Jakub Jelinek <jakub@redhat.com>
12199
12200 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12201
31a714f6
MM
122022000-12-29 Mark Mitchell <mark@codesourcery.com>
12203
12204 * class.c (pushclass): Remove #if 0'd code.
12205 * cp-tree.h (overload_template_name): Remove.
12206 * decl.c (store_bindings): Simplify.
12207 (pop_from_top_level): Likewise.
12208 * pt.c (overload_template_name): Remove.
d363e7bf 12209 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
12210 needed.
12211
414ea4aa
MM
122122000-12-28 Mark Mitchell <mark@codesourcery.com>
12213
12214 * pt.c (register_local_specialization): Don't return a value.
12215 (lookup_template_class): Use move-to-front heuristic when looking
12216 up template instantiations.
12217 (instantiate_decl): Only push_to_top_level when we're actually
12218 going to instantiate the template.
12219
6f18f7e9
HPN
122202000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
12221
12222 * search.c (binfo_for_vtable): Return least derived class, not
12223 most. Handle secondary vtables.
12224
e5214479
JM
122252000-12-22 Jason Merrill <jason@redhat.com>
12226
3c8c2a0a
JM
12227 * pt.c (more_specialized): Don't optimize len==0.
12228 (fn_type_unification): If we're adding the return type, increase len.
12229
ebb1abc3
JM
12230 * typeck.c (build_binary_op): Fix pmf comparison logic.
12231
c939ca5f
JM
12232 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12233 DECL_STATIC_FUNCTION_P.
12234
e6fe680d
JM
12235 * semantics.c (genrtl_finish_function): Don't try to jump to
12236 return_label unless it exists.
12237
e5214479
JM
12238 In partial ordering for a call, ignore parms for which we don't have
12239 a real argument.
12240 * call.c (joust): Pass len to more_specialized.
12241 (add_template_candidate_real): Strip 'this', pass len.
12242 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
12243 (get_bindings_order): New fn. Pass len down.
12244 (get_bindings_real): Strip 'this', pass len.
12245 (fn_type_unification): Likewise.
12246 (type_unification_real): Succeed after checking 'len' args.
12247 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 12248 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
12249 pass len.
12250
122512000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
12252
12253 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12254 DECL_TEMPLATE_RESULT.
12255
12256 * search.c (lookup_field_r): Call lookup_fnfields_1, not
12257 lookup_fnfields_here.
12258
12259 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12260
12261 * call.c (build_object_call): Also allow conversions that return
12262 reference to pointer to function.
12263 (add_conv_candidate): Handle totype being ref to ptr to fn.
12264 (build_field_call): Also allow members of type reference to function.
12265 Lose support for calling pointer to METHOD_TYPE fields.
12266
12267 * error.c (dump_expr): Handle *_CAST_EXPR.
12268
12269 * typeck2.c (build_scoped_ref): Always convert to the naming class.
12270
12271 * tree.c (break_out_cleanups): Lose.
12272 * cp-tree.h: Remove prototype.
12273 * typeck.c (build_component_ref): Don't break_out_cleanups.
12274 (build_compound_expr): Likewise.
12275 * semantics.c (finish_expr_stmt): Likewise.
12276
3e4d04a1
RH
122772000-12-20 Richard Henderson <rth@redhat.com>
12278
12279 * cp-tree.h: Update declarations.
12280 * decl.c (finish_case_label): Return the new stmt node.
12281 * semantics.c (finish_goto_stmt): Likewise.
12282 (finish_expr_stmt, finish_return_stmt): Likewise.
12283 (finish_break_stmt, finish_continue_stmt): Likewise.
12284 (finish_asm_stmt): Likewise.
12285 * parse.y (already_scoped_stmt): Set STMT_LINENO.
12286 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12287 (simple_if, simple_stmt): Return the new stmt node.
12288 (save_lineno): New.
12289
20d380b1
JM
122902000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
12291
12292 * cp-tree.h: Don't declare warn_long_long.
12293
221c7a7f
KL
122942000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12295
12296 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12297 IS_AGGR_TYPE.
12298
b429fdf0
KL
122992000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12300
12301 * pt.c (unify): Handle when both ARG and PARM are
12302 BOUND_TEMPLATE_TEMPLATE_PARM.
12303
c2beae77
KL
123042000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12305
12306 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12307 DECL_TEMPLATE_PARM_P.
12308
c3e899c1
JM
123092000-12-15 Jason Merrill <jason@redhat.com>
12310
96790071
JM
12311 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
12312
8d42565b
JM
12313 * init.c (build_new_1): Don't strip quals from type.
12314
fab09a24
JM
12315 * decl.c (pushdecl): Don't check for linkage on a non-decl.
12316
c3e899c1
JM
12317 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12318
12319 * call.c (build_new_function_call): Lose space before paren in
12320 error message.
12321 (build_new_method_call): Likewise.
12322
12323 * typeck2.c (build_m_component_ref): Propagate quals from datum.
12324
edac124d
KL
123252000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12326
12327 * pt.c (check_explicit_specialization): Propagate default
12328 function arguments to explicit specializations.
12329
31750649 123302000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
12331
12332 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12333 and <? operators.
12334
5e818b93
JM
123352000-12-08 Jason Merrill <jason@redhat.com>
12336
12337 * error.c (dump_function_name): Don't let the user see __comp_ctor.
12338
12339 Clean up copy-initialization in overloading code.
12340 * call.c (build_user_type_conversion_1): Die if we are asked to
12341 convert to the same or a base type.
12342 (implicit_conversion): Avoid doing so. Lose reference binding code.
12343 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12344 direct-initialization. Also do direct-init part of copy-init.
12345 (build_user_type_conversion): Don't provide context to convert_like.
12346 * cvt.c (ocp_convert): build_user_type_conversion will now provide
12347 the constructor call for copy-init.
12348
12349 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12350 instantiation of a member template.
12351 (do_decl_instantiation): Not here.
12352
38da6039
NS
123532000-12-07 Nathan Sidwell <nathan@codesourcery.com>
12354
12355 * class.c (check_field_decls): Don't special case anonymous
12356 fields in error messages.
c9407e4c 12357 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 12358
38da6039
NS
12359 * tree.c (pod_type_p): Use strip_array_types.
12360 (cp_valid_lang_attribute): Likewise.
12361 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
12362 multiple evaluations.
d363e7bf 12363 (cp_has_mutable_p): Use strip_array_types.
38da6039 12364
a11d04b5
NS
123652000-12-07 Nathan Sidwell <nathan@codesourcery.com>
12366
12367 * cp-tree.h (sufficient_parms_p): Declare new function.
12368 * call.c (sufficient_parms_p): New function, broken out of ...
12369 (add_function_candidate): ... here. Use it.
12370 (add_conv_candidate): Use it.
12371 * decl.c (grok_ctor_properties): Use it.
12372
5eec2847
JJ
123732000-12-07 Jakub Jelinek <jakub@redhat.com>
12374
12375 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
12376
c907e684
JM
123772000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
12378
12379 * decl2.c (lang_decode_option): Handle -Wformat-security.
12380
74601d7c
KL
123812000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12382
12383 * pt.c (verify_class_unification): New function.
12384 (get_class_bindings): Use it.
12385 (try_class_unification): Tidy.
12386 (unify): Handle when argument of a template-id is not
12387 template parameter dependent.
12388 (template_args_equal): Handle when TREE_CODE's do not match.
12389
8954e858
AO
123902000-12-06 Alexandre Oliva <aoliva@redhat.com>
12391
12392 * lang-specs.h (c++): When invoking the stand-alone preprocessor
12393 for -save-temps, pass all relevant -Defines to it, and then don't
12394 pass them to cc1plus.
12395
3dc9aec6
WC
123962000-12-05 Will Cohen <wcohen@redhat.com>
12397
12398 * decl.c (finish_case_label): Cleared
12399 more_cleanups_ok in surrounding function scopes.
12400 (define_label): Likewise.
12401
cbb40945
NS
124022000-12-05 Nathan Sidwell <nathan@codesourcery.com>
12403
12404 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
12405 (get_matching_virtual): Remove.
12406 (look_for_overrides): Declare new function.
12407 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
12408 DECL_VINDEX here.
12409 * class.c (check_for_override): Move base class iteration code
12410 to look_for_overrides.
12411 * search.c (next_baselink): Remove.
12412 (get_virtuals_named_this): Remove.
12413 (get_virtual_destructor): Remove.
12414 (tree_has_any_destructors_p): Remove.
12415 (struct gvnt_info): Remove.
12416 (check_final_overrider): Remove `virtual' from error messages.
12417 (get_matching_virtuals): Remove. Move functionality to ...
12418 (look_for_overrides): ... here, and ...
12419 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
12420 to be overriding.
12421
61402b80
NS
124222000-12-05 Nathan Sidwell <nathan@codesourcery.com>
12423
12424 * typeck.c (get_delta_difference): If via a virtual base,
12425 return zero.
12426 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
12427 adjustment.
12428
39abc9a6
RH
124292000-12-04 Richard Henderson <rth@redhat.com>
12430
12431 * error.c (dump_tree): Use output_add_string not OB_PUTS.
12432
c00996a3
JM
124332000-12-04 Jason Merrill <jason@redhat.com>
12434
12435 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 12436 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
12437 type_for_mode.
12438 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
12439 Pass intSI_type_node and the like through type_for_mode.
12440 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
12441 * pt.c (tsubst, unify): Likewise.
12442 * tree.c (walk_tree): Likewise.
12443 * error.c (dump_type): Likewise.
12444 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 12445
c00996a3
JM
12446 * Make-lang.in: Tweak top comment for emacs.
12447 (cp/TAGS): Restore.
12448
12449 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
12450
c00996a3
JM
12451 * class.c (clone_function_decl): Robustify.
12452
124532000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
12454
12455 * decl.c (store_bindings): Only search in the non modified
12456 old_bindings for duplicates.
12457
00bb3dad
NS
124582000-12-04 Nathan Sidwell <nathan@codesourcery.com>
12459
12460 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
12461 TYPE_POLYMORPHIC_P.
d363e7bf 12462
00bb3dad
NS
12463 * typeck.c (build_static_cast): Remove unused variable.
12464
dc957d14
KL
124652000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12466
12467 * pt.c: Fix typo in comment.
12468
4d808927
JM
124692000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
12470
12471 * decl2.c (warn_format): Remove definition.
12472 (lang_decode_option): Handle -Wformat-nonliteral,
12473 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
12474
5fd8e536
JM
124752000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
12476
12477 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
12478 (init_decl_processing): Don't create string_type_node,
12479 const_string_type_node, wint_type_node, intmax_type_node,
12480 uintmax_type_node, default_function_type, ptrdiff_type_node and
12481 unsigned_ptrdiff_type_node. Adjust position of call to
12482 c_common_nodes_and_builtins.
12483 (identifier_global_value): New function.
12484
13f9714b
NS
124852000-12-01 Nathan Sidwell <nathan@codesourcery.com>
12486
12487 * call.c (standard_conversion): Reject pointer to member
12488 conversions from ambiguous, inaccessible or virtual bases.
12489 * typeck.c (build_static_cast): Don't check pointers to members
12490 specially.
12491
31b1b957
NS
124922000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12493
12494 * method.c (do_build_copy_constructor): Preserve cv
12495 qualifications when accessing source object members.
12496 (do_build_assign_ref): Likewise. Remove separate diagnostics for
12497 unnamed fields.
12498
717e3f73
NS
124992000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12500
12501 * method.c (do_build_assign_ref): Construct appropriately
12502 CV-qualified base reference. Don't allow const casts in base
12503 conversion.
12504
2c92b94d
NS
125052000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12506
12507 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
12508 incomplete return type.
12509
bb92901d
NS
125102000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12511
12512 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
12513 * semantics.c (finish_base_specifier): Accept a _TYPE not a
12514 _DECL.
12515
2f3608c3
NS
125162000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12517
12518 * spew.c (yyerror): Cope if yylval.ttype is NULL.
12519
eeb75383
NS
125202000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12521
12522 * decl.c (grokdeclarator): Diagnose undefined template contexts.
12523
5ee4cc26
NS
125242000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12525
12526 * decl.c (grokdeclarator): Do type access control on friend
12527 class.
12528
76e57b45
NS
125292000-11-27 Nathan Sidwell <nathan@codesourcery.com>
12530
12531 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
12532 bison parser ickiness.
12533 * pt.c (tsubst_friend_function): Enter namespace scope when
12534 tsubsting the function name.
12535 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
12536
f9825168
NS
125372000-11-27 Nathan Sidwell <nathan@codesourcery.com>
12538
12539 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
12540 * cvt.c (cp_convert_to_pointer): Add force parameter.
12541 Allow conversions via virtual base if forced.
12542 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
12543 (ocp_convert): Likewise.
12544 * search.c (binfo_from_vbase): Return the virtual base's binfo.
12545 * typeck.c (get_delta_difference): Adjust handling of virtual
12546 bases.
12547
9ccb25d5
MM
125482000-11-26 Mark Mitchell <mark@codesourcery.com>
12549
12550 * tree.c (struct list_hash): Remove.
12551 (list_hash_table): Make it be an htab.
12552 (struct list_proxy): New type.
12553 (list_hash_eq): New function.
12554 (list_hash_pieces): Renamed from ...
12555 (list_hash): ... this.
12556 (list_hash_lookup): Remove.
12557 (list_hash_add): Remove.
12558 (hash_tree_cons): Use the generic hashtable.
12559 (mark_list_hash): Remove.
12560 (init_tree): Create the hashtable.
12561
9399bad3
JM
125622000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
12563
12564 * method.c (build_mangled_C9x_name): Rename to
12565 build_mangled_C99_name. Change C9X references in comments to
12566 refer to C99.
12567
2f401cc8
NS
125682000-11-24 Nathan Sidwell <nathan@codesourcery.com>
12569
12570 * parse.y (unary_expr): Move VA_ARG from here ...
12571 (primary): ... to here.
12572
3d7e9ba4
NS
125732000-11-24 Nathan Sidwell <nathan@codesourcery.com>
12574
12575 * semantics.c (finish_id_expr): If type is error_mark, return
12576 error_mark.
12577
ab097535
NS
125782000-11-23 Nathan Sidwell <nathan@codesourcery.com>
12579
12580 * pt.c (lookup_template_class): Simplify loop exit constructs.
12581 Cope when there is no partial instantiation of a template
12582 template member.
12583
d2a6f3c0 125842000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
12585
12586 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
12587
cac78ea2
MM
125882000-11-22 Mark Mitchell <mark@codesourcery.com>
12589
6e1b44bc
MM
12590 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
12591 prefix.
12592
cac78ea2
MM
12593 * pt.c (do_decl_instantiate): Explicitly clone constructors and
12594 destructors that haven't already been cloned.
12595
3aac38d7
RH
125962000-11-20 Richard Henderson <rth@redhat.com>
12597
12598 * parse.y (yyparse_1): Rename the parser entry point.
12599
126002000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
12601
12602 * mangle.c (write_name): Use <unscoped-name> for names directly in
12603 function scope.
12604 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 12605
447306fa
NS
126062000-11-20 Nathan Sidwell <nathan@codesourcery.com>
12607
12608 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
12609 * parse.y (extdef): Add EXPORT reduction.
12610 * spew.c (yylex): Don't skip export here.
12611
2650255a
MM
126122000-11-19 Mark Mitchell <mark@codesourcery.com>
12613
12614 * decl.c (init_decl_processing): Correct name of pure virtual
12615 function under the new ABI.
12616 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
12617 (throw_bad_typeid): Likewise for bad typeid function.
12618
0657c69c
MM
126192000-11-18 Mark Mitchell <mark@codesourcery.com>
12620
04f3dc2b
MM
12621 * decl.c (grokparms): Don't even function types of `void' type,
12622 either.
12623 * mangle.c (write_type): Don't crash when confronted with the
12624 error_mark_node.
12625
0657c69c
MM
12626 * decl.c (grokparms): Don't create parameters of `void' type.
12627
a8a05998
ZW
126282000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12629
12630 * lex.c (mark_impl_file_chain): Delete.
12631 (init_parse): Remove call to ggc_add_string_root. No need to
12632 ggc_strdup a string constant. Do not add impl_file_chain to GC
12633 roots.
12634 (handle_pragma_implementation): No need to ggc_strdup main_filename.
12635
35728a80
NS
126362000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12637
12638 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
12639
5cce22b6
NS
126402000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12641
12642 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
12643 * decl.c (grokdeclarator): Don't reject void parms here.
12644 (require_complete_types_for_parms): Simplify, use
12645 complete_type_or_else.
12646 (grokparms): Remove bitrot. Remove funcdef parm.
12647 Deal with ellipsis parm lists here.
12648 * semantics.c (finish_parmlist): Don't append void_list_node
12649 here. Set PARMLIST_ELLIPSIS_P.
12650
146c8d60
NS
126512000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12652
d30d6e7a 12653 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
12654 excessive diagnostics.
12655
520a57c8
ZW
126562000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12657
12658 * lex.c (struct impl_files, internal_filename): Constify a char *.
12659
43048a06
MM
126602000-11-16 Mark Mitchell <mark@codesourcery.com>
12661
12662 * mangle.c (write_special_name_constructor): Don't generate
12663 assembler junk when confronted with an old-style constructor.
12664 (write_special_name_destructor): Likewise.
12665 (mangle_decl_string): Do it here instead.
12666
cdb71673
NS
126672000-11-16 Nathan Sidwell <nathan@codesourcery.com>
12668
12669 * call.c (op_error): Make error messages clearer.
12670
62136084
MM
126712000-11-15 Mark Mitchell <mark@codesourcery.com>
12672
12673 * decl.c (wrapup_globals_for_namespace): Don't mark things
12674 TREE_ASM_WRITTEN when they're not.
12675
ee3400e8
JM
126762000-11-15 Jason Merrill <jason@redhat.com>
12677
12678 * typeck2.c (friendly_abort): Uncount the error before handing
12679 off to fancy_abort.
12680
71631a1f
NS
126812000-11-15 Nathan Sidwell <nathan@codesourcery.com>
12682
12683 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
12684
79cda2d1
MM
126852000-11-14 Mark Mitchell <mark@codesourcery.com>
12686
12687 * class.c (build_vtbl_initializer): Fix typo in comment.
12688 * typeck.c (expr_sizeof): Don't crash on errors.
12689
2567bc56
JW
126902000-11-14 Jim Wilson <wilson@redhat.com>
12691
12692 * lang-specs.h: Add %2 after %(cc1_options).
12693
8422942c
RH
126942000-11-14 Richard Henderson <rth@redhat.com>
12695
12696 * typeck.c (c_sizeof): Be strict about casting result value
12697 back to c_size_type_node.
12698 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
12699
19552aa5
JM
127002000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12701
12702 * typeck.c (build_unary_op): Use boolean_increment from
12703 c-common.c, moving the relevant code there.
12704
d96a6d1a
JM
127052000-11-11 Jason Merrill <jason@redhat.com>
12706
12707 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
12708
12709 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
12710 in inlines.
12711
4e135bdd
KG
127122000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12713
12714 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
12715 * lex.c (copy_lang_decl): Likewise.
12716
0a7394bc
MM
127172000-11-09 Mark Mitchell <mark@codesourcery.com>
12718
13507bd8
MM
12719 * dump.c (cp_dump_tree): Don't dump function bodies here.
12720
0a7394bc
MM
12721 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
12722 (dump.o): Update dependency list.
12723 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
12724 (flag_dump_translation_unit): Likewise.
12725 (CP_TYPE_QUALS): Adjust definition.
12726 (DECL_C_BIT_FIELD): Remove.
12727 (SET_DECL_C_BIT_FIELD): Likewise.
12728 (CLEAR_DECL_C_BIT_FIELD): Likewise.
12729 (add_maybe_template): Likewise.
12730 (strip_array_types): Likewise.
12731 (dump_node_to_file): Likewise.
12732 (cp_dump_tree): New function.
12733 * decl.c (init_decl_processing): Set lang_dump_tree.
12734 * decl2.c (flag_dump_translation_unit): Remove.
12735 * dump.c: Move most of it to ../c-dump.c.
12736 (cp_dump_tree): New function.
12737 * pt.c (add_maybe_template): Remove.
12738 * typeck.c (strip_array_types): Likewise.
a8a05998 12739
5362b086
EC
127402000-11-07 Eric Christopher <echristo@redhat.com>
12741
492cca24
JM
12742 * decl.c (init_decl_processing): Change definition of
12743 __wchar_t to wchar_t. Remove artificial declaration of
12744 wchar_t.
12745 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 12746
5361cbb7
NS
127472000-11-09 Nathan Sidwell <nathan@codesourcery.com>
12748
12749 * lex.c (do_identifier): Don't lookup_name for operators.
12750 * parse.y (operator): Save looking_for_typename.
12751 (unoperator): Restore it.
12752 * spew.c (frob_opname): Use nth_token for lookahead.
12753
36791f1e
NS
127542000-11-08 Nathan Sidwell <nathan@codesourcery.com>
12755
12756 * decl.c (grok_op_properties): Always use coerce_new_type and
12757 coerce_delete_type.
12758 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
12759 exception specification. Tidy up.
12760 (coerce_delete_type): Preserve exception specification. Tidy up.
12761
961192e1
JM
127622000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12763
12764 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
12765 (push_binding_level), error.c (cp_tree_printer), pt.c
12766 (process_partial_specialization, tsubst_template_arg_vector),
12767 search.c (lookup_member): Use memset () instead of bzero ().
12768
d48ebde1
NS
127692000-11-07 Nathan Sidwell <nathan@codesourcery.com>
12770
12771 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
12772
436a88a6
JM
127732000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12774
12775 * Make-lang.in (c++.distdir): Remove.
12776
7a4e5091
MM
127772000-11-04 Mark Mitchell <mark@codesourcery.com>
12778
12779 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
12780 declarations from different namespaces to be combined.
12781
0e9295cf
ZW
127822000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
12783
12784 * decl.c: Include tm_p.h.
12785
da61dec9
JM
127862000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
12787
12788 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
12789
9473c522
JM
127902000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
12791
12792 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
12793 (build_overload_value), repo.c (open_repo_file), xref.c
12794 (open_xref_file): Use strchr () and strrchr () instead of index ()
12795 and rindex ().
12796
b0b3afb2
BS
127972000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
12798
12799 * call.c (build_over_call): Call fold on the CALL_EXPR.
12800
faafaee6
GDR
128012000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
12802
12803 * error.c (dump_template_decl): Separate template hearders with
12804 space not comma.
12805
761f0855
GDR
128062000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
12807
12808 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
12809 TS_* flags with corresponding TFF_*. Adjust prototypes of
12810 functions (which used to take a tree_string_flags) to take an int.
12811
12812 * cp-tree.h (enum tree_string_flags): Remove
12813 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
12814 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
12815 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12816 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12817 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
12818 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
12819 (type_as_string, decl_as_string, expr_as_string,
12820 context_as_string): Adjust prototype.
12821
12822 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
12823 instead of TS_PLAIN.
12824
12825 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
12826 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
12827 plain `0'.
12828
ad50e811
MM
128292000-10-30 Mark Mitchell <mark@codesourcery.com>
12830
12831 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
12832 (linkage_kind): New enumeration.
12833 (decl_linkage): New function.
12834 * decl2.c (comdat_linkage): Extend comment.
12835 * error.c (dump_function_decl): Print the arguments used to
12836 instantiate a template, even when not printing the type of the
12837 function.
12838 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
12839 not TREE_PUBLIC, to test for external linkage.
12840 * tree.c (decl_linkage): New function.
12841
930cd796
MM
128422000-10-28 Mark Mitchell <mark@codesourcery.com>
12843
12844 * pt.c (instantiate_decl): Always instantiate static data members
12845 initialized in-class.
12846
b8dad04b
ZW
128472000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12848
12849 * Make-lang.in: Move all build rules here from Makefile.in,
12850 adapt to new context. Wrap all rules that change the current
12851 directory in parentheses. Expunge all references to $(P).
12852 When one command depends on another and they're run all at
12853 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12854 all object-file generation rules. Delete obsolete variables.
12855
12856 * Makefile.in: Delete.
12857 * config-lang.in: Delete outputs= line.
12858
5f9cd837
GDR
128592000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
12860
12861 * error.c (dump_function_decl): Print no space between
12862 `ptr-operator' the `type-specifier' of the return type.
12863 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 12864 place.
5f9cd837 12865
6c6ed0ef
JM
128662000-10-23 Jason Merrill <jason@redhat.com>
12867
12868 * call.c (equal_functions): Also call decls_match for extern "C" fns.
12869
128702000-10-22 Jason Merrill <jason@redhat.com>
12871
12872 * call.c (build_conditional_expr): Use ocp_convert to force
12873 rvalue conversion.
12874
e36308b0
MM
128752000-10-22 Mark Mitchell <mark@codesourcery.com>
12876
583ca5a0
MM
12877 * call.c (standard_conversion): Use RVALUE_CONVs for all
12878 expressions that satisfy lvalue_p, not just those that satisfy
12879 real_lvalue_p.
12880
f9808f81
MM
12881 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
12882
5362b086 12883 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
12884 not one with TYPE_IS_SIZETYPE set.
12885 (dubious_conversion_warnings): Remove special-case code.
12886
3b9ae6f0
GK
128872000-10-21 Geoffrey Keating <geoffk@cygnus.com>
12888
7a0f14e5
GK
12889 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
12890 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
12891 (dump_type_prefix): Print vector-of-int as 'int vector'.
12892 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
12893 * tree.c (walk_tree): Handle VECTOR_TYPE.
12894
3b9ae6f0 12895 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 12896
aca77bd1
JM
128972000-10-21 Jason Merrill <jason@redhat.com>
12898
12899 * parse.y (operator): Set got_object from got_scope.
12900 Set looking_for_typename.
12901 * decl.c (lookup_name_real): Clear val after setting from_obj.
12902 Reorganize diagnostic.
12903
ba523395
JM
129042000-10-20 Jason Merrill <jason@redhat.com>
12905
12906 * tree.c (walk_tree): Don't walk into default args.
12907
12908 * error.c (dump_expr): Use host_integerp.
12909
2e44948d
DE
129102000-10-20 David Edelsohn <edelsohn@gnu.org>
12911
12912 * typeck2.c (abstract_virtuals_error): Use "because" instead of
12913 "since" in error message.
12914
d2a6f3c0 129152000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44475138
RK
12916
12917 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
12918
11306230
JO
129192000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
12920
12921 * decl.c (revert_static_member_fn): Fixed typo.
12922
97ba1e3c
MM
129232000-10-19 Mark Mitchell <mark@codesourcery.com>
12924
c20118a8
MM
12925 * class.c (subobject_offset_fn): New type.
12926 (dfs_record_base_offsets): Remove.
12927 (record_base_offsets): Likewise.
12928 (dfs_search_base_offsets): Likewise.
12929 (record_subobject_offset): New function.
12930 (check_subobject_offset): Likewise.
12931 (walk_subobject_offsets): Likewise.
12932 (record_subobject_offsets): Likewise.
12933 (layout_conflict_p): Reimplement.
12934 (layout_nonempty_base_or_field): Correct handling of type
12935 conflicts during layout.
12936 (layout_empty_base): Likewise.
12937 (build_base_field): Adjust to handle new representation of empty
12938 base offset table.
12939 (build_base_fields): Likewise.
12940 (layout_virtual_bases): Likewise.
12941 (splay_tree_compare_integer_csts): New function.
12942 (layout_class_type): Use a splay_tree, rather than a varray, to
12943 represent the offsets of empty bases.
5362b086 12944
97ba1e3c
MM
12945 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12946 * decl.c (select_decl): Don't return declarations that are
12947 DECL_ANTICIPATED.
12948
6bcedb4e
MM
129492000-10-18 Mark Mitchell <mark@codesourcery.com>
12950
12951 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12952 (fake_std_node): New macro.
12953 * decl.c (in_std): Rename to ...
12954 (in_fake_std): ... this.
12955 (flag_no_builtin): Remove.
12956 (flag_no_nonansi_builtin): Likewise.
12957 (walk_namespaces_r): Use fake_std_node.
12958 (push_namespace): Use std_identifier.
12959 (pop_namespace): Use in_fake_std.
12960 (lookup_name_real): Use fake_std_node.
12961 (init_decl_processing): When -fhonor-std, create the `std'
12962 namespace. Don't create a dummy fake_std_node in that case.
12963 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
12964 (builtin_function): Put builtins whose names don't begin
12965 with `_' in the std namespace.
12966 * decl2.c (flag_no_builtin): Remove.
12967 (flag_no_nonansi_builtin): Likewise.
12968 (set_decl_namespace): Use fake_std_node.
12969 (validate_nonmember_using_decl): Likewise.
12970 (do_using_directive): Likewise.
12971 (handle_class_head): Likewise.
12972 * dump.c (dequeue_and_dump): Likewise.
12973 * except.c (init_exception_processing): Use std_identifier.
12974 * init.c (build_member_call): Use fake_std_node.
12975 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 12976
67673f5c
MM
129772000-10-17 Mark Mitchell <mark@codesourcery.com>
12978
12979 * cp-tree.h (back_end_hook): Remove declaration.
12980 * decl2.c (back_end_hook): Remove definition.
12981
12982 * dump.c (dequeue_and_dump): Dump TREE_USED.
12983
d2a6f3c0 129842000-10-17 Brad Lucier <lucier@math.purdue.edu>
8fef2e47
BL
12985
12986 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12987
652469d0
JM
129882000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12989
12990 * decl.c (WINT_TYPE): Define.
12991 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12992 c_size_type_node, signed_size_type_node and wint_type_node.
12993
74ff4629
JM
129942000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12995
12996 * decl2.c (warn_missing_format_attribute): New variable.
12997 (lang_decode_option): Decode -Wmissing-format-attribute.
12998
634790f4
MM
129992000-10-16 Mark Mitchell <mark@codesourcery.com>
13000
13001 * typeck.c (qualify_type): Remove.
13002 (composite_pointer_type): Fix handling of conversions to `cv void*'.
13003
bb12da9d
KG
130042000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13005
13006 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13007
4b945402
KG
130082000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13009
13010 * Makefile.in (parse.c, parse.h): Create atomically.
13011
1f8f4a0b
MM
130122000-10-12 Mark Mitchell <mark@codesourcery.com>
13013
13014 * class.c (current_obstack): Remove.
13015 * decl.c (ggc_p): Remove.
13016 (start_decl): Don't use decl_tree_cons.
13017 (grokdeclarator): Don't use build_decl_list.
13018 (start_function): Don't use decl_tree_cons.
13019 (finish_function): Don't mess with obstacks.
13020 * decl2.c (grok_x_components): Don't use build_decl_list.
13021 * lex.c (make_call_declarator): Don't call decl_tree_cons.
13022 (implicitly_declare_fn): Don't call build_decl_list.
13023 * parse.y (frob_specs): Don't call build_decl_list or
13024 decl_tree_cons.
13025 (expr_or_declarator_intern): Don't call decl_tree_cons.
13026 (primary): Don't call build_decl_list.
13027 (fcast_or_absdcl): Likewise.
13028 (typed_declspecs): Don't call decl_tree_cons.
13029 (reserved_declspecs): Don't call build_decl_list.
13030 (declmods): Likewise.
13031 (reserved_typespecquals): Likewise.
13032 (aggr): Likewise.
13033 (new_type_id): Likewise.
13034 (cv_qualifiers): Likewise.
13035 (after_type_declarator_intern): Likewise.
13036 (notype_declarator_intern): Likewise.
13037 (absdcl_intern): Likewise.
13038 (named_parm): Likewise.
13039 * pt.c (most_specialized_class): Likewise.
13040 * repo.c (temporary_obstack): Make it a structure, not a pointer.
13041 (init_repo): Initialize it.
13042 * search.c (current_obstack): Remove.
13043 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 13044
8dc54971
RH
130452000-10-09 Richard Henderson <rth@cygnus.com>
13046
13047 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13048 (c++ language support bits for libgcc): Remove.
13049 (c++.clean): Remove cplib2.txt cleanup.
13050 * config-lang.in (headers, lib2funcs): Remove.
13051
13052 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13053 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13054 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13055 * inc/new.h, inc/typeinfo: Remove files.
13056
b15ad712
JM
130572000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
13058
13059 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13060 defined.
13061 (init_decl_processing): Initialize intmax_type_node and
13062 uintmax_type_node.
13063
156ce211
RH
130642000-10-06 Richard Henderson <rth@cygnus.com>
13065
13066 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13067 (original_result_rtx): Remove.
13068 * decl.c (save_function_data): Don't clear x_result_rtx.
13069 (mark_lang_function): Don't mark it either.
13070 * expr.c (fixup_result_decl): Remove.
13071 * semantics.c (genrtl_named_return_value): Frob the return decl
13072 before calling emit_local_var.
13073 (genrtl_finish_function): Don't call fixup_result_decl.
13074 Always emit the jump to return_label.
13075
92777ce4
NS
130762000-10-06 Nathan Sidwell <nathan@codesourcery.com>
13077
13078 * pt.c (lookup_template_class): Set current access for enum.
13079 (tsubst_enum): Set file & line for enum decl.
5362b086 13080
92777ce4
NS
13081 * spew.c (yylex): Remove unused variable.
13082
63c16fc5
RH
130832000-10-05 Richard Henderson <rth@cygnus.com>
13084
13085 * semantics.c (genrtl_finish_function): Don't init or check
13086 can_reach_end; remove noreturn and return value checks.
13087
d1a458c4
TT
130882000-10-05 Tom Tromey <tromey@cygnus.com>
13089
13090 * init.c (build_java_class_ref): Use `build_static_name' with a
13091 suffix, not a prefix, to build the class object's name.
13092
509fc277
NS
130932000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13094
13095 * cp-tree.h (access_kind): Fix comment typo.
13096 * decl2.c (grokfield): Fix diagnostic typo.
13097 * semantics.c (finish_template_type): Fix comment typo.
13098 (finish_qualified_object_call_expr): Likewise.
13099
ce2e5191
NS
131002000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13101
13102 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 13103 tsubsting fails.
ce2e5191 13104
79cc5312
NS
131052000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13106
13107 * spew.c (frob_id): New static function.
13108 (frob_opname): Use it.
13109 (yylex): Use it.
13110
f15b9af9
MM
131112000-10-01 Mark Mitchell <mark@codesourcery.com>
13112
13113 * decl.c (lang_mark_false_label_stack): Remove.
13114 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 13115
28e6b1c2
JM
131162000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
13117
13118 * gxxint.texi: Use @email for formatting email addresses.
13119
99885b3f
GDR
131202000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
13121
13122 * error.c: Remove direct obstack manipulation. Replace with
13123 output_buffer-based formatting. Adjust calls to removed macros.
13124 (obstack_chunk_alloc, obstack_chunk_free): Remove.
13125 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13126 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13127
c06aa51e
MM
131282000-09-24 Mark Mitchell <mark@codesourcery.com>
13129
13130 * ir.texi: Move to ../c-tree.texi.
13131
99fada40
JM
131322000-09-20 Jason Merrill <jason@redhat.com>
13133
13134 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13135
bb20cc46
AJ
131362000-09-21 Andreas Jaeger <aj@suse.de>
13137
13138 * errfn.c: Move declaration of cp_printer and cp_printers to ...
13139 * cp-tree.h: ... here.
13140
13141 * error.c: Remove declaration of cp_printer.
13142
fab701da
MM
131432000-09-20 Mark Mitchell <mark@codesourcery.com>
13144
13145 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13146
0370fea1
HPN
131472000-09-20 Hans-Peter Nilsson <hp@axis.com>
13148
13149 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13150 users.
13151
78c120b5
MM
131522000-09-18 Mark Mitchell <mark@codesourcery.com>
13153
13154 * decl.c (start_function): Robustify.
13155
3f80e6ac
KG
131562000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13157
13158 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 13159
3f80e6ac
KG
13160 * call.c, typeck.c: Updates calls to `check_function_format'.
13161
fc928afe
GK
131622000-09-17 Geoffrey Keating <geoffk@cygnus.com>
13163
13164 * decl2.c (handle_class_head): Always push some scope even
13165 in the error case.
13166
8f17b5c5
MM
131672000-09-16 Mark Mitchell <mark@codesourcery.com>
13168
13169 * cp-tree.h (struct cp_language_function): Remove
13170 x_scope_stmt_stack and name_declared.
13171 (current_scope_stmt_stack): Remove.
13172 (function_name_declared_p): New macro.
13173 (struct lang_decl_flags): Use c_lang_decl as a base class.
13174 (context): Remove.
13175 (struct lang_decl): Replace saved_tree with context.
13176 (DECL_FRIEND_CONTEXT): Adjust accordingly.
13177 (SET_DECL_FRIEND_CONTEXT): Likewise.
13178 (DECL_VIRTUAL_CONTEXT): Likewise.
13179 (DECL_SAVED_TREE): Remove.
13180 (C_DECLARED_LABEL_FLAG): Likewise.
13181 (cplus_expand_expr_stmt): Don't declare.
13182 (add_decl_stmt): Likewise.
13183 (add_scope_stmt): Likewise.
13184 * decl.c (mark_stmt_tree): Remove.
13185 (case_compare): Likewise.
13186 (finish_case_label): Use c_add_case_label.
13187 (init_decl_processing): Set more language-specific hooks.
13188 (build_enumerator): Fix typo in comment.
13189 (cplus_expand_expr_stmt): Remove.
13190 (mark_lang_function): Use mark_c_language_function.
13191 (lang_mark_tree): Use c_mark_lang_decl.
13192 * decl2.c: Change order of inclusion.
13193 * except.c: Likewise.
13194 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
13195 back on c_expand_expr.
13196 * friend.c: Include expr.h.
13197 * init.c: Change order of inclusion.
13198 * Makefile.in: Update dependencies.
13199 * lex.h (free_lang_decl_chain): Remove.
13200 * optimize.c (maybe_clone_body): Use function_name_declared_p.
13201 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13202 it doesn't exist.
13203 (instantiate_decl): Use function_name_declared_p.
13204 * semantics.c (lang_expand_expr_stmt): Remove.
13205 (set_current_function_name_declared): Likewise.
13206 (current_function_name_declared): Likewise.
13207 (begin_compound_stmt): Use function_name_declared_p.
13208 (add_decl_stmt): Remove.
13209 (setup_vtbl_ptr): Use function_name_declared_p.
13210 (add_scope_stmt): Remove.
13211 (current_scope_stmt_stack): New function.
13212 (cp_expand_stmt): Don't handle SCOPE_STMTs.
13213 (expand_body): Use function_name_declared_p.
13214 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13215 * typeck.c: Change order of includes.
13216 (convert_sequence): Remove.
bb20cc46 13217
d9dbd9b1
JM
132182000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
13219
13220 * lex.c (reswords): Add _Complex.
13221
d2a6f3c0 132222000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9985f210
RK
13223
13224 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13225
f903ebb1
DA
132262000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
13227
13228 * init.c (begin_init_stmts): Don't use // comments.
13229
f2ae0c45
JM
132302000-09-12 Jason Merrill <jason@redhat.com>
13231
13232 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13233 all non-extern arrays.
13234
13235 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13236 typenames, too. Downgrade complaint to pedwarn.
13237 (xref_tag): Warn about surprising behavior of 'friend struct T'.
13238 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13239 'class This::Inherited'.
13240
71ad4a16
MM
132412000-09-12 Mark Mitchell <mark@codesourcery.com>
13242
13243 * decl.c (finish_case_label): Given the LABEL_DECL a
13244 DECL_CONTEXT.
13245
c3e76028
GDR
132462000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
13247
13248 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13249 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13250 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13251 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13252 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13253 New macros.
13254 (sorry_for_unsupported_tree, print_scope_operator,
13255 print_left_paren, print_right_paren, print_left_bracket,
13256 print_right_bracket, print_whitespace): Likewise.
13257 (aggr_variety): Rename to class_key_or_enum.
13258 (print_type): Rename to print_type_id.
13259 (print_type_specifier_seq, print_simple_type_specifier,
13260 print_elaborated_type_specifier,
13261 print_rest_of_abstract_declarator,
13262 print_parameter_declaration_clause, print_exception_specification,
13263 print_nested_name_specifier, print_template_id,
13264 typedef_original_name, print_template_argument_list_start,
13265 print_template_argument_list_end): New functions.
13266
eb50138b
GDR
132672000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
13268
a8a05998 13269 * ir.texi: Add more documentation.
eb50138b 13270
f444e36b
MM
132712000-09-11 Mark Mitchell <mark@codesourcery.com>
13272
13273 * cp-tree.h (struct saved_scope): Remove x_function_parms.
13274 (current_function_parms): Don't define.
13275 (struct cp_language_function): Remove parms_stored.
13276 (current_function_just_assigned_this): Don't define.
13277 (current_function_parms_stored): Likewise.
13278 (static_ctors): Declare.
13279 (static_dtors): Likewise.
13280 (SF_EXPAND): Don't define.
13281 (expand_start_early_try_stmts): Remove declaration.
13282 (store_parm_decls): Likewise.
13283 * decl.c (static_ctors): Don't declare.
13284 (static_dtors): Likewise.
13285 (struct binding_level): Remove this_block.
13286 (poplevel): Remove dead code.
13287 (set_block): Likewise.
13288 (mark_binding_level): Don't mark this_block.
13289 (mark_saved_scope): Don't mark x_function_parms.
13290 (init_decl_processing): Don't add current_function_parms as a GC
13291 root.
13292 (check_function_type): Change prototype.
13293 (start_function): Remove RTL-generation code.
13294 (expand_start_early_try_stmts): Remove.
13295 (store_parm_decls): Give it internal linkage. Remove
13296 RTL-generation code.
13297 (finish_function): Remove RTL-generation code.
13298 * decl2.c (static_ctors): Fix formatting.
13299 (static_dtors): Likewise.
13300 * method.c (use_thunk): Don't call store_parm_decls.
13301 (synthesize_method): Likewise.
13302 * optimize.c (maybe_clone_body): Likewise.
13303 * parse.y (fn.def2): Likewise.
13304 (.set_base_init): Likewise.
13305 (nodecls): Likewise.
13306 * pt.c (instantiate_decl): Likewise.
13307 * rtti.c (synthesize_tinfo_fn): Likewise.
13308 * semantics.c (genrtl_try_block): Simplify.
13309 (expand_body): Use genrtl_start_function and
13310 genrtl_finish_function.
13311 (genrtl_start_function): New function.
13312 (genrtl_finish_function): Likewise.
13313
181d2ba0
NS
133142000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13315
13316 * error.c (cp_tree_printer, case 'P'): Append break.
13317
f2d71db6
NS
133182000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13319
13320 * cp-tree.h (frob_opname): Declare.
13321 * parse.y (saved_scopes): New static variable.
13322 (cp_parse_init): Adjust.
13323 (do_id): If lastiddecl is NULL, do do_identifier.
13324 (operator): Save scope information.
aca77bd1 13325 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
13326 (operator_name): Append unoperator. Call frob_opname.
13327 * spew.c (frob_opname): Define.
13328
d8ea8f28
ZW
133292000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13330
13331 * decl.c, rtti.c: Include defaults.h if not already included.
13332 Don't define the *_TYPE_SIZE macros.
13333
56cb9733
MM
133342000-09-09 Mark Mitchell <mark@codesourcery.com>
13335
13336 * cp-tree.h (push_switch): Change prototype.
13337 (check_cp_case_value): Remove declaration.
13338 (decl_constant_value): Likewise.
13339 * decl.c (struct cp_switch): Add switch_stmt and cases.
13340 (case_compare): New function.
13341 (push_switch): Set switch_stmt. Initialize cases.
13342 (pop_switch): Clean up cases.
13343 (define_case_label): Rename to ...
13344 (finish_case_label): ... this. Do semantic analysis for case
13345 labels here.
13346 (start_function): Correct comment.
13347 * decl2.c (check_cp_case_value): Remove.
13348 * expr.c (do_case): Remove.
13349 * pt.c (tsubst_expr): Adjust call to finish_case_label.
13350 * semantics.c (genrtl_do_poplevel): Remove declaration.
13351 (RECHAIN_STMTS): Remove.
13352 (finish_break_stmt): Use build_break_stmt.
13353 (finish_continue_stmt): Use build_continue_stmt.
13354 (finish_switch_cond): Adjust condition here, rater than in
13355 c_expand_start_case.
13356 (finish_case_label): Remove.
13357 * typeck.c (c_expand_return): Remove.
13358 (c_expand_start_case): Likewise.
bb20cc46 13359
990a9693
GDR
133602000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
13361
13362 * ir.texi: Document type nodes.
13363
ae499cce
MM
133642000-09-06 Mark Mitchell <mark@codesourcery.com>
13365
54f7877c
MM
13366 * cp-tree.h (init_cp_semantics): Declare.
13367 (genrtl_try_block): Don't declare.
13368 (genrtl_handler): Likewise.
13369 (genrtl_catch_block): Likewise.
13370 (genrtl_ctor_stmt): Likewise.
13371 (genrtl_subobject): Likewise.
13372 (genrtl_do_poplevel): Likewise.
13373 (genrtl_named_return_value): Likewise.
13374 * lex.c (init_parse): Call init_cp_semantics.
13375 * semantics.c (genrtl_try_block): Give it internal linkage.
13376 (genrtl_handler): Likewise.
13377 (genrtl_catch_block): Likewise.
13378 (genrtl_ctor_stmt): Likewise.
13379 (genrtl_subobject): Likewise.
13380 (genrtl_do_poplevel): Likewise.
13381 (genrtl_named_return_value): Likewise.
13382 (lang_expand_stmt): Rename to ...
13383 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
13384 (init_cp_semantics): Define.
13385
3a0d3e1e
MM
13386 * decl.c (initialize_local_var): Remove RTL-generating code.
13387 * semantics.c (genrtl_try_block): Fix formatting.
13388
ae499cce
MM
13389 Move statement-tree facilities from C++ to C front-end.
13390 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
13391 (void_zero_node): Remove.
13392 (stmt_tree): Likewise.
13393 (scope_chain): Adjust.
13394 (language_function): Rename to cp_language_function.
13395 (cp_function_chain): Adjust.
13396 (current_stmt_tree): Remove.
13397 (last_tree): Likewise.
13398 (last_expr_type): Likewise.
13399 (struct lang_decl): Adjust.
13400 (STMT_IS_FULL_EXPR_P): Remove.
13401 (add_tree): Remove.
13402 (begin_stmt_tree): Likewise.
13403 (finish_stmt_tree): Likewise.
13404 (walk_tree_fn): Likewise.
13405 (walk_stmt_tree): Likewise.
13406 * class.c (finish_struct): Replace use of add_tree with add_stmt.
13407 * decl.c (mark_stmt_tree): Adjust type.
13408 (init_decl_processing): Don't build void_zero_node.
13409 (initialize_local_var): Adjust usage of current_stmt_tree.
13410 (finish_enum): Use add_stmt, not add_tree.
13411 (save_function_data): Adjust use of language_function.
13412 (finish_constructor_body): Use add_stmt, not add_tree.
13413 (finish_destructor_body): Likewise.
13414 (push_cp_function_context): Adjust use of language_function.
13415 (pop_cp_function_context): Likewise.
13416 (mark_lang_function): Likewise.
13417 (mark_cp_function_context): Likewise.
13418 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
13419 (build_vec_init): Likewise.
13420 * semantics.c (SET_LAST_STMT): Remove.
13421 (RECHAIN_STMTS): Don't use it.
13422 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
13423 (current_stmt_tree): Define.
13424 (add_tree): Remove.
13425 (finish_goto_stmt): Use add_stmt, not add_tree.
13426 (finish_expr_stmt): Likewise.
13427 (begin_if_stmt): Likewise.
13428 (finish_then_clause): Likewise.
13429 (begin_while_stmt): Likewise.
13430 (begin_do_stmt): Likewise.
13431 (finish_return_stmt): Likewise.
13432 (begin_for_stmt): Likewise.
13433 (finish_break_stmt): Likewise.
13434 (finish_continue_stmt): Likewise.
13435 (begin_switch_stmt): Likewise.
13436 (finish_case_label): Likewise.
13437 (begin_try_block): Likewise.
13438 (begin_function_try_block): Likewise.
13439 (begin_handler): Likewise.
13440 (begin_catch_block): Likewise.
13441 (begin_compound_stmt): Likewise.
13442 (begin_asm_stmt): Likewise.
13443 (finish_asm_stmt): Likewise.
13444 (finish_label_stmt): Likewise.
13445 (add_decl_stmt): Likewise.
13446 (finish_subobject): Likewise.
13447 (finish_decl_cleanup): Likewise.
13448 (finish_named_return_value): Likewise.
13449 (setup_vtbl_ptr): Likewise.
13450 (add_scope_stmt): Likewise.
13451 (finish_stmt_expr): Likewise.
13452 (prune_unused_decls): Remove.
13453 (begin_stmt_tree): Likewise.
13454 (finish_stmt_tree): Likewise.
13455 (prep_stmt): Adjust use of current_stmt_tree.
13456 (lang_expand_stmt): Likewise.
13457 * tree.c (statement_code_p): Remove.
13458 (cp_statement_code_p): New function.
13459 (walk_stmt_tree): Remove.
13460 (init_tree): Set lang_statement_code_p.
bb20cc46 13461
0e5921e8
ZW
134622000-09-06 Zack Weinberg <zack@wolery.cumb.org>
13463
13464 Integrated preprocessor.
13465
13466 * Make-lang.in, Makefile.in: Remove all references to input.c,
13467 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
13468 * gxx.gperf, hash.h, input.c: Delete.
13469 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
13470 initialized properly.
13471
13472 * class.c (fixup_pending_inline): Take a tree, not a
13473 struct pending_inline *. All callers changed.
13474 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
13475 RID_PROTECTED entries in ridpointers[] array here.
13476 * decl.c (duplicate_decls): Do not refer to struct
13477 pending_inline.
13478 (record_builtin_type, init_decl_processing): Use RID_MAX not
13479 CP_RID_MAX.
13480 (grokdeclarator): Use C_IS_RESERVED_WORD.
13481 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
13482 cpplib.
13483 (grok_x_components): Do not inspect pending_inlines chain.
13484
13485 * cp-tree.h (struct lang_identifier): Add rid_code entry.
13486 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
13487 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
13488 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
13489 TIME_IDENTIFIER_FILEINFO): Kill.
13490 Update prototypes.
13491 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
13492 single 32-bit word.
13493 * parse.y: Call do_pending_inlines unconditionally.
13494 reinit_parse_for_method is now snarf_method. fn.defpen is no
13495 longer necessary. Remove unnecessary <itype> annotation on
13496 SCOPE. Do not refer to end_of_file or struct pending_inline.
13497 * semantics.c (begin_inline_definitions): Call
13498 do_pending_inlines unconditionally.
13499
13500 * lex.c: Remove all code now shared with C front end.
13501 Initialize cpplib properly if USE_CPPLIB. Put reserved words
13502 into the get_identifier table. Rewrite pragma handling to
13503 work with the registry. Move code to save tokens for later
13504 processing to spew.c.
13505
13506 * spew.c: Rewrite everything in terms of token streams instead
13507 of text. Move routines here from lex.c / input.c as
13508 appropriate. GC-mark trees hanging off the pending inlines
13509 chain.
13510
44835fdd
MM
135112000-09-06 Mark Mitchell <mark@codesourcery.com>
13512
13513 * NEWS: Mention that the named return value extension has been
13514 deprecated.
13515 * cp-tree.h (original_result_rtx): Define.
13516 (TREE_REFERENCE_EXPR): Remove.
13517 (DECL_VPARENT): Likewise.
13518 (pushdecl_nonclass_level): Likewise.
13519 (store_return_init): Likewise.
13520 (reinit_lang_specific): Likewise.
13521 (genrtl_named_return_value): Change prototype.
13522 * decl.c (original_result_rtx): Remove.
13523 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
13524 Do not generate RTL for local variables here.
13525 (store_return_init): Remove.
13526 * semantics.c (genrtl_named_return_value): Simplify. Fold in
13527 store_return_init.
13528 (finish_named_return_value): Adjust accordingly. Warn that this
13529 extension is deprecated.
13530 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
13531
d7c4edd0
NS
135322000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13533
13534 * pt.c (type_unification_real): Replace switch with if.
13535 (unify): Tsubst non-type parms before comparing.
13536
46e2747c
NS
135372000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13538
13539 * error.c (dump_typename): New function, broken out of ...
13540 (dump_type): ... here. Use it.
13541 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
13542
c833d2be
NS
135432000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13544
13545 * init.c (build_offset_ref): Deal with namespace scoped
13546 TEMPLATE_ID_EXPRs.
13547
b1ce3eb2
NS
135482000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13549
13550 * class.c (resolve_address_of_overloaded_function): Add
13551 explanation message.
13552 * decl.c (define_case_label): Reformat explanation.
13553 * decl2.c (finish_static_data_member_decl): Likewise.
13554 (grokfield): Likewise.
13555 * friend.c (do_friend): Likewise.
13556
11f53b6a
ZW
135572000-09-05 Zack Weinberg <zack@wolery.cumb.org>
13558
13559 * tree.c (walk_tree): Expose tail recursion.
13560 (walk_stmt_tree): New function.
13561 * cp-tree.h: Prototype walk_stmt_tree.
13562 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
13563 the BLOCKs directly. If a BLOCK has no variables after
13564 pruning, discard it.
13565 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
13566 restore the line number.
13567
ee94fce6
MM
135682000-09-05 Mark Mitchell <mark@codesourcery.com>
13569
13570 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
13571 (pt.o): Remove dependency on HTAB_H.
13572 * cp-tree.h: Include hashtab.h.
13573 (walk_tree): Change prototype.
13574 (walk_tree_without_duplicates): New function.
13575 * decl.c (check_default_argument): Use it.
13576 * optimize.c (remap_decl): Adjust calls to walk_tree.
13577 (copy_body): Likewise.
13578 (expand_calls_inline): Likewise.
13579 (calls_setjmp_p): Use walk_tree_without_duplicates.
13580 * pt.c: Don't include hashtab.h.
13581 (for_each_template_parm): Use walk_tree_without_duplicates.
13582 * semantics.c (finish-stmt_tree): Likewise.
13583 (expand_body): Likewise.
13584 * tree.c (walk_tree): Add additional parameter.
13585 (walk_tree_without_duplicates): New function.
13586 (count_trees): Use it.
13587 (verify_stmt_tree): Adjust call to walk_tree.
13588 (find_tree): Use walk_tree_without_duplicates.
13589 (no_linkage_check): Likewise.
13590 (break_out_target_exprs): Adjust call to walk_tree.
13591 (cp_unsave): Likewise.
13592
a1281f45
KL
135932000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13594
13595 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
13596 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13597 * cp-tree.h (TYPE_BINFO): Adjust comment.
13598 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
13599 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13600 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13601 (TYPE_TEMPLATE_INFO): Likewise.
13602 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
13603 * class.c (push_nested_class): Likewise.
13604 * decl.c (lookup_name_real): Likewise.
13605 (grokdeclarator): Likewise.
13606 (grok_op_properties): Likewise.
13607 (xref_tag): Likewise.
13608 (xref_basetypes): Likewise.
13609 * decl2.c (constructor_name_full): Likewise.
13610 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
13611 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13612 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
13613 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13614 (dump_type_suffix): Likewise.
13615 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
13616 instead.
13617 (get_aggr_from_typedef): Likewise.
13618 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
13619 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13620 (write_template_parm): Likewise.
13621 (write_template_template_parm): Check tree code instead of
13622 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 13623 * method.c (build_overload_nested_name): Add
a1281f45
KL
13624 BOUND_TEMPLATE_TEMPLATE_PARM.
13625 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
13626 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13627 * pt.c (convert_template_argument): Check tree code instead of
13628 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13629 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
13630 (for_each_template_parm): Adjust comment.
13631 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
13632 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13633 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
13634 template_args_equal to compare template template parameter cases.
13635 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13636 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
13637 instead.
13638 * tree.c (copy_template_template_parm): Decide whether to create
13639 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
13640 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13641 (copy_tree_r): Likewise.
13642 * typeck.c (comptypes): Likewise. Check tree code instead of
13643 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13644
c9672d45
ME
136452000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
13646
13647 * decl.c (finish_function): Move the code for handling functions
13648 marked with the constructor and destructor attributes inside the
13649 expand_p block.
13650
67804825
NS
136512000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13652
13653 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
13654
1bc0793e
NS
136552000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13656
13657 * pt.c (lookup_template_class): Remove abort.
13658 * tree.c (get_type_decl): Allow error_mark_node.
13659
3338663b
NS
136602000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13661
13662 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
13663 TEMPLATE_ID_EXPRs.
13664
1b84dc37
MM
136652000-09-03 Mark Mitchell <mark@codesourcery.com>
13666
13667 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 13668 new ABI mangling.
1b84dc37 13669
9687f8f4
NS
136702000-09-01 Nathan Sidwell <nathan@codesourcery.com>
13671
13672 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 13673 union tag mismatch error reporting.
9687f8f4 13674
4f8025eb
NS
136752000-09-01 Nathan Sidwell <nathan@codesourcery.com>
13676
c9672d45 13677 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 13678
495d26d6
JM
136792000-08-30 Jason Merrill <jason@redhat.com>
13680
13681 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
13682
13683 * tree.c (bot_manip): Check TREE_CONSTANT rather than
13684 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
13685 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
13686
13687 * decl.c (start_function): Always call make_function_rtl.
13688
7efcf466
ZW
136892000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13690
495d26d6 13691 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
13692 (finish_stmt_tree): Call it via walk_tree.
13693
63ad61ed
ZW
136942000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13695
13696 * class.c (build_secondary_vtable): Constify a char *.
13697 * decl.c (init_decl_processing): Initialize function_id_node,
13698 pretty_function_id_node, and func_id_node.
13699 * input.c (struct input_source): Constify 'str'.
13700 (feed_input): Constify first argument.
13701 * mangle.c (write_identifier): Constify argument.
13702 * pt.c (mangle_class_name_for_template): Constify argument.
13703
4361b41d
MM
137042000-08-29 Mark Mitchell <mark@codesourcery.com>
13705
13706 * typeck.c (mark_addressable): Remove code that pokes around in
13707 RTL.
13708
881c6935
JM
137092000-08-28 Jason Merrill <jason@redhat.com>
13710
13711 * lex.c (file_name_nondirectory): Move to toplev.c.
13712
13713 * cp-tree.h (LOCAL_CLASS_P): New macro.
13714 * class.c (finish_struct_1): Use it.
13715
f0f33848
AS
137162000-08-27 Alex Samuel <samuel@codesourcery.com>
13717
13718 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
13719 (write_encoding): Pass another argument to write_name.
13720 (write_name): Add ignore_local_scope parameter. Fix handling of
13721 local names.
13722 (write_nested_name): Use write_unqualified_name.
13723 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
13724 (write_template_prefix): Use write_unqualified_name.
13725 (write_component): Remove.
13726 (write_local_name): Add parameter. Use direct local entity to
13727 discriminator calculation.
0e5921e8 13728 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
13729 (write_template_template_arg): Likewise.
13730 (make_guard_variable): Likewise.
0e5921e8 13731
94dfccd1
JM
137322000-08-27 Jason Merrill <jason@redhat.com>
13733
13734 * decl.c (pushdecl): Matching decls for local externs are found in
13735 the current level. Propagate linkage information from previous
13736 declarations.
13737
14fdf4b6
GDR
137382000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
13739
13740 * ir.texi (Expressions): Fix typo.
13741
b5232c64
GM
137422000-08-25 Greg McGary <greg@mcgary.org>
13743
13744 * tree.c (init_tree): Use ARRAY_SIZE.
13745
22a4158c
GDR
137462000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
13747
13748 * error.c (cp_tree_printer): Rework.
13749
f22967f3
MM
137502000-08-25 Mark Mitchell <mark@codesourcery.com>
13751
a0c182fe
MM
13752 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
13753 dyn-string.o.
13754 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
13755 (cp-demangle.o): Remove target.
13756 (dyn-string.o): Likewise.
13757
f22967f3
MM
13758 * decl.c (grokfndecl): Require that `main' return an `int'.
13759 * mangle.c (write_encoding): Don't mangle return types for
13760 conversion functions.
13761
a1066c99
GDR
137622000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
13763
13764 * error.c (tree_formatting_info): New data type.
13765 (tree_being_formatted): New macro.
13766 (tree_formatting_flags): Likewise.
13767 (put_whitespace): Likewise.
13768 (print_tree_identifier): Likewise.
13769 (print_identifier): Likewise.
13770 (cp_tree_printer, print_function_argument_list, print_declaration,
13771 print_expression, print_function_declaration,
13772 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 13773 functions.
a1066c99
GDR
13774 (init_error): Initialize lang_printer.
13775
3f2b640a
JM
137762000-08-24 Jason Merrill <jason@redhat.com>
13777
13778 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
13779 adjustment necessary.
13780
7ec09bf7
GM
137812000-08-24 Greg McGary <greg@mcgary.org>
13782
13783 * cp-tree.h (MAIN_NAME_P): Remove macro.
13784
2ab99c46
GDR
137852000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
13786
13787 * error.c (print_instantiation_context): Don't forget to flush the
13788 buffer.
13789
7def1251
JM
137902000-08-23 Jason Merrill <jason@redhat.com>
13791
13792 * typeck.c (build_ptrmemfunc): Save the input pmf.
13793
13794 * method.c (process_modifiers): Use same_type_p.
13795
94350948
MM
137962000-08-23 Mark Mitchell <mark@codesourcery.com>
13797
13798 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
13799 * mangle.c (write_function_type): Change prototype.
13800 (write_encoding): Don't mangle return types for
13801 constructors or destructors.
13802 (write_type): Adjust call to write_function_type.
13803 * pt.c (instantiate_template): Instantiate alternate entry points
13804 when instantiating the main function.
0e5921e8 13805
a64e7329
GDR
138062000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
13807
13808 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 13809 output_printf.
a64e7329 13810
a72462a4
GDR
138112000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
13812
13813 * decl.c (init_decl_processing): Remove bogus initialization.
13814 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
13815 (init_error): Initialize print_error_function.
13816
3add6264
TP
138172000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13818
13819 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
13820
cb753e49
GDR
138212000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
13822
13823 * Makefile.in (error.o): Depends on diagnostic.h
13824
13825 * cp-tree.h (problematic_instantiation_changed,
13826 record_last_problematic_instantiation, current_instantiation,
13827 print_instantiation_context): Declare.
13828 (maybe_print_template_context): Remove.
13829
13830 * decl.c (init_decl_processing): Set print_error_function to NULL.
13831 (lang_print_error_function): Remove, since we're using a new
13832 machinery.
13833
13834 * error.c: #include diagnostic.h
13835 (function_category): New function.
13836 (cp_diagnostic_starter): Likewise.
13837 (cp_diagnostic_finalizer): Likewise.
13838 (cp_print_error_function): Likewise.
13839 (maybe_print_instantiation_context): Likewise.
13840 (print_instantiation_full_context): Likewise.
13841 (print_instantiation_partial_context): Likewise.
13842 (print_instantiation_context): Define.
13843 (init_error): Initialize diagnostic pager and finalizer.
13844
13845 * pt.c (problematic_instantiation_changed): Define.
13846 (record_last_problematic_instantiation): Likewise.
13847 (current_instantiation): Likewise.
13848 (maybe_print_template_context): Remove.
13849 (print_template_context): Likewise.
13850 (current_tinst_level): Make static to reflect Brendan Kehoe's
13851 change of 1995-04-13.
0e5921e8
ZW
13852 (push_tinst_level): Call print_instantiation_context.
13853
05a3d06e 138542000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 13855
05a3d06e
N
13856 * lang-specs.h: Do not process -o or run the assembler if
13857 -fsyntax-only.
13858
93e2382f
JM
138592000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
13860
13861 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
13862 variables.
13863 * decl2.c (lang_decode_option): Disable gettext attributes for
13864 -ansi.
13865
24805e80
GDR
138662000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
13867
13868 * lex.c (lang_init_options): Default diagnostic message maximum
13869 length to 80, when line-wrapping.
13870
b485e15b
MM
138712000-08-20 Mark Mitchell <mark@codesourcery.com>
13872
13873 * class.c (build_vtbl_initializer): Clear the entire
13874 vtbl_init_data. Start keeping track of the functions for which we
13875 have created vcall offsets here.
13876 (dfs_build_vcall_offset_vtbl_entries): Remove.
13877 (build_vcall_offset_vtbl_entries): Reimplement.
13878 (add_vcall_offset_vtbl_entries_r): New function.
13879 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
13880 computing when vcall offsets are necessary.
13881
2ae7bada
NS
138822000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13883
13884 * decl.c (member_function_or_else): Use cp_error ... %T.
13885 (grokdeclarator): Likewise.
13886 (start_method): Likewise.
0e5921e8 13887 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 13888
7a8b1375
NS
138892000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13890
13891 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 13892 TYPE_DECLs.
7a8b1375 13893
19420d00
NS
138942000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13895
13896 * cp-tree.h (PTRMEM_OK_P): New macro.
13897 (itf_ptrmem_ok): New enumeration value.
13898 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
13899 argument. Diagnose implicit pointer to member.
13900 (instantiate_type): Don't diagnose implicit pointer to member
13901 here. Pass itf_ptrmem_ok if ok. Adjust calls to
13902 resolve_address_of_overloaded_function.
13903 * init.c (build_offset_ref): Set PTRMEM_OK_P.
13904 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
13905 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
13906 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
13907 (build_unary_op): Deal with single non-static member in
13908 microsoft-land.
13909
66081283
NS
139102000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13911
13912 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
13913
fa40aa12
NS
139142000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13915
13916 * cp-tree.h (enum_name_string): Remove prototype.
13917 (report_case_error): Remove prototype.
13918 * cp/typeck2.c (enum_name_string): Remove.
13919 (report_case_error): Remove.
13920 * error.c (dump_expr): Deal with enum values directly.
13921 Correctly negate integer constant.
13922
d13b34e9
NS
139232000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13924
13925 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
13926 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
13927 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
13928 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
13929 (__cxa_vec_new): Use __cxa_vec_new2.
13930 (__cxa_vec_delete): Use __cxa_vec_delete2.
13931
2f1b80af
NS
139322000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13933
13934 * vec.cc (__cxa_vec_new): Set "C" linkage.
13935 (__cxa_vec_ctor): Likewise.
13936 (__cxa_vec_cctor): Likewise.
13937 (__cxa_vec_dtor): Likewise.
13938 (__cxa_vec_delete): Likewise.
13939 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13940 (__cxa_vec_ctor): Likewise.
13941 (__cxa_vec_cctor): Likewise.
13942 (__cxa_vec_dtor): Likewise.
13943 (__cxa_vec_delete): Likewise.
13944
105d8e1f
NS
139452000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13946
13947 * class.c (instantiate_type): Reinstate local variable
13948 deleted in previous change.
0e5921e8 13949
f1819d9a
NS
13950 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13951 itf_no_attributes.
105d8e1f 13952
5e76004e
NS
139532000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13954
13955 * cp-tree.h (instantiate_type_flags): New enumeration.
13956 (instantiate_type): Change parameter.
13957 * class.c (instantiate_type): Adjust prototype. Adjust.
13958 * call.c (standard_conversion): Adjust instantiate_type call.
13959 (reference_binding): Likewise.
13960 (build_op_delete_call): Likewise.
13961 (convert_like_real): Likewise.
13962 * cvt.c (cp_convert_to_pointer): Likewise.
13963 (convert_to_reference): Likewise.
13964 * pt.c (convert_nontype_argument): Likewise.
13965 * typeck.c (build_binary_op): Likewise.
13966 (build_ptrmemfunc): Likewise.
13967 (convert_for_assignment): Likewise.
13968
4b054b80
NS
139692000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13970
13971 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13972 (current_aggr): Define.
13973 * decl.c (grokdeclarator): Make sure a friend class is an
13974 elaborated type specifier.
13975 * parse.y (current_aggr): Remove static definition.
13976 (cp_parse_init): Adjust.
13977 (structsp): Clear and restore current_aggr.
13978 (component_decl_list): Clear current_aggr.
0e5921e8 13979
4b054b80
NS
13980 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13981 aggregate tag on the typename's context.
0e5921e8 13982
321cba97
NS
13983 * pt.c (tsubst_friend_class): Return error_mark_node, if
13984 parms becomes NULL.
13985 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 13986
08aead78
NS
139872000-08-14 Nathan Sidwell <nathan@codesourcery.com>
13988
13989 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 13990 (convert_to_reference): ... here. Use it.
08aead78 13991
fa1f3ebc
KL
139922000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13993
13994 * parse.y (template_arg): Add rule for template qualified with
13995 global scope.
13996
9845b52b
TP
139972000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13998
13999 * decl2.c (add_function): Reorganize.
14000 (arg_assoc): Do not consider function template decls.
14001
e69c8072
JM
140022000-08-11 Jason Merrill <jason@redhat.com>
14003
14004 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14005 looking inside.
14006
5c1e5476
NS
140072000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14008
14009 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14010 (lookup_nested_tag): Likewise.
0e5921e8 14011
5c1e5476
NS
14012 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14013 can be produced.
14014
5426aa7f
NS
140152000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14016
14017 * parse.y (named_complex_class_head_sans_basetype): Remove
14018 always true if.
14019
fd037e0d
NS
140202000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14021
14022 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14023 explicit TEMPLATE_ID_EXPR args.
14024 (build_expr_from_tree, case CALL_EXPR): Likewise.
14025
73ae5c34
NS
140262000-08-11 Nathan Sidwell <nathan@codesourcery.com>
14027
14028 * decl.c (check_tag_decl): Diagnose typename's which don't
14029 declare anything.
14030
aa54df09
NS
140312000-08-10 Nathan Sidwell <nathan@codesourcery.com>
14032
14033 * init.c (build_aggr_init): Reject bogus array initializers
14034 early.
14035
7e8dad18
NS
140362000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14037
14038 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14039 runtime.
14040 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 14041 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 14042
0f586b9b
NS
140432000-08-09 Nathan Sidwell <nathan@codesourcery.com>
14044
14045 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 14046 attempting to cast from ambiguous base.
0f586b9b 14047
08e72a19
JM
140482000-08-08 Jason Merrill <jason@redhat.com>
14049
14050 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14051 (tsubst_template_arg_vector): Likewise.
14052
14053 * decl2.c (build_anon_union_vars): Choose the largest field; don't
14054 assume that one will be as large as the union.
14055
0811ea8f
KH
140562000-08-07 Kazu Hirata <kazu@hxi.com>
14057
14058 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14059 * decl.c (pop_labels): Likewise.
14060
f9fcf62b
JO
140612000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
14062
14063 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14064 specifications.
14065 (__pointer_to_member_type_info): Likewise.
14066 (__base_class_info): Likewise.
14067 (__class_type_info): Likewise.
14068 (__si_class_type_info): Likewise.
14069 (__vmi_class_type_info): Likewise.
14070 * tinfo.cc (__si_class_type_info::__do_find_public_src):
14071 Changed member names to match specifications.
14072 (__vmi_class_type_info::__do_find_public_src): Likewise.
14073 (__si_class_type_info::__do_dyncast): Likewise.
14074 (__vmi_class_type_info::__do_dyncast): Likewise.
14075 (__si_class_type_info::__do_upcast): Likewise.
14076 (__vmi_class_type_info::__do_upcast): Likewise.
14077 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14078 (__pbase_type_info::__pointer_catch): Likewise.
14079 (__pointer_type_info::__pointer_catch): Likewise.
14080 (__pointer_to_member_type_info::__pointer_catch): Likewise.
14081
a36556a8
ZW
140822000-08-04 Zack Weinberg <zack@wolery.cumb.org>
14083
0e5921e8
ZW
14084 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14085 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14086 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 14087
452a394b
MM
140882000-08-04 Mark Mitchell <mark@codesourcery.com>
14089
14090 * cp-tree.h (add_method): Change prototype.
14091 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
14092 Don't double the size of the method vector in the error case.
14093 (handle_using_decl): Adjust call to add_method.
14094 (add_implicitly_declared_members): Likewise.
14095 (clone_function_decl): Likewise.
14096 * decl2.c (check_classfn): Likewise.
14097 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 14098
b8458e3e
JM
140992000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
14100
14101 * decl.c (flag_isoc94): New variable.
14102
a1bcc528
JM
141032000-08-02 Jason Merrill <jason@redhat.com>
14104
14105 * pt.c (do_type_instantiation): Add complain parm; don't complain
14106 if called recursively.
14107 * cp-tree.h, parse.y: Adjust.
14108
50e60bc3
ZW
141092000-08-02 Zack Weinberg <zack@wolery.cumb.org>
14110
eae51189
ZW
14111 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14112 -Wno-strict-prototypes.
14113
37620334
ZW
14114 * g++spec.c: Adjust type of second argument to
14115 lang_specific_driver, and update code as necessary.
14116
50e60bc3
ZW
14117 * cp-tree.h: Don't prototype min_precision here.
14118 (my_friendly_assert): Cast expression to void.
14119 * semantics.c (do_poplevel): Initialize scope_stmts.
14120
3f954fc3
MM
141212000-08-02 Mark Mitchell <mark@codesourcery.com>
14122
14123 * cp-tree.h (DECL_NEEDED_P): Tweak.
14124
ab4fa7ed
JM
141252000-07-28 Jason Merrill <jason@redhat.com>
14126
14127 * lang-specs.h: Use %i in rule for .ii files.
14128
4871239e
ZW
141292000-07-31 Zack Weinberg <zack@wolery.cumb.org>
14130
14131 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14132
911a71a7
MM
141332000-07-30 Mark Mitchell <mark@codesourcery.com>
14134
14135 Allow indirect primary bases.
14136 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
14137 primary_base.
14138 (CLASSTYPE_VFIELD_PARENT): Remove.
14139 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14140 (BINFO_PRIMARY_BINFO): Remove.
14141 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14142 (BINFO_VBASE_PRIMARY_P): Likewise.
14143 (BINFO_PRIMARY_BASE_OF): New macro.
14144 (BINFO_INDIRECT_PRIMARY_P): Likewise.
14145 (get_primary_binfo): New function.
14146 * decl.c (lang_mark_tree): Make lang_type::primary_base.
14147 * class.c (vcall_offset_data_s): Rename to ...
14148 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
14149 and add ctor_vtbl_p.
14150 (get_derived_offset): Use get_primary_binfo.
14151 (dfs_mark_primary_bases): Adjust handling of virtual primary
14152 bases.
14153 (mark_primary_bases): Likewise.
14154 (set_primary_base): Take a binfo, not an integer, as a
14155 representation of the primary base.
14156 (indirect_primary_base_p): Remove.
14157 (determine_primary_base): Adjust for indirect primary bases.
14158 (dfs_find_final_overrider): Fix typo in coment.
14159 (update_vtable_entry_for_fn): Use get_primary_binfo.
14160 (layout_nonempty_base_or_field): Tweak.
14161 (build_base_fields): Adjust for new primary base semantics.
14162 (dfs_propagate_binfo_offsets): Remove.
14163 (propagate_binfo_offsets): Rewrite.
14164 (dfs_set_offset_for_shared_vbases): Remove.
14165 (layout_virtual_bases): Don't use it.
14166 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14167 ABI.
14168 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14169 CLASSTYPE_VFIELD_PARENT.
14170 (dfs_get_primary_binfo): New function.
14171 (get_primary_binfo): Likewise.
14172 (dump_class_hierarchy_r): Tweak printing of primary bases.
14173 (build_vtbl_initializer): Fix typo in comments. Use
14174 vtbl_init_data.
14175 (build_vcall_and_vbase_vtbl_entries): Likewise.
14176 (build_vbaes_offset_vtbl_entries): Likewise.
14177 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14178 BV_VCALL_INDEX to handle indirect primary bases.
14179 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14180 (build_rtti_vtbl_entries): Likewise.
14181 * search.c (get_shared_vbase_if_not_primary): Tweak.
14182 (find_vbase_instance): Likewise.
14183 (binfo_for_vtable): Simplify.
14184 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14185 (make_binfo): Make it have 11 entries.
0e5921e8 14186
722bed0f
AS
141872000-07-30 Alex Samuel <samuel@codesourcery.com>
14188
14189 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14190 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14191 ascertaining primaryness.
14192 (G): Remove template_args.
14193 (decl_is_template_id): New function.
14194 (write_encoding): Use decl_is_template_id.
14195 (write_name): Likewise. Handle type_decls. Get main variant of
14196 type decls.
14197 (write_nested_name): Likewise.
14198 (write_prefix): Likewise.
14199 (write_template_prefix): Likewise.
14200 (write_special_name_constructor): Remove defunct production from
14201 comment.
14202 (write_bare_function_type): Remove comment about absent parameter.
14203 (write_template_template_arg): Add missing grammar production to
14204 comment.
14205
9076e292
JM
142062000-07-27 Jason Merrill <jason@redhat.com>
14207
14208 * decl.c (duplicate_decls): If common_type produces a non-typedef
14209 type for a typedef, just use the old type.
14210
b2244c65
MM
142112000-07-27 Mark Mitchell <mark@codesourcery.com>
14212
14213 * cp-tree.h (function_depth): Declare.
14214 (verify_stmt_tree): Likewise.
14215 (find_tree): Likewise.
14216 * decl.c (function_depth): Give it external linkage.
14217 * optimize.c (optimize_function): Increment and decrement it.
14218 * tree.c (verify_stmt_tree_r): New function.
14219 (verify_stmt_tree): Likewise.
14220 (find_tree_r): Likewise.
14221 (find_tree): Likewise.
14222
62e3bf54
JM
142232000-07-27 Jason Merrill <jason@redhat.com>
14224
9076e292
JM
14225 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14226 TYPE_PTRMEMFUNC_P.
14227 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 14228
5a728aca
MM
142292000-07-26 Mark Mitchell <mark@codesourcery.com>
14230
14231 * decl.c (start_cleanup_fn): Mark the function as `inline'.
14232 * decl2.c (get_guard): Call cp_finish_decl, not
14233 rest_of_decl_compilation, for local guards.
14234 * lex.c (do_identifier): Remove unused variable.
14235
d2a6f3c0 142362000-07-26 Marc Espie <espie@cvs.openbsd.org>
6a1fa5f9
ME
14237
14238 * parse.y: Add missing ';'.
14239
0c10a805
MM
142402000-07-26 Mark Mitchell <mark@codesourcery.com>
14241
14242 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14243 of `extern "C++"'.
14244
8b27e9ef
NS
142452000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14246
14247 Kill strict_prototype. Backwards compatibility only for
14248 non NO_IMPLICIT_EXTERN_C systems.
14249 * cp-tree.h (flag_strict_prototype): Remove.
14250 (strict_prototype): Remove.
14251 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14252 * decl.c (maybe_push_to_top_level): Adjust.
14253 (pop_from_top_level): Adjust.
14254 (decls_match): Only allow sloppy parm matching for ancient
14255 system headers.
14256 (init_decl_processing): Adjust.
14257 (grokdeclarator): Adjust.
14258 * decl2.c (flag_strict_prototype): Remove.
14259 (strict_prototype): Remove.
14260 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14261 (lang_f_options): Remove "strict-prototype".
14262 (unsupported-options): Add "strict-prototype".
14263 * lex.c (do_identifier): Adjust.
14264 (do_scoped_id): Adjust.
14265 * parse.y (empty_parms): Adjust.
14266 * class.c (push_lang_context): Adjust.
14267 (pop_lang_context): Adjust.
14268 * typeck.c (comp_target_parms): Adjust.
14269
c3783399
NS
142702000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14271
14272 * decl.c (poplevel): Deal with anonymous variables at for scope.
14273 (maybe_inject_for_scope_var): Likewise.
14274
a7023245
ZW
142752000-07-25 Zack Weinberg <zack@wolery.cumb.org>
14276
14277 * decl.c: Remove all signal handling code, now done in toplev.c.
14278
95ee998c
MM
142792000-07-23 Mark Mitchell <mark@codesourcery.com>
14280
14281 * decl.c (make_rtl_for_nonlocal_decl): Rework.
14282
14283 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14284 correctly.
14285
1b493b81
ZW
142862000-07-20 Zack Weinberg <zack@wolery.cumb.org>
14287
14288 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14289 Define my_friendly_assert and my_friendly_abort as macros
14290 which may call friendly_abort. Prototype friendly abort, not
14291 my_friendly_abort or my_friendly_assert.
14292 * decl.c (signal_catch): Report the signal caught in the error
14293 message. Call fatal directly.
14294 * typeck2.c (ack, my_friendly_assert): Delete.
14295 (my_friendly_abort): Rename to friendly_abort. Expect file,
14296 line, and function parameters. Report the abort code, then
14297 call fancy_abort. Do not mask an abort if errors have
14298 already occurred.
14299
a306451c
NS
143002000-07-18 Nathan Sidwell <nathan@codesourcery.com>
14301
14302 * typeck.c (comp_target_parms): Remove obsolete parameter.
14303 (comp_target_types): Adjust.
14304
f49fad00
JM
143052000-07-17 Jason Merrill <jason@redhat.com>
14306
14307 * typeck.c (mark_addressable): Never set TREE_USED.
14308 * call.c (build_call): Don't abort on calls to library functions
14309 that have been declared normally.
14310
14311 * typeck.c (build_binary_op): Fix grammar in warning.
14312
14313 * exception.cc (__eh_free): Fix prototype.
14314
14315 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14316
0e5921e8 14317 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
14318 IDENTIFIER_NAMESPACE_VALUE.
14319
69690d98
MM
143202000-07-16 Mark Mitchell <mark@codesourcery.com>
14321
14322 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14323 * method.c (use_thunk): Correct handling of vcall offsets.
14324
bfbbc080
ZW
143252000-07-14 Zack Weinberg <zack@wolery.cumb.org>
14326
14327 * .cvsignore: parse.h and parse.c have no cp- prefix.
14328
83a90717
MM
143292000-07-13 Mark Mitchell <mark@codesourcery.com>
14330
14331 * .cvsignore: New file.
14332
ea414c97
ZW
143332000-07-13 Zack Weinberg <zack@wolery.cumb.org>
14334
14335 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
14336
792abd35
MM
143372000-07-12 Mark Mitchell <mark@codesourcery.com>
14338
14339 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14340 * parse.c: Remove.
14341 * parse.h: Likewise.
14342
72a50ab0
MM
143432000-07-11 Mark Mitchell <mark@codesourcery.com>
14344
14345 * class.c (layout_class_type): Add pointers to virtual bases after
14346 base classes under the old ABI.
14347
0dfdeca6
BC
143482000-07-10 Benjamin Chelf <chelf@codesourcery.com>
14349
14350 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14351 (finish_continue_stmt): Likewise.
14352 (begin_for_stmt): Remove call to note_level_for_for.
14353 (finish_goto_stmt): Change call from build_min_nt
14354 to build_stmt.
14355 (finish_expr_stmt): Likewise.
14356 (begin_if_stmt): Likewise.
14357 (begin_while_stmt): Likewise.
14358 (finish_while_stmt): Likewise.
14359 (finish_return_stmt): Likewise.
14360 (begin_for_stmt): Likewise.
14361 (finish_for_stmt): Likewise.
14362 (finish_break_stmt): Likewise.
14363 (begin_switch_stmt): Likewise.
14364 (finish_case_label): Likewise.
14365 (genrtl_try_block): Likewise.
14366 (begin_try_block): Likewise.
14367 (begin_handler): Likewise.
14368 (begin_compound_stmt): Likewise.
14369 (finish_asm_stmt): Likewise.
14370 (finish_label_stmt): Likewise.
14371 (add_decl_stmt): Likewise.
14372 (finish_subobject): Likewise.
14373 (finish_decl_cleanup): Likewise.
14374 (finish_named_return_value): Likewise.
14375 (setup_vtbl_ptr): Likewise.
14376 (add_scope_stmt): Likewise.
14377 * decl.c (finish_constructor_body): Likewise.
14378 (finish_destructor_body): Likewise.
14379 * optimize.c (copy_body_r): Likewise.
14380 (initialize_inlined_parameters): Likewise.
14381 (declare_return_variable): Likewise.
14382 (expand_call_inline): Likewise.
0e5921e8 14383
f12eef58
JJ
143842000-07-10 Jakub Jelinek <jakub@redhat.com>
14385
14386 * semantics.c (expand_body): Sync interface information
14387 at the end of function body expansion.
14388
2bb5d995
JM
143892000-07-09 Jason Merrill <jason@redhat.com>
14390
14391 * init.c (build_new_1): Bail early if the call to new fails.
14392
0e5921e8 14393 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
14394 an INTEGER_CST, not just TREE_CONSTANT.
14395
0e5921e8 14396 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
14397 the DECL_TEMPLATE_RESULT.
14398 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
14399 codes.
14400
14401 * error.c (dump_template_bindings): Don't crash if we had an
14402 invalid argument list.
14403
14404 * typeck.c (c_expand_start_case): Do narrowing here.
14405 * semantics.c (finish_switch_cond): Not here.
14406
144072000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
14408
14409 * parse.y (asm_clobbers): Do string concatenation.
14410
089acd57
MM
144112000-07-09 Mark Mitchell <mark@codesourcery.com>
14412
14413 * decl.c (pushtag): Don't put local classes in template functions
14414 on the local_classes list.
14415
144162000-07-04 Scott Snyder <snyder@fnal.gov>
14417
14418 * decl2.c (get_guard): Add missing return for old ABI local
14419 variable case.
14420
7b019c19
MM
144212000-07-09 Mark Mitchell <mark@codesourcery.com>
14422
14423 * cp-tree.h (char_type_p): New function.
14424 * decl.c (init_decl_processing): Don't initialize
14425 signed_wchar_type_node or unsigned_wchar_type_node.
14426 (complete_array_type): Handle brace-enclosed string-constants.
14427 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
14428 * tree.c (char_type_p): New function.
14429 * typeck2.c (digest_init): Use char_type_p.
14430
a5f1c5f8
NS
144312000-07-06 Nathan Sidwell <nathan@codesourcery.com>
14432
14433 * pt.c (tsubst): Don't layout type, if it's error_mark.
14434
84e5ca0f
NS
144352000-07-06 Nathan Sidwell <nathan@codesourcery.com>
14436
14437 * pt.c (instantiate_pending_templates): Reset template level.
14438
ab785305
JM
144392000-07-05 Jason Merrill <jason@redhat.com>
14440
14441 * call.c (joust): Don't complain about `operator char *()' beating
14442 `operator const char *() const'.
14443
90418208
JM
144442000-07-04 scott snyder <snyder@fnal.gov>
14445 Jason Merrill <jason@redhat.com>
14446
0e5921e8 14447 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
14448 bases has a null TYPE_BINFO_VTABLE.
14449
144502000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
14451 Jason Merrill <jason@redhat.com>
14452
14453 * parse.y (member_init): Just pass in the type.
14454 * init.c (expand_member_init): Handle getting a type.
14455
14456