]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
cp-tree.h (build_scoped_method_call): Remove.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
ee76b931
MM
12003-07-07 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h (build_scoped_method_call): Remove.
4 (lookup_qualified_name): Remove parameter.
5 (tsubst_copy_and_build): Declare.
6 (finish_qualified_object_call_expr): Remove.
7 (check_accessibility_of_qualified_id): New function.
8 (finish_qualified_id_expr): Likewise.
9 (non_reference): Likewise.
10 (build_expr_from-tree): Remove.
11 * call.c (non_reference): Remove.
12 (build_scoped_method_call): Likewise.
13 (build_method_call): Use error_operand_p. Assert that we are not
14 processing a template.
15 (standard_conversion): Use non_reference.
16 * class.c (build_vtbl_entry_ref): Likewise.
17 (build_vtbl_ref_1): Likewise.
18 * cvt.c (build_expr_type_conversion): Use non_reference.
19 * decl.c (lookup_qualified_name): Remove flags parameter.
20 (grok_op_properties): Use non_reference.
21 * decl2.c (grok_array_decl): Likewise.
22 (build_expr_from_tree): Remove.
23 (build_offset_ref_call_from_tree): Update comment.
24 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
25 * except.c (prepare_eh_types): Use non_reference.
26 (can_convert_eh): Likewise.
27 * init.c (build_dtor_call): Avoid using build_method_call.
28 * mangle.c (write_template_param): Remove misleading comment.
29 * method.c (locate_copy): Use non_reference.
30 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
31 (cp_parser_primary_expression): Do not create SCOPE_REFs is
32 non-dependent contexts.
33 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
34 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
35 build_expr_from_tree.
36 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
37 Use check_accessibility_of_qualified_id.
38 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
39 build_expr_from_tree.
40 (tsubst_baselink): New function.
41 (tsubst_qualified_id): Likewise.
42 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
43 (tsubst_expr): Adjust call to lookup_qualified_name.
44 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
45 handling of CALL_EXPRs.
46 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
47 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
48 * search.c (check_final_overrider): Likewise.
49 * semantics.c (check_accessibility_of_qualified_id): New function.
50 (finish_qualified_object_call_expr): Remove.
51 * typeck.c (target_type): Use non_reference.
52 (cxx_sizeof_or_alignof_type): Likewise.
53 (dubious_conversion_warnings): Likewise.
54 (convert_for_initialization): Likewise.
55 (non_reference): New function.
56
75b6f3fd
KG
572003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
58
59 * decl.c (print_binding_level, print_other_binding_stack,
60 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
61 stdio calls.
62 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
63
5671bf27
AJ
642003-07-07 Andreas Jaeger <aj@suse.de>
65
66 * friend.c: Convert to ISO C90 prototypes.
67
68 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
69 language.
70 * cfns.h: Regenerate.
71
72 * typeck.c: Convert remaining prototypes to ISO C90.
73 * search.c: Likewise.
74
75 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
76 * semantics.c (expand_or_defer_fn): Likewise
77 * mangle.c (discriminator_for_string_literal): Likewise.
78 * g++spec.c (lang_specific_driver): Likewise.
79
80 * search.c (lookup_base_r): Remove unused variable.
81
0cea056b
NS
822003-07-07 Nathan Sidwell <nathan@codesourcery.com>
83
84 * semantics.c: (genrtl_try_block) Adjust emit_line_note
85 calls.
86
5fc521ac
AJ
872003-07-07 Andreas Jaeger <aj@suse.de>
88
89 * search.c (lookup_base_r): Remove unused variable.
90
267a0752
MC
912003-07-06 Michael Chastain <mec@shout.net>
92
93 PR debug/10055
94 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
95 assigning to input_filename directly.
96
9bcb9aae
KH
972003-07-06 Kazu Hirata <kazu@cs.umass.edu>
98
99 * call.c: Fix comment formatting.
100 * class.c: Likewise.
101 * cp-tree.h: Likewise.
102 * decl.c: Likewise.
103 * decl2.c: Likewise.
104 * error.c: Likewise.
105 * method.c: Likewise.
106 * name-lookup.c: Likewise.
107 * parser.c: Likewise.
108 * pt.c: Likewise.
109 * rtti.c: Likewise.
110 * search.c: Likewise.
111 * typeck.c: Likewise.
112
127b8136
MM
1132003-07-06 Mark Mitchell <mark@codesourcery.com>
114
115 PR c++/11345
116 * search.c (lookup_base_r): Remove is_non_public and
117 within_current_scope parameters. Remove other dead code.
118 (lookup_base): Adjust call to lookup_base_r.
119 (adjust_result_of_qualified_name_lookup): Improve comment.
120 * semantics.c (finish_call_expr): Use maybe_dummy_object.
121
cb66e385
NB
1222003-07-06 Neil Booth <neil@daikokuya.co.uk>
123
124 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
125 LANG_HOOKS_MISSING_ARGUMENT): Override.
126
0a72704b
MM
1272003-07-05 Mark Mitchell <mark@codesourcery.com>
128
129 PR c++/11431
130 * typeck.c (build_static_cast): Check for reference conversions
131 earlier.
132
1332003-07-04 Mark Mitchell <mark@codesourcery.com>
134
135 * cp-tree.h (perform_integral_promotions): Declare.
136 * call.c (build_addr_func): Use decay_conversion.
137 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
138 (convert_for_arg_passing): Use perform_integral_promotions.
139 * cvt.c (build_expr_type_conversion): Use decay_conversion.
140 (type_promotes_to): Do not return a cv-qualified type.
141 * decl.c (grok_reference_init): Fix formatting.
142 (get_atexit_node): Use decay_conversion.
143 (build_enumerator): Use perform_integral_promotions.
144 * init.c (build_vec_init): Use decay_conversion.
145 * semantics.c (finish_expr_stmt): Likewise.
146 (finish_switch_cond): Use perform_integral_promotions.
147 * typeck.c (default_conversion): Likewise.
148 (perform_integral_promotions): New function.
149 (build_indirect_ref): Use decay_conversion.
150 (build_array_ref): Use perform_integral_promotions.
151 (convert_arguments): Use decay_conversion.
152 (build_unary_op): Use perform_integral_promotions.
153 (build_c_cast): Use decay_conversion.
154 (build_modify_expr): Likewise.
155 (convert_for_initialization): Likewise.
156 * typeck2.c (build_x_arrow): Likewise.
157
34cd5ae7
KH
1582003-07-04 Kazu Hirata <kazu@cs.umass.edu>
159
160 * call.c: Fix comment typos.
161 * class.c: Likewise.
162 * cp-tree.h: Likewise.
163 * cvt.c: Likewise.
164 * decl2.c: Likewise.
165 * decl.c: Likewise.
166 * init.c: Likewise.
167 * mangle.c: Likewise.
168 * parser.c: Likewise.
169 * pt.c: Likewise.
170 * search.c: Likewise.
171 * semantics.c: Likewise.
172 * tree.c: Likewise.
173 * typeck.c: Likewise.
174
e6cc3a24
ZW
1752003-07-04 Zack Weinberg <zack@codesourcery.com>
176
177 * parser.c (cp_lexer_read_token): No need to handle string
178 constant concatenation.
179
5f1989e6
KG
1802003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
181
182 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
183 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
184 ATTRIBUTE_GCC_CXXDIAG.
185
8d245821
MM
1862003-07-03 Mark Mitchell <mark@codesourcery.com>
187
d6b4ea85
MM
188 * call.c (build_addr_func): Handle bound pointers-to-members.
189 (build_method_call): Do not call resolve_offset_ref.
190 (implicit_conversion): Likewise.
191 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
192 resolve_offset_ref.
193 (resolve_args): Do not call resolve_offset_ref.
194 (build_conditional_expr): Likewise.
195 (build_new_method_call): Likewise.
196 * cp-tree.def (OFFSET_REF): Update documentation.
197 (cp_convert_to_pointer): Update handling of conversions from
198 pointers to members to pointers.
199 (ocp_convert): Do not call resolve_offset_ref.
200 (convert_to_void): Likewise.
201 (build_expr_type_conversion): Likewise.
202 (delete_sanity): Likewise.
203 (resolve_offset_ref): Simplify greatly.
204 (build_vec_delete): Do not call resolve_offset_ref.
205 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
206 if appropriate.
207 (cp_parser_unary_expression): Use
208 cp_parser_simple_cast_expression.
209 (cp_parser_delete_expression): Likewise.
210 (cp_parser_cast_expression): Likewise.
211 (cp_parser_pm_expression): Use cp_parser_binary_op.
212 (cp_parser_simple_cast_expression): New function.
213 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
214 * semantics.c (finish_increment_expr): Likewise.
215 (finish_typeof): Likewise.
216 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
217 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
218 (decay_conversion): Do not call resolve_offset_ref.
219 (finish_class_member_access_expr): Likewise.
220 (convert_arguments): Likewise.
221 (build_x_binary_op): Handle DOTSTAR_EXPR.
222 (condition_conversion): Do not call resolve_offset_ref.
223 (unary_complex_lvalue): Likewise.
224 (build_static_cast): Likewise.
225 (build_reinterpret_cast): Likewise.
226 (build_const_cast): Likewise.
227 (build_c_cast): Likewise.
228 (build_modify_expr): Likewise.
229 (convert_for_assignment): Likewise.
230 (convert_for_initialization): Likewise.
231 * typeck2.c (build_x_arrow): Likewise.
232 (build_m_component_ref): Simplify.
e6cc3a24 233
8d245821
MM
234 * call.c (build_scoped_method_call): Use convert_to_void.
235 (build_method_call): Likewise.
236 * class.c (check_field_decls): Remove dead code.
237 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
238 * decl2.c (grok_array_decl): Remove dead code.
239 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
240 as pointer-to-member representation.
241 * init.c (build_offset_ref): Tidy.
242 (build_vec_delete_1): Use convert_to_void.
243 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
244 as pointer-to-member representation.
e6cc3a24 245
8db1028e
NS
2462003-07-03 Nathan Sidwell <nathan@codesourcery.com>
247
248 PR c++/9162
249 * decl.c (grokdeclarator): Return friend decls, not
250 void_type_node.
251 * decl2.c (grokfield): Alter friend decl check.
252 * parser.c (struct cp_parser): Document default_arg chain on
253 unparsed_functions_queue.
254 (cp_parser_save_default_args): New.
255 (cp_parser_init_declarator, cp_parser_function_definition,
256 cp_parser_member_declaration): Call it.
257 (cp_parser_class_specifier): Remove unused variable. Alter
258 processing of unparsed_functions_queue.
259
04d6ccbd
KG
2602003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
261
262 * class.c (add_method, check_field_decl): Fix format specifier.
263 * decl.c (duplicate_decls, pushdecl, check_goto,
264 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
265 start_enum): Likewise.
266 * decl2.c (ambiguous_decl): Likewise.
267 * pt.c (redeclare_class_template): Likewise.
268
0c83a0fc
NS
2692003-07-02 Nathan Sidwell <nathan@codesourcery.com>
270
08476342
NS
271 PR c++/10219
272 * pt.c (type_unification_real): Don't unify exprs of error type.
273 * tree.c (error_type): Don't die on error_type.
274
0c83a0fc
NS
275 PR c++/9779
276 * decl2.c (arg_assoc_class): Don't die on NULL type.
277 * typeck.c (type_unknown_p): Don't die on untyped expressions.
278
ddb45080
MM
2792003-07-01 Mark Mitchell <mark@codesourcery.com>
280
281 PR c++/6949
282 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
283 classes.
284
b01b2484
KG
2852003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
286
287 * error.c (locate_error): %P takes an `int', not a `tree'.
288
8cd2462c
JH
289Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
290
291 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
292 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
293 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
294 massaging.
295
296 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
297 (expand_or_defer_fn): Declare.
298 (lower_function): Declare.
299 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
300 * decl2.c: Include cgraph.h and varpool.h
301 (maybe_emit_vtables): Make explicit instantations as needed.
302 (mark_member_pointers, lower_function): New functions.
303 (finish_file): Do unit-at-a-time.
304 * method.c (synthesize_method): Use expand_or_defer_fn.
305 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
306 * parser.c (cp_parser_function_definition_after_decl): Use
307 expand_or_defer_fn.
308 * pt.c (instantiate_decl): Likewise.
309 * semantics.c: Include cgraph.h
310 (expand_or_defer_fn): Break out from ...
311 (expand_body): ... here; deal with unit-at-a-time.
312 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
313 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
314
28570f7e
MM
3152003-07-01 Mark Mitchell <mark@codesourcery.com>
316
317 * call.c (resolve_scoped_fn_name): Return error_mark_node for
318 erroneous cases.
319
62bfce90
MM
3202003-07-01 Mark Mitchell <mark@codesourcery.com>
321
322 PR c++/11149
323 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
324 is a class type.
325
814ae570 3262003-07-01 Giovanni Bajo <giovannibajo@libero.it>
e6cc3a24
ZW
327
328 PR c++/8046
329 * error.c (dump_decl): Handle BIT_NOT_EXPR as
330 pseudo destructor calls.
814ae570 331
5b030314
NS
3322003-07-01 Nathan Sidwell <nathan@codesourcery.com>
333
334 * cp-tree.h (define_label): Replace filename and lineno
335 arguments with a location_t.
336 * decl.c (pop_label): Adjust define_label call.
337 (define_label): Replace filename and lineno arguments with a
338 location_t.
339 * semantics.c (finish_label): Adjust define_label call.
340
c9bdad35
MM
3412003-07-01 Mark Mitchell <mark@codesourcery.com>
342
343 PR c++/9559
344 * decl2.c (grokfield): Do not build NOP_EXPRs around the
345 error_mark_node.
346
37fa72e9
NB
3472003-06-30 Neil Booth <neil@daikokuya.co.uk>
348
349 * Make-lang.in: Update.
350 * cp-lang.c (c_language): Define.
351 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
352 * cp-tree.h (cxx_init_options): Remove.
353 * lex.c: Don't include diagnostic.h.
354 (cxx_init_options): Remove.
355
44978276
GB
3562003-06-30 Giovanni Bajo <giovannibajo@libero.it>
357
e6cc3a24
ZW
358 PR c++/4933
359 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
360 tree generated within a template. Use dump_expr to dump an
361 expression sizeof.
44978276 362
f8bee204
GB
3632003-06-30 Giovanni Bajo <giovannibajo@libero.it>
364
e6cc3a24
ZW
365 * mangle.c (write_expression): Exit gracefully when trying to
366 mangle a CALL_EXPR.
f8bee204 367
9b61cc1b
GB
3682003-06-30 Giovanni Bajo <giovannibajo@libero.it>
369
e6cc3a24
ZW
370 PR c++/10750
371 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
372 (value- or type-) dependent expression as DECL_INITIAL is a
373 valid constant-expression (at parser time).
9b61cc1b 374
37198bc8
GB
3752003-06-30 Giovanni Bajo <giovannibajo@libero.it>
376
e6cc3a24
ZW
377 PR c++/11106
378 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
379 USING_DECL, instead of print_tree_identifier.
37198bc8 380
4e3f84b7
GDR
3812003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
382
383 * cp-tree.h (language_to_string): Adjust declaration.
384 * dump.c (cp_dump_tree): Adjust usage.
385 * error.c (dump_char): Use output_formatted_scalar. Tidy.
386 (parm_to_string): Lose unused parameter. Tidy.
387 (expr_to_string): Likewise.
388 (code_to_string): Likewise.
389 (language_to_string): Likewise.
390 (op_to_string): Likewise.
391 (assop_to_string): Likewise.
392 (digit_buffer): Remove.
393 (dump_type): Format builtin vector type as __vector__.
394
748f6cb5
GDR
3952003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
396
397 * error.c (print_integer): Remove.
398 (dump_type_suffix): Adjust.
399 (dump_expr): Likewise.
400
9a472a42
NS
4012003-06-28 Nathan Sidwell <nathan@codesourcery.com>
402
35773471
NS
403 * error.c (print_instantiation_partial_context): Take a
404 location_t.
405 (print_instantiation_full_context): Adjust.
406 (print_instantiation_context): Adjust.
407
9a472a42
NS
408 * cp-tree.h (cp_line_of, cp_file_of): Remove.
409 * error.c (cp_line_of, cp_file_of): Merge into ...
410 (location_of): ... here. Make static, return a location_t.
411 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
412
2e2d4075
NS
4132003-06-28 Nathan Sidwell <nathan@codesourcery.com>
414
415 PR c++/10784
416 * call.c (joust): Move warn_conversion check outwards.
417
8ce33230
ZW
4182003-06-27 Zack Weinberg <zack@codesourcery.com>
419
420 * decl.c (build_typename_type)
421 * mangle.c (write_template_template_arg)
422 * parser.c (cp_parser_scope_through_which_access_occurs)
423 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
424 * repo.c (get_base_filename)
425 * semantics.c (maybe_convert_cond):
426 Mark the definition static, matching the forward declaration.
427
dce50630
MM
4282003-06-27 Mark Mitchell <mark@codesourcery.com>
429
430 PR c++/10468
431 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
432
e455bc27
MM
4332003-06-27 Mark Mitchell <mark@codesourcery.com>
434
435 PR c++/10796
436 * decl.c (finish_enum): Implement DR377.
437
438 * decl.c (cp_finish_decl): Don't make variables with reference
439 type readonly while they are being initialized.
440
3a73bcc6
MM
4412003-06-26 Mark Mitchell <mark@codesourcery.com>
442
443 PR c++/11332
444 * typeck.c (build_static_cast): Avoid returning expressions with
445 reference type.
446
8d4ce389
NS
4472003-06-26 Nathan Sidwell <nathan@codesourcery.com>
448
449 * call.c (build_op_delete_call): Use strip_array_call. Correct
450 error message to say 'delete' or 'delete[]'.
451
2f54a1db
GB
4522003-06-26 Giovanni Bajo <giovannibajo@libero.it>
453
8ce33230
ZW
454 PR c++/8266
455 * pt.c (check_explicit_specialization): When looking up a
456 template function from an identifier outside class-scope, bind
457 it to CP_DECL_CONTEXT.
2f54a1db 458
3fe18f1d
MM
4592003-06-25 Mark Mitchell <mark@codesourcery.com>
460
e80706c4
MM
461 PR c++/10990
462 * search.c (lookup_base_r): Rely on accessible_p, rather than
463 trying to emulate that logic here.
464
3fe18f1d
MM
465 PR c++/10931
466 * call.c (convert_like): Pass issue_conversion_warnings.
467 (convert_like_with_context): Likewise.
468 (convert_like_real): Add issue_conversion_warnings parameter.
469 (perform_direct_initialization_if_possible): New function.
470 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
471 * typeck.c (check_for_casting_away_constness): New function.
472 (build_static_cast): Rewrite.
8ce33230 473
6df5158a
NS
4742003-06-24 Nathan Sidwell <nathan@codesourcery.com>
475
476 * call.c (enforce_access): Assert we get a binfo.
477 (build_op_delete_call): Pass a binfo to
478 perform_or_defer_access_check.
479 * class.c (alter_access): Likewise.
480 * decl.c (make_typename_type): Likewise.
481 (make_unbound_class_template): Likewise.
482 * lex.c (do_identifier): Likewise.
483 * method.c (hack_identifier): Likewise.
484 * parser.c (cp_parser_lookup_name): Likewise.
485 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
486 test.
487 * semantics.c (finish_non_static_data_member): Likewise.
488 (perform_or_defer_access_check): Expect a binfo.
489 * typeck.c (comptypes): Expect types.
490
491 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
492 * friend.c (make_friend_class): Likewise.
493 * pt.c (check_default_tmpl_args): Likewise.
494 (lookup_template_class): Likewise.
495
cebebe72
JH
496Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
497
498 * method.c (thunk_labelno): Move outside ifdef block to make garbage
499 collector happy.
500
d35543c0
JH
501Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
502
503 * class.c (build_vtable): Make vtables.
504 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
505 * decl2.c (output_vtable_inherit): Rename to ...
506 (prepare_assemble_variable): ... this one; change interface.
507 (maybe_emit_vtables): Do not call output_vtable_inherit.
508 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
509 * cp-tree.h (prepare_assemble_variable): New.
510
d46c570d
AP
5112003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
512
513 * method.c: add prototype for make_alias_for_thunk.
514 (thunk_labelno, make_alias_for_thunk): only define
515 if ASM_OUTPUT_DEF is defined.
516
89ce1c8f
JJ
5172003-06-23 Jakub Jelinek <jakub@redhat.com>
518
519 * method.c (thunk_labelno): New variable.
520 (make_alias_for_thunk): New function.
521 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
522 into the same section as the function it is calling.
523 Include gt-cp-method.h.
524 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
525 (cp/method.o): Depend on gt-cp-method.h.
526 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
527
bb4f6e6b
JH
528Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
529
530 * decl.c (register_dtor_fn): Mark cleanup as used.
531 * decl2.c (mark_vtable_entries): Skip nops.
532 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
533 (build_dynamic_cast_1): Likewise.
534 (tinfo_base_init): Likewise.
535 (emit_tinfo_decl): Likewise.
536
98decfaf
JJ
5372003-06-23 Jakub Jelinek <jakub@redhat.com>
538
6df5158a 539 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
98decfaf
JJ
540 to it.
541
25abc0a5
GDR
5422003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
543
544 PR c++/10784
545 * call.c (joust): Warn about choosing conversion sequence only if
546 -Wconversion.
547
84cc377e
GDR
5482003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
549
25abc0a5 550 PR c++/10864
84cc377e
GDR
551 * call.c (op_error): Tidy.
552 * error.c (dump_expr): Properly format 'T()' when T is an
553 aggregate type.
554
dfbeb061
GDR
5552003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
556
557 PR c++/10915
558 * decl.c (grok_op_properties): Warn possible confusing conversion
559 only if -Wconversion.
560
68361a03
MM
5612003-06-20 Mark Mitchell <mark@codesourcery.com>
562
66d418e6
MM
563 PR c++/10749
564 * parser.c (cp_parser_class_head): See through dependent names
565 when parsing a class-head.
566
68361a03
MM
567 PR c++/10845
568 * pt.c (try_class_unification): Correct handling of member class
569 templates.
570
1f9cc6db
NS
5712003-06-20 Nathan Sidwell <nathan@codesourcery.com>
572
573 * semantics.c (genrtl_finish_function): Adjust
574 expand_function_end call.
575
170b020f
MM
5762003-06-19 Mark Mitchell <mark@codesourcery.com>
577
00cf3e31
MM
578 PR c++/10939
579 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
580 functions.
581 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
582
f139561c
MM
583 PR c++/9649
584 * cp-tree.h (pushdecl_class_level): Change prototype.
585 (push_class_level_binding): Likewise.
586 * decl.c (add_binding): Reject duplicate static data members.
587 (pushdecl_class_level): Return a value indicating whether or not
588 the binding was valid.
589 (push_class_level_binding): Likewise.
590 * semantics.c (finish_member_declaration): Don't keep invalid
591 declarations.
592
170b020f
MM
593 PR c++/11041
594 * call.c (initialize_reference): Do not use cp_finish_decl to emit
595 temporary variables.
596 * cp-tree.h (static_aggregates): Declare.
597 (pushdecl_top_level_and_finish): Likewise.
598 * decl.c (pushdecl_top_level_1): New function.
599 (pushdecl_top_level): Use it.
600 (pushdecl_top_level_and_finish): New function.
601 (initialize_local_var): Remove redundant code.
602 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
603 building_stmt_tree.
604 * decl.h (static_aggregates): Remove.
605 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
606 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
607 (tinfo_base_init): Likewise.
8ce33230 608
7a1d37e9
MA
6092003-06-19 Matt Austern <austern@apple.com>
610
611 PR c++/11228
612 * init.c (build_zero_init): Assert that number of array elements
613 is an integer constant.
614 (build_default_init) Don't use build_zero_init for arrays with
615 variable number of elements.
8ce33230 616
e295f317
AJ
6172003-06-19 Andreas Jaeger <aj@suse.de>
618
619 * cp-tree.h: Remove duplicated declarations.
620
3a978d72
NN
6212003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
622
623 * pt.c: Convert to ISO C.
624 * semantics.c: Convert to ISO C.
625
acd8e2d0
NS
6262003-06-18 Nathan Sidwell <nathan@codesourcery.com>
627
628 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
629 at_least_as_qualified_p, more_qualified_p): Return bool.
630 * typeck.c: ANSIFY function definitions.
631 (comp_array_types): Take redeclaration bool parameter.
632 (comptypes): Rearrange STRICT handling.
633 (at_least_as_qualified_p, more_qualified_p,
634 comp_cv_qualification): Cache cv quals.
635 (compparms): Rearrange loop.
e295f317 636
c8a209ca
NS
6372003-06-18 Nathan Sidwell <nathan@codesourcery.com>
638
639 * cp-tree.h (COMPARE_RELAXED): Rename to ...
640 (COMPARE_DERIVED): ... here. Adjust comment.
641 (resolve_typename_type_in_current_instantiation): Remove.
642 (cp_tree_equal, comptypes): Return a bool.
643 * cvt.c (convert_to_reference): Adjust comptypes call.
644 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
645 (resolve_typename_type_in_current_instantiation): Remove.
646 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
647 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
648 calls. Refactor code.
649 * typeck.c (comp_array_types): Return bool. Lose callback.
650 parameter. Adjust cp_tree_equal calls.
651 (comptypes): Return bool. Adjust strict handling. Remove relaxed
652 enumeration and java type handling. Deal with typename types here.
653 Adjust recursive and cp_tree_equals calls. Adjust base and derived
654 checking.
655 (comp_target_types): Remove unreachable code. Adjust
656 same_or_base_type_p calls.
657 (ptr_reasonably_similar): Adjust base and derived check.
e295f317 658
c8a209ca
NS
659 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
660 unused calculation.
661 (check_return_expr): Adjust error messages.
662 * cp-tree.def (SCOPE_REF): Correct comment.
663
a26574f5
MM
6642003-06-17 Mark Mitchell <mark@codesourcery.com>
665
666 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
667 string again.
668
f3f735eb
RA
6692003-06-17 Robert Abeles <rabeles@archaelogic.com>
670
671 * optimize.c (dump_function): Form complete flag name by
672 prefixing 'fdump-' to string returned by dump_flag_name().
673
f2d90304
MM
6742003-06-17 Mark Mitchell <mark@codesourcery.com>
675
676 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
677 string.
678
9da32fe1
JM
6792003-06-17 Jason Merrill <jason@redhat.com>
680
681 PR c++/10929
682 * decl.c (grokfndecl): Don't mark a function inline for
683 -finline-functions if it isn't defined.
684
ca90f3e1
MM
6852003-06-17 Mark Mitchell <mark@codesourcery.com>
686
019bb98e 687 PR c++/10712
3cedc9d8
MM
688 * class.c (handle_using_decl): Robustify.
689
ca90f3e1
MM
690 PR c++/11105
691 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
692 * mangle.c (struct globals): Remove internal_mangling_p.
693 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
694 (write_template_parm): Don't write out the level number.
695 (conv_type_names): New variable.
696 (hash_type): New function.
697 (compare_type): Likewise.
698 (mangle_conv_op_name_for_type): Don't try to mangle conversion
699 operator names.
700 * search.c (lookup_conversion_operator): New function.
701 (lookup_fnfields_1): Use it.
702
4c168c6e
AJ
7032003-06-17 Andreas Jaeger <aj@suse.de>
704
705 * except.c: Remove duplicate declaration of push_eh_cleanup.
706
707 * call.c: Remove extra declaration of inhibit_warnings.
708
89aec4b1
NN
7092003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
710
711 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
712 * mangle.c: Convert to ISO C.
713
fad205ff
KG
7142003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
715
716 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
717 macro.
718
b57b79f7
NN
7192003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
720
721 * tree.c: Convert to ISO C.
722
4de8668e
KH
7232003-06-16 Kazu Hirata <kazu@cs.umass.edu>
724
725 * cp-tree.h: Follow spelling conventions.
726 * mangle.c: Likewise.
727 * method.c: Likewise.
728 * parser.c: Likewise.
729
ee6b0296
NS
7302003-06-14 Nathan Sidwell <nathan@codesourcery.com>
731
732 * decl.c (start_function): Adjust init_function_start call.
733 * method.c (use_thunk): Likewise.
734 * semantics.c (genrtl_start_function): Likewise.
735
d7b42618
NB
7362003-06-14 Neil Booth <neil@daikokuya.co.uk>
737
738 * Make-lang.in: Remove c-options.o.
739
0a8cb79e
NN
7402003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
741
9e7d1164
NN
742 * lex.c: Convert to ISO C.
743
362efdc1
NN
744 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
745 * init.c: removes use of PARAMS macro. Use ISO style function
746 declarations. (Not copyright-significant change.)
747
cec57f72
NN
748 * rtti.c: Remove PARAMS.
749
0a8cb79e
NN
750 * typeck2.c: Convert to ISO C.
751
79b59cc3
MM
7522003-06-12 Mark Mitchell <mark@codesourcery.com>
753
754 PR c++/10635
755 * typeck.c (build_c_cast): Check that the destination type is
756 complete.
757
df7f7b9c
MM
7582003-06-11 Mark Mitchell <mark@codesourcery.com>
759
760 PR c++/10432
761 * cp-tree.h (finish_declarator): Remove.
762 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
763 erroneous declarations.
764 * semantics.c (finish_declarator): Remove.
765
35b4a576
RS
7662003-06-11 Roger Sayle <roger@eyesopen.com>
767
e295f317 768 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
35b4a576
RS
769 global static constructor/destructor if it will be empty, i.e.
770 either doesn't call any ctors/dtors or only calls pure or const
771 ctors/dtors.
772
a5512a2f
MM
7732003-06-11 Mark Mitchell <mark@codesourcery.com>
774
24386c5e
MM
775 * mangle.c (tm_p.h): Include it.
776 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
777
a5512a2f
MM
778 PR c++/11131
779 * tree.c (cp_cannot_inline_fn): Check for "inline" before
780 instantiation.
781
0c16e8d6
JM
7822003-06-10 Jason Merrill <jason@redhat.com>
783
784 PR c++/10968
e9bbabab 785 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
0c16e8d6 786
d192828a
GK
7872003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
788
789 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
790 (start_cleanup_cnt): New.
791
d58b7c2d
MM
7922003-06-10 Mark Mitchell <mark@codesourcery.com>
793
794 PR c++/11131
795 * cp-tree.h (template_for_substitution): Declare.
796 * decl2.c (mark_used): Use it when figuring out whether or not a
797 function is inline.
798 * pt.c (template_for_substitution): Give it external linkage.
799 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
800 possible.
801
94d3ea58
ZW
8022003-06-09 Zack Weinberg <zack@codesourcery.com>
803
804 PR 8861
805 * mangle.c (write_real_cst): New function. Implement
806 ABI-compliant mangling of floating-point literals when
807 -fabi-version>=2; provide backward compatibility with 3.3 when
808 -fabi-version=1 (with warning). Clarify commentary.
809 (write_template_arg_literal): Use write_real_cst.
810
55c6e1a6
AJ
8112003-06-07 Andreas Jaeger <aj@suse.de>
812
813 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
814
2772ef3e
NB
8152003-06-07 Neil Booth <neil@daikokuya.co.uk>
816
817 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
818 (LANG_HOOKS_HANDLE_OPTION): Override.
819 * cp-tree.h (cxx_init_options): Update.
820 * lex.c (cxx_init_options): Update.
821
8f231b5d
JH
822Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
823
824 * Make-lang.in: Add support for stageprofile and stagefeedback
825
88d5a16e
R
8262003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
827
828 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
829
81c0e50a
AJ
8302003-06-04 Andreas Jaeger <aj@suse.de>
831
832 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
833
dbe85b80
JM
8342003-06-03 Jason Merrill <jason@redhat.com>
835
94d3ea58 836 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
dbe85b80 837
94d3ea58 838 * cp/decl.c (reshape_init): Handle vectors.
dbe85b80 839
94d3ea58 840 * testsuite/g++.dg/init/array10.C: New.
dbe85b80 841
6c07f448
KL
8422003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
843
844 PR c++/10940
845 * pt.c (check_explicit_specialization): Check for 'static'
846 earlier.
847
522801e7
DN
8482003-05-31 Diego Novillo <dnovillo@redhat.com>
849
850 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
851 the operand of a CONSTRUCTOR node.
852
82a2669e
GDR
8532003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
854
855 * decl.c (cp_binding_level::this_entity): Rename from this_class.
856 (cxx_scope_descriptor): New function.
857 (cxx_scope_debug): Likewise.
858 (push_binding_level): Use it.
859 (pop_binding_level): Likewise.
860 (suspend_binding_level): Likewise.
861 (resume_binding_level): Likewise.
862 (pushlevel_class): Adjust use of this_class.
863 (pushtag): Likewise.
864 (lookup_name_real): Likewise.
865 (global_scope_name): New variable.
866 (initialize_predefined_identifiers): Initialize it.
867 (push_namespace): Use it.
868 (make_cxx_scope): New function.
869 (pushlevel): Use it.
870 (pushlevel_class): Likewise.
871 (push_binding_level): Simplify. Loose the last two arguments.
872 (make_binding_level): Remove.
873 (initial_push__namespace_scope): New function.
874 (push_namespace): Use it. Simplify.
55c6e1a6 875 (cxx_init_decl_processing): Likewise.
82a2669e
GDR
876 (declare_namespace_level): Remove.
877
76d3baad
KL
8782003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
879
880 PR c++/10956
881 * pt.c (instantiate_decl): Don't use full template arguments if
882 we are dealing with specializations.
883
f37e2274
GDR
8842003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
885
886 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
887 (binding_depth): Unconditionally define.
888 (is_class_level): Likewise.
889 (indent): Likewise. Take an indenting parameter.
55c6e1a6 890 (push_binding_level): Remove conditional definittion.
f37e2274
GDR
891 (pop_binding_level): Likewise.
892 (suspend_binding_level): Likewise.
893 (resume_binding_level): Likewise.
894 (pushlevel): Likewise.
895 (pushlevel_class): Likewise.
896 (poplevel_class): Likewise.
897 (pop_everything): Likewise.
898
5f52c0e0
GDR
8992003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
900
901 * name-lookup.h (global_scope_p): New macro.
902 * decl.c (pop_binding_level): Use it. Don't refer directly to
55c6e1a6 903 global_binding_level.
5f52c0e0
GDR
904 (suspend_binding_level): Likewise.
905 (global_bindings_p): Likewise.
906 (print_other_binding_stack): Likewise.
907 (print_binding_stack): Likewise.
908 (maybe_push_to_top_level): Likewise.
909 (pushdecl_namespace_level): Likewise.
910 (cxx_init_decl_processing): Likewise.
911 (start_decl): Likewise.
912 (cp_finish_decl): Likewise.
913 (start_function): Likewise.
914 (global_binding_level): Remove.
915
b7fc8b57
KL
9162003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
917
918 * parser.c (cp_parser_explicit_instantiation): Restore old
919 access before template instantiation.
920
0de12fcc
GK
9212003-05-23 Geoffrey Keating <geoffk@apple.com>
922
923 * lang-specs.h: Use -o to specify preprocessor's output file.
924 Make -no-integrated-cpp work when building PCH files.
925
43b26a01
KL
9262003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
927
928 PR c++/10682
929 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
930 check for implicitly created typedef to an enum.
931
49b7aacb
JM
9322003-05-21 Jason Merrill <jason@redhat.com>
933
934 * init.c (build_vec_delete): Copy the address into a temporary
935 variable before calling build_vec_delete_1.
936 * decl2.c (delete_sanity): Don't call stabilize_reference.
937
b190f239
NS
9382003-05-21 Nathan Sidwell <nathan@codesourcery.com>
939
940 * pt.c (register_specialization): Update the decl's location,
941 if necessary.
942 (check_explicit_specialization): Likewise.
943
58228df6
KG
9442003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
945
946 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
947
16e31964
DS
9482003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
949
950 PR c++/9738
951 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
952 if the old decl had instantiated DECL_RTL.
953 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
954
a01fff59
MA
9552003-05-19 Matt Austern <austern@apple.com>
956
957 * lang-options.h: Document -Wno-invalid-offsetof
958 * typeck.c (build_class_member_access_expr): Don't complain about
959 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
55c6e1a6 960
7e8f3096
AP
9612003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
962
963 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
964 (binding_entry_make): Make entry->chain NULL after getting an entry.
965 fix the spelling of chain in a comment.
966 (binding_table_free): speed up by having temporary variable.
967 (binding_table_new): set table->chain to be NULL after allocating
55c6e1a6 968 a table.
7e8f3096
AP
969 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
970 binding->previous to NULL after getting an binding for speed.
55c6e1a6 971
5e0c54e5
GDR
9722003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
973
974 * cp-tree.h (struct lang_type_class): Replace data member tags
975 with hash-table nested_udts.
976 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
977 * class.c (unreverse_member_declarations): Don't touch
55c6e1a6 978 CLASSTYPE_TAGS.
5e0c54e5
GDR
979 (pushclass): Use cxx_remember_type_decls.
980 * decl.c (struct cp_binding_level): Replace data member tags with
981 hash-table type_decls.
982 (pop_binding_level): Handle level->type_decls.
983 (kept_level_p): Adjust.
984 (poplevel): Remove unused local variable.
985 (bt_print_entry): New function.
986 (print_binding_level): Use it.
987 (push_namespace): Build current_binding_level->type_decls.
988 (maybe_process_template_type_declaration): Adjust.
989 (pushtag): Likewise.
990 (clear_anon_tags): Use binding_table_remove_anonymous_types.
991 (gettags): Remove.
992 (cxx_remember_type_decls): Rename from storetags. Adjust.
993 (lookup_tag): Use binding_table_find_anon_type. Tidy.
994 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
995 (cxx_init_decl_processing): Build global_binding_level->type_decls.
996 (store_parm_decls): Remove pointless code.
997 * name-lookup.c (free_binding_entry): New variable.
998 (ENTRY_INDEX): New macro.
999 (struct binding_table_s): New datatype.
1000 (binding_entry_make): New function.
1001 (binding_entry_free): Likewise.
1002 (binding_table_construct): Likewise.
1003 (binding_table_free): Likewise.
1004 (binding_table_new): Likewise.
1005 (binding_table_expand): Likewise.
1006 (binding_table_insert): Likewise.
1007 (binding_table_find): Likewise.
1008 (binding_table_find_anon_type): Likewise.
1009 (binding_table_reverse_maybe_remap): Likewise.
1010 (binding_table_remove_anonymous_types): Likewise.
1011 (binding_table_foreach): Likewise.
1012 * name-lookup.h (binding_table): New type.
1013 (binding_entry): Likewise.
1014 (bt_foreach_proc): Likewise.
1015 (struct binding_entry_s): New datatype.
1016 (SCOPE_DEFAULT_HT_SIZE): New macro.
1017 (CLASS_SCOPE_HT_SIZE): Likewise.
1018 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1019 (NAMESPACE_STD_HT_SIZE): Likewise.
1020 (GLOBAL_SCOPE_HT_SIZE): Likewise.
1021 (binding_table_new): Declare.
1022 (binding_table_free): Likewise.
1023 (binding_table_insert): Likewise.
1024 (binding_table_find_anon_type): Likewise.
1025 (binding_table_reverse_maybe_remap): Likewise.
1026 (binding_table_remove_anonymous_types): Likewise.
1027 (binding_table_foreach): Likewise.
1028 (binding_table_find): Likewise.
1029 (cxx_remember_type_decls): Likewise.
1030 * pt.c (bt_instantiate_type_proc): New function.
1031 (do_type_instantiation): Use it.
1032 * search.c (lookup_field_r): Use binding_table_find.
1033
25903d03
KL
10342003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1035
1036 * semantics.c (perform_deferred_access_checks): Don't discard
1037 checked access.
1038
e34d07f2
KG
10392003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1040
1041 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1042 libiberty VA_ macros, always use stdarg.
1043 * rtti.c (create_pseudo_type_info): Likewise.
1044 * tree.c (build_min_nt, build_min): Likewise.
1045
90ff44cf
KG
10462003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1047
1048 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1049 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1050 collapse multiple function calls into one.
55c6e1a6 1051 * tree.c (debug_binfo): Likewise.
90ff44cf 1052
9cefd2ca
JM
10532003-05-15 Jason Merrill <jason@redhat.com>
1054
1055 PR c++/5388
1056 * call.c (conditional_conversion): Don't consider implicit
55c6e1a6 1057 conversions if T2 is a base of T1.
9cefd2ca
JM
1058 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1059 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1060
1061 * parser.c (cp_parser_primary_expression): Convert a static data
1062 member from reference.
1063
dffbbe80
MM
10642003-05-15 Mark Mitchell <mark@codesourcery.com>
1065
8f4b394d
MM
1066 * call.c (build_op_delete_call): Avoid creating unnecessary types.
1067 * class.c (instantiate_type): Remove tests for tf_no_attributes.
1068 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1069 (COMPARE_NO_ATTRIBUTES): Remove.
1070 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1071
dffbbe80
MM
1072 PR c++/8385
1073 * semantics.c (finish_typeof): Refine type-dependency check.
1074
a65cddcf
JM
10752003-05-13 Jason Merrill <jason@redhat.com>
1076
1077 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1078 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1079
afb19ffb
KL
10802003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1081
1082 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1083
9f01ded6
KL
10842003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1085
1086 PR c++/10230, c++/10481
1087 * semantics.c (finish_non_static_data_member): Handle when the
1088 non-static member is not from a base of the current class type.
1089
fcea7401
KL
10902003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1091
1092 PR c++/10552
1093 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1094 template and has dependent context.
1095
7d021397
KL
10962003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1097
1098 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1099
78757caa
KL
11002003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1101
1102 PR c++/9252
1103 * cp-tree.h (saved_scope): Remove check_access field.
1104 (tsubst_flags_t): Remove tf_parsing.
1105 * decl.c (maybe_push_to_top_level): Don't initialize
1106 scope_chain->check_access.
1107 (make_typename_type, make_unbound_class_template): Don't use
1108 tf_parsing.
1109 (register_dtor_fn): Use push/pop_deferring_access_checks
1110 instead of scope_chain->check_access.
1111 * method.c (use_thunk): Likewise.
1112 * parser.c (cp_parser_explicit_instantiation
1113 (cp_parser_constructor_declarator_p): Don't call
1114 push/pop_deferring_access_checks here.
1115 (cp_parser_template_argument, cp_parser_class_name): Don't use
1116 tf_parsing.
1117 (yyparse): Check flag_access_control.
1118 * pt.c (instantiate_class_template): Call
1119 push/pop_deferring_access_checks.
1120 * semantics.c (push_deferring_access_checks): Propagate
1121 dk_no_check.
1122 (perform_or_defer_access_check): Make sure basetype_path is
1123 a type before comparison.
1124 * call.c (build_op_delete_call, build_over_call): Use
1125 perform_or_defer_access_check.
1126 * class.c (alter_access): Likewise.
1127 * init.c (build_offset_ref): Likewise.
1128 * lex.c (do_identifier): Likewise.
1129 * method.c (hack_identifier): Likewise.
1130 * search.c (lookup_member): Likewise.
1131 * semantics.c (finish_non_static_data_member): Likewise.
1132 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1133 instead of flag_access_control.
1134
8d241e0b
KL
11352003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1136
1137 PR c++/9554
1138 * parser.c (cp_parser_class_name): Remove check_access parameter.
1139 All caller adjusted. Update declaration.
1140 (cp_parser_lookup_name): Likewise.
1141 * semantics.c (push_deferring_access_checks): Change parameter type
1142 to enum deferring_kind. All caller adjusted.
1143 (resume_deferring_access_checks): Adjust to use new enum.
1144 (stop_deferring_access_checks): Likewise.
1145 (perform_or_defer_access_check): Likewise.
1146 * cp-tree.h (deferring_kind): New enum.
1147 (deferred_access): Adjust field type.
1148 (push_deferring_access_checks): Update declaration.
1149
88e98cfe
KL
11502003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1151
1152 PR c++/10555, c++/10576
1153 * pt.c (lookup_template_class): Handle class template with
1154 multiple levels of parameters when one of the levels contain
1155 errors.
1156
8b5e2ce4
JM
11572003-05-08 Jason Merrill <jason@redhat.com>
1158
1159 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1160 expression. Undo some of the recent reorg.
1161
a944ceb9
RH
11622003-05-07 Richard Henderson <rth@redhat.com>
1163
9cefd2ca
JM
1164 PR c++/10570
1165 * cfns.gperf: Comment out POSIX thread cancellation points,
1166 plus abort and raise.
1167 * cfns.h: Regenerate.
a944ceb9 1168
a65fd2d7
JM
11692003-05-07 Jason Merrill <jason@redhat.com>
1170
1171 * call.c (build_conditional_expr): Don't assume that the folded
1172 expression has result_type.
1173
d219f3ff
KL
11742003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1175
1176 * typeck.c (build_unary_op): Deal with const qualifier in
1177 invalid pointer-to-member earlier.
1178
5f7262e6
JM
11792003-05-05 Jason Merrill <jason@redhat.com>
1180
1181 PR c++/9537
1182 * call.c (conditional_conversion): Build an RVALUE_CONV if
1183 we're just changing the cv-quals.
1184 (build_conditional_expr): Don't call convert to change
1185 cv-quals.
1186
16692dd5
KL
11872003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1188
1189 PR c++/10496
1190 * typeck.c (build_unary_op): Don't output const qualifier when
1191 output invalid pointer-to-member diagnostics.
1192
7df87825
KL
11932003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1194
1195 * decl.c: Fix typos.
1196
4b41d9eb
KL
11972003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1198
1199 PR c++/4494
1200 * decl.c (start_function): Use same_type_p to check return type
1201 of main.
1202
87f85ea0
ZW
12032003-05-03 Zack Weinberg <zack@codesourcery.com>
1204
1205 PR c/10604
1206 * cp/typeck.c (build_x_compound_expr): No need to check
1207 extra_warnings as well as warn_unused_value.
1208
5dc5d13c
KL
12092003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1210
1211 PR c++/9364, c++/10553, c++/10586
1212 * decl.c (make_typename_type): Don't crash on illegal code.
1213
82a98427
NS
12142003-05-03 Nathan Sidwell <nathan@codesourcery.com>
1215
1216 * class.c (finish_struct): Use location_t and input_location
1217 directly.
1218 * decl.c (make_label_decl): Likewise.
1219 (use_label): Likewise.
1220 * decl2.c (warn_if_unknown_interface): Likewise.
1221 (start_static_initialization_or_destruction): Likewise.
1222 (generate_ctor_or_dtor_function): Likewise.
1223 (finish_file): Likewise.
1224 * error.c (print_instantiation_full_context): Likewise.
1225 * init.c (create_temporary_var): Likewise.
1226 * method.c (synthesize_method): Likewise.
1227 * parser.c (cp_token): Likewise.
1228 (cp_lexer_set_source_position_from_token): Likewise.
1229 (cp_lexer_get_preprocessor_token): Likewise.
1230 (cp_parser_statement): Likewise.
1231 * pt.c (tsubst_friend_function): Likewise.
1232 (instantiate_class_template): Likewise.
1233 (tsubst_decl): Likewise.
1234 (tsubst): Likewise.
1235 (instantiate_decl): Likewise.
1236 * semantics.c (begin_class_definition): Likewise.
1237 (expand_body): Likewise.
1238
3489e061
NS
12392003-05-01 Nathan Sidwell <nathan@codesourcery.com>
1240
1241 * class.c (finish_struct): Rename lineno to input_line.
1242 * decl.c (push_binding_level, pop_binding_level,
1243 suspend_binding_level, resume_binding_level, make_label_decl,
1244 use_label, start_function): Likewise.
1245 * decl2.c (warn_if_unknown_interface,
1246 start_static_initialization_or_destruction,
1247 generate_ctor_or_dtor_function, finish_file): Likewise.
1248 * error.c (cp_line_of, print_instantiation_full_context,
1249 print_instantiation_context): Likewise.
1250 * except.c (check_handlers_1, check_handlers): Likewise.
1251 * init.c (create_temporary_var): Likewise.
1252 * method.c (use_thunk, synthesize_method): Likewise.
1253 * parser.c (cp_lexer_set_source_position_from_token,
1254 cp_lexer_get_preprocessor_token): Likewise.
1255 * pt.c (push_tinst_level, pop_tinst_level,
1256 tsubst_friend_function, instantiate_class_template, tsubst_decl,
1257 tsubst, tsubst_expr, instantiate_decl): Likewise.
1258 * semantics.c (genrtl_try_block, finish_label_stmt,
1259 begin_class_definition, expand_body,
87f85ea0 1260 genrtl_finish_function): Likewise.
3489e061
NS
1261 * tree.c (build_min_nt, build_min): Likewise.
1262
49bf4577
MM
12632003-05-01 Mark Mitchell <mark@codesourcery.com>
1264
1265 * decl2.c (comdat_linkage): Don't externalize explicit
1266 instantiations.
1267
d0af00af
KL
12682003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1269
1270 PR c++/10554
1271 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
1272 is not NULL.
1273
85209a3c
SB
12742003-05-01 Steven Bosscher <steven@gcc.gnu.org>
1275
1276 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
1277 (struct lang_identifier): ... to here.
1278 (LANG_ID_FIELD): Remove.
1279 (SET_LANG_ID): Remove.
1280 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
1281 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
1282 (IDENTIFIER_IMPLICIT_DECL): Likewise.
1283 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
1284 (IDENTIFIER_ERROR_LOCUS): Likewise.
1285 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1286
d12a7283
KL
12872003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1288
1289 PR c++/8772
1290 * pt.c (convert_template_argument): Correct diagnostic.
1291
d7ed5e55
KL
12922003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1293
1294 PR c++/9432, c++/9528
1295 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
1296
152c16a9
GDR
12972003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
1298
1299 * decl.c (check_previous_goto_1): Adjust prototype.
1300 (check_previous_goto): Adjust use.
1301 (check_switch_goto): Likewise.
1302 (use_label): Adjust.
1303 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
1304 (struct named_label_use_list): Use location_t datatype.
1305
1f6f0cb6
MM
13062003-04-29 Mark Mitchell <mark@codesourcery.com>
1307
1308 PR c++/10551
1309 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
1310 that have not yet been written out.
1311
60cde936
MM
13122003-04-29 Mark Mitchell <mark@codesourcery.com>
1313
555456b1
MM
1314 PR c++/10549
1315 * class.c (layout_class_type): Mark overlong bitfields as having
1316 the maximum size permitted by their type, after layout.
1317
60cde936
MM
1318 PR c++/10527
1319 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
1320
8e854b76
KL
13212003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1322
1323 * call.c (build_operator_new_call): Fix typo.
1324 * lang-options.h: Likewise.
1325
0dbc5cd3
MM
13262003-04-29 Mark Mitchell <mark@codesourcery.com>
1327
75135253
MM
1328 PR c++/10515
1329 * cp-tree.h (lookup_field_1): Declare it.
1330 * search.c (lookup_field_1): Make it public.
1331 * decl.c (reshape_init): Handle designated initializers.
1332
0dbc5cd3
MM
1333 * decl.c (maybe_commonize_var): Further tweak support for systems
1334 without weak symbols.
1335
9e6aaf5e
MM
13362003-04-27 Mark Mitchell <mark@codesourcery.com>
1337
1338 * decl.c (maybe_commonize_var): Fix thinko in last patch.
1339
0b50d7f1
MM
13402003-04-27 Mark Mitchell <mark@codesourcery.com>
1341
772f8889
MM
1342 PR c++/10506
1343 * method.c (use_thunk): Decrement immediate_size_expand.
1344
1345 PR c++/10503
1346 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
1347 (DECL_MAYBE_TEMPLATE): Remove.
1348 * class.c (fixed_type_or_null): Avoid infinite recursion.
1349
0b50d7f1
MM
1350 * decl.c (maybe_commonize_var): Make the code match the comments.
1351 * pt.c (instantiate_decl): Move call to import_export_decl.
1352
e2b69423
MM
13532003-04-26 Mark Mitchell <mark@codesourcery.com>
1354
1355 * decl2.c (finish_file): Fix merge botch.
1356
ea56c40c
MM
13572003-04-25 Mark Mitchell <mark@codesourcery.com>
1358
1359 * decl2.c (finish_file): Don't call import_export_decl for
1360 functions that are not defined.
1361 (handle_class_head): Robustify.
1362 * pt.c (instantiate_decl): Do not call cp_finish_decl for
1363 variables that are not defined.
1364
9804b5b8
SP
13652003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
1366
87f85ea0 1367 * call.c (print_z_candidates): Fix off by one error.
9804b5b8 1368
f8986275
NS
13692003-04-24 Nathan Sidwell <nathan@codesourcery.com>
1370
1371 PR c++/10337
1372 * call.c (joust): Don't warn about conversion ops that are exact
1373 or cv-conversions. Rearrange to avoid multiple type comparisons.
1374
374ca7f7
MM
13752003-04-23 Mark Mitchell <mark@codesourcery.com>
1376
1377 PR c++/10471
1378 * call.c (build_cxx_call): Robustify.
1379
6338b358
NB
13802003-04-23 Neil Booth <neil@daikokuya.co.uk>
1381
1382 * Make-lang.in (lex.o): Remove mbchar.h.
1383 * lex.c (MULTIBYTE_CHARS): Lose.
1384 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
1385 in c-lex.c.
1386
4223f82f
MM
13872003-04-23 Mark Mitchell <mark@codesourcery.com>
1388
1389 PR c++/9847
1390 * cp-tree.h (duplicate_tag_error): Remove.
1391 * class.c (duplicate_tag_error): Remove.
1392 * semantics.c (begin_class_definition): Return immediately for a
1393 duplicate class definition.
1394
1395 PR c++/10451
1396 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
1397
6adb9463
MM
13982003-04-22 Mark Mitchell <mark@codesourcery.com>
1399
ae2196c2
MM
1400 PR c++/10446
1401 * search.c (lookup_fnfields_1): Handle empty slots in the method
1402 vector.
87f85ea0 1403
befcd99b
MM
1404 PR c++/10428
1405 * decl.c (check_elaborated_type_specifier): New function, split
1406 out from ...
1407 (xref_tag): ... here. Use the new function in more places.
1408
6adb9463
MM
1409 * rtti.c (throw_bad_typeid): Use build_cxx_call.
1410
b2dd096b
MM
14112003-04-21 Mark Mitchell <mark@codesourcery.com>
1412
1413 * call.c (build_over_call): Use build_cxx_call.
1414 (build_cxx_call): New method, split out of build_over_call.
1415 * cp-tree.h (language_function): Add can_throw.
1416 (build_cxx_call): Declare it.
1417 * decl.c (finish_function): If a function does not contain any
1418 calls to functions that can throw an exception, indicate that
1419 fact.
1420 * decl2.c (mark_used): Do not defer the instantiation of
1421 functions, if the current function does not throw.
1422 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
1423 * pt.c (instantiate_decl): Make sure import_export_decl is called
1424 before emitting things.
1425 * rtti.c (throw_bad_cast): Use build_cxx_call.
1426 (build_dynamic_cast_1): Likewise.
1427 * typeck.c (build_function_call): Likewise.
1428
8de9bb0e
NS
14292003-04-21 Nathan Sidwell <nathan@codesourcery.com>
1430
1431 PR c++/9881
1432 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
1433 expressions. Reverts my 2002-08-08 patch.
87f85ea0 1434
8de9bb0e
NS
1435 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
1436 cheaper early exit.
1437
299f79b5
NS
14382003-04-20 Nathan Sidwell <nathan@codesourcery.com>
1439
1440 * cp/decl2.c (start_static_storage_duration_function): Take count
1441 arg, don't check if it wraps round.
1442 (generate_ctor_or_dtor_function): Add locus arg, use it.
1443 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
1444 locus.
1445 (finish_file): Set line numbers to past EOF for synthesized
1446 functions.
1447
14482003-04-20 Nathan Sidwell <nathan@codesourcery.com>
de0c0e69
NS
1449
1450 PR c++/10405
1451 * search.c (lookup_field_1): Final scan goes backwards for
1452 types, forwards for non-types.
1453
220a35cc
RS
14542003-04-17 Roger Sayle <roger@eyesopen.com>
1455
1456 PR c/10375
1457 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
1458 "nothrow" function attributes.
1459
09d2f85f
KL
14602003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1461
1462 PR c++/10347
1463 * pt.c (type_dependent_expression_p): Handle array new.
1464
5eb10628
MM
14652003-04-15 Mark Mitchell <mark@codesourcery.com>
1466
1467 PR c++/10381
1468 * parser.c (cp_parser_primary_expression): Reorganize logic for
1469 dealing with name lookup failures.
1470
ac5f3b67
JM
14712003-04-15 Jason Merrill <jason@redhat.com>
1472
1473 * decl2.c (mark_used): Don't instantiate anything if
1474 skip_evaluation.
1475
e6237031
ZL
14762003-04-14 Ziemowit Laski <zlaski@apple.com>
1477
1478 * tree.c (build_cplus_array_type_1): Do not call
1479 uses_template_parms() on a NULL index_type.
1480
1331d16f
RS
14812003-04-13 Roger Sayle <roger@eyesopen.com>
1482
1483 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
1484
f4f4610e
MM
14852003-04-12 Mark Mitchell <mark@codesourcery.com>
1486
1487 PR c++/10300
1488 * init.c (build_new_1): Reorganize.
1489
dcf92453
ZW
14902003-04-12 Zack Weinberg <zack@codesourcery.com>
1491
1492 * class.c (initialize_array)
1493 * decl.c (reshape_init)
1494 * decl2.c (build_expr_from_tree)
1495 * init.c (build_zero_init)
1496 * pt.c (tsubst_copy, tsubst_copy_and_build)
1497 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
1498 (ptm_initializer, class_initializer, get_pseudo_ti_init)
1499 * semantics.c (finish_compound_literal)
1500 * typeck.c (build_ptrmemfunc1)
1501 * typeck2.c (store_init_value, process_init_constructor)
1502 (build_functional_cast): Use build_constructor.
1503
2bd02043
ZW
15042003-04-12 Zack Weinberg <zack@codesourcery.com>
1505
1506 * call.c (print_z_candidates): Use gcc_gettext_width, not
1507 strlen, to determine how much padding to use.
1508
339a28b9
ZW
15092003-04-10 Zack Weinberg <zack@codesourcery.com>
1510
1511 * decl.c: Update all calls to shadow_warning.
1512
1e099144
MM
15132003-04-10 Mark Mitchell <mark@codesourcery.com>
1514
1515 * class.c (layout_class_type): Correct handling for overlong
1516 bit-fields whose width is the same as an integer type.
1517
d78e771d
ZW
15182003-04-06 Zack Weinberg <zack@codesourcery.com>
1519
1520 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
1521 * cp-lang.c (cp_tree_size): New function.
1522 (LANG_HOOKS_TREE_SIZE): Override.
1523
1524 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
1525 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
1526 (union lang_tree_node): Remove common and srcloc members.
1527 (build_srcloc_here): Don't prototype.
1528 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
1529 * pt.c (pending_templates): Correct comment.
1530 * tree.c (build_srcloc, build_srcloc_here): Kill.
1531
d2a6f3c0
ZW
15322003-04-06 Zack Weinberg <zack@codesourcery.com>
1533
1534 * call.c: Include intl.h.
1535 (print_z_candidate): Always use inform; get rid of errfn
1536 argument. Reorganize so that all the strings get picked up
1537 by xgettext. Note obligation of caller to pass first argument
1538 through gettext.
1539 (print_z_candidates): Update to match. Indent second and
1540 successive candidates by strlen() of translated message.
1541 (joust): Restructure ambiguous-conversion pedwarn so that
1542 translators see a complete sentence. Update calls to
1543 print_z_candidate.
1544
1545 * Make-lang.in (cp/call.o): Update dependencies.
1546
ff955512
KG
15472003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1548
1549 * decl.c (set_current_binding_level): Delete, revert last change.
1550 (current_binding_level): Modify to allow it as as lvalue.
1551
da247ccc
KG
15522003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1553
1554 * name-lookup.c (find_binding): Pass appropriate pointer type to
1555 POP_TIMEVAR_AND_RETURN.
1556
d893ff33
KG
15572003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1558
1559 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
1560 * cp-tree.h: Don't insist on having GNUC.
1561
78d55cc8
JM
15622003-04-03 Jason Merrill <jason@redhat.com>
1563
55a2af0c
JM
1564 * cvt.c (ocp_convert): Only abort if we try to convert an object
1565 of TREE_ADDRESSABLE type.
1566
78d55cc8
JM
1567 * class.c (build_vtable): Set DECL_ALIGN here.
1568 (get_vtable_decl): Not here.
1569 (layout_vtable_decl): Or here.
1570 (create_vtable_ptr): Or here.
1571 (layout_class_type): Or here.
1572 (check_bitfield_decl): Don't mess with field alignment.
1573
de94b46c
KG
15742003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1575
1576 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
1577 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
1578 * rtti.c (dfs_class_hint_mark): Likewise.
1579
1580 * decl.c (push_local_name, push_class_level_binding,
1581 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
1582 functions returning void.
1583 * decl2.c (add_using_namespace): Likewise.
1584
1585 * decl.c (print_binding_level, print_other_binding_stack,
1586 print_binding_stack): Cast argument of %p specifier to void*.
1587 * ptree.c (cxx_print_decl): Likewise.
1588
1589 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1590 VAR_FUNCTION_OR_PARM_DECL_CHECK,
1591 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1592 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
1593 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
1594
1595 * decl.c (set_current_binding_level): New macro. Use throughout
1596 when setting the current binding level.
1597
1598 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
1599 in enum.
1600 * method.c (mangling_flags): Likewise.
1601
1602 * cp-tree.h (lang_type_header): Add __extension__ and use
1603 CHAR_BITFIELD for members.
1604
0de298af
GK
16052003-04-02 Geoffrey Keating <geoffk@apple.com>
1606
1607 PR other/9274
1608 * mangle.c: Include gt-cp-mangle.h.
1609 (subst_identifiers): Mark with GTY.
1610 * config-lang.in (gtfiles): Add cp/mangle.c.
1611 * Make-lang.in: (gt-cp-mangle.h): New rule.
1612 (cp/mangle.o): Depends on gt-cp-mangle.h.
1613
28ea4c88
AP
16142003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
1615
0de298af 1616 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
28ea4c88
AP
1617 after \$(srcdir)/cp/name-lookup.h.
1618 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
1619 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
0de298af
GK
1620 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
1621 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
d2a6f3c0 1622
adff28c3
JM
16232003-03-31 Jason Merrill <jason@redhat.com>
1624
1625 PR java/10145
1626 * class.c (check_field_decl): Don't set DECL_ALIGN.
1627
c717c5af
MM
16282003-03-30 Mark Mitchell <mark@codesourcery.com>
1629
1630 PR c++/7647
1631 * decl.c (grokdeclarator): Tidy, slightly.
1632 * search.c (lookup_field_1): Add want_type parameter.
1633 (lookup_field_r): Adjust call to lookup_field_1.
1634
7c71dc2b
GDR
16352003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1636
1637 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
1638
ed3cf953
GDR
16392003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1640
1641 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
d2a6f3c0 1642 prototype.
ed3cf953
GDR
1643 (cxx_scope_find_binding_for_name): Likewise.
1644 * decl.c (find_binding: Move to name-lookup.c.
1645 (binding_for_name): Likewise.
1646 (cxx_scope_find_binding_for_name): Likewise.
1647 (BINDING_LEVEL): Remove.
1648 (push_binding): Tidy.
1649 (push_class_binding): Likewise.
1650 (pop_binding): Likewise.
1651 (poplevel): Likewise.
1652 (poplevel_class): Likewise.
1653 (set_identifier_type_value_with_scope): Likewise.
1654 (push_overloaded_decl): Likewise.
1655 (lookup_tag): Likewise.
1656 (unqualified_namespace_lookup): Likewise.
1657 (lookup_name_current_level): Likewise.
1658 (maybe_inject_for_scope_var): Likewise.
1659 (namespace_binding): Move to name-lookup.c.
1660 (set_namespace_binding): Likewise.
1661 * decl2.c (lookup_using_namespace): Tidy.
1662 (qualified_lookup_using_namespace): Likewise.
1663 (do_toplevel_using_decl): Likewise.
1664 * name-lookup.c: Include "timevar.h"
1665 * name-lookup.h (cxx_scope): Declare.
1666 (struct cxx_binding): Lose member "has_level". Adjust "scope"
1667 member declaration.
1668 (BINDING_SCOPE): Adjust definition.
1669 (BINDING_HAS_LEVEL_P): Remove.
1670
aed81407
GDR
16712003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1672
1673 * name-lookup.c: New file.
1674 * name-lookup.h: Likewise..
1675 * decl.c (push_binding): Adjust use cxx_binding_make.
1676 (free_bindings): Move to name-lookup.c
1677 (pop_binding): Use cxx_binding_free.
1678 (binding_for_name): Tidy.
1679 * cp-tree.h: Include "name-lookup.h"
1680 (cxx_binding_make): Move to name-lookup.h
1681 (cxx_binding_clear): Likewise.
1682 (struct cxx_binding): Likewise.
1683 (LOCAL_BINDING_P): Likewise.
1684 (INHERITED_VALUE_BINDING_P): Likewise.
1685 (BINDING_SCOPE): Likewise.
1686 (BINDING_HAS_LEVEL_P): Likewise.
1687 (BINDING_VALUE): Likewise.
1688 (BINDING_TYPE): Likewise.
1689 * config-lang.in (gtfiles): Add cp/name-lookup.h
1690 * Make-lang.in (cp/name-lookup.o): New rule.
1691 (CXX_OBJS): Add cp/name-lookup.o
1692 (CXX_TREE_H): Add cp/name-lookup.h
1693
f7b9026e
JM
16942003-03-28 Jason Merrill <jason@redhat.com>
1695
1696 PR c++/10245
1697 * cvt.c (force_rvalue): New fn.
1698 * call.c (build_conditional_expr): Use it.
1699 * cp-tree.h: Declare it.
1700
2d30fe53
MS
17012003-03-28 Mike Stump <mrs@apple.com>
1702
1703 * error.c (dump_expr): Add 0x to printed hex numbers to make
1704 output match source code better.
1705
400fbc08
MM
17062003-03-28 Mark Mitchell <mark@codesourcery.com>
1707
316a2456
MM
1708 PR c++/10218
1709 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
1710 definitions.
1711
400fbc08
MM
1712 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
1713 non-existant ssdf_decls array.
1714 (finish_file): Call generator_ctor_or_dtor_function when there are
1715 static constructors or destructors and no other static
1716 initializations.
1717
433cd9c9
NS
17182003-03-28 Nathan Sidwell <nathan@codesourcery.com>
1719
1720 PR c++/10047
1721 * decl2.c (finish_file): Don't warn about explicitly instantiated
1722 inline decls.
1723
544aef8c
NS
17242003-03-27 Nathan Sidwell <nathan@codesourcery.com>
1725
1726 PR c++/10224
1727 * pt.c (lookup_template_class): Only check instantiated args if
1728 they do not contain template parameters.
1729
649fc72d
NS
17302003-03-27 Nathan Sidwell <nathan@codesourcery.com>
1731
1732 PR c++/10158
1733 * parser.c (cp_parser_function_definition): Set
1734 DECL_INITIALIZED_IN_CLASS for members.
1735 * pt.c (instantiate_decl): Only reduce the template args for
1736 friends that are not defined in class.
1737
d8c8524d
JM
17382003-03-25 Jason Merrill <jason@redhat.com>
1739
1740 * call.c (print_z_candidate): Change name of first arg to msgid.
1741 (joust): Add comment for translators.
1742
1c82cc90 17432003-03-24 Nathan Sidwell <nathan@codesourcery.com>
d2a6f3c0 1744
1c82cc90 1745 PR c++/9898, PR c++/383, DR 322
649fc72d 1746 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1c82cc90
NS
1747 through reference types on both PARM and ARG.
1748
a5fcc895
NS
17492003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1750
1751 PR c++/10119
649fc72d 1752 * error.c (dump_expr) <BASELINK>: Use dump_expr.
a5fcc895 1753 * pt.c (maybe_fold_nontype_args): New function.
649fc72d
NS
1754 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
1755 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
1756 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
a5fcc895
NS
1757 maybe_fold_nontype_args.
1758
2ef6c975
NS
17592003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1760
1761 PR c++/10026
649fc72d 1762 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2ef6c975 1763
f29a2bd1
MM
17642003-03-23 Mark Mitchell <mark@codesourcery.com>
1765
1766 PR c++/7086
2ef6c975
NS
1767 * typeck.c (cxx_mark_addressable): Adjust call to
1768 gen_mem_addressof or put_var_into_stack.
f29a2bd1 1769
3e4a3562
NS
17702003-03-22 Nathan Sidwell <nathan@codesourcery.com>
1771
1772 PR c++/9978, c++/9708
1773 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
1774 * call.c (add_template_candidate_real): Adjust
1775 instantiate_template call.
1776 * class.c (resolve_address_of_overloaded_function): Likewise.
1777 * decl.c (build_enumerator): Set TREE_CONSTANT.
1778 * pt.c (check_instantiated_args): New.
1779 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
1780 TREE_READONLY.
1781 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
1782 (reduce_template_parm_level): Likewise.
1783 (process_template_parm): Likewise.
1784 (check_explicit_specialization): Adjust instantiate_template call.
1785 (convert_template_argument): Don't check non-type argument here.
1786 (lookup_template_class): Check them here.
1787 (tsubst_friend_function): Adjust instantiate_template call.
1788 (instantiate_template): Add tsubst_flags parameter, use it. Check
1789 instantiated args.
1790
d9b2742a
ZW
17912003-03-21 Zack Weinberg <zack@codesourcery.com>
1792
1793 * decl.c: Update calls to shadow_warning.
1794
f3146d75
NS
17952003-03-21 Nathan Sidwell <nathan@codesourcery.com>
1796
1797 PR c++/9898
1798 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
1799 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
1800
963142fc
MM
18012003-03-20 Mark Mitchell <mark@codesourcery.com>
1802
1803 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
1804 friends.
1805 * cp/pt.c (instantiate_class_template): Fix formatting.
1806
a260bce6
MA
18072003-03-14 Matt Austern <austern@apple.com>
1808
1809 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
1810 (unemitted_tinfo_decl_p): Remove.
1811 (emit_tinfo_decl): Change declaration to remove unused parameter.
1812 * decl2.c (finish_file): Change tinfo emission to loop through
1813 unemitted_tinfo_decls array instead of looping through all decls.
1814 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
1815 unused second parameter.
1816 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
1817 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
1818 (emit_tinfo_decl): remove unused second parameter, add assertion
d9b2742a
ZW
1819 that decl hasn't already been emitted.
1820
2bd3ecad
NN
18212003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
1822
1823 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
1824 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
1825 return statements.
1826
b9747e59
JM
18272003-03-19 Jason Merrill <jason@redhat.com>
1828
1829 PR c++/8316, c++/9315, c++/10136
1830 * call.c (print_z_candidate): Split out from...
1831 (print_z_candidiates): ...here.
1832 (joust): Use it.
1833
10326855
RS
18342003-03-17 Roger Sayle <roger@eyesopen.com>
1835
b9747e59 1836 PR c++/10031
10326855
RS
1837 * decl.c (duplicate_decls): Use the new type when prototyping
1838 anticipated decls, even when the types match. This defines the
1839 exception list for the built-in function.
1840
bdaa131b
JM
18412003-03-17 Jason Merrill <jason@redhat.com>
1842
1843 PR c++/10091
d9b2742a 1844 * typeck.c (build_class_member_access_expr): Compare
bdaa131b
JM
1845 TYPE_MAIN_VARIANTs.
1846
ec20aa6c
MM
18472003-03-17 Mark Mitchell <mark@codesourcery.com>
1848
1849 PR c++/9639
1850 * parser.c (cp_parser_declarator_id): Clear parser->scope.
1851
35e939ae
JM
18522003-03-16 Jason Merrill <jason@redhat.com>
1853
1854 PR c++/9993
1855 * decl.c (finish_function): Only allow the NRVO to use variables
1856 declared at function scope.
1857
40a4184c
AJ
18582003-03-17 Andreas Jaeger <aj@suse.de>
1859
1860 * Make-lang.in (cp/TAGS): Remove.
1861
1f5a253a
NS
18622003-03-16 Nathan Sidwell <nathan@codesourcery.com>
1863
1864 PR c++/9629
1865 * cp-tree.h (struct language_function): Add in_base_initializer.
1866 (in_base_initializer): define it.
1867 (expand_member_init): Remove INIT param.
1868 * init.c (expand_member_init): Remove INIT param, return the member.
1869 (emit_mem_initializers): Set in_base_initializer.
1870 * class.c (build_base_path): Check in_base_initializer.
1871 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1872 * pt.c (tsubst_initializer_list): Likewise.
1873
4f907b59
GDR
18742003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1875
1876 * decl.c (binding_for_name): Fix initialization thinko.
1877
ac2768ff 18782003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
40a4184c 1879
af6fd53f
GDR
1880 Compile-time improvement: 2/n.
1881 * cp-tree.h (struct cxx_binding): New datatype;
1882 (struct lang_identifier): Use it.
1883 (LOCAL_BINDING_P): Adjust definition.
1884 (INHERITED_VALUE_BINDING_P): Likewise.
1885 (BINDING_SCOPE): Likewise.
1886 (BINDING_HAS_LEVEL_P): Likewise.
1887 (BINDING_VALUE): Likewise.
1888 (BINDING_TYPE): Likewise.
1889 (IDENTIFIER_VALUE): Likewise.
1890 (struct tree_binding): Remove.
1891 (TS_CP_BINDING): Likewise.
1892 ((union lang_tree_node): Remove field "binding".
1893 (cxx_binding_clear): New macro.
1894 (binding_for_name): Adjust return type.
1895 (qualified_lookup_using_namespace): Adjust prototype.
1896 (lookup_using_namespace): Adjust prototype.
1897 (cxx_scope_find_binding_for_name): Declare.
1898 * cp-tree.def: Remove CPLUS_BINDING definition.
1899 * decl.c (push_binding): Adjust local variable type.
1900 (add_binding): Likewise.
1901 (push_class_binding): Likewise.
1902 (pop_binding): Likewise.
1903 (poplevel): Likewise.
1904 (poplevel_class): Likewise.
1905 (free_bindings): Adjust type.
1906 (find_binding): Adjust return type, add a third parameter. Remove
40a4184c 1907 non-useful assertion now that we use static typing.
af6fd53f 1908 (cxx_scope_find_binding_for_name): New function.
40a4184c 1909 (binding_for_name): Use it. Adjust local variable type. Simplify.
af6fd53f
GDR
1910 (namespace_binding): Simplify.
1911 (set_namespace_binding): Likewise.
1912 (set_identifier_type_value_with_scope): Adjust local variable type.
1913 (lookup_tag): Don't type-abuse of local variable 'old'.
1914 (lookup_namespace_name): Likewise. Allocate binding on stack.
1915 (select_decl): Adjust prototype.
1916 (unqualified_namespace_lookup): Allocate binding on stack.
1917 Don't type-abuse of local variable 'val'.
1918 (lookup_name_real): Likewise.
1919 (maybe_inject_for_scope_var): Adjust local variable type.
1920 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1921 (namespace_binding): Adjust logic, simplify.
1922 (BINDING_LEVEL): Adjust definition.
1923 (push_class_level_binding): Adjust local variable type.
1924 (struct cxx_saved_binding): Adjust field 'binding' type.
1925 * decl2.c (ambiguous_decl): Adjust prototype.
1926 (lookup_using_namespace): Adjust local variable type.
1927 (qualified_lookup_using_namespace): Catch type error and correct
1928 ensueing logic error.
1929 (do_nonmember_using_decl): Adjust local variable type. Allocate
1930 temporary cxx_binding on stack.
1931 (do_toplevel_using_decl): Adjust local variable type.
1932 * ptree.c (cxx_print_cxx_binding): New function.
1933 (cxx_print_identifier): Use it.
1934 (cxx_print_xnode): Delete CPLUS_BINDING case label.
1935
6a87d634
RS
19362003-03-15 Roger Sayle <roger@eyesopen.com>
1937
1938 * tree.c (count_functions): Fix whitespace.
1939
c1bad961
NB
19402003-03-15 Neil Booth <neil@daikokuya.co.uk>
1941
1942 * Make-lang.in: Update.
1943
6e049fcd
KL
19442003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1945
1946 PR c++/6440
1947 * pt.c (maybe_process_partial_specialization): Handle
1948 member class template when enclosing class template is
1949 explicit specialized.
1950 (most_general_template): Stop looking when DECL is already
1951 specialized.
1952
0171b21c
JM
19532003-03-13 Jason Merrill <jason@redhat.com>
1954
1955 PR c++/9420
1956 * search.c (lookup_conversions): Call complete_type here.
1957 * call.c (implicit_conversion): Not here.
1958
26f86471
MM
19592003-03-13 Mark Mitchell <mark@codesourcery.com>
1960
45707d31
MM
1961 * decl2.c (do_nonmember_using_decl): Correct handling of
1962 simultaneous type/non-type bindings.
1963
26f86471
MM
1964 * call.c (initialize_reference): Remove bogus assertion.
1965 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1966
847311f4
AL
19672003-03-12 Andrew Lewycky <andrew@mxc.ca>
1968
1969 PR c++/7050
1970 * expr.c (cxx_expand_expr): Return const0_rtx for throw
1971 expressions.
1972
2601a4ee
MM
19732003-03-11 Mark Mitchell <mark@codesourcery.com>
1974
e1145e7f 1975 PR c++/9474
2601a4ee
MM
1976 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1977 to merge old and new declarations.
1978
2bfe542b
AO
19792003-03-12 Alexandre Oliva <aoliva@redhat.com>
1980
1981 * g++.1: Remove.
1982 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1983 (cp/g++.1): Build it from scratch in the build tree.
1984 (c++.install-man): Depend on it. Install it from the build tree.
1985 (c++.mostlyclean): Clean it.
1986
0c33daff
MM
19872003-03-11 Mark Mitchell <mark@codesourcery.com>
1988
3033f0ed 1989 PR c++/9474
2601a4ee
MM
1990 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1991 to merge old and new declarations.
1992
0c33daff
MM
1993 PR c++/9924
1994 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1995
cf237c19
JM
19962003-03-11 Jason Merrill <jason@redhat.com>
1997
1998 PR c++/9820
40a4184c 1999 * search.c (lookup_member): Fix handling of functions in a class
cf237c19
JM
2000 being defined.
2001
436f8a4c
MM
20022003-03-11 Mark Mitchell <mark@codesourcery.com>
2003
2004 PR c++/8700
2005 * call.c (convert_class_to_reference): Adjust usage of
2006 splice_viable.
2007 (any_viable): Remove.
2008 (splice_viable): Combine with any_viable.
2009 (print_z_candidates): Avoid printing duplicates.
2010 (build_user_type_conversion_1): Adjust usage of splice_viable.
2011 (build_new_function_call): Likewise.
2012 (build_operator_new_call): Likewise.
2013 (build_object_call): Likewise.
2014 (build_conditional_expr): Likewise.
2015 (build_new_op): Likewise.
2016 (build_new_method_call): Likewise.
2017 (joust): Remove spurious comment.
2018 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2019 * decl2.c (arg_assoc_class): Simplify.
2020 * friend.c (add_friend): Likewise.
2021
5b8e011c
JM
20222003-03-11 Jason Merrill <jason@redhat.com>
2023
2024 PR c++/8660
40a4184c 2025 * decl2.c (check_classfn): A member template only matches a
5b8e011c
JM
2026 member template.
2027
cb60f38d
NB
20282003-03-11 Neil Booth <neil@daikokuya.co.uk>
2029
2030 * Make-lang.in (CXX_C_OBJS): Update.
2031 * lang-specs.h: Don't define __GNUG__ here.
2032
125e6594
MM
20332003-03-10 Mark Mitchell <mark@codesourcery.com>
2034
2035 * call.c (perform_overload_resolution): New function.
2036 (build_new_function_call): Use it.
2037 (build_operator_new_call): Likewise.
2038 (add_candidates): Add explicit_targs and template_only parameters.
2039 (build_new_op): Adjust accordingly.
2040 * cp-tree.h (build_operator_new_call): New function.
2041 (build_function_call_real): Remove.
2042 (build_function_call_maybe): Likewise.
2043 * init.c (build_new_1): Use build_operator_new_call.
2044 * typeck.c (build_function_call_real): Rename to ...
2045 (build_function_call): ... this.
2046
87d7d780 20472003-03-10 Devang Patel <dpatel@apple.com>
40a4184c 2048
87d7d780
DP
2049 PR c++/9394
2050 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
125e6594 2051
6e9554e1
JM
20522003-03-10 Jason Merrill <jason@redhat.com>
2053
70f0e288
JM
2054 PR c++/9798
2055 * decl.c (push_using_directive): Push before recursing.
2056
2057 PR c++/9868, c++/9524
6e9554e1
JM
2058 * call.c (resolve_scoped_fn_name): Handle the case of a function
2059 pointer member.
2060
2061 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2062 argument in the pointer-to-member case.
2063
f6d19bfe
MM
20642003-03-09 Mark Mitchell <mark@codesourcery.com>
2065
1d719415
MM
2066 PR c++/9373
2067 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2068 pointers to member functions.
2069
f6d19bfe
MM
2070 PR c++/8534
2071 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2072 in pointer-to-member-function types.
2073
d9b4e85e
GDR
20742003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2075
2076 * expr.c (cplus_expand_constant): Use C90 prototype style.
2077 (cxx_expand_expr): Likewise.
2078
ca9e1382
KL
20792003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2080
2081 PR c++/9970
2082 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2083 functions.
2084
00a221f0
GK
20852003-03-08 Geoffrey Keating <geoffk@apple.com>
2086
2087 * lang-specs.h (c++-header): Change .pch to .gch.
2088
4bfec483
NB
20892003-03-08 Neil Booth <neil@daikokuya.co.uk>
2090
2091 * cp-tree.h (cxx_init): Update prototype.
2092 * lex.c (cxx_init): Similarly.
2093
089d6ea7
MM
20942003-03-08 Mark Mitchell <mark@codesourcery.com>
2095
0e136342
MM
2096 PR c++/9823
2097 * cp-tree.h (begin_mem_initializers): Remove.
2098 * parser.c (cp_parser_mem_initializer_list): Inline it here.
2099 Do not call finish_mem_initializers if not in a constructor.
2100 (cp_parser_class_head): Fix typo in error message.
2101 * semantics.c (begin_mem_initializers): Remove.
2102 * testsuite/g++.dg/parser/constructor1.C: New test.
2103
089d6ea7
MM
2104 PR c++/9809
2105 * call.c (add_function_candidate): Skip builtin fuctions that have
2106 not yet been declared.
2107
2108 PR c++/9982
2109 * init.c (build_new_1): Correct logic for determining whether or
2110 not to use an array cookie.
2111
2112 PR c++/9524
2113 * parser.c (cp_parser_postfix_expression): Call
2114 finish_non_static_data_member, even when processing_template_decl.
2115
2116 PR c++/9912
2117 * cp-tree.h (is_ancestor): New function.
2118 (handle_class_head): Change prototype.
2119 * decl2.c (is_namespace_ancestor): Rename to ...
2120 (namespace_anecestor): ... this.
2121 (set_decl_namespace): Adjust accordingly.
2122 (handle_class_head): Remove unncessary parameters.
2123 * parser.c (cp_parser_class_head): Check that
2124 nested-name-specifiers are used appropriately.
40a4184c 2125
aa6e8ed3
MM
21262003-03-07 Mark Mitchell <mark@codesourcery.com>
2127
2128 * call.c (reference_binding): Remove REF_IS_VAR parameter.
2129 (implicit_conversion): Adjust call to reference_binding.
2130 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2131 (initialize_reference): Adjust handling for references bound to
2132 rvalues.
2133 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2134 prototype.
2135 (real_non_cast_lvalue_p): New method.
2136 * cvt.c (build_up_reference): Adjust use of
2137 make_temporary_var_for_ref_to_temp.
89d11511 2138 * tree.c (real_non_cast_lvalue_p): New method.
40a4184c 2139
5cc3d3b8
GDR
21402003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2141
2142 * except.c (init_exception_processing): Use C90 prototype style.
2143 (cp_protect_cleanup_actions): Likewise.
2144 (prepare_eh_type): Likewise.
2145 (build_eh_type_type): Likewise.
2146 (build_exc_ptr): Likewise.
2147 (do_begin_catch): Likewise.
2148 (dtor_nothrow): Likewise.
2149 (do_end_catch): Likewise.
2150 (push_eh_cleanup): Likewise.
2151 (decl_is_java_type): Likewise.
2152 (choose_personality_routine): Likewise.
2153 (initialize_handler_parm): Likewise.
2154 (expand_start_catch_block): Likewise.
2155 (expand_end_catch_block): Likewise.
2156 (begin_eh_spec_block): Likewise.
2157 (finish_eh_spec_block): Likewise.
2158 (do_allocate_exception): Likewise.
2159 (do_free_exception): Likewise.
2160 (wrap_cleanups_r): Likewise.
2161 (stabilize_throw_expr): Likewise.
2162 (build_throw): Likewise.
2163 (complete_ptr_ref_or_void_ptr_p): Likewise.
2164 (is_admissible_throw_operand): Likewise.
2165 (nothrow_libfn_p): Likewise.
2166 (can_convert_eh): Likewise.
2167 (check_handlers_1): Likewise.
2168 (check_handlers): Likewise.
40a4184c 2169
3d938426
MM
21702003-03-06 Mark Mitchell <mark@codesourcery.com>
2171
2172 * call.c (merge_conversion_sequences): New function.
2173 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2174 (convert_class_to_reference): Correct handling of second
2175 standard conversion sequence in a user-defined conversion
2176 sequence.
2177 (build_user_type_conversion_1): Use merge_conversion_sequences.
2178 * cp-tree.def: Add comments for CONV nodes.
9534f4bc 2179 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
40a4184c 2180
3f8548e7
GDR
21812003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2182
2183 * error.c (init_error): Use C90 prototype style.
2184 (dump_scope): Likewise.
2185 (dump_qualifiers): Likewise.
2186 (dump_template_argument): Likewise.
2187 (dump_template_argument_list): Likewise.
2188 (dump_template_parameter): Likewise.
2189 (dump_template_bindings): Likewise.
2190 (dump_type): Likewise.
2191 (dump_typename): Likewise.
2192 (class_key_or_enum): Likewise.
2193 (dump_aggr_type): Likewise.
2194 (dump_type_prefix): Likewise.
2195 (dump_type_suffix): Likewise.
2196 (dump_global_iord): Likewise.
2197 (dump_simple_decl): Likewise.
2198 (dump_decl): Likewise.
2199 (dump_template_decl): Likewise.
2200 (dump_function_decl): Likewise.
2201 (dump_parameters): Likewise.
2202 (dump_exception_spec): Likewise.
2203 (dump_function_name): Likewise.
2204 (dump_template_parms): Likewise.
2205 (dump_char): Likewise.
2206 (dump_expr_list): Likewise.
2207 (dump_expr): Likewise.
2208 (dump_binary_op): Likewise.
2209 (dump_unary_op): Likewise.
2210 (type_as_string): Likewise.
2211 (expr_as_string): Likewise.
2212 (decl_as_string): Likewise.
2213 (context_as_string): Likewise.
2214 (lang_decl_name): Likewise.
2215 (cp_file_of): Likewise.
2216 (cp_line_of): Likewise.
2217 (decl_to_string): Likewise.
2218 (expr_to_string): Likewise.
2219 (fndecl_to_string): Likewise.
2220 (code_to_string): Likewise.
2221 (language_to_string): Likewise.
2222 (parm_to_string): Likewise.
2223 (op_to_string): Likewise.
2224 (type_to_string): Likewise.
2225 (assop_to_string): Likewise.
2226 (args_to_string): Likewise.
2227 (cv_to_string): Likewise.
2228 (cxx_print_error_function): Likewise.
2229 (cp_diagnostic_starter): Likewise.
2230 (cp_diagnostic_finalizer): Likewise.
2231 (cp_print_error_function): Likewise.
2232 (function_category): Likewise.
2233 (print_instantiation_full_context): Likewise.
2234 (print_instantiation_partial_context): Likewise.
2235 (maybe_print_instantiation_context): Likewise.
2236 (print_instantiation_context): Likewise.
2237 (cp_printer): Likewise.
2238 (print_integer): Likewise.
2239 (print_non_consecutive_character): Likewise.
2240 (locate_error): Likewise.
2241
3d1df1fa
MM
22422003-03-06 Mark Mitchell <mark@codesourcery.com>
2243
5e256996
MM
2244 PR c++/9965
2245 * call.c (reference_binding): Add ref_is_var parameter.
2246 (implicit_conversion): Adjust call to reference_binding.
2247 (initialize_reference): Likewise.
2248
07681121
MM
2249 PR c++/9400
2250 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2251 PARM_DECLs.
2252
3d1df1fa
MM
2253 PR c++/9791
2254 * class.c (get_basefndecls): Use lookup_fnfields_1.
2255
8a6393df
KL
22562003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2257
2258 PR c++/9188
2259 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2260 in error message.
2261 (cp_parser_single_declaration): Likewise.
2262
c965b169
JM
22632003-03-05 Jason Merrill <jason@redhat.com>
2264
2265 PR c++/9440
2266 * call.c (build_conditional_expr): Use convert rather than an
2267 explicit NOP_EXPR.
2268
1d555f7a
MA
22692003-03-02 Matt Austern <austern@apple.com>
2270
2271 * decl.c (cp_binding_level): Add static_decls varray member.
2272 (add_decl_to_level): Add static/inline namespace scope
2273 declarations to static_decls array.
2274 (wrapup_global_for_namespace): Pass static_decls only, instead of
2275 all decls, to wrapup_global_declarations/check_global_declarations.
2276 (push_namespace): Initialize static_decls for ordinary namespaces.
2277 (cxx_init_decl_processing): Initialize static_decls for global
2278 namespace.
40a4184c 2279
8234c6c1
MM
22802003-03-05 Mark Mitchell <mark@codesourcery.com>
2281
2282 * class.c (end_of_class): Correct thinko.
2283
dc2b3526
NN
22842003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
2285
2286 * config-lang.in: Replace ${libstdcxx_version} by its value.
2287
000d38ea
GDR
22882003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2289
d9b2742a
ZW
2290 * cp-tree.h (cxx_saved_binding): Declare.
2291 (struct saved_scope): Adjust type of field 'old_binding'.
2292 * decl.c (cxx_saved_binding_make): New macro.
2293 (struct cxx_saved_binding): Define.
2294 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
2295 C++ bindings.
2296 (maybe_push_to_top_level): Adjust local variable type.
2297 (pop_from_top_level): Likewise.
40a4184c 2298
b87141b3
TT
22992003-03-04 Tom Tromey <tromey@redhat.com>
2300
2301 * Make-lang.in (c++.tags): New target.
2302
f20d8e39
NB
23032003-03-04 Neil Booth <neil@daikokuya.co.uk>
2304
2305 * Make-lang.in: Update.
2306
f5d70cc0
JM
23072003-03-03 Jason Merrill <jason@redhat.com>
2308
2309 * decl.c (finish_enum): Do set the type in a template. Simplify.
2310 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2311
7993382e
MM
23122003-03-03 Mark Mitchell <mark@codesourcery.com>
2313
2314 PR c++/9878
2315 * call.c (convert_class_to_reference): Correct conversion
2316 sequences.
2317 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
2318 (implicit_conversion): Adjust call to reference_binding.
2319 (add_candidate): Change type of candidates parameter.
2320 (add_function_candidate): Likewise.
2321 (add_conv_candidate): Likewise.
2322 (build_builtin_candidate): Likewise.
2323 (add_builtin_candidate): Likewise.
2324 (add_builtin_candidates): Likewise.
2325 (add_template_candidate_real): Likewise.
2326 (add_template_candidate): Likewise.
2327 (add_template_conv_candidate): Likewise.
2328 (build_user_type_conversion_1): Adjust accordingly.
2329 (build_object_call): Likewise.
2330 (build_conditional_expr): Likewise.
2331 (add_candidates): Likewise.
2332 (build_new_op): Likewise.
2333 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
2334 (build_new_method_call): Adjust calls to add_function_candidate.
2335 (make_temporary_var_for_ref_to_temp): New function.
2336 (initialize_reference): Add decl parameter.
2337 * class.c (build_rtti_vtbl_entries): Use build_address and
2338 build_nop.
2339 * cp-tree.h (initialize_reference): Change prototype.
2340 (make_temporary_var_for_ref_to_temp): New function.
2341 (build_type_conversion): Change prototype.
2342 (build_address): New function.
2343 (build_nop): Likewise.
2344 * cvt.c (cp_convert_to_pointer): Adjust call to
2345 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
2346 Use build_nop.
2347 (convert_to_pointer_force): Use build_nop.
2348 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
2349 (convert_to_reference): Adjust call to build_type_conversion.
2350 (ocp_convert): Likewise.
2351 (build_type_conversion): Remove for_sure parameter.
2352 * decl.c (grok_reference_init): Use initialize_reference.
2353 * typeck.c (build_address): New function.
2354 (build_nop): Likewise.
2355 (build_unary_op): Use them.
2356 (build_ptrmemfunc): Tidy slightly.
2357 (convert_for_initialization): Adjust call to
2358 initialize_reference.
2359 * typeck2.c (store_init_value): Remove #if 0'd code.
40a4184c 2360
d1a74aa7
JM
23612003-03-03 Jason Merrill <jason@redhat.com>
2362
2363 * decl.c (start_function): Clear DECL_NUM_STMTS.
2364
2365 * class.c (get_vtable_decl): Use vtbl_type_node.
2366 (build_primary_vtable): Check for it.
2367
6e1b3a7c
AH
23682003-03-02 Aldy Hernandez <aldyh@redhat.com>
2369
08162287 2370 * decl.c (check_initializer): Check for vector_opaque_p.
6e1b3a7c 2371
8a035a6b
AH
23722003-03-02 Ashif Harji <asharji@uwaterloo.ca>
2373
2374 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
2375 invoke an external cpp during compilation.
2376
456d8864
GDR
23772003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2378
2379 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
2380 that of warning().
2381 (start_decl): Likewise.
2382 (start_function): Likewise.
2383
5793b276
NB
23842003-03-01 Neil Booth <neil@daikokuya.co.uk>
2385
2386 * Make-lang.in (CXX_C_OBJS): Update.
2387
b063b379 23882003-02-28 Mark Mitchell <mark@codesourcery.com>
1d62c33e
MM
2389
2390 PR c++/9892
2391 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
2392 instantiating it.
2393
704a0bbd
AH
23942003-02-28 Aldy Hernandez <aldyh@redhat.com>
2395
d9b2742a
ZW
2396 * parser.c (cp_parser_init_declarator): Revert opaque
2397 vector_opaque_p change.
2398 Do not include target.h.
704a0bbd 2399
1cb8292f
MM
24002003-02-28 Mark Mitchell <mark@codesourcery.com>
2401
2402 PR c++/9879
2403 * cp-tree.h (build_zero_init): Add parameter.
2404 * decl.c (cp_finish_decl): Adjust call.
2405 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
2406 calls.
2407 (build_default_init): Add nelts parameter. Adjust calls to
2408 build_zero_init.
2409 (build_new_1): Adjust call to build_default_init.
2410 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
40a4184c 2411
fdedded1
DP
24122003-02-26 Devang Patel <dpatel@apple.com>
2413
2ef6c975
NS
2414 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
2415 required. Postpone enum setting for template decls.
2416 (build_enumerator): Delay copying value node until finish_enum
2417 (). Remove #if 0'ed code.
fdedded1
DP
2418 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
2419 (tsubst_copy): Add check for enum type.
40a4184c 2420
cec24319
MM
24212003-02-25 Mark Mitchell <mark@codesourcery.com>
2422
2423 PR c++/9683
2424 * decl2.c (prune_vars_needing_no_initialization): Do not throw
2425 away initializations for DECL_EXTERNAL VAR_DECLs.
2426 (finish_file): Adjust accordingly.
2427 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
2428
7d9f2df2
GDR
24292003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
2430
08162287
JM
2431 * decl.c (add_binding): Time TV_NAME_LOOKUP.
2432 (push_class_binding): Likewise.
2433 (set_namespace_binding): Likewise.
7d9f2df2 2434
353b4fc0
MM
24352003-02-24 Mark Mitchell <mark@codesourcery.com>
2436
2437 PR c++/9836
2438 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
2439 specializations back to the main template.
2440 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
2441 * pt.c (resolve_typename_type): Likewise.
2442
8b6a662e
JO
24432003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
2444
2445 PR c++/9778
2446 * pt.c (tsubst_copy_and_build): For a templated function inside a
2447 scope, process template arguments.
2448
9e236a9d
KL
24492003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2450
2451 PR c++/9602
2452 * typeck2.c (abstract_virtuals_error): Don't check when
2453 TYPE is still template parameter dependent.
2454
ca099ac8
MM
24552003-02-23 Mark Mitchell <mark@codesourcery.com>
2456
2457 PR c++/5333
2458 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
2459 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
2460 * pt.c (instantiate_class_template): Don't try to instantiate
2461 dependent types.
2462 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
40a4184c 2463
2fff6d71
MM
24642003-02-21 Mark Mitchell <mark@codesourcery.com>
2465
2466 PR c++/9749
2467 * decl.c (grokdeclarator): Do not allow parameters with variably
2468 modified types.
2469
7fb1c86d
NS
24702003-02-21 Nathan Sidwell <nathan@codesourcery.com>
2471
1f5a253a 2472 * search.c (grow_bfs_bases): Remove. Fold into ...
7fb1c86d
NS
2473 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
2474 in previous patch.
2475
63a3cd3e
MM
24762003-02-20 Mark Mitchell <mark@codesourcery.com>
2477
2478 PR c++/9729
2479 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
2480 when the G++ 3.2 ABI prevents correct compilation.
2481
dbbf88d1
NS
24822003-02-20 Nathan Sidwell <nathan@codesourcery.com>
2483
2484 Change base class access representation. Share virtual base
2485 binfos.
2486 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
2487 call.
2488 * cp/class.c (build_base_path): Likewise.
2489 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
2490 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
2491 (make_new_vtable): Adjust.
2492 (force_canonical_binfo_r): Delete.
2493 (force_canonical_binfo): Delete.
2494 (mark_primary_virtual_base): Delete.
2495 (dfs_unshared_virtual_bases): Delete.
2496 (mark_primary_bases): Adjust.
2497 (maybe_warn_about_overly_private_class): Adjust.
2498 (dfs_base_derived_from): Delete.
2499 (base_derived_from): Follow the inheritance chain.
2500 (struct find_final_overrider_data): Add vpath member.
2501 (dfs_find_final_overrider): Adjust.
2502 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
2503 (find_final_overrider): Adjust.
2504 (update_vtable_entry_for_fn): Adjust.
2505 (modify_all_vtables): Adjust.
2506 (walk_subobject_offsets): Adjust.
2507 (layout_nonempty_base_or_field): Adjust.
2508 (layout_empty_base): Remove last parameter. Adjust.
2509 (build_base_field): Adjust.
2510 (build_base_fields): Adjust.
2511 (propagate_binfo_offsets): Remove last parameter. Adjust.
2512 (dfs_set_offset_for_unshared_vbases): Delete.
2513 (layout_virtual_bases): Adjust.
2514 (finish_struct_1): Adjust.
2515 (init_class_processing): Don't init access nodes.
2516 (dfs_get_primary_binfo): Delete.
2517 (get_primary_binfo): Adjust.
2518 (dump_class_hierarchy_r): Remove most derived arg, add IGO
2519 parameter. Adjust.
2520 (dump_class_hierarchy): Adjust.
2521 (finish_vtbls): Adjust.
2522 (get_original_base): Delete.
2523 (build_vtt_inits): Adjust.
2524 (dfs_build_secondary_vptr_vtt_inits): Adjust.
2525 (dfs_ctor_vtable_bases_queue_p): Adjust.
2526 (build_ctor_vtbl_group): Adjust.
2527 (dfs_accumulate_vtbl_inits): Adjust.
2528 (build_vtbl_initializer): Adjust.
2529 (build_vbase_offset_vtbl_entries): Adjust.
2530 (add_vcall_offset_vtbl_entries_1): Adjust.
2531 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
2532 (access_*_node): Remove.
2533 (CANONICAL_BINFO): Delete.
2534 (BINFO_UNSHARED_MARKED): Remove.
2535 (BINFO_MARKED): Set LANG_FLAG_0 directly.
2536 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
2537 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
2538 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
2539 Delete.
2540 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
2541 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2542 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
2543 Delete.
2544 (BINFO_DEPENDENT_BASE_P): New.
2545 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
2546 index.
2547 (markedp, unmarkedp): Adjust.
2548 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
2549 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
2550 find_vbase_instance, binfo_for_vbase): Delete.
2551 (copied_binfo, original_binfo): Declare.
2552 (finish_base_specifier): Add virtual_p arg.
2553 (unshare_base_binfos): Delete.
2554 (copy_base_binfos): Declare.
2555 (reverse_path): Delete.
2556 * cp/decl.c (xref_basetypes): Access and virtuality passed
2557 differently. Don't copy direct base binfos here. Call
2558 copy_base_binfos.
2559 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
2560 (initialize_vtbl_ptrs): Adjust.
2561 (expand_member_init): Adjust.
2562 * cp/parser.c (cp_parser_base_specifier): Adjust.
2563 * cp/pt.c (instantiate_class_template): Adjust.
2564 (get_template_base_recursive): Adjust.
2565 * cp/rtti.c (get_pseudo_ti_init): Adjust.
2566 (get_pseudo_ti_desc): Adjust.
2567 * cp/tree.c (unshare_base_binfos): Rename to ...
2568 (copy_base_binfos): ... here, reimplement.
2569 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
2570 (reverse_path): Remove.
2571 * cp/typeck.c (get_delta_difference): Adjust error messages.
2572 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
2573 * cp/search.c (lookup_base_r): Adjust.
2574 (dynamic_cast_base_recurse): Adjust.
2575 (canonical_binfo): Remove.
2576 (dfs_canonical_queue): Remove.
2577 (dfs_assert_unmarked_p): Remove.
2578 (assert_canonical_unmarked): Remove.
2579 (shared_marked_p, shared_unmarked_p): Remove.
2580 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
2581 (dfs_access_in_type): Adjust.
2582 (access_in_type): Adjust.
2583 (dfs_accessible_queue_p): Adjust.
2584 (dfs_accessible_p): Adjust.
2585 (is_subobject_of_p_1, is_subobject_of_p): Remove.
2586 (struct lookup_field_info): Remove from_dep_base_p field.
2587 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
2588 (lookup_field_r): Remove dependent base code.
2589 (lookup_member): Likewise.
2590 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
2591 (dfs_unmarked_real_bases_queue_p): Remove.
2592 (dfs_marked_real_bases_queue_p): Remove.
2593 (dfs_skip_vbases): Remove.
2594 (dfs_get_pure_virtuals): Adjust.
2595 (markedp, unmarkedp): Adjust.
2596 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
2597 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
2598 (dfs_unmark): Adjust.
2599 (dfs_get_vbase_types):Remove.
2600 (dfs_build_inheritance_graph_order): Remove.
2601 (get_vbase_types): Remove
2602 (dfs_find_vbase_instance): Remove.
2603 (find_vbase_instance): Remove.
2604 (dfs_debug_unmarkedp): Adjust.
2605 (dependent_base_p): Remove.
2606 (dfs_push_type_decls): Adjust.
2607 (dfs_push_decls): Adjust.
2608 (dfs_no_overlap_yet): Adjust.
2609 (copied_binfo): New function.
2610 (original_binfo): New function.
2611 (binfo_for_vbase): Remove.
2612
860c9ea6
ZW
26132003-02-18 Zack Weinberg <zack@codesourcery.com>
2614
2615 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
2616 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
2617 vectors, for speed.
2618
6b99d1c0
MM
26192003-02-18 Mark Mitchell <mark@codesourcery.com>
2620
2621 PR c++/9704
2622 * class.c (layout_class_type): In the 3.2 ABI, take into account
2623 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
2624
2b59501b 26252003-02-18 Matt Austern <austern@apple.com>
40a4184c 2626
2b59501b
MA
2627 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
2628 nothing for C++.
2629 * cp/decl.c (wrapup_globals_for_namespace): Remove special
2630 handling of global namespace.
40a4184c 2631
e17aafd1
GK
26322003-02-18 Geoffrey Keating <geoffk@apple.com>
2633
2634 * cp-tree.h (rid_to_yy): Delete.
2635 (C_RID_YYCODE): Delete.
2636 (finish_file): Delete redundant declaration.
2637
04b03085
JM
26382003-02-18 Jason Merrill <jason@redhat.com>
2639
2640 PR c++/9623
2641 * decl.c (reshape_init): Don't mess with initializer labels.
2642
08162287
JM
2643 PR c++/9485
2644 * parser.c (cp_parser_postfix_expression): Set idk properly for
2645 object->scope::member.
2646
bf7c02dd
BE
26472003-02-18 Ben Elliston <bje@redhat.com>
2648
2649 PR other/7350
2650 * decl.c (duplicate_decls): Fix typo in comment.
2651
0f3a8219
MEC
26522003-02-17 Michael Elizabeth Chastain <mec@shout.net>
2653
c7adfa01 2654 PR debug/9717
0f3a8219
MEC
2655 * class.c (build_base_field): Mark fields for base classes with
2656 DECL_IGNORED_P.
2657
db77ef4c
KL
26582003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2659
2660 PR c++/9457
2661 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
2662 CONSTRUCTOR_ELTS only once.
2663
0df4ae96
KL
26642003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2665
2666 PR c++/9459
2667 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
2668 (dump_type_suffix): Likewise.
2669
86ac0575
NS
26702003-02-14 Nathan Sidwell <nathan@codesourcery.com>
2671
2672 * search.c: ANSIfy function declarations and definitions.
2673 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
2674 * call.c (build_method_call, resolve_scoped_fn_name,
2675 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
2676 calls.
2677 * class.c (handle_using_decl): Likewise.
2678 * decl.c (make_typename_type, make_unmound_class_template,
2679 start_decl, compute_array_index_type): Likewise.
2680 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
2681 * init.c (expand_member_init, build_member_call): Likewise.
2682 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
2683 resolve_typename_type): Likewise.
2684 * typeck.c (lookup_destructor, finish_class_member_access_exprm
2685 build_prememfunc_access_expr): Likewise.
2686
fd295cb2
GDR
26872003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
2688
2689 * decl2.c: Include "timevar.h".
2690 (namespace_ancestor): Time name lookup.
2691 (add_using_namespace): Likewise.
2692 (lookup_using_namespace): Likewise.
2693 (qualified_lookup_using_namespace): Likewise.
2694 (decl_namespace): Likewise.
2695 (lookup_arg_dependent): Likewise.
2696 * lex.c (do_identifier): Likewise.
2697 (do_scoped_id): Likewise.
2698 * pt.c (lookup_template_class): Likewise.
2699
62ed060f
AP
27002003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
2701
d9b2742a 2702 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
40a4184c 2703
22ffcc6f
GDR
27042003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
2705
2706 * decl.c: Include "timevar.h".
2707 (poplevel): Time name lookup.
2708 (find_binding): Likewise.
2709 (push_namespace): Likewise.
2710 (pop_nested_namespace): Likewise.
2711 (store_bindings): Likewise.
2712 (maybe_push_to_top_level): Likewise.
2713 (pop_from_top_level): Likewise.
2714 (push_local_name): Likewise.
2715 (pushtag): Likewise.
2716 (pushdecl): Likewise.
2717 (pushdecl_with_scope): Likewise.
2718 (pushdecl_namespace_level): Likewise.
2719 (pushdecl_top_level): Likewise.
2720 (pushdecl_class_level): Likewise.
2721 (push_class_level_binding): Likewise.
2722 (push_using_decl): Likewise.
2723 (push_using_directive): Likewise.
2724 (push_overloaded_decl): Likewise.
2725 (lookup_label): Likewise.
2726 (define_label): Likewise.
2727 (lookup_tag): Likewise.
2728 (lookup_tag_reverse): Likewise.
2729 (lookup_namespace_name): Likewise.
2730 (select_decl): Likewise.
2731 (unqualified_namespace_lookup): Likewise.
2732 (lookup_name_real): Likewise.
2733 (lookup_name_current_level): Likewise.
2734 (lookup_type_current_level): Likewise.
2735 (maybe_inject_for_scope_var): Likewise.
2736 (xref_tag): Likewise.
2737
2738 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
40a4184c 2739
6a540f3c
PE
27402003-02-12 Phil Edwards <pme@gcc.gnu.org>
2741
2742 * decl.c (build_enumerator): Remove unneeded test.
2743
7a93f739
DN
27442003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2745
2746 * cp-tree.h (struct lang_type_header): Make all fields unsigned
2747 char.
2748
b80f8ef3
MM
27492003-02-03 Mark Mitchell <mark@codesourcery.com>
2750
2751 PR c++/7129
2752 * call.c (z_candidate): Add args.
2753 (convert_class_to_reference): Set it.
2754 (implicit_conversion): Tidy.
2755 (add_candidate): Add args parameter.
2756 (add_function_candidate): Adjust call to add_candidate.
2757 (add_conv_candidate): Likewise.
2758 (build_builtin_candidate): Likewise.
2759 (build_user_type_conversion_1): Eliminate wasteful tree_cons
2760 usage.
2761 (build_new_function_call): Likewise.
2762 (build_object_call): Likewise.
2763 (add_candidates): New function.
2764 (build_new_op): Use it.
2765 (covert_like_real): Adjust call to build_over_call.
2766 (build_over_call): Remove args parameter.
2767 * operators.def: Add <?= and >?=.
2768
271bd540
RS
27692003-02-01 Richard Sandiford <rsandifo@redhat.com>
2770
2771 * typeck.c (build_indirect_ref): Don't check flag_volatile.
2772
db0f613d
KL
27732003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2774
2775 PR c++/8849
2776 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2777
1824b90d
NS
27782003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2779
2780 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
2781 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
2782 (BINFO_LANG_ELTS): New #define.
2783 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
2784
f099d360
GK
27852003-01-30 Geoffrey Keating <geoffk@apple.com>
2786
2787 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2788
5552b43c
MM
27892003-01-30 Mark Mitchell <mark@codesourcery.com>
2790
2791 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
2792 for class types.
2793 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
2794 rather than TYPE_LANG_FLAG_0.
2795 (TYPE_BUILT_IN): Remove.
2796 (TYPE_DEPENDENT_P): New macro.
2797 (TYPE_DEPENDENT_P_VALID): Likewise.
2798 (lang_type_class): Add fields_readonly.
2799 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
2800 * pt.c (dependent_type_p_r): New function, split out from ...
2801 (dependent_type_p): ... here. Memoize results.
2802 * search.c (dependent_base_p): Use dependent_type_p, not
2803 uses_template_parms.
2804 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
2805 for class types.
2806
14d22dd6
MM
28072003-01-29 Mark Mitchell <mark@codesourcery.com>
2808
2809 * call.c (build_field_call): Use build_new_op, not build_opfncall.
2810 (prep_operand): New function.
2811 (build_new_op): Use it. Remove dead code.
2812 * class.c (pushclass): Change "modify" parameter type from int to
2813 bool.
2814 (currently_open_class): Use same_type_p, not pointer equality.
2815 (push_nested_class): Adjust calls to pushclass, remove modify
2816 parameter.
2817 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
2818 (pushclass): Change prototype.
2819 (push_nested_class): Likewise.
2820 (grokoptypename): Remove.
2821 (build_opfncall): Remove.
2822 (value_dependent_expression_p): Declare.
2823 (resolve_typename_type): Likewise.
2824 (resolve_typename_type_in_current_instantiation): Likewise.
2825 (enter_scope_of): Remove.
2826 (tsubst): Remove.
2827 (tsubst_expr): Likewise.
2828 (tsubst_copy): Likewise.
2829 (tsubst_copy_and_build): Likewise.
2830 * decl.c (warn_about_implicit_typename_lookup): Remove.
2831 (finish_case_label): Return error_mark_node for erroneous labels.
2832 (start_decl): Adjust calls to push_nested_class.
2833 (grokfndecl): Call push_scope/pop_scope around call to
2834 duplicate_decls.
2835 (grokdeclarator): Do not call tsubst.
2836 (start_function): Adjust calls to push_nested_class.
2837 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
2838 (check_classfn): Use push_scope/pop_scope around type comparisions.
2839 (grokoptypename): Remove.
2840 (push_sscope): Adjust call to push_nested_class.
2841 * error.c (dump_type): Show cv-qualification of typename types.
2842 * init.c (build_member_call): Use build_new_op, not
2843 build_opfncall.
2844 * method.c (build_opfncall): Remove.
2845 * parser.c (cp_parser): Add allow_non_constant_expression_p and
2846 non_constant_expression_p.
2847 (cp_parser_constant_expression): Adjust prototype.
2848 (cp_parser_resolve_typename_type): Remove.
2849 (cp_parser_non_constant_expression): New function.
2850 (cp_parser_non_constant_id_expression): Likewise.
2851 (cp_parser_new): Set allow_non_constant_expression_p and
2852 non_constant_expression_p.
2853 (cp_parser_primary_expression): Reject `this' and `va_arg' in
2854 constant-expressions. Note that dependent names aren't really
2855 constant.
2856 (cp_parser_postfix_expression): Reject conversions to non-integral
2857 types in constant-expressions. Neither are increments or
2858 decrements.
2859 (cp_parser_unary_expression): Reject increments and decrements in
2860 constant-expressions.
2861 (cp_parser_direct_new_declarator): Adjust call to
2862 cp_parser_constant_expression.
2863 (cp_parser_cast_expression): Reject conversions to non-integral
2864 types in constant-expressions.
2865 (cp_parser_assignment_expression): Rejects assignments in
2866 constant-expressions.
2867 (cp_parser_expression): Reject commas in constant-expressions.
2868 (cp_parser_labeled_statement): Adjust call to
2869 cp_parser_constant_expression.
2870 (cp_parser_direct_declarator): Simplify array bounds, even in
2871 templates, when they are non-dependent. Use
2872 resolve_typename_type, not cp_parser_resolve_typename_type.
2873 (cp_parser_class_head): Use resolve_typename_type, not
2874 cp_parser_resolve_typename_type.
2875 (cp_parser_member_declaration): Adjust call to
2876 cp_parser_constant_expression.
2877 (cp_parser_constant_initializer): Likewise.
2878 (cp_parser_constructor_declarator): Use resolve_typename_type, not
2879 cp_parser_resolve_typename_type.
2880 (cp_parser_late_parsing_default_args): Adjust call to
2881 push_nested_class.
2882 * pt.c (tsubst): Give it internal linkage.
2883 (tsubst_expr): Likewise.
2884 (tsubst_copy): Likewise.
2885 (tsubst_copy_and_build): Likewise.
2886 (push_access_scope_real): Likewise.
2887 (tsubst_friend_class): Likewise.
2888 (instantiate_class_template): Adjust call to pushclass.
2889 (value_dependent_expression_p): Give it external linkage.
2890 Robustify.
2891 (resolve_typename_type): New function.
2892 * semantics.c (finish_call_expr): Use build_new_op, not
2893 build_opfncall.
2894 (begin_constructor_declarator): Remove.
2895 (begin_class_definition): Adjust call to pushclass.
2896 (enter_scope_of): Remove.
2897 * typeck.c (comptypes): Resolve typename types as appropriate.
2898 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2899 (build_x_compound_expr): Likewise.
2900 (build_modify_expr): Likewise.
2901 (build_x_modify_expr): Likewise.
2902 * typeck2.c (build_x_arrow): Likewise.
40a4184c 2903
be5a07ac
FJ
29042003-01-29 Fariborz Jahanian <fjahanian@apple.com>
2905
d9b2742a 2906 * pt.c (last_pending_template) Declare GTY().
be5a07ac 2907
710b73e6
KL
29082003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2909
2910 PR c++/8591
2911 * parser.c (cp_parser_elaborated_type_specifier): Convert
2912 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2913 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2914
f2ce60b8
NS
29152003-01-28 Nathan Sidwell <nathan@codesourcery.com>
2916
9ae58faf
NS
2917 PR c++/9437
2918 * pt.c (unify): Don't unify '*T' with 'U C::*'.
2919
f2ce60b8
NS
2920 PR c++/3902
2921 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2922 inside a declarator.
2923
a2ddc397
NS
29242003-01-27 Nathan Sidwell <nathan@codesourcery.com>
2925
2926 * class.c (update_vtable_entry_for_fn): Add index parameter.
2927 Generate vcall thunk for covariant overriding from a virtual
2928 primary base.
2929 (dfs_modify_vtables): Adjust.
2930
bbaab916
NS
29312003-01-25 Nathan Sidwell <nathan@codesourcery.com>
2932
2933 PR c++/9403
2934 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2935 template keyword.
2936 (cp_parser_base_specifier): Look for and consume a
2937 TEMPLATE keyword. Replace switch with array index.
2938
2939 PR c++/795
2940 * semantics.c (finish_non_static_data_member): Remember the
2941 field's type even in a template.
2942
2943 PR c++/9415
2944 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2945 already scoped.
40a4184c 2946
bbaab916
NS
2947 PR c++/8545
2948 * parser.c (cp_parser_cast_expression): Be more tentative.
2949
fb8eab96
KL
29502003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2951
2952 * cp-tree.h (flagged_type_tree_s): Remove.
2953 (check_for_new_type): Likewise.
2954 * typeck2.c (check_for_new_type): Likewise.
2955
c38e9817
NN
29562003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
2957
ee42dd9d
NN
2958 * dump.c: ANSIfy function declarations and definitions.
2959
c38e9817
NN
2960 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
2961
c006d942
MM
29622003-01-22 Mark Mitchell <mark@codesourcery.com>
2963
2964 PR c++/9354
2965 * init.c (build_new): Set the type of the new-expression, even
2966 when processing_templte_decl.
2967
2968 PR c++/9216
2969 * parser.c (cp_parser_primary_expression): Improve error message
2970 for templates used in an expression context.
2971
2972 PR c++/8696
2973 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2974 parse when encountering "typedef".
2975
94edc4ab
NN
29762003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2977
2978 * class.c, parser.c: ANSIfy function definitions and declarations.
2979
e0860732
MM
29802003-01-22 Mark Mitchell <mark@codesourcery.com>
2981
65a5559b
MM
2982 PR c++/9328
2983 * error.c (dump_decl): For an OVERLOAD, just print the name of the
2984 function; it doesn't make sense to try to print its type.
2985 * semantics.c (finish_typeof): Issue errors about invalid uses.
2986
e0860732
MM
2987 PR c++/9298
2988 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2989 function.
2990 (cp_parser_expression_statement): Use it.
2991 (cp_parser_explicit_instantiation): Likewise.
2992 * pt.c (do_decl_instantiation): Improve error handling logic.
40a4184c 2993
1fb3244a
MM
29942003-01-22 Mark Mitchell <mark@codesourcery.com>
2995
4eb6d609
MM
2996 PR c++/9384
2997 * parser.c (cp_parser_using_declaration): Issue error messages
2998 about name resolution failures here.
2999
1fb3244a
MM
3000 PR c++/9388
3001 * class.c (currently_open_derived_class): Use dependent_type_p.
3002 * cp-tree.h (dependent_type_p): New function.
3003 (dependent_template_arg_p): Likewise.
3004 (dependent_template_p): Likewise.
3005 (type_dependent_expression_p): Likewise.
3006 * parser.c (cp_parser_dependent_type_p): Remove.
3007 (cp_parser_value_dependent_type_p): Likewise.
3008 (cp_parser_type_dependent_expression_p): Likewise.
3009 (cp_parser_dependent_template_arg_p): Likewise.
3010 (cp_parser_dependent_template_id_p): Likewise.
3011 (cp_parser_dependent_template_p): Likewise.
3012 (cp_parser_diagnose_invalid_type_name): Replace
3013 cp_parser_dependent_type_p with dependent_type_p, etc.
3014 (cp_parser_primary_expresion): Likewise.
3015 (cp_parser_nested_name_specifier_opt): Likewise.
3016 (cp_parser_postfix_expression): Likewise.
3017 (cp_parser_unary_expression): Likewise.
3018 (cp_parser_template_name): Likewise.
3019 (cp_parser_class_name): Likewise.
3020 (cp_parser_lookup_name): Likewise.
3021 * pt.c (dependent_type_p): New function.
3022 (value_dependent_expression_p): Likewise.
3023 (type_dependent_expression_p): Likewise.
3024 (dependent_template_arg_p): Likewise.
3025 (dependent_template_id_p): Likewise.
3026 (dependent_template_p): Likewise.
40a4184c 3027
1fb3244a
MM
3028 PR c++/9285
3029 PR c++/9294
00b51d29 3030 * parser.c (cp_parser_simple_declaration): Return quickly when
d9b2742a 3031 encountering errors.
1fb3244a 3032
dd859b8a
KG
30332003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3034
3035 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3036
753225c1
JM
30372003-01-17 Jason Merrill <jason@redhat.com>
3038
3039 PR c++/9167, c++/9358
3040 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3041
77b996cc
JM
30422003-01-17 Jason Merrill <jason@redhat.com>
3043
3044 PR c++/9342
3045 * call.c (build_conditional_expr): Always do lvalue-rvalue
3046 conversion.
3047
5dae1114
MM
30482003-01-17 Mark Mitchell <mark@codesourcery.com>
3049
3050 PR c++/9294
3051 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3052 * cp-tree.h (BASELINK_BINFO): Adjust.
3053 (BASELINK_FUNCTIONS): Likewise.
3054 (BASELINK_ACCESS_BINFO): Likewise.
3055 (tree_baselink): New structure.
3056 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3057 (lang_tree_node): Add baselink.
3058 * decl.c (cp_tree_node_structure): Add BASELINK case.
3059 * search.c (build_baselink): Adjust.
3060 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
3061 test from TREE_LIST case.
3062
3063 PR c++/9272
3064 * parser.c (cp_parser_constructor_declarator_p): Do not assume
3065 that a constructor cannot be declared outside of its own class.
40a4184c 3066
5dae1114
MM
3067 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3068 be resolved, neither can the qualified name.
3069
3070 * rtti.c (get_pseudo_ti_desc): Fix thinko.
3071
a48cccea
JM
30722003-01-16 Jason Merrill <jason@redhat.com>
3073
3074 PR c++/8564
3075 * init.c (build_vec_init): Re-add maxindex parm.
3076 (perform_member_init, build_aggr_init): Pass it.
3077 (build_new_1): Pass it. Use an incomplete array type for full_type.
3078 * typeck.c (build_modify_expr): Pass it.
3079 * cp-tree.h: Adjust.
3080
cc23546e
JO
30812003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
3082
3083 * cp-tree.h (tsubst_copy_and_build): New declaration.
3084 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3085 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
3086 (tsubst_copy_and_build): New function.
3087
8fbc5ae7
MM
30882003-01-16 Mark Mitchell <mark@codesourcery.com>
3089
3090 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3091 (PARTIAL_INSTANTIATION_P): Remove.
3092 (IMPLICIT_TYPENAME_P): Likewise.
3093 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3094 (build_typename_type): Remove declaration.
3095 (parmlist_is_exprlist): Likewise.
3096 * decl.c (build_typename_type): Make it static, remove third
3097 parameter.
3098 (push_class_binding): Don't do implicit typename stuff.
3099 (make_typename_type): Likewise.
3100 (lookup_name_real): Likewise.
3101 (grokdeclarator): Don't try to convert declarations into
3102 initializations. Don't do implicit typename stuff.
3103 (parmlist_is_exprlist): Remove.
3104 (xref_basetypes): Simplify.
3105 * decl2.c (grokfield): Don't try to convert declarations into
3106 initializations.
3107 (build_anon_union_vars): Do this while processing templates, too.
3108 (finish_anon_union): Likewise.
3109 * error.c (dump_type): Remove implicit typename handling.
3110 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3111 (cp_parser_primary_expression): Correct handling of names not
3112 found by unqualified name lookup in templates.
3113 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3114 of types when possible.
3115 (cp_parser_simple_declaration): Complain intelligently about some
3116 invalid declarations.
3117 (cp_parser_member_declaration): Likewise.
3118 (cp_parser_constructor_declarator_p): Don't check when we're in a
3119 function scope.
3120 * pt.c (instantiate_class_template): Remove
3121 PARTIAL_INSTANTIATION_P gunk.
3122 * search.c (lookup_field_r): Don't build implicit typenames.
3123 (marked_pushdecls_p): Don't enter dependent base types.
3124 (unmarked_pushdecls_p): Likewise.
3125 * semantics.c (begin_class_definition): Remove implicit typename
3126 stuff.
3127
712becab
NS
31282003-01-16 Nathan Sidwell <nathan@codesourcery.com>
3129
3130 PR c++/9212
3131 * parser.c (cp_parser_direct_declarator): If accepting either
3132 abstract or named, the name must be an unqualified-id.
3133
fc555370
KG
31342003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3135
3136 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3137
dd1b7476
KG
31382003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3139
3140 * decl2.c (check_classfn): Fix uninitialized warning.
3141 (build_anon_union_vars): Likewise.
3142 * pt.c (tsubst_copy): Likewise.
3143
a7189b49
JO
31442003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
3145
3146 Further conform g++'s __vmi_class_type_info to the C++ ABI
3147 specification.
3148 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3149 the specification.
3150 (class_hint_flags): Likewise.
3151
cf22909c
KL
31522003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3153
3154 * config-lang.in: Add semantics.c to gtfiles.
3155 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3156 (saved_scope): Likewise.
3157 (type_lookups): Remove.
3158 (deferred_access): New structure.
3159 (type_access_control): Remove.
3160 (save_type_access_control): Likewise.
3161 (reset_type_access_control): Likewise.
3162 (decl_type_access_control): Likewise.
3163 (push_deferring_access_checks): Declare.
3164 (resume_deferring_access_checks): Likewise.
3165 (stop_deferring_access_checks): Likewise.
3166 (pop_deferring_access_checks): Likewise.
3167 (get_deferred_access_checks): Likewise.
3168 (pop_to_parent_deferring_access_checks): Likewise.
3169 (perform_deferred_access_checks): Likewise.
3170 (perform_or_defer_access_check): Likewise.
3171 * decl.c (make_typename_type): Use perform_or_defer_access_check.
3172 (make_unbound_class_template): Likewise.
3173 (grokdeclarator): Don't call decl_type_access_control.
3174 * parser.c (cp_parser_context): Remove deferred_access_checks
3175 and deferring_access_checks_p fields.
3176 (cp_parser_context_new): Adjust.
3177 (cp_parser): Remove access_checks_lists.
3178 (cp_parser_defer_access_check): Remove.
3179 (cp_parser_start_deferring_access_checks): Remove.
3180 (cp_parser_stop_deferring_access_checks): Remove.
3181 (cp_parser_perform_deferred_access_checks): Remove.
3182 (cp_parser_nested_name_specifier_opt): Use new deferred access
3183 functions.
3184 (cp_parser_simple_declaration): Likewise.
3185 (cp_parser_template_id): Likewise.
3186 (cp_parser_function_definition): Likewise.
3187 (cp_parser_class_specifier): Likewise.
3188 (cp_parser_lookup_name): Likewise.
3189 (cp_parser_single_declaration): Likewise.
3190 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3191 (cp_parser_parse_tentatively): Likewise.
3192 (cp_parser_parse_definitely): Likewise.
3193 (yyparse): Likewise.
3194 (cp_parser_init_declarator): Remove access_checks parameter.
3195 Use new deferred access functions.
3196 (cp_parser_function_definition_from_specifiers_and_declarator):
3197 Likewise.
3198 (cp_parser_class_head): Remove deferring_access_checks_p and
3199 saved_access_checks parameters. Use new deferred access functions.
3200 (cp_parser_member_specification_opt): Don't call
3201 reset_type_access_control.
3202 * search.c (type_access_control): Remove.
3203 * semantics.c: Include "gt-cp-semantics.h".
3204 (deferred_type_access_control): Remove.
3205 (deferred_access_stack): New variable.
3206 (deferred_access_free_list): Likewise.
3207 (push_deferring_access_checks): New function.
3208 (resume_deferring_access_checks): Likewise.
3209 (stop_deferring_access_checks): Likewise.
3210 (pop_deferring_access_checks): Likewise.
3211 (get_deferred_access_checks): Likewise.
3212 (pop_to_parent_deferring_access_checks): Likewise.
3213 (perform_deferred_access_checks): New function, adapted from
3214 cp_parser_perform_deferred_access_checks.
3215 (perform_or_defer_access_check): New function, adapted from
3216 cp_parser_defer_access_check.
3217 (current_type_lookups): Remove.
3218 (deferred_type_access_control): Likewise.
3219 (decl_type_access_control): Likewise.
3220 (save_type_access_control): Likewise.
3221 (reset_type_access_control): Likewise.
3222 (begin_function_definition): Adjust.
3223 (begin_class_definiton): Likewise.
3224
f576dfc4
JM
32252003-01-13 Jason Merrill <jason@redhat.com>
3226
3227 PR c++/8748
3228 * class.c (build_base_path): Take the address before calling save_expr.
3229
3230 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3231 all the ambiguous conversions are bad.
3232
3233 * class.c (maybe_warn_about_overly_private_class): Don't stop
3234 searching when we find a nonprivate method.
3235
3236 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3237
8fa1ad0e
MM
32382003-01-12 Mark Mitchell <mark@codesourcery.com>
3239
3240 * cp-tree.h (get_arglist_len_in_bytes): Remove.
3241
3242 PR c++/9264
3243 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3244 typeame types more robustly.
3245
15d2cb19
PE
32462003-01-11 Phil Edwards <pme@gcc.gnu.org>
3247
3248 * parser.c: Fix comment typos.
3249
a6f6052a
MM
32502003-01-10 Mark Mitchell <mark@codesourcery.com>
3251
99152b95 3252 PR c++/9099
a6f6052a
MM
3253 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3254 an object_type which is not a class type.
3255
3466b292
GK
32562003-01-10 Geoffrey Keating <geoffk@apple.com>
3257
3258 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3259 (cp_parser_late_parsing_default_args): Likewise.
3260
b2f29cd9
NN
32612003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
3262
3263 * cfns.gperf: ANSIfy function declarations.
3264 * cfns.h: Regenerate.
3265 * cp-tree.h: ANSIfy function declarations.
3266
2050a1bb
MM
32672003-01-10 Mark Mitchell <mark@codesourcery.com>
3268
3269 * cp-tree.h (reparse_absdcl_as_expr): Remove.
3270 (reparse_absdcl_as_casts): Likewise.
3271 (reparse_decl_as_expr): Likewise.
3272 (finish_decl_parsing): Likewise.
3273 * decl2.c (reparse_absdcl_as_expr): Remove.
3274 (reparse_absdcl_as_casts): Likewise.
3275 (repase_decl_as_expr): Likewise.
3276 (finish_decl_parsing): Likewise.
3277
3278 PR c++/9128
3279 PR c++/9153
3280 PR c++/9171
3281 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
3282 function.
3283 (cp_parser_nested_name_specifier_opt): Correct the
3284 check_dependency_p false.
3285 (cp_parser_postfix_expression): Fix formatting.
3286 (cp_parser_decl_specifier_seq): Avoid looking for constructor
3287 declarators when possible.
3288 (cp_parser_template_id): Avoid performing name-lookup when
3289 possible.
3290 (cp_parser_class_head): Do not count specializations when counting
3291 levels of templates.
3292 (cp_parser_constructor_declarator_p): Return immediately if
3293 there's no chance that the tokens form a constructor declarator.
3294 * rtti.c (throw_bad_typeid): Add comment. Do not return an
3295 expression with reference type.
3296 (get_tinfo_decl_dynamic): Do not return an expression with
3297 reference type.
3298 (build_typeid): Add comment. Do not return an expression with
3299 reference type.
3300 * typeck.c (build_class_member_access_expr): Improve handling of
3301 conditionals and comma-expressions as objects.
3302
45225759
NN
33032003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3304
d9b2742a
ZW
3305 * cfns.gperf: ANSIfy function declarations.
3306 * cfns.h: Regenerate.
3307 * cp-tree.h: ANSIfy function declarations.
3308 * parser.c: ANSIfy function declarations & definitions.
b2f29cd9 3309
45225759
NN
3310 * decl.c (bad_specifiers): Fix parameter order error I introduced.
3311
17211ab5
GK
33122003-01-09 Geoffrey Keating <geoffk@apple.com>
3313
3314 Merge from pch-branch:
3315
3316 2003-01-09 Geoffrey Keating <geoffk@apple.com>
3317
3318 Merge to tag pch-merge-20030102:
40a4184c 3319
17211ab5
GK
3320 * semantics.c (finish_translation_unit): Don't call finish_file.
3321 * parser.c: Don't include ggc.h.
3322 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
3323 read first token here. Don't allow PCH files after the first
3324 token is read.
3325 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
3326 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
3327 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
3328 (cp_parser_late_parsing_for_member): Don't duplicate call to
3329 cp_lexer_set_source_position_from_token.
3330 (cp_parser_late_parsing_default_args): Likewise.
3331 (yyparse): Call finish_file after clearing the_parser.
3332
3333 2002-12-11 Geoffrey Keating <geoffk@apple.com>
3334
3335 * Make-lang.in: Remove $(GGC_H) from all dependencies.
3336 (CXX_TREE_H): Add $(GGC_H).
40a4184c 3337 * class.c: Don't include ggc.h.
17211ab5
GK
3338 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
3339 (method_name_cmp): Likewise.
3340 (resort_data): New variable.
3341 (resort_field_decl_cmp): New.
3342 (resort_method_name_cmp): New.
3343 (resort_sorted_fields): New.
3344 (resort_type_method_vec): New.
3345 (finish_struct_methods): Delete cast.
3346 (finish_struct_1): Delete cast.
3347 * cp-tree.h: Include ggc.h.
3348 (struct lang_type_class): Add reorder attribute to field `methods'.
3349 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
3350 (resort_sorted_fields): New prototype.
3351 (resort_type_method_vec): New prototype.
3352 * call.c: Don't include ggc.h.
3353 * decl.c: Likewise.
3354 * decl2.c: Likewise.
3355 * init.c: Likewise.
3356 * lex.c: Likewise.
3357 * method.c: Likewise.
3358 * optimize.c: Likewise.
3359 * parse.y: Likewise.
3360 * pt.c: Likewise.
3361 * repo.c: Likewise.
3362 * search.c: Likewise.
3363 * semantics.c: Likewise.
3364 * spew.c: Likewise.
3365 * tree.c: Likewise.
3366
3367 * lang-specs.h: Remove comment.
3368
3369 2002-12-03 Geoffrey Keating <geoffk@apple.com>
3370
3371 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
3372 (operator_name_info): Mark to be saved for PCH, specify size.
3373 (assignment_operator_name_info): Likewise.
3374
3375 2002-11-19 Geoffrey Keating <geoffk@apple.com>
3376
3377 * decl.c (anon_cnt): Mark to be saved for PCH.
3378
3379 2002-10-25 Geoffrey Keating <geoffk@apple.com>
3380
3381 * lex.c (init_reswords): Delete now-untrue comment.
3382 Allocate ridpointers using GGC.
3383
3384 2002-10-04 Geoffrey Keating <geoffk@apple.com>
3385
3386 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
3387
3388 * g++spec.c (lang_specific_driver): Don't include standard
3389 libraries in `added'.
3390
3391 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
3392
3393 * decl2.c (finish_file): Call c_common_write_pch.
3394 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
3395
3396 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
3397
3398 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
3399 files when using g++.
3400 * lang-specs.h: Handle compiling C++ header files.
3401
ca5dd8b7
JJ
34022003-01-09 Jakub Jelinek <jakub@redhat.com>
3403
3404 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
3405
0f399e5f
KL
34062003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3407
3408 * pt.c (push_access_scope_real): Call push_to_top_level for
3409 function in namespace scope.
3410 (pop_access_scope): Call pop_from_top_level for function in
3411 namespace scope.
3412
c456a45a
JJ
34132003-01-09 Jakub Jelinek <jakub@redhat.com>
3414
3415 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
3416
2c6ce97e
CC
34172003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
3418
3419 * Make-lang.in (c++.install-common, c++.install-man,
3420 c++.uninstall): Prepend $(DESTDIR) to destination paths in
3421 all (un)installation commands.
3422 (c++.install-common): Rewrite $(LN) commands to support
3423 DESTDIR with "ln" as well as with "ln -s".
3424
f74dbcec
JM
34252003-01-08 Jason Merrill <jason@redhat.com>
3426
3427 * parser.c (cp_parser_primary_expression): See through explicitly
3428 scoped ALIAS_DECLs, too.
3429
11f6b451
NN
34302003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
3431
1774f99d
NN
3432 * decl.c: Remove some #if 0 code.
3433
11f6b451
NN
3434 * decl.c: ANSIfy function declarations.
3435
8caf4c38
MM
34362003-01-07 Mark Mitchell <mark@codesourcery.com>
3437
3438 * parser.c (cp_parser_asm_definition): Correct handling of omitted
3439 operands.
3440
2b59fc25
KL
34412003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3442
3443 PR c++/9030
3444 * decl.c (make_typename_type): Check access only when tf_error.
3445 (make_unbound_class_template): Likewise.
3446 * pt.c (saved_access_scope): New variable.
3447 (push_access_scope_real): New function.
3448 (push_access_scope): Likewise.
3449 (pop_access_scope): Likewise.
3450 (tsubst_default_argument): Use them.
3451 (instantiate_template): Likewise.
3452 (regenerate_decl_from_template): Likewise.
3453 (instantiate_decl): Likewise.
3454 (get_mostly_instantiated_function_type): Likewise.
3455
3f7617e4
NN
34562003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
3457
3458 * tree.c: Delete bogus #if 0 code.
3459
c9372112
AS
34602003-01-07 Andreas Schwab <schwab@suse.de>
3461
3462 * class.c (layout_class_type): Don't use
3463 PCC_BITFIELD_TYPE_MATTERS if not defined.
3464
8218bd34
MM
34652003-01-06 Mark Mitchell <mark@codesourcery.com>
3466
c10cdb3d
MM
3467 PR c++/9165
3468 * decl2.c (build_cleanup): Mark the object as used.
3469
69f794a7
MM
3470 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
3471 (hash_local_specialization): New function.
3472 (register_local_specialization): Revert 2003-01-05 change.
3473 (instantiate_decl): Use hash_local_specialization when creating
3474 the local_specializations table.
40a4184c 3475
4c4646b5
MM
3476 * decl2.c (mark_used): Do not synthesize thunks.
3477
63e5f567
MM
3478 * class.c (layout_class_type): Correct handling of unnamed
3479 bitfields wider than their types.
3480
8218bd34
MM
3481 PR c++/9189
3482 * parser.c (cp_parser): Remove default_arg_types. Update
3483 documentation for unparsed_functions_queues.
3484 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
3485 parameter.
3486 (cp_parser_new): Don't set parser->default_arg_types.
3487 (cp_parser_function_definition): Adjust usage of
3488 unparsed_funtions_queues.
3489 (cp_parser_class_specifier): Don't mess with
3490 parser->default_arg_types. Handle default argument processing in
3491 a separate phase from function body processing.
3492 (cp_parser_template_declaration_after_export): Adjust usage of
3493 unparsed_functions_queues.
3494 (cp_parser_late_parsing_for_member): Do not handle default
3495 arguments.
3496
62b8a44e
NS
34972003-01-06 Nathan Sidwell <nathan@codesourcery.com>
3498
3499 PR c++/9109
3500 * parser.c (cp_parser_declarator_kind): New enum.
3501 (cp_parser_declarator): Adjust.
3502 (cp_parser_direct_declarator): Adjust. Allow for either named or
3503 abstract declarator. Prefer abstract, if possible. Allow
3504 parenthesized function name.
3505 (cp_parser_condition): Adjust cp_parser_declarator call.
3506 (cp_parser_explicit_instantiation): Likewise.
3507 (cp_parser_init_declarator): Likewise.
3508 (cp_parser_type_id): Likewise.
3509 (cp_parser_function_definition): Likewise.
3510 (cp_parser_member_declaration): Likewise.
3511 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
3512 the tentative parsing.
3513 (cp_parser_exception_declaration): Likewise.
3514
ec194454
MM
35152003-01-05 Mark Mitchell <mark@codesourcery.com>
3516
3517 * parser.c (cp_parser_template_parameter): Adjust call to
3518 cp_parser_parameter_declaration.
3519 (cp_parser_parameter_declaration_list): Likewise.
3520 (cp_parser_parameter_declaration): Replace
3521 greater_than_is_operator_p with template_parm_p parameter. Do not
3522 cache tokens for template default arguments.
3523
3524 * pt.c (retrieve_local_specialization): Use htab_find, not
3525 htab_find_with_hash.
3526 (register_local_specialization): Use htab_find_slot, not
3527 htab_find_slot_with_hash.
3528 (instantiate_decl): Pass a hash function to htab_create.
40a4184c 3529
39b1af70
KG
35302003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3531
3532 * parser.c (cp_parser_binary_expression,
3533 cp_parser_multiplicative_expression,
3534 cp_parser_additive_expression, cp_parser_shift_expression,
3535 cp_parser_relational_expression, cp_parser_equality_expression,
3536 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3537 cp_parser_inclusive_or_expression,
3538 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
3539 cp_parser_binary_expression): Const-ify.
3540
1bb2cc34
MM
35412003-01-04 Mark Mitchell <mark@codesourcery.com>
3542
3543 * method.c (use_thunk): Disable access control while building the
3544 body of the thunk.
3545
3fd5abcf
NN
35462003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
3547
40a4184c 3548 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3fd5abcf
NN
3549 front end.
3550
9aad8f83
MA
35512003-01-03 Matt Austern <austern@apple.com>
3552
3553 * cp-tree.h (struct lang_type_class): add field for key method
3554 (cp_global_trees): rename dynamic_classes to keyed_classes
3555 (key_method): add definition
3556 * class.c (finish_struct_1): compute class's key method, and add
3557 the class to keyed_classes list if there is no key method.
3558 * decl.c (finish_function): add class to keyed_classes list if we
3559 see a definition of the class's key method.
3560 * pt.c (instantiate_class_template): add template specialization
3561 of a dynamic class to keyed_classes list.
3562 * decl2.c (key_method): remove
3563 (finish_file): iterate only through keyed_classes list when
3564 deciding whether to emit vtables, remove class from its list after
3565 we do the emission.
40a4184c 3566
6cce57b0
JM
35672003-01-02 Jason Merrill <jason@redhat.com>
3568
4e8dca1c
JM
3569 * call.c (build_conditional_expr): Stabilize lvalues properly.
3570 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
3571 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
3572 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
3573
3574 * call.c (convert_like_real): Call decl_constant_value for an
3575 IDENTITY_CONV even if there are no more conversions.
3576
3577 * cvt.c (build_up_reference): Don't push unnamed temps.
3578
3579 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
3580
3581 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
3582 for a backend struct.
3583
3584 * except.c (wrap_cleanups_r, build_throw): Make
3585 MUST_NOT_THROW_EXPRs void.
3586 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
3587
3588 * init.c (build_vec_delete_1): Pre-evaluate the base address.
3589
3590 * init.c (get_temp_regvar): Simplify logic.
3591
3592 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
3593 our replacement is a decl.
3594
6cce57b0
JM
3595 * decl.c (cp_make_fname_decl): Push the decls inside the
3596 outermost scope.
3597
31758337
NS
35982003-01-03 Nathan Sidwell <nathan@codesourcery.com>
3599
3600 PR c++/45, c++/3784
3601 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
3602 the same too.
3603
24c0ef37
GS
36042003-01-03 Graham Stott <graham.stott@btinternet.com>
3605
3606 * parser.c (struct cp_parser): Add access_checks_lists field
3607 (cp_parser_simple_declaration): Use.
40a4184c 3608 (cp_parser_init_declarator): Likewise.
24c0ef37 3609
5e8a153a
MM
36102003-01-02 Mark Mitchell <mark@codesourcery.com>
3611
1092805d
MM
3612 * parser.c (cp_parser_declaration): Accept the __extension__
3613 keyword before the declaration.
3614
4971227d
MM
3615 PR c++/2843
3616 * parser.c (cp_parser_parameter_declaration): Allow attributes to
3617 appear after the declarator.
3618
5e8a153a
MM
3619 * call.c (build_new_method_call): Fix typo in message format
3620 string.
3621
3beb3abf
MM
36222003-01-02 Mark Mitchell <mark@codesourcery.com>
3623
f7b5ecd9
MM
3624 * parser.c (cp_lexer_next_token_is): Declare it inline.
3625 (cp_lexer_set_source_position_from_token): Likewise.
3626 (cp_lexer_debugging_p): Likewise.
3627 (cp_parser_parsing_tentatively): Likewise.
3628 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
3629 to the cp_lexer_peek_token.
1092805d 3630
3beb3abf
MM
3631 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
3632 expression.
3633
43c6a96a
SB
36342003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3635
3636 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
3637 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
3638 cp/repo.c: Fix copyright years.
3639
c58b209a
NB
36402003-01-01 Neil Booth <neil@daikokuya.co.uk>
3641
3642 * lex.c: Remove superfluous include of cpplib.h.
3643 (CONSTRAINT): Define without conditions.
3644 (init_cp_pragma): Use c_register_pragma.
3645
7347c2c5
NB
36462002-12-31 Neil Booth <neil@daikokuya.co.uk>
3647
3648 * .cvsignore: Remove.
3649
f5adbb8d
SB
36502002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
3651
3652 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
3653 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
3654 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
3655 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
3656 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
3657 copyright header.
3658 * lex.h: parse.y is dead, so don't mention it. Also replace the
3659 copyright header with the default GNU copyright header.
3660
f1aba0a5
MM
36612002-12-31 Mark Mitchell <mark@codesourcery.com>
3662
eea9800f
MM
3663 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
3664 (lookup_name_namespace_only): Likewise.
3665 (begin_only_namespace_names): Likewise.
3666 (end_only_namespace_names): Likewise.
3667 * decl.c (only_namespace_names): Remove.
3668 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
3669 (lookup_name_real): Do not check only_namespace_names.
3670 (lookup_name_namespace_only): Remove.
3671 (begin_only_namespace_names): Likewise.
3672 (end_only_namespace_names): Likewise.
3673 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
3674 nested-name-specifiers more gracefully.
3675 (cp_parser_class_or_namespace_name): Avoid looking up namespace
3676 names when they cannot possibly appear.
3677 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
3678 (cp_parser_elaborated_type_specifier): Likewise.
3679 (cp_parser_namespace_name): Only look for namespace names.
3680 (cp_parser_lookup_name): Add is_namespace parameter.
3681 (cp_parser_lookup_name_simple): Adjust call to
3682 cp_parser_lookup_name.
3683
f1aba0a5
MM
3684 * parser.c (cp_parser_dependent_type_p): Fix thinko.
3685
eea9800f
MM
36862002-12-31 Neil Booth <neil@daikokuya.co.uk>
3687
3688 * .cvsignore: Update.
3689
3cfabe60
NS
36902002-12-31 Nathan Sidwell <nathan@codesourcery.com>
3691
3692 * class.c (modify_vtable_entry): Remove unused variable.
3693 (get_vcall_index): Always expect a non-thunk.
3694 (update_vtable_entry_for_fn): Combine covariant adjustments, when
3695 overriding a thunk. Pass get_vcall_index a non-thunk.
3696
3697 * decl2.c (finish_file): Mark undefined inlines as extern.
3698
92bc1323
MM
36992002-12-31 Mark Mitchell <mark@codesourcery.com>
3700
3701 * cp-tree.def (RETURN_INIT): Remove.
3702 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
3703 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
3704 (note_level_for_for): Remove.
3705 (note_level_for_try): Likewise.
3706 (note_level_for_catch): Likewise.
3707 (finish_named_return_value): Likewise.
3708 (do_pushlevel): Change prototype.
3709 (pending_lang_change): Remove.
3710 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
3711 sk_for.
3712 (note_level_for_for): Remove.
3713 (note_level_for_try): Likewise.
3714 (note_level_for_catch): Likewise.
3715 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
3716 * parser.c (cp_parser_context_free_list): Make it "deletable".
3717 (cp_parser_template_argument): Remove misleading comment.
3718 * pt.c (tsubst_expr): Remove RETURN_INIT code.
3719 * semantics.c (genrtl_named_return_value): Remove.
3720 (do_pushlevel): Take a scope kind as an argument.
3721 (begin_if_stmt): Adjust.
3722 (begin_while_stmt): Likewise.
3723 (begin_for_stmt): Likewise.
3724 (finish_for_init_stmt): Likewise.
3725 (begin_switch_stmt): Likewise.
3726 (begin_handler): Likewise.
3727 (begin_compound_stmt): Likewise.
3728 (finish_named_return_value): Remove.
3729 (cp_expand_stmt): Remove RETURN_INIT case.
3730 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
43c6a96a 3731
abda8efe
MM
37322002-12-31 Mark Mitchell <mark@codesourcery.com>
3733
3734 PR c++/9112
3735 * parser.c (cp_parser_direct_declarator): Handle erroneous
3736 parenthesized declarators correctly.
3737
eddcae5a
GDR
37382002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3739
3740 * cp-tree.h (pending_lang_change): Declare.
3741
c838d82f
MM
37422002-12-30 Mark Mitchell <mark@codesourcery.com>
3743
e5976695
MM
3744 * parser.c (cp_parser_context_free_list): New variable.
3745 (cp_parser_context_new): Use it.
3746 (cp_parser_error): Check return code from
3747 cp_parser_simulate_error.
3748 (cp_parser_simulate_error): Return a value.
3749 (cp_parser_id_expression): Optimize common case.
3750 (cp_parser_class_name): Likewise.
3751 (cp_parser_class_specifier): Adjust call to
3752 cp_parser_late_parsing_default_args.
3753 (cp_parser_lookup_name): Optimize common case.
3754 (cp_parser_late_parsing_for_member): Adjust call to
3755 cp_parser_late_parsing_default_args.
3756 (cp_parser_late_parsing_default_args): Add scope parameter.
3757 (cp_parser_require): Avoid creating the error message unless it's
3758 needed.
3759 (cp_parser_parse_definitely): Place free'd contexts on the free
3760 list.
3761
c838d82f
MM
3762 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
3763
c73aecdf
DE
37642002-12-30 David Edelsohn <edelsohn@gnu.org>
3765
3766 * parser.c (cp_parser_parameter_declaration_clause): Treat system
3767 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
3768
b599b135
NN
37692002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3770
43c6a96a 3771 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
b599b135
NN
3772 GCC, not GNU CC.
3773
946d5e45
MM
37742002-12-30 Mark Mitchell <mark@codesourcery.com>
3775
afd9b9dd
MM
3776 * parse.y: Remove.
3777 * spew.c: Likewise.
3778 * Make-lang.in (gt-cp-spew.h): Remove.
3779 * cp-tree.h (do_pending_lang_change): Remove.
3780 (do_identifier): Change prototype.
3781 (finish_id_expr): Remove.
3782 * decl.c (lookup_name_real): Remove yylex variable.
3783 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
3784 * lex.c (init_cpp_parse): Remove.
3785 (reduce_cmp): Likewise.
3786 (token_cmp): Likewise.
3787 (yychar): Likewise.
3788 (lastiddecl): Likewise.
3789 (token_count): Likewise.
3790 (reduce_count): Likewise.
3791 (yyhook): Likewise.
3792 (print_parse_statistics): Likewise.
3793 (do_pending_lang_change): Likewise.
3794 (do_identifier): Remove parsing parameter.
3795 * lex.h (lastiddecl): Remove.
3796 (looking_for_typename): Remove.
3797 (looking_for_template): Likewise.
3798 (pending_lang_change): Likewise.
3799 (yylex): Likewise.
3800 * semantics.c (finish_id_expr): Remove.
43c6a96a 3801
946d5e45
MM
3802 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
3803 thread" correctly.
3804
1c313945
NN
38052002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3806
3807 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
3808 end, not the C front end.
3809
8e268f72
NS
38102002-12-30 Nathan Sidwell <nathan@codesourcery.com>
3811
3812 * cp-tree.h (THUNK_TARGET): New macro.
3813 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
3814 (finish_thunk): Remove offset parms.
3815 * class.c (find_final_overrider): Look through thunks.
3816 (get_vcall_index): Use THUNK_TARGET.
3817 (update_vtable_entry_for_fn): Look through thunks. Set covariant
3818 fixed offset here. Adjust finish_thunk call.
3819 (build_vtbl_initializer): Adjust finish_thunk calls.
3820 * mangle.c (mangle_call_offset): Remove superfluous if.
3821 (mangle_thunk): Adjust.
3822 * method.c (make_thunk): Adjust.
3823 (finish_thunk): Adjust.
3824 (thunk_adjust): Remove assert.
3825 (use_thunk): Use THUNK_TARGET
3826 * dump1.c (cp_dump_tree): Adjust thunk dumping.
3827
3828 PR c++/9054
3829 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
3830 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
3831
848eed92
GDR
38322002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3833
3834 Remove traditional C constructs 4/n.
3835 * decl2.c (grok_method_quals, warn_if_unknown_interface,
3836 grok_x_components, cp_build_parm_decl, build_artificial_parm,
3837 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
3838 delete_sanity, check_member_template, check_java_method,
3839 check_classfn, finish_static_data_member_decl, grokfield,
3840 grokbitfield, grokoptypename, grok_function_init,
3841 cplus_decl_attributes, constructor_name, defer_fn,
3842 build_anon_union_vars, finish_anon_union, coerce_new_type,
3843 coerce_delete_type, comdat_linkage, maybe_make_one_only,
3844 key_method, import_export_vtable, import_export_class,
3845 output_vtable_inherit, import_export_decl, import_export_tinfo,
3846 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3847 set_guard, start_objects, finish_objects,
3848 start_static_storage_duration_function,
3849 finish_static_storage_duration_function, get_priority_info,
3850 start_static_initialization_or_destruction,
3851 finish_static_initialization_or_destruction,
3852 do_static_initialization, do_static_destruction,
3853 prune_vars_needing_no_initialization, write_out_vars,
3854 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3855 add_using_namespace, merge_functions, ambiguous_decl,
3856 lookup_using_namespace, lookup_using_namespace,
3857 qualified_lookup_using_namespace, set_decl_namespace,
3858 decl_namespace, current_decl_namespace, push_decl_namespace,
3859 pop_decl_namespace, push_scope, pop_scope, add_function,
3860 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3861 lookup_arg_dependent, do_namespace_alias,
3862 validate_nonmember_using_decl, do_nonmember_using_decl,
3863 do_toplevel_using_decl, do_local_using_decl,
3864 do_class_using_decl, do_using_directive, check_default_args,
3865 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
3866 * parser.c (cp_parser_class_head): Use booleanss.
3867 * decl.c (walk_globals, walk_vtables): Likewise.
3868 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3869 walk_globals): Change return type from 'int' to 'bool'.
3870 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3871 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3872 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3873 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3874 qualifier_flags, tinfo_base_init, generic_initializer,
3875 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3876 dfs_class_hint_unmark, class_hint_flags, class_initializer,
3877 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3878 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3879 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3880 * repo.c (repo_compile_flags, repo_template_declared,
3881 repo_template_defined, repo_class_defined, repo_get_id,
3882 repo_template_used, repo_vtable_used, repo_inline_used,
3883 repo_tinfo_used, repo_template_instantiated, extract_string,
3884 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3885 finish_repo): Likewise.
3886 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3887 cxx_print_xnode): Likewise..
3888 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3889 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3890 * cxxfilt.c (demangle_it, print_demangler_list, usage,
3891 standard_symbol_characters, hp_symbol_characters, main, fatal):
43c6a96a 3892 Likewise.
848eed92
GDR
3893 (strip_underscore): Change type from 'int' to 'bool'.
3894 (main): Use boolean constants.
3895
b746c5dc
GDR
38962002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3897
3898 Remove traditional C constructs 3/n.
3899 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3900 build_up_reference, warn_ref_binding, convert_to_reference,
3901 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3902 convert_to_void, convert, convert_force, build_type_conversion,
3903 build_expr_type_conversion, type_promotes_to,
3904 perform_qualification_conversions): Use C90 prototyping style.
3905 * decl2.c (grok_array_decl): Use boolean constant.
3906 (delete_sanity): Likewise.
3907 * typeck.c (build_unary_op): Likewise.
3908 * semantics.c (finish_switch_cond): Likewise.
3909 * parser.c (cp_parser_direct_new_declarator): Likewise.
3910 * init.c (build_new): Likewise.
3911
a723baf1
MM
39122002-12-27 Mark Mitchell <mark@codesourcery.com>
3913
3914 * Make-lang.in (po-generated): Remove parse.c.
3915 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
3916 ($(srcdir)/cp/parse.h): Remove target.
3917 ($(srcdir)/cp/parse.c): Likewise.
3918 (gt-cp-parse.h): Likewise.
3919 (gt-cp-parser.h): New target.
3920 (c++.distclean): Do not remove parse.output.
3921 (c++.maintainer-clean): Do not remove parse.c or parse.h.
3922 (cp/spew.o): Remove target.
3923 (cp/lex.o): Adjust dependencies.
3924 (cp/pt.o): Likewise.
3925 (cp/parse.o): Likewise.
3926 (cp/TAGS): Do not mention parse.c.
3927 (cp/parser.o): New target.
3928 * NEWS: Mention the new parser.
3929 * call.c (build_scoped_method_call): Simplify.
3930 (build_method_call): Likewise.
3931 (build_new_function_call): Adjust calls to add_function_candidate
3932 and add_template_candidate.
3933 (build_new_op): Improve handling of erroroneous operands.
3934 (convert_default_arg): Remove circular argument processing.
3935 (name_as_c_string): New function.
3936 (build_new_method_call): Use it.
3937 (perform_implicit_conversion): Use error_operand_p.
3938 * class.c (finish_struct_anon): Use constructor_name_p.
3939 (check_field_decls): Likewise.
3940 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3941 (resolve_address_of_overloaded_function): Likewise.
3942 (instantiate_type): Tweak pointer-to-member handling.
3943 (get_primary_binfo): Remove incorrect assertion.
3944 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3945 * cp-tree.h (DEFARG_TOKENS): New macro.
3946 (default_arg): New structure.
3947 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3948 (lang_tree_node): Add default_arg.
3949 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3950 (type_info_ref_type): New macro.
3951 (saved_scope): Make processing_explicit_instantiation a boolean.
3952 (check_access): New field.
3953 (unparsed_text): Remove.
3954 (language_function): Remove unparsed_inlines.
3955 (error_operand_p): New macro.
3956 (lang_decl): Adjust pending_inline_info.
3957 (DEFARG_POINTER): Remove.
3958 (tag_types): Add typenames.
3959 (lookup_ualified_name): Declare.
3960 (lookup_name_real): Likewise.
3961 (shadow_tag): Adjust prototype.
3962 (get_scope_of_declarator): Declare it.
3963 (process_next_inline): Remove it.
3964 (check_for_missing_semicolon): Likewise.
3965 (maybe_get_template_decl_from_type_decl): Declare it.
3966 (finish_label_stmt): Adjust prototype.
3967 (finish_non_static_data_meber): Declare it.
3968 (finish_pseudo_destructor_call_expr): Rename to ...
3969 (finish_pseudo_destructor_expr): ... this.
3970 (finish_compound_literal): Declare it.
3971 (begin_inline_definitions): Remove it.
3972 (init_spew): Remove.
3973 (peekyylex): Likewise.
3974 (arbitrate_lookup): Likewise.
3975 (frob_opname): Likewise.
3976 (maybe_snarf_defarg): Likewise.
3977 (add_defarg_fn): Likewise.
3978 (do_pending_defargs): Likewise.
3979 (done_pending_defargs): Likewise.
3980 (unprocessed_defarg_fn): Likewise.
3981 (replace_defarg): Likewise.
3982 (end_input): Likewise.
3983 (get_overloaded_fn): Likewise.
3984 * cvt.c (convert_to_reference): Improve error handling.
3985 * decl.c (lookup_name_real): Do not declare it static.
3986 (maybe_push_to_top_level): Set check_access.
3987 (identifier_type_value): Adjust call to lookup_name_real.
3988 (lookup_qualified_name): New method.
3989 (lookup_name_real): Remove special-case parsing code.
3990 (lookup_name-nonclass): Adjust call to lookup_name_real.
3991 (lookup_name_namespace_only): Likewise.
3992 (lookup_name): Likewise.
3993 (check_tag_decl): Return the type declared.
3994 (shadow_tag): Likewise.
3995 (register_dtor_fn): Tweak check_access.
3996 (grokfndecl): Use constructor_name_p.
3997 (get_scope_of_declarator): New function.
3998 (grokdeclarator): Obscure tweaks for slightly different declarator
3999 representations.
4000 (start_method): Return error_mark_node to indicate failure.
43c6a96a 4001 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
a723baf1
MM
4002 * decl2.c (constructor_name_full): Simplify.
4003 (constructor_name): Use it.
4004 (build_expr_from_tree): Adjust for changes to do new parser.
4005 (push_scope): Improve robustness.
4006 (validate_nonmember_using_decl): Process declarations, not names.
4007 (do_class_using_decl): Likewise.
4008 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4009 here.
4010 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4011 * expr.c (cxx_expand_expr): Handle BASELINKs.
4012 * init.c (member_init_ok_or_else): Issue more errors.
4013 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4014 * lex.c: Do not include parse.h.
4015 (yypring): Do not declare.
4016 (yylval): Likewise.
4017 (make_reference_declarator): Remove error-generating code.
4018 (rid_to_yy): Remove.
4019 (cxx_init): Do not call init_spew.
4020 (yypring): Remove.
4021 (check_for_missing_semicolon): Remove.
4022 * lex.h (got_scope): Remove.
4023 (got_object): Remove.
4024 * method.c (hack_identifier): Use finish_non_static_data_member.
4025 (implicitly_declare_fn): Adjust use of constructor_name.
4026 * parser.c: New file.
4027 * pt.c (parse.h): Do not include it.
4028 (maybe_get_template_decl_from_template): Do not declare it.
4029 (finish_member_template_decl): Tweak.
4030 (begin_explicit_instantiation): Adjust for
4031 processing_explicit_instantiation being boolean.
4032 (end_explicit_instantiation): Likewise.
4033 (maybe_process_partial_specialization): Tighten specialization
4034 test.
4035 (retrieve_local_specialization): Adjust ue of hash table.
4036 (eq_local_specializations): New function.
4037 (register_local_specialization): Likewise.
4038 (push_template_decl_real): Remove unnecessary test.
4039 (maybe_get_template_decl_from_type_decl): Don't make it static.
4040 (for_each_template_parm_r): Handle TYPEOF_TYPE.
4041 (tsubst_copy): Use retrieive_local_specialization to handle
4042 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
4043 Handle COMPONENT_REFs with pseudo-destructor-expressions.
4044 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4045 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4046 (unify): Tweak handling of CONST_DECLs.
4047 (regenerate_decl_from_template): Use push_nested_class.
4048 (template_for_substitution): New funciton.
4049 (instantiate_decl): Use it. Register parameters as local
4050 specializations.
4051 * rtti.c (init_rtti_processing): Set type_info_ref_type.
4052 (build_typeid): Use it.
4053 (get_typeid): Likeise.
4054 * search.c (accessible_p): Use check_access, not
4055 flag_access_control.
4056 (adjust_result_of_qualified_name_lookup): Pay attention to the
4057 context_class.
4058 * semantics.c (finish_asm_stmt): Adjust error handling.
4059 (finish_label_stmt): Return the statement.
4060 (finish_non_static_data_member): New function.
4061 (finish_class_expr): Handle BASELINKs.
4062 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4063 (finish_object_call_expr): Simplify handling during templates.
4064 (finish_pseudo_destructor_call_expr): Rename to ...
4065 (finish_pseudo_dtor_expr): ... this.
4066 (finish_compound_literal): New function.
4067 (begin_inline_definitions): Remove.
4068 (finish_sizeof): Remove special template handling.
4069 * spew.c: Do not include parse.h.
4070 * tree.c (get_overloaded_fn): Remove.
4071 * typeck.c (build_class_member_access_expr): Handle
4072 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
4073 (lookup_destructor): New function.
4074 (finish_class_member_access_expr): Use it.
4075 (convert_arguments): Simplify.
4076 (build_unary_op): Handle BASELINKs.
43c6a96a 4077
aac1406f
NS
40782002-12-26 Nathan Sidwell <nathan@codesourcery.com>
4079
eab5474f
NS
4080 PR c++/4803
4081 * decl2.c (mark_used): Defer inline functions.
4082 (finish_file): Merge deferred_fns loops. Check all used
4083 inline functions have a definition.
4084 * method.c (make_thunk): Thunks are not inline.
4085
aac1406f
NS
4086 PR c++/5116, c++/764
4087 * call.c (build_new_op): Make sure template class operands are
4088 instantiated.
4089
b9201622
NS
40902002-12-24 Nathan Sidwell <nathan@codesourcery.com>
4091
3e14cd30
NS
4092 PR C++/7964
4093 * cp-tree.h (resolve_scoped_fn_name): Prototype.
4094 * call.c (resolve_scoped_fn_name): New function. Deal with
4095 more template expansion. Broken out of ...
4096 * parse.y (parse_finish_call_expr): ... here. Call it.
4097 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4098 resolve_scoped_fn_name and build_call_from_tree.
4099
b9201622
NS
4100 PR c++/9053
4101 * decl.c (duplicate_decls): Templates may be disambiguated by
4102 return type.
43c6a96a 4103
b9201622
NS
4104 PR c++/8702
4105 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4106 conversion operators on failure.
4107
94be8403
GDR
41082002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4109
b746c5dc
GDR
4110 Remove traditional C constructs 2/n.
4111 * call.c (tourney, build_field_call, equal_functions, joust,
4112 compare_ics, build_over_call, build_java_interface_fn_ref,
4113 convert_like_real, op_error, build_object_call, resolve_args,
4114 build_vfield_ref, check_dtor_name, build_scoped_method_call,
4115 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4116 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4117 standard_conversion, reference_related_p,
4118 reference_compatible_p, convert_class_to_reference,
4119 direct_reference_binding, reference_binding,
4120 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4121 add_template_conv_candidate, any_viable, any_strictly_viable,
4122 build_this, splice_viable, print_z_candidates,
4123 build_user_type_conversion, build_new_function_call,
4124 conditional_conversion, build_conditional_expr, build_new_op,
4125 build_op_delete_call, enforce_access, call_builtin_trap,
4126 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4127 convert_default_arg, type_passed_as, convert_for_arg_passing,
4128 in_charge_arg_for_name, is_properly_derived_from,
4129 maybe_handle_implicit_object, maybe_handle_ref_bind,
4130 source_type, add_warning, can_convert, can_convert_arg,
4131 perform_implicit_conversion, can_convert_arg_bad,
4132 initialize_reference, add_conv_candidate,
4133 add_template_candidate_real, add_template_candidate): Ansify.
94be8403 4134
081cebb2
NS
41352002-12-22 Nathan Sidwell <nathan@codesourcery.com>
4136
4137 PR c++/8572
4138 * cp-tree.h (grokoptypename): Add SCOPE parameter.
4139 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4140 if in a template scope.
4141 * parse.y (unoperator): Return the scope.
4142 (operator_name): Adjust grokoptypename call.
4143
4f09be91
KL
41442002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4145
4146 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4147 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
4148 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4149
4639c5c6
KH
41502002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4151
4152 * ChangeLog: Fix a typo.
4153 * class.c: Fix comment typos.
4154 * cp-tree.h: Likewise.
4155
0ca7178c
JM
41562002-12-18 Jason Merrill <jason@redhat.com>
4157
4158 Handle anonymous unions at the tree level.
4159 C++ ABI change: Mangle anonymous unions using the name of their
4160 first named field (by depth-first search). Should not cause
4161 binary compatibility problems, though, as the compiler previously
4162 didn't emit anything for affected unions.
4163 * cp-tree.def (ALIAS_DECL): New tree code.
4164 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
4165 first field, not the largest.
4166 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
4167 push the decl, and write it out at namespace scope.
4168 * decl.c (lookup_name_real): See through an ALIAS_DECL.
4169 (pushdecl): Add namespace bindings for ALIAS_DECLs.
4170 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4171 of a decl which doesn't have one.
4172 * typeck.c (build_class_member_access_expr): Don't recurse if
4173 we already have the type we want.
4174
da9701a6
KL
41752002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4176
4177 PR c++/8099
4178 * friend.c (make_friend_class): Allow partial specialization
4179 when declaration is not a template friend.
4180
cab7a9a3
KL
41812002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4182
4183 PR c++/3663
4184 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4185 TREE_PROTECTED to created decl nodes.
4186
50cb9059
MM
41872002-12-18 Mark Mitchell <mark@codesourcery.com>
4188
4189 * class.c (build_base_field): Do not set DECL_PACKED on the
4190 FIELD_DECL.
4191
e220f0a4
GDR
41922002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
4193
4194 * cp-tree.h (struct tree_srcloc): Use location_t.
4195 (SOURCE_LOCUS): New.
4196 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4197
efc7052d
JM
41982002-12-17 Jason Merrill <jason@redhat.com>
4199
4200 * decl.c (finish_function): Also complain about no return in
4201 templates.
43c6a96a 4202 * semantics.c (finish_return_stmt): Also call check_return_expr in
efc7052d
JM
4203 templates.
4204 * typeck.c (check_return_expr): In a template, just remember that we
4205 saw a return.
4206
9f175208
JM
42072002-12-16 Jason Merrill <jason@redhat.com>
4208
89ea02fb
JM
4209 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4210 of the CALL_EXPR.
4211
9f175208
JM
4212 * semantics.c (do_pushlevel): Call pushlevel after adding the
4213 SCOPE_STMT.
4214 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4215 * parse.y (function_body): Go back to using compstmt.
4216 * decl.c (pushdecl): Skip another level to get to the parms level.
4217
4218 * call.c (build_new_method_call): Use is_dummy_object to determine
4219 whether or not to evaluate the object parameter to a static member
4220 function.
4221
4977bab6
ZW
42222002-12-14 Jason Merrill <jason@redhat.com>
4223
4224 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4225 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4226 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4227 don't bother with an AGGR_INIT_EXPR.
4228 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4229 just generate a new decl normally. Take return slot parm.
4230 * cp-tree.h: Adjust prototype.
4231
75c525d7
GDR
42322002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4233
4234 PR C++/8031
43c6a96a 4235 * cvt.c (convert_to_pointer_force): Don't try comparing against
75c525d7
GDR
4236 erronous type.
4237
8c6ae51f
GK
42382002-12-13 Geoffrey Keating <geoffk@apple.com>
4239
4240 * cp-tree.h: Have the multiple-include guards around
4241 the entire file.
4242
4977bab6
ZW
42432002-12-10 David Edelsohn <edelsohn@gnu.org>
4244
4245 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4246 for SPEW_DEBUG.
4247 (snarf_method): Same.
4248 (snarf_defarg): Same.
4249
d23faea1
MM
42502002-12-10 Mark Mitchell <mark@codesourcery.com>
4251
4252 PR c++/8372
4253 * pt.c (tsubst_copy): Handle destructor names more correctly.
4254
3932057c 42552002-12-10 Matt Austern <austern@apple.com>
d23faea1 4256
3932057c 4257 * cp-tree.h: get rid of needs_virtual_reinit bit.
43c6a96a 4258
dcba9b0f
MM
42592002-12-09 Mark Mitchell <mark@codesourcery.com>
4260
43c6a96a 4261 * NEWS: Document removal of in-class initialization extension for
dcba9b0f
MM
4262 static data members of non-arithmetic, non-enumeration type.
4263 * decl.c (check_static_variable_definition): Do not allow that
4264 extension.
4265 * decl2.c (grokfield): Do not call digest_init when processing
4266 templates.
4267
42b99e03
KG
42682002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4269
4270 * error.c (dump_expr): Fix format specifier warning.
4271
6c73ad72
GK
42722002-12-04 Geoffrey Keating <geoffk@apple.com>
4273
4274 * class.c (finish_struct_1): Correct comment.
4275 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
4276
8c048a52
GDR
42772002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4278
4279 PR C++/8799
4280 * error.c (dump_expr): Don't ever try to dump a non-existent
43c6a96a 4281 expression.
8c048a52 4282
4977bab6
ZW
42832002-12-03 Nathan Sidwell <nathan@codesourcery.com>
4284
4285 Implement covariant returns.
4286 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
4287 (struct lang_decl_flags): Add this_thunk_p flag.
4288 Rename vcall_offset to virtual_offset.
4289 (struct lang_decl): Rename delta to fixed_offset.
4290 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
4291 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
4292 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
4293 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
4294 (make_thunk): Add this_adjusting arg.
4295 (finish_thunk): Declare.
4296 (mangle_thunk): Add this_adjusting arg.
4297 * class.c (get_vcall_index): Use base function for lookup.
4298 (update_vtable_entry_for_fn): Generate covariant thunk.
4299 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
4300 (build_vtbl_initializer): Use base function for lookup.
4301 Finish covariant thunk here. Adjust thunk generation.
4302 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
4303 Adjust thunk dumping.
4304 * mangle.c (mangle_call_offset): New function.
4305 (mangle_thunk): Adjust for covariant thunks.
4306 * method.c (make_thunk): Adjust. Do not set name here.
4307 (finish_thunk): New function. Set name here.
4308 (use_thunk): Generate covariant thunks too.
4309 (thunk_adjust): New function.
4310 * search.c (covariant_return_p): Remove. Fold into ...
4311 (check_final_overrider): ... here. Simplify.
4312 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
4313
c203334d
JM
43142002-12-03 Jason Merrill <jason@redhat.com>
4315
c246c65d
JM
4316 PR c++/8674
4317 * call.c (build_over_call): Check specifically for TARGET_EXPR
4318 when eliding.
4319
4320 PR c++/8461, c++/8625
4321 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
4322 (cp_convert_parm_for_inlining): Remove.
43c6a96a 4323 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
c246c65d
JM
4324 Remove.
4325 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
4326 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
4327
c203334d
JM
4328 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
4329 an ambiguous conversion.
4330
ee7ecb29
MM
43312002-12-03 Mark Mitchell <mark@codesourcery.com>
4332
4333 PR c++/8688
4334 * decl.c (reshape_init): Handle erroneous initializers.
4335
5089de93
MM
43362002-12-02 Mark Mitchell <mark@codesourcery.com>
4337
4338 PR c++/8720
4339 * spew.c (remove_last_token): Make sure that last_chunk is set
4340 correctly.
4341
4342 PR c++/8615
4343 * error.c (dump_expr): Handle character constants with
4344 TREE_OVERFLOW set.
43c6a96a 4345
218e0eb6
KL
43462002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4347
4348 DR 180
4349 * decl.c (grokdeclarator): Require class-key for all friend class.
4350 Output the correct type and context in the error message.
4351
a82d6da5
MM
43522002-12-01 Mark Mitchell <mark@codesourcery.com>
4353
94fc547c
MM
4354 PR c++/5919
4355 * pt.c (unify): Use variably_modified_type_p to test validity of
4356 template argument types.
43c6a96a 4357
a82d6da5
MM
4358 PR c++/8727
4359 * cp-tree.h (lang_type_class): Add typeinfo_var.
4360 (CLASSTYPE_TYPEINFO_VAR): New macro.
4361 * rtti.c (get_tinfo_decl): Use it.
4362
4363 PR c++/8663
4364 * init.c (expand_member_init): Always get the main variant of a
4365 base class.
4366
c9f8536c
MM
43672002-12-01 Mark Mitchell <mark@codesourcery.com>
4368
4369 PR c++/8332
4370 PR c++/8493
4371 * decl.c (cxx_init_decl_processing): Use size_type_node, not
4372 c_size_type_node.
4373 * decl2.c (coerce_new_type): Likewise.
4374 * except.c (do_allocate_exception): Likewise.
4375
4977bab6
ZW
43762002-11-30 Zack Weinberg <zack@codesourcery.com>
4377
4378 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
4379 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
4380 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
4381 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4382 typeck2.c: Include coretypes.h and tm.h.
4383 * Make-lang.in: Update dependencies.
4384
c17707f1
MM
43852002-11-30 Mark Mitchell <mark@codesourcery.com>
4386
328de7c2
MM
4387 PR c++/8227
4388 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
4389 (check_initializer): Validate the type of the initialized
4390 variable, even if the initializer is absent.
4391 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
43c6a96a 4392
c17707f1
MM
4393 PR c++/8214
4394 * typeck.c (convert_for_assignment): Do not use
4395 decl_constant_value on the operand.
4396
65f8b0fb
MM
4397 PR c++/8511
4398 * pt.c (instantiate_decl): Handle template friends defined outside
4399 of the class correctly.
4400
f6a83eb0
JB
44012002-11-29 Joe Buck <jbuck@synopsys.com>
4402
4403 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
4404 anonymous structs.
43c6a96a 4405
ff944b49
MM
44062002-11-29 Mark Mitchell <mark@codesourcery.com>
4407
4408 * class.c (walk_subobject_offsets): Recur on binfos as well as on
4409 types.
4410 (layout_nonempty_base_or_field): Pass it a binfo when processing a
4411 base class.
4412 (layout_empty_base): Likewise.
4413 (build_base_field): Likewise.
43c6a96a 4414
21b3d0ba
MM
44152002-11-27 Mark Mitchell <mark@codesourcery.com>
4416
4417 * class.c (build_base_field): Make sure we get the canonical base
4418 when descending through primary bases.
4419
a16f2357
GK
44202002-11-26 Geoffrey Keating <geoffk@apple.com>
4421
4422 * decl.c (check_initializer): Don't error on initialisation of
4423 a scalar with a brace-enclosed expression.
4424
688f6688
NS
44252002-11-26 Nathan Sidwell <nathan@codesourcery.com>
4426
4427 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
4428 (template_parms_equal): Remove prototype.
4429 * typeck.c (buuld_indirect_ref): Reformat.
4430
4977bab6
ZW
44312002-11-25 Jason Merrill <jason@redhat.com>
4432
4433 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
4434 and a DO_STMT.
4435
b82ddab4
MM
44362002-11-25 Mark Mitchell <mark@codesourcery.com>
4437
2003cd37
MM
4438 * tree.c (cp_build_qualified_type_real): Correct handling of
4439 array types.
4440 * class.c (walk_subobject_offsets): Fix thinko.
4441 (build_base_field): Record offsets of empty bases in primary
4442 virtual bases.
4443 (layout_class_type): Record offsets of empty bases in fields.
43c6a96a 4444
b82ddab4
MM
4445 * search.c (is_subobject_of_p_1): Fix thinko.
4446 (lookup_field_queue_p): Likewise.
4447
8a874cb4
MM
44482002-11-24 Mark Mitchell <mark@codesourcery.com>
4449
4450 * class.c (layout_class_type): Reuse tail padding when laying out
4451 virtual bases.
4452
05abed76
MM
44532002-11-22 Mark Mitchell <mark@codesourcery.com>
4454
4455 * rtti.c (qualifier_flags): Fix thinko.
4456
4977bab6
ZW
44572002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4458
4459 Remove traditional C constructs 1/n.
4460 * cp-tree.h (init_method, set_mangled_name_for_decl,
4461 build_opfncall, hack_identifier, make_thunk, use_thunk,
4462 synthesize_method, implicitly_declare_fn,
4463 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
4464 maybe_clone_body): Remove use of PARAMS.
4465
4466 * method.c (do_build_assign_ref, do_build_copy_constructor,
4467 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
4468 Likewise.
4469 (synthesize_method): Use 'bool' type and constants instead of
4470 'int'.
4471 (locate_copy): Likewise.
4472 (implicitly_declare_fn): Likewise.
4473
4474 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
4475 Remove old-style declaration.
4476 (maybe_clone_body): Use 'bool' type and constants.
4477
1c83ea9f
GN
44782002-11-21 Glen Nakamura <glen@imodulo.com>
4479
4480 PR c++/8342
4481 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
4482 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
4483 of the branches of a COND_EXPR.
4484
ad2ae3b2
MM
44852002-11-19 Mark Mitchell <mark@codesourcery.com>
4486
4487 * pt.c (for_each_template_parm): Free allocated memory.
4488 * search.c (is_subobject_of_p_1): New function.
4489 (is_subobject_of_p): Avoid walking virtual bases multiple times.
4490
f3226a90
JT
44912002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
4492
4493 * g++spec.c (lang_specific_spec_functions): New.
4494
90024bdc
KH
44952002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4496
4497 * ChangeLog: Follow spelling conventions.
4498 * class.c: Likewise.
4499 * decl2.c: Likewise.
4500
fa7b533b
ZW
45012002-11-14 Zack Weinberg <zack@codesourcery.com>
4502
4503 * search.c (dfs_push_decls): Do not try to reorder elements
4504 3..n of method_vec if method_vec has only two elements.
4505 Reverse order of two tests to avoid accessing unallocated
4506 memory.
4507
95675950
MM
45082002-11-14 Mark Mitchell <mark@codesourcery.com>
4509
4510 * class.c (dfs_find_final_overrider): Adjust so that the most
4511 derived object is a binfo, rather than a class type.
4512 (find_final_overrider): Likewise.
4513 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
4514 (add_vcall_offset): Likewise.
4515
5c74d5b0
KL
45162002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4517
4518 PR c++/8389
4519 * pt.c (instantiate_template): Push class scope for member
4520 functions.
4521 (get_mostly_instantiated_function_type): Likewise. Don't call
4522 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
4523 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
4524 * mangle.c (write_encoding, write_unqualified_name): Adjust.
4525
4f2c9d7e
MM
45262002-11-07 Mark Mitchell <mark@codesourcery.com>
4527
e6a66567
MM
4528 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
4529 vcall offfsets. Split out ...
4530 (add_vcall_offset): ... new function.
4531
4f2c9d7e
MM
4532 PR c++/8338
4533 * pt.c (for_each_template_parm): Add htab parameter.
4534 (process_partial_specialization): Adjust call.
4535 (push_template_decl_real): Likewise.
4536 (pair_fn_data): Add visited.
4537 (for_each_template_parm_r): Avoid walking duplicates more than
4538 once.
4539 (uses_template_parms): Adjust call to for_each_template_parm.
4540
f72ab53b
MM
45412002-11-07 Mark Mitchell <mark@codesourcery.com>
4542
4543 * class.c (add_implicitly_declared_members): Put implicitly
4544 declared functions at the end of TYPE_METHODs when -fabi-version
4545 is at least 2.
4546
0a288b9a
GK
45472002-11-05 Geoffrey Keating <geoffk@apple.com>
4548
4549 * decl2.c (finish_file): Correct spelling.
4550
548502d3
MM
45512002-11-03 Mark Mitchell <mark@codesourcery.com>
4552
4553 * call.c (build_special_member_call): Do not try to lookup VTTs by
4554 name.
4555 * class.c (vtbl_init_data): Add generate_vcall_entries.
4556 (get_vtable_decl): Do not look up virtual tables by name.
4557 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
4558 (set_primary_base): Do not set CLASSTYPE_RTTI.
4559 (determine_primary_base): Likewise.
4560 (get_matching_virtual): Remove.
4561 (get_vcall_index): New function.
4562 (update_vtable_entry_for_fn): Do not try to use virtual thunks
4563 when they are not required. Assign vcall indices at this point.
4564 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
4565 Do update dynamic_classes.
4566 (build_vtt): Do not add VTTs to the symbol table.
4567 (build_ctor_vtbl_group): Likewise.
4568 (build_vtbl_initializer): Simplify handling of vcall indices.
4569 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
4570 for the most derived class.
4571 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
4572 the vtable.
4573 * cp-tree.h (dynamic_classes): New macro.
4574 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
4575 (CLASSTYPE_RTTI): Remove.
4576 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
4577 (CLASSTYPE_VCALL_INDICES): New macro.
4578 (CLASSTYPE_VTABLES): Likewise.
4579 (BV_USE_VCALL_INDEX_P): Remove.
4580 (build_vtable_path): Remove.
4581 * decl2.c (finish_vtable_vardecl): Remove.
4582 (key_method): Remove #if 0'd code.
4583 (finish_vtable_vardecl): Rename to ...
4584 (maybe_emit_vtables): ... this.
4585 (finish_file): Use it.
4586 * search.c (look_for_overrides_here): Update comment.
4587
04d57dd5
ZW
45882002-11-01 Zack Weinberg <zack@codesourcery.com>
4589
4590 PR c/7353 redux
4591 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
4592
bab076f7
JM
45932002-10-30 Jason Merrill <jason@redhat.com>
4594
4595 PR c++/8186
4596 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
4597 * call.c (convert_for_arg_passing): Set it.
4598 * except.c (stabilize_throw_expr): Recurse for such an arg.
4599
14b4829d
MM
46002002-10-31 Mark Mitchell <mark@codesourcery.com>
4601
4602 * cp-tree.h (lang_decl_flags): Remove init_priority.
4603 (lang_decl): Add delta.
4604 (GLOBAL_INIT_PRIORITY): Remove.
4605 (THUNK_DELTA): Revise definition.
4606 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
4607 * dump.c (cp_dump_tree): Don't dump it.
4608
8c081e84
MM
46092002-10-30 Mark Mitchell <mark@codesourcery.com>
4610
4611 PR c++/8160
4612 * typeck2.c (process_init_constructor): Call complete_array_type.
4613
4614 PR c++/8149
4615 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 4616
7088fca9
KL
46172002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4618
4619 Core issue 287, PR c++/7639
4620 * cp-tree.h (lang_type_class): Add decl_list field.
4621 (CLASSTYPE_DECL_LIST): New macro.
4622 (maybe_add_class_template_decl_list): Add declaration.
4623 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
4624 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
4625 (maybe_add_class_template_decl_list): New function.
4626 (add_implicitly_declared_members): Use it.
4627 * decl.c (maybe_process_template_type_declaration): Likewise.
4628 (pushtag): Likewise.
4629 * friend.c (add_friend): Likewise.
4630 (make_friend_class): Likewise.
4631 * semantics.c (finish_member_declaration): Likewise.
4632 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
4633 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
4634 to process members and friends in the order of declaration.
4635
5633b37c
MM
46362002-10-29 Mark Mitchell <mark@codesourcery.com>
4637
4638 PR c++/8287
4639 * decl.c (finish_destructor_body): Create the label to jump to
4640 when returning from a destructor here.
4641 (finish_function_body): Rather than here.
4642
f65e1183
ZW
46432002-10-25 Zack Weinberg <zack@codesourcery.com>
4644
4645 PR c++/7266
4646 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
4647 SCOPE_REF is not null before dereferencing it.
4648
bb5e8a7f
MM
46492002-10-25 Mark Mitchell <mark@codesourcery.com>
4650
e93ee644
MM
4651 * call.c (build_over_call): Use DECL_CONTEXT, not
4652 DECL_VIRTUAL_CONTEXT.
4653 * class.c (modify_vtable_entry): Don't mess with
4654 DECL_VIRTUAL_CONTEXT.
4655 (set_vindex): Remove.
4656 (set_primary_base): Remove vfuns_p parameter.
4657 (determine_primary_base): Likewise.
4658 (modify_all_vtables): Likewise.
4659 (layout_class_type): Likewise. Adjust calls to other functions
4660 accordingly.
4661 (finish_struct_1): Adjust calls to modified functions. Set
4662 DECL_VINDEX here.
4663 * cp-tree.h (lang_type_class): Remove vsize.
4664 (CLASSTYPE_VSIZE): Remove.
4665 (lang_decl): Remove thunks.
4666 (DECL_THUNKS): Adjust.
4667 (DECL_VIRTUAL_CONTEXT): Remove.
4668 (duplicate_decls): Don't copy it.
4669 * pt.c (build_template_decl): Don't set it.
4670 (tsubst_decl): Likewise.
4671 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 4672
bb5e8a7f
MM
4673 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
4674 (build_vtable_entry): Remove.
4675 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
4676 (lang_decl): Add thunks.
4677 (DECL_THUNKS): New macro.
4678 * decl.c (duplicate_decls): Copy it.
4679 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
4680 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 4681
6eb35968
DE
46822002-10-24 David Edelsohn <edelsohn@gnu.org>
4683
4684 PR c++/7228
4685 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
4686 lang_type structure exists before accessing field.
4687 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
4688 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
4689 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
4690 * class.c (check_field_decls): Use new macros.
4691 * typeck2.c (process_init_constructor): Remove redundant check for
4692 existence of lang_type structure.
4693
0cee073d
MM
46942002-10-24 Mark Mitchell <mark@codesourcery.com>
4695
ba9a991f
MM
4696 * class.c (end_of_base): New method.
4697 (end_of_class): Use it. Check indirect virtual bases.
4698
0cee073d
MM
4699 * class.c (check_field_decls): Fix typo.
4700
e6f052b7
MM
47012002-10-23 Mark Mitchell <mark@codesourcery.com>
4702
6b607ffd
MM
4703 PR c++/8067
4704 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
4705 related variables.
4706
e6f052b7
MM
4707 PR c++/7679
4708 * spew.c (next_token): Do not return an endless stream of
4709 END_OF_SAVED_INPUT tokens.
4710 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
4711 the cached token stream.
4712 (snarf_defarg): Likewise.
4713
8bcefb43
ZW
47142002-10-23 Zack Weinberg <zack@codesourcery.com>
4715
4716 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
4717 variably_modified_type_p.
4718 * cp-tree.h: Remove prototype of variably_modified_type_p.
4719 * tree.c (variably_modified_type_p): Remove; now implemented
4720 in language-independent code.
4721
ad4f9910
MM
47222002-10-22 Mark Mitchell <mark@codesourcery.com>
4723
4724 PR c++/6579
4725 * spew.c (snarf_parenthesized_expression): New function.
4726 (snarf_block): Use it.
4727
3961e8fe
RH
47282002-10-22 Richard Henderson <rth@redhat.com>
4729
4730 * method.c (use_thunk): Always compute vcall_value; assert that
4731 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
4732 for vcall thunks as well.
4733
5ec1192e
MM
47342002-10-21 Mark Mitchell <mark@codesourcery.com>
4735
7ba539c6
MM
4736 * class.c (empty_base_at_nonzero_offset_p): New function.
4737 (layout_nonempty_base_or_field): Do not check for conflicts when
4738 laying out a virtual base using the GCC 3.2 ABI.
4739 (build_base_field): Correct checking for presence of empty classes
90024bdc 4740 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 4741
e3ccdd50
MM
4742 * class.c (include_empty_classes): Use normalize_rli.
4743 (layout_class_type): Likewise.
4744
42328048
MM
4745 * decl.c (reshape_init): Tweak handling of character arrays.
4746
5ec1192e
MM
4747 PR c++/8218
4748 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
4749 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
4750 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
4751 (check_field_decls): Likewise.
4752 (layout_class_type): Likewise.
4753 (finish_struct_1): Initialize it.
4754 (walk_subobject_offsets): Use it to prune searches.
4755
eb0424da
MM
47562002-10-20 Mark Mitchell <mark@codesourcery.com>
4757
4758 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
4759 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
4760 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 4761
4a7510cb
ZW
47622002-10-18 Zack Weinberg <zack@codesourcery.com>
4763
4764 * decl.c (start_decl): Point users of the old initialized-
4765 typedef extension at __typeof__.
4766
483ab821
MM
47672002-10-18 Mark Mitchell <mark@codesourcery.com>
4768
4769 * Make-lang.in (method.o): Depend on TARGET_H.
4770 * method.c (target.h): Include it.
4771 (use_thunk): Use target hooks. Use vcall thunks, if available.
4772
e4f4feba
MM
47732002-10-18 Mark Mitchell <mark@codesourcery.com>
4774
4775 * class.c (base_derived_from): Make sure return value is a bool.
4776
9368208b
MM
47772002-10-18 Mark Mitchell <mark@codesourcery.com>
4778
4779 * class.c (find_final_overrider_data_s): Remove overriding_fn and
4780 overriding_base.
4781 (dfs_base_derived_from): New function.
4782 (base_derived_from): Likewise.
4783 (dfs_find_final_overrider): Use base_derived_from.
4784 (find_final_overrider): Adjust.
4785
5275f2bf
JM
47862002-10-18 Jason Merrill <jason@redhat.com>
4787
4788 PR c++/8080
4789 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
4790 with condition decls in a template.
4791
8a188e24
NS
47922002-10-17 Nathan Sidwell <nathan@codesourcery.com>
4793
4794 * class.c (add_method): Compare template parms too.
4795
b216f69b
MM
47962002-10-17 Mark Mitchell <mark@codesourcery.com>
4797
982216be
MM
4798 PR c++/7584
4799 * class.c (handle_using_decl): Allow the declaration used to be
4800 from an ambiguous base.
4801
d768a589
MM
4802 * pt.c (convert_template_argument): Revert this change:
4803 2002-10-16 Mark Mitchell <mark@codesourcery.com>
4804 * pt.c (convert_template_argument): Do not fold non-type
4805 template rguments when inside a template.
4806
b216f69b
MM
4807 * init.c (expand_default_init): Handle brace-enclosed initializers
4808 correctly.
4809
2303a079
MM
48102002-10-16 Mark Mitchell <mark@codesourcery.com>
4811
d3133e68
MM
4812 * mangle.c (write_expression): Correct handling of enumeration
4813 constants.
4814 (write_template_arg): Likewise.
4815 * pt.c (convert_template_argument): Do not fold non-type template
4816 arguments when inside a template.
4817
2303a079
MM
4818 PR c++/7478
4819 * cvt.c (convert_to_reference): Allow references as the incoming
4820 type.
4821
451c0899
MM
48222002-10-16 Mark Mitchell <mark@codesourcery.com>
4823
4824 PR c++/7524
4825 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
4826 build_qualified_type.
4827
da6eec72
RH
48282002-10-15 Richard Henderson <rth@redhat.com>
4829
4830 * error.c (dump_expr): Use real_to_decimal directly, and with
4831 the new arguments.
4832
3fa3c4bd
MM
48332002-10-15 Mark Mitchell <mark@codesourcery.com>
4834
4835 * decl.c (reshape_init): Fix typo.
4836
4837 * cp-tree.h (operator_name_info_t): Add arity.
4838 * lex.c (init_operators): Initialize it.
4839 * mangle.c (write_conversion_operator_name): New function.
4840 (write_unqualified_name): Use it.
4841 (write_template_args): Accept template arguments as a TREE_LIST.
4842 (write_expression): Adjust handling of qualified names to match
4843 specification.
4844
1a55127d
JM
48452002-10-15 Jason Merrill <jason@redhat.com>
4846
4847 * call.c (call_builtin_trap): New fn.
4848 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
4849 (build_call): Don't set current_function_returns_abnormally outside
4850 a function.
4851
58731fd1
MM
48522002-10-14 Mark Mitchell <mark@codesourcery.com>
4853
4854 * class.c (check_field_decls): Remove empty_p parameter. Instead,
4855 clear CLASSTYPE_EMPTY_P.
4856 (build_base_field): Likewise.
4857 (build_base_fields): Likewise.
4858 (check_bases_and_members): Likewise.
4859 (create_vtbl_ptr): Likewise.
4860 (layout_class_type): Likewise. Ensure that empty classes have
4861 size zero when used as base classes in the 3.2 ABI.
4862 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4863 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
4864 parameter.
4865 (is_empty_class): Correct definition when using post-3.2 ABI.
4866 * cp-tree.h (lang_type_class): Add empty_p.
4867 (CLASSTYPE_EMPTY_P): New macro.
4868
6742d92b
NS
48692002-10-12 Nathan Sidwell <nathan@codesourcery.com>
4870
4871 * init.c (build_delete): Do not apply save_expr for arrays.
4872 (build_vec_delete): Likewise.
4873
77631fa7
MM
48742002-10-14 Mark Mitchell <mark@codesourcery.com>
4875
4a7510cb 4876 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
4877 whose type is an array with unspecified bounds.
4878
77631fa7
MM
4879 PR c++/7176
4880 * lex.c (do_identifier): Add another option for the parsing
4881 parameter.
4882 * parse.y (do_id): Use it.
4883
2ee366b5
GDR
48842002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
4885
4886 PRs C++/6803, C++/7721 and C++/7803
4887 * decl.c (grokdeclarator): Gracefully handle template-name as
4888 decl-specifier.
4889
01c3fb15
JM
48902002-10-11 Jason Molenda <jmolenda@apple.com>
4891
4892 * init.c (build_field_list): Provide uses_unions_p with a default
4893 value.
4894
8e3df2de
MM
48952002-10-11 Mark Mitchell <mark@codesourcery.com>
4896
dac45b5c
MM
4897 PR c++/5661
4898 * cp-tree.h (variably_modified_type_p): New function.
4899 (grokdeclarator) Tighten check for variably modified types as
4900 fields.
4901 * pt.c (convert_template_argument): Do not allow variably modified
4902 types as template arguments.
4a7510cb 4903 * tree.c (variably_modified_type_p): New function.
dac45b5c 4904
8e3df2de
MM
4905 * NEWS: Document removal of "new X = ..." extension.
4906 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4907 brace-enclosed initializers.
4908 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4909 (initialize_local_var): Remove declaration.
4910 (expand_static_init): Likewise.
4911 * decl.c (next_initializable_field): New function.
4912 (reshape_init): Likewise.
4913 (check_initializer): Use them. Build dynamic initializer for
4914 aggregates here too.
4915 (initialize_local_var): Simplify, and incorporate cleanup
4916 insertion code as well.
4917 (destroy_local_var): Remove.
4918 (cp_finish_decl): Tidy.
4919 (expand_static_init): Fold checks for whether or not a variable
4920 needs initialization into this function. Simplify.
4921 * decl2.c (do_static_initialization): Simplify.
4922 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4923 be done for us automatically.
4924 (expand_default_init): Handle brace-enclosed initializers
4925 correctly.
4926 (expand_aggr_init_1): Remove RTL-generation code.
4927 (build_vec_init): Remove "new X = ..." support.
4928 * parse.y (new_initializer): Likewise.
4929 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4930 brace-enclosed initializer.
4931 (create_pseudo_type_info): Likewise.
4932 * typeck2.c (store_init_value): Don't try to handle digest_init
4933 being called more than once.
4934 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 4935
7bdfd72e
KG
49362002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4937
4938 * decl.c (typename_hash): Use htab_hash_pointer.
4939
e89fe41c
JW
49402002-10-10 Jim Wilson <wilson@redhat.com>
4941
4942 * decl.c (duplicate_decls): Don't call decl_attributes.
4943
95f79357
ZW
49442002-10-09 Zack Weinberg <zack@codesourcery.com>
4945
85cd7be8 4946 PR c/7353
95f79357
ZW
4947 * decl.c (start_decl): Unconditionally issue error for
4948 'typedef foo = bar'.
4949 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4950 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4951
10a38dba
KG
49522002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4953
4954 * decl2.c (prune_vtable_vardecl): Delete unused function.
4955
edebf865
MM
49562002-10-03 Mark Mitchell <mark@codesourcery.com>
4957
4958 PR c++/7754
4959 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4960 procesing template functions.
4961 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4962 type. Call layout_decl.
4963 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4964
01f4137f
RH
49652002-10-07 Richard Henderson <rth@redhat.com>
4966
4967 * decl2.c, pt.c: Revert c++/7754 fix.
4968
eb55ce4b
KL
49692002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4970
4971 PR c++/7804
4972 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4973
bd9bb3d2
MM
49742002-10-03 Mark Mitchell <mark@codesourcery.com>
4975
43c6a96a 4976 PR c++/7931
bd9bb3d2
MM
4977 * pt.c (for_each_template_parm_r): Handle BASELINKs.
4978
4979 PR c++/7754
4980 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4981 procesing template functions.
4982 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4983 type. Call layout_decl.
4984 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4985
6397d80b
MM
49862002-10-03 Mark Mitchell <mark@codesourcery.com>
4987
4988 PR c++/8006
4989 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4990 template parameters.
4991 (globals): Add entity and need_abi_warning.
4992 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4993 CLASSTYPE_TEMPLATE_INFO.
4994 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4995 TYPE_TI_TEMPLATE.
4996 (write_prefix): Handle typename types correctly.
4997 (write_template_prefix): Handle template template parameters
4998 correctly.
4999 (start_mangling): Add entity parameter.
5000 (finish_mangling): Warn about names whose mangling will change.
5001 (mangle_decl_string): Adjust.
5002 (mangle_type_string): Likewise.
5003 (mangle_special_for_type): Likewise.
5004 (mangle_ctor_vtbl_for_type): Likewise.
5005 (mangle_thunk): Likewise.
5006 (mangle_guard_variable): Likewise.
5007 (mangle_ref_init_variable): Likewise.
5008
2282d28d
MM
50092002-10-02 Mark Mitchell <mark@codesourcery.com>
5010
5011 PR c++/7188.
5012 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5013 * cp-tree.h (emit_base_init): Rename to ....
5014 (emit_mem_initializers): ... this.
5015 (expand_member_init): Change prototype.
5016 * init.c (perform_member_init): Compute explicit, rather than
5017 requiring it as a parameter.
5018 (sort_member_init): Rename to ...
5019 (sort_mem_initializers): ... this. Process bases and data members
5020 together.
5021 (sort_base_init): Remove.
5022 (emit_base_init): Rename to ...
5023 (emit_mem_initializers): ... this.
5024 (expand_aggr_vbase_init_1): Remove.
5025 (construct_virtual_bases): Rename to ...
5026 (construct_virtual_base): ... this.
5027 (expand_member_init): Rework handling of base initializers.
5028 * method.c (do_build_copy_constructor): Use
5029 finish_mem_initializers.
5030 * parse.y (member_init): Adjust calls to expand_member_init.
5031 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5032 (tsubst_initializer_list): Use expand_member_init.
5033 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
5034
50352002-10-02 Matt Austern <austern@apple.com>
5036 * decl.c (walk_vtables_r): Fixed typo that caused result to
5037 never get a nonzero value.
95f79357 5038
f963b5d9
RS
50392002-10-02 Roger Sayle <roger@eyesopen.com>
5040
5041 PR optimization/6627
5042 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5043 from here, and move it to tree.h.
5044 * decl.c (cxx_init_decl_processing): If storing the vbit
5045 in function pointers, ensure that force_align_functions_log
5046 is atleast one.
5047
69788039
MA
50482002-10-02 Matt Austern <austern@apple.com>
5049
5050 * class.c (check_field_decls): Changed warning about const member
5051 variables so that it doesn't get issued for a class aggregate.
95f79357 5052
d881ff25
MM
50532002-10-01 Mark Mitchell <mark@codesourcery.com>
5054
5055 * decl.c (cp_finish_decl): Make sure array types are laid out,
5056 even if the array bounds are unknown.
5057
2e88ae22
SE
50582002-10-01 Steve Ellcey <sje@cup.hp.com>
5059
d881ff25 5060 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
5061 to build1.
5062
b4c20e52
MM
50632002-10-01 Mark Mitchell <mark@codesourcery.com>
5064
d881ff25
MM
5065 * decl.c (cp_finish_decl): Make sure array types are laid out,
5066 even if the array bounds are unknown.
5067
b4c20e52
MM
5068 * decl.c (cp_finish_decl): Correct check for dynamic
5069 initialization of thread-local storage.
5070
5a9a1961
NS
50712002-09-30 Nathan Sidwell <nathan@codesourcery.com>
5072
5073 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5074 overloaded.
5075
7befdb9f
SE
50762002-09-30 Steve Ellcey <sje@cup.hp.com>
5077
5078 * class.c (build_vtbl_initializer): Add cast.
5079 (add_vcall_offset_vtbl_entries_1):
5080 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5081
17bbb839
MM
50822002-09-30 Mark Mitchell <mark@codesourcery.com>
5083
5084 * class.c (walk_subobject_offsets): Correct the calculation of
5085 offsets for virtual bases. Correct the counting of array
5086 elements.
5087 (layout_nonempty_base_or_field): Simplify. Correct the
5088 calculation of offsets to be propagated through the binfo
5089 hierarchy.
5090 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5091 Add the FIELD_DECL to TYPE_FIELDS.
5092 (build_base_fields): Adjust accordingly.
5093 (layout_virtual_bases): Use build_base_field.
5094 (end_of_class): Return a tree, not an integer.
5095 (warn_about_ambiguous_direct_bases): Rename to ...
5096 (warn_about_ambiguous_bases): ... this.
5097 (include_empty_classes): New function.
5098 (layout_class_type): Create an alternative version of the type to
5099 be used when as a base class type. Do not call
5100 finish_record_layout until we are done laying out the class.
5101 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
5102 as_base.
5103 (CLASSTYPE_SIZE): Reimplement.
5104 (CLASSTYPE_SIZE_UNIT): Likewise.
5105 (CLASSTYPE_ALIGN): Likweise.
5106 (CLASSTYPE_USER_ALIGN): Likewise.
5107 (CLASSTYPE_AS_BASE): New macro.
5108 (DECL_INITIALIZED_P): Likewise.
5109 (extract_init): Remove prototype.
5110 (build_forced_zero_init): Rename to ...
5111 (build_zero_init): ... this.
5112 (force_store_init_value): Remove.
5113 * decl.c (obscure_complex_init): Remove.
5114 (duplicate_decls): Copy DECL_INITIALIZED_P.
5115 (check_initializer): Do not leave junk in DECL_INITIAL.
5116 (cp_finish_decl): Handle zero-initialization of entities with
5117 static storage duration.
5118 * expr.c (extract_init): Remove.
5119 * init.c (build_forced_zero_init): Remove.
5120 (build_zero_init): New function.
5121 (build_default_init): Use it.
5122 (build_field_list): Skip FIELD_DECLs for base subobjects.
5123 (push_base_cleanups): Likewise.
5124 * method.c (do_build_assign_ref): Likewise.
5125 (synthesize_exception_spec): Likewise.
5126 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5127 (regenerate_decl_from_template): To not set DECL_INITIAL for a
5128 static data member whose initialization took place in its class.
5129 (instantiate_decl): Do not pass an initializer to cp_finish_decl
5130 in that situation.
5131 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5132 (dfs_unuse_fields): Likewise.
5133 * tree.c (pod_type_p): Handle error_mark_node.
5134 (zero_init_p): Likewise.
95f79357 5135 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
5136 subobjects.
5137 * typeck2.c (store_init_value): Remove #if 0'd code.
5138 (force_store_init_value): Remove.
5139 (process_init_constructor): Use build_zero_init.
95f79357 5140
03357c23
NS
51412002-09-29 Nathan Sidwell <nathan@codesourcery.com>
5142
5143 PR c++/7788
5144 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5145
27631dae
KH
51462002-09-29 Kazu Hirata <kazu@cs.umass.edu>
5147
5148 * cp-tree.h: Fix comment typos.
5149 * decl.c: Likewise.
5150 * pt.c: Likewise.
5151
956d9305
MM
51522002-09-25 Mark Mitchell <mark@codesourcery.com>
5153
5154 * cp/class.c (contains_empty_class_p): New method.
5155 (walk_subobject_offsets): Correct computation of field offset.
5156 (layout_empty_base): Correct placement of emtpy base classes.
5157 (layout_class_type): Warn about ABI changes.
5158
2d3e278d
MM
51592002-09-23 Mark Mitchell <mark@codesourcery.com>
5160
5161 * cp/class.c (layout_virtual_bases): Do not round the size of the
5162 type to a multiple of the alignment before laying out virtual bases.
5163 (layout_class_type): Correct handling of bit-fields that are wider
5164 than their type inside unions. Round the size of the type to a
5165 even number of bytes when computing the size without virtual
5166 bases.
5167 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 5168
838dfd8a
KH
51692002-09-21 Kazu Hirata <kazu@cs.umass.edu>
5170
5171 * ChangeLog: Follow spelling conventions.
5172 * ChangeLog.2: Likewise.
5173 * call.c: Likewise.
5174 * class.c: Likewise.
5175 * cp-tree.h: Likewise.
5176 * cvt.c: Likewise.
5177 * decl.c: Likewise.
5178 * decl2.c: Likewise.
5179 * except.c: Likewise.
5180 * friend.c: Likewise.
5181 * g++spec.c: Likewise.
5182 * init.c: Likewise.
5183 * lex.c: Likewise.
5184 * mangle.c: Likewise.
5185 * method.c: Likewise.
5186 * operators.def: Likewise.
5187 * optimize.c: Likewise.
5188 * pt.c: Likewise.
5189 * rtti.c: Likewise.
5190 * search.c: Likewise.
5191 * semantics.c: Likewise.
5192 * spew.c: Likewise.
5193 * tree.c: Likewise.
5194 * typeck.c: Likewise.
5195
9ced0328
DP
51962002-09-18 Devang Patel <dpatel@apple.com>
5197
5198 * cp/cp-tree.h: New prototype for walk_vtabls().
5199 * cp/decl.c (walk_vtables_r): New function.
5200 (struct cp_binding_level): Add new members, namespaces,
5201 names_size and vtables.
5202 (add_decl_to_level): Add decl in namespaces or vtables
5203 chain, if conditions match.
5204 (walk_vtables): New function.
5205 (walk_namespaces_r): Travers separate namespace chain
5206 for namespace decls.
5207 (wrapup_globals_for_namespace): Use names_size instead
5208 of list_length().
5209 * cp/decl2.c (finish_file): Use walk_vtables() instead of
5210 walk_globals() to walk vtable decls.
5211
dd29188b
NS
52122002-09-18 Nathan Sidwell <nathan@codesourcery.com>
5213
5214 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5215 ICE with invalid pointers & references.
5216
f989ed67
ZW
52172002-09-17 Zack Weinberg <zack@codesourcery.com>
5218
5219 * Make-lang.in: Remove all references to the demangler.
5220 * cxxfilt.c: Moved to binutils.
5221
171d2f50
NS
52222002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5223
3ec83083
NS
5224 PR c++/7718
5225 * pt.c (tsubst_decl): Remove assert.
5226
171d2f50
NS
5227 Remove DR 295 implementation.
5228 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5229 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5230 about ignoring volatile qualifiers.
5231
5232 * search.c (lookup_member): Correct documentation.
5233
36a5eadd
GK
52342002-09-16 Geoffrey Keating <geoffk@apple.com>
5235
5236 * cp-tree.h (union lang_tree_node): Add chain_next option.
5237
28c56d25
NS
52382002-09-16 Nathan Sidwell <nathan@codesourcery.com>
5239
7979434d
NS
5240 * parse.y (parse_finish_call_expr): Check lookup_member result.
5241
28c56d25
NS
5242 PR c++/7015
5243 * semantic.c (finish_asm_stmt): Fix operand/output_operands
5244 thinko.
5245 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5246
3baab484
NS
52472002-09-15 Nathan Sidwell <nathan@codesourcery.com>
5248
5249 PR c++/7919
5250 * call.c (build_over_call): Convert this pointer for fns found by
5251 using decls.
5252
d30d6e7a
KH
52532002-09-15 Kazu Hirata <kazu@cs.umass.edu>
5254
5255 * ChangeLog: Follow spelling conventions.
5256 * ChangeLog.1: Likewise.
5257
c8460010
NS
52582002-09-14 Nathan Sidwell <nathan@codesourcery.com>
5259
5260 PR c++/7768
5261 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5262
c6002625
KH
52632002-09-14 Kazu Hirata <kazu@cs.umass.edu>
5264
5265 * error.c: Fix comment formatting.
5266 * except.c: Likewise.
5267 * expr.c: Likewise.
5268 * friend.c: Likewise.
5269 * g++spec.c: Likewise.
5270 * init.c: Likewise.
5271 * lex.c: Likewise.
5272 * mangle.c: Likewise.
5273 * method.c: Likewise.
5274 * optimize.c: Likewise.
5275 * pt.c: Likewise.
5276 * rtti.c: Likewise.
5277 * search.c: Likewise.
5278 * semantics.c: Likewise.
5279 * spew.c: Likewise.
5280 * tree.c: Likewise.
5281 * typeck.c: Likewise.
5282 * typeck2.c: Likewise.
5283
46dd3884
GDR
52842002-09-13 Matt Austern <austern@apple.com>
5285
4a7510cb 5286 PR C++/7828
46dd3884
GDR
5287 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
5288 * cp/call.c: Change call-by-const-reference mechanism to use
5289 non_cast_lvalue_p when deciding whether the create a temporary.
5290 We need a temporary when passing, e.g. (long) x by const ref.
5291
712467a4
NS
52922002-09-13 Nathan Sidwell <nathan@codesourcery.com>
5293
5294 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
5295
a1c65f9f
KH
52962002-09-13 Kazu Hirata <kazu@cs.umass.edu>
5297
5298 * decl.c: Fix comment formatting.
5299 * decl2.c: Likewise.
5300
00a17e31
KH
53012002-09-12 Kazu Hirata <kazu@cs.umass.edu>
5302
5303 * call.c: Fix comment formatting.
5304 * class.c: Likewise.
5305 * cp-lang.c: Likewise.
5306 * cp-tree.h: Likewise.
5307 * cvt.c: Likewise.
5308
3fd9d606
ZW
53092002-09-11 Zack Weinberg <zack@codesourcery.com>
5310
5311 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
5312 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
5313 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
5314 minor adjustments (use version_string, eliminate yet another
5315 duplicate of xmalloc)
5316
2515a7ea
KG
53172002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5318
5319 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
5320
5aa3396c
JM
53212002-09-05 Jason Merrill <jason@redhat.com>
5322
5323 * typeck2.c (add_exception_specifier): Only pedwarn for an
5324 incomplete type.
5325 (require_complete_eh_spec_types): New fn.
5326 (cxx_incomplete_type_diagnostic): Also support pedwarning.
5327 * typeck.c (complete_type_or_diagnostic): Likewise.
5328 * call.c (build_call): Call require_complete_eh_spec_types.
5329 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
5330 on an incomplete type.
5331
23ccd1f3
JJ
53322002-09-04 Jakub Jelinek <jakub@redhat.com>
5333
5334 * decl.c (start_cleanup_fn): Clear interface_only before
5335 start_function, restore it afterwards.
5336
4977bab6
ZW
53372002-09-02 Nathan Sidwell <nathan@codesourcery.com>
5338
5339 * cp-tree.h (finish_builtin_type): Remove.
5340 * decl2.c (finish_builtin_type): Move to common code.
5341 * decl.c (build_ptrmemfunc_type): Adjust.
5342 * rtti.c (create_pseudo_type_info): Adjust.
5343 (create_tinfo_types): Adjust.
5344
d99f015c
JM
53452002-08-31 Jason Merrill <jason@redhat.com>
5346
5347 * cp-lang.c (cp_expr_size): Allow initialization from a
5348 CONSTRUCTOR.
5349
8a3c9180
RH
53502002-08-30 Richard Henderson <rth@redhat.com>
5351
c9989d09 5352 PR opt/7515
8a3c9180
RH
5353 * tree.c: Include target.h.
5354 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
5355 don't bind locally.
5356 * Makefile.in (tree.o): Update.
5357
eca7f13c
MM
53582002-08-27 Mark Mitchell <mark@codesourcery.com>
5359
5360 * class.c (layout_virtual_bases): Warn about bugs in G++ that
5361 result in incorrect object layouts.
5362 (layout_class_type): Likewise.
f989ed67 5363
13d3f0b6
MA
53642002-08-24 Matt Austern <austern@apple.com>
5365
5366 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
5367 are allowable.
5368 (real_lvalue_p): Update caller.
5369 (lvalue_p): Ditto.
5370 (non_cast_lvalue_or_else): New.
5371 * tree.h: Declare it.
f989ed67 5372 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 5373
5b770a96
MM
53742002-08-22 Mark Mitchell <mark@codesourcery.com>
5375
5376 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
5377 and COND_EXPR specially; fix error message output.
5378
d65b1d77
JM
53792002-08-22 Jason Merrill <jason@redhat.com>
5380
5381 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
5382 * semantics.c (nullify_returns_r): Likewise.
5383
8a5f4379
GDR
53842002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
5385
5386 Fix PR/7621
5387 * typeck.c (finish_class_member_access_expr): Diagnose cases where
5388 name lookup finds nothing.
5389
5d764395
JM
53902002-08-15 Jason Merrill <jason@redhat.com>
5391
5392 * semantics.c (finish_then_clause): Remove redundant assignment.
5393 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
5394 extra binding level outside the if/switch statement.
5395 (finish_while_cond, finish_for_cond): Rewrite complex condition
5396 into the loop body.
5397
c01b9ec8
AO
53982002-08-15 Alexandre Oliva <aoliva@redhat.com>
5399
5400 * parse.y (sizeof, alignof, typeof): New non-terminals to
5401 increment skip_evaluation. Replace terminals with them and
5402 decrement skip_evaluation at the end of rules using them.
5403 * decl2.c (mark_used): Don't assemble_external if
5404 skipping evaluation.
5405
e8fe46d4
GDR
54062002-08-15 Gabriel Dos Reis <gdr@nerim.net>
5407
5408 Fix PR/7504
5409 * parse.y (parse_finish_call_expr): Handle incomplete
5410 type used to name a scope.
5411
eac5ce6c
NS
54122002-08-15 Nathan Sidwell <nathan@codesourcery.com>
5413
5414 PR c++/7598
5415 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
5416 regression caused by my 2002-08-08 patch.
5417
22eadedb
MM
54182002-08-13 Mark Mitchell <mark@codesourcery.com>
5419
5420 * decl.c (pushdecl_class_level): Honor requests to bind names to
5421 OVERLOADs.
5422
e65e6212
KG
54232002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5424
5425 * decl2.c (build_call_from_tree): Fix uninitialized variable.
5426 * parse.y (parse_finish_call_expr): Likewise.
5427 * repo.c (old_args, old_dir, old_main): Const-ify.
5428
3e72ec9a
GDR
54292002-08-11 Gabriel Dos Reis <gdr@nerim.net>
5430
d78e771d 5431 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
3e72ec9a
GDR
5432 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
5433 * optimize.c (maybe_clone_body): Likewise.
5434 * pt.c (tsubst_enum): Likewise.
5435 (lookup_template_class): Likewise.
5436 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
5437
f749a36b
NB
54382002-08-10 Neil Booth <neil@daikokuya.co.uk>
5439
5440 * lang-specs.h: Remove -ansi.
5441
3ebf5204
NS
54422002-08-10 Nathan Sidwell <nathan@codesourcery.com>
5443
5444 * tree.c (maybe_dummy_object): Replace // with /* */
5445
9e259dd1
MM
54462002-08-09 Mark Mitchell <mark@codesourcery.com>
5447
5448 * call.c (standard_conversion): Use build_ptrmem_type.
5449 * cp-tree.h (build_ptrmem_type): New function.
5450 (adjust_result_of_qualified_name_lookup): Likewise.
5451 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
5452 static data members.
5453 (build_ptrmem_type): New function.
5454 (grokdeclarator): Do not use build_offset_type when encountering a
5455 qualified name.
5456 * parse.y (parse_finish_call_expr): Use
5457 adjust_result_of_qualified_name_lookup.
5458 * search.c (adjust_result_of_qualified_name_lookup): New function.
5459 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
5460 accessing OFFSET_TYPEs directly.
f989ed67 5461
0e339752
MS
54622002-08-08 Mike Stump <mrs@apple.com>
5463
5464 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
5465 (type_decays_to): Likewise.
5466 * class.c (find_final_overrider): Likewise.
5467 (maybe_note_name_used_in_class): Likewise.
5468 * decl.c (current_tmpl_spec_kind): Likewise.
5469 (add_binding): Likewise.
5470 (push_class_binding): Likewise.
5471 (duplicate_decls): Likewise.
5472 (layout_var_decl): Likewise.
5473 (grokfndecl): Likewise.
5474 (grokdeclarator): Likewise.
5475 (check_default_argument): Likewise.
5476 * decl2.c (handle_class_head): Likewise.
5477 * error.c (dump_template_decl): Likewise.
5478 * init.c (build_offset_ref): Likewise.
5479 * pt.c (check_specialization_scope): Likewise.
5480 (determine_specialization): Likewise.
5481 (check_explicit_specialization): Likewise.
5482 (maybe_check_template_type): Likewise.
5483 (process_partial_specialization): Likewise.
5484 (check_default_tmpl_args): Likewise.
5485 (push_template_decl_real): Likewise.
5486 (convert_template_argument): Likewise.
5487 (try_class_unification): Likewise.
5488 (get_bindings_real): Likewise.
5489 (do_decl_instantiation): Likewise.
5490 * semantics.c (begin_function_definition): Likewise.
5491 (finish_member_declaration): Likewise.
5492 (check_multiple_declarators): Likewise.
5493 * typeck.c (comp_array_types): Likewise.
5494 (comptypes): Likewise.
5495 (expr_sizeof): Likewise.
5496 (build_binary_op): Likewise.
5497 (dubious_conversion_warnings): Likewise.
5498 (check_return_expr): Likewise.
b6ce26ac 5499
a6f5b2d3
MM
55002002-08-08 Mark Mitchell <mark@codesourcery.com>
5501
5502 * typeck.c (build_class_member_access_expr): Do not return
5503 error_mark_node when no error has occurred.
b6ce26ac 5504
c93a26f5
NS
55052002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5506
5507 * typeck.c (build_component_addr): Remove.
5508 (build_unary_op): Just check it's not a bitfield, and then build
5509 an ADDR_EXPR.
5510
5bfc90de
NS
55112002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5512
5513 * class.c (convert_to_base): Correct check for error_mark_node.
5514 (create_vtable_ptr): Remove unused VFUNS_P parm.
5515
22aa533e
NS
55162002-08-08 Nathan Sidwell <nathan@codesourcery.com>
5517
5518 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
5519
50ad9642
MM
55202002-08-07 Mark Mitchell <mark@codesourcery.com>
5521
5522 Rework build_component_ref.
5523 * call.c (build_vfield_ref): Do not go through build_component_ref.
5524 (build_field_call): Use build_class_member_access_expr.
5525 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
5526 (build_object_call): Likewise.
5527 * class.c (convert_to_base): New function.
5528 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
5529 (instantiate_type): Handle BASELINKs.
5530 * cp-tree.def (BASELINK): New tree code.
5531 * cp-tree.h (BASELINK_P): Reimplement.
5532 (SET_BASELINK_P): Remove.
5533 (BASELINK_BINFO): Reimplement.
5534 (BASELINK_FUNCTIONS): Likewise.
5535 (BASELINK_ACCESS_BINFO): Likewise.
5536 (BASELINK_OPTYPE): Likewise.
5537 (convert_to_base): New function.
5538 (name_p): Likewise.
5539 (build_object_ref): Remove.
5540 (build_component_ref_1): Likewise.
5541 (build_component_ref): Likewise.
5542 (build_x_component_ref): Likewise.
5543 (build_class_member_access_expr): New function.
5544 (finish_class_member_access_expr): Likewise.
5545 (build_ptrmemfunc_access_expr): Likewise.
5546 * decl.c (grokdeclarator): Handle BASELINKs.
5547 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
5548 finish_class_member_access_expr.
5549 (arg_assoc): Handle BASELINKs.
5550 (do_class_using_decl): Likewise.
5551 * error.c (dump_decl): Likewise.
5552 (dump_expr): Use build_ptrmemfunc_access_expr.
5553 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
5554 destructors.
5555 (build_throw): Use BASELINK_FUNCTIONS.
5556 * init.c (perform_member_init): Use
5557 build_class_member_access_expr.
5558 (build_offset_ref): Handle BASELINKs. Use
5559 build_class_member_access_expr.
5560 * method.c (hack_identifier): Likewise.
5561 * parse.y (do_id): Use BASELINK, not TREE_LIST.
5562 (primary): Remove uses of build_object_ref.
5563 * pt.c (lookup_template_function): Handle BASELINKs.
5564 (resolve_overloaded_unification): Likewise.
5565 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
5566 (lookup_field): Use BASELINK, not TREE_LIST.
5567 (lookup_fnfiels): Likewise.
5568 (setup_class_bindings): Likewise.
5569 * semantics.c (finish_object_call_expr): Do not use
5570 build_method_call when we already know what function is being
5571 called.
5572 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
5573 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
5574 TREE_CHAIN.
5575 (name_p): New function.
5576 * typeck.c (build_object_ref): Remove.
5577 (build_component_ref_1): Likewise.
5578 (build_x_component_ref): Likewise.
5579 (build_class_member_access_expr): New function.
5580 (finish_class_member_access_expr): Likewise.
5581 (build_ptrmemfunc_access_expr): Likewise.
5582 (get_member_function_from_ptrfunc): Use
5583 build_ptrmemfunc_access_expr.
5584 (build_binary_op): Likewise.
5585 (build_unary_op): Likewise.
5586 (build_ptrmemfunc): Likewise.
5587 (pfn_from_ptrmemfunc): Likewise.
5588 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 5589
0b6f2917
NB
55902002-08-07 Neil Booth <neil@daikokuya.co.uk>
5591
5592 * Make-lang.in (CXX_C_OBJS): Update.
5593 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
5594 * cp-tree.h (cxx_decode_option): Remove.
5595 * decl2.c (compare_options, lang_f_options, unsupported_options,
5596 cxx_decode_option): Remove.
5597
1e14c7f0
GDR
55982002-08-06 Gabriel Dos Reis <gdr@nerim.net>
5599
5600 * typeck.c (build_x_unary_op): Handle pointer-to-member.
5601
b3426eb9
GK
56022002-08-05 Geoffrey Keating <geoffk@redhat.com>
5603
5604 * class.c: Don't include obstack.h.
b6ce26ac 5605 (popclass):
b3426eb9
GK
5606 * decl2.c: Delete bogus comment.
5607 * error.c: Don't include obstack.h.
5608 * except.c: Likewise.
5609 (dump_type): Correct comment.
5610 * method.c: Don't include obstack.h.
5611 * tree.c: Likewise.
5612
201fbb7f
GDR
56132002-08-04 Gabriel Dos Reis <gdr@nerim.net>
5614
5615 Fix PR/2213
5616 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
5617 expressions to pointer-to-data-member of pointer-to-member-functions.
5618
6d9f628e
GK
56192002-08-04 Geoffrey Keating <geoffk@redhat.com>
5620
5621 * cvt.c (ocp_convert): Delete obsolete code.
5622 * parse.y (permanent_obstack): Delete declaration.
5623 * pt.c (permanent_obstack): Delete declaration.
5624 * repo.c (permanent_obstack): Delete declaration.
5625 (open_repo_file): Use xmalloc instead of permanent_obstack.
5626 (init_repo): Use xstrdup instead of permanent_obstack.
5627
dd98e14f
NS
56282002-08-04 Nathan Sidwell <nathan@codesourcery.com>
5629
5630 * cp-tree.h (VF_DERIVED_VALUE): Remove.
5631 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
5632
e6858a84
NS
56332002-08-03 Nathan Sidwell <nathan@codesourcery.com>
5634
5635 PR 7470.
5636 C++ ABI change - vfunc ordering.
5637 * class.c (add_virtual_function): Remove.
5638 (dfs_modify_all_vtables): Take list of all declared
5639 virtuals. Assign all that are not in primary base.
5640 (check_for_override): Adjust comments.
5641 (create_vtable_ptr): Take single list of virtuals. Build chain
5642 of declared virtuals here.
5643 (layout_class_type): Take single list of virtuals. Adjust.
5644 (finish_struct_1): Keep virtuals on single list. Adjust.
5645
55765de4
MM
56462002-08-02 Mark Mitchell <mark@codesourcery.com>
5647
5648 * init.c (build_member_call): Use build_new_method_call, not
5649 build_method_call.
5650
d0067571
KW
56512002-08-02 Krister Walfridsson <cato@df.lth.se>
5652
5653 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
5654
4a34e0e8
MM
56552002-08-02 Mark Mitchell <mark@codesourcery.com>
5656
5657 * call.c (build_method_call): Issue a more helpful error message
5658 about ambiguous method names.
5659
41ab2ae2
NS
56602002-08-02 Nathan Sidwell <nathan@codesourcery.com>
5661
5662 * tree.c (build_shared_int_cst): Make cache file scope, and
5663 GTY it.
5664
367aa585
JM
56652002-08-02 Jason Merrill <jason@redhat.com>
5666
a77a9a18
JM
5667 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
5668 (cp_expr_size): New fn.
5669 * call.c (build_over_call): Lose empty class hackery.
5670 (convert_arg_to_ellipsis): Promote non-POD warning to error.
5671 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
5672
367aa585
JM
5673 * semantics.c (expand_body): Do tree optimization in the function
5674 context, too.
5675
4078b403
NB
56762002-08-01 Neil Booth <neil@daikokuya.co.uk>
5677
5678 * cp-tree.h: Move all warning and flag declarations to c-common.h.
5679 * decl.c: Move all warning and flag variables to c-common.c.
5680 * decl2.c: Move all warning and flag variables to c-common.c.
5681 * lex.c (flag_digraphs): Remove.
5682 (warn_traditional): Now in c-common.c.
5683
4ba126e4
MM
56842002-07-31 Mark Mitchell <mark@codesourcery.com>
5685
5686 * call.c (build_field_call): Do not look up the field by name.
5687 (build_method_call): Simplify.
5688 (struct z_candidate): Add access_path and conversion_path. Remove
5689 basetype_path.
5690 (convert_class_to_reference): Adjust use of
5691 add_function_candidate.
5692 (add_candidate): Add conversion_path argument.
5693 (add_function_candidate): Use it.
5694 (add_conv_dndidate): Likewise.
5695 (build_builtin_candidate): Likewise.
5696 (add_template_candidate_real): Add conversion_path argument.
5697 (add_template_conv_candidate): Likewise.
5698 (add_template_candidate): Likewise.
5699 (build_user_type_conversion_1): Use it.
5700 (build_new_function_call): Remove name lookup code. Adjust use of
5701 add_template_candidate and add_function_candidate.
5702 (build_new_op): Likewise.
5703 (convert_like_real): Use build_special_member_call.
5704 (build_over_call): Use cand->conversion_path.
5705 (build_special_member_call): New method.
5706 (build_new_method_call): Remove name lookup code.
5707 * cp-tree.def (OFFSET_REF): Update documentation.
5708 (TEMPLATE_ID_EXPR): Likewise.
5709 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
5710 (BASELINK_OPTYPE): Likewise.
5711 (build_new_method_call): Adjust prototype.
5712 (build_special_member_call): New method.
5713 (build_baselink): New method.
5714 (build_offset_ref_call_from_tree): Likewise.
5715 (build_call_from_tree): Likewise.
5716 (finish_qualified_call_expr): Remove.
5717 (finish_call_expr): Adjust prototype.
5718 (build_x_function_call): Remove.
5719 * cvt.c (ocp_convert): Use build_special_member_call.
5720 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
5721 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
5722 CALL_EXPR.
5723 (build_offset_ref_call_from_tree): New function.
5724 (build_call_from_tree): Likewise.
5725 * init.c (expand_cleanup): Use build_special_member_call.
5726 (expand_default_init): Likewise.
5727 (build_member_call): Use finish_call_expr.
5728 (build_new_1): Use build_special_member_call.
5729 (push_base_cleanups): Likewise.
5730 * method.c (do_build_assign_ref): Likewise.
5731 * parse.y (template_id): Do not pass a COMPONENT_REF to
5732 lookup_template_function.
5733 (primary): Use parse_finish_call_epxr, not finish_call_expr.
5734 (parse_finish_call_expr): New function.
5735 * pt.c (lookup_template_function): Add assertions.
5736 * search.c (lookup_base): Allow T to be a binfo.
5737 (build_baselink): New function.
5738 (lookup_member): Use it.
5739 * semantics.c (finish_call_expr): Do not do name lookup.
5740 (finish_object_call_expr): Remove #if 0'd code.
5741 (finish_qualified_call_expr): Remove.
5742 * typeck.c (build_x_function_call): Remove.
5743 (build_static_case): Use build_special_member_call.
5744 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 5745
60b8aa94
FS
57462002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5747
5748 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
5749
8a4a7242
GDR
57502002-07-30 Gabriel Dos Reis <gdr@nerim.net>
5751
5752 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
5753
03fc215c
NS
57542002-07-30 Nathan Sidwell <nathan@codesourcery.com>
5755
5756 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
5757 documentation.
5758
3f16a8f3
AM
57592002-07-29 Alan Modra <amodra@bigpond.net.au>
5760
5761 * cp-tree.h: Comment typo fix.
5762
c03d566f
RE
57632002-07-29 Richard Earnshaw <rearnsha@arm.com>
5764
5765 * spew.c (space_for_token): Allocate zeroed memory for a new token
5766 chunk.
5767
c2ef6d34
RS
57682002-07-27 Roger Sayle <roger@eyesopen.com>
5769
5770 * decl.c (builtin_function_1): No need to explicitly mark
5771 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
5772
a3926fe1
RS
57732002-07-27 Roger Sayle <roger@eyesopen.com>
5774
5775 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
5776
8e51619a
JM
57772002-07-26 Jason Merrill <jason@redhat.com>
5778
5779 * call.c (build_over_call): Likewise.
5780 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
5781 (convert_for_arg_passing): New fn.
5782 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
5783 (type_passed_as): New fn.
5784 * pt.c (tsubst_decl): Use it.
5785 * decl2.c (cp_build_parm_decl): New fn.
5786 (build_artificial_parm): Use it.
5787 (start_static_storage_duration_function): Likewise.
5788 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
5789 (grokparms): Don't mess with DECL_ARG_TYPE.
5790 * typeck.c (convert_arguments): Use convert_for_arg_passing.
5791 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5792 Define.
5793 * cp-tree.h: Declare new fns.
b6ce26ac 5794
c372b0fa
NB
57952002-07-26 Neil Booth <neil@daikokuya.co.uk>
5796
5797 * cp-tree.h (flag_operator_names): Remove.
5798 * decl2.c (flag_operator_names): Remove.
5799 (lang_f_options): Remove operator-names.
5800 * lex.c (D_OPNAME): Remove.
5801 (reswords): Remove operator names.
5802 (rid_to_yy): Remove operator names.
5803 (init_reswords): No need to handle D_OPNAME.
5804 * spew.c (read_process_identifier): There are no operator
5805 names.
5806
558ee214
JM
58072002-07-26 Jason Merrill <jason@redhat.com>
5808
5809 * dump.c (cp_dump_tree): Call c_dump_tree.
5810 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5811
81a1552d
NB
58122002-07-25 Neil Booth <neil@daikokuya.co.uk>
5813
5814 * error.c (print_whitespace): Remove.
5815 * g++spec.c (LIBUNWIND): Move.
5816 * mangle.c (mangled_position, write_signed_number): Remove.
5817
cad2c6b6
NB
58182002-07-25 Neil Booth <neil@daikokuya.co.uk>
5819
5820 * decl2.c (cxx_decode_option): Similarly.
5821
ea793912
GDR
58222002-07-25 Gabriel Dos Reis <gdr@nerim.net>
5823
5824 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
5825 (cxx_sizeof_or_alignof_type): Take a third argument.
5826 (cxx_sizeof): Adjust definition.
5827 (cxx_alignof): Likewise.
5828 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
5829 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
5830 complaining.
5831 (c_sizeof_nowarn): Remove definition.
5832 (build_unary_op): Use cxx_sizeof_nowarn.
5833
3cfab7ec
GK
58342002-07-24 Geoffrey Keating <geoffk@redhat.com>
5835
5836 * tree.c (cp_build_qualified_type_real): When copying
5837 pointer-to-method types, unshare the record that holds
5838 the cached pointer-to-member-function type.
5839
c0667597
NB
58402002-07-23 Neil Booth <neil@daikokuya.co.uk>
5841
5842 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
5843
fa72b064
GDR
58442002-07-23 Gabriel Dos Reis <gdr@nerim.net>
5845
5846 Fix PR/7363:
5847 * typeck.c (cxx_sizeof_or_alignof_type): New function.
5848 (c_sizeof): Remove definition.
5849 (expr_sizeof): Use cxx_sizeof.
5850 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5851 * decl.c (finish_destructor_body): Use cxx_sizeof.
5852 * semantics.c (finish_alignof): Likewise.
5853 (finish_alignof): Use cxx_alignof.
5854 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5855 (cxx_sizeof_or_alignof_type): Declare.
5856 (my_friendly_assert): Move to ../c-common.h.
5857
4fa31c2a
NB
58582002-07-23 Neil Booth <neil@daikokuya.co.uk>
5859
5860 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5861
0e902d98
KL
58622002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5863
5864 PR c++/7347, c++/7348
5865 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5866 * decl.c (make_typename_type): Use it.
5867 (make_unbound_class_template): Likewise.
5868 (lookup_name_real): Don't call type_access_control if scope is
5869 template parameter dependent.
5870 * parse.y (template_arg): Call make_unbound_class_template with
5871 tf_parsing set.
5872 (nest_name_specifier): Call make_typename_type with tf_parsing set.
5873 (typename_sub0): Likewise.
5874 (typename_sub1): Likewise.
5875 (instantiate_decl): Push class scope.
5876 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5877 for both static variable and member function template.
5878 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5879 and arguments.
5880 * search.c (type_access_control): Do type access for TEMPLATE_DECL
5881 too.
5882
b886c620
RS
58832002-07-20 Roger Sayle <roger@eyesopen.com>
5884
5885 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5886 test by using positive_option. Make whitespace consistent.
5887
7a561142
GDR
58882002-07-20 Gabriel Dos Reis <gdr@nerim.net>
5889
fa72b064 5890 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
5891 members with 'locus'. Adjust use throughout.
5892 (struct feed): Likewise.
5893 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5894 Adjust use.
5895 (snarf_defarg): Use error(), not error_with_file_and_line().
5896
059ba716
CD
58972002-07-19 Chris Demetriou <cgd@broadcom.com>
5898
5899 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5900 cpp_options is included.
5901
d955f6ea
KL
59022002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5903
5904 PR c++/2862, c++/2863
5905 * pt.c (determine_specialization): Compare the length of
5906 TYPE_ARG_TYPES. Tidy.
5907
d03d18e8
KL
59082002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5909
5910 PR c++/3797
5911 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 5912 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
5913 instantiation olddecl.
5914
ba59df78
KL
59152002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5916
5917 PR c++/4802, c++/5387
5918 * decl.c (make_typename_type): Use enforce_access.
5919
58f05188
SS
59202002-07-17 Scott Snyder <snyder@fnal.gov>
5921
5922 PR c++/7320
5923 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5924
04ec0065
MM
59252002-07-12 Mark Mitchell <mark@codesourcery.com>
5926
5927 * class.c (add_method): Correct handling of conversion operators.
5928
f0ab6bf2
MM
59292002-07-11 Mark Mitchell <mark@codesourcery.com>
5930
5931 PR c++/7224
5932 * class.c (add_method): Simplify.
5933
34902e16
JM
59342002-07-11 Jason Merrill <jason@redhat.com>
5935
5936 PR c++/7279
5937 * tree.c (cp_copy_res_decl_for_inlining): Also copy
5938 TREE_ADDRESSABLE.
5939
6e04241f
GS
59402002-07-10 Graham Stott <graham.stott@btinternet.com>
5941
5942 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 5943 Pass depth as int pointer.
6e04241f 5944
8ac9d31f
TJ
59452002-07-11 Tim Josling <tej@melbpc.org.au>
5946
b6ce26ac 5947 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
5948
5949 * config-lang.in (gtfiles): Add files needed for this front end.
5950
15c7fb9c
MM
59512002-07-10 Mark Mitchell <mark@codesourcery.com>
5952
5953 * cp-tree.h (unqualified_name_lookup_error): Declare it.
5954 (begin_function_definition): Adjust prototype.
5955 * lex.c (unqualified_name_lookup_error): New function, split out
5956 from ...
5957 (do_identifier): ... here.
5958 * parse.y (parse_begin_function_definition): New function.
5959 (fn.def1): Use it.
5960 * semantics.c (begin_function_definition): Accept decl-specifiers
5961 and attributes as separate parameters.
5962
abf92e26
JM
59632002-07-10 Jason Merrill <jason@redhat.com>
5964
5965 PR c++/6255
5966 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5967 modifying the old one.
5968
8ba658ee
MM
59692002-07-09 Mark Mitchell <mark@codesourcery.com>
5970
5971 * cp-tree.h (constructor_name_p): Declare it.
5972 (check_template_template_default_arg): Likewise.
5973 * class.c (handle_using_decl): Use constructor_name_p.
5974 * decl.c (grokdeclarator): Likewise.
5975 * decl2.c (constructor_name_p): Define it.
5976 * init.c (build_member_call): Use constructor_name_p.
5977 * parse.y (template_parm): Use check_template_template_default_arg.
5978 * pt.c (check_explicit_specialization): Use constructor_name_p.
5979 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 5980
d5372501
KL
59812002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5982
5983 * pt.c (can_complete_type_without_circularity): Add static to
5984 function definition.
5985
594bb0e7
MM
59862002-07-08 Mark Mitchell <mark@codesourcery.com>
5987
5988 * cp-tree.h (have_extern_spec): Declare it
5989 * decl.c (have_extern_spec): Define it.
5990 (start_decl): Eliminate use of used_extern_spec.
5991 (start_function): Likewise.
5992 * parse.y (have_extern_spec): Remove declaration.
5993 (used_extern_spec): Likewise.
5994 (frob_specs): Eliminate use of used_extern_spec.
5995 (.hush_warning): Likewise.
5996
eb8845be
MM
59972002-07-07 Mark Mitchell <mark@codesourcery.com>
5998
5999 * Make-lang.in (cp/parse.o): Depend on decl.h.
6000 * cp-tree.h (do_decl_instantiation): Change prototype.
6001 * parse.y: Include decl.h.
6002 (parse_decl_instantiation): New function.
6003 (explicit_instantiation): Use it.
6004 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6005 and DECLSPECS.
b6ce26ac 6006
78abea27
RS
60072002-07-07 Roger Sayle <roger@eyesopen.com>
6008
6009 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6010 constructor and destructor tests when passed a TEMPLATE_DECL.
6011
98c07d7b
JM
60122002-07-05 Jason Merrill <jason@redhat.com>
6013
212e17fd
JM
6014 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6015 pointers.
6016
98c07d7b
JM
6017 PR optimization/7145
6018 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6019
c6f553d1
NS
60202002-07-05 Nathan Sidwell <nathan@codesourcery.com>
6021
6022 Repair damage on weak-impared targets caused by my previous patch.
6023 * cp-tree.h (import_export_tinfo): Add parameter.
6024 * decl2.c (import_export_tinfo): Add parameter, post adjust
6025 DECL_COMDAT.
6026 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6027 import_export_tinfo.
6028
b2153b98
KL
60292002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6030
6031 PR c++/6944
6032 * init.c (build_aggr_init): Remove qualifiers of init before calling
6033 build_vec_init.
6034 (build_vec_init): Flatten multi-dimensional array during cleanup.
6035 (build_vec_delete_1): Abort if the type of each element is array.
6036
492ff760
GS
60372002-07-03 Graham Stott <graham.stott@btinternet.com>
6038
6039 * pt.c (instantiate_class_template): Fix typo.
6040
04c4491d
KL
60412002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6042
06728f70
KL
6043 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6044 by CVS conflict in my last patch.
04c4491d 6045
17f29637
KL
60462002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6047
6048 PR c++/6716
6049 * pt.c (can_complete_type_without_circularity): New function.
6050 (instantiate_class_template): Use it.
06728f70
KL
6051 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6052 message due to incomplete fields.
17f29637 6053
5d69ba1f
MM
60542002-07-01 Mark Mitchell <mark@codesourcery.com>
6055
6056 PR c++/7112
6057 * mangle.c (write_expression): Add mangling for sizeof when
6058 applied to a type.
6059 * operators.def: Remove stale comment.
6060
d689a8f1
NS
60612002-06-30 Nathan Sidwell <nathan@codesourcery.com>
6062
6063 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6064 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6065 (tinfo_decl_type): Replace with ...
6066 (type_info_ptr_type): ... this.
6067 (import_export_tinfo): Declare.
6068 (tinfo_decl_p): Rename to ...
6069 (unemitted_tinfo_decl_p): ... this.
6070 * decl2.c (import_export_decl): Break out tinfo handling into ...
6071 (import_export_tinfo): ... here. New function.
6072 (finish_file): Adjust.
6073 * rtti.c (TINFO_REAL_NAME): New macro.
6074 (init_rtti_processing): Create the tinfo types.
6075 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6076 (get_tinfo_decl): Adjust.
6077 (get_tinfo_ptr): New function.
6078 (get_type_id): Use it.
6079 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6080 (ptr_initializer): Use get_tinfo_ptr.
6081 (ptm_initializer): Likewise.
6082 (synthesize_tinfo_var): Break into ...
6083 (get_pseudo_ti_init): ... this. Just create the initializer.
6084 (get_pseudo_ti_desc): .. and this.
6085 (create_real_tinfo_var): Remove.
6086 (create_pseudo_type_info): Don't create the vtable decl here.
6087 (get_vmi_pseudo_type_info): Remove.
6088 (create_tinfo_types): Adjust.
6089 (tinfo_decl_p): Rename to ...
6090 (unemitted_tinfo_decl_p): ... here. Adjust.
6091 (emit_tinfo_decl): Adjust. Create the initializer.
6092
5ce49b4b
MM
60932002-06-27 Mark Mitchell <mark@codesourcery.com>
6094
6095 PR c++/6695
6096 * pt.c (tsubst_friend_class): Substitute into the context of the
6097 friend before using it.
6098
88e5899c
MM
60992002-06-26 Mark Mitchell <mark@codesourcery.com>
6100
6101 * cp-tree.h (xref_tag): Change prototype.
6102 (handle_class_head): Likewise.
6103 (build_x_component_ref): Likewise.
6104 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6105 (xref_tag): Take attributes as a separate parameter.
6106 (xref_tag_from_type): Adjust call to xref_tag.
6107 * decl2.c (build_expr_from_tree): Adjust call to
6108 build_x_component_ref.
6109 (handle_class_head): Take attributes as a separate parameter.
6110 * parse.y (parse_xref_tag): New function.
6111 (parse_handle_class_head): Likewise.
6112 (primary): Use parse_xref_tag.
6113 (class_head_decl): Use parse_handle_class_head.
6114 (class_head_defn): Likewise.
6115 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6116 (build_dynamic_cast_1): Likewise.
6117 (create_pseudo_type_info): Likewise.
6118 (emit_support_tinfos): Likewise.
6119 * typeck.c (build_object_ref): Adjust call to
6120 build_x_component_ref.
6121 (build_x_component_ref): Remove protect parameter.
b6ce26ac 6122
da15dae6
MM
61232002-06-25 Mark Mitchell <mark@codesourcery.com>
6124
6125 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6126 * class.c (handle_using_decl): Likewise.
6127 (instantiate_type): Likewise.
6128 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6129 (xref_basetypes): Change prototype.
6130 (begin_mem_initializers): New function.
6131 (get_overloaded_fn): Likewise.
6132 * decl.c (xref_basetypes): Simplify.
6133 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6134 * init.c (build_offset_ref): Likewise.
6135 * parse.y (base_init): Use begin_mem_initializers().
6136 (structsp): Adjust call to xref_basetypes.
6137 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6138 (instantiate_class_template): Adjust call to xref_basetypes.
6139 * semantics.c (begin_mem_initializers): New function.
6140 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6141 (really_overlaoded_fn): Likewise.
6142 (get_overloaded_fn): New function.'
6143 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 6144
5f261ba9
MM
61452002-06-24 Mark Mitchell <mark@codesourcery.com>
6146
6147 * cp-tree.h (SCALAR_TYPE_P): New macro.
6148 (check_for_out_of_scope_variable): New function.
6149 (at_class_scope_p): Likewise.
6150 (finish_fname): Likewise.
6151 * class.c (finish_struct): Use at_function_scope_p.
6152 * decl.c (check_for_out_of_scope_variable): New function, split
6153 out from do_identifier.
6154 (finish_enum): Use at_function_scope_p.
6155 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6156 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
6157 (primary): Use at_function_scope_p.
6158 * search.c (at_class_scope_p): New function.
6159 * semantics.c (finish_fname): Likewise.
6160 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 6161
80b1331c
MM
61622002-06-23 Mark Mitchell <mark@codesourcery.com>
6163
6164 * parse.y (parse_scoped_id): New function.
6165 (primary): Use it.
6166 * cp-tree.h (do_scoped_id): Adjust declaration.
6167 * lex.c (do_scoped_id): Remove call to yylex.
6168 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6169 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6170 expanding it inline.
b6ce26ac 6171
08c7ae5a
MT
61722002-06-23 Matt Thomas <matt@3am-software.com>
6173
6174 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6175 "#if VMS_TARGET".
6176
eb6b51b9
KG
61772002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6178
6179 * mangle.c (integer_type_codes): Const-ify.
6180
aa8dea09
RH
61812002-06-20 Richard Henderson <rth@redhat.com>
6182
6183 PR c++/6747
f989ed67
ZW
6184 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6185 Call put_var_into_stack.
aa8dea09 6186
62c71f4b
KG
61872002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6188
6189 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6190 array size calculation.
6191
aa16c0fa
KL
61922002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6193
6194 PR c++/6892
6195 * pt.c (tsubst_expr): Handle FILE_STMT.
6196
342cea95
KL
61972002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6198
6199 PR c++/6723
6200 * pt.c (lookup_template_class): Don't build complete argument of
6201 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6202 argument.
6203
84d901be
AD
62042002-06-19 Akim Demaille <akim@epita.fr>
6205
6206 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6207 decl.h's TYPENAME.
6208 * spew.c, lex.c: Adjust.
6209 * parse.y (explicit_instantiation): Add empty action to override
6210 the default $$ = $1 where it introduces a type clash.
6211
83b14b88
JM
62122002-06-14 Jason Merrill <jason@redhat.com>
6213
18ba380b
JM
6214 * semantics.c (begin_for_stmt): Push the 'for' scope before
6215 adding the FOR_STMT.
6216
83b14b88
JM
6217 C++ ABI changes.
6218 * class.c (build_base_field): Set DECL_PACKED.
6219 (layout_class_type): Don't use tail padding of PODs.
6220 * mangle.c (write_unqualified_name): Fix template conversion op
6221 mangling.
6222
fd852454
RH
62232002-06-16 Richard Henderson <rth@redhat.com>
6224
6225 PR opt/6793
6226 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6227 after template instantiation.
6228
750491fc
RH
62292002-06-16 Richard Henderson <rth@redhat.com>
6230
6231 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6232
f7d3c5f0
GDR
62332002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
6234
6235 * cp-tree.h (compiler_error): Remove declaration.
6236 * lex.c (compiler_error): Remove definition.
6237
893a047c
SE
62382002-06-14 Steve Ellcey <sje@cup.hp.com>
6239
6240 * g++spec.c (LIBUNWIND): New.
6241 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6242
a6f5e048
RH
62432002-06-13 Jessica Han <jessica@cup.hp.com>
6244
6245 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6246 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6247 (build_vbase_offset_vtbl_entries): Likewise.
6248 * rtti.c (build_headof): Likewise.
6249 (get_tinfo_decl_dynamic): Likewise.
6250 (create_pseudo_type_info): Likewise.
6251
e4dadd2a
SS
62522002-06-12 Stan Shebs <shebs@apple.com>
6253
6254 * mpw-config.in: Remove file, no longer used.
6255 * mpw-make.sed: Ditto.
6256
09e77dee
ZW
62572002-06-07 Zack Weinberg <zack@codesourcery.com>
6258
6259 * decl2.c: Update call to cpp_handle_option.
6260
4bafaa6f
L
62612002-06-07 H.J. Lu (hjl@gnu.org)
6262
6263 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6264
3cb8660c
GDR
62652002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6266
6267 * error.c (cp_error_at): Fix typo.
6268
47b69537
GDR
62692002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
6270
6271 * error.c (cp_diagnostic_starter): Adjust call.
6272 (maybe_print_instantiation_context): Change prototype to take a
6273 'diagnostic_info *'.
6274 (print_instantiation_full_context): Likewise.
6275 (print_instantiation_partial_context): Likewise.
6276 (cp_diagnostic_starter): Likewise.
6277 (cp_diagnostic_finalizer): Likewise.
6278 (cp_print_error_function): Likewise.
6279 (cp_printer): Take a secondary parameter as a 'text_info *'.
6280 Remove output_state savings. Adjust calls.
6281
e2500fed
GK
62822002-06-03 Geoffrey Keating <geoffk@redhat.com>
6283
6284 * pt.c (inline_parm_levels): Mark for GC.
6285
6286 * mangle.c (start_mangling): Allocate G.substitutions here...
6287 (init_mangle): ... rather than here.
6288 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
6289 * spew.c (yylexstring): Don't use VARRAY_FREE.
6290 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
6291 * decl2.c (pending_statics): Use gengtype to mark.
6292 (deferred_fns): Likewise.
6293 (ssdf_decls): Likewise.
6294 (init_decl2): Delete.
6295 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
6296 (cxx_init_decl_processing): Don't call init_decl2.
6297 (cxx_pop_function_context): Don't use VARRAY_FREE.
6298 * cp-tree.h (struct saved_scope): No need for special marking
6299 of varrays.
6300 (struct language_function): Likewise.
6301 (local_classes): Use gengtype to mark.
6302 (init_decl2): Delete prototype.
6303 * class.c (init_class_processing): Don't use
6304 ggc_add_tree_varray_root.
6305 (build_vtbl_initializer): Don't use VARRAY_FREE.
6306
6307 * decl.c (typename_compare): Don't use same_type_p.
6308
6309 * decl.c: Include hashtab.h instead of hash.h.
6310 (typename_hash): Update to use htab_h.
6311 (typename_compare): Likewise.
6312 (typename_htab): Use gengtype to mark.
6313 (build_typename_type): Update to use htab_h.
6314 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
6315
6316 * Make-lang.in (gt-cp-tree.h): New rule.
6317 (cp/tree.o): Depend on gt-cp-tree.h.
6318 * config-lang.in (gtfiles): Add cp/tree.c.
6319 * tree.c: Include gt-cp-tree.h.
6320 (list_hash_table): Use gengtype to mark.
6321 (init_tree): Use gengtype to mark trees.
6322
6323 * Make-lang.in (cp/decl.o): Add debug.h dependency.
6324 * call.c (struct z_candidate): Use gengtype.
6325 (USER_CONV_CAND): Use WRAPPER_ZC.
6326 (convert_class_to_reference): Use build_zc_wrapper.
6327 (build_type_conversion_1): Likewise.
6328 (build_over_call): Use WRAPPER_ZC.
6329 (add_warning): Use build_zc_wrapper.
6330 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
6331 * cp-tree.h (struct lang_identifier): Use gengtype.
6332 (struct template_parm_index_s): Likewise.
6333 (struct ptrmem_cst): Likewise.
6334 (struct tree_binding): Likewise.
6335 (struct tree_overload): Likewise.
6336 (struct tree_srcloc): Likewise.
6337 (struct tree_wrapper): Likewise. Also modify to have a pointer
6338 to struct z_candidate rather than void.
6339 (enum cp_tree_node_structure_enum): New.
6340 (union lang_tree_node): New.
6341 (cxx_mark_tree): Delete prototype.
6342 (cp_tree_node_structure): New prototype.
6343 (build_ptr_wrapper): Delete prototype.
6344 (build_int_wrapper): Delete prototype.
6345 (build_zc_wrapper): New prototype.
6346 * decl.c: Include debug.h
6347 (cxx_mark_tree): Delete.
6348 (cp_tree_node_structure): New.
6349 * tree.c (build_ptr_wrapper): Delete.
6350 (build_int_wrapper): Delete.
6351 (build_zc_wrapper): New.
6352
6353 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
6354 Correct typo. Patch from k_fukui@highway.ne.jp.
6355
6356 * semantics.c (current_stmt_tree): Update for change to
6357 struct language_function.
6358 (finish_mem_initializers): Likewise.
6359 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
6360 * cp-tree.h (struct language_function): Rename from
6361 cp_language_function. Change all uses.
6362 (cp_function_chain): Don't need to cast.
6363
6364 * class.c (duplicate_tag_error): Reset discriminator.
6365 (check_bases_and_members): Update for data structure changes.
6366 * cp-tree.h (struct lang_id2): Use gengtype.
6367 (flagged_type_tree): Likewise.
6368 (SET_LANG_ID): Use GGC on struct lang_id2.
6369 (struct cp_language_function): Use gengtype. Remove field
6370 'x_vcalls_possible_p'.
6371 (current_vcalls_possible_p): Delete.
6372 (struct lang_type_header): New.
6373 (struct lang_type_class): Rename from struct lang_type. Include
6374 struct lang_type_header.
6375 (struct lang_type_ptrmem): New.
6376 (struct lang_type): New.
6377 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
6378 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
6379 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
6380 (struct lang_decl_flags): Use gengtype. Add discriminators.
6381 (struct lang_decl): Use gengtype. Add and use discriminators.
6382 Update the macros that reference moved fields.
6383 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
6384 (SET_DECL_THUNK_P): Set discriminator too.
6385 (clear_inline_text_obstack): Delete prototype.
6386 (finish_inline_definitions): Delete prototype.
6387 (mark_pending_inlines): Delete prototype.
6388 (lang_check_failed): New prototype.
6389 * decl.c (struct named_label_use_list): Use gengtype.
6390 (struct named_label_list): Likewise.
6391 (mark_binding_level): Delete.
6392 (mark_named_label_lists): Delete.
6393 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
6394 (cxx_init_decl_processing): Use generated marker routine.
6395 (begin_destructor_body): Delete dead set to
6396 current_vcalls_possible_p.
6397 (mark_lang_function): Delete.
6398 (mark_cp_function_context): Delete.
6399 (lang_mark_tree): Use generated marker routines.
6400 * decl2.c (start_objects): Set discriminator when setting
6401 GLOBAL_INIT_PRIORITY.
6402 * lex.c (retrofit_lang_decl): Set discriminators.
6403 (copy_lang_type): Update for changes to lang_type structure.
6404 (cp_make_lang_type): Set discriminator.
6405 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
6406 * search.c: Include ggc.h.
6407 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
6408 (finish_inline_definitions): Delete.
6409 * spew.c (struct token): Use gengtype.
6410 (struct token_chunk): New.
6411 (struct unparsed_text): Use gengtype. Store tokens in chunks.
6412 (struct feed): Use gengtype.
6413 (feed_obstack): Delete.
6414 (feed): Mark as GC root.
6415 (pending_inlines): Mark as GC root.
6416 (pending_inlines_tail): Likewise.
6417 (processing_these_inlines): Likewise.
6418 (token_obstack): Make static.
6419 (first_token): Likewise.
d30d6e7a 6420 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
6421 (clear_inline_text_obstack): Delete.
6422 (feed_input): Use GC for struct feed. Update for changes to
6423 struct unparsed_text.
6424 (mark_pending_inlines): Delete.
6425 (next_token): Rename from add_token. Change all callers. Update
6426 for changes to struct unparsed_text.
6427 (space_for_token): New.
6428 (remove_last_token): New.
6429 (alloc_unparsed_text): New.
6430 (snarf_block): Take an unparsed_text. Update for changes to struct
6431 unparsed_text.
6432 (snarf_method): Update for changes to struct unparsed_text.
6433 (snarf_defarg): Update for changes to struct unparsed_text.
6434 * tree.c (lang_check_failed): New.
6435
6436 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
6437 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
6438 (cp/spew.o): Add dependency on gt-<filename>.h.
6439 (cp/decl2.o): Add dependency on gt-<filename>.h.
6440 (cp/call.o): Add dependency on gt-<filename>.h.
6441 (cp/pt.o): Add dependency on gt-<filename>.h.
6442 (cp/repo.o): Add dependency on gt-<filename>.h.
6443 (cp/parse.o): Add dependency on gt-<filename>.h.
6444 * call.c: Use gengtype for roots.
6445 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
6446 decl2.c parse.y pt.c repo.c spew.c.
6447 * cp-tree.h: Use gengtype for roots.
6448 (struct saved_scope): Use GGC, gengtype.
6449 (cp_parse_init): Delete prototype.
6450 (init_pt): Delete prototype.
6451 * decl.c: Use gengtype for roots.
6452 (mark_saved_scope): Delete.
6453 (cxx_init_decl_processing): Don't call deleted initilisation
6454 routines.
6455 (signed_size_zero_node): Delete, unused.
6456 * decl.h: Use gengtype for roots.
6457 * decl2.c: Use gengtype for roots.
6458 * lex.h: Use gengtype for roots.
6459 * parse.y: Use gengtype for roots.
6460 (cp_parse_init): Delete.
6461 * pt.c: Use gengtype for roots.
6462 (init_pt): Delete.
6463 * repo.c: Use gengtype for roots.
6464 * spew.c: Use gengtype for roots.
6465
6466 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
6467 (cp/decl.o): Add dependency on gtype-cp.h.
6468 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
6469 Include gtype-cp.h. Allow for filename changes.
6470
6471 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
6472 (cp/decl.o): Add cp/gt-decl.h dependency.
6473 * config-lang.in (gtfiles): New.
6474 * tree.h: Rename struct binding_level to struct cp_binding_level.
6475 * decl.c: Rename struct binding_level to struct cp_binding_level.
6476 Include cp/gt-decl.h.
6477 (struct cp_binding_level): Use gengtype.
6478 (make_binding_level): Use GGC on struct cp_binding_level.
6479 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
6480 (cxx_init_decl_processing): Mark free_binding_level as
6481 deletable.
6482
6483 * decl.c (mark_cp_function_context): Update calling sequence.
6484
6485 * decl.c (start_function): Don't free 'struct
6486 cp_language_function'.
6487 (pop_cp_function_context): Likewise.
6488 (save_function_data): Allocate it using GC.
6489 * semantics.c (genrtl_start_function): Don't free 'struct
6490 cp_language_function'.
6491
8b968bd1
MW
64922002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
6493
6494 * lang-specs.h: Use cpp_debug_options.
6495
11ad4784
ZW
64962002-05-28 Zack Weinberg <zack@codesourcery.com>
6497
6498 * mangle.c, tree.c: Include real.h.
6499 * Make-lang.in: Update dependency lists.
6500
81a75f0f
NB
65012002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
6502
6503 * lex.c: Don't include c-lex.h.
6504 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
6505
a97d1398
NB
65062002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
6507
6508 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
6509
6f001fdf
RH
65102002-05-22 Richard Henderson <rth@redhat.com>
6511
6512 * decl.c (obscure_complex_init): Check for VAR_DECL
6513 before using DECL_THREAD_LOCAL.
6514
7a1f3f5f
RH
65152002-05-22 Richard Henderson <rth@redhat.com>
6516
6517 * decl.c (check_tag_decl): Handle RID_THREAD.
6518 (obscure_complex_init): Reject run-time init of tls.
6519 (grokvardecl, grokdeclarator): Handle RID_THREAD.
6520 * lex.c (reswords): Add __thread.
6521 (rid_to_yy): Map RID_THREAD to SCSPEC.
6522
e5f3b786
NB
65232002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
6524
6525 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
6526 * cp-tree.h (cxx_post_options): Kill.
6527 * cp-lex.c (cxx_post_options): Kill.
6528
3d78f2e9
RH
65292002-05-21 Richard Henderson <rth@redhat.com>
6530
6531 * lex.c (rid_to_yy): Add RID_THREAD.
6532
c8a3d889
AO
65332002-05-21 Alexandre Oliva <aoliva@redhat.com>
6534
6535 * init.c (build_vec_init): Test for trivial copy-assignment when
6536 copy-assigning arrays.
6537
500abaa8
AJ
65382002-05-20 Andreas Jaeger <aj@suse.de>
6539
6540 * init.c (build_default_init): Remove unused variable.
6541
ecc42c14
AO
65422002-05-20 Alexandre Oliva <aoliva@redhat.com>
6543
6544 * call.c (any_strictly_viable): New.
6545 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
6546
4e664ef1
KL
65472002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6548
6549 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
6550
07782718
KL
65512002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6552
6553 PR c++/186, DR 259
6554 * pt.c (do_decl_instantiation): Don't complain explicit
6555 instantiation after explicit specialization.
6556 (do_type_instantiation): Likewise.
6557
23b4deba
AO
65582002-05-19 Alexandre Oliva <aoliva@redhat.com>
6559
6560 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
6561 renamed from...
6562 (complete_type_or_else): ... this. Redefined as macro.
6563 (cxx_incomplete_type_diagnostic): Declare.
6564 (cxx_incomplete_type_error): Define as macro.
6565 * init.c (build_delete): Warn about incomplete types other than
6566 void, and use the built-in operator delete for them.
6567 * typeck.c (complete_type_or_diagnostic): Renamed from
6568 complete_type_or_else. Added warn_only argument, passed to...
6569 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
6570 warnings or errors depending on new warn_only argument. Renamed
6571 from...
6572 (cxx_incomplete_type_error): ... this. New implementation in
6573 terms of cxx_incomplete_type_diagnostic.
6574
b41d214e
JM
65752002-05-18 Jason Merrill <jason@redhat.com>
6576
98c07d7b 6577 PR c++/6611
b41d214e
JM
6578 * decl2.c (import_export_decl): If we clear
6579 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
6580
e2005c8d
KL
65812002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6582
6583 PR c++/6620
6584 * pt.c (verify_class_unification): Don't check if PARM is template
6585 parameter dependent. Simplify.
6586 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
6587 parameter dependent expression.
6588
ff48be5c
JM
65892002-05-14 Jason Merrill <jason@redhat.com>
6590
6591 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
6592 Do set DECL_COMDAT.
6593 (synthesize_tinfo_var): Take the public decl.
6594 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
6595 (emit_tinfo_decl): Adjust. Call import_export_decl.
6596 * decl2.c (import_export_decl): Simplify tinfo decl handling.
6597
94e6e4c4
AO
65982002-05-14 Alexandre Oliva <aoliva@redhat.com>
6599
6600 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 6601 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
6602 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
6603 * class.c (check_field_decls): Test non_zero_init.
6604 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
6605 zero-to-NULL conversions.
6606 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
6607 type that needs zero-initialization without zeros.
6608 (check_initializer_decl): Compute zero-initializer for types
6609 that require a non-trivial one.
6610 * init.c (build_forced_zero_init): New function.
6611 (build_default_init): Use it.
6612 * tree.c (zero_init_p): New function.
6613 * typeck2.c (force_store_init_value): New function.
6614 (process_init_constructor): Create non-trivial zero-initializers
6615 for array members and class fields.
6616
e5f5feea
NB
66172002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
6618
6619 * lang-specs.h: Remove redundant -lang-c++.
6620
f63ab951
JM
66212002-05-13 Jason Merrill <jason@redhat.com>
6622
6623 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
6624 (fixed_type_or_null): See through reference vars.
6625 (build_base_path): Vtable contents are constant.
6626 * typeck.c (get_member_function_from_ptrfunc): Likewise.
6627
0d08ea48
JM
66282002-05-12 Jason Merrill <jason@redhat.com>
6629
6630 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
6631 structs are safe.
6632
3df89291
NB
66332002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
6634
6635 * cp-tree.h (flag_ansi): Remove.
6636 * decl2.c (flag_ansi): Remove.
6637 (cxx_decode_option): Set flag_iso and flag_undef.
6638
c87978aa
JM
66392002-05-09 Jason Merrill <jason@redhat.com>
6640
6641 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
6642 Use subtraction rather than a bitmask to get the index.
6643 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
6644
6645 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
6646
a5a49440
NB
66472002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
6648
6649 * Make-lang.in (decl2.o): Update.
6650 * cp-tree.h (warn_multichar): Remove.
6651 * decl2.c: Include c-common.h.
6652 (warn_multichar): Remove.
6653
609688f3
JM
66542002-05-03 Jason Merrill <jason@redhat.com>
6655
0abc082a
JM
6656 * tree.c (build_cplus_array_type): Only const and volatile get
6657 special handling.
6658
609688f3
JM
6659 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
6660
8b16faa2
MM
66612002-04-30 Mark Mitchell <mark@codesourcery.com>
6662
394ab947 6663 ABI change, returning simple classes from functions.
8b16faa2
MM
6664 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
6665 TYPE_HAS_TRIVIAL_INIT_REF is false or
6666 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
6667
ac905924
JM
66682002-04-30 Jason Merrill <jason@redhat.com>
6669
2cb008af 6670 PR debug/6436
ac905924
JM
6671 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
6672 anonymous class with a typedef if there are attributes.
6673
e6e81f1c 66742002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 6675
e6e81f1c 6676 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 6677
3a73bffb
JJ
66782002-04-29 Jakub Jelinek <jakub@redhat.com>
6679
6680 PR c++/6477
6681 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
6682 non-NULL first.
6683
33dd07ee
MM
66842002-04-29 Mark Mitchell <mark@codesourcery.com>
6685
6686 PR c++/6492
6687 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
6688 enter that scope before name lookup.
6689
6690 PR c++/6486
6691 * method.c (do_build_copy_constructor): Avoid building
6692 cv-qualified reference types.
500abaa8 6693
4bd7c270
NS
66942002-04-29 Nathan Sidwell <nathan@codesourcery.com>
6695
6696 PR c++/5719
500abaa8 6697 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
6698 by value. operator% should.
6699
45806a3f
FS
67002002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
6701
6702 PR c/6343
6703 * decl.c (duplicate_decls): Call merge_weak.
6704
94a50397
RH
67052002-04-26 Richard Henderson <rth@redhat.com>
6706
6707 * parse.y (malloced_yyss, malloced_yyvs): New.
6708 (yyoverflow): Re-add. Set them.
6709 (free_parser_stacks): New.
6710
7d793e9b
MM
67112002-04-26 Mark Mitchell <mark@codesourcery.com>
6712
6713 PR c++/6497
6714 * method.c (do_build_assign_ref): Pass a derivation to
6715 build_method_call when calling base class assignment operators.
6716
bde3c0c0
RH
67172002-04-26 Richard Henderson <rth@redhat.com>
6718
6719 * parse.y (yyoverflow): Revert.
6720
b84a3874
RH
67212002-04-26 Richard Henderson <rth@redhat.com>
6722
6723 PR c/3581
6724 * parse.y (string): Remove. Update all uses to use STRING
6725 instead, and not call combine_strings.
6726 * rtti.c (tinfo_name): Use fix_string_type.
6727 * semantics.c (finish_asm_stmt): Don't call combine_strings.
6728 * spew.c (yylexstring): New.
6729 (read_token): Use it.
6730
6052bef0
RH
67312002-04-25 Richard Henderson <rth@redhat.com>
6732
6733 PR c/2161
6734 * parse.y (yyoverflow): New.
6735
8d1f0f67
JM
67362002-04-25 Jason Merrill <jason@redhat.com>
6737
6738 PR c++/5607
6739 * search.c (check_final_overrider): No longer static.
6740 * class.c (update_vtable_entry_for_fn): Call it.
6741 * cp-tree.h: Adjust.
6742
ff45c01e
NB
67432002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
6744
6745 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6746 * cp-tree.h (cxx_set_yydebug): Die.
6747 * lex.c (YYDEBUG): Get from c-lex.h.
6748 (cxx_set_yydebug): Remove.
6749 * parse.y: Include c-lex.h.
6750 (YYDEBUG): Get from c-lex.h.
6751
a62d375f
MM
67522002-04-24 Mark Mitchell <mark@codesourcery.com>
6753
6754 PR c++/6438.
6755 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
6756 void.
6757
349ae713
NB
67582002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
6759
6760 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
6761 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
6762 Redefine.
6763 * cp-tree.h (cp_attribute_table): Rename.
6764 * decl.c (lang_attribute_table): Remove declaration.
6765 (cxx_init_decl_processing): Don't set it.
6766 * tree.c (cp_attribute_table): Rename.
6767
b602511f
JM
67682002-04-24 Jason Merrill <jason@redhat.com>
6769
985723ce
JM
6770 PR c++/6331
6771 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
6772 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
6773 The pedwarn for array assignment is now unconditional.
6774 * tree.c (build_cplus_array_type_1): Still process simple array types
6775 normally in templates.
985723ce 6776
b602511f
JM
6777 PR c++/6395
6778 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
6779 stuff for comdats.
6780
29cece2e
JJ
67812002-04-23 Jakub Jelinek <jakub@redhat.com>
6782
6783 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
6784 node with attributes.
6785
515387dc
DB
67862002-2-23 David O'Brien <obrien@FreeBSD.org>
6787
6788 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
6789 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
6790
77adef84
MM
67912002-04-23 Mark Mitchell <mark@codesourcery.com>
6792
6793 PR c++/6256:
6794 * pt.c (tsubst_friend_class): Handle templates with explicit
6795 nested names.
6796
6797 PR c++/6331:
6798 * typeck.c (merge_types): Remember the cv-qualification of pointer
6799 types when merging them.
6800
b03e38e1
NB
68012002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
6802
6803 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
6804 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
6805 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6806 cxx_mark_function_context): New.
6807 * decl.c (push_cp_function_context, pop_cp_function_context,
6808 mark_cp_function_context): Rename for consistency.
6809 (cxx_init_decl_processing): Don't set old hooks.
6810
ab393bf1
NB
68112002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
6812
6813 * call.c (convert_type_from_ellipsis): Rename, update.
6814 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
6815 * cp-tree.h (convert_type_from_ellipsis): Rename.
6816 * decl.c (cxx_init_decl_processing): Don't set hook.
6817
7a228918
NB
68182002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
6819
6820 * call.c (build_new_method_call): Update.
6821 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
6822 * cp-tree.h (cxx_incomplete_type_error): New.
6823 * decl.c (grokdeclarator, grokparms): Update.
6824 * decl2.c (check_classfn): Update.
6825 * pt.c (tsubst): Update.
6826 * typeck.c (complete_type_or_else, expr_sizeof,
6827 decay_conversion): Update.
6828 * typeck2.c (incomplete_type_error): Rename.
6829 (add_exception_specifier): Update.
6830
8152c320
JM
68312002-04-18 Jason Merrill <jason@redhat.com>
6832
6833 PR c++/5658
6834 * search.c (setup_class_bindings): A class template qualifies as a
6835 type binding.
6836
32121b96
JJ
68372002-04-17 Jakub Jelinek <jakub@redhat.com>
6838
6839 PR c++/6316
6840 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
6841 before expanding.
6842
b2123dc0
MM
68432002-04-16 Mark Mitchell <mark@codesourcery.com>
6844
6845 * init.c (begin_init_stmts): Remove commented out code.
6846 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6847 * semantics.c (begin_gobal_stmt_expr): Adjust call to
6848 expand_start_stmt_expr.
500abaa8 6849
0f268005
MM
68502002-04-15 Mark Mitchell <mark@codesourcery.com>
6851
6852 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6853 dso_handle itself, to __cxa_atexit.
6854
bd6bec6b
GDR
68552002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6856
6857 * error.c (cxx_print_error_function): Adjust call to macros.
6858
0f490a2b
JJ
68592002-04-14 Jakub Jelinek <jakub@redhat.com>
6860
6861 * class.c (layout_virtual_bases): Do all dsize computation on trees.
6862
85b7def6
JM
68632002-04-14 Jason Merrill <jason@redhat.com>
6864
6865 * typeck.c (get_member_function_from_ptrfunc): Don't do
6866 gratuitious division and multiplication on
6867 ptrmemfunc_vbit_in_delta targets.
6868
0481bc21
MM
68692002-04-12 Mark Mitchell <mark@codesourcery.com>
6870
6871 PR c++/5373.
6872 * semantics.c (finish_expr_stmt): Remember the type of the
6873 expression before any conversions are performed.
6874
9928a3d5
MM
68752002-04-12 Mark Mitchell <mark@codesourcery.com>
6876
6877 PR c++/5189.
6878 * call.c (add_template_candidate_real): Do not treat member
6879 templates as copy constructors.
6880
c740732f
MM
68812002-04-12 Mark Mitchell <mark@codesourcery.com>
6882
6883 * decl.c (duplicate_decls): Do not copy the RTL for a variable
6884 declaration if the old variable had an incomplete type and the new
6885 variable does not.
6886 (complete_vars): Do not call layout_decl for completed variables.
6887
4782bd5b
RS
68882002-04-12 Richard Sandiford <rsandifo@redhat.com>
6889
6890 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6891 with an explicit one.
6892 (follow_tag_typedef): New.
6893 (lookup_tag): Use it to extract the tag of an explicit typedef.
6894 (xref_tag): Likewise.
6895
2f4d058f
AH
68962002-04-11 Andrew Haley <aph@redhat.com>
6897
6898 * typeck.c (type_after_usual_arithmetic_conversions):
6899 If two types have the same variant, return immediately.
500abaa8 6900 When two floating-point operands are the same precision:
2f4d058f
AH
6901 convert to float if one of the operands is float;
6902 if neither operand is one of the standard types, return the type
6903 of the first operand.
500abaa8 6904
ba3307c0
NS
69052002-04-10 Nathan Sidwell <nathan@codesourcery.com>
6906
6907 PR c++/5507
6908 * decl.c (make_typename_type): Remove implicit typenameness.
6909
cd6af0c1
JM
69102002-04-09 Jason Merrill <jason@redhat.com>
6911
edf5cd1d
JM
6912 PR optimization/6189
6913 * semantics.c (genrtl_start_function): Don't free
6914 DECL_SAVED_FUNCTION_DATA for inline functions.
6915
cd6af0c1
JM
6916 * init.c (build_member_call): For now, don't convert to
6917 intermediate base if it would cause an error.
6918
224e6091
PC
69192002-04-08 Paolo Carlini <pcarlini@unitus.it>
6920
6921 * parse.y (namespace_qualifier, maybe_identifier,
6922 begin_explicit_instantiation, end_explicit_instantiation,
6923 apparent_template_type, .finish_template_type,
6924 do_id, maybe_init, defarg_again, component_decl_1):
6925 Add ending ';', in accordance with POSIX.
6926
0154eaa8
MM
69272002-04-06 Mark Mitchell <mark@codesourcery.com>
6928
6929 PR c++/5571
6930 * class.c (layout_class_type): Remember incomplete static
6931 variables.
6932 (finish_struct_1): Call complete_vars, not
6933 hack_incomplete_structures.
6934 * cp-tree.h (hack_incomplete_structures): Rename to ...
6935 (complete_vars): ... this.
6936 (struct saved_scope): Remove incomplete.
6937 (namespace_scope_incomplete): Remove.
6938 * decl.c (struct binding_level): Remove incomplete.
6939 (incomplete_vars): New variable.
6940 (mark_binding_level): Don't mark incomplete.
6941 (print_binding_level): Don't print it.
6942 (mark_saved_scope): Don't mark incomplete.
6943 (pushdecl): Use maybe_register_incopmlete_var.
6944 (cxx_init_decl_processing): Register incomplete_vars for GC.
6945 (start_decl_1): Clarify error message.
6946 (hack_incomplete_vars): Remove.
6947 (maybe_register_incomplete_var): New function.
6948 (complete_vars): Likewise.
6949
f62ea157
JM
69502002-04-06 Jason Merrill <jason@redhat.com>
6951
03da5286
JM
6952 PR c++/4934
6953 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6954 set before checking it.
6955
a29e1034
JM
6956 PR c++/525
6957 * init.c (build_member_call): Use build_scoped_ref.
6958 (resolve_offset_ref): Likewise.
6959 * call.c (build_scoped_method_call): Likewise.
500abaa8 6960 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
6961 wrong.
6962 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6963 * cp-tree.h: Adjust.
500abaa8 6964
a29e1034
JM
6965 * init.c (push_base_cleanups): Just use build_scoped_method_call.
6966
f62ea157 6967 PR c++/6179
500abaa8 6968 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
6969 synthesize_exception_spec.
6970
78ef5b89
NB
69712002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
6972
6973 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6974 * cvt.c: Update comment.
6975 * init.c (expand_cleanup_for_base): Update.
6976 * semantics.c (finish_parenthesized_expr): Update.
6977 * typeck.c (cp_truthvalue_conversion): Update.
6978
dffa4176
JM
69792002-04-04 Jason Merrill <jason@redhat.com>
6980
659e5a7a
JM
6981 * semantics.c (finish_eh_cleanup): New fn.
6982 * cp-tree.h: Add prototype.
500abaa8 6983 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
6984 finish_eh_cleanup.
6985 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6986 * cp-tree.h: Remove references.
6987 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6988 * dump.c (cp_dump_tree): Likewise.
6989 * pt.c (tsubst_expr): Likewise.
6990 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6991 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6992 * tree.c (cp_statement_code_p): Likewise.
6993
6994 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6995
6996 PR c++/5636
6997 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6998 cleanup for nrv.
6999
dffa4176
JM
7000 PR c++/5104
7001 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7002 specifiers.
7003 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7004
ef4f94ac
RH
70052002-04-03 Richard Henderson <rth@redhat.com>
7006
7007 * cp-lang.c (cxx_warn_unused_global_decl): New.
7008 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7009
599bba86
NB
70102002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
7011
7012 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7013 * tree.c (init_tree): Don't set hook.
7014
cba2004a
RS
70152002-04-03 Roger Sayle <roger@eyesopen.com>
7016
7017 PR c++/5998:
7018 * decl.c (duplicate_decls): Don't mess with assembler names when
7019 redeclaring builtin functions as static.
7020
dffd7eb6
NB
70212002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7022
7023 * call.c (build_addr_func): Update.
7024 * class.c (resolve_address_of_overloaded_function): Update.
7025 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7026 * cp-tree.h (cxx_mark_addressable): New.
7027 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7028 * decl2.c (build_cleanup): Update.
7029 * except.c (build_throw): Update.
7030 * init.c (resolve_offset_ref): Update.
7031 * pt.c (convert_nontype_argument): Update.
7032 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7033 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7034 unary_complex_lvalue): Update.
7035 (mark_addressable): Rename.
7036
04a9d080
RS
70372002-04-01 Roger Sayle <roger@eyesopen.com>
7038
7039 PR c++/5998:
7040 * decl.c (duplicate_decls): Overwrite the RTL when (and only
7041 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
7042 but follow the SET_DECL_RTL idiom used elsewhere in the function.
7043
ceef8ce4
NB
70442002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7045
7046 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7047 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7048 * decl.c (grokdeclarator): Update.
7049 * mangle.c (write_integer_cst): Update.
7050 * typeck.c (build_binary_op): Update.
7051
48a7a235
NB
70522002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7053
7054 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7055 * lex.c (cxx_init): Don't set hook.
7056
7cb32822
NB
70572002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7058
7059 * Make-lang.in (error.o): Update.
7060 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7061 * cp-tree.h (struct diagnostic_context): Predeclare.
7062 (cxx_print_error_function): New.
7063 * error.c: Include langhooks-def.h.
7064 (lang_print_error_function): Rename. Update.
7065 (init_error): Don't set hook.
7066
b0c48229
NB
70672002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7068
7069 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7070 Redefine.
7071 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7072 * decl.c (finish_enum): Similarly.
7073 * error.c (dump_type): Similarly.
7074 * lex.c (cxx_init): Similarly.
7075 * mangle.c (write_builtin_type): Similarly.
7076 * typeck.c (comptypes): Similarly.
7077
d52e4867
RS
70782002-03-28 Roger Sayle <roger@eyesopen.com>
7079
7080 PR c++/5998:
7081 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7082 in the g++ front-end.
7083 (duplicate_decl): Allow redefinition of anticipated built-ins.
7084 Fix inlining problem by over-writing the old DECL_RTL.
7085 (lookup_namespace_name): Fail to find an identifier in the
7086 specified namespace if its still anticipated.
7087 (builtin_function_1): New function split out from builtin_function
7088 to create a builtin in the current namespace with given context.
7089 (builtin_function): Call builtin_function_1 to define the
7090 appropriate builtins in both the std and global namespaces.
7091 (select_decl): Don't test for anticipated decls here.
7092 (unqualified_namespace_lookup): Instead ignore them whilst
7093 searching through scopes and namespaces.
7094 * decl2.c (do_nonmember_using_decl): If a using declaration
7095 specifies an anticipated built-in function, mark it as no longer
7096 anticipated in that scope.
7097 (ambiguous_decl): Avoid resolving to an anticipated decl.
7098 * lex.c (do_scoped_id): Fail to find an identifier in the global
7099 namespace if its still anticipated.
7100
f1e639b1
NB
71012002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7102
7103 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7104 * cp-tree.h (cp_make_lang_type): Rename.
7105 * lex.c (cp_make_lang_type): Rename.
7106 (make_aggr_type): Update.
7107 * tree.c (init_tree): Don't set make_lang_type_fn.
7108
c7f4981a
JJ
71092002-03-29 Jakub Jelinek <jakub@redhat.com>
7110
7111 PR c++/6073
7112 * class.c (finish_struct_1): Update static field's DECL_MODE even
7113 if its type is a variant of t.
7114
7ffb4fd2
NB
71152002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7116
7117 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7118 * cp-tree.h (cxx_insert_default_attributes): New.
7119 * decl.c (insert_default_attributes): Rename.
7120
cd4e8331
MM
71212002-03-27 Mark Mitchell <mark@codesourcery.com>
7122
7123 PR c++/4884
7124 * call.c (build_op_delete_call): Allow for the fact the placement
7125 may be a COMPOUND_EXPR.
500abaa8 7126
c9d892a8
NB
71272002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7128
7129 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7130 * cp-tree.h (init_cplus_expand): Remove.
7131 (cxx_expand_expr): New.
7132 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7133 fix prototype.
7134 (init_cplus_expand): Remove.
7135 * lex.c (cxx_init): Don't call init_cplus_expand.
7136
46ff5047
MM
71372002-03-26 Mark Mitchell <mark@codesourcery.com>
7138
7139 PR c++/4884.
7140 * init.c (build_new_1): Allow for the fact the result of
7141 build_function_call may be a COMPOUND_EXPR.
7142
6d4c57a0
NS
71432002-03-26 Nathan Sidwell <nathan@codesourcery.com>
7144
7145 PR c++/5682
7146 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7147 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7148 (dfs_skip_nonprimary_vbases_markedp): Remove.
7149 * search.c (get_shared_vbase_if_not_primary): Remove.
7150 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7151 (dfs_skip_nonprimary_vbases_markedp): Remove.
7152 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7153 (dfs_marked_real_bases_queue_p): Likewise.
7154
4f0ade92
NB
71552002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7156
7157 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7158 * cp-tree.h (cxx_mark_tree): New.
7159 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7160
c88770e9
NB
71612002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7162
7163 * cp-tree.h (cxx_maybe_build_cleanup): New.
7164 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7165 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7166 * tree.c (build_target_expr): Update.
7b3e5198 7167 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 7168
aaf93206
NB
71692002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
7170
7171 * decl2.c (cxx_decode_option): Handle -E.
7172 * lang-specs.h (default_compilers): Preprocess with cc1plus.
7173 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7174
e756a7da
JJ
71752002-03-23 Jakub Jelinek <jakub@redhat.com>
7176
7177 PR c++/6037
7178 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7179
ea9264e9
GDR
71802002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7181
7182 * error.c (dump_type): Be careful about implicit typenames.
7183
acb044ee
GDR
71842002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
7185
7186 PR C++/3656
7187 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 7188 classes.
acb044ee 7189
b216cd4a
ZW
71902002-03-22 Zack Weinberg <zack@codesourcery.com>
7191
7192 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7193 REAL_IS_NOT_DOUBLE.
7194
9181f8db
JK
71952002-03-22 Jeff Knaggs <jknaggs@redhat.com>
7196
cd6af0c1
JM
7197 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7198 an index into the vtable_entry array regardless of
9181f8db
JK
7199 TARGET_PTRMEMFUNC_VBIT_LOCATION.
7200
e019cf95
AH
72012002-03-21 Aldy Hernandez <aldyh@redhat.com>
7202
84d901be 7203 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 7204
43577e6b
NB
72052002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7206
7207 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7208 insert_block, getdecls, global_bindings_p): New.
7209
8c152bad
NS
72102002-03-20 Nathan Sidwell <nathan@codesourcery.com>
7211
7212 PR c++/4361
7213 * mangle.c (struct globals) Add internal_mangling_p member.
7214 (write_template_param): Do internal mangling, if needed.
7215 (mangle_conv_op_name_for_type): Request internal mangling.
7216
e3fe84e5
JM
72172002-03-20 Jason Merrill <jason@redhat.com>
7218
7219 PR c++/2136
7220 * init.c (build_delete): Check access for a member op delete here.
7221 * decl2.c (delete_sanity): Not here.
7222
ea122333
JM
72232002-03-19 Jason Merrill <jason@redhat.com>
7224
7225 PR c++/5118
7226 * class.c (get_vfield_name): Use the constructor_name.
7227
7afff7cf
NB
72282002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7229
7230 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7231 * cp-tree.h (lang_printable_name): Rename.
7232 * error.c (lang_decl_name): Use new hook.
7233 * lex.c (cxx_init): Remove old hook.
7234 * pt.c (tsubst_decl): Use new hook.
7235 * tree.c (lang_printable_name): Rename.
7236
ff77ac85
EB
72372002-03-18 Eric Botcazou <ebotcazou@multimania.com>
7238
7239 PR c++/3882
7240 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7241 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7242 only after recording the declaration.
7243
ffd696af
JM
72442002-03-18 Jason Merrill <jason@redhat.com>
7245
097955f2
JM
7246 PR c++/2039
7247 * init.c (resolve_offset_ref): Hand off to build_component_ref.
7248
b663bcf3
JM
7249 PR c++/4222, c++/5995
7250 * call.c (build_over_call): Fix empty class logic.
7251
0f4237c2
JM
7252 PR c++/3870
7253 * cp-tree.h (struct saved_scope): Add last_parms field.
7254 * decl.c (maybe_push_to_top_level): Save last_function_parms.
7255 (pop_from_top_level): Restore it.
7256
001ad76c
JM
7257 PR c++/4377
7258 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
7259 NON_LVALUE_EXPRs.
7260
7261 PR c++/4003
ed2fa432
JM
7262 * pt.c (tsubst_friend_function): Use decl_namespace_context.
7263
ffd696af
JM
7264 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7265 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7266 type with a nontrivial destructor.
7267
f2606a97
JM
72682002-03-17 Jason Merrill <jason@redhat.com>
7269
7270 PR c++/4460
7271 * class.c (build_base_path): Virtual base layout is fixed in
7272 in-charge [cd]tors.
7273
52dabb6c
NB
72742002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
7275
7276 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7277 * parse.y (yyparse): Remove macro.
7278
beb9c8a2
JM
72792002-03-17 Jason Merrill <jason@redhat.com>
7280
7281 PR c++/5757
7282 * init.c (build_new_1): Pass the right pointer to op delete.
7283
5dd236e2
NS
72842002-03-16 Nathan Sidwell <nathan@codesourcery.com>
7285
7286 PR c++/4361
7287 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
7288 conversion operators go.
7289 (struct lang_decl_flags): Add template_conv_p and unused
7290 bitfields.
7291 (DECL_TEMPLATE_CONV_FN_P): New macro.
7292 * call.c (build_user_type_conversion_1): Don't check second type
7293 conversion of overload set first.
7294 * class.c (add_method): Make sure templated conversion operators
7295 all end up on slot 2.
7296 * lex.c (do_identifier): A conversion operator token might be
7297 satisfied by a templated conversion operator.
5dd236e2
NS
7298 * pt.c (check_explicit_specialization): Use
7299 CLASSTYPE_FIRST_CONVERSION_SLOT.
7300 (template_parm_this_level_p): New function.
7301 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 7302 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
7303 the first slot.
7304 * typeck.c (build_component_ref): Preserve the type of an
7305 conversion operator name on the overload type.
7306 (build_x_function_call): Retrieve the conversion operator name.
7307
0ba20759
RH
73082002-03-15 Richard Henderson <rth@redhat.com>
7309
7310 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
7311
6e4ae815
MM
73122002-03-15 Mark Mitchell <mark@codesourcery.com>
7313
7314 * cp-tree.h (CLEANUP_DECL): Remove.
7315 (CLEANUP_EXPR): Likewise.
7316 * decl.c (destroy_local_var): Simplify.
7317 (maybe_build_cleanup): Tidy.
7318 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
7319 * semantics.c (cp_expand_stmt): Likewise.
7320 * cp/tree.c (cp_statement_code_p): Likewise.
7321
5cc90635
JM
73222002-03-15 Jason Merrill <jason@redhat.com>
7323
6da794e8
JM
7324 PR c++/5857
7325 * decl.c (duplicate_decls): Use merge_types instead of common_type.
7326 * typeck.c (common_type): Just hand off to
7327 type_after_usual_arithmetic_conversions and
7328 composite_pointer_type.
7329 (merge_types): New fn.
7330 (commonparms): Use it instead of common_type.
7331 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
7332 (composite_pointer_type): Also handle attributes.
7333 * cp-tree.h: Declare merge_types.
7334
5cc90635
JM
7335 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
7336 variables.
7337 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
7338
ecb0eece
RH
73392002-03-14 Richard Henderson <rth@redhat.com>
7340
7341 * decl.c: Include c-pragma.h.
7342 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
7343 * Make-lang.in: Update dependencies.
7344
d3f129b3
JJ
73452002-03-14 Jakub Jelinek <jakub@redhat.com>
7346
f6562b37 7347 PR c++/5908
d3f129b3
JJ
7348 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
7349 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
7350
049e6879
RS
73512002-03-12 Richard Sandiford <rsandifo@redhat.com>
7352
7353 * mangle.c (write_builtin_type): Handle 128-bit integers even if
7354 they are not a standard integer type.
7355
872c9284
RS
73562002-03-12 Richard Sandiford <rsandifo@redhat.com>
7357
7358 * cp-tree.h (init_init_processing): Remove declaration.
7359 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
7360 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
7361
2f9834e8
KG
73622002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7363
7364 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
7365 Define.
7366 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
7367 tree_code_length.
7368 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
7369 cplus_tree_code_name): Delete.
7370 (cxx_init): Don't call add_c_tree_codes, instead set
7371 lang_unsafe_for_reeval. Don't try to copy into the various
7372 tree_code arrays.
7373
df867456
NS
73742002-03-12 Nathan Sidwell <nathan@codesourcery.com>
7375
7376 PR c++/5659
7377 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
7378 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
7379 definitions.
7380
ab04e34b
NS
73812002-03-11 Nathan Sidwell <nathan@codesourcery.com>
7382
7383 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
7384 DR209 is now not a defect.
7385 * cp-tree.h (skip_type_access_control): Remove.
7386 * decl.c (grokdeclarator): Do type access control for friend
7387 declarations.
7388 * semantics.c (decl_type_access_control): Don't reset
7389 current_type_lookups.
7390 (save_type_access_control): Always save the lookups.
7391 (skip_type_access_control): Remove.
7392 (finish_class_definition): Don't change type_lookups.
7393
999cc24c
NS
73942002-03-11 Nathan Sidwell <nathan@codesourcery.com>
7395
7396 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
7397 It is incorrect.
7398 * typeck.c (build_static_cast): Compare non-qualified types
7399 with pointer to member conversions.
7400
61eece67
DN
74012002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
7402 Daniel Berlin <dan@dberlin.org>
7403
7404 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
7405 (cxx_get_alias_set): Use it.
7406
644d28d4
KG
74072002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7408
7409 * cp-tree.h (stabilize_expr): Prototype.
7410
7e326356
CR
74112002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
7412
7413 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
7414 conditional return void.
7415
24965e7a
NB
74162002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
7417
7418 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
7419 * cp-tree.h (cxx_unsave): New.
7420 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
7421 (init_tree): Update.
7422
ca7558fc
KG
74232002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7424
7425 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
7426 explicit sizeof/sizeof.
7427 * decl2.c (cxx_decode_option): Likewise.
7428 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
7429
fd87b7a7
NS
74302002-03-02 Nathan Sidwell <nathan@codesourcery.com>
7431
7432 PR c++/775
7433 * decl.c (lookup_tag): Only reject enum/class mismatch, not
7434 class/union mismatch.
7435 * parse.y (check_class_key): New function.
7436 (structsp): Call it.
7437
bfba94bd
MM
74382002-03-01 Michael Matz <matz@suse.de>
7439
7440 * typeck.c (cp_pointer_int_sum): Complete inner type which is
7441 used later by size_in_bytes().
7442
fdc9bf29
PE
74432002-03-01 Phil Edwards <pme@gcc.gnu.org>
7444
7445 * cp-tree.h: Require __GNUC__ to be #defined.
7446 (build_init): Add missing prototype.
7447
6f30f1f1
JM
74482002-03-01 Jason Merrill <jason@redhat.com>
7449
7450 * except.c: Don't include decl.h or obstack.h. Do include
7451 tree-inline.h.
7452 (build_throw): Destroy temporaries from the thrown
500abaa8 7453 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
7454 temporary directly into the exception object.
7455 (stabilize_throw_expr): New function.
7456 (wrap_cleanups_r): New function.
7457 * tree.c (stabilize_expr): New function.
7458 * init.c (build_init): New function.
7459 * Make-lang.in (cp/except.o): Adjust .h deps.
7460
46cfb101
JM
74612002-02-28 Jason Merrill <jason@redhat.com>
7462
07f521fc
JM
7463 * search.c (lookup_base_r): Don't clear is_non_public just because
7464 we found a friendly scope.
7465
46cfb101
JM
7466 * decl.c (finish_function): Only warn about missing return
7467 statement with -Wreturn-type.
7468
63e1b1c4
NB
74692002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
7470
7471 * class.c (build_clone): Update.
7472 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7473 * cp-tree.h (cxx_dup_lang_specific_decl): New.
7474 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
7475 (copy_decl): Update.
7476 * method.c (make_thunk): Update.
7477
f458d1d5
ZW
74782002-02-27 Zack Weinberg <zack@codesourcery.com>
7479
7480 * decl2.c: Delete traditional-mode-related code copied from
7481 the C front end but not used, or used only to permit the
7482 compiler to link.
7483
500abaa8 74842002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
7485
7486 PR c++/4093
7487 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
7488 to void.
7489
25c8b645
JJ
74902002-02-22 Jakub Jelinek <jakub@redhat.com>
7491
7492 PR other/5746
7493 * semantics.c (finish_switch_cond): Don't call get_unwidened
7494 if error_mark_node.
7495
4f2b0fb2
NS
74962002-02-22 Nathan Sidwell <nathan@codesourcery.com>
7497
7498 PR c++/2645, DR 295
7499 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
7500 tf_keep_type_decl.
7501 (make_typename_type): Use tsubst_flags_t.
7502 * decl.c (make_typename_type): Adjust. Return non-artificial
7503 TYPE_DECLs, if required.
7504 (grokdeclarator): Simplify CVR qualification handling. Allow bad
7505 qualifiers on typedef types.
7506 * decl2.c (handle_class_head): Adjust make_typename_type call.
7507 * parse.y (nested_name_specifier): Likewise.
7508 (typename_sub0): Likewise.
7509 (typename_sub1): Likewise.
7510 * pt.c (convert_template_argument): Adjust make_typename_type
7511 return value.
7512 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 7513 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
7514 on template type parms.
7515 (instantiate_decl): Recheck substitutions to give warnings on bad
7516 qualifications.
7517 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
7518
8fc2ba41
AH
75192002-02-21 Aldy Hernandez <aldyh@redhat.com>
7520
84d901be 7521 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 7522
84d901be
AD
7523 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
7524 unless DECL_ALWAYS_INLINE.
8fc2ba41 7525
7552da58
JJ
75262002-02-20 Jakub Jelinek <jakub@redhat.com>
7527
7528 * typeck.c (cp_pointer_int_sum): Renamed from
7529 pointer_int_sum, call pointer_int_sum.
7530
00fae85d
JJ
75312002-02-20 Jakub Jelinek <jakub@redhat.com>
7532
7533 * decl.c (duplicate_decls): Return 0 if issued error about
7534 redeclaration.
7535
6ea868b7
JM
75362002-02-19 Jason Merrill <jason@redhat.com>
7537
500abaa8 7538 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
7539 M1AKFvvE, not MK1AFvvE.
7540 * mangle.c (write_function_type): Write cv-quals for member
7541 function type here.
7542 (write_pointer_to_member_type): Not here.
7543
c02f5e29
JM
75442002-02-18 Jason Merrill <jason@redhat.com>
7545
7546 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
7547 (do_decl_instantiation): Likewise.
7548
624a5800
CR
75492002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
7550
7551 PR c++/5685
7552 * decl.c (duplicate_decls): Make warning unconditional
7553 if duplicate default argument declarations are present.
7554
f6f8ada3
JJ
75552002-02-17 Jakub Jelinek <jakub@redhat.com>
7556
7557 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
7558 shortening.
7559
8d6e459d
NS
75602002-02-15 Nathan Sidwell <nathan@codesourcery.com>
7561
7562 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
7563 remove incorrect comment. Move #if 0'd code to common path. Use
7564 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
7565
ca4feb54
JM
75662002-02-13 Jason Merrill <jason@redhat.com>
7567
57d5032b
JM
7568 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
7569 (finish_function): Don't warn if current_function_returns_null.
7570
bb26522d
JM
7571 * typeck2.c (digest_init): Do handle values of vector type.
7572
ca4feb54
JM
7573 * typeck2.c (digest_init, process_init_constructor): Treat vectors
7574 like arrays.
7575
e6b9638b
JM
75762002-02-11 Jason Merrill <jason@redhat.com>
7577
7578 * parse.y (reserved_declspecs): Don't handle attributes.
7579 (reserved_typespecquals): Handle them here.
7580 * Make-lang.in (parse.c): Adjust expected conflicts.
7581
1cf537c5
JJ
75822002-02-08 Jakub Jelinek <jakub@redhat.com>
7583
7584 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
7585 instead of compstmt.
7586 (compstmt_or_stmtexpr): Renamed from compstmt.
7587 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
7588
c2ea3a40
NS
75892002-02-07 Nathan Sidwell <nathan@codesourcery.com>
7590
7591 Rename instantiate_type_flags to tsubst_flags_t & expand use.
7592 * cp-tree.h (instantiate_type_flags): Rename to ...
7593 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
7594 add tf_warning flag.
7595 (instantiate_type): Adjust prototype.
7596 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
7597 do_type_instantiation, cp_build_qualified_type_real): Likewise.
7598 cp_build_qualified_type: Adjust.
7599 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
7600 tf_*.
7601 * call.c (standard_conversion): Rename itf_* to tf_*.
7602 (reference_binding): Likewise.
7603 (convert_like_real): Likewise.
7604 * cvt.c (cp_convert_to_pointer): Likewise.
7605 (convert_to_reference): Likewise.
7606 * decl.c (lookup_namespace_name): Use tf_* flags.
7607 (make_typename_type): Likewise.
7608 (grokdeclarator): Likewise.
7609 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
7610 (coerce_template_template_parms, convert_template_argument,
7611 coerce_template_parms, maybe_get_template_decl_from_type_decl,
7612 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
7613 instantiate_class_template, tsubst_template_arg_vector,
7614 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 7615 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 7616 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 7617 instantiate_template, fn_type_unification,
500abaa8
AJ
7618 resolve_overloaded_unification, verify_class_unification,
7619 unify, get_bindings_real, do_type_instantiation,
7620 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
7621 tsubst_initializer_list, tsubst_enum,
7622 get_mostly_instantiated_function_type,
7623 invalid_nontype_parm_type_p): Likewise.
7624 * tree.c (cp_build_qualified_type_real): Likewise.
7625 * typeck.c (build_binary_op): Rename itf_* to tf_*.
7626 (build_ptrmemfunc): Likewise.
7627 (convert_for_assignment): Likewise.
7628
d5614afb
NS
76292002-02-07 Nathan Sidwell <nathan@codesourcery.com>
7630
7631 PR c++/109
7632 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 7633 dependent types.
d5614afb
NS
7634 * decl2.c (handle_class_head): Don't push into template parm contexts.
7635 * pt.c (push_template_decl_real): Template parm contexts are never
7636 being defined.
7637
1af6141b
AO
76382002-02-05 Alexandre Oliva <aoliva@redhat.com>
7639
7640 * class.c: Include target.h.
7641 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
7642 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
7643 bit-field layout.
7644 * Make-lang.in: Adjust deps.
7645
d8a6f584
JM
76462002-02-05 Jason Merrill <jason@redhat.com>
7647
7648 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
7649
6f9fdf4d
JJ
76502002-02-04 Jakub Jelinek <jakub@redhat.com>
7651
7652 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
7653 (finish_switch_cond): Set SWITCH_TYPE.
7654
14691f8d
RH
76552002-02-04 Richard Henderson <rth@redhat.com>
7656
7657 * method.c (use_thunk): Always initialize the block tree. Reindent.
7658 * semantics.c (expand_body): Emit thunks after function, not before.
7659
e89a6075
JM
76602002-02-04 Jason Merrill <jason@redhat.com>
7661
7662 * decl.c (start_function): Call cplus_decl_attributes immediately
7663 after grokdeclarator.
7664
7665 * decl.c (start_function): Combine DECL_RESULT handling code.
7666
9780c24f
JM
76672002-02-03 Jason Merrill <jason@redhat.com>
7668
7669 * xref.c: Remove.
7670 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
7671 (cp/xref.o): Remove dependencies.
7672 * class.c (finish_struct_1, check_methods): Don't call xref fns.
7673 (finish_struct_1): Likewise.
7674 * friend.c (make_friend_class): Likewise.
7675 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
7676 * spew.c (read_process_identifier): Likewise.
7677
65f36ac8
JM
76782002-02-01 Jason Merrill <jason@redhat.com>
7679
efe49da0 7680 PR c++/4872
500abaa8 7681 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
7682 no return statement and no abnormal exit.
7683 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
7684 (current_function_returns_abnormally): New macro.
7685 * call.c (build_call): Set it.
7686
f2d9afec
JM
7687 * typeck.c (build_component_ref): Always complain about offsetof
7688 constructs on non-PODs. Only make it an error for members of
7689 virtual bases.
7690
65f36ac8
JM
7691 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
7692 (dump_function_decl): Always dump parms.
7693
7694 * decl2.c (finish_static_data_member_decl): Complain about a local
7695 class with a static data member.
7696
7697 PR c++/4286
7698 * search.c (lookup_field_1): Don't xref a static data member
7699 just because we looked it up.
7700
98884b26
JM
77012002-01-31 Jason Merrill <jason@redhat.com>
7702
b88c0704
JM
7703 * Make-lang.in (parse.c): Handle .output file.
7704
a588fe25
JM
7705 PR c++/3395
7706 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
7707 not TREE_TYPE.
7708 * semantics.c (finish_class_definition): Adjust.
7709
98884b26
JM
7710 Allow attributes in parms and casts.
7711 * parse.y (named_parm): Don't strip attrs.
7712 (declmods): Remove 'attributes' production.
7713 (nonempty_cv_qualifiers): Accept attributes.
7714 (ATTRIBUTE): Give precedence.
7715 * decl.c (groktypename): Handle attributes.
7716 (grokparms): Likewise.
7717
ffdeea47
JJ
77182002-01-29 Jakub Jelinek <jakub@redhat.com>
7719
7720 * decl2.c (cxx_decode_option): Pass 0 as last argument to
7721 cpp_handle_option.
7722 * lang-specs.h: Use cpp_unique_options instead of cpp_options
7723 when used together with cc1_options.
7724
b8b98c66
NS
77252002-01-29 Nathan Sidwell <nathan@codesourcery.com>
7726
7727 PR c++/5132
7728 * typeck2.c (digest_init): Make sure non-array core type is
7729 instantiated.
7730 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
7731 constructor, rather than build a new one.
7732 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
7733 PURPOSE of constructor elts.
7734
7437519c
ZW
77352002-01-23 Zack Weinberg <zack@codesourcery.com>
7736
7737 * Make-lang.in (parse.c): Adjust expected number of
7738 shift-reduce conflicts.
7739 (decl.o): Depend on diagnostic.h.
7740 * decl.c: Include diagnostic.h.
7741 (grokdeclarator): Check for null pointer.
7742 (finish_function): Don't abort when
7743 current_binding_level->parm_flag != 1, if errors have
7744 occurred; throw away the statement tree and extra binding
7745 levels, and continue.
7746 * lex.c (note_list_got_semicolon): Check for null pointer.
7747 * method.c (hack_identifier): Just return error_mark_node if
7748 value is error_mark_node.
7749 * parse.y (primary: TYPEID(type_id)): No need to use
7750 TYPE_MAIN_VARIANT here.
7751 (handler_seq): Accept an empty list of catch clauses and
7752 generate a fake handler block to avoid later crashes.
7753 (ansi_raise_identifier): Accept the error token too.
7754 * semantics.c (begin_class_definition,
7755 finish_class_definition): Check for error_mark_node.
7756
c588e52b
ZW
77572002-01-23 Zack Weinberg <zack@codesourcery.com>
7758
7759 * typeck2.c (friendly_abort): Delete definition.
7760 * cp-tree.h (friendly_abort): Don't prototype.
7761 (my_friendly_assert): Use fancy_abort.
7762
d55ecaa4
CR
77632002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7764
7765 * cp-tree.h (my_friendly_abort): Remove.
7766
0a01c261
JJ
77672002-01-23 Jakub Jelinek <jakub@redhat.com>
7768
7769 * spew.c (pending_inlines, pending_inlines_tail,
7770 processing_these_inlines): Make static.
7771 (mark_pending_inlines): Remove static.
7772 (begin_parsing_inclass_inline): If in function, save pi
7773 for GC to cp_function_chain->unparsed_inlines instead.
7774 (process_next_inline): Likewise.
7775 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
7776 (mark_pending_inlines): Add prototype.
7777 * decl.c (spew_debug): Remove unused extern.
7778 (mark_lang_function): Call mark_pending_inlines.
7779
a98facb0
CR
77802002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7781
c588e52b
ZW
7782 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
7783 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
7784 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
7785 Change my_fancy_abort() to abort().
7786
f893c16e
JM
77872002-01-23 Jason Merrill <jason@redhat.com>
7788
608afcc5
JM
7789 PR c++/5453
7790 * class.c (fixed_type_or_null): Fix thinko.
7791
f893c16e
JM
7792 PR c++/3331
7793 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 7794
b2115575
JM
7795 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
7796
f893c16e
JM
77972002-01-22 Jason Merrill <jason@redhat.com>
7798
b5856475
JM
7799 * parse.y (function_body): Suppress the block for the outermost
7800 curly braces.
7801 * decl.c (pushdecl): Don't try to skip it.
7802 (begin_function_body): Keep the block we create, not the next one.
7803 * init.c (emit_base_init): Don't mess with keep_next_level.
7804
6bc34b14
JM
7805 * class.c (build_base_path): Tweak formatting.
7806
3807621a
NS
78072002-01-19 Nathan Sidwell <nathan@codesourcery.com>
7808
7809 Fix regression introduced with patch for c++/775
7810 * parse.y (class_head_defn): Check for template specializations
7811 with a different class-key.
7812
cdd2559c
JM
78132002-01-17 Jason Merrill <jason@redhat.com>
7814
7815 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
7816 (begin_function_body): Call them and keep_next_level.
7817 * init.c (emit_base_init): Call keep_next_level.
7818 * semantics.c (setup_vtbl_ptr): Lose.
7819 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
7820 (vtbls_set_up_p): Lose.
7821 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
7822 * method.c (do_build_copy_constructor): Likewise.
7823 (synthesize_method): Call finish_mem_initializers.
7824 * parse.y (nodecls): Likewise.
ad6b1795
JM
7825
7826 * error.c (dump_type_suffix): Print the exception specs before
7827 recursing.
7828 (dump_function_decl): Here, too.
7829
7830 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
7831
195a5def
IR
78322002-01-10 Ira Ruben <ira@apple.com>
7833
6bc34b14 7834 PR c++/907
195a5def
IR
7835 * decl.c (start_method): Handle attrlist.
7836
f21ee879
JJ
78372002-01-10 Jakub Jelinek <jakub@redhat.com>
7838
7839 * decl2.c (max_tinst_depth): Increase default limit to 500.
7840
78412002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
7842
7843 * spew.c (YYCHAR): Uppercase macro parameter and add
7844 parenthesis.
7845 (YYCODE): Likewise.
7846 (NAME): Uppercase macro parameter.
7847
c3af729a
GS
78482002-01-09 Graham Stott <grahams@redhat.com>
7849
6bc34b14 7850 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 7851
c3af729a
GS
7852 * semantics.c (FINISH_COND): Uppercase macro paramaters and
7853 add parenthesis.
7854
91800747
GS
78552002-01-08 Graham Stott <grahams@redhat.com>
7856
7857 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7858 (PALLOC): Uppercase macro parameter and whitespace.
7859 (SALLOC): Uppercase macro parameter.
7860 (SFREE): Uppercase macros parameter, add parenthese and
7861 whitespace.
7862 (STREQL): Uppercase macro parameter and whitespace.
7863 (STRNEQ): Likewise.
7864 (STRLSS): Likewise.
7865 (STRLEQ): Likewise.
7866 (STRGTR): Likewise.
7867 (STRGEQ): Likewise.
7868
7869 * call.c (convert_like): Add parenthesis and wrap.
7870 (convert_like_with_context): Likewise.
7871 (ICS_RANK): Whitespace.
7872 (NEED_TEMPORARY_P): Remove parenthesis.
7873
7874 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7875 whitespace.
7876 (VTT_MARKED_BINFO_P): Likewise.
7877
7878 * decl.c (BINDING_LEVEL): Add parenthesis.
7879 (DEF_OPERATOR): Likewise.
7880
91800747
GS
7881 * mangle.c (MANGLE_TRACE): Add parenthesis.
7882 (MANGLE_TRACE_TREE): Likewise.
7883 (write_signed_number): Likewise.
7884 (write_unsigned_number): Likewise.
7885
7886 * pt.c (ccat): Uppercase macro parameter.
7887 (cat): Likewise
7888
7889 * search.c (SET_BINFO_ACCESS): Add parenthesis.
7890
15eb1e43
JM
78912002-01-07 Jason Merrill <jason@redhat.com>
7892
7893 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7894 to pedwarn.
7895
6bc34b14 7896 PR c++/3536
15eb1e43
JM
7897 * method.c (make_thunk): If !flag_weak, give the thunk the
7898 function's linkage.
7899 (use_thunk): Here, too.
7900
b34c06e3
GS
79012002-01-07 Graham Stott <grahams@redhat.com>
7902
6bc34b14
JM
7903 * error.c: Update copyright date.
7904 (print_scope_operator): Add parenthesis.
7905 (print_left_paren): Likewise.
7906 (print_right_paren): Likewise.
7907 (print_left_bracket): Likewise.
7908 (print_right_bracket): Likewise.
7909 (print_template_argument_list_start): Likewise.
7910 (print_template_argument_list_end): Likewise.
7911 (print_non_consecutive_character): Likewise.
7912 (print_tree_identifier): Likewise.
7913 (print_identifier): Likewise.
7914 (NEXT_CODE): Uppercase macro parameter.
7915 (ident_fndecl): Delete unused.
7916 (GLOBAL_THING): Likewise.
b34c06e3 7917
98e40e83
GS
79182002-01-06 Graham Stott <grahams@redhat.com>
7919
7920 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7921 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7922 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7923 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7924 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7925 (C_IS_RESERVED_WORD): Uppercase macro parameter.
7926 (C_RID_YYCODE) Likewise.
7927 (ptrmem_cst): Use rtx.
7928 (LOCAL_BINDING_P): Add whitespace.
7929 (INHERITED_VALUE_BINDING_P): Likewise.
7930 (BINDING_SCOPE): Wrap long line.
7931 (BINDING_HAS_LEVEL_P): Remove parenthesis.
7932 (BINDING_VALUE): Wrap long line.
7933 (BINDING_TYPE): Whitespace.
7934 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7935 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 7936 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
7937 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7938 (same_type_p): Uppercase macro parameters.
7939 (same_type_ignoring_top_level_qualifiers_p): Likewise.
7940 (OVL_FUNCTION): Wrap long line.
7941 (OVL_CHAIN): Whitespace.
b34c06e3 7942 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
7943 (OVL_NEXT): Whitespace.
7944 (OVL_USED): Likewise.
7945 (IDENTIFIER_TYPE_VALUE): Likewise.
7946 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7947 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7948 (LANG_ID_FIELD): Whitespace.
7949 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7950 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7951 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7952 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7953 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7954 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7955 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7956 (IDENTIFIER_VIRTUAL_P): Likewise.
7957 (IDENTIFIER_OPNAME_P): Likewise.
7958 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7959 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7960 (C_SET_EXP_ORIGINAL_CODE): Likewise.
7961 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7962 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7963 (IS_AGGR_TYPE): Uppercase macro parameter.
7964 (CLASS_TYPE_P): Likewise.
7965 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7966 (IS_AGGR_TYPE_2): Whitespace.
7967 (TAGGED_TYPE_P): Uppercase macro parameter.
7968 (TYPE_BUILT_IN): Whitespace.
7969 (TYPE_FOR_JAVA): Likewise.
7970 (FUNCTION_ARG_CHAIN): Remove parenthesis.
7971 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7972 (FUNCTION_FIRST_USER_PARAM): Likewise.
7973 (PROMOTES_TO_AGGR_TYPE): Whitespace.
7974 (DERIVED_FROM_P): Add parenthesis and wrap.
7975 (UNIQUELY_DERIVED_FROM_P): Likewise.
7976 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7977 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7978 (CLASSTYPE_USE_TEMPLATE): Whitespace.
7979 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7980 (TYPE_GETS_DELETE): Add parenthesis.
7981 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7982 (TYPE_HAS_ASSIGN_REF): Likewise,
7983 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7984 (TYPE_HAS_INIT_REF): Likewise.
7985 (TYPE_HAS_CONST_INIT_REF): Likewise.
7986 (TYPE_BEING_DEFINED): Likewise.
7987 (TYPE_LANG_SPECIFIC): Likewise.
7988 (CLASSTYPE_RTTI): Likewise.
7989 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7990 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7991 (TYPE_OVERLOADS_ARROW): Likewise.
7992 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7993 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7994 (CLASSTYPE_METHOD_VEC): Likewise.
7995 (CLASSTYPE_MARKED_N): Likewise.
7996 (CLASSTYPE_MARKED): Likewise.
7997 (CLASSTYPE_MARKED2): Likewise.
7998 (CLASSTYPE_MARKED3): Likewise.
7999 (CLASSTYPE_MARKED4): Likewise.
8000 (CLASSTYPE_MARKED5): Likewise.
8001 (CLASSTYPE_MARKED6): Likewise.
8002 (SET_CLASSTYPE_MARKED): Whitespace.
8003 (CLEAR_CLASSTYPE_MARKED): Likewise.
8004 (SET_CLASSTYPE_MARKED2): Likewise.
8005 (CLEAR_CLASSTYPE_MARKED2): Likewise.
8006 (SET_CLASSTYPE_MARKED3): Likewise.
8007 (CLEAR_CLASSTYPE_MARKED3): Likewise.
8008 (SET_CLASSTYPE_MARKED4): Likewise.
8009 (CLEAR_CLASSTYPE_MARKED4): Likewise.
8010 (SET_CLASSTYPE_MARKED5): Likewise.
8011 (CLEAR_CLASSTYPE_MARKED5): Likewise.
8012 (SET_CLASSTYPE_MARKED6): Likewise.
8013 (CLEAR_CLASSTYPE_MARKED6): Likewise.
8014 (CLASSTYPE_TAGS): Likewise.
8015 (CLASSTYPE_VSIZE): Likewise.
8016 (CLASSTYPE_VBASECLASSES): Likewise.
8017 (CANONICAL_BINFO): Add parenthesis.
8018 (CLASSTYPE_SIZE(NODE): Likewise.
8019 (CLASSTYPE_SIZE_UNIT): Likewise.
8020 (CLASSTYPE_ALIGN(NODE): Likewise.
8021 (CLASSTYPE_USER_ALIGN): Likewise.
8022 (TYPE_JAVA_INTERFACE): Likewise.
8023 (CLASSTYPE_PURE_VIRTUALS): Likewise.
8024 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8025 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8026 (CLASSTYPE_HAS_MUTABLE): Likewise.
8027 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8028 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8029 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8030 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8031 (CLASSTYPE_INTERFACE_ONLY): Likewise.
8032 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8033 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8034 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8035 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8036 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8037 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8038 (BINFO_UNSHARED_MARKED): Whitespace.
8039 (BINFO_MARKED): Whitespace and wrap.
8040 (SET_BINFO_MARKED): Likewise.
8041 (CLEAR_BINFO_MARKED): Likewise.
8042 (BINFO_VTABLE_PATH_MARKED): Likewise.
8043 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8044 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8045 (BINFO_SUBVTT_INDEX): Remove parenthesis.
8046 (BINFO_VPTR_INDEX): Likewise.
8047 (BINFO_PRIMARY_BASE_OF): Likewise,
8048 (CLASSTYPE_VFIELDS): Whitespace.
8049 (VF_DERIVED_VALUE): Wrap long line.
8050 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
8051 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8052 (DEFARG_POINTER): Whitespace.
8053 (DECL_NEEDED_P): Remove parenthesis.
8054 (DECL_LANGUAGE): Whitespace.
8055 (SET_DECL_LANGUAGE): Add parenthesis.
8056 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8057 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8058 (DECL_IN_AGGR_P): Whitespace.
8059 (DECL_FRIEND_P): Likewise.
8060 (DECL_BEFRIENDING_CLASSES): Likewise.
8061 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8062 (DECL_NONCONVERTING_P): Whitespace.
8063 (DECL_PURE_VIRTUAL_P): Likewise.
8064 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8065 (DECL_PENDING_INLINE_INFO): Whitespace.
8066 (DECL_SORTED_FIELDS): Likewise.
8067 (DECL_DEFERRED_FN): Likewise.
8068 (DECL_TEMPLATE_INFO): Likewise.
8069 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8070 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8071 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8072 (TMPL_ARGS_LEVEL): Likewise.
8073 (SET_TMPL_ARGS_LEVEL): Likewise.
8074 (INNERMOST_TEMPLATE_PARMS): Whitespace.
8075 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8076 (INTEGRAL_CODE_P(CODE): Add parenthesis.
8077 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8078 (TYPE_HAS_CONSTRUCTOR): Whitespace.
8079 (TREE_HAS_CONSTRUCTOR): Likewise.
8080 (TYPE_HAS_DESTRUCTOR): Likewise.
8081 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8082 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8083 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8084 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8085 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8086 (TYPE_PTRMEMFUNC_P): Likewise.
8087 (TYPE_PTRMEMFUNC_FLAG): Likewise.
8088 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8089 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8090 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8091 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8092 (DECL_ACCESS): Whitespace.
8093 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8094 (DECL_GLOBAL_DTOR_P): Likewise.
8095 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 8096 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
8097 (DECL_TEMPLATE_RESULT): Likewise.
8098 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8099 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8100 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8101 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8102 (PRIMARY_TEMPLATE_P): Add parenthesis.
8103 (DECL_USE_TEMPLATE): Whitespace.
8104 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8105 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8106 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8107 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8108 (CALL_DECLARATOR_PARMS): Remove parenthesis.
8109 (CALL_DECLARATOR_QUALS): Likewise.
8110 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8111 (TEMP_NAME_P): Wrap.
8112 (VFIELD_NAME_P): Likewise.
8113 (B_SET): Uppercase macro parameters and add parenthesis.
8114 (B_CLR): Likewise.
8115 (B_TST): Likewise.
8116 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8117 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8118 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8119 (same_or_base_type_p): Likewise.
8120 (cp_deprecated): Likewise.
98e40e83 8121
c28abdf0
RH
81222002-01-05 Richard Henderson <rth@redhat.com>
8123
15eb1e43 8124 * semantics.c (expand_body): Revert last change.
c28abdf0 8125
f11ee281
JM
81262002-01-04 Jason Merrill <jason@redhat.com>
8127
195a5def 8128 PR c++/4122
f11ee281
JM
8129 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8130 lost primary.
8131
8132 * class.c (build_vtbl_initializer): Check for a lost primary
8133 before calculating the vtable entry to throw away.
8134
a4200657
JM
81352002-01-02 Jason Merrill <jason@redhat.com>
8136
8137 * semantics.c (expand_body): Call outlining_inline_function when
8138 emitting an inline function out of line.
8139
40e593d7
NS
81402002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8141
8142 PR c++/5116, c++/764 reversion
8143 * call.c (build_new_op): Revert the instantiations. They are
8144 incorrect.
c588e52b 8145
323728aa
NS
81462002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8147
8148 PR c++/5089
8149 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8150
46c895ac
NS
81512002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8152
8153 PR c++/3716
8154 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8155 (tsubst, case POINTER_TYPE): Handle pmfs here.
8156 (tsubst, case OFFSET_TYPE): Check it is not an offset to
8157 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8158
833aa4c4
NS
81592002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8160
8161 PR c++/35
8162 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8163 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8164 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8165 PARM_DECL.
8166 (tsubst_template_parms): Break up loop statements.
8167 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8168 parm PARM_DECLs don't get promoted.
8169
18976b21
NS
81702002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8171
8172 PR c++/5123
8173 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8174 (build_x_function_call): Cope with a COMPONENT_REF containing a
8175 TEMPLATE_ID_EXPR.
8176
303d1c55
NS
81772002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8178
8179 PR c++/5213
8180 * pt.c (convert_template_argument): Be more careful determining
8181 when RECORD_TYPE templates are or are not templates.
8182
d46a33b3
NS
81832002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8184
8185 PR c++/775
8186 * cp-tree.h (handle_class_head): Adjust prototype.
8187 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8188 parameters. Use for all class heads.
8189 * parse.y (named_class_head_sans_basetype, named_class_head,
8190 named_complex_class_head_sans_basetype,
8191 named_class_head_sans_basetype_defn,
8192 unnamed_class_head): Remove.
8193 (class_head, class_head_apparent_template): Recognize class heads
8194 (class_head_decl, class_head_defn): New reductions. Process class
8195 heads.
8196 (structsp): Adjust class definition and class declaration
8197 reductions.
8198 (maybe_base_class_list): Give diagnostic on empty list.
8199
4542128e
NS
82002002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8201
8202 PR c++/4379
8203 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8204 single non-static member.
8205 (unary_complex_lvalue): If it cannot be a pointer to member, don't
8206 make it so. Check it is not pointer to reference.
8207
903c6234
NS
82082002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8209
8210 PR c++/5132
8211 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8212 are processing a template decl.
8213
477558bf
NS
82142002-01-02 Nathan Sidwell <nathan@codesourcery.com>
8215
8216 PR c++/5116, c++/764
8217 * call.c (build_new_op): Make sure template class operands are
8218 instantiated. Simplify arglist construction.
8219
41f5d4b1
NS
82202001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8221
8222 * call.c (build_user_type_conversion_1): Use my_friendly_assert
8223 rather than if ... abort.
8224 * cvt.c (convert_to_reference): Likewise.
8225 * semantics.c (setup_vtbl_ptr): Likewise.
8226 * pt.c (lookup_template_class): Comment typo.
c588e52b 8227
f3368a90
NS
82282001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8229
8230 PR c++/5125
8231 * pt.c (push_template_decl_real): Make sure DECL has
8232 DECL_LANG_SPECIFIC.
8233
03c9c274
NS
82342001-12-29 Nathan Sidwell <nathan@codesourcery.com>
8235
8236 PR c++/335
8237 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8238 for non-reference fields.
8239 * typeck.c (require_complete_type): Use resolve_offset_ref).
8240
7d8e8369
NS
82412001-12-26 Nathan Sidwell <nathan@codesourcery.com>
8242
8243 PR c++/196
03c9c274 8244 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 8245
a56ca899
NS
82462001-12-24 Nathan Sidwell <nathan@codesourcery.com>
8247
8248 PR c++/160
8249 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8250 up. Don't stabilize_references when initializing a reference.
8251
0b5826ac
KG
82522001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8253
8254 * decl2.c (lang_f_options): Const-ify.
8255
38be19f6
JM
82562001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8257
8258 * config-lang.in (diff_excludes): Remove.
8259
2e4cf9dc
NS
82602001-12-19 Nathan Sidwell <nathan@codesourcery.com>
8261
8262 PR c++/90
8263 * typeck.c (build_function_call_real): Use original function
8264 expression for errors.
8265
00e4119c
JM
82662001-12-18 Jason Merrill <jason@redhat.com>
8267
195a5def 8268 PR c++/3242
00e4119c
JM
8269 * class.c (add_method): Do compare 'this' quals when trying to match a
8270 used function. Don't defer to another used function.
8271
3ad97789
NS
82722001-12-18 Nathan Sidwell <nathan@codesourcery.com>
8273
8274 * pt.c (instantiate_clone): Remove, fold into ...
8275 (instantiate_template): ... here. Simplify by removing mutual
8276 recursion.
8277 * typeck2.c (build_m_component_ref): Don't cv qualify the function
8278 pointed to by a pointer to function.
8279 * class.c (delete_duplicate_fields_1): Typo.
8280
f21add07
JM
82812001-12-18 Jason Merrill <jason@redhat.com>
8282
8283 C++ ABI change: destroy value arguments in caller.
8284 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
8285 create an extra binding level for the parameters.
8286 * decl.c (store_parm_decls): Don't do parameter cleanups.
8287
ea50ad82
NS
82882001-12-18 Nathan Sidwell <nathan@codesourcery.com>
8289
8290 * call.c (build_new_method_call): Use '%#V'.
8291 * error.c (cv_to_string): Use V parameter to determine padding.
8292
3855d0d1
JM
82932001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
8294
8295 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
8296 spellings in messages.
8297
33bd39a2
ZW
82982001-12-17 Zack Weinberg <zack@codesourcery.com>
8299
8300 * cp-tree.h: Delete #defines for cp_error, cp_warning,
8301 cp_pedwarn, and cp_compiler_error.
8302 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
8303 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
8304 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
8305 typeck2.c: Change calls to the above macros to use their
8306 language-independent equivalents: error, warning, pedwarn, and
8307 internal_error respectively.
8308
317c26c3
NB
83092001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
8310
8311 * decl2.c (finish_file): Remove back_end_hook.
8312
aba649ba
JM
83132001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8314
8315 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
8316 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
8317 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
8318
1737c953
JM
83192001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
8320
8321 * lang-options.h: Use American spelling in messages.
8322
4a90862e
JM
83232001-12-13 Jason Merrill <jason@redhat.com>
8324
ade3dc07
JM
8325 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
8326
8327 Use cleanups to run base and member destructors.
8328 * init.c (push_base_cleanups): New function, split out from...
8329 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
8330 * decl.c (finish_destructor_body): Move vbase destruction code to
8331 push_base_cleanups.
8332 (begin_function_body, finish_function_body): New fns.
8333 (finish_function): Move [cd]tor handling and call_poplevel to
8334 finish_function_body.
8335 (pushdecl): Skip the new level.
8336 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
8337 (setup_vtbl_ptr): Call push_base_cleanups.
8338 * method.c (synthesize_method): Call {begin,end}_function_body.
8339 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
8340 * cp-tree.h: Declare new fns.
8341 * parse.y (function_body, .begin_function_body): New nonterminals.
8342 (fndef, pending_inline, function_try_block): Use function_body.
8343 (ctor_initializer_opt, function_try_block): No longer has a value.
8344 (base_init): Remove .set_base_init token.
8345 (.set_base_init, compstmt_or_error): Remove.
8346 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
8347
4a90862e
JM
8348 * optimize.c (maybe_clone_body): Fix parameter updating.
8349
a0de9d20
JM
83502001-12-12 Jason Merrill <jason@redhat.com>
8351
8352 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
8353 * semantics.c (genrtl_start_function): Don't pass
8354 parms_have_cleanups or push an extra binding level.
8355 (genrtl_finish_function): Lose cleanup_label cruft.
8356
8357 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
8358 (ctor_label): Remove.
8359 * semantics.c (finish_return_stmt): Lose ctor_label support.
8360 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 8361 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
8362 dtor_label.
8363
8364 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
8365 check for [cd]tors.
8366 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
8367
8368 * decl.c (finish_function): Check VMS_TARGET, not VMS.
8369
8370 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
8371 (end_cleanup_fn): And poplevel.
8372
8373 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
8374 if we're in a template.
8375
dc5c569a
JJ
83762001-12-12 Jakub Jelinek <jakub@redhat.com>
8377
8378 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
8379 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
8380 THIS_NAME_P): Delete.
8381 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
8382 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
8383 with internal naming scheme.
8384 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
8385
ad1a6d45
NS
83862001-12-12 Nathan Sidwell <nathan@codesourcery.com>
8387
8388 * decl.c (grokdeclarator): Deprecated implicit typename use.
8389
270d8c65
NS
83902001-12-11 Nathan Sidwell <nathan@codesourcery.com>
8391
8392 PR g++/51
8393 * parse.y (frob_specs): Indicate it is a language linkage which
8394 contained the extern.
8395 * decl.c (grokdeclarator): Allow extern language linkage with
8396 other specifiers.
8397
9aaceb4b
NS
83982001-12-10 Nathan Sidwell <nathan@codesourcery.com>
8399
8400 PR g++/72
8401 * decl.c (add_binding): Don't reject duplicate typedefs involving
8402 template parameters.
8403
a23c9413
NB
84042001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
8405
8406 * parse.y, semantics.c: Similarly.
8407
9aaceb4b 84082001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
8409
8410 PR g++/87
8411 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
8412 (copy_args_p): Rename to ...
8413 (copy_fn_p): ... here.
8414 (grok_special_member_properties): New function.
8415 (grok_op_properties): Lose VIRTUALP parameter.
8416 (copy_assignment_arg_p): Remove.
8417 * call.c (build_over_call): Use copy_fn_p.
8418 * decl.c (grokfndecl): Reformat. Adjust call to
8419 grok_op_properties.
8420 (copy_args_p): Rename to ...
8421 (copy_fn_p): ... here. Reject template functions. Check for pass
8422 by value.
8423 (grok_special_member_properties): Remember special functions.
8424 (grok_ctor_properties): Don't remember them here, just check.
8425 (grok_op_properties): Likewise.
8426 (start_method): Call grok_special_member_properties.
8427 * decl2.c (grokfield): Likewise.
8428 (copy_assignment_arg_p): Remove.
8429 (grok_function_init): Don't remember abstract assignment here.
8430 * pt.c (instantiate_class_template): Call
8431 grok_special_member_properties.
8432 (tsubst_decl): Adjust grok_op_properties call.
8433
bdd8737f
AH
84342001-12-08 Aldy Hernandez <aldyh@redhat.com>
8435
33bd39a2
ZW
8436 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
8437 RID_TYPES_COMPATIBLE_P.
bdd8737f 8438
46af705a
JDA
84392001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8440
8441 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
8442 call to build_aggr_init.
8443 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
8444
cb97d97d
NB
84452001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
8446
8447 * parse.y: Replace uses of the string non-terminal with STRING.
8448 Don't perform string concatentaion here.
8449 (string): Remove non-terminal.
8450 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
8451
742a37d5
JM
84522001-12-05 Jason Merrill <jason@redhat.com>
8453
8454 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
8455 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
8456 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
8457 * pt.c (push_tinst_level): No longer static.
8458 * cp-tree.h: Declare them.
8459
8460 * init.c (resolve_offset_ref): Don't check access for the base
8461 conversion to access a FIELD_DECL.
8462
8463 * cp-tree.h (TYPE_REFFN_P): New macro.
8464 * decl.c (bad_specifiers): Check it, too.
8465
8466 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
8467 on the __*_type_info type if we haven't seen a definition.
8468
26f943fd
NB
84692001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
8470
8471 * decl.c: Include c-common.h.
8472 (shadow_warning): Move to c-common.c.
8473
d2a6f3c0 84742001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
37a08a29
RK
8475
8476 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
8477
9471d3e2
NS
84782001-12-04 Nathan Sidwell <nathan@codesourcery.com>
8479
8480 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
8481
713ccd0c
NS
84822001-12-04 Nathan Sidwell <nathan@codesourcery.com>
8483
8484 PR g++/164
8485 * init.c (sort_base_init): Allow binfos to be directly specified.
8486 * method.c (do_build_copy_constructor): Explicitly convert to the
8487 base instance.
8488 (do_build_assign_ref): Likewise.
8489
591382c4
HPN
84902001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
8491
8492 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
8493 declaration and initialization.
8494
c725bd79
NB
84952001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
8496
8497 * typeck2.c: Remove leading capital from diagnostic messages, as
8498 per GNU coding standards.
8499
a5d7c4a3
MK
85002001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
8501
8502 PR c++/3394
9fe038e8
HPN
8503 * decl.c (xref_basetypes): Handle attributes between
8504 'class' and name.
a5d7c4a3 8505
f1880e13
NS
85062001-12-03 Nathan Sidwell <nathan@codesourcery.com>
8507
8508 PR g++/3381
8509 * parse.y (named_complex_class_head_sans_basetype): Add new
8510 reduction.
8511 * Make-lang.in (parse.c): Adjust expected conflict count.
8512
ff668506
JM
85132001-12-03 Jason Merrill <jason@redhat.com>
8514
8515 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
8516 immediate binfos for our virtual bases.
8517
1f978f5f
NB
85182001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
8519
8520 * call.c (build_java_interface_fn_ref): Similarly.
8521 * except.c (is_admissible_throw_operand): Similarly.
8522 * init.c (build_java_class_ref): Similarly.
8523 * xref.c (open_xref_file): Similarly.
8524
357351e5
NB
85252001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
8526
8527 * class.c (finish_struct): Remove trailing periods from messages.
8528 * decl.c (check_tag_decl): Similarly.
8529 * lex.c (cxx_set_yydebug): Similarly.
8530 * typeck2.c (friendly_abort): Similarly.
8531
998979e6
MM
85322001-11-29 Mark Mitchell <mark@codesourcery.com>
8533
8534 PR c++/3048
8535 * cp-tree.h (ovl_member): Remove.
33bd39a2 8536 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
8537 specially.
8538 * tree.c (ovl_member): Remove.
8539
7d5b8b11
MM
85402001-11-29 Mark Mitchell <mark@codesourcery.com>
8541
8542 PR c++/4842
8543 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
8544 FUNCTION_DECL, as input.
8545 (mark_overriders): Remove.
8546 (warn_hidden): Rework for the new ABI.
8547
b67db529
MM
85482001-11-29 Mark Mitchell <mark@codesourcery.com>
8549
8550 PR c++/3471
8551 * call.c (convert_like_real): Do not build additional temporaries
8552 for rvalues of class type.
8553
2db1ab2d
NS
85542001-11-28 Nathan Sidwell <nathan@codesourcery.com>
8555
8556 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
8557 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
8558 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
8559 (DERIVED_FROM_P): Likewise.
8560 (enum base_access): Renumber, add ba_quiet bit mask.
8561 (get_binfo): Remove.
8562 (get_base_distance): Remove.
8563 (binfo_value): Remove.
8564 (ACCESSIBLY_DERIVED_FROM_P): Remove.
8565 * call.c (standard_conversion): Use lookup_base.
8566 * class.c (strictly_overrides): Likewise.
8567 (layout_virtual_bases): Likewise.
8568 (warn_about_ambiguous_direct_bases): Likewise.
8569 (is_base_of_enclosing_class): Likewise.
8570 (add_vcall_offset_vtbl_entries_1): Likewise.
8571 * cvt.c (build_up_reference): Adjust comment.
8572 * init.c (build_member_call): Reformat.
8573 * search.c (get_binfo): Remove.
8574 (get_base_distance_recursive): Remove.
8575 (get_base_distance): Remove.
8576 (lookup_base_r): Tweak.
8577 (lookup_base): Add ba_quiet control. Complete the types here.
8578 (covariant_return_p): Use lookup_base.
8579 * tree.c (binfo_value): Remove.
8580 (maybe_dummy_object): Use lookup_base.
8581 * typeck.c (build_static_cast): Use lookup_base.
8582 (get_delta_difference): Likewise.
8583 * typeck2.c (binfo_or_else): Use lookup_base.
8584 (build_scoped_ref): Add back error_mark_check.
8585 (build_m_component_ref): Use lookup_base.
8586
d3945f0a
JM
85872001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
8588
8589 * Make-lang.in (c++.generated-manpages): New dummy target.
8590
d2a6f3c0 85912001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ac79cd5a
RK
8592
8593 * Make-lang.in (cp-lang.o): Depends on c-common.h.
8594 * cp-lang.c (c-common.h): Include.
8595 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
8596 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
8597 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
8598
4d6baafa
NB
85992001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
8600
8601 * decl2.c (c_language): Move to c-common.c.
8602 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
8603 functions.
8604 (cxx_init): Update.
8605
5b0c5896
JM
86062001-11-26 Jason Merrill <jason@redhat.com>
8607
8608 * call.c (joust): Remove COND_EXPR hack.
8609
4bdd26e6
AH
86102001-11-25 Aldy Hernandez <aldyh@redhat.com>
8611
195a5def 8612 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 8613 space.
33bd39a2 8614
338d90b8
NS
86152001-11-25 Nathan Sidwell <nathan@codesourcery.com>
8616
8617 PR g++/3145
8618 * class.c (build_vbase_pointer): Remove.
8619 (build_vbase_path): Remove.
8620 (build_base_path): New function.
8621 * cp-tree.h (base_access, base_kind): New enumerations.
8622 (build_base_path): Declare.
8623 (convert_pointer_to_real): Remove.
8624 (convert_pointer_to): Remove.
8625 (lookup_base): Declare.
8626 (convert_pointer_to_vbase): Remove.
8627 * call.c (build_scoped_method_call): Use lookup_base &
8628 build_base_path instead of convert_pointer_to_real,
8629 get_base_distance & get_binfo.
8630 (build_over_call): Likewise.
8631 * cvt.c (cp_convert_to_pointer): Likewise.
8632 (convert_to_pointer_force): Likewise.
8633 (build_up_reference): Likewise.
8634 (convert_pointer_to_real): Remove.
8635 (convert_pointer_to): Remove.
8636 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
8637 instead of convert_pointer_to_vbase & build_vbase_path.
8638 (emit_base_init): Use build_base_path instead of
8639 convert_pointer_to_real.
8640 (expand_virtual_init): Lose unrequired conversions.
8641 (resolve_offset_ref): Use lookup_base and build_base_path
8642 instead of convert_pointer_to.
8643 * rtti.c (build_dynamic_cast_1): Use lookup_base &
8644 build_base_path instead of get_base_distance & build_vbase_path.
8645 * search.c (get_vbase_1): Remove.
8646 (get_vbase): Remove.
8647 (convert_pointer_to_vbase): Remove.
07f521fc 8648 (lookup_base_r): New function.
338d90b8
NS
8649 (lookup_base): New function.
8650 * typeck.c (require_complete_type): Use lookup_base &
8651 build_base_path instead of convert_pointer_to.
8652 (build_component_ref): Likewise.
8653 (build_x_function_call): Likewise.
8654 (get_member_function_from_ptrfunc): Likewise.
8655 (build_component_addr): Likewise.
8656 * typeck2.c (build_scoped_ref): Likewise.
8657
89d684bb
BM
86582001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8659
8660 * cp-tree.h (CP_TYPE_QUALS): Removed.
8661 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 8662 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 8663 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 8664 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
8665 lang-hooks prototype.
8666 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
8667 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
8668 CP_TYPE_QUALS changed to cp_type_quals.
8669 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
8670 (CXX_C_OBJS): Remove c-dump.o.
8671
12eb9f93 86722001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
8673
8674 PR c++/3637
12eb9f93
MM
8675 * pt.c (lookup_template_class): Ensure that all specializations
8676 are registered on the list corresponding to the most general
8677 template.
8678
86792001-11-20 Mark Mitchell <mark@codesourcery.com>
8680
2d2e8123 8681 * call.c (non_reference): Add documentation.
33bd39a2 8682 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
8683 from conversion operators.
8684 (maybe_handle_ref_bind): Simplify.
8685 (compare_ics): Correct handling of references.
8686
78a40378
MM
86872001-11-19 John Wilkinson <johnw@research.att.com>
8688
8689 * dump.c (dump_op): New function.
8690 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
8691 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
8692 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 8693
78a40378
MM
86942001-11-19 Mark Mitchell <mark@codesourcery.com>
8695
8696 PR4629
8697 * semantics.c (finish_sizeof): Make sure that expression created
8698 while processing a template do not have a type.
8699 (finish_alignof): Likewise.
8700 * typeck.c (c_sizeof): Likewise.
8701 (expr_sizeof): Likewise.
8702
22703ccc
NB
87032001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
8704
8705 * lex.c (cxx_finish): Call c_common_finish.
8706 (finish_parse): Remove.
8707
b3faacfd
KL
87082001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8709
8710 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
8711 when displaying error message about missing array bounds.
8712
873ff987
KL
87132001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8714
8715 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
8716 CONST_CAST_EXPR.
8717 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
8718
08f3a861
NB
87192001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
8720
8721 * cp-tree.h (print_class_statistics): Restore.
8722
8a2b77e7
JM
87232001-11-15 Jason Merrill <jason@redhat.com>
8724
3b1a4132
JM
8725 * method.c (use_thunk): Don't emit debugging information for thunks.
8726
8a2b77e7
JM
8727 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
8728 * decl.c (make_typename_type): Handle getting a class template.
8729 * search.c (lookup_field_r): A class template is good enough for
8730 want_type.
8731
8732 * call.c (convert_like_real): Only use cp_convert for the bad part.
8733 (standard_conversion): Also allow bad int->enum.
8734 * typeck.c (ptr_reasonably_similar): Also allow functions to
8735 interconvert. Pointers to same-size integers are reasonably
8736 similar.
8737
8738 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
8739 give it void type.
8740
36a68fe7
NS
87412001-11-15 Nathan Sidwell <nathan@codesourcery.com>
8742
8743 PR g++/3154
8744 * init.c (sort_base_init): Remove unreachable code.
8745 (expand_member_init): Adjust comment to reflect reality. Simplify
8746 and remove unreachable code.
8747
f5e99456
NB
87482001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
8749
8750 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
8751 (cxx_init): Update prototype.
8752 * decl.c (init_decl_processing): Rename. Move null node init
8753 to its creation time.
8754 * lex.c (cxx_init_options): Update.
8755 (cxx_init): Combine with old init_parse; also call
8756 cxx_init_decl_processing.
8757
fe5b6c1c
RS
87582001-11-14 Richard Sandiford <rsandifo@redhat.com>
8759
8a2b77e7
JM
8760 * decl.c (check_initializer): Try to complete the type of an
8761 array element before checking whether it's complete. Don't
8762 complain about arrays with complete element types but an
8763 unknown size.
8764 (cp_finish_decl): Build the hierarchical constructor before
8765 calling maybe_deduce_size_from_array_init.
fe5b6c1c 8766
77bd67cb
JM
87672001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
8768
8769 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
8770
b02922a4
NS
87712001-11-13 Nathan Sidwell <nathan@codesourcery.com>
8772
8773 PR g++/4206
8774 * parse.y (already_scoped_stmt): Remove.
8775 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
8776
abfc1ef6
L
87772001-11-12 H.J. Lu <hjl@gnu.org>
8778
195a5def 8779 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
8780 function is always `true'.
8781
5d69f816
NB
87822001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8783
8784 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
8785 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
8786 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
8787 * cp-tree.h (print_class_statistics): Remove.
8788 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
8789 cxx_print_identifier, cxx_set_yydebug): New.
8790 * lex.c (set_yydebug): Rename c_set_yydebug.
8791 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
8792 lang_print_xnode): Rename.
8793 * tree.c (print_lang_statistics): Rename.
8794
4fdc14ca
KG
87952001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8796
8797 * class.c (dump_array): Fix format specifier warning.
8798
3ac88239
NB
87992001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8800
8801 * cp-lang.c (LANG_HOOKS_NAME): Override.
8802 (struct lang_hooks): Constify.
8803 * lex.c (cxx_init_options): Update.
8804 (lang_identify): Remove.
33bd39a2 8805 * parse.y (language_string): Remove.
3ac88239 8806
b21d216c
AF
88072001-11-08 Andreas Franck <afranck@gmx.de>
8808
8809 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
8810 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
8811 suggested by autoconf.
8812 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
8813 (c++.install-common): Use the transformed target alias names.
8814
d23c55c2
NB
88152001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8816
8817 * Make-lang.in: Update.
8818 * cp-lang.c: Include langhooks-def.h.
8819
2a2b1d56
KL
88202001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8821
8822 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
8823
76648a8b
KG
88242001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8825
8826 * lex.c (copy_lang_type): Add static prototype.
8827
fccef71e
KL
88282001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8829
8830 * pt.c (unify): Handle SCOPE_REF.
8831
19989812
JJ
88322001-11-01 Jakub Jelinek <jakub@redhat.com>
8833
8834 * tree.c (cp_copy_res_decl_for_inlining): Adjust
8835 DECL_ABSTRACT_ORIGIN for the return variable.
8836
5b7874aa
ZW
88372001-10-31 Zack Weinberg <zack@codesourcery.com>
8838
8839 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8840
306ef644
JM
88412001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
8842
8843 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
8844 semantics.c, spew.c: Fix spelling errors.
8845
76543000
KL
88462001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8847
8848 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8849
37207ee7
ZW
88502001-10-25 Zack Weinberg <zack@codesourcery.com>
8851
8852 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8853 pop_everything.
8854
d2a6f3c0 88552001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
8856
8857 * cp-lang.c (cxx_get_alias_set): New function.
8858 Point LANG_HOOKS_GET_ALIAS_SET to it.
8859
f1e09fa2 88602001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
8861
8862 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8863 * cp-tree.h (make_unbound_class_template): Prototype new function.
8864 * decl.c (make_unbound_class_template): New function.
8865 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8866 * error.c (dump_type): Likewise.
8867 * mangle.c (write_type): Likewise.
8868 * parse.y (template_parm): Likewise.
8869 (template_argument): Use make_unbound_class_template.
8870 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8871 (tsubst): Likewise.
8872 (tsubst_copy): Likewise.
8873 (unify): Likewise.
8874 * tree.c (walk_tree): Likewise.
8875 * typeck.c (comptypes): Likewise.
8876
0df6c2c7
KG
88772001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8878
8879 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8880 extra calls into fewer ones.
8881
97055d5c
AO
88822001-10-18 Alexandre Oliva <aoliva@redhat.com>
8883
8884 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8885 Warn when merging inline with attribute noinline.
8886 (start_decl, start_function): Warn if inline and attribute
8887 noinline appear in the same declaration.
8888
b5823a44
L
88892001-10-16 H.J. Lu <hjl@gnu.org>
8890
8891 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8892 for tree checking disabled.
8893
dc8ad298
HPN
88942001-10-16 Hans-Peter Nilsson <hp@axis.com>
8895
8896 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8897 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8898
d9f818d9
RS
88992001-10-15 Richard Sandiford <rsandifo@redhat.com>
8900
8901 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8902 (unify): Only handle MINUS_EXPR specially if the above flag is set
8903 and the subtracted constant is 1. Clear the flag on recursive calls.
8904 Set it when unifying the maximum value in an INTEGER_TYPE's range.
8905
e1be26f4
RS
89062001-10-15 Richard Sandiford <rsandifo@redhat.com>
8907
8908 * decl.c (bad_specifiers): Don't allow exception specifications
8909 on any typedefs.
8910
a5da89c6
NB
89112001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
8912
8913 * cp/lex.c (init_cp_pragma): Similarly.
8914
4f96ff63
KL
89152001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8916
8917 * pt.c (lookup_template_class): Build complete template arguments
8918 for BOUND_TEMPLATE_TEMPLATE_PARM.
8919
11e74ea6
KL
89202001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8921
8922 * cp-tree.h (TYPE_BINFO): Update comment.
8923 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8924 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8925 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8926 (copy_type): Prototype new function.
8927 * lex.c (copy_lang_decl): Gather tree node statistics.
8928 (copy_lang_type): New function.
8929 (copy_type): Likewise.
8930 (cp_make_lang_type): Create lang_type for
8931 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
8932 and BOUND_TEMPLATE_TEMPLATE_PARM.
8933 * pt.c (tsubst): Use copy_type instead of copy_node.
8934 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8935
f5d47abd
KL
89362001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8937
8938 * pt.c (determine_specialization): Ignore functions without
8939 DECL_TEMPLATE_INFO.
8940
e60505a5
NS
89412001-10-12 Nathan Sidwell <nathan@codesourcery.com>
8942
8943 PR g++/4476
8944 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8945
6f32162a
JM
89462001-10-11 Jason Merrill <jason_merrill@redhat.com>
8947
8948 * typeck2.c (store_init_value): Don't re-digest a bracketed
8949 initializer.
8950
8951 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8952 ANON_AGGR_TYPE_P.
8953
4a8d0c9c
RH
89542001-10-11 Richard Henderson <rth@redhat.com>
8955
8956 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8957 of an asm statement.
8958 (build_vtbl_ref_1): Split out from build_vtbl_ref.
8959 (build_vfn_ref): Use it to handle vtable descriptors before
8960 calling build_vtable_entry_ref.
8961 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8962
84b72302
RH
89632001-10-10 Richard Henderson <rth@redhat.com>
8964
37207ee7 8965 * parse.y (asm_operand): Allow named operands.
84b72302 8966 * semantics.c (finish_asm_stmt): Tweek for changed location
4639c5c6 8967 of the operand constraint.
84b72302 8968
48c8b0be 89692001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
8970
8971 * call.c (standard_conversion): Add bad conversion between
8972 integers and pointers.
8973 (convert_like_real): Don't use convert_for_initialization for bad
8974 conversions; complain here and use cp_convert.
8975 (build_over_call): Don't handle bad conversions specially.
8976 (perform_implicit_conversion): Allow bad conversions.
8977 (can_convert_arg_bad): New fn.
8978 * cp-tree.h: Declare it.
8979 * typeck.c (convert_for_assignment): Use it.
8980 (ptr_reasonably_similar): Any target type is similar to void.
8981
19551f29
AO
89822001-10-08 Alexandre Oliva <aoliva@redhat.com>
8983
8984 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8985 (cp/cp-lang.o): New rule.
8986 * cp-tree.h: Declare hooks.
8987 * tree.c: Make hooks non-static.
8988 (init_tree): Don't initialize hooks here.
8989 * lex.c: Likewise. Move definition of lang_hooks to...
8990 * cp-lang.c: ... new file.
8991
31ed8fea
RH
89922001-10-08 Richard Henderson <rth@redhat.com>
8993
8994 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8995 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8996
8b60264b
KG
89972001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8998
8999 * class.c (build_vtable_entry_ref): Const-ify.
9000 * decl.c (predefined_identifier,
37207ee7 9001 initialize_predefined_identifiers): Likewise.
8b60264b
KG
9002 * init.c (build_new_1): Likewise.
9003 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9004 Likewise.
9005
bc4c7159
AO
90062001-10-05 Alexandre Oliva <aoliva@redhat.com>
9007
9008 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9009 (INSNS_PER_STMT): Likewise.
9010 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9011 (copy_body, initialize_inlined_parameters): Likewise.
9012 (declare_return_variable, inlinable_function_p): Likewise.
9013 (expand_call_inline, expand_calls_inline): Likewise.
9014 (optimize_inline_calls, clone_body): Likewise.
9015 * tree.c (walk_tree): Moved to ../tree-inline.c.
9016 (walk_tree_without_duplicates): Likewise.
9017 (copy_tree_r, remap_save_expr): Likewise.
9018
25af8512
AO
90192001-10-04 Alexandre Oliva <aoliva@redhat.com>
9020
9021 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9022 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9023 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9024 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9025 (flag_inline_trees): Moved declaration to ../tree-inline.h.
9026 (walk_tree): Moved declaration to ../tree-inline.h.
9027 (walk_tree_without_duplicates, copy_tree_r): Likewise.
9028 (remap_save_expr): Likewise.
9029 * decl.c: Include tree-inline.h.
9030 (lang_mark_tree): Don't mark inlined_fns.
9031 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9032 * optimize.c: Include tree-inline.h.
9033 (optimize_inline_calls): Move declaration to ../tree.h, as
9034 non-static.
9035 (remap_decl): Use language-independent constructs and hooks.
9036 (remap_block, copy_body_r, declare_return_variable): Likewise.
9037 (inlinable_function_p): Likewise. Don't test for
9038 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9039 no longer language-specific.
9040 (optimize_inline_calls): Likewise. Make it non-static. Moved
9041 call of dump_function to...
9042 (optimize_function): Here...
9043 (clone_body): New function, extracted from...
9044 (maybe_clone_body): ... here. Build decl_map locally and pass
9045 it on to clone_body.
9046 * pt.c, semantics.c: Include tree-inline.h.
9047 * tree.c: Likewise.
9048 (cp_walk_subtrees): New language-specific hook for tree inlining.
9049 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9050 cp_is_overload_p, cp_auto_var_in_fn_p,
9051 cp_copy_res_decl_for_inlining): Likewise.
9052 (walk_tree): Move language-specific constructs into...
9053 (cp_walk_subtrees): this new function.
9054 (copy_tree_r): Use language-independent constructs and hooks.
9055 (init_tree): Initialize tree inlining hooks.
9056 (remap_save_expr): Adjust prototype so that the declaration
9057 does not require the definition of splay_tree.
9058
6a4af81f
JDA
90592001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
9060
9061 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9062 to build the declaration instead of the declaration itself.
9063
0caee1c6
JM
90642001-10-02 Jason Merrill <jason_merrill@redhat.com>
9065
48c8b0be
JM
9066 * decl2.c (cxx_decode_option): Add 'else'.
9067
0caee1c6
JM
9068 * spew.c (end_input): No longer static.
9069 * cp-tree.h: Declare it.
9070 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9071
80a497e4
JM
90722001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9073
9074 * call.c (build_over_call), typeck.c (build_function_call_real):
9075 Pass type attributes to check_function_format rather than name or
9076 assembler name. Don't require there to be a name or assembler
9077 name to check formats.
9078
6431177a
JM
90792001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
9080
9081 * decl.c (init_decl_processing): Don't call
9082 init_function_format_info. Initialize lang_attribute_table
9083 earlier.
9084 (builtin_function): Call decl_attributes.
9085 (insert_default_attributes): New.
9086
55b3d665
JM
90872001-10-01 Jason Merrill <jason_merrill@redhat.com>
9088
9089 * decl.c (grokdeclarator): Copy array typedef handling from C
9090 frontend.
9091
9092 * decl.c (grokdeclarator): Copy too-large array handling from C
9093 frontend.
9094
9f57ca19
AO
90952001-09-29 Alexandre Oliva <aoliva@redhat.com>
9096
9097 * config-lang.in (target_libs): Added target-gperf, so that we
9098 don't try to build it if C++ is disabled.
9099
749ced52
ZW
91002001-09-23 Zack Weinberg <zack@codesourcery.com>
9101
9102 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9103 (cp/errfn.o): Delete rule.
9104 (cp/error.o): Depend on flags.h.
9105 * errfn.c: Delete file.
9106 * cp-tree.h: Declare warn_deprecated. Remove definitions of
9107 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9108 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9109 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9110 internal_error respectively. Make cp_deprecated into a macro.
9111 Don't define cp_printer typedef or declare cp_printers.
9112 * error.c: Include flags.h.
9113 Delete: struct tree_formatting_info, print_function_argument_list,
9114 print_declaration, print_expression, print_function_declaration,
9115 print_function_parameter, print_type_id, print_cv_qualifier_seq,
9116 print_type_specifier_seq, print_simple_type_specifier,
9117 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9118 print_parameter_declaration_clause, print_exception_specification,
9119 print_nested_name_specifier, and definition of cp_printers.
9120 (locate_error): New function.
9121 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9122 rewritten in terms of locate_error and diagnostic.c.
9123 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9124 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
9125 (init_error): Adjust to match.
9126
d2a6f3c0 91272001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
bb9f8221
RK
9128
9129 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9130
67231816
RH
91312001-09-21 Richard Henderson <rth@redhat.com>
9132
9133 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9134 (build_vtbl_initializer): Likewise.
9135 (build_vfn_ref): New.
9136 * cp-tree.h: Declare it.
9137 * call.c (build_over_call): Use it.
9138 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9139 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9140
d2a6f3c0 91412001-09-21 J"orn Rennecke <amylaar@redhat.com>
c9574c9f
R
9142
9143 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9144
91d231cb
JM
91452001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
9146
9147 Table-driven attributes.
9148 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9149 * decl2.c (cplus_decl_attributes): Only take one attributes
9150 parameter.
9151 * cp-tree.c (cplus_decl_attributes): Update prototype.
9152 * class.c (finish_struct), decl.c (start_decl, start_function),
9153 decl2.c (grokfield), friend.c (do_friend), parse.y
9154 (parse_bitfield): Update calls to cplus_decl_attributes.
9155 * decl.c (grokdeclarator): Take a pointer to a single ordinary
9156 attribute list.
9157 * decl.h (grokdeclarator): Update prototype.
9158 * decl2.c (grokfield): Take a single ordinary attribute list.
9159 * friend.c (do_friend): Likewise.
9160 * decl.c (shadow_tag, groktypename, start_decl,
9161 start_handler_parms, grokdeclarator, grokparms, start_function,
9162 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9163 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9164 (process_template_parm, do_decl_instantiation): Pass single
9165 ordinary attribute lists around.
9166 * decl.c (grokdeclarator): Correct handling of nested attributes.
9167 Revert the patch
9168 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
9169 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9170 not the left.
9171 .
9172 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9173 (cp_attribute_table): Declare.
9174 * decl.c (valid_lang_attribute): Don't define.
9175 (lang_attribute_table): Define.
9176 (init_decl_processing): Initialize lang_attribute_table instead of
9177 valid_lang_attribute.
9178 * tree.c (cp_valid_lang_attribute): Remove.
9179 (handle_java_interface_attribute, handle_com_interface_attribute,
9180 handle_init_priority_attribute): New functions.
9181 (cp_attribute_table): New array.
9182 * decl2.c (import_export_class): Don't use
9183 targetm.valid_type_attribute.
9184
a1bda5f1
GDR
91852001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9186
e6b9638b
JM
9187 * Make-lang.in (cp/error.o): Depend on real.h
9188 * error.c: #include "real.h"
a1bda5f1 9189
cb6edbcb
KG
91902001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9191
9192 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9193 xmalloc/strcpy/strcat.
9194
83182544
KG
91952001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9196
9197 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9198 Const-ification.
9199 * pt.c (tsubst_decl): Likewise.
9200
40008eda
KG
92012001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9202
9203 * decl2.c (lang_f_options): Const-ification.
9204 * lex.c (cplus_tree_code_name): Likewise.
9205 * spew.c (yyerror): Likewise.
9206
39e78d8b
NS
92072001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9208
9209 PR c++/3986
9210 * class.c (force_canonical_binfo_r): Check & move an indirect
9211 primary base first.
9212 (force_canonical_binfo): Check that it's not already
9213 canonical.
9214 (mark_primary_virtual_base): Remove BINFO parameter.
9215 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9216
6d0a3f67
NS
92172001-09-06 Nathan Sidwell <nathan@codesourcery.com>
9218
9219 Remove TYPE_NONCOPIED_PARTS.
9220 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9221 CLASSTYPE_PURE_VIRTUALS.
9222 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9223 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 9224 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
9225 (finish_struct_1): ... call it here.
9226
4f8e1232
MM
92272001-09-04 Mark Mitchell <mark@codesourcery.com>
9228
9229 * decl.c (duplicate_decls): Remove code deadling with
9230 DECL_SAVED_INSNS.
9231 * decl2.c (finish_file): Likewise.
9232 * pt.c (instantiate_decl): Likewise.
9233 * semantics.c (expand_body): Don't defer local functions if
9234 they wouldn't be deferred for some other reason. Don't
9235 generate RTL for functions that will not be emitted.
9236 (genrtl_start_function): Remove code deadling with
9237 DECL_SAVED_INSNS.
9238 (genrtl_finish_function): Likewise.
9239
da86f08f
NS
92402001-09-04 Nathan Sidwell <nathan@codesourcery.com>
9241
9242 PR c++/4203
9243 * call.c (build_over_call): Do not optimize any empty base
9244 construction.
9245
38066e83
KL
92462001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9247
9248 * error.c (dump_template_decl): Output template parameters
9249 together with their specifiers.
9250 Output `class' prefix for template template parameter.
9251 (dump_decl): Fix formatting.
9252
598e9ba5 92532001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 9254
598e9ba5
KG
9255 * optimize.c (inlinable_function_p): Allow only smaller single
9256 functions. Halve inline limit after reaching recursive limit.
749ced52 9257
f232e4a5
JR
92582001-08-30 Joern Rennecke <amylaar@redhat.com>
9259 Jason Merrill <jason_merrill@redhat.com>
9260
9261 * class.c (build_vtable_entry_ref): Subtract in char*, not
9262 ptrdiff_t.
9263
0213a355
JM
92642001-08-23 Jason Merrill <jason_merrill@redhat.com>
9265
9266 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9267 (build_cplus_array_type): Use cp_build_qualified_type, not
9268 TYPE_MAIN_VARIANT, to get an unqualified version.
9269
9270 * decl2.c (grok_alignof): Lose.
9271 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
9272 * typeck.c (c_alignof): Lose.
9273 * semantics.c (finish_sizeof, finish_alignof): New.
9274 * parse.y: Use them.
9275 * cp-tree.h: Declare them.
9276
fd10dd09
JM
92772001-08-22 Jason Merrill <jason_merrill@redhat.com>
9278
9279 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
9280 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
9281 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
9282
baeb4732
JJ
92832001-08-19 Jakub Jelinek <jakub@redhat.com>
9284
9285 * typeck2.c (add_exception_specifier): Only require complete type if
9286 not in processing template declaration.
9287
1c0cc57e
KG
92882001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9289
9290 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
9291 GNU_xref_start_scope and GNU_xref_end_scope.
9292
9293 * tree.c (TYPE_HASH): Moved to ../tree.h.
9294
9a52d09b
MM
92952001-08-16 Mark Mitchell <mark@codesourcery.com>
9296
9297 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
9298 on COMPOUND_EXPRs.
9299
b5d1cbd2
RH
93002001-08-14 Richard Henderson <rth@redhat.com>
9301
9302 * class.c, cp-tree.h (build_vfn_ref): Remove.
9303 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
9304
63d6f87a
MM
93052001-08-13 Mark Mitchell <mark@codesourcery.com>
9306
9307 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
9308 empty class assignment as having side-effects to avoid
9309 spurious warnings.
9310
e78d8e51
ZW
93112001-08-13 Zack Weinberg <zackw@panix.com>
9312
9313 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
9314 * except.c: Include libfuncs.h.
9315
a60af04a
GDR
93162001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9317
9318 * decl.c (grokdeclarator): Clarify diagnostic message.
9319
3605b283
KL
93202001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9321
9322 * decl2.c (do_nonmember_using_decl): Replace using directive
9323 with using declaration in the error message.
9324
4d5f3fbd
KL
93252001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9326
9327 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
9328 criterion to avoid rebuilding expression tree instead of
9329 processing_template_decl.
9330
07b2f2fd
JM
93312001-08-07 Jason Merrill <jason_merrill@redhat.com>
9332
9333 Support named return value optimization for inlines, too.
9334 * decl.c (finish_function): Nullify returns here.
9335 * semantics.c (genrtl_start_function): Not here.
9336 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
9337 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
9338 Also nullify the CLEANUP_STMT for the nrv.
9339 * cp-tree.h: Declare it.
9340 * optimize.c (declare_return_variable): Replace the nrv with the
9341 return variable.
9342 * typeck.c (check_return_expr): Be more flexible on alignment check.
9343 Ignore cv-quals when checking for a matching type.
9344
2cc07db4
RH
93452001-08-09 Richard Henderson <rth@redhat.com>
9346
9347 * decl2.c (finish_objects): Use target hooks instead of
9348 assemble_constructor and assemble_destructor.
9349
0ca179b2
JDA
93502001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
9351
9352 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
9353
0830ae44
NS
93542001-08-07 Nathan Sidwell <nathan@codesourcery.com>
9355
9356 PR c++/3820
9357 Stop using TYPE_NONCOPIED_PARTS.
9358 * call.c (build_over_call): Be careful when copy constructing
9359 or assigning to an empty class.
9360 * class.c (check_bases_and_members): It has a
9361 COMPLEX_ASSIGN_REF if it has a vptr.
9362 (layout_class_type): Don't add empty class padding to
9363 TYPE_NONCOPIED_PARTS.
9364 (finish_struct_1): Don't add the VFIELD either.
9365 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
9366 initialization.
9367
59a13e0f
JM
93682001-08-07 Jason Merrill <jason_merrill@redhat.com>
9369
9370 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
9371
47907859
RH
93722001-08-06 Richard Henderson <rth@redhat.com>
9373
9374 * decl2.c (finish_objects): Pass a symbol_ref and priority to
9375 assemble_{constructor,destructor}. Remove priority handling.
9376
eac69b8a
GDR
93772001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9378
9379 Don't allow template-id in using-declaration.
9380 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
9381 (do_class_using_decl): Likewise.
9382
ef6e958a
NB
93832001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9384
9385 * cp/spew.c (read_token): No need to pop buffers.
9386
dff94ad7
SS
93872001-08-02 Stan Shebs <shebs@apple.com>
9388
9389 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
9390 (fnaddr_from_vtable_entry): Remove decl.
9391 * method.c (use_thunk): Update comment.
9392
026c3f13
AC
93932001-08-01 Andrew Cagney <ac131313@redhat.com>
9394
9395 * repo.c (get_base_filename): Change return value to const char
9396 pointer.
9397
1dbb6023
NS
93982001-08-02 Nathan Sidwell <nathan@codesourcery.com>
9399
9400 Kill -fhonor-std.
9401 * NEWS: Document.
9402 * cp-tree.h (flag_honor_std): Remove.
9403 (CPTI_FAKE_STD): Remove.
9404 (std_node): Remove comment about it being NULL.
9405 (fake_std_node): Remove.
9406 * decl.c (in_fake_std): Remove.
9407 (walk_namespaces_r): Remove fake_std_node check.
9408 (push_namespace): Remove in_fake_std code.
9409 (pop_namespace): Likewise.
9410 (lookup_name_real): Remove fake_std_node check.
9411 (init_decl_processing): Always create std_node. Always add
9412 std:: things there.
9413 (builtin_function): Always put non '_' fns in std.
9414 * decl2.c (flag_honor_std): Remove.
9415 (lang_f_options): Remove honor-std.
9416 (unsupported_options): Add honor-std.
9417 (set_decl_namespace): Remove fake_std_node check.
9418 (validate_nonmember_using_decl): Likewise.
9419 (do_using_directive): Likewise.
9420 (handle_class_head): Likewise.
9421 * dump.c (cp_dump_tree): Likewise.
9422 * except.c (init_exception_processing): Adjust.
9423 * init.c (build_member_call): Remove fake_std_node check.
9424 (build_offset_ref): Likewise.
9425 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
9426 * rtti.c (init_rtti_processing): Adjust.
9427
6ad7895a
APB
94282001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9429
9430 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
9431 operand while calling cp_tree_equal.
9432
befe7c61
NS
94332001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9434
9435 The 3.0 ABI no longer has vbase pointer fields.
9436 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
9437 FORMAT_VBASE_NAME): Remove.
9438 * method.c (do_build_copy_constructor): Adjust.
9439 (do_build_assign_ref): Adjust.
9440 * search.c (lookup_field_r): Adjust.
9441 * typeck.c (build_component_ref): Adjust.
9442
9443 The 3.0 ABI always has a vtable pointer at the start of every
9444 polymorphic class.
9445 * rtti.c (build_headof_sub): Remove.
9446 (build_headof): Adjust.
9447 (get_tinfo_decl_dynamic): No need to check flag_rtti
9448 here. Adjust.
9449 (create_real_tinfo_var): Explain why we need a hidden name.
9450
20dde49d
NS
94512001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9452
9453 PR c++/3631
9454 * class.c (update_vtable_entry_for_fn): The fixed adjustment
9455 of a virtual thunk should be from declaring base.
9456
b7ad2f8b
NS
94572001-07-31 Nathan Sidwell <nathan@codesourcery.com>
9458
9459 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
9460 the shared virtual base, so preserving inheritance graph order.
9461
57cb6d52
AJ
94622001-07-30 Andreas Jaeger <aj@suse.de>
9463
749ced52 9464 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 9465
594280a3
RH
94662001-07-28 Richard Henderson <rth@redhat.com>
9467
9468 * method.c (pending_inlines): Remove.
9469
0ab142b0
NS
94702001-07-27 Nathan Sidwell <nathan@codesourcery.com>
9471
9472 * class.c (mark_primary_virtual_base): Don't adjust base
9473 offsets here.
9474 (dfs_unshared_virtual_bases): Adjust them here.
9475 (mark_primary_bases): Explain why we adjust at the end.
9476
d60d223b
NS
94772001-07-27 Nathan Sidwell <nathan@codesourcery.com>
9478
9479 * class.c (finish_struct_1): When copying the primary base's
9480 VFIELD, make sure we find it is at offset zero.
9481
db3ef87b
KL
94822001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9483
9484 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
9485 tsubst_expr for default template arguments.
9486
312b7c9d
NS
94872001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9488
d60d223b 9489 PR c++/3621
312b7c9d 9490 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 9491 nonzero.
312b7c9d 9492
648c2206
NS
94932001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9494
9495 PR c++/3624
9496 * call.c (resolve_args): Simplify, call
9497 convert_from_reference.
9498 (build_new_op): Resolve and convert from reference ARG1
9499 earlier. Adjust ARG2 & ARG3 resolve and conversion.
9500
969fd501
NS
95012001-07-26 Nathan Sidwell <nathan@codesourcery.com>
9502
9503 * decl.c (last_function_parm_tags): Remove.
9504 (current_function_parm_tags): Remove.
9505 (init_decl_processing): Adjust.
9506 (start_function): Adjust.
9507 (store_parm_decls): Adjust.
9508
9509 PR c++/3152
9510 * decl.c (grokdeclarator): Detect when a function typedef is
9511 declaring a function, and create last_function_parms correctly.
9512
08ac397c 95132001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 9514
08ac397c
JM
9515 * call.c (joust): Only prefer a non-builtin candidate to a builtin
9516 one if they have the same signature.
9517
9518 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
9519 it rather than toplevel_bindings_p. Give it a mangled name if static.
9520 (convert_to_reference): Adjust.
9521 * decl2.c (get_temp_name): Lose.
9522 * mangle.c (mangle_ref_init_variable): New fn.
9523 (mangle_guard_variable): Strip the ref-init header.
9524 * cp-tree.h: Adjust.
9525 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
9526 initializer.
9527 (grok_reference_init): Always use DECL_INITIAL.
9528
40260429
NS
95292001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9530
9531 PR c++/3416
9532 * call.c (build_conditional_expr): Recheck args after
9533 conversions.
9534 * cp-tree.h (build_conditional_expr): Move to correct file.
9535 * typeck.c (decay_conversion): Diagnose any unknown types
9536 reaching here.
9537 (build_binary_op): Don't do initial decay or default
9538 conversions on overloaded functions.
9539 (build_static_cast): Don't do a decay conversion here.
9540
ab085207
NS
95412001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9542
9543 PR c++/3543
9544 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
9545 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
9546
0abe00c5
NS
95472001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9548
9549 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
9550 (create_vtbl_ptr): ... here.
9551
90b1ca2f
NS
95522001-07-25 Nathan Sidwell <nathan@codesourcery.com>
9553
9554 * class.c (build_vbase_offset_vbtl_entries): Look for
9555 non-primary base of which we are a sub vtable.
9556
cfe5dc31
PE
95572001-07-24 Phil Edwards <pme@sources.redhat.com>
9558
9559 * semantics.c (finish_this_expr): Remove unused code.
9560
7f54a851
NS
95612001-07-24 Nathan Sidwell <nathan@codesourcery.com>
9562
9563 Simplify rtti, now we've only one ABI.
9564 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
9565 CPTI_TINFO_VAR_ID.
9566 (tinfo_decl_id, tinfo_var_id): Remove.
9567 (get_typeid_1): Remove.
9568 * rtti.c
9569 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
9570 (typeid_ok_p): New function.
9571 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
9572 (get_tinfo_decl): Remove old abi documentation.
9573 (tinfo_from_decl): Remove.
9574 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
9575 (get_typeid_1): Remove.
9576 (get_base_offset): Remove.
9577 (synthesize_tinfo_var): Absorb get_base_offset.
9578 (create_real_tinfo_var): Don't use tinfo_decl_id.
9579
18fee3ee
GS
95802001-07-23 Graham Stott <grahams@redhat.com>
9581
d30d6e7a 9582 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
9583 variable has_two_argument_delete_p.
9584
c4372ef4
NS
95852001-07-21 Nathan Sidwell <nathan@codesourcery.com>
9586
9587 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
9588 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
9589 (CPTI_INDEX_IDENTIFIER): Remove.
9590 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
9591 (delta2_identifier): Remove.
9592 (index_identifier): Remove.
9593 (pfn_or_delta2_identifier): Remove.
9594 (flag_vtable_thunks): Remove.
9595 (VTABLE_DELTA2_NAME): Remove.
9596 (VTABLE_INDEX_NAME): Remove.
9597 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
9598 (vfunc_ptr_type_node): Adjust.
9599 (VTABLE_NAME_PREFIX): Adjust.
9600 (build_vfn_ref): Lose first parameter.
9601 (fixup_all_virtual_upcast_offsets): Remove.
9602 * decl.c (initialize_predefined_identifiers): Remove
9603 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
9604 (init_decl_processing): Remove no-vtable-thunk code.
9605 * decl2.c (flag_vtable_thunks): Remove.
9606 (mark_vtable_entries): Remove no-vtable-thunk code.
9607 * error.c (dump_decl): Remove no-vtable-thunk code.
9608 (dump_expr): Adjust ptr to member function code.
9609 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
9610 code.
9611 * rtti.c (build_headof): Remove no-vtable-thunk code.
9612 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
9613 * search.c (get_base_distance): Remove expand_upcast_fixups case.
9614 (virtual_context) Remove.
9615 (expand_upcast_fixups): Remove.
9616 (fixup_virtual_upcast_offsets): Remove.
9617 (fixup_all_virtual_upcast_offsets): Remove.
9618 * typeck.c (get_member_function_from_ptrfunc): Remove
9619 no-vtable-thunk code.
9620 * call.c (build_over_call): Adjust call to build_vfn_ref.
9621 * class.c (build_vfn_ref): Lose first parameter. Remove
9622 no-vtable-thunk code.
9623 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
9624 (build_vtable_entry): Remove no-vtable-thunk code.
9625
3461fba7
NS
96262001-07-20 Nathan Sidwell <nathan@codesourcery.com>
9627
9628 Remove old-abi remnants. Remove comments about old abi
838dfd8a 9629 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
9630 * cp-tree.h: Adjust comments.
9631 (vbase_offsets_in_vtable_p): Delete.
9632 (vcall_offsets_in_vtable_p): Delete.
9633 (vptrs_present_everywhere_p): Delete.
9634 (all_overridden_vfuns_in_vtables_p): Delete.
9635 (merge_primary_and_secondary_vtables_p): Delete.
9636 (TYPE_CONTAINS_VPTR_P): Adjust.
9637 (VTT_NAME_PREFIX): Remove.
9638 (CTOR_VTBL_NAME_PREFIX): Remove.
9639 (init_vbase_pointers): Remove.
9640 * class.c: Adjust coments.
9641 (build_vbase_pointer_fields): Delete.
9642 (build_vbase_pointer): Remove old-abi code.
9643 (build_secondary_vtable): Likewise.
9644 (modify_all_vtables): Likewise.
9645 (create_vtable_ptr): Likewise.
9646 (layout_class_type): Likewise.
9647 (finish_struct_1): Likewise.
9648 (finish_vtbls): Likewise.
9649 (dfs_finish_vtbls): Delete.
9650 (build_vbase_offset_vtbl_entries): Remove old-abi code.
9651 * cvt.c: Adjust comments.
9652 * decl.c: Adjust comments.
9653 * decl2.c: Adjust comments.
9654 * init.c: Adjust comments.
9655 (construct_virtual_bases): Remove old-abi code.
9656 * lang-specs.h: Remove -fno-new-abi.
9657 * mangle.c: Adjust comments.
9658 * rtti.c: Adjust comments.
9659 (get_base_offset): Remove old-abi-code.
9660 * search.c: Adjust comments.
9661 (dfs_init_vbase_pointers): Remove.
9662 (dfs_vtable_path_unmark): Remove.
9663 (init_vbase_pointers): Remove.
9664 * semantics.c: Adjust comments.
9665 (emit_associated_thunks): Remove old-abi code.
9666 * typeck.c: Adjust comments.
9667
1c432a87
DB
96682001-07-20 Daniel Berlin <dan@cgsoftware.com>
9669
9670 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
9671 params.h.
9672
b7076960
MM
96732001-07-19 Mark Mitchell <mark@codesourcery.com>
9674
9675 * class.c (finish_struct_anon): Forbid nested classes.
9676
2b85879e
NB
96772001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
9678
9679 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
9680 * optimize.c: Include debug.h.
9681 (maybe_clone_body): Use debug hook.
9682 * semantics.c: Include debug.h.
9683 (expand_body): Use debug hook.
9684
c60e94a7
NB
96852001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
9686
9687 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
9688
dbc957f1
MM
96892001-07-18 Mark Mitchell <mark@codesourcery.com>
9690
9691 * class.c (type_requires_array_cookie): New function.
9692 (check_methods): Don't try to figure out whether the type needs a
9693 cookie here.
9694 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
9695 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
9696 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
9697 * pt.c (instantiate_class_template): Don't set
9698 TYPE_VEC_DELETE_TAKES_SIZE.
9699 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 9700
7ba0b0f7 97012001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 9702 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
9703
9704 * NEWS (Changes in GCC 3.0): Fix typo.
9705
59387d2e
JM
97062001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
9707
9708 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
9709 which attributes are to be attached, and a flags argument. Update
9710 call to decl_attributes.
9711 (grokfield): Update call to decl_attributes.
9712 * class.c (finish_struct): Update call to cplus_decl_attributes.
9713 * cp-tree.h (cplus_decl_attributes): Update prototype.
9714 * decl.c (start_decl, grokdeclarator, start_function): Update
9715 calls to decl_attributes and cplus_decl_attributes.
9716 * friend.c (do_friend): Update call to cplus_decl_attributes.
9717 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
9718
7ed47c04
MM
97192001-07-12 Mark Mitchell <mark@codesourcery.com>
9720
9721 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
9722 for `register' variables with an asm-specification.
9723
40b18c0a
MM
97242001-07-11 Mark Mitchell <mark@codesourcery.com>
9725
9726 * semantics.c (finish_asm_stmt): Mark the output operands
9727 to an asm addressable, if necessary.
9728
517c3b80
BE
97292001-07-11 Ben Elliston <bje@redhat.com>
9730
219670f1
BE
9731 * Revert this change -- there is a subtle bug.
9732
517c3b80
BE
9733 PR c++/80
9734 * decl.c (finish_enum): New "attributes" argument; pass it to
9735 cplus_decl_attributes. Use a narrower type if the enum is packed.
9736 * cp-tree.h (finish_enum): Adjust prototype.
9737 * parse.y (enum_head): New non-terminal.
9738 (structsp): Use it. Enums now may be preceded or followed by
9739 optional attributes -- pass their chained tree to finish_enum().
9740 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
9741
2ba9c47e
MM
97422001-07-10 Mark Mitchell <mark@codesourcery.com>
9743
9744 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
9745 variables.
9746
35241192
JM
97472001-07-10 Jason Merrill <jason_merrill@redhat.com>
9748
9749 * semantics.c (cp_expand_stmt): Fix for null
9750 current_function_return_value.
9751
07167a18
JM
97522001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
9753
9754 * call.c (build_op_delete_call): Initialize fn.
9755 (convert_like_real): Delete conditional.
9756 (joust): Initialize *w and *l.
9757 * class.c: Add prototype for binfo_ctor_vtable.
9758 (get_primary_binfo): Initialize result.
9759 * init.c (build_java_class_ref): Initialize name.
ae818d3b 9760
35241192
JM
97612001-07-09 Erik Rozendaal <dlr@acm.org>
9762
ae818d3b
ER
9763 * typeck.c (unary_complex_lvalue): Do not duplicate the
9764 argument to modify, pre-, or post-increment when used as an
9765 lvalue and when the argument has side-effects.
9766
12a68f1f
JM
97672001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9768
9769 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9770 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
9771 cplus_decl_attributes even if attrs is NULL.
9772 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9773
f7a4cec0
JM
97742001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9775
9776 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
9777 calls to decl_attributes.
9778
c80106a4
IR
97792001-07-06 Ira Ruben <ira@apple.com>
9780
ae818d3b 9781 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
9782 be DECL_TEMPLATE_RESULT.
9783
dac65501
KL
97842001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9785
9786 * cp-tree.h (copy_template_template_parm): Rename to ...
9787 (bind_template_template_parm): ... here.
9788 * tree.c (copy_template_template_parm): Rename to ...
9789 (bind_template_template_parm): ... here. Remove the case when
9790 NEWARGS is NULL_TREE.
9791 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
9792 BOUND_TEMPLATE_TEMPLATE_PARM.
9793 * pt.c (lookup_template_class): Adjust.
9794
01f9e964
JM
97952001-07-05 Jason Merrill <jason_merrill@redhat.com>
9796
9797 * cvt.c (convert_lvalue): New fn.
9798 * cp-tree.h: Declare it.
9799 * method.c (do_build_assign_ref): Use it.
9800 (do_build_copy_constructor): Convert parm to base types
9801 before calling base constructors.
9802
9803 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
9804 DECL_USER_ALIGN. Check flag_elide_constructors instead of
9805 optimize.
9806 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
9807
6be77748
NS
98082001-07-02 Nathan Sidwell <nathan@codesourcery.com>
9809
9810 * optimize.c (optimize_inline_calls): New function, broken out
9811 of ...
9812 (optimize_function): ... here. Call it. Don't inline if it is
9813 a thunk.
9814 (dump_function): Print name of dump flag causing this dump.
9815 * semantics.c (expand_body): Move thunk inline check to
9816 optimize_function.
9817
8d8e52be
JM
98182001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
9819
9820 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
9821 (comptypes): Use target.comp_type_attributes.
9822
5a0db193
NS
98232001-06-29 Nathan Sidwell <nathan@codesourcery.com>
9824
9825 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
9826
46f018e1
GDR
98272001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9828
9829 * error.c (lang_print_error_function): Add a `diagnostic_context *'
9830 parameter. Tweak.
9831
501990bb
NB
98322001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9833
9834 * decl2.c (import_export_class): Update.
9835
f68fc4db
GDR
98362001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9837
9838 * error.c (init_error): Adjust settings.
9839
9596ddd6
GDR
98402001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9841
9842 * error.c (init_error): Adjust settings.
9843
c93586fa
RS
98442001-06-19 Richard Sandiford <rsandifo@redhat.com>
9845
9846 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9847 return pointers to data members by reference rather than by value.
9848
0d97bf4c
JM
98492001-06-18 Jason Merrill <jason_merrill@redhat.com>
9850
9851 Implement the Named Return Value optimization.
9852 * cp-tree.h (struct cp_language_function): Add x_return_value.
9853 (current_function_return_value): Now a macro.
9854 * decl.c: Don't define it.
9855 (define_label, finish_case_label): Don't clear it.
9856 (init_decl_processing): Don't register it with GC.
9857 * semantics.c (genrtl_finish_function): Don't check it for
9858 no_return_label. Copy the RTL from the return value to
9859 current_function_return_value and walk, calling...
9860 (nullify_returns_r): ...this new fn.
9861 * typeck.c (check_return_expr): Set current_function_return_value.
9862
13de7ec4
JM
98632001-06-15 Jason Merrill <jason_merrill@redhat.com>
9864
9865 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9866 sharing a ctor vtable with. Merge code for cases 1 and 2.
9867 (binfo_ctor_vtable): New fn.
9868 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9869
3ea099f1
JM
98702001-06-14 Jason Merrill <jason_merrill@redhat.com>
9871
9872 * class.c (dfs_find_final_overrider): Fix logic.
9873
9874 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9875 virtual thunk instead of non-virtual.
9876 (get_matching_virtual): Uncomment.
9877
9878 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9879 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
9880 PARM, not ARG.
9881
87326ba8
NS
98822001-06-14 Nathan Sidwell <nathan@codesourcery.com>
9883
9884 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9885 we've not emerged from the hierarchy of RTTI_BINFO on reaching
9886 a non-virtual base.
9887
e065a36e
MM
98882001-06-13 Mark Mitchell <mark@codesourcery.com>
9889
9890 * NEWS: Update release number.
9891
623fe76a
NS
98922001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9893
9894 PR c++/3130, c++/3131, c++/3132
9895 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9896 * class.c (force_canonical_binfo_r): Move
9897 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9898 virtual bases unless they're primary and what they're primary
9899 too has been moved.
9900 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9901 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9902 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9903 derived binfo.
9904 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9905 (layout_nonempty_base_or_field): Add most derived type
9906 parameter. Adjust.
9907 (layout_empty_base): Likewise.
9908 (build_base_field): Likewise.
9909 (build_base_fields): Likewise.
9910 (propagate_binfo_offsets): Add most derived type
9911 parameter. Skip non canonical virtual bases too.
9912 (dfs_set_offset_for_unshared_vbases): Don't skip primary
9913 bases. Do skip canonical bases.
9914 (layout_virtual_bases): Adjust.
9915 (layout_class_type): Adjust.
9916 (dfs_get_primary_binfo): Build list of virtual primary base
9917 candidates.
9918 (get_primary_binfo): Check that the shared virtual primary
9919 base candidate was found first.
9920 (accumulate_vtbl_inits): Don't do anything for non-vptr
9921 containing binfos. For case 1 primary virtual bases, keep
9922 checking that we've not emerged from the hierarchy of RTTI_BINFO.
9923
7bdcf888
NS
99242001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9925
9926 PR c++/3089
9927 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9928 hierarchy looking for primary bases for a ctor
9929 vtable. Recursively call oneself, if we meet our primary via
9930 this route and haven't met it yet via inheritance graph order.
9931
25b5b465
MM
99322001-06-11 Mark Mitchell <mark@codesourcery.com>
9933
9934 * lang-options.h: Emit documentation for -fno-honor-std, not
9935 -fhonor-std.
9936
eb2d0614
AO
99372001-06-10 Alexandre Oliva <aoliva@redhat.com>
9938
9939 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9940 Don't clobber delta.
9941 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9942
2a2b2d43
GDR
99432001-06-10 Mark Mitchell <mark@codesourcery.com>
9944 Gabriel Dos Reis <gdr@codesourcery.com>
9945
9946 * Make-lang.in (cp/call.o): Depend on diagnostic.h
9947 (cp/typeck.o): Depend on diagnostic.h
9948 (cp/typeck2.o): Depend on diagnostic.h
07167a18 9949 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
9950 * typeck.c: #include diagnostic.h
9951 (convert_for_initialization): Remove extern declaration for
9952 warningcount and errorcount.
9953
9954 * call.c: #include diagnostic.h
9955 (convert_like_real): Remove extern declaration for warnincount and
07167a18 9956 errorcount.
2a2b2d43
GDR
9957
9958 * repo.c: #include diagnostic.h
9959 * typeck2.c: #include diagnostic.h
9960
06d5e633
NS
99612001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9962
9963 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9964 in previous change.
9965
9ac1bd2e
NS
99662001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9967
9968 PR c++/2929
9969 * friend.c (do_friend): Use push_decl_namespace for classes at
9970 namespace scope.
9971
85a9a0a2
NS
99722001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9973 Jason Merrill <jason_merrill@redhat.com>
9974
9975 PR c++/3061
9976 * class.c (build_secondary_vtable): Use assert, rather than an error
9977 message.
9978 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9979 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9980 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9981 Don't set BINFO_VTABLE for a primary virtual base.
9982
daa8df65
MM
99832001-06-07 Mark Mitchell <mark@codesourcery.com>
9984
9985 * decl.c (duplicate_decls): Update source position information
9986 when a template function is defined.
9987
37344b9b
PE
99882001-06-07 Phil Edwards <pme@sources.redhat.com>
9989
9990 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
9991
fcebb2dd
NS
99922001-06-07 Nathan Sidwell <nathan@codesourcery.com>
9993
9994 PR c++/2914
9995 * decl.c (pushtag): Don't push into a complete type's scope.
9996
d0cd8b44
JM
99972001-06-06 Jason Merrill <jason_merrill@redhat.com>
9998
9999 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10000 (struct lang_decl_flags): Lose generate_with_vtable_p.
10001 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10002 * class.c (copy_virtuals): Adjust.
10003 * decl2.c (mark_vtable_entries): Adjust.
10004 * method.c (make_thunk, build_vtable_entry): Adjust.
10005 * class.c (update_vtable_entry_for_fn): Only look as far as the
10006 first defining class.
07167a18 10007 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 10008 defined in a lost primary virtual base.
07167a18 10009 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
10010 the lost primary case and the normal case.
10011 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10012 (get_vfield_offset, get_derived_offset): Lose.
10013 (dfs_find_final_overrider): Use look_for_overrides_here.
10014 (get_matching_virtual): New fn.
10015 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10016 not BV_VCALL_INDEX.
10017 * search.c (look_for_overrides_here): Split out from...
10018 (look_for_overrides_r): Here.
10019
10020 * class.c (find_final_overrider): Return error_mark_node on error.
10021
10022 * decl2.c (key_method): #if 0 accidental change.
10023
acf97e0b
JDA
100242001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
10025
10026 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10027 (build_over_call): Likewise.
10028 * decl.c (grokparms): Likewise.
10029 * pt.c (tsubst_decl): Likewise.
10030 * typeck.c (convert_arguments): Likewise.
10031
7e9abee9
MM
100322001-06-05 Mark Mitchell <mark@codesourcery.com>
10033
47ee8904
MM
10034 * semantics.c (begin_class_definition): Robustify.
10035
7e9abee9
MM
10036 * pt.c (instantiate_decl): Tell the repository code about the
10037 clones, not the cloned functions.
10038 * repo.c (repo_template_used): Explicitly instantiate the cloned
10039 function, not the clones.
10040
bea09693
NS
100412001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10042
10043 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10044 ICS_BAD_FLAG on created conversion.
10045 (compare_ics): Break out rank.
10046
8f7550ca
NS
100472001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10048
10049 * decl.c (xref_tag): Remove extraneous %s on dependent name
10050 lookup warning.
10051
442e01b6
NS
100522001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10053
10054 * class.c (layout_vtable_decl): Fix off by one error on
10055 build_index_type.
10056 (build_vtt): Likewise.
10057 (build_ctor_vtbl_group): Likewise.
10058
b7442fb5
NS
100592001-06-05 Nathan Sidwell <nathan@codesourcery.com>
10060
10061 * class.c (maybe_indent_hierarchy): New function.
10062 (dump_class_hierarchy_r): Add flags. Dump extra binfo
10063 information, if enabled. Use maybe_indent_hierarchy. Adjust
10064 output format.
10065 (dump_class_hierarchy): Adjust prototype. Adjust output format.
10066 (dump_array, dump_vtable, dump_vtt): New functions.
10067 (finish_struct_1): Adjust hierarchy dumping.
10068 (initialize_vtable): Call dump_vtable.
10069 (build_vtt): Call dump_vtt.
10070 (build_ctor_vtbl_group): Call dump_vtable.
10071 * decl2.c (flag_dump_class_layout): Remove.
10072 (cxx_decode_option): Remove dump translation unit
10073 and dump class hierarchy check. Call dump_switch_p.
10074 (finish_file): Adjust dumping.
10075 (dump.c): Only dump base classes if not TDF_SLIM.
10076 Only dump namespace members if not TDF_SLIM.
10077 * optimize.c (dump_function): New function.
10078 (optimize_function): Call dump_function.
10079 * semantics.c (expand_body): Use dump_enabled_p.
10080
e5410b32
NS
100812001-06-01 Nathan Sidwell <nathan@codesourcery.com>
10082
10083 PR g++/2936
10084 Part missed from first commit
10085 * decl2.c (finish_anon_union): Copy context.
10086
e97c9488
NS
100872001-05-30 Nathan Sidwell <nathan@codesourcery.com>
10088
10089 PR g++/2936
e97c9488
NS
10090 * optimize.c (remap_decl): Remap anonymous aggregate members too.
10091
87d9ac49
NS
100922001-05-26 Nathan Sidwell <nathan@codesourcery.com>
10093
10094 PR g++/2823
10095 * semantics.c (expand_body): Don't optimize thunks.
10096
88657302
RH
100972001-05-25 Sam TH <sam@uchicago.edu>
10098
10099 * cp-tree.h lex.h: Fix header include guards.
10100
101012001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
10102
10103 * decl.c (init_decl_processing): Tweak.
10104
0b1161fc
MM
101052001-05-24 Mark Mitchell <mark@codesourcery.com>
10106
10107 * decl.c (duplicate_decls): Tidy.
10108 (init_decl_processing): Always set flag_no_builtin.
10109
6f56d925
NS
101102001-05-24 Nathan Sidwell <nathan@codesourcery.com>
10111
10112 PR c++/2184
10113 * decl2.c (do_local_using_decl): Push the decls, even in a
10114 template.
10115
39e0656d
MM
101162001-05-22 Mark Mitchell <mark@codesourcery.com>
10117
10118 * optimize.c (initialize_inlined_parameters): Don't set
10119 TREE_READONLY for a VAR_DECL taking the place of an inlined
10120 PARM_DECL.
10121
0401d499
JM
101222001-05-22 Jason Merrill <jason_merrill@redhat.com>
10123
10124 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10125 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10126 attribute.
10127
14fc3426
JM
101282001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
10129
10130 * parse.y: Refer to compound literals as such, not as
10131 constructor-expressions.
10132
3f41ffd8
MM
101332001-05-21 Mark Mitchell <mark@codesourcery.com>
10134
10135 * call.c (build_op_delete_call): Ignore exception-specifications
10136 when looking for matching delete operators.
10137 * init.c (build_new_1): Compute whether or not the allocation
10138 function used is a placement allocation function or not, and
10139 communicate this information to build_op_delete_call.
10140
1a6025b4
JM
101412001-05-21 Jason Merrill <jason_merrill@redhat.com>
10142
90ecce3e
JM
10143 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
10144 (build_vtbl_ref): Adjust.
10145 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10146 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10147 Re-add vtable-gc.
10148 (unsupported_options): Correspondingly.
10149
10150 * decl2.c (maybe_make_one_only): Check flag_weak, not
10151 supports_one_only().
10152
1a6025b4
JM
10153 * cp-tree.def (START_CATCH_STMT): Lose.
10154 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
10155 * tree.c (cp_statement_code_p): Don't case it.
10156 * semantics.c (cp_expand_stmt): Likewise.
10157 * cp-tree.h (START_CATCH_TYPE): Lose.
10158 (HANDLER_TYPE): New.
10159 * except.c (expand_start_catch_block): Don't start any blocks.
10160 Return the type.
10161 (expand_end_catch_block): Don't end any blocks.
10162 * parse.y (handler): Don't pass anything from finish_handler_parms
10163 to finish_handler.
10164 * pt.c (tsubst_expr): Likewise.
10165 * semantics.c (begin_handler): Call note_level_for_catch here.
10166 (finish_handler_parms): Don't return anything.
10167 (genrtl_catch_block, begin_catch_block): Lose.
10168 (genrtl_handler): Call expand_start_catch here.
10169
101702001-05-18 Jason Merrill <jason_merrill@redhat.com>
10171
10172 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10173 (get_vtable_decl, build_vtt): Not here.
10174
d30a825a
NS
101752001-05-20 Nathan Sidwell <nathan@codesourcery.com>
10176
10177 PR c++/2781
10178 * optimize.c (update_cloned_parm): Copy addressability and other
10179 flags.
10180
3b82c249
KL
101812001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10182
10183 * pt.c (determine_specialization): Ignore artificial functions.
10184
2a967f3d
NB
101852001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
10186
10187 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10188 (C_RID_CODE): Remove.
10189 * lex.c (cxx_init_options): Call set_identifier_size. Update.
10190 (init_parse): Don't do it here.
10191
f99df08e
DN
101922001-05-18 Diego Novillo <dnovillo@redhat.com>
10193
10194 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10195 function declaration to avoid stripping the symbol's attributes.
10196
2b0cbc5d
NS
101972001-05-18 Nathan Sidwell <nathan@codesourcery.com>
10198
10199 * decl.c (pushdecl): Adjust error string.
10200 (xref_tag): Adjust friend class injection warning. Remove the
10201 inherited name from the class shadowed scope.
10202
e6855a2d
MM
102032001-05-17 Mark Mitchell <mark@codesourcery.com>
10204
10205 * except.c (cp_protect_cleanup_actions): New function.
07167a18 10206 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
10207 here. Do set lang_protect_cleanup_actions.
10208
cc469ee9
NS
102092001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10210
10211 * spew.c (read_token): Call yyerror on all unexpected tokens.
10212
3f0a9b35
NS
102132001-05-16 Nathan Sidwell <nathan@codesourcery.com>
10214
10215 * init.c (member_init_ok_or_else): Take a tree rather than
10216 string for name.
10217 (expand_member_init): Adjust.
10218
8d0cb60d
NC
102192001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
10220
10221 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 10222 decls if the first decl is a friend.
8d0cb60d 10223
1f730ff7
ZW
102242001-05-12 Zack Weinberg <zackw@stanford.edu>
10225
10226 * except.c (choose_personality_routine): Export. Add
10227 explanatory comment. Take an enum languages, not a boolean.
10228 (initialize_handler_parm): Adjust to match.
10229 * cp-tree.h: Prototype choose_personality_routine.
10230 * lex.c (handle_pragma_java_exceptions): New function.
10231 (init_cp_pragma): Register #pragma GCC java_exceptions.
10232
90e0c410
NB
102332001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10234
10235 * method.c (build_mangled_C99_name): Remove unused prototype.
10236
cb7fdde2
AO
102372001-05-12 Alexandre Oliva <aoliva@redhat.com>
10238
10239 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10240 * typeck.c (get_member_function_from_ptrfunc,
10241 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10242 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
10243
10244 Reverted Geoff Keating's 2001-05-03's patch.
10245
401deb20
IR
102462001-05-11 Ira Ruben <ira@apple.com>
10247
10248 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10249
8e93d446
NB
102502001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
10251
10252 * cp-tree.h (finish_label_expr, lookup_label): Delete.
10253 * parse.y: Update for '&&'; don't issue warning here.
10254 * semantics.c (finish_label_expr): Delete.
10255
5cdba4ff
MM
102562001-05-07 Mark Mitchell <mark@codesourcery.com>
10257
10258 * splay-tree.h (splay_tree_max): New function.
10259 (splay_tree_min): Likewise.
10260
8e9eff6b
GK
102612001-05-03 Geoffrey Keating <geoffk@redhat.com>
10262
10263 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10264 (pfn_vflag_identifier): Define.
10265 Update comment about layout of pointer functions.
10266 (build_ptrmemfunc1): Update prototype.
10267 (expand_ptrmemfunc_cst): Update prototype.
10268 * decl.c (initialize_predefined_identifiers): Initialize
10269 pfn_vflag_identifier.
10270 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10271 an extra field to the type.
07167a18 10272 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
10273 expand_ptrmemfunc_cst and build_ptrmemfunc1.
10274 * typeck.c (get_member_function_from_ptrfunc): When
10275 FUNCTION_BOUNDARY < 16, look at additional field to determine
10276 if a pointer-to-member is a real pointer or a vtable offset.
10277 (build_ptrmemfunc1): Add new parameter to contain extra field.
10278 (build_ptrmemfunc): Pass the extra field around.
10279 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
10280 (pfn_from_ptrmemfunc): Ignore the extra field.
10281
acc72c37
MM
102822001-05-03 Mark Mitchell <mark@codesourcery.com>
10283
10284 * cp-tree.h (flag_inline_trees): Update documentation.
10285 * decl.c (init_decl_processing): Adjust handling of
10286 flag_inline_functions and flag_inline_trees to support -O3.
10287 (grokfndecl): Set DECL_INLINE on all functions if that's what
10288 the user requested.
10289 (save_function_data): Clear DECL_INLINE in
10290 current_function_cannot_inline is non-NULL.
10291 * decl2.c (flag_inline_trees): Update documentation.
10292
5158d7ee
NS
102932001-05-03 Nathan Sidwell <nathan@codesourcery.com>
10294
10295 * dump.c (cp_dump_tree, USING_STMT case): New case.
10296 * tree.c (cp_statement_code_p): Add USING_STMT.
10297 * decl2.c (do_using_directive): Add the using directive statement.
10298
10299 * tree.c (walk_tree): Reformat an if block.
10300
80f5bb34
MM
103012001-05-02 Mark Mitchell <mark@codesourcery.com>
10302
10303 * decl.c (compute_array_index_type): Don't try to do anything with
10304 the indices when processing a template.
10305
3e411c3f
KG
103062001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10307
10308 * call.c: NULL_PTR -> NULL.
10309 * class.c: Likewise.
10310 * cvt.c: Likewise.
10311 * decl.c: Likewise.
10312 * decl2.c: Likewise.
10313 * except.c: Likewise.
10314 * init.c: Likewise.
10315 * rtti.c: Likewise.
10316 * search.c: Likewise.
10317 * tree.c: Likewise.
10318 * typeck.c: Likewise.
10319 * typeck2.c: Likewise.
10320
46188dca
MM
103212001-05-02 Mark Mitchell <mark@codesourcery.com>
10322
10323 * decl2.c (do_using_directive): Revert previous patch.
10324
9da99f7d
NS
103252001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10326
10327 * cp-tree.def (USING_STMT): New statement node.
10328 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
10329 * decl2.c (do_using_directive): Add USING_STMT to statement
10330 tree. Don't emit errors when processing template decl.
10331 * pt.c (tsubst_expr, USING_STMT case): New case.
10332 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
10333
4b48a93e
NS
103342001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10335
10336 * call.c (build_new_op): Convert args from reference here.
10337 (build_conditional_expr): Don't convert here.
10338
1bcea8d7
NS
103392001-05-01 Nathan Sidwell <nathan@codesourcery.com>
10340
10341 * spew.c (last_token_id): New static variable.
10342 (read_token): Set it here.
10343 (yyerror): Use it here.
10344
d72040f5
RH
103452001-04-30 Richard Henderson <rth@redhat.com>
10346
749ced52 10347 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
10348 * decl.c: Likewise.
10349
c3aac512
MM
103502001-04-30 Mark Mitchell <mark@codesourcery.com>
10351
10352 * gxxint.texi: Remove.
10353 * Make-lang.in: Remove all traces of gxxint.texi.
10354
d2a6f3c0 103552001-04-30 Mark P Mitchell <mark@codesourcery.com>
5fd893d5
MM
10356
10357 * decl2.c (start_static_initialization_or_destruction): Correct
10358 logic to handle the -fno-use-cxa-atexit case.
10359
d60e5448
MM
103602001-04-30 Mark Mitchell <mark@codesourcery.com>
10361
10362 * optimize.c (update_cloned_parm): New function.
10363 (maybe_clone_body): Use it. Update the `this' parameter too.
10364
7200764f
JM
103652001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
10366
10367 * decl2.c (unsupported_options): Add new-abi.
10368 * lang-options.h: Remove no longer supported options.
10369
2d46ec83
NS
103702001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10371
10372 * except.c (can_convert_eh): Don't check template parms,
10373 typename types etc.
10374
02a1a68c
NS
103752001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10376
10377 * optimize.c (maybe_clone_body): Copy parameter names and locations.
10378
5f6eeeb3
NS
103792001-04-27 Nathan Sidwell <nathan@codesourcery.com>
10380
10381 * cp-tree.h (adjust_clone_args): Prototype new function.
10382 * class.c (adjust_clone_args): New function.
10383 * decl.c (start_function): Call it for in charge ctors.
10384
1b28d441
MM
103852001-04-26 Mark Mitchell <mark@codesourcery.com>
10386
10387 * method.c (use_thunk): Make sure that thunks really are emitted
10388 when requested.
10389
0576ec13
NS
103902001-04-26 Nathan Sidwell <nathan@codesourcery.com>
10391
10392 * mangle.c (write_chars): New macro.
10393 (hwint_to_ascii): New function
10394 (write_number): Use it.
10395 (write_integer_cst): Deal with really big numbers.
10396
b96ada87
MM
103972001-04-25 Mark Mitchell <mark@codesourcery.com>
10398
10399 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
10400 the clone.
10401
6bda7a5e
NS
104022001-04-25 Nathan Sidwell <nathan@codesourcery.com>
10403
10404 * decl.c (grokdeclarator): Set context of namespace scope
10405 TYPE_DECLS.
10406
11fe225a
ZW
104072001-04-24 Zack Weinberg <zackw@stanford.edu>
10408
10409 * cp/optimize.c: Include hashtab.h.
10410 (struct inline_data): Add tree_pruner.
10411 (expand_call_inline, expand_calls_inline): Use it when calling
10412 walk_tree.
10413 (optimize_function): Initialize and free tree_pruner.
10414
0ba8a114
NS
104152001-04-24 Nathan Sidwell <nathan@codesourcery.com>
10416
10417 Lazy __FUNCTION__ generation.
10418 * cp-tree.def (FUNCTION_NAME): Remove.
10419 * cp-tree.h (function_name_declared_p): Remove.
10420 (cp_fname_init): Prototype.
10421 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
10422 don't call declare_function_name. Call start_fname_decls.
10423 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
10424 clobber the line number.
10425 (cp_fname_init): New function.
10426 (start_function): Call start_fname_decls.
10427 (finish_function): Call finish_fname_decls.
10428 * lex.c (reswords): Add slots for __FUNCTION__ et al.
10429 (rid_to_yy): Add mappings for __FUNCTION__ et al.
10430 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
10431 * parse.y (VAR_FUNC_NAME): New token.
10432 (primary): Add VAR_FUNC_NAME.
10433 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
10434 generation.
10435 (tsubst, FUNCTION_NAME case): Remove.
10436 (tsubst_copy, FUNCTION_NAME case): Remove.
10437 (tsubst_expr, DECL_STMT case): Be careful with a
10438 DECL_PRETTY_FUNCTION_P.
10439 (instantiate_decl): Remove function_name_declared_p.
10440 * semantics.c (begin_compound_statement): Don't call
10441 declare_function_name here.
10442 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
10443 (finish_translation_unit): Call finish_fname_decls.
10444 (expand_body): Remove function_name_declared_p.
10445 * typeck2.c (digest_init): Allow any ERROR_MARK.
10446
dfbb4f34
NS
104472001-04-24 Nathan Sidwell <nathan@codesourcery.com>
10448
10449 * pt.c (tsubst_decl): Use VOID_TYPE_P.
10450 * semantics.c: Fix some typos.
10451
e2584c52
PE
104522001-04-23 Phil Edwards <pme@sources.redhat.com>
10453
10454 * cp/decl2.c (flag_honor_std): Always initialize to 1.
10455
d4c3ec27
KG
104562001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10457
10458 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
10459
2ac8a0f9
JM
104602001-04-23 Jason Merrill <jason_merrill@redhat.com>
10461
10462 * except.c (build_throw): Wrap the initialization of the exception
10463 object in a MUST_NOT_THROW_EXPR.
10464 (do_free_exception): #if 0.
10465
968b956a
MM
104662001-04-20 Mark Mitchell <mark@codesourcery.com>
10467
10468 * cp-tree.h (finish_enum): Change prototype.
10469 * decl.c (finish_enum): Reorganize.
10470 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 10471
aa1826e2
NS
104722001-04-20 Nathan Sidwell <nathan@codesourcery.com>
10473
10474 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
10475 't' case.
10476
06d9f09f
NS
104772001-04-20 Nathan Sidwell <nathan@codesourcery.com>
10478
10479 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
10480 (layout_empty_base): Return at end flag.
10481 (build_base_field): Likewise.
10482 (build_base_fields): Likewise.
10483 (layout_virtual_bases): Don't add 1 to eoc value.
10484 (end_of_class): Use full size for empty bases.
10485 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
10486 empty bases. Don't add 1 to eoc value. Only add trailing padding
10487 if we're an empty class with no empty bases.
10488 (dump_class_hierarchy): Dump size and alignment.
10489
351a0f00
JJ
104902001-04-20 Jakub Jelinek <jakub@redhat.com>
10491
10492 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
10493 ICS_BAD_FLAG.
10494
881cae05
JJ
104952001-04-20 Jakub Jelinek <jakub@redhat.com>
10496
10497 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
10498 is found, look first if name does not match the structure name.
10499
5d2ed28c
MM
105002001-04-19 Mark Mitchell <mark@codesourcery.com>
10501
10502 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
10503 set.
10504 (SET_DECL_LANGUAGE): New macro.
10505 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
10506 (pushdecl): Likewise.
10507 (build_library_fn_1): Likewise.
10508 (build_cp_library_fn): Likewise.
10509 (grokfndecl): Likewise.
10510 (grokvardecl): Mark `extern "C"' variables as having C linkage.
10511 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
10512 * lex.c (retrofit_lang_decl): Likewise.
10513 * mangle.c (mangle_decl_string): Don't mangle the names of
10514 variables declared with C language linkage.
10515 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 10516
41251458
JDA
105172001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
10518
10519 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
10520 flag_access_control from uninitialized storage.
10521
1b4a93f7
MM
105222001-04-15 Mark Mitchell <mark@codesourcery.com>
10523
24272dc0
MM
10524 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
10525 * mangle.c (write_pointer_to_member_type): Fix mangling of
10526 pointers to cv-qualified member function types.
10527
1b4a93f7
MM
10528 * init.c (build_delete): Create a SAVE_EXPR for the address if
10529 we're going to use it more than once.
10530
530ec96d
MM
105312001-04-13 Mark Mitchell <mark@codesourcery.com>
10532
10533 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
10534 (expand_ptremfunc_cst): Change prototype.
10535 (delta2_from_ptrmemfunc): Remove.
10536 * expr.c (cplus_expand_constant): Adjust call to
10537 expand_ptrmemfunc_cst.
10538 * typeck.c (build_ptrmemfunc1): Simplify.
10539 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
10540 results in a constant.
10541 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
10542 (delta2_from_ptrmemfunc): Remove.
10543 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 10544
ee8fc32b
JM
105452001-04-12 Jason Merrill <jason_merrill@redhat.com>
10546
10547 * cp-tree.h (decl_namespace_list): New macro.
10548 (struct saved_scope): Add decl_ns_list.
10549 * decl.c (mark_saved_scope): Mark it.
10550 * decl2.c: Lose static decl_namespace_list.
10551 (init_decl2): Don't save it.
10552
48857160
KG
105532001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10554
10555 * cp-tree.h (warn_return_type, yylex): Delete redundant
10556 declarations.
11fe225a 10557
48857160
KG
10558 * decl.c (current_class_depth, global_namespace): Likewise.
10559
10560 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
10561
10562 * repo.c (flag_use_repository): Likewise.
10563
845e14ed
KG
105642001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10565
10566 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
10567 set_block, pushdecl, getdecls, gettags, init_decl_processing,
10568 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
10569 lvalue_or_else, print_lang_statistics, comp_target_types,
10570 unsigned_type, signed_type, signed_or_unsigned_type,
10571 build_function_call, mark_addressable, incomplete_type_error):
10572 Delete redundant declarations.
10573
1951a1b6
JM
105742001-04-11 Jason Merrill <jason_merrill@redhat.com>
10575
10576 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
10577 (TYPE_ANONYMOUS_P): New macro.
10578 (TAGGED_TYPE_P): New macro.
10579 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
10580 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
10581 * tree.c (no_linkage_helper): Likewise.
10582 * semantics.c (begin_class_definition): Likewise.
10583 * pt.c (convert_template_argument): Likewise.
10584 * lex.c (check_for_missing_semicolon): Likewise.
10585
0fb3018c
NS
105862001-04-12 Nathan Sidwell <nathan@codesourcery.com>
10587
10588 * class.c (dfs_unshared_virtual_bases): New function.
10589 (mark_primary_bases): Call it.
10590 (check_bases): Ignore virtual bases when determining
10591 nearly-emptiness.
10592
bbb53468
NS
105932001-04-12 Nathan Sidwell <nathan@codesourcery.com>
10594
10595 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
10596
9b7949d5
MM
105972001-04-11 Mark Mitchell <mark@codesourcery.com>
10598
10599 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
10600 cloned function to the clone.
10601
d6684bc8
KG
106022001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10603
10604 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
10605
10606 * semantics.c: Include expr.h.
10607
a2095778
NS
106082001-04-11 Nathan Sidwell <nathan@codesourcery.com>
10609
10610 * method.c (implicitly_declare_fn): Commonize code for copy ctor
10611 and assignment op. Set TREE_USED for parameter.
10612
78b45a24
MM
106132001-04-10 Mark Mitchell <mark@codesourcery.com>
10614
10615 * class.c (find_final_overrider_data): Add `candidates'.
10616 (dfs_find_final_overrider): Don't issue error messages
10617 prematurely.
10618 (find_final_overrider): Issue error messages here.
10619 (build_base_field): Don't warn about amgibuous direct bases here.
10620 (warn_about_ambiguous_direct_bases): New function.
10621 (layout_class_type): Use it.
10622
0450d74d
RH
106232001-04-10 Richard Henderson <rth@redhat.com>
10624
10625 * typeck.c (build_array_ref): Push the array reference inside
10626 COMPOUND_EXPR and COND_EXPR.
10627
79065db2
MM
106282001-04-05 Mark Mitchell <mark@codesourcery.com>
10629
10630 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
10631 * decl.c (duplicate_decls): Adjust accordingly.
10632 (maybe_commonize_var): Likewise.
10633 (grokfndecl): Likewise.
10634 (start_function): Likewise.
10635 (start_method): Likewise.
10636 * decl2.c (key_method): Likewise.
10637 (import_export_decl): Likewise.
10638 * method.c (implicitly_declare_fn): Likewise.
10639 * optimize.c (maybe_clone_body): Likewise.
11fe225a 10640
fdecbf8a
BK
106412001-04-05 Benjamin Kosnik <bkoz@redhat.com>
10642
b03eced6 10643 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 10644
d2a6f3c0 106452001-04-05 J"orn Rennecke <amylaar@redhat.com>
0b4c1646
R
10646
10647 * search.c (get_dynamic_cast_base_type): When building a new
10648 constant, set its type to ssizetype.
10649
e59d6709
JJ
106502001-04-04 Jakub Jelinek <jakub@redhat.com>
10651
10652 * optimize.c (expand_call_inline): Only add newly inlined statements
10653 into inlined_stmts.
10654
0c918ce5
MM
106552001-04-03 Mark Mitchell <mark@codesourcery.com>
10656
10657 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
10658 (OPERATOR_FORMAT): Likewise.
10659 (OPERATOR_TYPENAME_FORMAT): Likewise.
10660 * operators.def: Remove old name-mangling information.
10661 * decl.c (grok_op_properties): Adjust accordingly.
10662 * lex.c (init_operators): Likewise.
10663 * rtti.c (get_tinfo_decl): Issue error messages about types that
10664 have variable size.
10665
92788413
MM
106662001-04-03 Mark Mitchell <mark@codesourcery.com>
10667
11fe225a 10668 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
10669 when processing an inline member function.
10670 * semantics.c (expand_body): Call import_export_decl before
10671 emitting inline functions.
10672
52a11cbf
RH
106732001-03-28 Richard Henderson <rth@redhat.com>
10674
10675 IA-64 ABI Exception Handling:
10676 * cp-tree.def (EH_SPEC_BLOCK): New.
10677 (MUST_NOT_THROW_EXPR): New.
10678 * cp-tree.h: Update changed function declarations.
10679 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
10680 (CPTI_CALL_UNEXPECTED): New.
10681 (struct cp_language_function): Rename x_eh_spec_try_block
10682 to x_eh_spec_block.
10683 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 10684 * decl.c (current_binding_level): If no current function
52a11cbf
RH
10685 bindings, revert to scope_chain.
10686 (initialize_predefined_identifiers): Remove __cp_push_exception.
10687 (store_parm_decls): Use begin_eh_spec_block.
10688 (finish_function): Use finish_eh_spec_block.
10689 (mark_lang_function): Update for name changes.
10690 * decl2.c (finish_file): No mark_all_runtime_matches.
10691 * dump.c (cp_dump_tree): Handle new tree codes.
10692 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
10693 * except.c (catch_language_init, catch_language): Remove.
10694 (init_exception_processing): Don't set language code.
10695 Initialize call_unexpected_node, protect_cleanup_actions,
10696 eh_personality_libfunc, lang_eh_runtime_type.
10697 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
10698 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
10699 (prepare_eh_type): Split out type canonicalizations ...
10700 (build_eh_type_type): ... from here.
10701 (build_eh_type_type_ref): Remove.
10702 (mark_all_runtime_matches): Remove.
10703 (build_exc_ptr): New.
10704 (do_begin_catch, do_end_catch): New.
10705 (do_pop_exception): Remove.
10706 (build_terminate_handler): Remove.
10707 (choose_personality_routine): Split out language choice from ...
10708 (initialize_handler_parm): ... here.
10709 Use MUST_NOT_THROW_EXPR.
10710 (expand_start_catch_block): Use do_begin_catch. Simplify Java
10711 exception object handling.
10712 (expand_start_eh_spec, expand_end_eh_spec): Remove.
10713 (expand_exception_blocks, alloc_eh_object): Remove.
10714 (begin_eh_spec_block, finish_eh_spec_block): New.
10715 (do_allocate_exception, do_free_exception): New.
10716 (expand_throw): Merge into ...
10717 (build_throw): ... here. Update for abi.
10718 * expr.c (cplus_expand_expr): No expand_internal_throw.
10719 Handle MUST_NOT_THROW_EXPR.
10720 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
10721 * semantics.c (*) Update for except.h name changes.
10722 (genrtl_try_block): No protect_with_terminate.
10723 (genrtl_eh_spec_block): New.
10724 (genrtl_handler): Don't emit the goto here.
10725 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
10726 (genrtl_finish_function): Don't expand_exception_blocks.
10727 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
10728
826840d9
RH
107292001-03-28 Richard Henderson <rth@redhat.com>
10730
10731 * decl.c (struct named_label_list): Rename eh_region to
10732 in_try_scope, add in_catch_scope.
10733 (struct binding_level): Rename eh_region to is_try_scope,
10734 add is_catch_scope.
10735 (note_level_for_try): Rename from note_level_for_eh.
10736 (note_level_for_catch): New.
10737 (poplevel): Copy both is_try_scope and is_catch_scope to
10738 the named_label_list struct.
10739 (check_previous_goto_1): Don't check for catch block via
10740 DECL_ARTIFICIAL; use in_try_scope instead.
10741 (check_goto): Likewise.
10742 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
10743 * except.c (expand_start_catch_block): Call note_level_for_catch.
10744 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
10745
531073e7
RH
107462001-03-27 Richard Henderson <rth@redhat.com>
10747
10748 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
10749 exceptions_via_longjmp.
10750
8653a2c3
PE
107512001-03-27 Phil Edwards <pme@sources.redhat.com>
10752
10753 * pt.c (check_default_tmpl_args): Make error messages clearer.
10754
107552001-03-26 Phil Edwards <pme@sources.redhat.com>
10756
10757 * error.c: Also undefine 'A' macro used for cp_printers definition.
10758
911e6107
KG
107592001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10760
10761 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10762
005a5cb0
MY
107632001-03-26 Mike Yang <yang@research.att.com>
10764 Mark Mitchell <mark@codesourcery.com>
10765
10766 * dump.c (dump_access): New function.
10767 (cp_dump_tree): Use it. Dump basetype information for class
10768 types.
10769
b850de4f
MM
107702001-03-26 Mark Mitchell <mark@codesourcery.com>
10771
10772 * Makefile.in (optimize.o): Depend on params.h.
10773 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
10774 (init_decl_processing): Set flag_no_inline when doing
10775 inlining-on-trees.
10776 * optimize.c: Include params.h.
10777 (struct inline_data): Improve documentation of FNS. Add
10778 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
10779 (INSNS_PER_STMT): New macro.
10780 (remap_block): Use CLONING_P.
10781 (inlinable_function_p): Don't inline big functions.
10782 (expand_call_inline): Keep track of how much inlining we've done.
10783 (optimize_function): Set FIRST_INLINED_FN.
10784 (maybe_clone_body): Set CLONING_P.
10785 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
10786 tree nodes.
10787 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
10788 rest_of_compilation. Clear DECL_RTL for local variables
10789 afterwards.
10790 (clear_decl_rtl): New function.
11fe225a 10791
788bf0e3
NS
107922001-03-26 Nathan Sidwell <nathan@codesourcery.com>
10793
10794 Implement DR 209
10795 * cp-tree.h (skip_type_access_control,
10796 reset_type_access_control): Prototype.
10797 * decl.c (grokdeclarator): Access of friends is not checked.
10798 * parse.y (component_decl_list): Reset type access control.
10799 * semantics.c (decl_type_access_control): Clear
10800 current_type_lookups.
10801 (save_type_access_control): Don't save if not deferring.
10802 (skip_type_access_control, reset_type_access_control): New
10803 functions.
10804 (begin_class_definition): Do type access control for basetypes.
10805 Start deferred access control.
10806 (finish_class_definition): Resume immediate access control if
10807 this is a local class.
10808
730e1556
KG
108092001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10810
10811 * class.c (add_method): Use memcpy/memmove, not bcopy.
10812
10813 * decl.c (duplicate_decls): Likewise.
10814
f1a0345c
JJ
108152001-03-23 Jakub Jelinek <jakub@redhat.com>
10816
10817 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
10818 not `_'.
10819
8e4ce833
JJ
108202001-03-23 Jakub Jelinek <jakub@redhat.com>
10821
10822 * decl.c (local_names): Define.
10823 (push_local_name): New.
10824 (grok_reference_init): Return init if initializing static reference
10825 variable with non-constant instead of emitting it.
10826 Move expand_static_init call to cp_finish_decl.
10827 (layout_var_decl): Call push_local_name.
10828 (maybe_commonize_var): Allow inlining functions even if they have
10829 static local variables, use comdat_linkage for them if flag_weak.
10830 (check_initializer): Call obscure_complex_init if
838dfd8a 10831 grok_reference_init returned nonzero.
8e4ce833
JJ
10832 (save_function_data): Clear x_local_names.
10833 (pop_cp_function_context): Free x_local_names.
10834 (mark_inlined_fns): Remove.
10835 (mark_lang_function): Mark x_local_names.
10836 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
10837 Mark inlined_fns as tree, remove call to mark_inlined_fns.
10838 * class.c (alter_access): Ensure DECL_ACCESS is never set if
10839 DECL_DISCRIMINATOR_P.
10840 * cp-tree.h (cp_language_function): Add x_local_names.
10841 (lang_decl_flags): Add discriminator into u2.
10842 (lang_decl_inlined_fns): Remove.
10843 (lang_decl): inlined_fns is now a TREE_VEC.
10844 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
10845 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
10846 TREE_VEC, not a custom structure.
10847 (optimize_function): Likewise.
10848 * mangle.c (discriminator_for_local_entity): Discriminate among
10849 VAR_DECL local entities.
10850 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10851 is not valid.
10852
60c87482
BM
108532001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
10854
10855 Add support for Java interface method calls.
10856 * cp-tree.h (struct lang_type): Add java_interface flag.
10857 (TYPE_JAVA_INTERFACE): New macro.
10858 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10859 by setting TYPE_JAVA_INTERFACE.
10860 * call.c (java_iface_lookup_fn): New static.
11fe225a 10861 (build_over_call): If calling a method declared in a
60c87482
BM
10862 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10863 expression which resolves the function address.
10864 (build_java_interface_fn_ref): New function.
10865
94c7f30b
RH
108662001-03-22 Richard Henderson <rth@redhat.com>
10867
10868 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10869 * except.c: Don't include it.
10870
fd8b7a0e 108712001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 10872 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
10873
10874 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10875 New nonterminals.
10876 (data_def, component_decl): Add reductions to bad_decl.
10877
a1c2b86d
JJ
108782001-03-22 Jakub Jelinek <jakub@redhat.com>
10879
10880 * method.c (do_build_assign_ref): Don't use build_modify_expr for
10881 anonymous aggregates, since they don't have assignment operator
10882 method.
10883 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10884 assignment operators for anonymous structure fields.
10885
46ccf50a
JM
108862001-03-21 Jason Merrill <jason@redhat.com>
10887
10888 * pt.c (instantiate_decl): Abort if we see a member constant
10889 instantiation that doesn't already have its initializer.
10890 Downgrade explicit instantiation without definition to pedwarn.
10891
10892 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10893 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10894 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10895
10896 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10897 (pending_vtables): Remove.
10898 * decl2.c (pending_vtables): Remove.
10899 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10900 CLASSTYPE_VTABLE_NEEDS_WRITING.
10901 (import_export_class): Likewise.
10902 (init_decl2): Don't mark pending_vtables.
10903 * lex.c (handle_pragma_vtable): Just sorry.
10904 * pt.c (instantiate_class_template): Don't mess with
10905 CLASSTYPE_VTABLE_NEEDS_WRITING.
10906 (mark_class_instantiated): Likewise.
10907 * ptree.c (print_lang_type): Don't print it.
10908 * semantics.c (begin_class_definition): Don't set it.
10909
10910 * pt.c (template_tail): Replace with last_pending_template.
10911 (maybe_templates, maybe_template_tail): Remove.
10912 (add_pending_template): Adjust.
10913 (instantiate_pending_templates): Adjust.
10914
10915 * cp-tree.h (struct saved_scope): Remove lang_stack field.
10916 (current_lang_stack): Remove.
10917 * decl.c (maybe_push_to_top_level): Don't initialize it.
10918 (duplicate_decls): Use current_lang_depth.
10919 (xref_basetypes): Likewise.
10920 * class.c (current_lang_depth): New fn.
10921 (push_lang_context): Use more varray functionality.
10922 (pop_lang_context): Likewise.
64d9c3fe
JM
10923
10924 * error.c (GLOBAL_THING): Always use '__'.
10925
1c06710a
MM
109262001-03-21 Mark Mitchell <mark@codesourcery.com>
10927
71cb9286
MM
10928 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10929
1c06710a
MM
10930 * mangle.c (mangle_decl_string): Mangle the names of overloaded
10931 operators, even when they have `extern "C"' linkage.
10932
92643fea
MM
109332001-03-19 Mark Mitchell <mark@codesourcery.com>
10934
10935 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10936 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10937 where it's not necessary.
10938 (add_method): Remove optimization involving comparison of
10939 DECL_ASSEMBLER_NAME.
10940 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10941 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10942 where it's not necessary.
10943 (check_methods): Likewise.
10944 (build_clone): Likewise.
10945 (built_vtt): Likewise.
10946 * cp-tree.h (DECL_NEEDED_P): Likewise.
10947 * decl.c (pushtag): Likewise.
10948 (duplicate_decls): Likewise.
10949 (pushdecl): Likewise.
10950 (builtin_function): Likewise.
10951 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10952 (build_cp_library_fn): Likewise.
10953 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10954 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10955 where it's not necessary.
10956 (make_rtl_for_nonlocal_decl): Likewise.
10957 (cp_finish_decl): Likewise.
10958 (grokfndecl): Likewise.
10959 (grokvardecl): Likewise.
10960 (grokdeclarator): Likewise.
10961 (start_function): Likewise.
10962 (cp_missing_return_ok_p): Likewise.
10963 * decl2.c (grokclassfn): Likewise.
10964 (check_classfn): Likewise.
10965 (finish_static_data_member_decl): Likewise.
10966 (grokfield): Likewise.
10967 * error.c (GLOBAL_IORD_P): Remove.
10968 (dump_global_iord): Improve output.
10969 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10970 * except.c (nothrow_libfn_p): Summarily reject any function not in
10971 namespace-scope.
10972 * init.c (build_java_class_ref): Don't explicitly set
10973 DECL_ASSEMBLER_NAME after calling mangle_decl.
10974 * mangle.c (mangle_decl_string): Handle extern "C" functions.
10975 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10976 * method.c (set_mangled_name_for_decl): Don't explicitly set
10977 DECL_ASSEMBLER_NAME after calling mangle_decl.
10978 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10979 IDENTIFIER_GLOBAL_VALUE for the thunk.
10980 * pt.c (set_mangled_name_for_template_decl): Remove.
10981 (check_explicit_specialization): Don't use it.
10982 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10983 (tsubst_friend_function): Likewise.
10984 (tsubst_decl): Likewise.
10985 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10986 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10987 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10988 where it's not necessary.
10989 (tinfo_base_init): Likewise.
10990 (create_real_tinfo_var): Likewise.
10991 * search.c (looup_field_1): Likewise.
10992 * semantics.c (finish_named_return_value): Likewise.
10993 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 10994
d064d75a
GDR
109952001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
10996
10997 Correct semantics restrictions checking in throw-expression.
10998 * except.c (is_admissible_throw_operand): New function.
10999 (build_throw): Use it.
11000
a3eab619
MM
110012001-03-14 Mark Mitchell <mark@codesourcery.com>
11002
11003 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11004 and its ilk.
11005
19e7881c
MM
110062001-03-14 Mark Mitchell <mark@codesourcery.com>
11007
11008 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11009 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11010 * decl.c (duplicate_decls): Likewise.
11011 (builtin_function): Likewise.
11012 (build_library_fn): Likewise.
11013 (build_cp_library_fn): Likewise.
11014 (check_initializer): Likewise.
11015 (cp_finish_decl): Likewise.
11016 * decl2.c (grokfield): Likewise.
11017 (grok_function_init): Remove #if 0'd code.
11018 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11019 * friend.c (do_friend): Likewise.
11020 * init.c (get_temp_regvar): Likewise.
11021 * method.c (make_thunk): Likewise.
11022 * pt.c (tsubst_friend_function): Likewise.
11023 (tsubst_decl): Likewise.
11024 (regenerate_decl_from_template): Likewise.
11025 * semantics.c (genrtl_named_return_value): Likewise.
11026 (expand_body): Likewise.
11027 (genrtl_finish_function): Likewise.
11028 * tree.c (cp_tree_equal): Likewise.
11fe225a 11029
78fe06c2
NS
110302001-03-12 Nathan Sidwell <nathan@codesourcery.com>
11031
11032 * call.c (convert_like_real): Add extra semantics to INNER
11033 parameter. Don't convert to temporary if a user conversion
11034 gives us an lvalue that we're about to bind to a reference.
11035 Set INNER to indicate pending reference binding on recursive
11036 calls.
11037
b3e68a79
NB
110382001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11039
11040 * cp/lex.c: Delete duplicate pending_lang_change.
11041
110422001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
11043
11044 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11045 Similarly.
11046 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11047 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11048
11642c3a
ZW
110492001-03-09 Zack Weinberg <zackw@stanford.edu>
11050
11051 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11052
bb6852eb 110532001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
11054
11055 * cp-tree.h (set_identifier_local_value): Remove unused decl.
11056
cc937581
ZW
110572001-03-06 Zack Weinberg <zackw@stanford.edu>
11058
11059 * spew.c: Remove references to CPP_OSTRING.
11060
d1188d91
AH
110612001-03-06 Andrew Haley <aph@redhat.com>
11062
11063 * typeck.c (convert_arguments): Check that we have an fndecl.
11064
4eaf1d5b
AH
110652001-03-05 Andrew Haley <aph@redhat.com>
11066
11067 * typeck.c (convert_arguments): Don't do ellipsis conversion for
11068 __built_in_constant_p.
11069
7eeb553c
NS
110702001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11071
11072 * typeck.c (build_static_cast): Allow enum to enum conversions
11073 as per DR 128.
11074
d282fcb2
NS
110752001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11076
11077 * class.c (check_field_decls): Pointers to member do not a
11078 non-pod struct make, as per DR 148.
11079
f86fdf68
NS
110802001-03-02 Nathan Sidwell <nathan@codesourcery.com>
11081
11082 * call.c (joust): cp_pedwarn when using gnu extension concerning
11083 worst conversion sequences.
11084
d6edb99e
ZW
110852001-03-01 Zack Weinberg <zackw@stanford.edu>
11086
11087 * decl.c: Replace all uses of 'boolean' with 'bool'.
11088
f7143427
ZW
110892001-03-01 Zack Weinberg <zackw@stanford.edu>
11090
11091 * lang-specs.h: Add zero initializer for cpp_spec field to
11092 all array elements that need one. Don't put an #ifdef inside
11093 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11094 use it.
11095
fbfe8c9e
NS
110962001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11097
11098 Implement using decls inside template functions.
11099 * decl2.c (validate_nonmember_using_decl): Don't special case
11100 fake_std_node in the global namespace. Don't reject early when
11101 processing a template.
11102 (do_local_using_decl): Add to statement tree. Don't do further
11103 processing when building a template.
11104 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11105
4d24a889
NS
111062001-03-01 Nathan Sidwell <nathan@codesourcery.com>
11107
11108 * decl2.c (do_nonmember_using_decl): Don't complain if we find
11109 same function. Do complain about ambiguating extern "C"
11110 declarations.
11111
e5844e6d
NS
111122001-02-28 Nathan Sidwell <nathan@codesourcery.com>
11113
11114 Remove floating point and complex type template constant parms.
11115 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11116 COMPLEX_TYPE extensions.
11117 (invalid_nontype_parm_type_p): Likewise.
11118
788f238c
JO
111192001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
11120
11121 * except.c (call_eh_info): Revert "match_function"'s type.
11122
73ea87d7
NS
111232001-02-27 Nathan Sidwell <nathan@codesourcery.com>
11124
11125 Fix ctor vtable vcall offsets.
11126 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11127 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11128 (get_matching_base): Remove.
11129 (get_original_base): New function.
11fe225a 11130 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
11131 Use a virtual thunk for a ctor vtable with an index
11132 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11133 primary base within a constructor vtable. Only set
11134 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11135 when primary base has been lost.
11136 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11137
fe730161
JO
111382001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
11139
11140 * call.c (joust): Ensure more_specialized()'s argument length
11141 parameter has correct value for constructors.
11142
e5dd4aad
NS
111432001-02-26 Nathan Sidwell <nathan@codesourcery.com>
11144
11145 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 11146
e5dd4aad
NS
11147 * decl.c (mark_inlined_fns): Prototype.
11148
25200ab2
MM
111492001-02-22 Mark Mitchell <mark@codesourcery.com>
11150
11151 * spew.c (yylex): Correct handling of friends.
11152
f58c04ac
MM
111532001-02-22 Mark Mitchell <mark@codesourcery.com>
11154
11155 * mangle.c (write_encoding): Pass write_function_type the
11156 FUNCTION_DECL for the function being encoded.
11157 (write_function_type): Pass it along to write_bare_function_type.
11158 (write_bare_function_type): Pass it along to write_method_parms.
11159 (write_method_parms): Don't mangle the compiler-generated
11160 parameters to a constructor or destructor.
11161
9c96f3f8
AJ
111622001-02-22 Andreas Jaeger <aj@suse.de>
11163
11164 * optimize.c: Include toplev.h for
11165 note_deferral_of_defined_inline_function prototype.
11166
b3bae5e2
JJ
111672001-02-22 Jakub Jelinek <jakub@redhat.com>
11168
11169 * cp-tree.h (struct lang_decl_inlined_fns): New.
11170 (struct lang_decls): Add inlined_fns.
11171 (DECL_INLINED_FNS): New macro.
11172 * optimize.c (struct inline_data): Add inlined_fns.
11173 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11174 (inlinable_function_p): Likewise, fix typo in comment,
11175 function is not inlinable if it already inlined function currently
11176 being optimized.
306ef644 11177 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
11178 (optimize_function): Initialize inlined_fns.
11179 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11180 * decl.c (mark_inlined_fns): New function.
11181 (lang_mark_tree): Call it.
11182
5daf7c0a
JM
111832001-02-21 Jason Merrill <jason@redhat.com>
11184
11185 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11186 (DECL_UNINLINABLE): Move to middle-end.
11187
11188 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11189 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11190 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11191 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11192 parms and outer BLOCK. note_deferral_of_defined_inline_function.
11193
11194 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11195 second parm of op=.
11196
2c0fc02d
MM
111972001-02-19 Mark Mitchell <mark@codesourcery.com>
11198
11199 * decl2.c (set_decl_namespace): Allow explicit instantiations in
11200 any namespace.
11201
612164eb
KL
112022001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11203
11204 * optimize.c (expand_call_inline): Don't walk subtrees of type
11205 nodes.
11206
69a59a49
MM
112072001-02-18 Mark Mitchell <mark@codesourcery.com>
11208
11209 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11210 for a destructor.
11211
e0fff4b3
JM
112122001-02-18 Jason Merrill <jason@redhat.com>
11213
11214 Do put the VTT parameter in DECL_ARGUMENTS.
11215 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11216 (current_vtt_parm): New macro.
11217 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11218 (DECL_HAS_VTT_PARM_P): New macro.
11219 (DECL_VTT_PARM): Remove.
11220 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11221 * decl.c (duplicate_decls): Only copy the operator code if
11222 appropriate.
11223 (start_function): Set current_vtt_parm.
11224 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 11225 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
11226 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
11227 * class.c (build_clone): Maybe remove the VTT parm.
11228 * optimize.c (maybe_clone_body): Set up the VTT parm.
11229 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11230 * call.c (build_over_call): Just allow the VTT arg.
11231 * method.c (make_thunk): Don't set DECL_VTT_PARM.
11232 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11233 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11234 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11235 * error.c (dump_function_decl): Likewise.
11236 * call.c (build_user_type_conversion_1, convert_like_real): Abort
11237 if we try to call a constructor with in-charge or VTT parms.
11238 * method.c (skip_artificial_parms_for): New fn.
11239 * call.c (add_function_candidate, build_over_call): Call it.
11240 * call.c (build_new_method_call): Use current_vtt_parm.
11241 * init.c (expand_virtual_init): Likewise.
11242 * class.c (same_signature_p): No longer static.
11243 * cp-tree.h: Declare it.
11244 * search.c (look_for_overrides_r): Use it.
11245
c750255c
MM
112462001-02-17 Mark Mitchell <mark@codesourcery.com>
11247
8fa33dfa
MM
11248 * cp-tree.h (new_abi_rtti_p): Remove.
11249 (name_mangling_version): Likewise.
11250 (flag_do_squangling): Likewise.
11251 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11252 * decl.c (grokfndecl): Likewise.
11253 * decl2.c (name_mangling_version): Remove.
11254 (flag_do_squangling): Likewise.
11255 (lang_f_options): Remove `squangle'.
11256 (unsupported_options): Add `squangle'.
11257 (cxx_decode_option): Issue a warning about uses of
11258 -fname-mangling-version.
11259 (finish_file): Remove old ABI support.
11260 * pt.c (check_explicit_specialization): Likewise.
11261 (tsubst_decl): Likewise.
11262 * rtti.c (init_rtti_processing): Likewise.
11263 (build_headof): Likewise.
11264 (get_tinfo_decl_dynamic): Likewise.
11265 (tinfo_from_decl): Likewise.
11266 (build_dynamic_cast_1): Likewise.
11267 (synthesize_tinfo_var): Likewise.
12fa82db
MM
11268 * init.c (build_new): Allow enumeration types for the array-bounds
11269 in a direct-new-declarator.
11270
11271 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
11272
c750255c
MM
11273 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
11274 TREE_PROTECTED from the template being specialized.
11275
a714e5c5
JM
112762001-02-17 Jason Merrill <jason@redhat.com>
11277
11278 * decl2.c (build_artificial_parm): Set TREE_READONLY.
11279
9c96f3f8 11280 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
11281 pointer-to-function or -member-function type.
11282 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
11283 a pmf.
11284
8084b91e
MM
112852001-02-17 Mark Mitchell <mark@codesourcery.com>
11286
11287 * call.c (check_dtor_name): Handle template names correctly.
11288
48f22ed2
JM
112892001-02-16 Jason Merrill <jason@redhat.com>
11290
11291 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
11292 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
11293 * optimize.c (maybe_clone_body): Don't substitute it.
11294 * call.c (build_new_method_call): Check in_chrg instead.
11295 * init.c (expand_virtual_init): Likewise.
11296
e8186ecf
GDR
112972001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
11298
11299 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
11300 class-type introduces at least a type-name.
11301
2c1be322
JJ
113022001-02-16 Jakub Jelinek <jakub@redhat.com>
11303
11304 * call.c (convert_like_real): Create a temporary for non-lvalue.
11305
aab8454a
JO
113062001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
11307
11308 * cp-tree.h: Fix typos in comments.
11309
a901fa64
JM
113102001-02-16 Jason Merrill <jason@redhat.com>
11311
11312 * optimize.c (remap_block): If we're compiling a clone, pass the
11313 new block to insert_block.
11314
8853373c
MM
113152001-02-16 Mark Mitchell <mark@codesourcery.com>
11316
11317 * semantics.c (finish_asm_stmt): Robustify.
11318
b60ecc04
MM
113192001-02-15 Mark Mitchell <mark@codesourcery.com>
11320
11321 * pt.c (push_template_decl_real): Don't remangle the name of a
11322 class template.
11323
e658449e
JM
113242001-02-15 Jim Meyering <meyering@lucent.com>
11325
fd48c9b5
DD
11326 * Make-lang.in (c++.install-common): Depend on installdirs.
11327 (c++.install-info): Likewise.
11328 (c++.install-man): Likewise.
e658449e 11329
f1a3f197
MM
113302001-02-15 Mark Mitchell <mark@codesourcery.com>
11331
11332 * typeck2.c (build_m_component_ref): Robustify.
11333
8826b15b
AO
113342001-02-15 Alexandre Oliva <aoliva@redhat.com>
11335
11336 * friend.c (do_friend): Don't take the nested [template] class
11337 into account when deciding whether to warn about the friend
11338 function not referring to a template function.
11339
7161c1a5
JJ
113402001-02-14 Jakub Jelinek <jakub@redhat.com>
11341
11342 * typeck.c (build_unary_op): Clarify error message.
11343
4806765e
AH
113442001-02-08 Aldy Hernandez <aldyh@redhat.com>
11345
a901fa64
JM
11346 * parse.y (component_constructor_declarator): allow optional
11347 parentheses around constructor class name.
4806765e 11348
bfc8e1e2
NS
113492001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11350
11351 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
11352 section.
11353 * init.c (emit_base_init): Remove incorrect comment about
11354 virtual bases.
11355 * method.c (make_thunk): Fix comment alignment.
11356
394fd776
NS
113572001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11358
11359 Kill remnants of this is variable.
11360 * cp-tree.h (flag_this_is_variable): Remove.
11361 * decl2.c (flag_this_is_variable): Remove.
11362 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
11363 (build_vbase_path): The path is non-static, even in a cdtor.
11364 (resolves_to_fixed_type_p): Add additional return value.
11365 * search.c (init_vbase_pointers): Adjust.
11366 * tree.c (lvalue_p_1): Adjust.
11367 * typeck.c (mark_addressable): Adjust.
11368
d0ab7624
NS
113692001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11370
11371 * pt.c (unify): Don't check cv quals of array types.
11372
7773899b
NS
113732001-02-14 Nathan Sidwell <nathan@codesourcery.com>
11374
11375 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
11376 check whether we already have the type.
11377
52682a1b
MM
113782001-02-13 Mark Mitchell <mark@codesourcery.com>
11379
11380 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
11381 * call.c (build_op_delete_call): Simplify to remove duplicate
11382 code.
11383 * class.c (clone_function_decl): Don't build the deleting variant
11384 of a non-virtual destructor.
11385 * decl.c (finish_destructor_body): Don't call delete if this is a
11386 non-virtual destructor.
11387 * init.c (build_delete): Explicitly call `operator delete' when
11388 deleting an object with a non-virtual destructor.
9c96f3f8 11389
3b6bd115
JM
113902001-02-13 Jason Merrill <jason@redhat.com>
11391
11392 * lang-specs.h: Add more __EXCEPTIONS.
11393
45abaea8
NS
113942001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11395
11396 * typeck2.c (process_init_constructor): Check
11397 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
11398
996065b4
NS
113992001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11400
11401 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
11402 Remove spurious information in comment. Allow further
11403 adjustments of REFERENCE_TYPE args.
11404
82c18d5c
NS
114052001-02-12 Nathan Sidwell <nathan@codesourcery.com>
11406
11407 * errfn.c (cp_deprecated): Tweak diagnostic text.
11408 * parse.y (new_initializer): Deprecate initializer lists
11409 extension.
11410
1f84ec23
MM
114112001-02-12 Mark Mitchell <mark@codesourcery.com>
11412
11413 Remove old ABI support.
11414
8c310e3f
MM
114152001-02-11 Mark Mitchell <mark@codesourcery.com>
11416
b1012f1b
MM
11417 * decl2.c (flag_vtable_thunks): Always set it to 1.
11418 (flag_new_abi): Likewise.
11419 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 11420
8c310e3f
MM
11421 * Makefile.in (g++spec.o): Fix typo.
11422
3b635dfc
JM
114232001-02-09 Jason Merrill <jason@redhat.com>
11424
11425 * lang-specs.h: Restore definition of __EXCEPTIONS.
11426
bd0d5d4a
JM
114272001-02-08 Jason Merrill <jason@redhat.com>
11428
11429 * search.c (shared_member_p): New function.
11430 (lookup_field_r): Use it.
11431 * cp-tree.h (SHARED_MEMBER_P): Remove.
11432
11433 * method.c (process_overload_item): Handle template-dependent array
11434 bounds.
11435 * pt.c (type_unification_real): If we end up with undeduced nontype
11436 parms, try again.
11437
11438 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
11439 types.
11440
11441 * typeck2.c (friendly_abort): Don't say anything if we have
11442 earlier errors or sorries.
11443
9c96f3f8 11444 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
11445 wchar_t. Ignore if in_system_header.
11446
11447 * decl.c (maybe_push_cleanup_level): New fn...
11448 (start_decl_1): ...split out from here.
11449 * cvt.c (build_up_reference): Use it.
11450 * cp-tree.h: Declare it.
11451
a9374841
MM
114522001-02-07 Mark Mitchell <mark@codesourcery.com>
11453
9c96f3f8 11454 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
11455 spec.
11456
a87b4257
NS
114572001-02-06 Nathan Sidwell <nathan@codesourcery.com>
11458
11459 * pt.c (lookup_template_class): Make sure it's a primary
11460 template or template_template_parm when called from the parser.
11461 (instantiate_template_class): Add assertion.
11462
518fed76
AO
114632001-02-05 Alexandre Oliva <aoliva@redhat.com>
11464
11465 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
11466 from error_mark_node.
11467
9965d119
NS
114682001-02-05 Nathan Sidwell <nathan@codesourcery.com>
11469
11470 Fix specification and implementation bugs in V3 ABI
11471 construction vtables.
11472 * cp-tree.h (flag_dump_class_layout): New flag.
11473 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
11474 (BINFO_LOST_PRIMARY_P): New flag.
11475 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
11476 (BINFO_PRIMARY_MARKED_P): Rename to ...
11477 (BINFO_PRIMARY_P): ... here.
11478 (binfo_via_virtual): New prototype.
11479 * decl2.c (flag_dump_class_layout): New flag.
11480 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
11481 use `=' as a file name separator.
11482 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
11483 bases.
11484 (build_vtbl_address): If this is a virtual primary base, then
11485 get the vtbl of what it is ultimately primary for.
11486 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
11487 for BINFO_PRIMARY_P.
11488 (dfs_skip_nonprimary_vbases_markedp): Likewise.
11489 (get_shared_vbase_if_not_primary): Likewise.
11490 (dfs_get_pure_virtuals): Likewise.
11491 (expand_upcast_fixups): Likewise.
11492 (fixup_virtual_upcast_offsets): Likewise.
11493 (dfs_find_vbase_instance): Likewise.
11494 (find_vbase_instance): Likewise.
11495 (binfo_from_vbase): Adjust comment to reflect reality.
11496 (binfo_via_virtual): New function.
11497 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
11498 for binfo walking during VTT construction.
11499 (dfs_mark_primary_bases): Remove.
11500 (force_canonical_binfo_r): New function.
11501 (force_canonical_binfo): New function.
11502 (mark_primary_virtual_base): New function.
11503 (mark_primary_bases): Walk in inheritance graph order, use
11504 mark_primary_virtual_base.
11505 (determine_primary_base): Use some more intermediate variables.
11506 (dfs_find_final_overrider): Don't check for overriding along a
11507 virtual path.
11508 (dfs_modify_vtables): Walk into primary virtual bases too.
11509 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
11510 (build_base_fields): Likewise.
11511 (dfs_set_offset_for_unshared_vbases): Likewise.
11512 (layout_virtual_bases): Likewise.
11513 (end_of_class): Likewise.
11514 (finish_struct_1): Call dump_class_hierarchy, if requested.
11515 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
11516 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
11517 (dump_class_hierarchy): Add file parameter. Append to file, if
11518 required.
11519 (finish_vtbls): Adjust accumulate_vtbl_inits call.
11520 Use canonical base for virtual bases.
11521 (build_vtt): Add more comments. Adjust build_vtt_inits call.
11522 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
11523 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
11524 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
11525 virtual VTTs.
11526 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
11527 from DATA. We want virtual primary bases and all bases via virtual.
11528 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
11529 virtual base when not a construction vtable.
11530 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
11531 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
11532 Use canonical bases when processing virtual bases.
11533 (accumulate_vtbl_inits): We're interested in any base via a
11534 virtual path.
11535 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
11536 within a construction vtable, determine what is being overridden.
11537 (build_vtbl_initializer): Add more comments
11538 (add_vcall_offset_vtbl_entries_1): Adjust comment.
11539 (build_rtti_vtbl_entries): Check if the base has lost its
11540 primary.
11541
39d6f2e8
MM
115422001-02-05 Mark Mitchell <mark@codesourcery.com>
11543
11544 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
11545
d2a6f3c0 115462001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
11547
11548 * decl.c (pushdecl): Call abort instead of fatal.
11549 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
11550 * init.c (build_new_1): Likewise.
11551 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
11552 * decl.c (build_typename_type): hash_table_init now returns void.
11553 decl.c (init_decl_processing): Make an error non-fatal.
11554
97458258
MM
115552001-02-04 Mark Mitchell <mark@codesourcery.com>
11556
11557 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
11558 Document.
11559 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11560 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11561 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11562 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11563 * decl.c (maybe_commonize_var): Use the new name-mangling where
11564 appropriate.
11565 * decl2.c (comdat_linkage): Enhance comments. Make all
11566 compiler-generated things static, if COMDAT is not available.
11567 (get_tinfo_decl): Do not make typeinfo objects that belong in the
11568 library COMDAT.
11569 (tinfo_base_init): Use the correct mangled name for typeinfo
11570 strings, and push them into the global scope.
11571 (typeinfo_in_lib_p): New function.
11572 (synthesize_tinfo_var): Use it.
11573 (create_real_tinfo_var): Likewise.
9c96f3f8 11574
55de1b66
JJ
115752001-02-03 Jakub Jelinek <jakub@redhat.com>
11576
11577 * decl.c (push_class_binding): Use context_for_name_lookup instead
11578 of CP_DECL_CONTEXT.
11579 * search.c (context_for_name_lookup): Remove static. Check for NULL
11580 context in the loop.
11581 * cp-tree.h (context_for_name_lookup): Add prototype.
11582
e92730aa
JJ
115832001-02-02 Jakub Jelinek <jakub@redhat.com>
11584
11585 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
11586 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
11587 Remove.
11588 * call.c (convert_class_to_reference, build_user_type_conversion_1,
11589 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
11590
049f6ec9
MM
115912001-02-02 Mark Mitchell <mark@codesourcery.com>
11592
11593 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
11594 of macros used when compiling g++spec.c.
11595 * g++spec.c (lang_specific_driver): Link with the shared
11596 libgcc by default.
11597
718b8ea5
JM
115982001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
11599
11600 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
11601 make_reference_declarator, make_call_declarator), method.c
11602 (implicitly_declare_fn), parse.y (namespace_using_decl,
11603 notype_unqualified_id, expr_or_declarator, new_type_id,
11604 after_type_declarator, direct_after_type_declarator,
11605 notype_declarator, complex_notype_declarator,
11606 complex_direct_notype_declarator, qualified_id,
11607 notype_qualified_id, overqualified_id, direct_new_declarator,
11608 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
11609 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
11610 instead of build_parse_node.
11611
f2d1f0ba
KG
116122001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11613
11614 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
11615 (minus_one_node): Moved to top level gcc directory. Renamed
11616 to integer_minus_one_node.
11617
11618 * init.c (init_init_processing): Don't set minus_one_node.
11619 (build_vec_init): Use integer_minus_one_node.
11620
11621 * rtti.c (get_tinfo_decl_dynamic): Likewise.
11622
6001735e
JJ
116232001-01-28 Jakub Jelinek <jakub@redhat.com>
11624
11625 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
11626 identical and they would be replaced with constant, remove
11627 MODIFY_EXPR from the tree.
11628
c913b6f1
KG
116292001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11630
11631 * Make-lang.in: Remove all dependencies on defaults.h.
11632 * call.c: Don't include defaults.h.
11633 * decl.c: Likewise.
11634 * decl2.c: Likewise.
11635 * except.c: Likewise.
11636 * pt.c: Likewise.
11637 * rtti.c: Likewise.
11638 * tree.c: Likewise.
11639 * typeck.c: Likewise.
11640
324ffb8c
JJ
116412001-01-25 Jakub Jelinek <jakub@redhat.com>
11642
11643 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
11644 operators even in "C" linkage.
11645 * method.c (set_mangled_name_for_decl): Likewise.
11646 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
11647 overloaded operators in "C" linkage.
11648
4b2811e9
NS
116492001-01-24 Nathan Sidwell <nathan@codesourcery.com>
11650
11651 * pt.c (tsubst_decl): Remove IN_DECL parameter.
11652 (tsubst_arg_types): Check parameter is not void.
11653 (tsubst): Adjust tsubst_decl call.
11654
d8caf48e
NS
116552001-01-24 Nathan Sidwell <nathan@codesourcery.com>
11656
11657 * call.c (add_builtin_candidate): Quote std properly, from
11658 previous change.
11659
08511114
KL
116602001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11661
11662 * pt.c (check_explicit_specialization): Clone constructors and
11663 destructors.
11664
92ecdfb7
NS
116652001-01-23 Nathan Sidwell <nathan@codesourcery.com>
11666
11667 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
11668 indicates anything special about template depth. Make sure we
11669 only count the user visible template classes.
11670
4cff6abe
NS
116712001-01-23 Nathan Sidwell <nathan@codesourcery.com>
11672
11673 * call.c (build_conv): Typo in comment.
11674 (add_builtin_candidate): Add more explanation.
11675 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
11676 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
11677 when we have enumeral types.
11678 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
11679 candidates for relops and eqops.
11680 (joust): Simplify control flow. Allow a non-template user
11681 function to hide a builtin.
11682
62e4a758
NS
116832001-01-22 Nathan Sidwell <nathan@codesourcery.com>
11684
11685 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
11686 (more_specialized): Add deduction parameter.
11687 * call.c (joust): Adjust more_specialized call.
11688 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
11689 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
11690 (get_bindings_order): Remove.
11691 (get_bindings_real): Add DEDUCE parameter.
11692 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
11693 REFERENCE_TYPE jig for DEDUCE_ORDER.
11694 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
11695 maybe_adjust_types_for_deduction.
11696 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
11697 directly.
11698 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
11699 (check_cv_quals_for_unify): Use new unify qualifier flags.
11700 (unify): Clear new unify qualifier flags.
11701 (get_bindings_real): Add DEDUCE parameter.
11702 (get_bindings): Adjust call to get_bindings_real.
11703 (get_bindings_overload): Likewise.
11704 (most_specialized_instantiation): Adjust call to
11705 more_specialized.
11706
2a2a9e5a
JM
117072001-01-19 Jason Merrill <jason@redhat.com>
11708
11709 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
11710
11711 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
11712 -fnew-abi.
11713
60696c53
JM
117142001-01-19 Ute Pelkmann <scope.muc@t-online.de>
11715
11716 * decl2.c (arg_assoc_class): Fix double iteration logic.
11717
117182001-01-19 Jason Merrill <jason@redhat.com>
11719
11720 * init.c (build_delete): Always call convert_force to strip cv-quals.
11721
11722 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
11723 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
11724 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
11725
1e00f18c
NS
117262001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11727
11728 * search.c (get_vbase_1): Count only virtual bases.
11729
e13bced2
NS
117302001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11731
11732 * class.c (duplicate_tag_error): Robustify flag clearing.
11733
f9c244b8
NS
117342001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11735
11736 * cp-tree.h (lookup_template_class): Add complain parm.
11737 * decl.c (lookup_namespace_name): Adjust call to
11738 lookup_template_class.
11739 (make_typename_type): Likewise.
11740 * semantics.c (finish_template_type): Likewise.
11741 * pt.c (lookup_template_class): Add complain parm. Adjust.
11742 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
11743 (tsubst): Likewise.
11744
08c2df0f
NS
117452001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11746
11747 * pt.c (copy_default_args_to_explicit_spec): Preserve
11748 object's CV quals. Reorganize.
11749
f5ceeec8
NS
117502001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11751
11752 * typeck.c (build_modify_expr): Say `initialization' for
11753 INIT_EXPRs.
11754 * init.c (build_default_init): Convert to enumeral type, if
11755 needed.
11756
a1cfa434
JJ
117572001-01-18 Jakub Jelinek <jakub@redhat.com>
11758
11759 * parse.y (nomods_initdcl0): Properly set things up for
11760 initdcl0_innards.
11761
028d1f20
NS
117622001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11763
11764 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
11765 (type_unification_real): Set it.
11766 (unify): Use it.
11767
9f724b6a
NS
117682001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11769
11770 * decl.c (finish_destructor_body): Convert to vbase pointer here.
11771
522d6614
NS
117722001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11773
11774 * semantics.c (begin_class_definition): Check we're not inside a
11775 template parm list.
11776
7f805b8f
NS
117772001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11778
11779 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
11780 BASELINK_P.
11781
dc3799c1
KL
117822001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11783
11784 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
11785 * call.c (build_over_call): Add comment.
11786
bb37c4a5
DB
117872001-01-16 Daniel Berlin <dberlin@redhat.com>
11788
826840d9
RH
11789 * cvt.c (ocp_convert): Handle vector type conversion
11790 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 11791
a26e7fb5
PE
117922001-01-16 Phil Edwards <pme@sources.redhat.com>
11793
11794 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
11795 was given.
11796
11b810f1
NS
117972001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11798
11799 * pt.c (check_nontype_parm): Rename to ...
11800 (invalid_nontype_parm_type_p): ... here.
11801 (process_template_parm): Adjust.
11802 (convert_template_argument): Adjust.
11803
db3f4e4e
NS
118042001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11805
11806 * pt.c (check_nontype_parm): New function.
11807 (process_template_parm): Use it.
11808 (convert_template_argument): Use it.
11809 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
11810 member.
11811
ea4f1fce
JO
118122001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
11813
11814 * tree.c: Add defaults.h
11815 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
11816 * Make-lang.in (cp/tree.o): Add defaults.h.
11817
1312c143
JM
118182001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11819
11820 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
11821
4bc1997b
JM
118222001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11823
11824 * g++.1: Change to be ".so man1/gcc.1".
11825
23de1fbf
JM
118262001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11827
11828 * Make-lang.in (c++.info, c++.install-info): Build and install g++
11829 internals info.
11830 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
11831 ($(srcdir)/cp/g++int.info): New target.
11832 * gxxint.texi: Add info directory entry. Use @@ in email address.
11833 * .cvsignore: Update.
11834
0949f723
NS
118352001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11836
11837 * typeck.c (build_c_cast): Do template processing earlier.
11838 Always pedwarn on array casts.
11839
a8641661
NS
118402001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11841
11842 * friend.c (make_friend_class): Make sure a templated class is
11843 actually a template.
11844
844511c8
NS
118452001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11846
11847 * decl2.c (get_guard): Set linkage from guarded decl.
11848
96a1e32d
NS
118492001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11850
11851 * call.c (convert_default_arg): Check for unprocessed
11852 DEFAULT_ARG.
11853 * cp-tree.h (replace_defarg): Move to spew.c.
11854 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11855 spew.c, which is where they really are.
11856 (done_pending_defargs): Declare.
11857 (unprocessed_defarg_fn): Declare.
11858 * decl.c (replace_defarg): Move to spew.c
11859 * parse.y (structsp): Call done_pending_defargs.
11860 * spew.c (defarg_fns): Rearrange list structure.
11861 (defarg_fnsdone): New static variable.
11862 (defarg_depfns): New static variable.
11863 (init_spew): Adjust.
11864 (add_defarg_fn): Store the type in TREE_TYPE.
11865 (do_pending_defargs): Detect and deal with ordering constraints
11866 and circularity.
11867 (done_pending_defargs): New function.
11868 (unprocessed_defarg_fn): New function.
11869 (replace_defarg): Moved from decl.c. Robustify. Don't save
11870 if circularity detected.
11871
34e225a3
NS
118722001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11873
11874 * pt.c (unify): Check array has a domain, before checking
11875 whether it is variable sized.
11876
98979fe0
NS
118772001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11878
11879 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11880 parameters with pointers to arrays of unknown bound.
11881
b37bf5bd
NS
118822001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11883
11884 * parse.y (template_parm_header, template_spec_header): New
11885 reductions. Split out from ...
11886 (template_header): ... here. Use them.
11887 (template_template_parm): Use template_parm_header.
11888 * semantics.c (finish_template_template_parm): Add assert.
11889
6c418184
MM
118902001-01-10 Mark Mitchell <mark@codesourcery.com>
11891
792508b5
MM
11892 * mangle.c (write_builtin_type): Fix thinko.
11893
8afa707f
MM
11894 * pt.c (copy_default_args_to_explicit_spec_1): New function.
11895 (copy_default_args_to_explicit_spec): Likewise.
11896 (check_explicit_specialization): Use it.
11897
6c418184
MM
11898 * class.c (finish_struct_1): Remove last argument in call to
11899 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11900 * decl.c (builtin_function): Likewise.
11901 (build_cp_library_fn): Likewise.
11902 (check_initializer): Likewise.
11903 (make_rtl_for_nonlocal_decl): Likewise.
11904 (cp_finish_decl): Likewise.
11905 (start_function): Likewise.
11906 * decl2.c (finish_anon_union): Likewise.
11907 * friend.c (do_friend): Likewise.
11908 * init.c (build_java_class_ref): Likewise.
11909 * method.c (make_thunk): Likewise.
11910 * pt.c (tsubst_friend_function): Likewise.
11911 * semantics.c (expand_body): Likewise.
11912
31d95fc6
MM
119132001-01-10 Mark Mitchell <mark@codesourcery.com>
11914
11915 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11916 looking at DECL_CLONED_FUNCTION for non-functions.
11917
31bb3027
NS
119182001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11919
11920 * error.c (dump_template_parameter): Use parm to determine how
11921 to print default value.
11922
fd3f43e7
NS
119232001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11924
11925 * class.c (duplicate_tag_error): Clear more flags.
11926
042b4c4e
NS
119272001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11928
11929 * call.c (build_new_method_call): Use binfo_for_vbase.
11930
a7537031
JM
119312001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
11932
11933 * cp-tree.h (flag_cond_mismatch): Don't declare.
11934 * decl2.c (flag_cond_mismatch): Don't define.
11935 (lang_f_options): Remove cond-mismatch.
11936 (unsupported_options): Add cond-mismatch.
11937
186c0fbe
NS
119382001-01-09 Nathan Sidwell <nathan@codesourcery.com>
11939
11940 * class.c (handle_using_decl): Reject using of constructor name
11941 of sourcing class. Allow injecting of a method with same name as
11942 nested class. Fixup error messages.
11943
28ec8d6b
JM
119442001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
11945
11946 * decl2.c (lang_decode_option): Handle -Wformat=2.
11947
3febd123
NS
119482001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11949
11950 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11951 initialized_in_class.
11952 (DECL_DEFINED_IN_CLASS_P): Rename to ...
11953 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11954 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11955 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11956 * pt.c (check_default_tmpl_args): Adjust for
11957 DECL_INITIALIZED_IN_CLASS_P.
11958 (instantiate_class_template): Likewise.
11959 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 11960
3febd123
NS
11961 * class.c (finish_struct): Constify saved_filename.
11962
1f0d71c5
NS
119632001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11964
11965 * class.c (duplicate_tag_error): Adjust diagnostic.
11966 (finish_struct): Locally set location to start of struct.
11967 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11968
5bf15e84 119692001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
11970
11971 * decl.c (struct binding_level): Adjust class_shadowed comments
11972 to reflect reality.
aba649ba 11973 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
11974 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11975 Don't set TREE_VALUE on the class_shadowed list.
11976
23d4e4cc 119772001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
11978
11979 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
11980 * init.c (build_java_class_ref): When using the new ABI, search
11981 `class$' and have it mangled with `mangle_decl.'
11982 * mangle.c (write_java_integer_type_codes): New function.
11983 (write_builtin_type): Detect and mangle Java integer and real
11984 types.
9c96f3f8 11985
0c58da3e
MM
119862001-01-07 Mark Mitchell <mark@codesourcery.com>
11987
11988 * decl2.c (grokfield): Don't accept `asm' specifiers for
11989 non-static data members.
11990
45b8ddb4
KG
119912001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11992
11993 * expr.c (cplus_expand_expr): Don't reset `target'.
11994
96302433
NB
119952001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
11996
826840d9 11997 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 11998
220bce48
NS
119992001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12000
12001 * parse.y (template_datadef): Check for error_mark_node.
12002
bfa2cb33
NS
120032001-01-05 Nathan Sidwell <nathan@codesourcery.com>
12004
12005 * cp-tree.def (DEFAULT_ARG): Make `x' class.
12006
eaa7c03f
JM
120072001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
12008
12009 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12010 (record_builtin_type): Make non-static.
12011 (flag_short_double): Don't declare.
12012 (init_decl_processing): Remove the creation of many tree nodes now
12013 in c_common_nodes_and_builtins.
12014 (build_void_list_node): New function.
12015 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12016 * cp-tree.h (flag_short_wchar): Don't declare.
12017
3af4c257
MM
120182001-01-04 Mark Mitchell <mark@codesourcery.com>
12019
12020 * call.c (build_conv): Don't use build1 for USER_CONV.
12021 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12022
03dc0325
JM
120232001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
12024
12025 * lex.c (lang_init): Call c_common_lang_init.
12026
3c505507
NS
120272001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12028
12029 * search.c (lookup_fnfields_here): Remove.
12030 (look_for_overrides_r): Use lookup_fnfields_1.
12031 Ignore functions from using declarations.
12032
03378143
NS
120332001-01-03 Nathan Sidwell <nathan@codesourcery.com>
12034
12035 Implement exceptions specifiers for implicit member functions.
12036 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12037 * method.c (synthesize_exception_spec): New function.
12038 (locate_dtor, locate_ctor, locate_copy): New functions.
12039 (implicitly_declare_fn): Generate the exception spec too.
12040 * search.c (check_final_overrider): Check artificial functions
12041 too.
9c96f3f8 12042 * typeck2.c (merge_exception_specifiers): New function.
03378143 12043
f30efcb7
JM
120442001-01-03 Jason Merrill <jason@redhat.com>
12045
12046 * init.c (build_default_init): New fn.
12047 (perform_member_init): Split out from here.
12048 (build_new_1): Use it. Simplify initialization logic.
12049 (build_vec_init): Take an array, rather than a pointer and maxindex.
12050 Speed up simple initializations. Don't clean up if we're assigning.
12051 * cp-tree.h: Adjust.
12052 * decl2.c (do_static_initialization): Remove TREE_VEC case.
12053 * parse.y (new_initializer): Return void_zero_node for ().
12054 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12055 * typeck2.c (digest_init): Only complain about user-written
12056 CONSTRUCTORs.
12057
a412bf75
MS
120582000-12-22 Mike Stump <mrs@wrs.com>
12059
12060 * decl2.c: (max_tinst_depth): Increase to 50.
12061
4890c2f4
MM
120622001-01-02 Mark Mitchell <mark@codesourcery.com>
12063
12064 * class.c (invalidate_class_lookup_cache): Zero the
12065 previous_class_values.
12066 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12067 TREE_INT_CST_HIGH.
12068 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12069 * decl.c (free_bindings): New variable.
12070 (push_binding): Don't create a new binding if we have one on the
12071 free list.
12072 (pop_binding): Put old bindings on the free list.
12073 (init_decl_processing): Use size_int, not build_int_2.
12074 Register free_bindings as a GC root.
12075 (cp_make_fname_decl): Use size_int, not build_int_2.
12076 (push_inline_template_parms_recursive): Likewise.
12077 (end_template_parm_list): Likewise.
688f6688 12078 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
12079 (tsubst_template_parms): Use size_int, not build_int_2.
12080 (tsubst): Likewise.
12081 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 12082
4f78b9a8
RH
120832001-01-02 Richard Henderson <rth@redhat.com>
12084
12085 * parse.y (asm): Set ASM_INPUT_P.
12086
3c8c2a0a
JM
120872001-01-02 Jason Merrill <jason@redhat.com>
12088
96d6c610
JM
12089 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12090 for v3 ABI.
12091
12092 * typeck.c (cp_truthvalue_conversion): New fn.
12093 * cvt.c (ocp_convert): Use it.
12094
12095 * cp-tree.h: Lose c-common.c decls.
12096
12097 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12098 * cvt.c (convert_to_void): Use type_unknown_p.
12099
9c96f3f8 12100 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
12101 pointer-to-member types.
12102
12103 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
12104 parse.y as C.
12105
12106 * call.c (build_new_method_call): Do evaluate the object parameter
12107 when accessing a static member.
12108 * typeck.c (build_component_ref): Likewise.
12109
d363e7bf
AJ
121102001-01-02 Andreas Jaeger <aj@suse.de>
12111
12112 * decl.c (cp_missing_noreturn_ok_p): New.
12113 (init_decl_processing): Set lang_missing_noreturn_ok_p.
12114
77f5250d
JJ
121152000-12-29 Jakub Jelinek <jakub@redhat.com>
12116
12117 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12118
31a714f6
MM
121192000-12-29 Mark Mitchell <mark@codesourcery.com>
12120
12121 * class.c (pushclass): Remove #if 0'd code.
12122 * cp-tree.h (overload_template_name): Remove.
12123 * decl.c (store_bindings): Simplify.
12124 (pop_from_top_level): Likewise.
12125 * pt.c (overload_template_name): Remove.
d363e7bf 12126 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
12127 needed.
12128
414ea4aa
MM
121292000-12-28 Mark Mitchell <mark@codesourcery.com>
12130
12131 * pt.c (register_local_specialization): Don't return a value.
12132 (lookup_template_class): Use move-to-front heuristic when looking
12133 up template instantiations.
12134 (instantiate_decl): Only push_to_top_level when we're actually
12135 going to instantiate the template.
12136
6f18f7e9
HPN
121372000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
12138
12139 * search.c (binfo_for_vtable): Return least derived class, not
12140 most. Handle secondary vtables.
12141
e5214479
JM
121422000-12-22 Jason Merrill <jason@redhat.com>
12143
3c8c2a0a
JM
12144 * pt.c (more_specialized): Don't optimize len==0.
12145 (fn_type_unification): If we're adding the return type, increase len.
12146
ebb1abc3
JM
12147 * typeck.c (build_binary_op): Fix pmf comparison logic.
12148
c939ca5f
JM
12149 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12150 DECL_STATIC_FUNCTION_P.
12151
e6fe680d
JM
12152 * semantics.c (genrtl_finish_function): Don't try to jump to
12153 return_label unless it exists.
12154
e5214479
JM
12155 In partial ordering for a call, ignore parms for which we don't have
12156 a real argument.
12157 * call.c (joust): Pass len to more_specialized.
12158 (add_template_candidate_real): Strip 'this', pass len.
12159 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
12160 (get_bindings_order): New fn. Pass len down.
12161 (get_bindings_real): Strip 'this', pass len.
12162 (fn_type_unification): Likewise.
12163 (type_unification_real): Succeed after checking 'len' args.
12164 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 12165 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
12166 pass len.
12167
121682000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
12169
12170 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12171 DECL_TEMPLATE_RESULT.
12172
12173 * search.c (lookup_field_r): Call lookup_fnfields_1, not
12174 lookup_fnfields_here.
12175
12176 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12177
12178 * call.c (build_object_call): Also allow conversions that return
12179 reference to pointer to function.
12180 (add_conv_candidate): Handle totype being ref to ptr to fn.
12181 (build_field_call): Also allow members of type reference to function.
12182 Lose support for calling pointer to METHOD_TYPE fields.
12183
12184 * error.c (dump_expr): Handle *_CAST_EXPR.
12185
12186 * typeck2.c (build_scoped_ref): Always convert to the naming class.
12187
12188 * tree.c (break_out_cleanups): Lose.
12189 * cp-tree.h: Remove prototype.
12190 * typeck.c (build_component_ref): Don't break_out_cleanups.
12191 (build_compound_expr): Likewise.
12192 * semantics.c (finish_expr_stmt): Likewise.
12193
3e4d04a1
RH
121942000-12-20 Richard Henderson <rth@redhat.com>
12195
12196 * cp-tree.h: Update declarations.
12197 * decl.c (finish_case_label): Return the new stmt node.
12198 * semantics.c (finish_goto_stmt): Likewise.
12199 (finish_expr_stmt, finish_return_stmt): Likewise.
12200 (finish_break_stmt, finish_continue_stmt): Likewise.
12201 (finish_asm_stmt): Likewise.
12202 * parse.y (already_scoped_stmt): Set STMT_LINENO.
12203 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12204 (simple_if, simple_stmt): Return the new stmt node.
12205 (save_lineno): New.
12206
20d380b1
JM
122072000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
12208
12209 * cp-tree.h: Don't declare warn_long_long.
12210
221c7a7f
KL
122112000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12212
12213 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12214 IS_AGGR_TYPE.
12215
b429fdf0
KL
122162000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12217
12218 * pt.c (unify): Handle when both ARG and PARM are
12219 BOUND_TEMPLATE_TEMPLATE_PARM.
12220
c2beae77
KL
122212000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12222
12223 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12224 DECL_TEMPLATE_PARM_P.
12225
c3e899c1
JM
122262000-12-15 Jason Merrill <jason@redhat.com>
12227
96790071
JM
12228 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
12229
8d42565b
JM
12230 * init.c (build_new_1): Don't strip quals from type.
12231
fab09a24
JM
12232 * decl.c (pushdecl): Don't check for linkage on a non-decl.
12233
c3e899c1
JM
12234 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12235
12236 * call.c (build_new_function_call): Lose space before paren in
12237 error message.
12238 (build_new_method_call): Likewise.
12239
12240 * typeck2.c (build_m_component_ref): Propagate quals from datum.
12241
edac124d
KL
122422000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12243
12244 * pt.c (check_explicit_specialization): Propagate default
12245 function arguments to explicit specializations.
12246
31750649 122472000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
12248
12249 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12250 and <? operators.
12251
5e818b93
JM
122522000-12-08 Jason Merrill <jason@redhat.com>
12253
12254 * error.c (dump_function_name): Don't let the user see __comp_ctor.
12255
12256 Clean up copy-initialization in overloading code.
12257 * call.c (build_user_type_conversion_1): Die if we are asked to
12258 convert to the same or a base type.
12259 (implicit_conversion): Avoid doing so. Lose reference binding code.
12260 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12261 direct-initialization. Also do direct-init part of copy-init.
12262 (build_user_type_conversion): Don't provide context to convert_like.
12263 * cvt.c (ocp_convert): build_user_type_conversion will now provide
12264 the constructor call for copy-init.
12265
12266 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12267 instantiation of a member template.
12268 (do_decl_instantiation): Not here.
12269
38da6039
NS
122702000-12-07 Nathan Sidwell <nathan@codesourcery.com>
12271
12272 * class.c (check_field_decls): Don't special case anonymous
12273 fields in error messages.
c9407e4c 12274 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 12275
38da6039
NS
12276 * tree.c (pod_type_p): Use strip_array_types.
12277 (cp_valid_lang_attribute): Likewise.
12278 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
12279 multiple evaluations.
d363e7bf 12280 (cp_has_mutable_p): Use strip_array_types.
38da6039 12281
a11d04b5
NS
122822000-12-07 Nathan Sidwell <nathan@codesourcery.com>
12283
12284 * cp-tree.h (sufficient_parms_p): Declare new function.
12285 * call.c (sufficient_parms_p): New function, broken out of ...
12286 (add_function_candidate): ... here. Use it.
12287 (add_conv_candidate): Use it.
12288 * decl.c (grok_ctor_properties): Use it.
12289
5eec2847
JJ
122902000-12-07 Jakub Jelinek <jakub@redhat.com>
12291
12292 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
12293
c907e684
JM
122942000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
12295
12296 * decl2.c (lang_decode_option): Handle -Wformat-security.
12297
74601d7c
KL
122982000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12299
12300 * pt.c (verify_class_unification): New function.
12301 (get_class_bindings): Use it.
12302 (try_class_unification): Tidy.
12303 (unify): Handle when argument of a template-id is not
12304 template parameter dependent.
12305 (template_args_equal): Handle when TREE_CODE's do not match.
12306
8954e858
AO
123072000-12-06 Alexandre Oliva <aoliva@redhat.com>
12308
12309 * lang-specs.h (c++): When invoking the stand-alone preprocessor
12310 for -save-temps, pass all relevant -Defines to it, and then don't
12311 pass them to cc1plus.
12312
3dc9aec6
WC
123132000-12-05 Will Cohen <wcohen@redhat.com>
12314
12315 * decl.c (finish_case_label): Cleared
12316 more_cleanups_ok in surrounding function scopes.
12317 (define_label): Likewise.
12318
cbb40945
NS
123192000-12-05 Nathan Sidwell <nathan@codesourcery.com>
12320
12321 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
12322 (get_matching_virtual): Remove.
12323 (look_for_overrides): Declare new function.
12324 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
12325 DECL_VINDEX here.
12326 * class.c (check_for_override): Move base class iteration code
12327 to look_for_overrides.
12328 * search.c (next_baselink): Remove.
12329 (get_virtuals_named_this): Remove.
12330 (get_virtual_destructor): Remove.
12331 (tree_has_any_destructors_p): Remove.
12332 (struct gvnt_info): Remove.
12333 (check_final_overrider): Remove `virtual' from error messages.
12334 (get_matching_virtuals): Remove. Move functionality to ...
12335 (look_for_overrides): ... here, and ...
12336 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
12337 to be overriding.
12338
61402b80
NS
123392000-12-05 Nathan Sidwell <nathan@codesourcery.com>
12340
12341 * typeck.c (get_delta_difference): If via a virtual base,
12342 return zero.
12343 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
12344 adjustment.
12345
39abc9a6
RH
123462000-12-04 Richard Henderson <rth@redhat.com>
12347
12348 * error.c (dump_tree): Use output_add_string not OB_PUTS.
12349
c00996a3
JM
123502000-12-04 Jason Merrill <jason@redhat.com>
12351
12352 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 12353 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
12354 type_for_mode.
12355 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
12356 Pass intSI_type_node and the like through type_for_mode.
12357 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
12358 * pt.c (tsubst, unify): Likewise.
12359 * tree.c (walk_tree): Likewise.
12360 * error.c (dump_type): Likewise.
12361 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 12362
c00996a3
JM
12363 * Make-lang.in: Tweak top comment for emacs.
12364 (cp/TAGS): Restore.
12365
12366 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
12367
c00996a3
JM
12368 * class.c (clone_function_decl): Robustify.
12369
123702000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
12371
12372 * decl.c (store_bindings): Only search in the non modified
12373 old_bindings for duplicates.
12374
00bb3dad
NS
123752000-12-04 Nathan Sidwell <nathan@codesourcery.com>
12376
12377 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
12378 TYPE_POLYMORPHIC_P.
d363e7bf 12379
00bb3dad
NS
12380 * typeck.c (build_static_cast): Remove unused variable.
12381
dc957d14
KL
123822000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12383
12384 * pt.c: Fix typo in comment.
12385
4d808927
JM
123862000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
12387
12388 * decl2.c (warn_format): Remove definition.
12389 (lang_decode_option): Handle -Wformat-nonliteral,
12390 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
12391
5fd8e536
JM
123922000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
12393
12394 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
12395 (init_decl_processing): Don't create string_type_node,
12396 const_string_type_node, wint_type_node, intmax_type_node,
12397 uintmax_type_node, default_function_type, ptrdiff_type_node and
12398 unsigned_ptrdiff_type_node. Adjust position of call to
12399 c_common_nodes_and_builtins.
12400 (identifier_global_value): New function.
12401
13f9714b
NS
124022000-12-01 Nathan Sidwell <nathan@codesourcery.com>
12403
12404 * call.c (standard_conversion): Reject pointer to member
12405 conversions from ambiguous, inaccessible or virtual bases.
12406 * typeck.c (build_static_cast): Don't check pointers to members
12407 specially.
12408
31b1b957
NS
124092000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12410
12411 * method.c (do_build_copy_constructor): Preserve cv
12412 qualifications when accessing source object members.
12413 (do_build_assign_ref): Likewise. Remove separate diagnostics for
12414 unnamed fields.
12415
717e3f73
NS
124162000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12417
12418 * method.c (do_build_assign_ref): Construct appropriately
12419 CV-qualified base reference. Don't allow const casts in base
12420 conversion.
12421
2c92b94d
NS
124222000-11-30 Nathan Sidwell <nathan@codesourcery.com>
12423
12424 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
12425 incomplete return type.
12426
bb92901d
NS
124272000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12428
12429 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
12430 * semantics.c (finish_base_specifier): Accept a _TYPE not a
12431 _DECL.
12432
2f3608c3
NS
124332000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12434
12435 * spew.c (yyerror): Cope if yylval.ttype is NULL.
12436
eeb75383
NS
124372000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12438
12439 * decl.c (grokdeclarator): Diagnose undefined template contexts.
12440
5ee4cc26
NS
124412000-11-28 Nathan Sidwell <nathan@codesourcery.com>
12442
12443 * decl.c (grokdeclarator): Do type access control on friend
12444 class.
12445
76e57b45
NS
124462000-11-27 Nathan Sidwell <nathan@codesourcery.com>
12447
12448 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
12449 bison parser ickiness.
12450 * pt.c (tsubst_friend_function): Enter namespace scope when
12451 tsubsting the function name.
12452 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
12453
f9825168
NS
124542000-11-27 Nathan Sidwell <nathan@codesourcery.com>
12455
12456 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
12457 * cvt.c (cp_convert_to_pointer): Add force parameter.
12458 Allow conversions via virtual base if forced.
12459 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
12460 (ocp_convert): Likewise.
12461 * search.c (binfo_from_vbase): Return the virtual base's binfo.
12462 * typeck.c (get_delta_difference): Adjust handling of virtual
12463 bases.
12464
9ccb25d5
MM
124652000-11-26 Mark Mitchell <mark@codesourcery.com>
12466
12467 * tree.c (struct list_hash): Remove.
12468 (list_hash_table): Make it be an htab.
12469 (struct list_proxy): New type.
12470 (list_hash_eq): New function.
12471 (list_hash_pieces): Renamed from ...
12472 (list_hash): ... this.
12473 (list_hash_lookup): Remove.
12474 (list_hash_add): Remove.
12475 (hash_tree_cons): Use the generic hashtable.
12476 (mark_list_hash): Remove.
12477 (init_tree): Create the hashtable.
12478
9399bad3
JM
124792000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
12480
12481 * method.c (build_mangled_C9x_name): Rename to
12482 build_mangled_C99_name. Change C9X references in comments to
12483 refer to C99.
12484
2f401cc8
NS
124852000-11-24 Nathan Sidwell <nathan@codesourcery.com>
12486
12487 * parse.y (unary_expr): Move VA_ARG from here ...
12488 (primary): ... to here.
12489
3d7e9ba4
NS
124902000-11-24 Nathan Sidwell <nathan@codesourcery.com>
12491
12492 * semantics.c (finish_id_expr): If type is error_mark, return
12493 error_mark.
12494
ab097535
NS
124952000-11-23 Nathan Sidwell <nathan@codesourcery.com>
12496
12497 * pt.c (lookup_template_class): Simplify loop exit constructs.
12498 Cope when there is no partial instantiation of a template
12499 template member.
12500
d2a6f3c0 125012000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
12502
12503 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
12504
cac78ea2
MM
125052000-11-22 Mark Mitchell <mark@codesourcery.com>
12506
6e1b44bc
MM
12507 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
12508 prefix.
12509
cac78ea2
MM
12510 * pt.c (do_decl_instantiate): Explicitly clone constructors and
12511 destructors that haven't already been cloned.
12512
3aac38d7
RH
125132000-11-20 Richard Henderson <rth@redhat.com>
12514
12515 * parse.y (yyparse_1): Rename the parser entry point.
12516
125172000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
12518
12519 * mangle.c (write_name): Use <unscoped-name> for names directly in
12520 function scope.
12521 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 12522
447306fa
NS
125232000-11-20 Nathan Sidwell <nathan@codesourcery.com>
12524
12525 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
12526 * parse.y (extdef): Add EXPORT reduction.
12527 * spew.c (yylex): Don't skip export here.
12528
2650255a
MM
125292000-11-19 Mark Mitchell <mark@codesourcery.com>
12530
12531 * decl.c (init_decl_processing): Correct name of pure virtual
12532 function under the new ABI.
12533 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
12534 (throw_bad_typeid): Likewise for bad typeid function.
12535
0657c69c
MM
125362000-11-18 Mark Mitchell <mark@codesourcery.com>
12537
04f3dc2b
MM
12538 * decl.c (grokparms): Don't even function types of `void' type,
12539 either.
12540 * mangle.c (write_type): Don't crash when confronted with the
12541 error_mark_node.
12542
0657c69c
MM
12543 * decl.c (grokparms): Don't create parameters of `void' type.
12544
a8a05998
ZW
125452000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12546
12547 * lex.c (mark_impl_file_chain): Delete.
12548 (init_parse): Remove call to ggc_add_string_root. No need to
12549 ggc_strdup a string constant. Do not add impl_file_chain to GC
12550 roots.
12551 (handle_pragma_implementation): No need to ggc_strdup main_filename.
12552
35728a80
NS
125532000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12554
12555 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
12556
5cce22b6
NS
125572000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12558
12559 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
12560 * decl.c (grokdeclarator): Don't reject void parms here.
12561 (require_complete_types_for_parms): Simplify, use
12562 complete_type_or_else.
12563 (grokparms): Remove bitrot. Remove funcdef parm.
12564 Deal with ellipsis parm lists here.
12565 * semantics.c (finish_parmlist): Don't append void_list_node
12566 here. Set PARMLIST_ELLIPSIS_P.
12567
146c8d60
NS
125682000-11-17 Nathan Sidwell <nathan@codesourcery.com>
12569
d30d6e7a 12570 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
12571 excessive diagnostics.
12572
520a57c8
ZW
125732000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12574
12575 * lex.c (struct impl_files, internal_filename): Constify a char *.
12576
43048a06
MM
125772000-11-16 Mark Mitchell <mark@codesourcery.com>
12578
12579 * mangle.c (write_special_name_constructor): Don't generate
12580 assembler junk when confronted with an old-style constructor.
12581 (write_special_name_destructor): Likewise.
12582 (mangle_decl_string): Do it here instead.
12583
cdb71673
NS
125842000-11-16 Nathan Sidwell <nathan@codesourcery.com>
12585
12586 * call.c (op_error): Make error messages clearer.
12587
62136084
MM
125882000-11-15 Mark Mitchell <mark@codesourcery.com>
12589
12590 * decl.c (wrapup_globals_for_namespace): Don't mark things
12591 TREE_ASM_WRITTEN when they're not.
12592
ee3400e8
JM
125932000-11-15 Jason Merrill <jason@redhat.com>
12594
12595 * typeck2.c (friendly_abort): Uncount the error before handing
12596 off to fancy_abort.
12597
71631a1f
NS
125982000-11-15 Nathan Sidwell <nathan@codesourcery.com>
12599
12600 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
12601
79cda2d1
MM
126022000-11-14 Mark Mitchell <mark@codesourcery.com>
12603
12604 * class.c (build_vtbl_initializer): Fix typo in comment.
12605 * typeck.c (expr_sizeof): Don't crash on errors.
12606
2567bc56
JW
126072000-11-14 Jim Wilson <wilson@redhat.com>
12608
12609 * lang-specs.h: Add %2 after %(cc1_options).
12610
8422942c
RH
126112000-11-14 Richard Henderson <rth@redhat.com>
12612
12613 * typeck.c (c_sizeof): Be strict about casting result value
12614 back to c_size_type_node.
12615 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
12616
19552aa5
JM
126172000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12618
12619 * typeck.c (build_unary_op): Use boolean_increment from
12620 c-common.c, moving the relevant code there.
12621
d96a6d1a
JM
126222000-11-11 Jason Merrill <jason@redhat.com>
12623
12624 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
12625
12626 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
12627 in inlines.
12628
4e135bdd
KG
126292000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12630
12631 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
12632 * lex.c (copy_lang_decl): Likewise.
12633
0a7394bc
MM
126342000-11-09 Mark Mitchell <mark@codesourcery.com>
12635
13507bd8
MM
12636 * dump.c (cp_dump_tree): Don't dump function bodies here.
12637
0a7394bc
MM
12638 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
12639 (dump.o): Update dependency list.
12640 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
12641 (flag_dump_translation_unit): Likewise.
12642 (CP_TYPE_QUALS): Adjust definition.
12643 (DECL_C_BIT_FIELD): Remove.
12644 (SET_DECL_C_BIT_FIELD): Likewise.
12645 (CLEAR_DECL_C_BIT_FIELD): Likewise.
12646 (add_maybe_template): Likewise.
12647 (strip_array_types): Likewise.
12648 (dump_node_to_file): Likewise.
12649 (cp_dump_tree): New function.
12650 * decl.c (init_decl_processing): Set lang_dump_tree.
12651 * decl2.c (flag_dump_translation_unit): Remove.
12652 * dump.c: Move most of it to ../c-dump.c.
12653 (cp_dump_tree): New function.
12654 * pt.c (add_maybe_template): Remove.
12655 * typeck.c (strip_array_types): Likewise.
a8a05998 12656
5362b086
EC
126572000-11-07 Eric Christopher <echristo@redhat.com>
12658
492cca24
JM
12659 * decl.c (init_decl_processing): Change definition of
12660 __wchar_t to wchar_t. Remove artificial declaration of
12661 wchar_t.
12662 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 12663
5361cbb7
NS
126642000-11-09 Nathan Sidwell <nathan@codesourcery.com>
12665
12666 * lex.c (do_identifier): Don't lookup_name for operators.
12667 * parse.y (operator): Save looking_for_typename.
12668 (unoperator): Restore it.
12669 * spew.c (frob_opname): Use nth_token for lookahead.
12670
36791f1e
NS
126712000-11-08 Nathan Sidwell <nathan@codesourcery.com>
12672
12673 * decl.c (grok_op_properties): Always use coerce_new_type and
12674 coerce_delete_type.
12675 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
12676 exception specification. Tidy up.
12677 (coerce_delete_type): Preserve exception specification. Tidy up.
12678
961192e1
JM
126792000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12680
12681 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
12682 (push_binding_level), error.c (cp_tree_printer), pt.c
12683 (process_partial_specialization, tsubst_template_arg_vector),
12684 search.c (lookup_member): Use memset () instead of bzero ().
12685
d48ebde1
NS
126862000-11-07 Nathan Sidwell <nathan@codesourcery.com>
12687
12688 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
12689
436a88a6
JM
126902000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12691
12692 * Make-lang.in (c++.distdir): Remove.
12693
7a4e5091
MM
126942000-11-04 Mark Mitchell <mark@codesourcery.com>
12695
12696 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
12697 declarations from different namespaces to be combined.
12698
0e9295cf
ZW
126992000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
12700
12701 * decl.c: Include tm_p.h.
12702
da61dec9
JM
127032000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
12704
12705 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
12706
9473c522
JM
127072000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
12708
12709 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
12710 (build_overload_value), repo.c (open_repo_file), xref.c
12711 (open_xref_file): Use strchr () and strrchr () instead of index ()
12712 and rindex ().
12713
b0b3afb2
BS
127142000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
12715
12716 * call.c (build_over_call): Call fold on the CALL_EXPR.
12717
faafaee6
GDR
127182000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
12719
12720 * error.c (dump_template_decl): Separate template hearders with
12721 space not comma.
12722
761f0855
GDR
127232000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
12724
12725 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
12726 TS_* flags with corresponding TFF_*. Adjust prototypes of
12727 functions (which used to take a tree_string_flags) to take an int.
12728
12729 * cp-tree.h (enum tree_string_flags): Remove
12730 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
12731 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
12732 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12733 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12734 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
12735 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
12736 (type_as_string, decl_as_string, expr_as_string,
12737 context_as_string): Adjust prototype.
12738
12739 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
12740 instead of TS_PLAIN.
12741
12742 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
12743 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
12744 plain `0'.
12745
ad50e811
MM
127462000-10-30 Mark Mitchell <mark@codesourcery.com>
12747
12748 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
12749 (linkage_kind): New enumeration.
12750 (decl_linkage): New function.
12751 * decl2.c (comdat_linkage): Extend comment.
12752 * error.c (dump_function_decl): Print the arguments used to
12753 instantiate a template, even when not printing the type of the
12754 function.
12755 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
12756 not TREE_PUBLIC, to test for external linkage.
12757 * tree.c (decl_linkage): New function.
12758
930cd796
MM
127592000-10-28 Mark Mitchell <mark@codesourcery.com>
12760
12761 * pt.c (instantiate_decl): Always instantiate static data members
12762 initialized in-class.
12763
b8dad04b
ZW
127642000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12765
12766 * Make-lang.in: Move all build rules here from Makefile.in,
12767 adapt to new context. Wrap all rules that change the current
12768 directory in parentheses. Expunge all references to $(P).
12769 When one command depends on another and they're run all at
12770 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12771 all object-file generation rules. Delete obsolete variables.
12772
12773 * Makefile.in: Delete.
12774 * config-lang.in: Delete outputs= line.
12775
5f9cd837
GDR
127762000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
12777
12778 * error.c (dump_function_decl): Print no space between
12779 `ptr-operator' the `type-specifier' of the return type.
12780 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 12781 place.
5f9cd837 12782
6c6ed0ef
JM
127832000-10-23 Jason Merrill <jason@redhat.com>
12784
12785 * call.c (equal_functions): Also call decls_match for extern "C" fns.
12786
127872000-10-22 Jason Merrill <jason@redhat.com>
12788
12789 * call.c (build_conditional_expr): Use ocp_convert to force
12790 rvalue conversion.
12791
e36308b0
MM
127922000-10-22 Mark Mitchell <mark@codesourcery.com>
12793
583ca5a0
MM
12794 * call.c (standard_conversion): Use RVALUE_CONVs for all
12795 expressions that satisfy lvalue_p, not just those that satisfy
12796 real_lvalue_p.
12797
f9808f81
MM
12798 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
12799
5362b086 12800 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
12801 not one with TYPE_IS_SIZETYPE set.
12802 (dubious_conversion_warnings): Remove special-case code.
12803
3b9ae6f0
GK
128042000-10-21 Geoffrey Keating <geoffk@cygnus.com>
12805
7a0f14e5
GK
12806 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
12807 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
12808 (dump_type_prefix): Print vector-of-int as 'int vector'.
12809 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
12810 * tree.c (walk_tree): Handle VECTOR_TYPE.
12811
3b9ae6f0 12812 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 12813
aca77bd1
JM
128142000-10-21 Jason Merrill <jason@redhat.com>
12815
12816 * parse.y (operator): Set got_object from got_scope.
12817 Set looking_for_typename.
12818 * decl.c (lookup_name_real): Clear val after setting from_obj.
12819 Reorganize diagnostic.
12820
ba523395
JM
128212000-10-20 Jason Merrill <jason@redhat.com>
12822
12823 * tree.c (walk_tree): Don't walk into default args.
12824
12825 * error.c (dump_expr): Use host_integerp.
12826
2e44948d
DE
128272000-10-20 David Edelsohn <edelsohn@gnu.org>
12828
12829 * typeck2.c (abstract_virtuals_error): Use "because" instead of
12830 "since" in error message.
12831
d2a6f3c0 128322000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44475138
RK
12833
12834 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
12835
11306230
JO
128362000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
12837
12838 * decl.c (revert_static_member_fn): Fixed typo.
12839
97ba1e3c
MM
128402000-10-19 Mark Mitchell <mark@codesourcery.com>
12841
c20118a8
MM
12842 * class.c (subobject_offset_fn): New type.
12843 (dfs_record_base_offsets): Remove.
12844 (record_base_offsets): Likewise.
12845 (dfs_search_base_offsets): Likewise.
12846 (record_subobject_offset): New function.
12847 (check_subobject_offset): Likewise.
12848 (walk_subobject_offsets): Likewise.
12849 (record_subobject_offsets): Likewise.
12850 (layout_conflict_p): Reimplement.
12851 (layout_nonempty_base_or_field): Correct handling of type
12852 conflicts during layout.
12853 (layout_empty_base): Likewise.
12854 (build_base_field): Adjust to handle new representation of empty
12855 base offset table.
12856 (build_base_fields): Likewise.
12857 (layout_virtual_bases): Likewise.
12858 (splay_tree_compare_integer_csts): New function.
12859 (layout_class_type): Use a splay_tree, rather than a varray, to
12860 represent the offsets of empty bases.
5362b086 12861
97ba1e3c
MM
12862 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12863 * decl.c (select_decl): Don't return declarations that are
12864 DECL_ANTICIPATED.
12865
6bcedb4e
MM
128662000-10-18 Mark Mitchell <mark@codesourcery.com>
12867
12868 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12869 (fake_std_node): New macro.
12870 * decl.c (in_std): Rename to ...
12871 (in_fake_std): ... this.
12872 (flag_no_builtin): Remove.
12873 (flag_no_nonansi_builtin): Likewise.
12874 (walk_namespaces_r): Use fake_std_node.
12875 (push_namespace): Use std_identifier.
12876 (pop_namespace): Use in_fake_std.
12877 (lookup_name_real): Use fake_std_node.
12878 (init_decl_processing): When -fhonor-std, create the `std'
12879 namespace. Don't create a dummy fake_std_node in that case.
12880 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
12881 (builtin_function): Put builtins whose names don't begin
12882 with `_' in the std namespace.
12883 * decl2.c (flag_no_builtin): Remove.
12884 (flag_no_nonansi_builtin): Likewise.
12885 (set_decl_namespace): Use fake_std_node.
12886 (validate_nonmember_using_decl): Likewise.
12887 (do_using_directive): Likewise.
12888 (handle_class_head): Likewise.
12889 * dump.c (dequeue_and_dump): Likewise.
12890 * except.c (init_exception_processing): Use std_identifier.
12891 * init.c (build_member_call): Use fake_std_node.
12892 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 12893
67673f5c
MM
128942000-10-17 Mark Mitchell <mark@codesourcery.com>
12895
12896 * cp-tree.h (back_end_hook): Remove declaration.
12897 * decl2.c (back_end_hook): Remove definition.
12898
12899 * dump.c (dequeue_and_dump): Dump TREE_USED.
12900
d2a6f3c0 129012000-10-17 Brad Lucier <lucier@math.purdue.edu>
8fef2e47
BL
12902
12903 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12904
652469d0
JM
129052000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12906
12907 * decl.c (WINT_TYPE): Define.
12908 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12909 c_size_type_node, signed_size_type_node and wint_type_node.
12910
74ff4629
JM
129112000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12912
12913 * decl2.c (warn_missing_format_attribute): New variable.
12914 (lang_decode_option): Decode -Wmissing-format-attribute.
12915
634790f4
MM
129162000-10-16 Mark Mitchell <mark@codesourcery.com>
12917
12918 * typeck.c (qualify_type): Remove.
12919 (composite_pointer_type): Fix handling of conversions to `cv void*'.
12920
bb12da9d
KG
129212000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12922
12923 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12924
4b945402
KG
129252000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12926
12927 * Makefile.in (parse.c, parse.h): Create atomically.
12928
1f8f4a0b
MM
129292000-10-12 Mark Mitchell <mark@codesourcery.com>
12930
12931 * class.c (current_obstack): Remove.
12932 * decl.c (ggc_p): Remove.
12933 (start_decl): Don't use decl_tree_cons.
12934 (grokdeclarator): Don't use build_decl_list.
12935 (start_function): Don't use decl_tree_cons.
12936 (finish_function): Don't mess with obstacks.
12937 * decl2.c (grok_x_components): Don't use build_decl_list.
12938 * lex.c (make_call_declarator): Don't call decl_tree_cons.
12939 (implicitly_declare_fn): Don't call build_decl_list.
12940 * parse.y (frob_specs): Don't call build_decl_list or
12941 decl_tree_cons.
12942 (expr_or_declarator_intern): Don't call decl_tree_cons.
12943 (primary): Don't call build_decl_list.
12944 (fcast_or_absdcl): Likewise.
12945 (typed_declspecs): Don't call decl_tree_cons.
12946 (reserved_declspecs): Don't call build_decl_list.
12947 (declmods): Likewise.
12948 (reserved_typespecquals): Likewise.
12949 (aggr): Likewise.
12950 (new_type_id): Likewise.
12951 (cv_qualifiers): Likewise.
12952 (after_type_declarator_intern): Likewise.
12953 (notype_declarator_intern): Likewise.
12954 (absdcl_intern): Likewise.
12955 (named_parm): Likewise.
12956 * pt.c (most_specialized_class): Likewise.
12957 * repo.c (temporary_obstack): Make it a structure, not a pointer.
12958 (init_repo): Initialize it.
12959 * search.c (current_obstack): Remove.
12960 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 12961
8dc54971
RH
129622000-10-09 Richard Henderson <rth@cygnus.com>
12963
12964 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12965 (c++ language support bits for libgcc): Remove.
12966 (c++.clean): Remove cplib2.txt cleanup.
12967 * config-lang.in (headers, lib2funcs): Remove.
12968
12969 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12970 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12971 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12972 * inc/new.h, inc/typeinfo: Remove files.
12973
b15ad712
JM
129742000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
12975
12976 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12977 defined.
12978 (init_decl_processing): Initialize intmax_type_node and
12979 uintmax_type_node.
12980
156ce211
RH
129812000-10-06 Richard Henderson <rth@cygnus.com>
12982
12983 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12984 (original_result_rtx): Remove.
12985 * decl.c (save_function_data): Don't clear x_result_rtx.
12986 (mark_lang_function): Don't mark it either.
12987 * expr.c (fixup_result_decl): Remove.
12988 * semantics.c (genrtl_named_return_value): Frob the return decl
12989 before calling emit_local_var.
12990 (genrtl_finish_function): Don't call fixup_result_decl.
12991 Always emit the jump to return_label.
12992
92777ce4
NS
129932000-10-06 Nathan Sidwell <nathan@codesourcery.com>
12994
12995 * pt.c (lookup_template_class): Set current access for enum.
12996 (tsubst_enum): Set file & line for enum decl.
5362b086 12997
92777ce4
NS
12998 * spew.c (yylex): Remove unused variable.
12999
63c16fc5
RH
130002000-10-05 Richard Henderson <rth@cygnus.com>
13001
13002 * semantics.c (genrtl_finish_function): Don't init or check
13003 can_reach_end; remove noreturn and return value checks.
13004
d1a458c4
TT
130052000-10-05 Tom Tromey <tromey@cygnus.com>
13006
13007 * init.c (build_java_class_ref): Use `build_static_name' with a
13008 suffix, not a prefix, to build the class object's name.
13009
509fc277
NS
130102000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13011
13012 * cp-tree.h (access_kind): Fix comment typo.
13013 * decl2.c (grokfield): Fix diagnostic typo.
13014 * semantics.c (finish_template_type): Fix comment typo.
13015 (finish_qualified_object_call_expr): Likewise.
13016
ce2e5191
NS
130172000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13018
13019 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 13020 tsubsting fails.
ce2e5191 13021
79cc5312
NS
130222000-10-05 Nathan Sidwell <nathan@codesourcery.com>
13023
13024 * spew.c (frob_id): New static function.
13025 (frob_opname): Use it.
13026 (yylex): Use it.
13027
f15b9af9
MM
130282000-10-01 Mark Mitchell <mark@codesourcery.com>
13029
13030 * decl.c (lang_mark_false_label_stack): Remove.
13031 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 13032
28e6b1c2
JM
130332000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
13034
13035 * gxxint.texi: Use @email for formatting email addresses.
13036
99885b3f
GDR
130372000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
13038
13039 * error.c: Remove direct obstack manipulation. Replace with
13040 output_buffer-based formatting. Adjust calls to removed macros.
13041 (obstack_chunk_alloc, obstack_chunk_free): Remove.
13042 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13043 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13044
c06aa51e
MM
130452000-09-24 Mark Mitchell <mark@codesourcery.com>
13046
13047 * ir.texi: Move to ../c-tree.texi.
13048
99fada40
JM
130492000-09-20 Jason Merrill <jason@redhat.com>
13050
13051 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13052
bb20cc46
AJ
130532000-09-21 Andreas Jaeger <aj@suse.de>
13054
13055 * errfn.c: Move declaration of cp_printer and cp_printers to ...
13056 * cp-tree.h: ... here.
13057
13058 * error.c: Remove declaration of cp_printer.
13059
fab701da
MM
130602000-09-20 Mark Mitchell <mark@codesourcery.com>
13061
13062 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13063
0370fea1
HPN
130642000-09-20 Hans-Peter Nilsson <hp@axis.com>
13065
13066 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13067 users.
13068
78c120b5
MM
130692000-09-18 Mark Mitchell <mark@codesourcery.com>
13070
13071 * decl.c (start_function): Robustify.
13072
3f80e6ac
KG
130732000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13074
13075 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 13076
3f80e6ac
KG
13077 * call.c, typeck.c: Updates calls to `check_function_format'.
13078
fc928afe
GK
130792000-09-17 Geoffrey Keating <geoffk@cygnus.com>
13080
13081 * decl2.c (handle_class_head): Always push some scope even
13082 in the error case.
13083
8f17b5c5
MM
130842000-09-16 Mark Mitchell <mark@codesourcery.com>
13085
13086 * cp-tree.h (struct cp_language_function): Remove
13087 x_scope_stmt_stack and name_declared.
13088 (current_scope_stmt_stack): Remove.
13089 (function_name_declared_p): New macro.
13090 (struct lang_decl_flags): Use c_lang_decl as a base class.
13091 (context): Remove.
13092 (struct lang_decl): Replace saved_tree with context.
13093 (DECL_FRIEND_CONTEXT): Adjust accordingly.
13094 (SET_DECL_FRIEND_CONTEXT): Likewise.
13095 (DECL_VIRTUAL_CONTEXT): Likewise.
13096 (DECL_SAVED_TREE): Remove.
13097 (C_DECLARED_LABEL_FLAG): Likewise.
13098 (cplus_expand_expr_stmt): Don't declare.
13099 (add_decl_stmt): Likewise.
13100 (add_scope_stmt): Likewise.
13101 * decl.c (mark_stmt_tree): Remove.
13102 (case_compare): Likewise.
13103 (finish_case_label): Use c_add_case_label.
13104 (init_decl_processing): Set more language-specific hooks.
13105 (build_enumerator): Fix typo in comment.
13106 (cplus_expand_expr_stmt): Remove.
13107 (mark_lang_function): Use mark_c_language_function.
13108 (lang_mark_tree): Use c_mark_lang_decl.
13109 * decl2.c: Change order of inclusion.
13110 * except.c: Likewise.
13111 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
13112 back on c_expand_expr.
13113 * friend.c: Include expr.h.
13114 * init.c: Change order of inclusion.
13115 * Makefile.in: Update dependencies.
13116 * lex.h (free_lang_decl_chain): Remove.
13117 * optimize.c (maybe_clone_body): Use function_name_declared_p.
13118 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13119 it doesn't exist.
13120 (instantiate_decl): Use function_name_declared_p.
13121 * semantics.c (lang_expand_expr_stmt): Remove.
13122 (set_current_function_name_declared): Likewise.
13123 (current_function_name_declared): Likewise.
13124 (begin_compound_stmt): Use function_name_declared_p.
13125 (add_decl_stmt): Remove.
13126 (setup_vtbl_ptr): Use function_name_declared_p.
13127 (add_scope_stmt): Remove.
13128 (current_scope_stmt_stack): New function.
13129 (cp_expand_stmt): Don't handle SCOPE_STMTs.
13130 (expand_body): Use function_name_declared_p.
13131 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13132 * typeck.c: Change order of includes.
13133 (convert_sequence): Remove.
bb20cc46 13134
d9dbd9b1
JM
131352000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
13136
13137 * lex.c (reswords): Add _Complex.
13138
d2a6f3c0 131392000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9985f210
RK
13140
13141 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13142
f903ebb1
DA
131432000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
13144
13145 * init.c (begin_init_stmts): Don't use // comments.
13146
f2ae0c45
JM
131472000-09-12 Jason Merrill <jason@redhat.com>
13148
13149 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13150 all non-extern arrays.
13151
13152 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13153 typenames, too. Downgrade complaint to pedwarn.
13154 (xref_tag): Warn about surprising behavior of 'friend struct T'.
13155 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13156 'class This::Inherited'.
13157
71ad4a16
MM
131582000-09-12 Mark Mitchell <mark@codesourcery.com>
13159
13160 * decl.c (finish_case_label): Given the LABEL_DECL a
13161 DECL_CONTEXT.
13162
c3e76028
GDR
131632000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
13164
13165 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13166 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13167 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13168 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13169 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13170 New macros.
13171 (sorry_for_unsupported_tree, print_scope_operator,
13172 print_left_paren, print_right_paren, print_left_bracket,
13173 print_right_bracket, print_whitespace): Likewise.
13174 (aggr_variety): Rename to class_key_or_enum.
13175 (print_type): Rename to print_type_id.
13176 (print_type_specifier_seq, print_simple_type_specifier,
13177 print_elaborated_type_specifier,
13178 print_rest_of_abstract_declarator,
13179 print_parameter_declaration_clause, print_exception_specification,
13180 print_nested_name_specifier, print_template_id,
13181 typedef_original_name, print_template_argument_list_start,
13182 print_template_argument_list_end): New functions.
13183
eb50138b
GDR
131842000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
13185
a8a05998 13186 * ir.texi: Add more documentation.
eb50138b 13187
f444e36b
MM
131882000-09-11 Mark Mitchell <mark@codesourcery.com>
13189
13190 * cp-tree.h (struct saved_scope): Remove x_function_parms.
13191 (current_function_parms): Don't define.
13192 (struct cp_language_function): Remove parms_stored.
13193 (current_function_just_assigned_this): Don't define.
13194 (current_function_parms_stored): Likewise.
13195 (static_ctors): Declare.
13196 (static_dtors): Likewise.
13197 (SF_EXPAND): Don't define.
13198 (expand_start_early_try_stmts): Remove declaration.
13199 (store_parm_decls): Likewise.
13200 * decl.c (static_ctors): Don't declare.
13201 (static_dtors): Likewise.
13202 (struct binding_level): Remove this_block.
13203 (poplevel): Remove dead code.
13204 (set_block): Likewise.
13205 (mark_binding_level): Don't mark this_block.
13206 (mark_saved_scope): Don't mark x_function_parms.
13207 (init_decl_processing): Don't add current_function_parms as a GC
13208 root.
13209 (check_function_type): Change prototype.
13210 (start_function): Remove RTL-generation code.
13211 (expand_start_early_try_stmts): Remove.
13212 (store_parm_decls): Give it internal linkage. Remove
13213 RTL-generation code.
13214 (finish_function): Remove RTL-generation code.
13215 * decl2.c (static_ctors): Fix formatting.
13216 (static_dtors): Likewise.
13217 * method.c (use_thunk): Don't call store_parm_decls.
13218 (synthesize_method): Likewise.
13219 * optimize.c (maybe_clone_body): Likewise.
13220 * parse.y (fn.def2): Likewise.
13221 (.set_base_init): Likewise.
13222 (nodecls): Likewise.
13223 * pt.c (instantiate_decl): Likewise.
13224 * rtti.c (synthesize_tinfo_fn): Likewise.
13225 * semantics.c (genrtl_try_block): Simplify.
13226 (expand_body): Use genrtl_start_function and
13227 genrtl_finish_function.
13228 (genrtl_start_function): New function.
13229 (genrtl_finish_function): Likewise.
13230
181d2ba0
NS
132312000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13232
13233 * error.c (cp_tree_printer, case 'P'): Append break.
13234
f2d71db6
NS
132352000-09-11 Nathan Sidwell <nathan@codesourcery.com>
13236
13237 * cp-tree.h (frob_opname): Declare.
13238 * parse.y (saved_scopes): New static variable.
13239 (cp_parse_init): Adjust.
13240 (do_id): If lastiddecl is NULL, do do_identifier.
13241 (operator): Save scope information.
aca77bd1 13242 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
13243 (operator_name): Append unoperator. Call frob_opname.
13244 * spew.c (frob_opname): Define.
13245
d8ea8f28
ZW
132462000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13247
13248 * decl.c, rtti.c: Include defaults.h if not already included.
13249 Don't define the *_TYPE_SIZE macros.
13250
56cb9733
MM
132512000-09-09 Mark Mitchell <mark@codesourcery.com>
13252
13253 * cp-tree.h (push_switch): Change prototype.
13254 (check_cp_case_value): Remove declaration.
13255 (decl_constant_value): Likewise.
13256 * decl.c (struct cp_switch): Add switch_stmt and cases.
13257 (case_compare): New function.
13258 (push_switch): Set switch_stmt. Initialize cases.
13259 (pop_switch): Clean up cases.
13260 (define_case_label): Rename to ...
13261 (finish_case_label): ... this. Do semantic analysis for case
13262 labels here.
13263 (start_function): Correct comment.
13264 * decl2.c (check_cp_case_value): Remove.
13265 * expr.c (do_case): Remove.
13266 * pt.c (tsubst_expr): Adjust call to finish_case_label.
13267 * semantics.c (genrtl_do_poplevel): Remove declaration.
13268 (RECHAIN_STMTS): Remove.
13269 (finish_break_stmt): Use build_break_stmt.
13270 (finish_continue_stmt): Use build_continue_stmt.
13271 (finish_switch_cond): Adjust condition here, rater than in
13272 c_expand_start_case.
13273 (finish_case_label): Remove.
13274 * typeck.c (c_expand_return): Remove.
13275 (c_expand_start_case): Likewise.
bb20cc46 13276
990a9693
GDR
132772000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
13278
13279 * ir.texi: Document type nodes.
13280
ae499cce
MM
132812000-09-06 Mark Mitchell <mark@codesourcery.com>
13282
54f7877c
MM
13283 * cp-tree.h (init_cp_semantics): Declare.
13284 (genrtl_try_block): Don't declare.
13285 (genrtl_handler): Likewise.
13286 (genrtl_catch_block): Likewise.
13287 (genrtl_ctor_stmt): Likewise.
13288 (genrtl_subobject): Likewise.
13289 (genrtl_do_poplevel): Likewise.
13290 (genrtl_named_return_value): Likewise.
13291 * lex.c (init_parse): Call init_cp_semantics.
13292 * semantics.c (genrtl_try_block): Give it internal linkage.
13293 (genrtl_handler): Likewise.
13294 (genrtl_catch_block): Likewise.
13295 (genrtl_ctor_stmt): Likewise.
13296 (genrtl_subobject): Likewise.
13297 (genrtl_do_poplevel): Likewise.
13298 (genrtl_named_return_value): Likewise.
13299 (lang_expand_stmt): Rename to ...
13300 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
13301 (init_cp_semantics): Define.
13302
3a0d3e1e
MM
13303 * decl.c (initialize_local_var): Remove RTL-generating code.
13304 * semantics.c (genrtl_try_block): Fix formatting.
13305
ae499cce
MM
13306 Move statement-tree facilities from C++ to C front-end.
13307 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
13308 (void_zero_node): Remove.
13309 (stmt_tree): Likewise.
13310 (scope_chain): Adjust.
13311 (language_function): Rename to cp_language_function.
13312 (cp_function_chain): Adjust.
13313 (current_stmt_tree): Remove.
13314 (last_tree): Likewise.
13315 (last_expr_type): Likewise.
13316 (struct lang_decl): Adjust.
13317 (STMT_IS_FULL_EXPR_P): Remove.
13318 (add_tree): Remove.
13319 (begin_stmt_tree): Likewise.
13320 (finish_stmt_tree): Likewise.
13321 (walk_tree_fn): Likewise.
13322 (walk_stmt_tree): Likewise.
13323 * class.c (finish_struct): Replace use of add_tree with add_stmt.
13324 * decl.c (mark_stmt_tree): Adjust type.
13325 (init_decl_processing): Don't build void_zero_node.
13326 (initialize_local_var): Adjust usage of current_stmt_tree.
13327 (finish_enum): Use add_stmt, not add_tree.
13328 (save_function_data): Adjust use of language_function.
13329 (finish_constructor_body): Use add_stmt, not add_tree.
13330 (finish_destructor_body): Likewise.
13331 (push_cp_function_context): Adjust use of language_function.
13332 (pop_cp_function_context): Likewise.
13333 (mark_lang_function): Likewise.
13334 (mark_cp_function_context): Likewise.
13335 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
13336 (build_vec_init): Likewise.
13337 * semantics.c (SET_LAST_STMT): Remove.
13338 (RECHAIN_STMTS): Don't use it.
13339 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
13340 (current_stmt_tree): Define.
13341 (add_tree): Remove.
13342 (finish_goto_stmt): Use add_stmt, not add_tree.
13343 (finish_expr_stmt): Likewise.
13344 (begin_if_stmt): Likewise.
13345 (finish_then_clause): Likewise.
13346 (begin_while_stmt): Likewise.
13347 (begin_do_stmt): Likewise.
13348 (finish_return_stmt): Likewise.
13349 (begin_for_stmt): Likewise.
13350 (finish_break_stmt): Likewise.
13351 (finish_continue_stmt): Likewise.
13352 (begin_switch_stmt): Likewise.
13353 (finish_case_label): Likewise.
13354 (begin_try_block): Likewise.
13355 (begin_function_try_block): Likewise.
13356 (begin_handler): Likewise.
13357 (begin_catch_block): Likewise.
13358 (begin_compound_stmt): Likewise.
13359 (begin_asm_stmt): Likewise.
13360 (finish_asm_stmt): Likewise.
13361 (finish_label_stmt): Likewise.
13362 (add_decl_stmt): Likewise.
13363 (finish_subobject): Likewise.
13364 (finish_decl_cleanup): Likewise.
13365 (finish_named_return_value): Likewise.
13366 (setup_vtbl_ptr): Likewise.
13367 (add_scope_stmt): Likewise.
13368 (finish_stmt_expr): Likewise.
13369 (prune_unused_decls): Remove.
13370 (begin_stmt_tree): Likewise.
13371 (finish_stmt_tree): Likewise.
13372 (prep_stmt): Adjust use of current_stmt_tree.
13373 (lang_expand_stmt): Likewise.
13374 * tree.c (statement_code_p): Remove.
13375 (cp_statement_code_p): New function.
13376 (walk_stmt_tree): Remove.
13377 (init_tree): Set lang_statement_code_p.
bb20cc46 13378
0e5921e8
ZW
133792000-09-06 Zack Weinberg <zack@wolery.cumb.org>
13380
13381 Integrated preprocessor.
13382
13383 * Make-lang.in, Makefile.in: Remove all references to input.c,
13384 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
13385 * gxx.gperf, hash.h, input.c: Delete.
13386 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
13387 initialized properly.
13388
13389 * class.c (fixup_pending_inline): Take a tree, not a
13390 struct pending_inline *. All callers changed.
13391 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
13392 RID_PROTECTED entries in ridpointers[] array here.
13393 * decl.c (duplicate_decls): Do not refer to struct
13394 pending_inline.
13395 (record_builtin_type, init_decl_processing): Use RID_MAX not
13396 CP_RID_MAX.
13397 (grokdeclarator): Use C_IS_RESERVED_WORD.
13398 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
13399 cpplib.
13400 (grok_x_components): Do not inspect pending_inlines chain.
13401
13402 * cp-tree.h (struct lang_identifier): Add rid_code entry.
13403 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
13404 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
13405 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
13406 TIME_IDENTIFIER_FILEINFO): Kill.
13407 Update prototypes.
13408 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
13409 single 32-bit word.
13410 * parse.y: Call do_pending_inlines unconditionally.
13411 reinit_parse_for_method is now snarf_method. fn.defpen is no
13412 longer necessary. Remove unnecessary <itype> annotation on
13413 SCOPE. Do not refer to end_of_file or struct pending_inline.
13414 * semantics.c (begin_inline_definitions): Call
13415 do_pending_inlines unconditionally.
13416
13417 * lex.c: Remove all code now shared with C front end.
13418 Initialize cpplib properly if USE_CPPLIB. Put reserved words
13419 into the get_identifier table. Rewrite pragma handling to
13420 work with the registry. Move code to save tokens for later
13421 processing to spew.c.
13422
13423 * spew.c: Rewrite everything in terms of token streams instead
13424 of text. Move routines here from lex.c / input.c as
13425 appropriate. GC-mark trees hanging off the pending inlines
13426 chain.
13427
44835fdd
MM
134282000-09-06 Mark Mitchell <mark@codesourcery.com>
13429
13430 * NEWS: Mention that the named return value extension has been
13431 deprecated.
13432 * cp-tree.h (original_result_rtx): Define.
13433 (TREE_REFERENCE_EXPR): Remove.
13434 (DECL_VPARENT): Likewise.
13435 (pushdecl_nonclass_level): Likewise.
13436 (store_return_init): Likewise.
13437 (reinit_lang_specific): Likewise.
13438 (genrtl_named_return_value): Change prototype.
13439 * decl.c (original_result_rtx): Remove.
13440 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
13441 Do not generate RTL for local variables here.
13442 (store_return_init): Remove.
13443 * semantics.c (genrtl_named_return_value): Simplify. Fold in
13444 store_return_init.
13445 (finish_named_return_value): Adjust accordingly. Warn that this
13446 extension is deprecated.
13447 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
13448
d7c4edd0
NS
134492000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13450
13451 * pt.c (type_unification_real): Replace switch with if.
13452 (unify): Tsubst non-type parms before comparing.
13453
46e2747c
NS
134542000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13455
13456 * error.c (dump_typename): New function, broken out of ...
13457 (dump_type): ... here. Use it.
13458 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
13459
c833d2be
NS
134602000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13461
13462 * init.c (build_offset_ref): Deal with namespace scoped
13463 TEMPLATE_ID_EXPRs.
13464
b1ce3eb2
NS
134652000-09-06 Nathan Sidwell <nathan@codesourcery.com>
13466
13467 * class.c (resolve_address_of_overloaded_function): Add
13468 explanation message.
13469 * decl.c (define_case_label): Reformat explanation.
13470 * decl2.c (finish_static_data_member_decl): Likewise.
13471 (grokfield): Likewise.
13472 * friend.c (do_friend): Likewise.
13473
11f53b6a
ZW
134742000-09-05 Zack Weinberg <zack@wolery.cumb.org>
13475
13476 * tree.c (walk_tree): Expose tail recursion.
13477 (walk_stmt_tree): New function.
13478 * cp-tree.h: Prototype walk_stmt_tree.
13479 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
13480 the BLOCKs directly. If a BLOCK has no variables after
13481 pruning, discard it.
13482 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
13483 restore the line number.
13484
ee94fce6
MM
134852000-09-05 Mark Mitchell <mark@codesourcery.com>
13486
13487 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
13488 (pt.o): Remove dependency on HTAB_H.
13489 * cp-tree.h: Include hashtab.h.
13490 (walk_tree): Change prototype.
13491 (walk_tree_without_duplicates): New function.
13492 * decl.c (check_default_argument): Use it.
13493 * optimize.c (remap_decl): Adjust calls to walk_tree.
13494 (copy_body): Likewise.
13495 (expand_calls_inline): Likewise.
13496 (calls_setjmp_p): Use walk_tree_without_duplicates.
13497 * pt.c: Don't include hashtab.h.
13498 (for_each_template_parm): Use walk_tree_without_duplicates.
13499 * semantics.c (finish-stmt_tree): Likewise.
13500 (expand_body): Likewise.
13501 * tree.c (walk_tree): Add additional parameter.
13502 (walk_tree_without_duplicates): New function.
13503 (count_trees): Use it.
13504 (verify_stmt_tree): Adjust call to walk_tree.
13505 (find_tree): Use walk_tree_without_duplicates.
13506 (no_linkage_check): Likewise.
13507 (break_out_target_exprs): Adjust call to walk_tree.
13508 (cp_unsave): Likewise.
13509
a1281f45
KL
135102000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13511
13512 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
13513 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13514 * cp-tree.h (TYPE_BINFO): Adjust comment.
13515 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
13516 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13517 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13518 (TYPE_TEMPLATE_INFO): Likewise.
13519 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
13520 * class.c (push_nested_class): Likewise.
13521 * decl.c (lookup_name_real): Likewise.
13522 (grokdeclarator): Likewise.
13523 (grok_op_properties): Likewise.
13524 (xref_tag): Likewise.
13525 (xref_basetypes): Likewise.
13526 * decl2.c (constructor_name_full): Likewise.
13527 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
13528 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
13529 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
13530 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13531 (dump_type_suffix): Likewise.
13532 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
13533 instead.
13534 (get_aggr_from_typedef): Likewise.
13535 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
13536 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13537 (write_template_parm): Likewise.
13538 (write_template_template_parm): Check tree code instead of
13539 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 13540 * method.c (build_overload_nested_name): Add
a1281f45
KL
13541 BOUND_TEMPLATE_TEMPLATE_PARM.
13542 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
13543 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13544 * pt.c (convert_template_argument): Check tree code instead of
13545 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13546 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
13547 (for_each_template_parm): Adjust comment.
13548 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
13549 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13550 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
13551 template_args_equal to compare template template parameter cases.
13552 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13553 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
13554 instead.
13555 * tree.c (copy_template_template_parm): Decide whether to create
13556 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
13557 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
13558 (copy_tree_r): Likewise.
13559 * typeck.c (comptypes): Likewise. Check tree code instead of
13560 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
13561
c9672d45
ME
135622000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
13563
13564 * decl.c (finish_function): Move the code for handling functions
13565 marked with the constructor and destructor attributes inside the
13566 expand_p block.
13567
67804825
NS
135682000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13569
13570 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
13571
1bc0793e
NS
135722000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13573
13574 * pt.c (lookup_template_class): Remove abort.
13575 * tree.c (get_type_decl): Allow error_mark_node.
13576
3338663b
NS
135772000-09-04 Nathan Sidwell <nathan@codesourcery.com>
13578
13579 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
13580 TEMPLATE_ID_EXPRs.
13581
1b84dc37
MM
135822000-09-03 Mark Mitchell <mark@codesourcery.com>
13583
13584 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 13585 new ABI mangling.
1b84dc37 13586
9687f8f4
NS
135872000-09-01 Nathan Sidwell <nathan@codesourcery.com>
13588
13589 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 13590 union tag mismatch error reporting.
9687f8f4 13591
4f8025eb
NS
135922000-09-01 Nathan Sidwell <nathan@codesourcery.com>
13593
c9672d45 13594 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 13595
495d26d6
JM
135962000-08-30 Jason Merrill <jason@redhat.com>
13597
13598 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
13599
13600 * tree.c (bot_manip): Check TREE_CONSTANT rather than
13601 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
13602 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
13603
13604 * decl.c (start_function): Always call make_function_rtl.
13605
7efcf466
ZW
136062000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13607
495d26d6 13608 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
13609 (finish_stmt_tree): Call it via walk_tree.
13610
63ad61ed
ZW
136112000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13612
13613 * class.c (build_secondary_vtable): Constify a char *.
13614 * decl.c (init_decl_processing): Initialize function_id_node,
13615 pretty_function_id_node, and func_id_node.
13616 * input.c (struct input_source): Constify 'str'.
13617 (feed_input): Constify first argument.
13618 * mangle.c (write_identifier): Constify argument.
13619 * pt.c (mangle_class_name_for_template): Constify argument.
13620
4361b41d
MM
136212000-08-29 Mark Mitchell <mark@codesourcery.com>
13622
13623 * typeck.c (mark_addressable): Remove code that pokes around in
13624 RTL.
13625
881c6935
JM
136262000-08-28 Jason Merrill <jason@redhat.com>
13627
13628 * lex.c (file_name_nondirectory): Move to toplev.c.
13629
13630 * cp-tree.h (LOCAL_CLASS_P): New macro.
13631 * class.c (finish_struct_1): Use it.
13632
f0f33848
AS
136332000-08-27 Alex Samuel <samuel@codesourcery.com>
13634
13635 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
13636 (write_encoding): Pass another argument to write_name.
13637 (write_name): Add ignore_local_scope parameter. Fix handling of
13638 local names.
13639 (write_nested_name): Use write_unqualified_name.
13640 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
13641 (write_template_prefix): Use write_unqualified_name.
13642 (write_component): Remove.
13643 (write_local_name): Add parameter. Use direct local entity to
13644 discriminator calculation.
0e5921e8 13645 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
13646 (write_template_template_arg): Likewise.
13647 (make_guard_variable): Likewise.
0e5921e8 13648
94dfccd1
JM
136492000-08-27 Jason Merrill <jason@redhat.com>
13650
13651 * decl.c (pushdecl): Matching decls for local externs are found in
13652 the current level. Propagate linkage information from previous
13653 declarations.
13654
14fdf4b6
GDR
136552000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
13656
13657 * ir.texi (Expressions): Fix typo.
13658
b5232c64
GM
136592000-08-25 Greg McGary <greg@mcgary.org>
13660
13661 * tree.c (init_tree): Use ARRAY_SIZE.
13662
22a4158c
GDR
136632000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
13664
13665 * error.c (cp_tree_printer): Rework.
13666
f22967f3
MM
136672000-08-25 Mark Mitchell <mark@codesourcery.com>
13668
a0c182fe
MM
13669 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
13670 dyn-string.o.
13671 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
13672 (cp-demangle.o): Remove target.
13673 (dyn-string.o): Likewise.
13674
f22967f3
MM
13675 * decl.c (grokfndecl): Require that `main' return an `int'.
13676 * mangle.c (write_encoding): Don't mangle return types for
13677 conversion functions.
13678
a1066c99
GDR
136792000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
13680
13681 * error.c (tree_formatting_info): New data type.
13682 (tree_being_formatted): New macro.
13683 (tree_formatting_flags): Likewise.
13684 (put_whitespace): Likewise.
13685 (print_tree_identifier): Likewise.
13686 (print_identifier): Likewise.
13687 (cp_tree_printer, print_function_argument_list, print_declaration,
13688 print_expression, print_function_declaration,
13689 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 13690 functions.
a1066c99
GDR
13691 (init_error): Initialize lang_printer.
13692
3f2b640a
JM
136932000-08-24 Jason Merrill <jason@redhat.com>
13694
13695 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
13696 adjustment necessary.
13697
7ec09bf7
GM
136982000-08-24 Greg McGary <greg@mcgary.org>
13699
13700 * cp-tree.h (MAIN_NAME_P): Remove macro.
13701
2ab99c46
GDR
137022000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
13703
13704 * error.c (print_instantiation_context): Don't forget to flush the
13705 buffer.
13706
7def1251
JM
137072000-08-23 Jason Merrill <jason@redhat.com>
13708
13709 * typeck.c (build_ptrmemfunc): Save the input pmf.
13710
13711 * method.c (process_modifiers): Use same_type_p.
13712
94350948
MM
137132000-08-23 Mark Mitchell <mark@codesourcery.com>
13714
13715 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
13716 * mangle.c (write_function_type): Change prototype.
13717 (write_encoding): Don't mangle return types for
13718 constructors or destructors.
13719 (write_type): Adjust call to write_function_type.
13720 * pt.c (instantiate_template): Instantiate alternate entry points
13721 when instantiating the main function.
0e5921e8 13722
a64e7329
GDR
137232000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
13724
13725 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 13726 output_printf.
a64e7329 13727
a72462a4
GDR
137282000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
13729
13730 * decl.c (init_decl_processing): Remove bogus initialization.
13731 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
13732 (init_error): Initialize print_error_function.
13733
3add6264
TP
137342000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13735
13736 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
13737
cb753e49
GDR
137382000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
13739
13740 * Makefile.in (error.o): Depends on diagnostic.h
13741
13742 * cp-tree.h (problematic_instantiation_changed,
13743 record_last_problematic_instantiation, current_instantiation,
13744 print_instantiation_context): Declare.
13745 (maybe_print_template_context): Remove.
13746
13747 * decl.c (init_decl_processing): Set print_error_function to NULL.
13748 (lang_print_error_function): Remove, since we're using a new
13749 machinery.
13750
13751 * error.c: #include diagnostic.h
13752 (function_category): New function.
13753 (cp_diagnostic_starter): Likewise.
13754 (cp_diagnostic_finalizer): Likewise.
13755 (cp_print_error_function): Likewise.
13756 (maybe_print_instantiation_context): Likewise.
13757 (print_instantiation_full_context): Likewise.
13758 (print_instantiation_partial_context): Likewise.
13759 (print_instantiation_context): Define.
13760 (init_error): Initialize diagnostic pager and finalizer.
13761
13762 * pt.c (problematic_instantiation_changed): Define.
13763 (record_last_problematic_instantiation): Likewise.
13764 (current_instantiation): Likewise.
13765 (maybe_print_template_context): Remove.
13766 (print_template_context): Likewise.
13767 (current_tinst_level): Make static to reflect Brendan Kehoe's
13768 change of 1995-04-13.
0e5921e8
ZW
13769 (push_tinst_level): Call print_instantiation_context.
13770
05a3d06e 137712000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 13772
05a3d06e
N
13773 * lang-specs.h: Do not process -o or run the assembler if
13774 -fsyntax-only.
13775
93e2382f
JM
137762000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
13777
13778 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
13779 variables.
13780 * decl2.c (lang_decode_option): Disable gettext attributes for
13781 -ansi.
13782
24805e80
GDR
137832000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
13784
13785 * lex.c (lang_init_options): Default diagnostic message maximum
13786 length to 80, when line-wrapping.
13787
b485e15b
MM
137882000-08-20 Mark Mitchell <mark@codesourcery.com>
13789
13790 * class.c (build_vtbl_initializer): Clear the entire
13791 vtbl_init_data. Start keeping track of the functions for which we
13792 have created vcall offsets here.
13793 (dfs_build_vcall_offset_vtbl_entries): Remove.
13794 (build_vcall_offset_vtbl_entries): Reimplement.
13795 (add_vcall_offset_vtbl_entries_r): New function.
13796 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
13797 computing when vcall offsets are necessary.
13798
2ae7bada
NS
137992000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13800
13801 * decl.c (member_function_or_else): Use cp_error ... %T.
13802 (grokdeclarator): Likewise.
13803 (start_method): Likewise.
0e5921e8 13804 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 13805
7a8b1375
NS
138062000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13807
13808 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 13809 TYPE_DECLs.
7a8b1375 13810
19420d00
NS
138112000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13812
13813 * cp-tree.h (PTRMEM_OK_P): New macro.
13814 (itf_ptrmem_ok): New enumeration value.
13815 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
13816 argument. Diagnose implicit pointer to member.
13817 (instantiate_type): Don't diagnose implicit pointer to member
13818 here. Pass itf_ptrmem_ok if ok. Adjust calls to
13819 resolve_address_of_overloaded_function.
13820 * init.c (build_offset_ref): Set PTRMEM_OK_P.
13821 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
13822 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
13823 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
13824 (build_unary_op): Deal with single non-static member in
13825 microsoft-land.
13826
66081283
NS
138272000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13828
13829 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
13830
fa40aa12
NS
138312000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13832
13833 * cp-tree.h (enum_name_string): Remove prototype.
13834 (report_case_error): Remove prototype.
13835 * cp/typeck2.c (enum_name_string): Remove.
13836 (report_case_error): Remove.
13837 * error.c (dump_expr): Deal with enum values directly.
13838 Correctly negate integer constant.
13839
d13b34e9
NS
138402000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13841
13842 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
13843 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
13844 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
13845 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
13846 (__cxa_vec_new): Use __cxa_vec_new2.
13847 (__cxa_vec_delete): Use __cxa_vec_delete2.
13848
2f1b80af
NS
138492000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13850
13851 * vec.cc (__cxa_vec_new): Set "C" linkage.
13852 (__cxa_vec_ctor): Likewise.
13853 (__cxa_vec_cctor): Likewise.
13854 (__cxa_vec_dtor): Likewise.
13855 (__cxa_vec_delete): Likewise.
13856 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13857 (__cxa_vec_ctor): Likewise.
13858 (__cxa_vec_cctor): Likewise.
13859 (__cxa_vec_dtor): Likewise.
13860 (__cxa_vec_delete): Likewise.
13861
105d8e1f
NS
138622000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13863
13864 * class.c (instantiate_type): Reinstate local variable
13865 deleted in previous change.
0e5921e8 13866
f1819d9a
NS
13867 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13868 itf_no_attributes.
105d8e1f 13869
5e76004e
NS
138702000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13871
13872 * cp-tree.h (instantiate_type_flags): New enumeration.
13873 (instantiate_type): Change parameter.
13874 * class.c (instantiate_type): Adjust prototype. Adjust.
13875 * call.c (standard_conversion): Adjust instantiate_type call.
13876 (reference_binding): Likewise.
13877 (build_op_delete_call): Likewise.
13878 (convert_like_real): Likewise.
13879 * cvt.c (cp_convert_to_pointer): Likewise.
13880 (convert_to_reference): Likewise.
13881 * pt.c (convert_nontype_argument): Likewise.
13882 * typeck.c (build_binary_op): Likewise.
13883 (build_ptrmemfunc): Likewise.
13884 (convert_for_assignment): Likewise.
13885
4b054b80
NS
138862000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13887
13888 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13889 (current_aggr): Define.
13890 * decl.c (grokdeclarator): Make sure a friend class is an
13891 elaborated type specifier.
13892 * parse.y (current_aggr): Remove static definition.
13893 (cp_parse_init): Adjust.
13894 (structsp): Clear and restore current_aggr.
13895 (component_decl_list): Clear current_aggr.
0e5921e8 13896
4b054b80
NS
13897 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13898 aggregate tag on the typename's context.
0e5921e8 13899
321cba97
NS
13900 * pt.c (tsubst_friend_class): Return error_mark_node, if
13901 parms becomes NULL.
13902 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 13903
08aead78
NS
139042000-08-14 Nathan Sidwell <nathan@codesourcery.com>
13905
13906 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 13907 (convert_to_reference): ... here. Use it.
08aead78 13908
fa1f3ebc
KL
139092000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13910
13911 * parse.y (template_arg): Add rule for template qualified with
13912 global scope.
13913
9845b52b
TP
139142000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13915
13916 * decl2.c (add_function): Reorganize.
13917 (arg_assoc): Do not consider function template decls.
13918
e69c8072
JM
139192000-08-11 Jason Merrill <jason@redhat.com>
13920
13921 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13922 looking inside.
13923
5c1e5476
NS
139242000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13925
13926 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13927 (lookup_nested_tag): Likewise.
0e5921e8 13928
5c1e5476
NS
13929 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13930 can be produced.
13931
5426aa7f
NS
139322000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13933
13934 * parse.y (named_complex_class_head_sans_basetype): Remove
13935 always true if.
13936
fd037e0d
NS
139372000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13938
13939 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13940 explicit TEMPLATE_ID_EXPR args.
13941 (build_expr_from_tree, case CALL_EXPR): Likewise.
13942
73ae5c34
NS
139432000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13944
13945 * decl.c (check_tag_decl): Diagnose typename's which don't
13946 declare anything.
13947
aa54df09
NS
139482000-08-10 Nathan Sidwell <nathan@codesourcery.com>
13949
13950 * init.c (build_aggr_init): Reject bogus array initializers
13951 early.
13952
7e8dad18
NS
139532000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13954
13955 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13956 runtime.
13957 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 13958 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 13959
0f586b9b
NS
139602000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13961
13962 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 13963 attempting to cast from ambiguous base.
0f586b9b 13964
08e72a19
JM
139652000-08-08 Jason Merrill <jason@redhat.com>
13966
13967 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13968 (tsubst_template_arg_vector): Likewise.
13969
13970 * decl2.c (build_anon_union_vars): Choose the largest field; don't
13971 assume that one will be as large as the union.
13972
0811ea8f
KH
139732000-08-07 Kazu Hirata <kazu@hxi.com>
13974
13975 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13976 * decl.c (pop_labels): Likewise.
13977
f9fcf62b
JO
139782000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
13979
13980 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13981 specifications.
13982 (__pointer_to_member_type_info): Likewise.
13983 (__base_class_info): Likewise.
13984 (__class_type_info): Likewise.
13985 (__si_class_type_info): Likewise.
13986 (__vmi_class_type_info): Likewise.
13987 * tinfo.cc (__si_class_type_info::__do_find_public_src):
13988 Changed member names to match specifications.
13989 (__vmi_class_type_info::__do_find_public_src): Likewise.
13990 (__si_class_type_info::__do_dyncast): Likewise.
13991 (__vmi_class_type_info::__do_dyncast): Likewise.
13992 (__si_class_type_info::__do_upcast): Likewise.
13993 (__vmi_class_type_info::__do_upcast): Likewise.
13994 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13995 (__pbase_type_info::__pointer_catch): Likewise.
13996 (__pointer_type_info::__pointer_catch): Likewise.
13997 (__pointer_to_member_type_info::__pointer_catch): Likewise.
13998
a36556a8
ZW
139992000-08-04 Zack Weinberg <zack@wolery.cumb.org>
14000
0e5921e8
ZW
14001 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14002 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14003 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 14004
452a394b
MM
140052000-08-04 Mark Mitchell <mark@codesourcery.com>
14006
14007 * cp-tree.h (add_method): Change prototype.
14008 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
14009 Don't double the size of the method vector in the error case.
14010 (handle_using_decl): Adjust call to add_method.
14011 (add_implicitly_declared_members): Likewise.
14012 (clone_function_decl): Likewise.
14013 * decl2.c (check_classfn): Likewise.
14014 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 14015
b8458e3e
JM
140162000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
14017
14018 * decl.c (flag_isoc94): New variable.
14019
a1bcc528
JM
140202000-08-02 Jason Merrill <jason@redhat.com>
14021
14022 * pt.c (do_type_instantiation): Add complain parm; don't complain
14023 if called recursively.
14024 * cp-tree.h, parse.y: Adjust.
14025
50e60bc3
ZW
140262000-08-02 Zack Weinberg <zack@wolery.cumb.org>
14027
eae51189
ZW
14028 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14029 -Wno-strict-prototypes.
14030
37620334
ZW
14031 * g++spec.c: Adjust type of second argument to
14032 lang_specific_driver, and update code as necessary.
14033
50e60bc3
ZW
14034 * cp-tree.h: Don't prototype min_precision here.
14035 (my_friendly_assert): Cast expression to void.
14036 * semantics.c (do_poplevel): Initialize scope_stmts.
14037
3f954fc3
MM
140382000-08-02 Mark Mitchell <mark@codesourcery.com>
14039
14040 * cp-tree.h (DECL_NEEDED_P): Tweak.
14041
ab4fa7ed
JM
140422000-07-28 Jason Merrill <jason@redhat.com>
14043
14044 * lang-specs.h: Use %i in rule for .ii files.
14045
4871239e
ZW
140462000-07-31 Zack Weinberg <zack@wolery.cumb.org>
14047
14048 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14049
911a71a7
MM
140502000-07-30 Mark Mitchell <mark@codesourcery.com>
14051
14052 Allow indirect primary bases.
14053 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
14054 primary_base.
14055 (CLASSTYPE_VFIELD_PARENT): Remove.
14056 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14057 (BINFO_PRIMARY_BINFO): Remove.
14058 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14059 (BINFO_VBASE_PRIMARY_P): Likewise.
14060 (BINFO_PRIMARY_BASE_OF): New macro.
14061 (BINFO_INDIRECT_PRIMARY_P): Likewise.
14062 (get_primary_binfo): New function.
14063 * decl.c (lang_mark_tree): Make lang_type::primary_base.
14064 * class.c (vcall_offset_data_s): Rename to ...
14065 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
14066 and add ctor_vtbl_p.
14067 (get_derived_offset): Use get_primary_binfo.
14068 (dfs_mark_primary_bases): Adjust handling of virtual primary
14069 bases.
14070 (mark_primary_bases): Likewise.
14071 (set_primary_base): Take a binfo, not an integer, as a
14072 representation of the primary base.
14073 (indirect_primary_base_p): Remove.
14074 (determine_primary_base): Adjust for indirect primary bases.
14075 (dfs_find_final_overrider): Fix typo in coment.
14076 (update_vtable_entry_for_fn): Use get_primary_binfo.
14077 (layout_nonempty_base_or_field): Tweak.
14078 (build_base_fields): Adjust for new primary base semantics.
14079 (dfs_propagate_binfo_offsets): Remove.
14080 (propagate_binfo_offsets): Rewrite.
14081 (dfs_set_offset_for_shared_vbases): Remove.
14082 (layout_virtual_bases): Don't use it.
14083 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14084 ABI.
14085 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14086 CLASSTYPE_VFIELD_PARENT.
14087 (dfs_get_primary_binfo): New function.
14088 (get_primary_binfo): Likewise.
14089 (dump_class_hierarchy_r): Tweak printing of primary bases.
14090 (build_vtbl_initializer): Fix typo in comments. Use
14091 vtbl_init_data.
14092 (build_vcall_and_vbase_vtbl_entries): Likewise.
14093 (build_vbaes_offset_vtbl_entries): Likewise.
14094 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14095 BV_VCALL_INDEX to handle indirect primary bases.
14096 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14097 (build_rtti_vtbl_entries): Likewise.
14098 * search.c (get_shared_vbase_if_not_primary): Tweak.
14099 (find_vbase_instance): Likewise.
14100 (binfo_for_vtable): Simplify.
14101 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14102 (make_binfo): Make it have 11 entries.
0e5921e8 14103
722bed0f
AS
141042000-07-30 Alex Samuel <samuel@codesourcery.com>
14105
14106 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14107 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14108 ascertaining primaryness.
14109 (G): Remove template_args.
14110 (decl_is_template_id): New function.
14111 (write_encoding): Use decl_is_template_id.
14112 (write_name): Likewise. Handle type_decls. Get main variant of
14113 type decls.
14114 (write_nested_name): Likewise.
14115 (write_prefix): Likewise.
14116 (write_template_prefix): Likewise.
14117 (write_special_name_constructor): Remove defunct production from
14118 comment.
14119 (write_bare_function_type): Remove comment about absent parameter.
14120 (write_template_template_arg): Add missing grammar production to
14121 comment.
14122
9076e292
JM
141232000-07-27 Jason Merrill <jason@redhat.com>
14124
14125 * decl.c (duplicate_decls): If common_type produces a non-typedef
14126 type for a typedef, just use the old type.
14127
b2244c65
MM
141282000-07-27 Mark Mitchell <mark@codesourcery.com>
14129
14130 * cp-tree.h (function_depth): Declare.
14131 (verify_stmt_tree): Likewise.
14132 (find_tree): Likewise.
14133 * decl.c (function_depth): Give it external linkage.
14134 * optimize.c (optimize_function): Increment and decrement it.
14135 * tree.c (verify_stmt_tree_r): New function.
14136 (verify_stmt_tree): Likewise.
14137 (find_tree_r): Likewise.
14138 (find_tree): Likewise.
14139
62e3bf54
JM
141402000-07-27 Jason Merrill <jason@redhat.com>
14141
9076e292
JM
14142 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14143 TYPE_PTRMEMFUNC_P.
14144 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 14145
5a728aca
MM
141462000-07-26 Mark Mitchell <mark@codesourcery.com>
14147
14148 * decl.c (start_cleanup_fn): Mark the function as `inline'.
14149 * decl2.c (get_guard): Call cp_finish_decl, not
14150 rest_of_decl_compilation, for local guards.
14151 * lex.c (do_identifier): Remove unused variable.
14152
d2a6f3c0 141532000-07-26 Marc Espie <espie@cvs.openbsd.org>
6a1fa5f9
ME
14154
14155 * parse.y: Add missing ';'.
14156
0c10a805
MM
141572000-07-26 Mark Mitchell <mark@codesourcery.com>
14158
14159 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14160 of `extern "C++"'.
14161
8b27e9ef
NS
141622000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14163
14164 Kill strict_prototype. Backwards compatibility only for
14165 non NO_IMPLICIT_EXTERN_C systems.
14166 * cp-tree.h (flag_strict_prototype): Remove.
14167 (strict_prototype): Remove.
14168 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14169 * decl.c (maybe_push_to_top_level): Adjust.
14170 (pop_from_top_level): Adjust.
14171 (decls_match): Only allow sloppy parm matching for ancient
14172 system headers.
14173 (init_decl_processing): Adjust.
14174 (grokdeclarator): Adjust.
14175 * decl2.c (flag_strict_prototype): Remove.
14176 (strict_prototype): Remove.
14177 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14178 (lang_f_options): Remove "strict-prototype".
14179 (unsupported-options): Add "strict-prototype".
14180 * lex.c (do_identifier): Adjust.
14181 (do_scoped_id): Adjust.
14182 * parse.y (empty_parms): Adjust.
14183 * class.c (push_lang_context): Adjust.
14184 (pop_lang_context): Adjust.
14185 * typeck.c (comp_target_parms): Adjust.
14186
c3783399
NS
141872000-07-25 Nathan Sidwell <nathan@codesourcery.com>
14188
14189 * decl.c (poplevel): Deal with anonymous variables at for scope.
14190 (maybe_inject_for_scope_var): Likewise.
14191
a7023245
ZW
141922000-07-25 Zack Weinberg <zack@wolery.cumb.org>
14193
14194 * decl.c: Remove all signal handling code, now done in toplev.c.
14195
95ee998c
MM
141962000-07-23 Mark Mitchell <mark@codesourcery.com>
14197
14198 * decl.c (make_rtl_for_nonlocal_decl): Rework.
14199
14200 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14201 correctly.
14202
1b493b81
ZW
142032000-07-20 Zack Weinberg <zack@wolery.cumb.org>
14204
14205 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14206 Define my_friendly_assert and my_friendly_abort as macros
14207 which may call friendly_abort. Prototype friendly abort, not
14208 my_friendly_abort or my_friendly_assert.
14209 * decl.c (signal_catch): Report the signal caught in the error
14210 message. Call fatal directly.
14211 * typeck2.c (ack, my_friendly_assert): Delete.
14212 (my_friendly_abort): Rename to friendly_abort. Expect file,
14213 line, and function parameters. Report the abort code, then
14214 call fancy_abort. Do not mask an abort if errors have
14215 already occurred.
14216
a306451c
NS
142172000-07-18 Nathan Sidwell <nathan@codesourcery.com>
14218
14219 * typeck.c (comp_target_parms): Remove obsolete parameter.
14220 (comp_target_types): Adjust.
14221
f49fad00
JM
142222000-07-17 Jason Merrill <jason@redhat.com>
14223
14224 * typeck.c (mark_addressable): Never set TREE_USED.
14225 * call.c (build_call): Don't abort on calls to library functions
14226 that have been declared normally.
14227
14228 * typeck.c (build_binary_op): Fix grammar in warning.
14229
14230 * exception.cc (__eh_free): Fix prototype.
14231
14232 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14233
0e5921e8 14234 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
14235 IDENTIFIER_NAMESPACE_VALUE.
14236
69690d98
MM
142372000-07-16 Mark Mitchell <mark@codesourcery.com>
14238
14239 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14240 * method.c (use_thunk): Correct handling of vcall offsets.
14241
bfbbc080
ZW
142422000-07-14 Zack Weinberg <zack@wolery.cumb.org>
14243
14244 * .cvsignore: parse.h and parse.c have no cp- prefix.
14245
83a90717
MM
142462000-07-13 Mark Mitchell <mark@codesourcery.com>
14247
14248 * .cvsignore: New file.
14249
ea414c97
ZW
142502000-07-13 Zack Weinberg <zack@wolery.cumb.org>
14251
14252 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
14253
792abd35
MM
142542000-07-12 Mark Mitchell <mark@codesourcery.com>
14255
14256 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14257 * parse.c: Remove.
14258 * parse.h: Likewise.
14259
72a50ab0
MM
142602000-07-11 Mark Mitchell <mark@codesourcery.com>
14261
14262 * class.c (layout_class_type): Add pointers to virtual bases after
14263 base classes under the old ABI.
14264
0dfdeca6
BC
142652000-07-10 Benjamin Chelf <chelf@codesourcery.com>
14266
14267 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14268 (finish_continue_stmt): Likewise.
14269 (begin_for_stmt): Remove call to note_level_for_for.
14270 (finish_goto_stmt): Change call from build_min_nt
14271 to build_stmt.
14272 (finish_expr_stmt): Likewise.
14273 (begin_if_stmt): Likewise.
14274 (begin_while_stmt): Likewise.
14275 (finish_while_stmt): Likewise.
14276 (finish_return_stmt): Likewise.
14277 (begin_for_stmt): Likewise.
14278 (finish_for_stmt): Likewise.
14279 (finish_break_stmt): Likewise.
14280 (begin_switch_stmt): Likewise.
14281 (finish_case_label): Likewise.
14282 (genrtl_try_block): Likewise.
14283 (begin_try_block): Likewise.
14284 (begin_handler): Likewise.
14285 (begin_compound_stmt): Likewise.
14286 (finish_asm_stmt): Likewise.
14287 (finish_label_stmt): Likewise.
14288 (add_decl_stmt): Likewise.
14289 (finish_subobject): Likewise.
14290 (finish_decl_cleanup): Likewise.
14291 (finish_named_return_value): Likewise.
14292 (setup_vtbl_ptr): Likewise.
14293 (add_scope_stmt): Likewise.
14294 * decl.c (finish_constructor_body): Likewise.
14295 (finish_destructor_body): Likewise.
14296 * optimize.c (copy_body_r): Likewise.
14297 (initialize_inlined_parameters): Likewise.
14298 (declare_return_variable): Likewise.
14299 (expand_call_inline): Likewise.
0e5921e8 14300
f12eef58
JJ
143012000-07-10 Jakub Jelinek <jakub@redhat.com>
14302
14303 * semantics.c (expand_body): Sync interface information
14304 at the end of function body expansion.
14305
2bb5d995
JM
143062000-07-09 Jason Merrill <jason@redhat.com>
14307
14308 * init.c (build_new_1): Bail early if the call to new fails.
14309
0e5921e8 14310 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
14311 an INTEGER_CST, not just TREE_CONSTANT.
14312
0e5921e8 14313 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
14314 the DECL_TEMPLATE_RESULT.
14315 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
14316 codes.
14317
14318 * error.c (dump_template_bindings): Don't crash if we had an
14319 invalid argument list.
14320
14321 * typeck.c (c_expand_start_case): Do narrowing here.
14322 * semantics.c (finish_switch_cond): Not here.
14323
143242000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
14325
14326 * parse.y (asm_clobbers): Do string concatenation.
14327
089acd57
MM
143282000-07-09 Mark Mitchell <mark@codesourcery.com>
14329
14330 * decl.c (pushtag): Don't put local classes in template functions
14331 on the local_classes list.
14332
143332000-07-04 Scott Snyder <snyder@fnal.gov>
14334
14335 * decl2.c (get_guard): Add missing return for old ABI local
14336 variable case.
14337
7b019c19
MM
143382000-07-09 Mark Mitchell <mark@codesourcery.com>
14339
14340 * cp-tree.h (char_type_p): New function.
14341 * decl.c (init_decl_processing): Don't initialize
14342 signed_wchar_type_node or unsigned_wchar_type_node.
14343 (complete_array_type): Handle brace-enclosed string-constants.
14344 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
14345 * tree.c (char_type_p): New function.
14346 * typeck2.c (digest_init): Use char_type_p.
14347
a5f1c5f8
NS
143482000-07-06 Nathan Sidwell <nathan@codesourcery.com>
14349
14350 * pt.c (tsubst): Don't layout type, if it's error_mark.
14351
84e5ca0f
NS
143522000-07-06 Nathan Sidwell <nathan@codesourcery.com>
14353
14354 * pt.c (instantiate_pending_templates): Reset template level.
14355
ab785305
JM
143562000-07-05 Jason Merrill <jason@redhat.com>
14357
14358 * call.c (joust): Don't complain about `operator char *()' beating
14359 `operator const char *() const'.
14360
90418208
JM
143612000-07-04 scott snyder <snyder@fnal.gov>
14362 Jason Merrill <jason@redhat.com>
14363
0e5921e8 14364 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
14365 bases has a null TYPE_BINFO_VTABLE.
14366
143672000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
14368 Jason Merrill <jason@redhat.com>
14369
14370 * parse.y (member_init): Just pass in the type.
14371 * init.c (expand_member_init): Handle getting a type.
14372
14373