]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
builtins.def (BUILT_IN_CABS, [...]): New builtins representing ISO C99's cabs, cabsf...
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
522801e7
DN
12003-05-31 Diego Novillo <dnovillo@redhat.com>
2
3 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
4 the operand of a CONSTRUCTOR node.
5
82a2669e
GDR
62003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
7
8 * decl.c (cp_binding_level::this_entity): Rename from this_class.
9 (cxx_scope_descriptor): New function.
10 (cxx_scope_debug): Likewise.
11 (push_binding_level): Use it.
12 (pop_binding_level): Likewise.
13 (suspend_binding_level): Likewise.
14 (resume_binding_level): Likewise.
15 (pushlevel_class): Adjust use of this_class.
16 (pushtag): Likewise.
17 (lookup_name_real): Likewise.
18 (global_scope_name): New variable.
19 (initialize_predefined_identifiers): Initialize it.
20 (push_namespace): Use it.
21 (make_cxx_scope): New function.
22 (pushlevel): Use it.
23 (pushlevel_class): Likewise.
24 (push_binding_level): Simplify. Loose the last two arguments.
25 (make_binding_level): Remove.
26 (initial_push__namespace_scope): New function.
27 (push_namespace): Use it. Simplify.
28 (cxx_init_decl_processing): Likewise.
29 (declare_namespace_level): Remove.
30
76d3baad
KL
312003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
32
33 PR c++/10956
34 * pt.c (instantiate_decl): Don't use full template arguments if
35 we are dealing with specializations.
36
f37e2274
GDR
372003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
38
39 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
40 (binding_depth): Unconditionally define.
41 (is_class_level): Likewise.
42 (indent): Likewise. Take an indenting parameter.
43 (push_binding_level): Remove conditional definittion.
44 (pop_binding_level): Likewise.
45 (suspend_binding_level): Likewise.
46 (resume_binding_level): Likewise.
47 (pushlevel): Likewise.
48 (pushlevel_class): Likewise.
49 (poplevel_class): Likewise.
50 (pop_everything): Likewise.
51
5f52c0e0
GDR
522003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
53
54 * name-lookup.h (global_scope_p): New macro.
55 * decl.c (pop_binding_level): Use it. Don't refer directly to
56 global_binding_level.
57 (suspend_binding_level): Likewise.
58 (global_bindings_p): Likewise.
59 (print_other_binding_stack): Likewise.
60 (print_binding_stack): Likewise.
61 (maybe_push_to_top_level): Likewise.
62 (pushdecl_namespace_level): Likewise.
63 (cxx_init_decl_processing): Likewise.
64 (start_decl): Likewise.
65 (cp_finish_decl): Likewise.
66 (start_function): Likewise.
67 (global_binding_level): Remove.
68
b7fc8b57
KL
692003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
70
71 * parser.c (cp_parser_explicit_instantiation): Restore old
72 access before template instantiation.
73
0de12fcc
GK
742003-05-23 Geoffrey Keating <geoffk@apple.com>
75
76 * lang-specs.h: Use -o to specify preprocessor's output file.
77 Make -no-integrated-cpp work when building PCH files.
78
43b26a01
KL
792003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
80
81 PR c++/10682
82 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
83 check for implicitly created typedef to an enum.
84
49b7aacb
JM
852003-05-21 Jason Merrill <jason@redhat.com>
86
87 * init.c (build_vec_delete): Copy the address into a temporary
88 variable before calling build_vec_delete_1.
89 * decl2.c (delete_sanity): Don't call stabilize_reference.
90
b190f239
NS
912003-05-21 Nathan Sidwell <nathan@codesourcery.com>
92
93 * pt.c (register_specialization): Update the decl's location,
94 if necessary.
95 (check_explicit_specialization): Likewise.
96
58228df6
KG
972003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
98
99 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
100
16e31964
DS
1012003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
102
103 PR c++/9738
104 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
105 if the old decl had instantiated DECL_RTL.
106 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
107
a01fff59
MA
1082003-05-19 Matt Austern <austern@apple.com>
109
110 * lang-options.h: Document -Wno-invalid-offsetof
111 * typeck.c (build_class_member_access_expr): Don't complain about
112 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
113
7e8f3096
AP
1142003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
115
116 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
117 (binding_entry_make): Make entry->chain NULL after getting an entry.
118 fix the spelling of chain in a comment.
119 (binding_table_free): speed up by having temporary variable.
120 (binding_table_new): set table->chain to be NULL after allocating
121 a table.
122 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
123 binding->previous to NULL after getting an binding for speed.
124
5e0c54e5
GDR
1252003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
126
127 * cp-tree.h (struct lang_type_class): Replace data member tags
128 with hash-table nested_udts.
129 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
130 * class.c (unreverse_member_declarations): Don't touch
131 CLASSTYPE_TAGS.
132 (pushclass): Use cxx_remember_type_decls.
133 * decl.c (struct cp_binding_level): Replace data member tags with
134 hash-table type_decls.
135 (pop_binding_level): Handle level->type_decls.
136 (kept_level_p): Adjust.
137 (poplevel): Remove unused local variable.
138 (bt_print_entry): New function.
139 (print_binding_level): Use it.
140 (push_namespace): Build current_binding_level->type_decls.
141 (maybe_process_template_type_declaration): Adjust.
142 (pushtag): Likewise.
143 (clear_anon_tags): Use binding_table_remove_anonymous_types.
144 (gettags): Remove.
145 (cxx_remember_type_decls): Rename from storetags. Adjust.
146 (lookup_tag): Use binding_table_find_anon_type. Tidy.
147 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
148 (cxx_init_decl_processing): Build global_binding_level->type_decls.
149 (store_parm_decls): Remove pointless code.
150 * name-lookup.c (free_binding_entry): New variable.
151 (ENTRY_INDEX): New macro.
152 (struct binding_table_s): New datatype.
153 (binding_entry_make): New function.
154 (binding_entry_free): Likewise.
155 (binding_table_construct): Likewise.
156 (binding_table_free): Likewise.
157 (binding_table_new): Likewise.
158 (binding_table_expand): Likewise.
159 (binding_table_insert): Likewise.
160 (binding_table_find): Likewise.
161 (binding_table_find_anon_type): Likewise.
162 (binding_table_reverse_maybe_remap): Likewise.
163 (binding_table_remove_anonymous_types): Likewise.
164 (binding_table_foreach): Likewise.
165 * name-lookup.h (binding_table): New type.
166 (binding_entry): Likewise.
167 (bt_foreach_proc): Likewise.
168 (struct binding_entry_s): New datatype.
169 (SCOPE_DEFAULT_HT_SIZE): New macro.
170 (CLASS_SCOPE_HT_SIZE): Likewise.
171 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
172 (NAMESPACE_STD_HT_SIZE): Likewise.
173 (GLOBAL_SCOPE_HT_SIZE): Likewise.
174 (binding_table_new): Declare.
175 (binding_table_free): Likewise.
176 (binding_table_insert): Likewise.
177 (binding_table_find_anon_type): Likewise.
178 (binding_table_reverse_maybe_remap): Likewise.
179 (binding_table_remove_anonymous_types): Likewise.
180 (binding_table_foreach): Likewise.
181 (binding_table_find): Likewise.
182 (cxx_remember_type_decls): Likewise.
183 * pt.c (bt_instantiate_type_proc): New function.
184 (do_type_instantiation): Use it.
185 * search.c (lookup_field_r): Use binding_table_find.
186
25903d03
KL
1872003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
188
189 * semantics.c (perform_deferred_access_checks): Don't discard
190 checked access.
191
e34d07f2
KG
1922003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
193
194 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
195 libiberty VA_ macros, always use stdarg.
196 * rtti.c (create_pseudo_type_info): Likewise.
197 * tree.c (build_min_nt, build_min): Likewise.
198
90ff44cf
KG
1992003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
200
201 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
202 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
203 collapse multiple function calls into one.
204 * tree.c (debug_binfo): Likewise.
205
9cefd2ca
JM
2062003-05-15 Jason Merrill <jason@redhat.com>
207
208 PR c++/5388
209 * call.c (conditional_conversion): Don't consider implicit
210 conversions if T2 is a base of T1.
211 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
212 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
213
214 * parser.c (cp_parser_primary_expression): Convert a static data
215 member from reference.
216
dffbbe80
MM
2172003-05-15 Mark Mitchell <mark@codesourcery.com>
218
8f4b394d
MM
219 * call.c (build_op_delete_call): Avoid creating unnecessary types.
220 * class.c (instantiate_type): Remove tests for tf_no_attributes.
221 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
222 (COMPARE_NO_ATTRIBUTES): Remove.
223 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
224
dffbbe80
MM
225 PR c++/8385
226 * semantics.c (finish_typeof): Refine type-dependency check.
227
a65cddcf
JM
2282003-05-13 Jason Merrill <jason@redhat.com>
229
230 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
231 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
232
afb19ffb
KL
2332003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
234
235 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
236
9f01ded6
KL
2372003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
238
239 PR c++/10230, c++/10481
240 * semantics.c (finish_non_static_data_member): Handle when the
241 non-static member is not from a base of the current class type.
242
fcea7401
KL
2432003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
244
245 PR c++/10552
246 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
247 template and has dependent context.
248
7d021397
KL
2492003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
250
251 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
252
78757caa
KL
2532003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
254
255 PR c++/9252
256 * cp-tree.h (saved_scope): Remove check_access field.
257 (tsubst_flags_t): Remove tf_parsing.
258 * decl.c (maybe_push_to_top_level): Don't initialize
259 scope_chain->check_access.
260 (make_typename_type, make_unbound_class_template): Don't use
261 tf_parsing.
262 (register_dtor_fn): Use push/pop_deferring_access_checks
263 instead of scope_chain->check_access.
264 * method.c (use_thunk): Likewise.
265 * parser.c (cp_parser_explicit_instantiation
266 (cp_parser_constructor_declarator_p): Don't call
267 push/pop_deferring_access_checks here.
268 (cp_parser_template_argument, cp_parser_class_name): Don't use
269 tf_parsing.
270 (yyparse): Check flag_access_control.
271 * pt.c (instantiate_class_template): Call
272 push/pop_deferring_access_checks.
273 * semantics.c (push_deferring_access_checks): Propagate
274 dk_no_check.
275 (perform_or_defer_access_check): Make sure basetype_path is
276 a type before comparison.
277 * call.c (build_op_delete_call, build_over_call): Use
278 perform_or_defer_access_check.
279 * class.c (alter_access): Likewise.
280 * init.c (build_offset_ref): Likewise.
281 * lex.c (do_identifier): Likewise.
282 * method.c (hack_identifier): Likewise.
283 * search.c (lookup_member): Likewise.
284 * semantics.c (finish_non_static_data_member): Likewise.
285 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
286 instead of flag_access_control.
287
8d241e0b
KL
2882003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
289
290 PR c++/9554
291 * parser.c (cp_parser_class_name): Remove check_access parameter.
292 All caller adjusted. Update declaration.
293 (cp_parser_lookup_name): Likewise.
294 * semantics.c (push_deferring_access_checks): Change parameter type
295 to enum deferring_kind. All caller adjusted.
296 (resume_deferring_access_checks): Adjust to use new enum.
297 (stop_deferring_access_checks): Likewise.
298 (perform_or_defer_access_check): Likewise.
299 * cp-tree.h (deferring_kind): New enum.
300 (deferred_access): Adjust field type.
301 (push_deferring_access_checks): Update declaration.
302
88e98cfe
KL
3032003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
304
305 PR c++/10555, c++/10576
306 * pt.c (lookup_template_class): Handle class template with
307 multiple levels of parameters when one of the levels contain
308 errors.
309
8b5e2ce4
JM
3102003-05-08 Jason Merrill <jason@redhat.com>
311
312 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
313 expression. Undo some of the recent reorg.
314
a944ceb9
RH
3152003-05-07 Richard Henderson <rth@redhat.com>
316
9cefd2ca
JM
317 PR c++/10570
318 * cfns.gperf: Comment out POSIX thread cancellation points,
319 plus abort and raise.
320 * cfns.h: Regenerate.
a944ceb9 321
a65fd2d7
JM
3222003-05-07 Jason Merrill <jason@redhat.com>
323
324 * call.c (build_conditional_expr): Don't assume that the folded
325 expression has result_type.
326
d219f3ff
KL
3272003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
328
329 * typeck.c (build_unary_op): Deal with const qualifier in
330 invalid pointer-to-member earlier.
331
5f7262e6
JM
3322003-05-05 Jason Merrill <jason@redhat.com>
333
334 PR c++/9537
335 * call.c (conditional_conversion): Build an RVALUE_CONV if
336 we're just changing the cv-quals.
337 (build_conditional_expr): Don't call convert to change
338 cv-quals.
339
16692dd5
KL
3402003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
341
342 PR c++/10496
343 * typeck.c (build_unary_op): Don't output const qualifier when
344 output invalid pointer-to-member diagnostics.
345
7df87825
KL
3462003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
347
348 * decl.c: Fix typos.
349
4b41d9eb
KL
3502003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
351
352 PR c++/4494
353 * decl.c (start_function): Use same_type_p to check return type
354 of main.
355
87f85ea0
ZW
3562003-05-03 Zack Weinberg <zack@codesourcery.com>
357
358 PR c/10604
359 * cp/typeck.c (build_x_compound_expr): No need to check
360 extra_warnings as well as warn_unused_value.
361
5dc5d13c
KL
3622003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
363
364 PR c++/9364, c++/10553, c++/10586
365 * decl.c (make_typename_type): Don't crash on illegal code.
366
82a98427
NS
3672003-05-03 Nathan Sidwell <nathan@codesourcery.com>
368
369 * class.c (finish_struct): Use location_t and input_location
370 directly.
371 * decl.c (make_label_decl): Likewise.
372 (use_label): Likewise.
373 * decl2.c (warn_if_unknown_interface): Likewise.
374 (start_static_initialization_or_destruction): Likewise.
375 (generate_ctor_or_dtor_function): Likewise.
376 (finish_file): Likewise.
377 * error.c (print_instantiation_full_context): Likewise.
378 * init.c (create_temporary_var): Likewise.
379 * method.c (synthesize_method): Likewise.
380 * parser.c (cp_token): Likewise.
381 (cp_lexer_set_source_position_from_token): Likewise.
382 (cp_lexer_get_preprocessor_token): Likewise.
383 (cp_parser_statement): Likewise.
384 * pt.c (tsubst_friend_function): Likewise.
385 (instantiate_class_template): Likewise.
386 (tsubst_decl): Likewise.
387 (tsubst): Likewise.
388 (instantiate_decl): Likewise.
389 * semantics.c (begin_class_definition): Likewise.
390 (expand_body): Likewise.
391
3489e061
NS
3922003-05-01 Nathan Sidwell <nathan@codesourcery.com>
393
394 * class.c (finish_struct): Rename lineno to input_line.
395 * decl.c (push_binding_level, pop_binding_level,
396 suspend_binding_level, resume_binding_level, make_label_decl,
397 use_label, start_function): Likewise.
398 * decl2.c (warn_if_unknown_interface,
399 start_static_initialization_or_destruction,
400 generate_ctor_or_dtor_function, finish_file): Likewise.
401 * error.c (cp_line_of, print_instantiation_full_context,
402 print_instantiation_context): Likewise.
403 * except.c (check_handlers_1, check_handlers): Likewise.
404 * init.c (create_temporary_var): Likewise.
405 * method.c (use_thunk, synthesize_method): Likewise.
406 * parser.c (cp_lexer_set_source_position_from_token,
407 cp_lexer_get_preprocessor_token): Likewise.
408 * pt.c (push_tinst_level, pop_tinst_level,
409 tsubst_friend_function, instantiate_class_template, tsubst_decl,
410 tsubst, tsubst_expr, instantiate_decl): Likewise.
411 * semantics.c (genrtl_try_block, finish_label_stmt,
412 begin_class_definition, expand_body,
87f85ea0 413 genrtl_finish_function): Likewise.
3489e061
NS
414 * tree.c (build_min_nt, build_min): Likewise.
415
49bf4577
MM
4162003-05-01 Mark Mitchell <mark@codesourcery.com>
417
418 * decl2.c (comdat_linkage): Don't externalize explicit
419 instantiations.
420
d0af00af
KL
4212003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
422
423 PR c++/10554
424 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
425 is not NULL.
426
85209a3c
SB
4272003-05-01 Steven Bosscher <steven@gcc.gnu.org>
428
429 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
430 (struct lang_identifier): ... to here.
431 (LANG_ID_FIELD): Remove.
432 (SET_LANG_ID): Remove.
433 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
434 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
435 (IDENTIFIER_IMPLICIT_DECL): Likewise.
436 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
437 (IDENTIFIER_ERROR_LOCUS): Likewise.
438 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
439
d12a7283
KL
4402003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
441
442 PR c++/8772
443 * pt.c (convert_template_argument): Correct diagnostic.
444
d7ed5e55
KL
4452003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
446
447 PR c++/9432, c++/9528
448 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
449
152c16a9
GDR
4502003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
451
452 * decl.c (check_previous_goto_1): Adjust prototype.
453 (check_previous_goto): Adjust use.
454 (check_switch_goto): Likewise.
455 (use_label): Adjust.
456 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
457 (struct named_label_use_list): Use location_t datatype.
458
1f6f0cb6
MM
4592003-04-29 Mark Mitchell <mark@codesourcery.com>
460
461 PR c++/10551
462 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
463 that have not yet been written out.
464
60cde936
MM
4652003-04-29 Mark Mitchell <mark@codesourcery.com>
466
555456b1
MM
467 PR c++/10549
468 * class.c (layout_class_type): Mark overlong bitfields as having
469 the maximum size permitted by their type, after layout.
470
60cde936
MM
471 PR c++/10527
472 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
473
8e854b76
KL
4742003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
475
476 * call.c (build_operator_new_call): Fix typo.
477 * lang-options.h: Likewise.
478
0dbc5cd3
MM
4792003-04-29 Mark Mitchell <mark@codesourcery.com>
480
75135253
MM
481 PR c++/10515
482 * cp-tree.h (lookup_field_1): Declare it.
483 * search.c (lookup_field_1): Make it public.
484 * decl.c (reshape_init): Handle designated initializers.
485
0dbc5cd3
MM
486 * decl.c (maybe_commonize_var): Further tweak support for systems
487 without weak symbols.
488
9e6aaf5e
MM
4892003-04-27 Mark Mitchell <mark@codesourcery.com>
490
491 * decl.c (maybe_commonize_var): Fix thinko in last patch.
492
0b50d7f1
MM
4932003-04-27 Mark Mitchell <mark@codesourcery.com>
494
772f8889
MM
495 PR c++/10506
496 * method.c (use_thunk): Decrement immediate_size_expand.
497
498 PR c++/10503
499 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
500 (DECL_MAYBE_TEMPLATE): Remove.
501 * class.c (fixed_type_or_null): Avoid infinite recursion.
502
0b50d7f1
MM
503 * decl.c (maybe_commonize_var): Make the code match the comments.
504 * pt.c (instantiate_decl): Move call to import_export_decl.
505
e2b69423
MM
5062003-04-26 Mark Mitchell <mark@codesourcery.com>
507
508 * decl2.c (finish_file): Fix merge botch.
509
ea56c40c
MM
5102003-04-25 Mark Mitchell <mark@codesourcery.com>
511
512 * decl2.c (finish_file): Don't call import_export_decl for
513 functions that are not defined.
514 (handle_class_head): Robustify.
515 * pt.c (instantiate_decl): Do not call cp_finish_decl for
516 variables that are not defined.
517
9804b5b8
SP
5182003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
519
87f85ea0 520 * call.c (print_z_candidates): Fix off by one error.
9804b5b8 521
f8986275
NS
5222003-04-24 Nathan Sidwell <nathan@codesourcery.com>
523
524 PR c++/10337
525 * call.c (joust): Don't warn about conversion ops that are exact
526 or cv-conversions. Rearrange to avoid multiple type comparisons.
527
374ca7f7
MM
5282003-04-23 Mark Mitchell <mark@codesourcery.com>
529
530 PR c++/10471
531 * call.c (build_cxx_call): Robustify.
532
6338b358
NB
5332003-04-23 Neil Booth <neil@daikokuya.co.uk>
534
535 * Make-lang.in (lex.o): Remove mbchar.h.
536 * lex.c (MULTIBYTE_CHARS): Lose.
537 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
538 in c-lex.c.
539
4223f82f
MM
5402003-04-23 Mark Mitchell <mark@codesourcery.com>
541
542 PR c++/9847
543 * cp-tree.h (duplicate_tag_error): Remove.
544 * class.c (duplicate_tag_error): Remove.
545 * semantics.c (begin_class_definition): Return immediately for a
546 duplicate class definition.
547
548 PR c++/10451
549 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
550
6adb9463
MM
5512003-04-22 Mark Mitchell <mark@codesourcery.com>
552
ae2196c2
MM
553 PR c++/10446
554 * search.c (lookup_fnfields_1): Handle empty slots in the method
555 vector.
87f85ea0 556
befcd99b
MM
557 PR c++/10428
558 * decl.c (check_elaborated_type_specifier): New function, split
559 out from ...
560 (xref_tag): ... here. Use the new function in more places.
561
6adb9463
MM
562 * rtti.c (throw_bad_typeid): Use build_cxx_call.
563
b2dd096b
MM
5642003-04-21 Mark Mitchell <mark@codesourcery.com>
565
566 * call.c (build_over_call): Use build_cxx_call.
567 (build_cxx_call): New method, split out of build_over_call.
568 * cp-tree.h (language_function): Add can_throw.
569 (build_cxx_call): Declare it.
570 * decl.c (finish_function): If a function does not contain any
571 calls to functions that can throw an exception, indicate that
572 fact.
573 * decl2.c (mark_used): Do not defer the instantiation of
574 functions, if the current function does not throw.
575 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
576 * pt.c (instantiate_decl): Make sure import_export_decl is called
577 before emitting things.
578 * rtti.c (throw_bad_cast): Use build_cxx_call.
579 (build_dynamic_cast_1): Likewise.
580 * typeck.c (build_function_call): Likewise.
581
8de9bb0e
NS
5822003-04-21 Nathan Sidwell <nathan@codesourcery.com>
583
584 PR c++/9881
585 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
586 expressions. Reverts my 2002-08-08 patch.
87f85ea0 587
8de9bb0e
NS
588 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
589 cheaper early exit.
590
299f79b5
NS
5912003-04-20 Nathan Sidwell <nathan@codesourcery.com>
592
593 * cp/decl2.c (start_static_storage_duration_function): Take count
594 arg, don't check if it wraps round.
595 (generate_ctor_or_dtor_function): Add locus arg, use it.
596 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
597 locus.
598 (finish_file): Set line numbers to past EOF for synthesized
599 functions.
600
6012003-04-20 Nathan Sidwell <nathan@codesourcery.com>
de0c0e69
NS
602
603 PR c++/10405
604 * search.c (lookup_field_1): Final scan goes backwards for
605 types, forwards for non-types.
606
220a35cc
RS
6072003-04-17 Roger Sayle <roger@eyesopen.com>
608
609 PR c/10375
610 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
611 "nothrow" function attributes.
612
09d2f85f
KL
6132003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
614
615 PR c++/10347
616 * pt.c (type_dependent_expression_p): Handle array new.
617
5eb10628
MM
6182003-04-15 Mark Mitchell <mark@codesourcery.com>
619
620 PR c++/10381
621 * parser.c (cp_parser_primary_expression): Reorganize logic for
622 dealing with name lookup failures.
623
ac5f3b67
JM
6242003-04-15 Jason Merrill <jason@redhat.com>
625
626 * decl2.c (mark_used): Don't instantiate anything if
627 skip_evaluation.
628
e6237031
ZL
6292003-04-14 Ziemowit Laski <zlaski@apple.com>
630
631 * tree.c (build_cplus_array_type_1): Do not call
632 uses_template_parms() on a NULL index_type.
633
1331d16f
RS
6342003-04-13 Roger Sayle <roger@eyesopen.com>
635
636 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
637
f4f4610e
MM
6382003-04-12 Mark Mitchell <mark@codesourcery.com>
639
640 PR c++/10300
641 * init.c (build_new_1): Reorganize.
642
dcf92453
ZW
6432003-04-12 Zack Weinberg <zack@codesourcery.com>
644
645 * class.c (initialize_array)
646 * decl.c (reshape_init)
647 * decl2.c (build_expr_from_tree)
648 * init.c (build_zero_init)
649 * pt.c (tsubst_copy, tsubst_copy_and_build)
650 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
651 (ptm_initializer, class_initializer, get_pseudo_ti_init)
652 * semantics.c (finish_compound_literal)
653 * typeck.c (build_ptrmemfunc1)
654 * typeck2.c (store_init_value, process_init_constructor)
655 (build_functional_cast): Use build_constructor.
656
2bd02043
ZW
6572003-04-12 Zack Weinberg <zack@codesourcery.com>
658
659 * call.c (print_z_candidates): Use gcc_gettext_width, not
660 strlen, to determine how much padding to use.
661
339a28b9
ZW
6622003-04-10 Zack Weinberg <zack@codesourcery.com>
663
664 * decl.c: Update all calls to shadow_warning.
665
1e099144
MM
6662003-04-10 Mark Mitchell <mark@codesourcery.com>
667
668 * class.c (layout_class_type): Correct handling for overlong
669 bit-fields whose width is the same as an integer type.
670
d78e771d
ZW
6712003-04-06 Zack Weinberg <zack@codesourcery.com>
672
673 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
674 * cp-lang.c (cp_tree_size): New function.
675 (LANG_HOOKS_TREE_SIZE): Override.
676
677 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
678 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
679 (union lang_tree_node): Remove common and srcloc members.
680 (build_srcloc_here): Don't prototype.
681 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
682 * pt.c (pending_templates): Correct comment.
683 * tree.c (build_srcloc, build_srcloc_here): Kill.
684
d2a6f3c0
ZW
6852003-04-06 Zack Weinberg <zack@codesourcery.com>
686
687 * call.c: Include intl.h.
688 (print_z_candidate): Always use inform; get rid of errfn
689 argument. Reorganize so that all the strings get picked up
690 by xgettext. Note obligation of caller to pass first argument
691 through gettext.
692 (print_z_candidates): Update to match. Indent second and
693 successive candidates by strlen() of translated message.
694 (joust): Restructure ambiguous-conversion pedwarn so that
695 translators see a complete sentence. Update calls to
696 print_z_candidate.
697
698 * Make-lang.in (cp/call.o): Update dependencies.
699
ff955512
KG
7002003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
701
702 * decl.c (set_current_binding_level): Delete, revert last change.
703 (current_binding_level): Modify to allow it as as lvalue.
704
da247ccc
KG
7052003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
706
707 * name-lookup.c (find_binding): Pass appropriate pointer type to
708 POP_TIMEVAR_AND_RETURN.
709
d893ff33
KG
7102003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
711
712 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
713 * cp-tree.h: Don't insist on having GNUC.
714
78d55cc8
JM
7152003-04-03 Jason Merrill <jason@redhat.com>
716
55a2af0c
JM
717 * cvt.c (ocp_convert): Only abort if we try to convert an object
718 of TREE_ADDRESSABLE type.
719
78d55cc8
JM
720 * class.c (build_vtable): Set DECL_ALIGN here.
721 (get_vtable_decl): Not here.
722 (layout_vtable_decl): Or here.
723 (create_vtable_ptr): Or here.
724 (layout_class_type): Or here.
725 (check_bitfield_decl): Don't mess with field alignment.
726
de94b46c
KG
7272003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
728
729 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
730 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
731 * rtti.c (dfs_class_hint_mark): Likewise.
732
733 * decl.c (push_local_name, push_class_level_binding,
734 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
735 functions returning void.
736 * decl2.c (add_using_namespace): Likewise.
737
738 * decl.c (print_binding_level, print_other_binding_stack,
739 print_binding_stack): Cast argument of %p specifier to void*.
740 * ptree.c (cxx_print_decl): Likewise.
741
742 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
743 VAR_FUNCTION_OR_PARM_DECL_CHECK,
744 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
745 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
746 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
747
748 * decl.c (set_current_binding_level): New macro. Use throughout
749 when setting the current binding level.
750
751 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
752 in enum.
753 * method.c (mangling_flags): Likewise.
754
755 * cp-tree.h (lang_type_header): Add __extension__ and use
756 CHAR_BITFIELD for members.
757
0de298af
GK
7582003-04-02 Geoffrey Keating <geoffk@apple.com>
759
760 PR other/9274
761 * mangle.c: Include gt-cp-mangle.h.
762 (subst_identifiers): Mark with GTY.
763 * config-lang.in (gtfiles): Add cp/mangle.c.
764 * Make-lang.in: (gt-cp-mangle.h): New rule.
765 (cp/mangle.o): Depends on gt-cp-mangle.h.
766
28ea4c88
AP
7672003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
768
0de298af 769 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
28ea4c88
AP
770 after \$(srcdir)/cp/name-lookup.h.
771 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
772 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
0de298af
GK
773 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
774 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
d2a6f3c0 775
adff28c3
JM
7762003-03-31 Jason Merrill <jason@redhat.com>
777
778 PR java/10145
779 * class.c (check_field_decl): Don't set DECL_ALIGN.
780
c717c5af
MM
7812003-03-30 Mark Mitchell <mark@codesourcery.com>
782
783 PR c++/7647
784 * decl.c (grokdeclarator): Tidy, slightly.
785 * search.c (lookup_field_1): Add want_type parameter.
786 (lookup_field_r): Adjust call to lookup_field_1.
787
7c71dc2b
GDR
7882003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
789
790 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
791
ed3cf953
GDR
7922003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
793
794 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
d2a6f3c0 795 prototype.
ed3cf953
GDR
796 (cxx_scope_find_binding_for_name): Likewise.
797 * decl.c (find_binding: Move to name-lookup.c.
798 (binding_for_name): Likewise.
799 (cxx_scope_find_binding_for_name): Likewise.
800 (BINDING_LEVEL): Remove.
801 (push_binding): Tidy.
802 (push_class_binding): Likewise.
803 (pop_binding): Likewise.
804 (poplevel): Likewise.
805 (poplevel_class): Likewise.
806 (set_identifier_type_value_with_scope): Likewise.
807 (push_overloaded_decl): Likewise.
808 (lookup_tag): Likewise.
809 (unqualified_namespace_lookup): Likewise.
810 (lookup_name_current_level): Likewise.
811 (maybe_inject_for_scope_var): Likewise.
812 (namespace_binding): Move to name-lookup.c.
813 (set_namespace_binding): Likewise.
814 * decl2.c (lookup_using_namespace): Tidy.
815 (qualified_lookup_using_namespace): Likewise.
816 (do_toplevel_using_decl): Likewise.
817 * name-lookup.c: Include "timevar.h"
818 * name-lookup.h (cxx_scope): Declare.
819 (struct cxx_binding): Lose member "has_level". Adjust "scope"
820 member declaration.
821 (BINDING_SCOPE): Adjust definition.
822 (BINDING_HAS_LEVEL_P): Remove.
823
aed81407
GDR
8242003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
825
826 * name-lookup.c: New file.
827 * name-lookup.h: Likewise..
828 * decl.c (push_binding): Adjust use cxx_binding_make.
829 (free_bindings): Move to name-lookup.c
830 (pop_binding): Use cxx_binding_free.
831 (binding_for_name): Tidy.
832 * cp-tree.h: Include "name-lookup.h"
833 (cxx_binding_make): Move to name-lookup.h
834 (cxx_binding_clear): Likewise.
835 (struct cxx_binding): Likewise.
836 (LOCAL_BINDING_P): Likewise.
837 (INHERITED_VALUE_BINDING_P): Likewise.
838 (BINDING_SCOPE): Likewise.
839 (BINDING_HAS_LEVEL_P): Likewise.
840 (BINDING_VALUE): Likewise.
841 (BINDING_TYPE): Likewise.
842 * config-lang.in (gtfiles): Add cp/name-lookup.h
843 * Make-lang.in (cp/name-lookup.o): New rule.
844 (CXX_OBJS): Add cp/name-lookup.o
845 (CXX_TREE_H): Add cp/name-lookup.h
846
f7b9026e
JM
8472003-03-28 Jason Merrill <jason@redhat.com>
848
849 PR c++/10245
850 * cvt.c (force_rvalue): New fn.
851 * call.c (build_conditional_expr): Use it.
852 * cp-tree.h: Declare it.
853
2d30fe53
MS
8542003-03-28 Mike Stump <mrs@apple.com>
855
856 * error.c (dump_expr): Add 0x to printed hex numbers to make
857 output match source code better.
858
400fbc08
MM
8592003-03-28 Mark Mitchell <mark@codesourcery.com>
860
316a2456
MM
861 PR c++/10218
862 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
863 definitions.
864
400fbc08
MM
865 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
866 non-existant ssdf_decls array.
867 (finish_file): Call generator_ctor_or_dtor_function when there are
868 static constructors or destructors and no other static
869 initializations.
870
433cd9c9
NS
8712003-03-28 Nathan Sidwell <nathan@codesourcery.com>
872
873 PR c++/10047
874 * decl2.c (finish_file): Don't warn about explicitly instantiated
875 inline decls.
876
544aef8c
NS
8772003-03-27 Nathan Sidwell <nathan@codesourcery.com>
878
879 PR c++/10224
880 * pt.c (lookup_template_class): Only check instantiated args if
881 they do not contain template parameters.
882
649fc72d
NS
8832003-03-27 Nathan Sidwell <nathan@codesourcery.com>
884
885 PR c++/10158
886 * parser.c (cp_parser_function_definition): Set
887 DECL_INITIALIZED_IN_CLASS for members.
888 * pt.c (instantiate_decl): Only reduce the template args for
889 friends that are not defined in class.
890
d8c8524d
JM
8912003-03-25 Jason Merrill <jason@redhat.com>
892
893 * call.c (print_z_candidate): Change name of first arg to msgid.
894 (joust): Add comment for translators.
895
1c82cc90 8962003-03-24 Nathan Sidwell <nathan@codesourcery.com>
d2a6f3c0 897
1c82cc90 898 PR c++/9898, PR c++/383, DR 322
649fc72d 899 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1c82cc90
NS
900 through reference types on both PARM and ARG.
901
a5fcc895
NS
9022003-03-24 Nathan Sidwell <nathan@codesourcery.com>
903
904 PR c++/10119
649fc72d 905 * error.c (dump_expr) <BASELINK>: Use dump_expr.
a5fcc895 906 * pt.c (maybe_fold_nontype_args): New function.
649fc72d
NS
907 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
908 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
909 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
a5fcc895
NS
910 maybe_fold_nontype_args.
911
2ef6c975
NS
9122003-03-24 Nathan Sidwell <nathan@codesourcery.com>
913
914 PR c++/10026
649fc72d 915 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2ef6c975 916
f29a2bd1
MM
9172003-03-23 Mark Mitchell <mark@codesourcery.com>
918
919 PR c++/7086
2ef6c975
NS
920 * typeck.c (cxx_mark_addressable): Adjust call to
921 gen_mem_addressof or put_var_into_stack.
f29a2bd1 922
3e4a3562
NS
9232003-03-22 Nathan Sidwell <nathan@codesourcery.com>
924
925 PR c++/9978, c++/9708
926 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
927 * call.c (add_template_candidate_real): Adjust
928 instantiate_template call.
929 * class.c (resolve_address_of_overloaded_function): Likewise.
930 * decl.c (build_enumerator): Set TREE_CONSTANT.
931 * pt.c (check_instantiated_args): New.
932 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
933 TREE_READONLY.
934 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
935 (reduce_template_parm_level): Likewise.
936 (process_template_parm): Likewise.
937 (check_explicit_specialization): Adjust instantiate_template call.
938 (convert_template_argument): Don't check non-type argument here.
939 (lookup_template_class): Check them here.
940 (tsubst_friend_function): Adjust instantiate_template call.
941 (instantiate_template): Add tsubst_flags parameter, use it. Check
942 instantiated args.
943
d9b2742a
ZW
9442003-03-21 Zack Weinberg <zack@codesourcery.com>
945
946 * decl.c: Update calls to shadow_warning.
947
f3146d75
NS
9482003-03-21 Nathan Sidwell <nathan@codesourcery.com>
949
950 PR c++/9898
951 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
952 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
953
963142fc
MM
9542003-03-20 Mark Mitchell <mark@codesourcery.com>
955
956 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
957 friends.
958 * cp/pt.c (instantiate_class_template): Fix formatting.
959
a260bce6
MA
9602003-03-14 Matt Austern <austern@apple.com>
961
962 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
963 (unemitted_tinfo_decl_p): Remove.
964 (emit_tinfo_decl): Change declaration to remove unused parameter.
965 * decl2.c (finish_file): Change tinfo emission to loop through
966 unemitted_tinfo_decls array instead of looping through all decls.
967 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
968 unused second parameter.
969 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
970 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
971 (emit_tinfo_decl): remove unused second parameter, add assertion
d9b2742a
ZW
972 that decl hasn't already been emitted.
973
2bd3ecad
NN
9742003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
975
976 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
977 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
978 return statements.
979
b9747e59
JM
9802003-03-19 Jason Merrill <jason@redhat.com>
981
982 PR c++/8316, c++/9315, c++/10136
983 * call.c (print_z_candidate): Split out from...
984 (print_z_candidiates): ...here.
985 (joust): Use it.
986
10326855
RS
9872003-03-17 Roger Sayle <roger@eyesopen.com>
988
b9747e59 989 PR c++/10031
10326855
RS
990 * decl.c (duplicate_decls): Use the new type when prototyping
991 anticipated decls, even when the types match. This defines the
992 exception list for the built-in function.
993
bdaa131b
JM
9942003-03-17 Jason Merrill <jason@redhat.com>
995
996 PR c++/10091
d9b2742a 997 * typeck.c (build_class_member_access_expr): Compare
bdaa131b
JM
998 TYPE_MAIN_VARIANTs.
999
ec20aa6c
MM
10002003-03-17 Mark Mitchell <mark@codesourcery.com>
1001
1002 PR c++/9639
1003 * parser.c (cp_parser_declarator_id): Clear parser->scope.
1004
35e939ae
JM
10052003-03-16 Jason Merrill <jason@redhat.com>
1006
1007 PR c++/9993
1008 * decl.c (finish_function): Only allow the NRVO to use variables
1009 declared at function scope.
1010
40a4184c
AJ
10112003-03-17 Andreas Jaeger <aj@suse.de>
1012
1013 * Make-lang.in (cp/TAGS): Remove.
1014
1f5a253a
NS
10152003-03-16 Nathan Sidwell <nathan@codesourcery.com>
1016
1017 PR c++/9629
1018 * cp-tree.h (struct language_function): Add in_base_initializer.
1019 (in_base_initializer): define it.
1020 (expand_member_init): Remove INIT param.
1021 * init.c (expand_member_init): Remove INIT param, return the member.
1022 (emit_mem_initializers): Set in_base_initializer.
1023 * class.c (build_base_path): Check in_base_initializer.
1024 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1025 * pt.c (tsubst_initializer_list): Likewise.
1026
4f907b59
GDR
10272003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1028
1029 * decl.c (binding_for_name): Fix initialization thinko.
1030
ac2768ff 10312003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
40a4184c 1032
af6fd53f
GDR
1033 Compile-time improvement: 2/n.
1034 * cp-tree.h (struct cxx_binding): New datatype;
1035 (struct lang_identifier): Use it.
1036 (LOCAL_BINDING_P): Adjust definition.
1037 (INHERITED_VALUE_BINDING_P): Likewise.
1038 (BINDING_SCOPE): Likewise.
1039 (BINDING_HAS_LEVEL_P): Likewise.
1040 (BINDING_VALUE): Likewise.
1041 (BINDING_TYPE): Likewise.
1042 (IDENTIFIER_VALUE): Likewise.
1043 (struct tree_binding): Remove.
1044 (TS_CP_BINDING): Likewise.
1045 ((union lang_tree_node): Remove field "binding".
1046 (cxx_binding_clear): New macro.
1047 (binding_for_name): Adjust return type.
1048 (qualified_lookup_using_namespace): Adjust prototype.
1049 (lookup_using_namespace): Adjust prototype.
1050 (cxx_scope_find_binding_for_name): Declare.
1051 * cp-tree.def: Remove CPLUS_BINDING definition.
1052 * decl.c (push_binding): Adjust local variable type.
1053 (add_binding): Likewise.
1054 (push_class_binding): Likewise.
1055 (pop_binding): Likewise.
1056 (poplevel): Likewise.
1057 (poplevel_class): Likewise.
1058 (free_bindings): Adjust type.
1059 (find_binding): Adjust return type, add a third parameter. Remove
40a4184c 1060 non-useful assertion now that we use static typing.
af6fd53f 1061 (cxx_scope_find_binding_for_name): New function.
40a4184c 1062 (binding_for_name): Use it. Adjust local variable type. Simplify.
af6fd53f
GDR
1063 (namespace_binding): Simplify.
1064 (set_namespace_binding): Likewise.
1065 (set_identifier_type_value_with_scope): Adjust local variable type.
1066 (lookup_tag): Don't type-abuse of local variable 'old'.
1067 (lookup_namespace_name): Likewise. Allocate binding on stack.
1068 (select_decl): Adjust prototype.
1069 (unqualified_namespace_lookup): Allocate binding on stack.
1070 Don't type-abuse of local variable 'val'.
1071 (lookup_name_real): Likewise.
1072 (maybe_inject_for_scope_var): Adjust local variable type.
1073 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1074 (namespace_binding): Adjust logic, simplify.
1075 (BINDING_LEVEL): Adjust definition.
1076 (push_class_level_binding): Adjust local variable type.
1077 (struct cxx_saved_binding): Adjust field 'binding' type.
1078 * decl2.c (ambiguous_decl): Adjust prototype.
1079 (lookup_using_namespace): Adjust local variable type.
1080 (qualified_lookup_using_namespace): Catch type error and correct
1081 ensueing logic error.
1082 (do_nonmember_using_decl): Adjust local variable type. Allocate
1083 temporary cxx_binding on stack.
1084 (do_toplevel_using_decl): Adjust local variable type.
1085 * ptree.c (cxx_print_cxx_binding): New function.
1086 (cxx_print_identifier): Use it.
1087 (cxx_print_xnode): Delete CPLUS_BINDING case label.
1088
6a87d634
RS
10892003-03-15 Roger Sayle <roger@eyesopen.com>
1090
1091 * tree.c (count_functions): Fix whitespace.
1092
c1bad961
NB
10932003-03-15 Neil Booth <neil@daikokuya.co.uk>
1094
1095 * Make-lang.in: Update.
1096
6e049fcd
KL
10972003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1098
1099 PR c++/6440
1100 * pt.c (maybe_process_partial_specialization): Handle
1101 member class template when enclosing class template is
1102 explicit specialized.
1103 (most_general_template): Stop looking when DECL is already
1104 specialized.
1105
0171b21c
JM
11062003-03-13 Jason Merrill <jason@redhat.com>
1107
1108 PR c++/9420
1109 * search.c (lookup_conversions): Call complete_type here.
1110 * call.c (implicit_conversion): Not here.
1111
26f86471
MM
11122003-03-13 Mark Mitchell <mark@codesourcery.com>
1113
45707d31
MM
1114 * decl2.c (do_nonmember_using_decl): Correct handling of
1115 simultaneous type/non-type bindings.
1116
26f86471
MM
1117 * call.c (initialize_reference): Remove bogus assertion.
1118 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1119
847311f4
AL
11202003-03-12 Andrew Lewycky <andrew@mxc.ca>
1121
1122 PR c++/7050
1123 * expr.c (cxx_expand_expr): Return const0_rtx for throw
1124 expressions.
1125
2601a4ee
MM
11262003-03-11 Mark Mitchell <mark@codesourcery.com>
1127
e1145e7f 1128 PR c++/9474
2601a4ee
MM
1129 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1130 to merge old and new declarations.
1131
2bfe542b
AO
11322003-03-12 Alexandre Oliva <aoliva@redhat.com>
1133
1134 * g++.1: Remove.
1135 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1136 (cp/g++.1): Build it from scratch in the build tree.
1137 (c++.install-man): Depend on it. Install it from the build tree.
1138 (c++.mostlyclean): Clean it.
1139
0c33daff
MM
11402003-03-11 Mark Mitchell <mark@codesourcery.com>
1141
3033f0ed 1142 PR c++/9474
2601a4ee
MM
1143 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1144 to merge old and new declarations.
1145
0c33daff
MM
1146 PR c++/9924
1147 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1148
cf237c19
JM
11492003-03-11 Jason Merrill <jason@redhat.com>
1150
1151 PR c++/9820
40a4184c 1152 * search.c (lookup_member): Fix handling of functions in a class
cf237c19
JM
1153 being defined.
1154
436f8a4c
MM
11552003-03-11 Mark Mitchell <mark@codesourcery.com>
1156
1157 PR c++/8700
1158 * call.c (convert_class_to_reference): Adjust usage of
1159 splice_viable.
1160 (any_viable): Remove.
1161 (splice_viable): Combine with any_viable.
1162 (print_z_candidates): Avoid printing duplicates.
1163 (build_user_type_conversion_1): Adjust usage of splice_viable.
1164 (build_new_function_call): Likewise.
1165 (build_operator_new_call): Likewise.
1166 (build_object_call): Likewise.
1167 (build_conditional_expr): Likewise.
1168 (build_new_op): Likewise.
1169 (build_new_method_call): Likewise.
1170 (joust): Remove spurious comment.
1171 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1172 * decl2.c (arg_assoc_class): Simplify.
1173 * friend.c (add_friend): Likewise.
1174
5b8e011c
JM
11752003-03-11 Jason Merrill <jason@redhat.com>
1176
1177 PR c++/8660
40a4184c 1178 * decl2.c (check_classfn): A member template only matches a
5b8e011c
JM
1179 member template.
1180
cb60f38d
NB
11812003-03-11 Neil Booth <neil@daikokuya.co.uk>
1182
1183 * Make-lang.in (CXX_C_OBJS): Update.
1184 * lang-specs.h: Don't define __GNUG__ here.
1185
125e6594
MM
11862003-03-10 Mark Mitchell <mark@codesourcery.com>
1187
1188 * call.c (perform_overload_resolution): New function.
1189 (build_new_function_call): Use it.
1190 (build_operator_new_call): Likewise.
1191 (add_candidates): Add explicit_targs and template_only parameters.
1192 (build_new_op): Adjust accordingly.
1193 * cp-tree.h (build_operator_new_call): New function.
1194 (build_function_call_real): Remove.
1195 (build_function_call_maybe): Likewise.
1196 * init.c (build_new_1): Use build_operator_new_call.
1197 * typeck.c (build_function_call_real): Rename to ...
1198 (build_function_call): ... this.
1199
87d7d780 12002003-03-10 Devang Patel <dpatel@apple.com>
40a4184c 1201
87d7d780
DP
1202 PR c++/9394
1203 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
125e6594 1204
6e9554e1
JM
12052003-03-10 Jason Merrill <jason@redhat.com>
1206
70f0e288
JM
1207 PR c++/9798
1208 * decl.c (push_using_directive): Push before recursing.
1209
1210 PR c++/9868, c++/9524
6e9554e1
JM
1211 * call.c (resolve_scoped_fn_name): Handle the case of a function
1212 pointer member.
1213
1214 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1215 argument in the pointer-to-member case.
1216
f6d19bfe
MM
12172003-03-09 Mark Mitchell <mark@codesourcery.com>
1218
1d719415
MM
1219 PR c++/9373
1220 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1221 pointers to member functions.
1222
f6d19bfe
MM
1223 PR c++/8534
1224 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1225 in pointer-to-member-function types.
1226
d9b4e85e
GDR
12272003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1228
1229 * expr.c (cplus_expand_constant): Use C90 prototype style.
1230 (cxx_expand_expr): Likewise.
1231
ca9e1382
KL
12322003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1233
1234 PR c++/9970
1235 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1236 functions.
1237
00a221f0
GK
12382003-03-08 Geoffrey Keating <geoffk@apple.com>
1239
1240 * lang-specs.h (c++-header): Change .pch to .gch.
1241
4bfec483
NB
12422003-03-08 Neil Booth <neil@daikokuya.co.uk>
1243
1244 * cp-tree.h (cxx_init): Update prototype.
1245 * lex.c (cxx_init): Similarly.
1246
089d6ea7
MM
12472003-03-08 Mark Mitchell <mark@codesourcery.com>
1248
0e136342
MM
1249 PR c++/9823
1250 * cp-tree.h (begin_mem_initializers): Remove.
1251 * parser.c (cp_parser_mem_initializer_list): Inline it here.
1252 Do not call finish_mem_initializers if not in a constructor.
1253 (cp_parser_class_head): Fix typo in error message.
1254 * semantics.c (begin_mem_initializers): Remove.
1255 * testsuite/g++.dg/parser/constructor1.C: New test.
1256
089d6ea7
MM
1257 PR c++/9809
1258 * call.c (add_function_candidate): Skip builtin fuctions that have
1259 not yet been declared.
1260
1261 PR c++/9982
1262 * init.c (build_new_1): Correct logic for determining whether or
1263 not to use an array cookie.
1264
1265 PR c++/9524
1266 * parser.c (cp_parser_postfix_expression): Call
1267 finish_non_static_data_member, even when processing_template_decl.
1268
1269 PR c++/9912
1270 * cp-tree.h (is_ancestor): New function.
1271 (handle_class_head): Change prototype.
1272 * decl2.c (is_namespace_ancestor): Rename to ...
1273 (namespace_anecestor): ... this.
1274 (set_decl_namespace): Adjust accordingly.
1275 (handle_class_head): Remove unncessary parameters.
1276 * parser.c (cp_parser_class_head): Check that
1277 nested-name-specifiers are used appropriately.
40a4184c 1278
aa6e8ed3
MM
12792003-03-07 Mark Mitchell <mark@codesourcery.com>
1280
1281 * call.c (reference_binding): Remove REF_IS_VAR parameter.
1282 (implicit_conversion): Adjust call to reference_binding.
1283 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1284 (initialize_reference): Adjust handling for references bound to
1285 rvalues.
1286 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1287 prototype.
1288 (real_non_cast_lvalue_p): New method.
1289 * cvt.c (build_up_reference): Adjust use of
1290 make_temporary_var_for_ref_to_temp.
89d11511 1291 * tree.c (real_non_cast_lvalue_p): New method.
40a4184c 1292
5cc3d3b8
GDR
12932003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1294
1295 * except.c (init_exception_processing): Use C90 prototype style.
1296 (cp_protect_cleanup_actions): Likewise.
1297 (prepare_eh_type): Likewise.
1298 (build_eh_type_type): Likewise.
1299 (build_exc_ptr): Likewise.
1300 (do_begin_catch): Likewise.
1301 (dtor_nothrow): Likewise.
1302 (do_end_catch): Likewise.
1303 (push_eh_cleanup): Likewise.
1304 (decl_is_java_type): Likewise.
1305 (choose_personality_routine): Likewise.
1306 (initialize_handler_parm): Likewise.
1307 (expand_start_catch_block): Likewise.
1308 (expand_end_catch_block): Likewise.
1309 (begin_eh_spec_block): Likewise.
1310 (finish_eh_spec_block): Likewise.
1311 (do_allocate_exception): Likewise.
1312 (do_free_exception): Likewise.
1313 (wrap_cleanups_r): Likewise.
1314 (stabilize_throw_expr): Likewise.
1315 (build_throw): Likewise.
1316 (complete_ptr_ref_or_void_ptr_p): Likewise.
1317 (is_admissible_throw_operand): Likewise.
1318 (nothrow_libfn_p): Likewise.
1319 (can_convert_eh): Likewise.
1320 (check_handlers_1): Likewise.
1321 (check_handlers): Likewise.
40a4184c 1322
3d938426
MM
13232003-03-06 Mark Mitchell <mark@codesourcery.com>
1324
1325 * call.c (merge_conversion_sequences): New function.
1326 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1327 (convert_class_to_reference): Correct handling of second
1328 standard conversion sequence in a user-defined conversion
1329 sequence.
1330 (build_user_type_conversion_1): Use merge_conversion_sequences.
1331 * cp-tree.def: Add comments for CONV nodes.
9534f4bc 1332 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
40a4184c 1333
3f8548e7
GDR
13342003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1335
1336 * error.c (init_error): Use C90 prototype style.
1337 (dump_scope): Likewise.
1338 (dump_qualifiers): Likewise.
1339 (dump_template_argument): Likewise.
1340 (dump_template_argument_list): Likewise.
1341 (dump_template_parameter): Likewise.
1342 (dump_template_bindings): Likewise.
1343 (dump_type): Likewise.
1344 (dump_typename): Likewise.
1345 (class_key_or_enum): Likewise.
1346 (dump_aggr_type): Likewise.
1347 (dump_type_prefix): Likewise.
1348 (dump_type_suffix): Likewise.
1349 (dump_global_iord): Likewise.
1350 (dump_simple_decl): Likewise.
1351 (dump_decl): Likewise.
1352 (dump_template_decl): Likewise.
1353 (dump_function_decl): Likewise.
1354 (dump_parameters): Likewise.
1355 (dump_exception_spec): Likewise.
1356 (dump_function_name): Likewise.
1357 (dump_template_parms): Likewise.
1358 (dump_char): Likewise.
1359 (dump_expr_list): Likewise.
1360 (dump_expr): Likewise.
1361 (dump_binary_op): Likewise.
1362 (dump_unary_op): Likewise.
1363 (type_as_string): Likewise.
1364 (expr_as_string): Likewise.
1365 (decl_as_string): Likewise.
1366 (context_as_string): Likewise.
1367 (lang_decl_name): Likewise.
1368 (cp_file_of): Likewise.
1369 (cp_line_of): Likewise.
1370 (decl_to_string): Likewise.
1371 (expr_to_string): Likewise.
1372 (fndecl_to_string): Likewise.
1373 (code_to_string): Likewise.
1374 (language_to_string): Likewise.
1375 (parm_to_string): Likewise.
1376 (op_to_string): Likewise.
1377 (type_to_string): Likewise.
1378 (assop_to_string): Likewise.
1379 (args_to_string): Likewise.
1380 (cv_to_string): Likewise.
1381 (cxx_print_error_function): Likewise.
1382 (cp_diagnostic_starter): Likewise.
1383 (cp_diagnostic_finalizer): Likewise.
1384 (cp_print_error_function): Likewise.
1385 (function_category): Likewise.
1386 (print_instantiation_full_context): Likewise.
1387 (print_instantiation_partial_context): Likewise.
1388 (maybe_print_instantiation_context): Likewise.
1389 (print_instantiation_context): Likewise.
1390 (cp_printer): Likewise.
1391 (print_integer): Likewise.
1392 (print_non_consecutive_character): Likewise.
1393 (locate_error): Likewise.
1394
3d1df1fa
MM
13952003-03-06 Mark Mitchell <mark@codesourcery.com>
1396
5e256996
MM
1397 PR c++/9965
1398 * call.c (reference_binding): Add ref_is_var parameter.
1399 (implicit_conversion): Adjust call to reference_binding.
1400 (initialize_reference): Likewise.
1401
07681121
MM
1402 PR c++/9400
1403 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1404 PARM_DECLs.
1405
3d1df1fa
MM
1406 PR c++/9791
1407 * class.c (get_basefndecls): Use lookup_fnfields_1.
1408
8a6393df
KL
14092003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1410
1411 PR c++/9188
1412 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1413 in error message.
1414 (cp_parser_single_declaration): Likewise.
1415
c965b169
JM
14162003-03-05 Jason Merrill <jason@redhat.com>
1417
1418 PR c++/9440
1419 * call.c (build_conditional_expr): Use convert rather than an
1420 explicit NOP_EXPR.
1421
1d555f7a
MA
14222003-03-02 Matt Austern <austern@apple.com>
1423
1424 * decl.c (cp_binding_level): Add static_decls varray member.
1425 (add_decl_to_level): Add static/inline namespace scope
1426 declarations to static_decls array.
1427 (wrapup_global_for_namespace): Pass static_decls only, instead of
1428 all decls, to wrapup_global_declarations/check_global_declarations.
1429 (push_namespace): Initialize static_decls for ordinary namespaces.
1430 (cxx_init_decl_processing): Initialize static_decls for global
1431 namespace.
40a4184c 1432
8234c6c1
MM
14332003-03-05 Mark Mitchell <mark@codesourcery.com>
1434
1435 * class.c (end_of_class): Correct thinko.
1436
dc2b3526
NN
14372003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
1438
1439 * config-lang.in: Replace ${libstdcxx_version} by its value.
1440
000d38ea
GDR
14412003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1442
d9b2742a
ZW
1443 * cp-tree.h (cxx_saved_binding): Declare.
1444 (struct saved_scope): Adjust type of field 'old_binding'.
1445 * decl.c (cxx_saved_binding_make): New macro.
1446 (struct cxx_saved_binding): Define.
1447 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
1448 C++ bindings.
1449 (maybe_push_to_top_level): Adjust local variable type.
1450 (pop_from_top_level): Likewise.
40a4184c 1451
b87141b3
TT
14522003-03-04 Tom Tromey <tromey@redhat.com>
1453
1454 * Make-lang.in (c++.tags): New target.
1455
f20d8e39
NB
14562003-03-04 Neil Booth <neil@daikokuya.co.uk>
1457
1458 * Make-lang.in: Update.
1459
f5d70cc0
JM
14602003-03-03 Jason Merrill <jason@redhat.com>
1461
1462 * decl.c (finish_enum): Do set the type in a template. Simplify.
1463 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1464
7993382e
MM
14652003-03-03 Mark Mitchell <mark@codesourcery.com>
1466
1467 PR c++/9878
1468 * call.c (convert_class_to_reference): Correct conversion
1469 sequences.
1470 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1471 (implicit_conversion): Adjust call to reference_binding.
1472 (add_candidate): Change type of candidates parameter.
1473 (add_function_candidate): Likewise.
1474 (add_conv_candidate): Likewise.
1475 (build_builtin_candidate): Likewise.
1476 (add_builtin_candidate): Likewise.
1477 (add_builtin_candidates): Likewise.
1478 (add_template_candidate_real): Likewise.
1479 (add_template_candidate): Likewise.
1480 (add_template_conv_candidate): Likewise.
1481 (build_user_type_conversion_1): Adjust accordingly.
1482 (build_object_call): Likewise.
1483 (build_conditional_expr): Likewise.
1484 (add_candidates): Likewise.
1485 (build_new_op): Likewise.
1486 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
1487 (build_new_method_call): Adjust calls to add_function_candidate.
1488 (make_temporary_var_for_ref_to_temp): New function.
1489 (initialize_reference): Add decl parameter.
1490 * class.c (build_rtti_vtbl_entries): Use build_address and
1491 build_nop.
1492 * cp-tree.h (initialize_reference): Change prototype.
1493 (make_temporary_var_for_ref_to_temp): New function.
1494 (build_type_conversion): Change prototype.
1495 (build_address): New function.
1496 (build_nop): Likewise.
1497 * cvt.c (cp_convert_to_pointer): Adjust call to
1498 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
1499 Use build_nop.
1500 (convert_to_pointer_force): Use build_nop.
1501 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1502 (convert_to_reference): Adjust call to build_type_conversion.
1503 (ocp_convert): Likewise.
1504 (build_type_conversion): Remove for_sure parameter.
1505 * decl.c (grok_reference_init): Use initialize_reference.
1506 * typeck.c (build_address): New function.
1507 (build_nop): Likewise.
1508 (build_unary_op): Use them.
1509 (build_ptrmemfunc): Tidy slightly.
1510 (convert_for_initialization): Adjust call to
1511 initialize_reference.
1512 * typeck2.c (store_init_value): Remove #if 0'd code.
40a4184c 1513
d1a74aa7
JM
15142003-03-03 Jason Merrill <jason@redhat.com>
1515
1516 * decl.c (start_function): Clear DECL_NUM_STMTS.
1517
1518 * class.c (get_vtable_decl): Use vtbl_type_node.
1519 (build_primary_vtable): Check for it.
1520
6e1b3a7c
AH
15212003-03-02 Aldy Hernandez <aldyh@redhat.com>
1522
08162287 1523 * decl.c (check_initializer): Check for vector_opaque_p.
6e1b3a7c 1524
8a035a6b
AH
15252003-03-02 Ashif Harji <asharji@uwaterloo.ca>
1526
1527 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1528 invoke an external cpp during compilation.
1529
456d8864
GDR
15302003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1531
1532 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1533 that of warning().
1534 (start_decl): Likewise.
1535 (start_function): Likewise.
1536
5793b276
NB
15372003-03-01 Neil Booth <neil@daikokuya.co.uk>
1538
1539 * Make-lang.in (CXX_C_OBJS): Update.
1540
b063b379 15412003-02-28 Mark Mitchell <mark@codesourcery.com>
1d62c33e
MM
1542
1543 PR c++/9892
1544 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1545 instantiating it.
1546
704a0bbd
AH
15472003-02-28 Aldy Hernandez <aldyh@redhat.com>
1548
d9b2742a
ZW
1549 * parser.c (cp_parser_init_declarator): Revert opaque
1550 vector_opaque_p change.
1551 Do not include target.h.
704a0bbd 1552
1cb8292f
MM
15532003-02-28 Mark Mitchell <mark@codesourcery.com>
1554
1555 PR c++/9879
1556 * cp-tree.h (build_zero_init): Add parameter.
1557 * decl.c (cp_finish_decl): Adjust call.
1558 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
1559 calls.
1560 (build_default_init): Add nelts parameter. Adjust calls to
1561 build_zero_init.
1562 (build_new_1): Adjust call to build_default_init.
1563 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
40a4184c 1564
fdedded1
DP
15652003-02-26 Devang Patel <dpatel@apple.com>
1566
2ef6c975
NS
1567 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1568 required. Postpone enum setting for template decls.
1569 (build_enumerator): Delay copying value node until finish_enum
1570 (). Remove #if 0'ed code.
fdedded1
DP
1571 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1572 (tsubst_copy): Add check for enum type.
40a4184c 1573
cec24319
MM
15742003-02-25 Mark Mitchell <mark@codesourcery.com>
1575
1576 PR c++/9683
1577 * decl2.c (prune_vars_needing_no_initialization): Do not throw
1578 away initializations for DECL_EXTERNAL VAR_DECLs.
1579 (finish_file): Adjust accordingly.
1580 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1581
7d9f2df2
GDR
15822003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1583
08162287
JM
1584 * decl.c (add_binding): Time TV_NAME_LOOKUP.
1585 (push_class_binding): Likewise.
1586 (set_namespace_binding): Likewise.
7d9f2df2 1587
353b4fc0
MM
15882003-02-24 Mark Mitchell <mark@codesourcery.com>
1589
1590 PR c++/9836
1591 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1592 specializations back to the main template.
1593 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1594 * pt.c (resolve_typename_type): Likewise.
1595
8b6a662e
JO
15962003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
1597
1598 PR c++/9778
1599 * pt.c (tsubst_copy_and_build): For a templated function inside a
1600 scope, process template arguments.
1601
9e236a9d
KL
16022003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1603
1604 PR c++/9602
1605 * typeck2.c (abstract_virtuals_error): Don't check when
1606 TYPE is still template parameter dependent.
1607
ca099ac8
MM
16082003-02-23 Mark Mitchell <mark@codesourcery.com>
1609
1610 PR c++/5333
1611 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1612 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1613 * pt.c (instantiate_class_template): Don't try to instantiate
1614 dependent types.
1615 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
40a4184c 1616
2fff6d71
MM
16172003-02-21 Mark Mitchell <mark@codesourcery.com>
1618
1619 PR c++/9749
1620 * decl.c (grokdeclarator): Do not allow parameters with variably
1621 modified types.
1622
7fb1c86d
NS
16232003-02-21 Nathan Sidwell <nathan@codesourcery.com>
1624
1f5a253a 1625 * search.c (grow_bfs_bases): Remove. Fold into ...
7fb1c86d
NS
1626 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1627 in previous patch.
1628
63a3cd3e
MM
16292003-02-20 Mark Mitchell <mark@codesourcery.com>
1630
1631 PR c++/9729
1632 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1633 when the G++ 3.2 ABI prevents correct compilation.
1634
dbbf88d1
NS
16352003-02-20 Nathan Sidwell <nathan@codesourcery.com>
1636
1637 Change base class access representation. Share virtual base
1638 binfos.
1639 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1640 call.
1641 * cp/class.c (build_base_path): Likewise.
1642 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1643 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1644 (make_new_vtable): Adjust.
1645 (force_canonical_binfo_r): Delete.
1646 (force_canonical_binfo): Delete.
1647 (mark_primary_virtual_base): Delete.
1648 (dfs_unshared_virtual_bases): Delete.
1649 (mark_primary_bases): Adjust.
1650 (maybe_warn_about_overly_private_class): Adjust.
1651 (dfs_base_derived_from): Delete.
1652 (base_derived_from): Follow the inheritance chain.
1653 (struct find_final_overrider_data): Add vpath member.
1654 (dfs_find_final_overrider): Adjust.
1655 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1656 (find_final_overrider): Adjust.
1657 (update_vtable_entry_for_fn): Adjust.
1658 (modify_all_vtables): Adjust.
1659 (walk_subobject_offsets): Adjust.
1660 (layout_nonempty_base_or_field): Adjust.
1661 (layout_empty_base): Remove last parameter. Adjust.
1662 (build_base_field): Adjust.
1663 (build_base_fields): Adjust.
1664 (propagate_binfo_offsets): Remove last parameter. Adjust.
1665 (dfs_set_offset_for_unshared_vbases): Delete.
1666 (layout_virtual_bases): Adjust.
1667 (finish_struct_1): Adjust.
1668 (init_class_processing): Don't init access nodes.
1669 (dfs_get_primary_binfo): Delete.
1670 (get_primary_binfo): Adjust.
1671 (dump_class_hierarchy_r): Remove most derived arg, add IGO
1672 parameter. Adjust.
1673 (dump_class_hierarchy): Adjust.
1674 (finish_vtbls): Adjust.
1675 (get_original_base): Delete.
1676 (build_vtt_inits): Adjust.
1677 (dfs_build_secondary_vptr_vtt_inits): Adjust.
1678 (dfs_ctor_vtable_bases_queue_p): Adjust.
1679 (build_ctor_vtbl_group): Adjust.
1680 (dfs_accumulate_vtbl_inits): Adjust.
1681 (build_vtbl_initializer): Adjust.
1682 (build_vbase_offset_vtbl_entries): Adjust.
1683 (add_vcall_offset_vtbl_entries_1): Adjust.
1684 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1685 (access_*_node): Remove.
1686 (CANONICAL_BINFO): Delete.
1687 (BINFO_UNSHARED_MARKED): Remove.
1688 (BINFO_MARKED): Set LANG_FLAG_0 directly.
1689 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1690 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1691 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1692 Delete.
1693 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1694 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1695 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1696 Delete.
1697 (BINFO_DEPENDENT_BASE_P): New.
1698 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1699 index.
1700 (markedp, unmarkedp): Adjust.
1701 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1702 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1703 find_vbase_instance, binfo_for_vbase): Delete.
1704 (copied_binfo, original_binfo): Declare.
1705 (finish_base_specifier): Add virtual_p arg.
1706 (unshare_base_binfos): Delete.
1707 (copy_base_binfos): Declare.
1708 (reverse_path): Delete.
1709 * cp/decl.c (xref_basetypes): Access and virtuality passed
1710 differently. Don't copy direct base binfos here. Call
1711 copy_base_binfos.
1712 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1713 (initialize_vtbl_ptrs): Adjust.
1714 (expand_member_init): Adjust.
1715 * cp/parser.c (cp_parser_base_specifier): Adjust.
1716 * cp/pt.c (instantiate_class_template): Adjust.
1717 (get_template_base_recursive): Adjust.
1718 * cp/rtti.c (get_pseudo_ti_init): Adjust.
1719 (get_pseudo_ti_desc): Adjust.
1720 * cp/tree.c (unshare_base_binfos): Rename to ...
1721 (copy_base_binfos): ... here, reimplement.
1722 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1723 (reverse_path): Remove.
1724 * cp/typeck.c (get_delta_difference): Adjust error messages.
1725 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1726 * cp/search.c (lookup_base_r): Adjust.
1727 (dynamic_cast_base_recurse): Adjust.
1728 (canonical_binfo): Remove.
1729 (dfs_canonical_queue): Remove.
1730 (dfs_assert_unmarked_p): Remove.
1731 (assert_canonical_unmarked): Remove.
1732 (shared_marked_p, shared_unmarked_p): Remove.
1733 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1734 (dfs_access_in_type): Adjust.
1735 (access_in_type): Adjust.
1736 (dfs_accessible_queue_p): Adjust.
1737 (dfs_accessible_p): Adjust.
1738 (is_subobject_of_p_1, is_subobject_of_p): Remove.
1739 (struct lookup_field_info): Remove from_dep_base_p field.
1740 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1741 (lookup_field_r): Remove dependent base code.
1742 (lookup_member): Likewise.
1743 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1744 (dfs_unmarked_real_bases_queue_p): Remove.
1745 (dfs_marked_real_bases_queue_p): Remove.
1746 (dfs_skip_vbases): Remove.
1747 (dfs_get_pure_virtuals): Adjust.
1748 (markedp, unmarkedp): Adjust.
1749 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1750 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1751 (dfs_unmark): Adjust.
1752 (dfs_get_vbase_types):Remove.
1753 (dfs_build_inheritance_graph_order): Remove.
1754 (get_vbase_types): Remove
1755 (dfs_find_vbase_instance): Remove.
1756 (find_vbase_instance): Remove.
1757 (dfs_debug_unmarkedp): Adjust.
1758 (dependent_base_p): Remove.
1759 (dfs_push_type_decls): Adjust.
1760 (dfs_push_decls): Adjust.
1761 (dfs_no_overlap_yet): Adjust.
1762 (copied_binfo): New function.
1763 (original_binfo): New function.
1764 (binfo_for_vbase): Remove.
1765
860c9ea6
ZW
17662003-02-18 Zack Weinberg <zack@codesourcery.com>
1767
1768 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1769 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1770 vectors, for speed.
1771
6b99d1c0
MM
17722003-02-18 Mark Mitchell <mark@codesourcery.com>
1773
1774 PR c++/9704
1775 * class.c (layout_class_type): In the 3.2 ABI, take into account
1776 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1777
2b59501b 17782003-02-18 Matt Austern <austern@apple.com>
40a4184c 1779
2b59501b
MA
1780 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1781 nothing for C++.
1782 * cp/decl.c (wrapup_globals_for_namespace): Remove special
1783 handling of global namespace.
40a4184c 1784
e17aafd1
GK
17852003-02-18 Geoffrey Keating <geoffk@apple.com>
1786
1787 * cp-tree.h (rid_to_yy): Delete.
1788 (C_RID_YYCODE): Delete.
1789 (finish_file): Delete redundant declaration.
1790
04b03085
JM
17912003-02-18 Jason Merrill <jason@redhat.com>
1792
1793 PR c++/9623
1794 * decl.c (reshape_init): Don't mess with initializer labels.
1795
08162287
JM
1796 PR c++/9485
1797 * parser.c (cp_parser_postfix_expression): Set idk properly for
1798 object->scope::member.
1799
bf7c02dd
BE
18002003-02-18 Ben Elliston <bje@redhat.com>
1801
1802 PR other/7350
1803 * decl.c (duplicate_decls): Fix typo in comment.
1804
0f3a8219
MEC
18052003-02-17 Michael Elizabeth Chastain <mec@shout.net>
1806
c7adfa01 1807 PR debug/9717
0f3a8219
MEC
1808 * class.c (build_base_field): Mark fields for base classes with
1809 DECL_IGNORED_P.
1810
db77ef4c
KL
18112003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1812
1813 PR c++/9457
1814 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1815 CONSTRUCTOR_ELTS only once.
1816
0df4ae96
KL
18172003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1818
1819 PR c++/9459
1820 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1821 (dump_type_suffix): Likewise.
1822
86ac0575
NS
18232003-02-14 Nathan Sidwell <nathan@codesourcery.com>
1824
1825 * search.c: ANSIfy function declarations and definitions.
1826 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1827 * call.c (build_method_call, resolve_scoped_fn_name,
1828 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1829 calls.
1830 * class.c (handle_using_decl): Likewise.
1831 * decl.c (make_typename_type, make_unmound_class_template,
1832 start_decl, compute_array_index_type): Likewise.
1833 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1834 * init.c (expand_member_init, build_member_call): Likewise.
1835 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1836 resolve_typename_type): Likewise.
1837 * typeck.c (lookup_destructor, finish_class_member_access_exprm
1838 build_prememfunc_access_expr): Likewise.
1839
fd295cb2
GDR
18402003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1841
1842 * decl2.c: Include "timevar.h".
1843 (namespace_ancestor): Time name lookup.
1844 (add_using_namespace): Likewise.
1845 (lookup_using_namespace): Likewise.
1846 (qualified_lookup_using_namespace): Likewise.
1847 (decl_namespace): Likewise.
1848 (lookup_arg_dependent): Likewise.
1849 * lex.c (do_identifier): Likewise.
1850 (do_scoped_id): Likewise.
1851 * pt.c (lookup_template_class): Likewise.
1852
62ed060f
AP
18532003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
1854
d9b2742a 1855 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
40a4184c 1856
22ffcc6f
GDR
18572003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1858
1859 * decl.c: Include "timevar.h".
1860 (poplevel): Time name lookup.
1861 (find_binding): Likewise.
1862 (push_namespace): Likewise.
1863 (pop_nested_namespace): Likewise.
1864 (store_bindings): Likewise.
1865 (maybe_push_to_top_level): Likewise.
1866 (pop_from_top_level): Likewise.
1867 (push_local_name): Likewise.
1868 (pushtag): Likewise.
1869 (pushdecl): Likewise.
1870 (pushdecl_with_scope): Likewise.
1871 (pushdecl_namespace_level): Likewise.
1872 (pushdecl_top_level): Likewise.
1873 (pushdecl_class_level): Likewise.
1874 (push_class_level_binding): Likewise.
1875 (push_using_decl): Likewise.
1876 (push_using_directive): Likewise.
1877 (push_overloaded_decl): Likewise.
1878 (lookup_label): Likewise.
1879 (define_label): Likewise.
1880 (lookup_tag): Likewise.
1881 (lookup_tag_reverse): Likewise.
1882 (lookup_namespace_name): Likewise.
1883 (select_decl): Likewise.
1884 (unqualified_namespace_lookup): Likewise.
1885 (lookup_name_real): Likewise.
1886 (lookup_name_current_level): Likewise.
1887 (lookup_type_current_level): Likewise.
1888 (maybe_inject_for_scope_var): Likewise.
1889 (xref_tag): Likewise.
1890
1891 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
40a4184c 1892
6a540f3c
PE
18932003-02-12 Phil Edwards <pme@gcc.gnu.org>
1894
1895 * decl.c (build_enumerator): Remove unneeded test.
1896
7a93f739
DN
18972003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
1898
1899 * cp-tree.h (struct lang_type_header): Make all fields unsigned
1900 char.
1901
b80f8ef3
MM
19022003-02-03 Mark Mitchell <mark@codesourcery.com>
1903
1904 PR c++/7129
1905 * call.c (z_candidate): Add args.
1906 (convert_class_to_reference): Set it.
1907 (implicit_conversion): Tidy.
1908 (add_candidate): Add args parameter.
1909 (add_function_candidate): Adjust call to add_candidate.
1910 (add_conv_candidate): Likewise.
1911 (build_builtin_candidate): Likewise.
1912 (build_user_type_conversion_1): Eliminate wasteful tree_cons
1913 usage.
1914 (build_new_function_call): Likewise.
1915 (build_object_call): Likewise.
1916 (add_candidates): New function.
1917 (build_new_op): Use it.
1918 (covert_like_real): Adjust call to build_over_call.
1919 (build_over_call): Remove args parameter.
1920 * operators.def: Add <?= and >?=.
1921
271bd540
RS
19222003-02-01 Richard Sandiford <rsandifo@redhat.com>
1923
1924 * typeck.c (build_indirect_ref): Don't check flag_volatile.
1925
db0f613d
KL
19262003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1927
1928 PR c++/8849
1929 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1930
1824b90d
NS
19312003-01-31 Nathan Sidwell <nathan@codesourcery.com>
1932
1933 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1934 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1935 (BINFO_LANG_ELTS): New #define.
1936 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1937
f099d360
GK
19382003-01-30 Geoffrey Keating <geoffk@apple.com>
1939
1940 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1941
5552b43c
MM
19422003-01-30 Mark Mitchell <mark@codesourcery.com>
1943
1944 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1945 for class types.
1946 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1947 rather than TYPE_LANG_FLAG_0.
1948 (TYPE_BUILT_IN): Remove.
1949 (TYPE_DEPENDENT_P): New macro.
1950 (TYPE_DEPENDENT_P_VALID): Likewise.
1951 (lang_type_class): Add fields_readonly.
1952 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1953 * pt.c (dependent_type_p_r): New function, split out from ...
1954 (dependent_type_p): ... here. Memoize results.
1955 * search.c (dependent_base_p): Use dependent_type_p, not
1956 uses_template_parms.
1957 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1958 for class types.
1959
14d22dd6
MM
19602003-01-29 Mark Mitchell <mark@codesourcery.com>
1961
1962 * call.c (build_field_call): Use build_new_op, not build_opfncall.
1963 (prep_operand): New function.
1964 (build_new_op): Use it. Remove dead code.
1965 * class.c (pushclass): Change "modify" parameter type from int to
1966 bool.
1967 (currently_open_class): Use same_type_p, not pointer equality.
1968 (push_nested_class): Adjust calls to pushclass, remove modify
1969 parameter.
1970 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1971 (pushclass): Change prototype.
1972 (push_nested_class): Likewise.
1973 (grokoptypename): Remove.
1974 (build_opfncall): Remove.
1975 (value_dependent_expression_p): Declare.
1976 (resolve_typename_type): Likewise.
1977 (resolve_typename_type_in_current_instantiation): Likewise.
1978 (enter_scope_of): Remove.
1979 (tsubst): Remove.
1980 (tsubst_expr): Likewise.
1981 (tsubst_copy): Likewise.
1982 (tsubst_copy_and_build): Likewise.
1983 * decl.c (warn_about_implicit_typename_lookup): Remove.
1984 (finish_case_label): Return error_mark_node for erroneous labels.
1985 (start_decl): Adjust calls to push_nested_class.
1986 (grokfndecl): Call push_scope/pop_scope around call to
1987 duplicate_decls.
1988 (grokdeclarator): Do not call tsubst.
1989 (start_function): Adjust calls to push_nested_class.
1990 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1991 (check_classfn): Use push_scope/pop_scope around type comparisions.
1992 (grokoptypename): Remove.
1993 (push_sscope): Adjust call to push_nested_class.
1994 * error.c (dump_type): Show cv-qualification of typename types.
1995 * init.c (build_member_call): Use build_new_op, not
1996 build_opfncall.
1997 * method.c (build_opfncall): Remove.
1998 * parser.c (cp_parser): Add allow_non_constant_expression_p and
1999 non_constant_expression_p.
2000 (cp_parser_constant_expression): Adjust prototype.
2001 (cp_parser_resolve_typename_type): Remove.
2002 (cp_parser_non_constant_expression): New function.
2003 (cp_parser_non_constant_id_expression): Likewise.
2004 (cp_parser_new): Set allow_non_constant_expression_p and
2005 non_constant_expression_p.
2006 (cp_parser_primary_expression): Reject `this' and `va_arg' in
2007 constant-expressions. Note that dependent names aren't really
2008 constant.
2009 (cp_parser_postfix_expression): Reject conversions to non-integral
2010 types in constant-expressions. Neither are increments or
2011 decrements.
2012 (cp_parser_unary_expression): Reject increments and decrements in
2013 constant-expressions.
2014 (cp_parser_direct_new_declarator): Adjust call to
2015 cp_parser_constant_expression.
2016 (cp_parser_cast_expression): Reject conversions to non-integral
2017 types in constant-expressions.
2018 (cp_parser_assignment_expression): Rejects assignments in
2019 constant-expressions.
2020 (cp_parser_expression): Reject commas in constant-expressions.
2021 (cp_parser_labeled_statement): Adjust call to
2022 cp_parser_constant_expression.
2023 (cp_parser_direct_declarator): Simplify array bounds, even in
2024 templates, when they are non-dependent. Use
2025 resolve_typename_type, not cp_parser_resolve_typename_type.
2026 (cp_parser_class_head): Use resolve_typename_type, not
2027 cp_parser_resolve_typename_type.
2028 (cp_parser_member_declaration): Adjust call to
2029 cp_parser_constant_expression.
2030 (cp_parser_constant_initializer): Likewise.
2031 (cp_parser_constructor_declarator): Use resolve_typename_type, not
2032 cp_parser_resolve_typename_type.
2033 (cp_parser_late_parsing_default_args): Adjust call to
2034 push_nested_class.
2035 * pt.c (tsubst): Give it internal linkage.
2036 (tsubst_expr): Likewise.
2037 (tsubst_copy): Likewise.
2038 (tsubst_copy_and_build): Likewise.
2039 (push_access_scope_real): Likewise.
2040 (tsubst_friend_class): Likewise.
2041 (instantiate_class_template): Adjust call to pushclass.
2042 (value_dependent_expression_p): Give it external linkage.
2043 Robustify.
2044 (resolve_typename_type): New function.
2045 * semantics.c (finish_call_expr): Use build_new_op, not
2046 build_opfncall.
2047 (begin_constructor_declarator): Remove.
2048 (begin_class_definition): Adjust call to pushclass.
2049 (enter_scope_of): Remove.
2050 * typeck.c (comptypes): Resolve typename types as appropriate.
2051 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2052 (build_x_compound_expr): Likewise.
2053 (build_modify_expr): Likewise.
2054 (build_x_modify_expr): Likewise.
2055 * typeck2.c (build_x_arrow): Likewise.
40a4184c 2056
be5a07ac
FJ
20572003-01-29 Fariborz Jahanian <fjahanian@apple.com>
2058
d9b2742a 2059 * pt.c (last_pending_template) Declare GTY().
be5a07ac 2060
710b73e6
KL
20612003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2062
2063 PR c++/8591
2064 * parser.c (cp_parser_elaborated_type_specifier): Convert
2065 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2066 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2067
f2ce60b8
NS
20682003-01-28 Nathan Sidwell <nathan@codesourcery.com>
2069
9ae58faf
NS
2070 PR c++/9437
2071 * pt.c (unify): Don't unify '*T' with 'U C::*'.
2072
f2ce60b8
NS
2073 PR c++/3902
2074 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2075 inside a declarator.
2076
a2ddc397
NS
20772003-01-27 Nathan Sidwell <nathan@codesourcery.com>
2078
2079 * class.c (update_vtable_entry_for_fn): Add index parameter.
2080 Generate vcall thunk for covariant overriding from a virtual
2081 primary base.
2082 (dfs_modify_vtables): Adjust.
2083
bbaab916
NS
20842003-01-25 Nathan Sidwell <nathan@codesourcery.com>
2085
2086 PR c++/9403
2087 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2088 template keyword.
2089 (cp_parser_base_specifier): Look for and consume a
2090 TEMPLATE keyword. Replace switch with array index.
2091
2092 PR c++/795
2093 * semantics.c (finish_non_static_data_member): Remember the
2094 field's type even in a template.
2095
2096 PR c++/9415
2097 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2098 already scoped.
40a4184c 2099
bbaab916
NS
2100 PR c++/8545
2101 * parser.c (cp_parser_cast_expression): Be more tentative.
2102
fb8eab96
KL
21032003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2104
2105 * cp-tree.h (flagged_type_tree_s): Remove.
2106 (check_for_new_type): Likewise.
2107 * typeck2.c (check_for_new_type): Likewise.
2108
c38e9817
NN
21092003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
2110
ee42dd9d
NN
2111 * dump.c: ANSIfy function declarations and definitions.
2112
c38e9817
NN
2113 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
2114
c006d942
MM
21152003-01-22 Mark Mitchell <mark@codesourcery.com>
2116
2117 PR c++/9354
2118 * init.c (build_new): Set the type of the new-expression, even
2119 when processing_templte_decl.
2120
2121 PR c++/9216
2122 * parser.c (cp_parser_primary_expression): Improve error message
2123 for templates used in an expression context.
2124
2125 PR c++/8696
2126 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2127 parse when encountering "typedef".
2128
94edc4ab
NN
21292003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2130
2131 * class.c, parser.c: ANSIfy function definitions and declarations.
2132
e0860732
MM
21332003-01-22 Mark Mitchell <mark@codesourcery.com>
2134
65a5559b
MM
2135 PR c++/9328
2136 * error.c (dump_decl): For an OVERLOAD, just print the name of the
2137 function; it doesn't make sense to try to print its type.
2138 * semantics.c (finish_typeof): Issue errors about invalid uses.
2139
e0860732
MM
2140 PR c++/9298
2141 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2142 function.
2143 (cp_parser_expression_statement): Use it.
2144 (cp_parser_explicit_instantiation): Likewise.
2145 * pt.c (do_decl_instantiation): Improve error handling logic.
40a4184c 2146
1fb3244a
MM
21472003-01-22 Mark Mitchell <mark@codesourcery.com>
2148
4eb6d609
MM
2149 PR c++/9384
2150 * parser.c (cp_parser_using_declaration): Issue error messages
2151 about name resolution failures here.
2152
1fb3244a
MM
2153 PR c++/9388
2154 * class.c (currently_open_derived_class): Use dependent_type_p.
2155 * cp-tree.h (dependent_type_p): New function.
2156 (dependent_template_arg_p): Likewise.
2157 (dependent_template_p): Likewise.
2158 (type_dependent_expression_p): Likewise.
2159 * parser.c (cp_parser_dependent_type_p): Remove.
2160 (cp_parser_value_dependent_type_p): Likewise.
2161 (cp_parser_type_dependent_expression_p): Likewise.
2162 (cp_parser_dependent_template_arg_p): Likewise.
2163 (cp_parser_dependent_template_id_p): Likewise.
2164 (cp_parser_dependent_template_p): Likewise.
2165 (cp_parser_diagnose_invalid_type_name): Replace
2166 cp_parser_dependent_type_p with dependent_type_p, etc.
2167 (cp_parser_primary_expresion): Likewise.
2168 (cp_parser_nested_name_specifier_opt): Likewise.
2169 (cp_parser_postfix_expression): Likewise.
2170 (cp_parser_unary_expression): Likewise.
2171 (cp_parser_template_name): Likewise.
2172 (cp_parser_class_name): Likewise.
2173 (cp_parser_lookup_name): Likewise.
2174 * pt.c (dependent_type_p): New function.
2175 (value_dependent_expression_p): Likewise.
2176 (type_dependent_expression_p): Likewise.
2177 (dependent_template_arg_p): Likewise.
2178 (dependent_template_id_p): Likewise.
2179 (dependent_template_p): Likewise.
40a4184c 2180
1fb3244a
MM
2181 PR c++/9285
2182 PR c++/9294
00b51d29 2183 * parser.c (cp_parser_simple_declaration): Return quickly when
d9b2742a 2184 encountering errors.
1fb3244a 2185
dd859b8a
KG
21862003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2187
2188 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2189
753225c1
JM
21902003-01-17 Jason Merrill <jason@redhat.com>
2191
2192 PR c++/9167, c++/9358
2193 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2194
77b996cc
JM
21952003-01-17 Jason Merrill <jason@redhat.com>
2196
2197 PR c++/9342
2198 * call.c (build_conditional_expr): Always do lvalue-rvalue
2199 conversion.
2200
5dae1114
MM
22012003-01-17 Mark Mitchell <mark@codesourcery.com>
2202
2203 PR c++/9294
2204 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2205 * cp-tree.h (BASELINK_BINFO): Adjust.
2206 (BASELINK_FUNCTIONS): Likewise.
2207 (BASELINK_ACCESS_BINFO): Likewise.
2208 (tree_baselink): New structure.
2209 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2210 (lang_tree_node): Add baselink.
2211 * decl.c (cp_tree_node_structure): Add BASELINK case.
2212 * search.c (build_baselink): Adjust.
2213 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
2214 test from TREE_LIST case.
2215
2216 PR c++/9272
2217 * parser.c (cp_parser_constructor_declarator_p): Do not assume
2218 that a constructor cannot be declared outside of its own class.
40a4184c 2219
5dae1114
MM
2220 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2221 be resolved, neither can the qualified name.
2222
2223 * rtti.c (get_pseudo_ti_desc): Fix thinko.
2224
a48cccea
JM
22252003-01-16 Jason Merrill <jason@redhat.com>
2226
2227 PR c++/8564
2228 * init.c (build_vec_init): Re-add maxindex parm.
2229 (perform_member_init, build_aggr_init): Pass it.
2230 (build_new_1): Pass it. Use an incomplete array type for full_type.
2231 * typeck.c (build_modify_expr): Pass it.
2232 * cp-tree.h: Adjust.
2233
cc23546e
JO
22342003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
2235
2236 * cp-tree.h (tsubst_copy_and_build): New declaration.
2237 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2238 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
2239 (tsubst_copy_and_build): New function.
2240
8fbc5ae7
MM
22412003-01-16 Mark Mitchell <mark@codesourcery.com>
2242
2243 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2244 (PARTIAL_INSTANTIATION_P): Remove.
2245 (IMPLICIT_TYPENAME_P): Likewise.
2246 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2247 (build_typename_type): Remove declaration.
2248 (parmlist_is_exprlist): Likewise.
2249 * decl.c (build_typename_type): Make it static, remove third
2250 parameter.
2251 (push_class_binding): Don't do implicit typename stuff.
2252 (make_typename_type): Likewise.
2253 (lookup_name_real): Likewise.
2254 (grokdeclarator): Don't try to convert declarations into
2255 initializations. Don't do implicit typename stuff.
2256 (parmlist_is_exprlist): Remove.
2257 (xref_basetypes): Simplify.
2258 * decl2.c (grokfield): Don't try to convert declarations into
2259 initializations.
2260 (build_anon_union_vars): Do this while processing templates, too.
2261 (finish_anon_union): Likewise.
2262 * error.c (dump_type): Remove implicit typename handling.
2263 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2264 (cp_parser_primary_expression): Correct handling of names not
2265 found by unqualified name lookup in templates.
2266 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2267 of types when possible.
2268 (cp_parser_simple_declaration): Complain intelligently about some
2269 invalid declarations.
2270 (cp_parser_member_declaration): Likewise.
2271 (cp_parser_constructor_declarator_p): Don't check when we're in a
2272 function scope.
2273 * pt.c (instantiate_class_template): Remove
2274 PARTIAL_INSTANTIATION_P gunk.
2275 * search.c (lookup_field_r): Don't build implicit typenames.
2276 (marked_pushdecls_p): Don't enter dependent base types.
2277 (unmarked_pushdecls_p): Likewise.
2278 * semantics.c (begin_class_definition): Remove implicit typename
2279 stuff.
2280
712becab
NS
22812003-01-16 Nathan Sidwell <nathan@codesourcery.com>
2282
2283 PR c++/9212
2284 * parser.c (cp_parser_direct_declarator): If accepting either
2285 abstract or named, the name must be an unqualified-id.
2286
fc555370
KG
22872003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2288
2289 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2290
dd1b7476
KG
22912003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2292
2293 * decl2.c (check_classfn): Fix uninitialized warning.
2294 (build_anon_union_vars): Likewise.
2295 * pt.c (tsubst_copy): Likewise.
2296
a7189b49
JO
22972003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
2298
2299 Further conform g++'s __vmi_class_type_info to the C++ ABI
2300 specification.
2301 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2302 the specification.
2303 (class_hint_flags): Likewise.
2304
cf22909c
KL
23052003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2306
2307 * config-lang.in: Add semantics.c to gtfiles.
2308 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2309 (saved_scope): Likewise.
2310 (type_lookups): Remove.
2311 (deferred_access): New structure.
2312 (type_access_control): Remove.
2313 (save_type_access_control): Likewise.
2314 (reset_type_access_control): Likewise.
2315 (decl_type_access_control): Likewise.
2316 (push_deferring_access_checks): Declare.
2317 (resume_deferring_access_checks): Likewise.
2318 (stop_deferring_access_checks): Likewise.
2319 (pop_deferring_access_checks): Likewise.
2320 (get_deferred_access_checks): Likewise.
2321 (pop_to_parent_deferring_access_checks): Likewise.
2322 (perform_deferred_access_checks): Likewise.
2323 (perform_or_defer_access_check): Likewise.
2324 * decl.c (make_typename_type): Use perform_or_defer_access_check.
2325 (make_unbound_class_template): Likewise.
2326 (grokdeclarator): Don't call decl_type_access_control.
2327 * parser.c (cp_parser_context): Remove deferred_access_checks
2328 and deferring_access_checks_p fields.
2329 (cp_parser_context_new): Adjust.
2330 (cp_parser): Remove access_checks_lists.
2331 (cp_parser_defer_access_check): Remove.
2332 (cp_parser_start_deferring_access_checks): Remove.
2333 (cp_parser_stop_deferring_access_checks): Remove.
2334 (cp_parser_perform_deferred_access_checks): Remove.
2335 (cp_parser_nested_name_specifier_opt): Use new deferred access
2336 functions.
2337 (cp_parser_simple_declaration): Likewise.
2338 (cp_parser_template_id): Likewise.
2339 (cp_parser_function_definition): Likewise.
2340 (cp_parser_class_specifier): Likewise.
2341 (cp_parser_lookup_name): Likewise.
2342 (cp_parser_single_declaration): Likewise.
2343 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2344 (cp_parser_parse_tentatively): Likewise.
2345 (cp_parser_parse_definitely): Likewise.
2346 (yyparse): Likewise.
2347 (cp_parser_init_declarator): Remove access_checks parameter.
2348 Use new deferred access functions.
2349 (cp_parser_function_definition_from_specifiers_and_declarator):
2350 Likewise.
2351 (cp_parser_class_head): Remove deferring_access_checks_p and
2352 saved_access_checks parameters. Use new deferred access functions.
2353 (cp_parser_member_specification_opt): Don't call
2354 reset_type_access_control.
2355 * search.c (type_access_control): Remove.
2356 * semantics.c: Include "gt-cp-semantics.h".
2357 (deferred_type_access_control): Remove.
2358 (deferred_access_stack): New variable.
2359 (deferred_access_free_list): Likewise.
2360 (push_deferring_access_checks): New function.
2361 (resume_deferring_access_checks): Likewise.
2362 (stop_deferring_access_checks): Likewise.
2363 (pop_deferring_access_checks): Likewise.
2364 (get_deferred_access_checks): Likewise.
2365 (pop_to_parent_deferring_access_checks): Likewise.
2366 (perform_deferred_access_checks): New function, adapted from
2367 cp_parser_perform_deferred_access_checks.
2368 (perform_or_defer_access_check): New function, adapted from
2369 cp_parser_defer_access_check.
2370 (current_type_lookups): Remove.
2371 (deferred_type_access_control): Likewise.
2372 (decl_type_access_control): Likewise.
2373 (save_type_access_control): Likewise.
2374 (reset_type_access_control): Likewise.
2375 (begin_function_definition): Adjust.
2376 (begin_class_definiton): Likewise.
2377
f576dfc4
JM
23782003-01-13 Jason Merrill <jason@redhat.com>
2379
2380 PR c++/8748
2381 * class.c (build_base_path): Take the address before calling save_expr.
2382
2383 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2384 all the ambiguous conversions are bad.
2385
2386 * class.c (maybe_warn_about_overly_private_class): Don't stop
2387 searching when we find a nonprivate method.
2388
2389 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2390
8fa1ad0e
MM
23912003-01-12 Mark Mitchell <mark@codesourcery.com>
2392
2393 * cp-tree.h (get_arglist_len_in_bytes): Remove.
2394
2395 PR c++/9264
2396 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2397 typeame types more robustly.
2398
15d2cb19
PE
23992003-01-11 Phil Edwards <pme@gcc.gnu.org>
2400
2401 * parser.c: Fix comment typos.
2402
a6f6052a
MM
24032003-01-10 Mark Mitchell <mark@codesourcery.com>
2404
99152b95 2405 PR c++/9099
a6f6052a
MM
2406 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2407 an object_type which is not a class type.
2408
3466b292
GK
24092003-01-10 Geoffrey Keating <geoffk@apple.com>
2410
2411 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2412 (cp_parser_late_parsing_default_args): Likewise.
2413
b2f29cd9
NN
24142003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
2415
2416 * cfns.gperf: ANSIfy function declarations.
2417 * cfns.h: Regenerate.
2418 * cp-tree.h: ANSIfy function declarations.
2419
2050a1bb
MM
24202003-01-10 Mark Mitchell <mark@codesourcery.com>
2421
2422 * cp-tree.h (reparse_absdcl_as_expr): Remove.
2423 (reparse_absdcl_as_casts): Likewise.
2424 (reparse_decl_as_expr): Likewise.
2425 (finish_decl_parsing): Likewise.
2426 * decl2.c (reparse_absdcl_as_expr): Remove.
2427 (reparse_absdcl_as_casts): Likewise.
2428 (repase_decl_as_expr): Likewise.
2429 (finish_decl_parsing): Likewise.
2430
2431 PR c++/9128
2432 PR c++/9153
2433 PR c++/9171
2434 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2435 function.
2436 (cp_parser_nested_name_specifier_opt): Correct the
2437 check_dependency_p false.
2438 (cp_parser_postfix_expression): Fix formatting.
2439 (cp_parser_decl_specifier_seq): Avoid looking for constructor
2440 declarators when possible.
2441 (cp_parser_template_id): Avoid performing name-lookup when
2442 possible.
2443 (cp_parser_class_head): Do not count specializations when counting
2444 levels of templates.
2445 (cp_parser_constructor_declarator_p): Return immediately if
2446 there's no chance that the tokens form a constructor declarator.
2447 * rtti.c (throw_bad_typeid): Add comment. Do not return an
2448 expression with reference type.
2449 (get_tinfo_decl_dynamic): Do not return an expression with
2450 reference type.
2451 (build_typeid): Add comment. Do not return an expression with
2452 reference type.
2453 * typeck.c (build_class_member_access_expr): Improve handling of
2454 conditionals and comma-expressions as objects.
2455
45225759
NN
24562003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2457
d9b2742a
ZW
2458 * cfns.gperf: ANSIfy function declarations.
2459 * cfns.h: Regenerate.
2460 * cp-tree.h: ANSIfy function declarations.
2461 * parser.c: ANSIfy function declarations & definitions.
b2f29cd9 2462
45225759
NN
2463 * decl.c (bad_specifiers): Fix parameter order error I introduced.
2464
17211ab5
GK
24652003-01-09 Geoffrey Keating <geoffk@apple.com>
2466
2467 Merge from pch-branch:
2468
2469 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2470
2471 Merge to tag pch-merge-20030102:
40a4184c 2472
17211ab5
GK
2473 * semantics.c (finish_translation_unit): Don't call finish_file.
2474 * parser.c: Don't include ggc.h.
2475 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2476 read first token here. Don't allow PCH files after the first
2477 token is read.
2478 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2479 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2480 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2481 (cp_parser_late_parsing_for_member): Don't duplicate call to
2482 cp_lexer_set_source_position_from_token.
2483 (cp_parser_late_parsing_default_args): Likewise.
2484 (yyparse): Call finish_file after clearing the_parser.
2485
2486 2002-12-11 Geoffrey Keating <geoffk@apple.com>
2487
2488 * Make-lang.in: Remove $(GGC_H) from all dependencies.
2489 (CXX_TREE_H): Add $(GGC_H).
40a4184c 2490 * class.c: Don't include ggc.h.
17211ab5
GK
2491 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2492 (method_name_cmp): Likewise.
2493 (resort_data): New variable.
2494 (resort_field_decl_cmp): New.
2495 (resort_method_name_cmp): New.
2496 (resort_sorted_fields): New.
2497 (resort_type_method_vec): New.
2498 (finish_struct_methods): Delete cast.
2499 (finish_struct_1): Delete cast.
2500 * cp-tree.h: Include ggc.h.
2501 (struct lang_type_class): Add reorder attribute to field `methods'.
2502 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2503 (resort_sorted_fields): New prototype.
2504 (resort_type_method_vec): New prototype.
2505 * call.c: Don't include ggc.h.
2506 * decl.c: Likewise.
2507 * decl2.c: Likewise.
2508 * init.c: Likewise.
2509 * lex.c: Likewise.
2510 * method.c: Likewise.
2511 * optimize.c: Likewise.
2512 * parse.y: Likewise.
2513 * pt.c: Likewise.
2514 * repo.c: Likewise.
2515 * search.c: Likewise.
2516 * semantics.c: Likewise.
2517 * spew.c: Likewise.
2518 * tree.c: Likewise.
2519
2520 * lang-specs.h: Remove comment.
2521
2522 2002-12-03 Geoffrey Keating <geoffk@apple.com>
2523
2524 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2525 (operator_name_info): Mark to be saved for PCH, specify size.
2526 (assignment_operator_name_info): Likewise.
2527
2528 2002-11-19 Geoffrey Keating <geoffk@apple.com>
2529
2530 * decl.c (anon_cnt): Mark to be saved for PCH.
2531
2532 2002-10-25 Geoffrey Keating <geoffk@apple.com>
2533
2534 * lex.c (init_reswords): Delete now-untrue comment.
2535 Allocate ridpointers using GGC.
2536
2537 2002-10-04 Geoffrey Keating <geoffk@apple.com>
2538
2539 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2540
2541 * g++spec.c (lang_specific_driver): Don't include standard
2542 libraries in `added'.
2543
2544 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
2545
2546 * decl2.c (finish_file): Call c_common_write_pch.
2547 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2548
2549 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
2550
2551 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2552 files when using g++.
2553 * lang-specs.h: Handle compiling C++ header files.
2554
ca5dd8b7
JJ
25552003-01-09 Jakub Jelinek <jakub@redhat.com>
2556
2557 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2558
0f399e5f
KL
25592003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2560
2561 * pt.c (push_access_scope_real): Call push_to_top_level for
2562 function in namespace scope.
2563 (pop_access_scope): Call pop_from_top_level for function in
2564 namespace scope.
2565
c456a45a
JJ
25662003-01-09 Jakub Jelinek <jakub@redhat.com>
2567
2568 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2569
2c6ce97e
CC
25702003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2571
2572 * Make-lang.in (c++.install-common, c++.install-man,
2573 c++.uninstall): Prepend $(DESTDIR) to destination paths in
2574 all (un)installation commands.
2575 (c++.install-common): Rewrite $(LN) commands to support
2576 DESTDIR with "ln" as well as with "ln -s".
2577
f74dbcec
JM
25782003-01-08 Jason Merrill <jason@redhat.com>
2579
2580 * parser.c (cp_parser_primary_expression): See through explicitly
2581 scoped ALIAS_DECLs, too.
2582
11f6b451
NN
25832003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2584
1774f99d
NN
2585 * decl.c: Remove some #if 0 code.
2586
11f6b451
NN
2587 * decl.c: ANSIfy function declarations.
2588
8caf4c38
MM
25892003-01-07 Mark Mitchell <mark@codesourcery.com>
2590
2591 * parser.c (cp_parser_asm_definition): Correct handling of omitted
2592 operands.
2593
2b59fc25
KL
25942003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2595
2596 PR c++/9030
2597 * decl.c (make_typename_type): Check access only when tf_error.
2598 (make_unbound_class_template): Likewise.
2599 * pt.c (saved_access_scope): New variable.
2600 (push_access_scope_real): New function.
2601 (push_access_scope): Likewise.
2602 (pop_access_scope): Likewise.
2603 (tsubst_default_argument): Use them.
2604 (instantiate_template): Likewise.
2605 (regenerate_decl_from_template): Likewise.
2606 (instantiate_decl): Likewise.
2607 (get_mostly_instantiated_function_type): Likewise.
2608
3f7617e4
NN
26092003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
2610
2611 * tree.c: Delete bogus #if 0 code.
2612
c9372112
AS
26132003-01-07 Andreas Schwab <schwab@suse.de>
2614
2615 * class.c (layout_class_type): Don't use
2616 PCC_BITFIELD_TYPE_MATTERS if not defined.
2617
8218bd34
MM
26182003-01-06 Mark Mitchell <mark@codesourcery.com>
2619
c10cdb3d
MM
2620 PR c++/9165
2621 * decl2.c (build_cleanup): Mark the object as used.
2622
69f794a7
MM
2623 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2624 (hash_local_specialization): New function.
2625 (register_local_specialization): Revert 2003-01-05 change.
2626 (instantiate_decl): Use hash_local_specialization when creating
2627 the local_specializations table.
40a4184c 2628
4c4646b5
MM
2629 * decl2.c (mark_used): Do not synthesize thunks.
2630
63e5f567
MM
2631 * class.c (layout_class_type): Correct handling of unnamed
2632 bitfields wider than their types.
2633
8218bd34
MM
2634 PR c++/9189
2635 * parser.c (cp_parser): Remove default_arg_types. Update
2636 documentation for unparsed_functions_queues.
2637 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2638 parameter.
2639 (cp_parser_new): Don't set parser->default_arg_types.
2640 (cp_parser_function_definition): Adjust usage of
2641 unparsed_funtions_queues.
2642 (cp_parser_class_specifier): Don't mess with
2643 parser->default_arg_types. Handle default argument processing in
2644 a separate phase from function body processing.
2645 (cp_parser_template_declaration_after_export): Adjust usage of
2646 unparsed_functions_queues.
2647 (cp_parser_late_parsing_for_member): Do not handle default
2648 arguments.
2649
62b8a44e
NS
26502003-01-06 Nathan Sidwell <nathan@codesourcery.com>
2651
2652 PR c++/9109
2653 * parser.c (cp_parser_declarator_kind): New enum.
2654 (cp_parser_declarator): Adjust.
2655 (cp_parser_direct_declarator): Adjust. Allow for either named or
2656 abstract declarator. Prefer abstract, if possible. Allow
2657 parenthesized function name.
2658 (cp_parser_condition): Adjust cp_parser_declarator call.
2659 (cp_parser_explicit_instantiation): Likewise.
2660 (cp_parser_init_declarator): Likewise.
2661 (cp_parser_type_id): Likewise.
2662 (cp_parser_function_definition): Likewise.
2663 (cp_parser_member_declaration): Likewise.
2664 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2665 the tentative parsing.
2666 (cp_parser_exception_declaration): Likewise.
2667
ec194454
MM
26682003-01-05 Mark Mitchell <mark@codesourcery.com>
2669
2670 * parser.c (cp_parser_template_parameter): Adjust call to
2671 cp_parser_parameter_declaration.
2672 (cp_parser_parameter_declaration_list): Likewise.
2673 (cp_parser_parameter_declaration): Replace
2674 greater_than_is_operator_p with template_parm_p parameter. Do not
2675 cache tokens for template default arguments.
2676
2677 * pt.c (retrieve_local_specialization): Use htab_find, not
2678 htab_find_with_hash.
2679 (register_local_specialization): Use htab_find_slot, not
2680 htab_find_slot_with_hash.
2681 (instantiate_decl): Pass a hash function to htab_create.
40a4184c 2682
39b1af70
KG
26832003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2684
2685 * parser.c (cp_parser_binary_expression,
2686 cp_parser_multiplicative_expression,
2687 cp_parser_additive_expression, cp_parser_shift_expression,
2688 cp_parser_relational_expression, cp_parser_equality_expression,
2689 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2690 cp_parser_inclusive_or_expression,
2691 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2692 cp_parser_binary_expression): Const-ify.
2693
1bb2cc34
MM
26942003-01-04 Mark Mitchell <mark@codesourcery.com>
2695
2696 * method.c (use_thunk): Disable access control while building the
2697 body of the thunk.
2698
3fd5abcf
NN
26992003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
2700
40a4184c 2701 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3fd5abcf
NN
2702 front end.
2703
9aad8f83
MA
27042003-01-03 Matt Austern <austern@apple.com>
2705
2706 * cp-tree.h (struct lang_type_class): add field for key method
2707 (cp_global_trees): rename dynamic_classes to keyed_classes
2708 (key_method): add definition
2709 * class.c (finish_struct_1): compute class's key method, and add
2710 the class to keyed_classes list if there is no key method.
2711 * decl.c (finish_function): add class to keyed_classes list if we
2712 see a definition of the class's key method.
2713 * pt.c (instantiate_class_template): add template specialization
2714 of a dynamic class to keyed_classes list.
2715 * decl2.c (key_method): remove
2716 (finish_file): iterate only through keyed_classes list when
2717 deciding whether to emit vtables, remove class from its list after
2718 we do the emission.
40a4184c 2719
6cce57b0
JM
27202003-01-02 Jason Merrill <jason@redhat.com>
2721
4e8dca1c
JM
2722 * call.c (build_conditional_expr): Stabilize lvalues properly.
2723 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2724 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2725 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2726
2727 * call.c (convert_like_real): Call decl_constant_value for an
2728 IDENTITY_CONV even if there are no more conversions.
2729
2730 * cvt.c (build_up_reference): Don't push unnamed temps.
2731
2732 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2733
2734 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2735 for a backend struct.
2736
2737 * except.c (wrap_cleanups_r, build_throw): Make
2738 MUST_NOT_THROW_EXPRs void.
2739 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2740
2741 * init.c (build_vec_delete_1): Pre-evaluate the base address.
2742
2743 * init.c (get_temp_regvar): Simplify logic.
2744
2745 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2746 our replacement is a decl.
2747
6cce57b0
JM
2748 * decl.c (cp_make_fname_decl): Push the decls inside the
2749 outermost scope.
2750
31758337
NS
27512003-01-03 Nathan Sidwell <nathan@codesourcery.com>
2752
2753 PR c++/45, c++/3784
2754 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2755 the same too.
2756
24c0ef37
GS
27572003-01-03 Graham Stott <graham.stott@btinternet.com>
2758
2759 * parser.c (struct cp_parser): Add access_checks_lists field
2760 (cp_parser_simple_declaration): Use.
40a4184c 2761 (cp_parser_init_declarator): Likewise.
24c0ef37 2762
5e8a153a
MM
27632003-01-02 Mark Mitchell <mark@codesourcery.com>
2764
1092805d
MM
2765 * parser.c (cp_parser_declaration): Accept the __extension__
2766 keyword before the declaration.
2767
4971227d
MM
2768 PR c++/2843
2769 * parser.c (cp_parser_parameter_declaration): Allow attributes to
2770 appear after the declarator.
2771
5e8a153a
MM
2772 * call.c (build_new_method_call): Fix typo in message format
2773 string.
2774
3beb3abf
MM
27752003-01-02 Mark Mitchell <mark@codesourcery.com>
2776
f7b5ecd9
MM
2777 * parser.c (cp_lexer_next_token_is): Declare it inline.
2778 (cp_lexer_set_source_position_from_token): Likewise.
2779 (cp_lexer_debugging_p): Likewise.
2780 (cp_parser_parsing_tentatively): Likewise.
2781 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2782 to the cp_lexer_peek_token.
1092805d 2783
3beb3abf
MM
2784 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2785 expression.
2786
43c6a96a
SB
27872003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2788
2789 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2790 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2791 cp/repo.c: Fix copyright years.
2792
c58b209a
NB
27932003-01-01 Neil Booth <neil@daikokuya.co.uk>
2794
2795 * lex.c: Remove superfluous include of cpplib.h.
2796 (CONSTRAINT): Define without conditions.
2797 (init_cp_pragma): Use c_register_pragma.
2798
7347c2c5
NB
27992002-12-31 Neil Booth <neil@daikokuya.co.uk>
2800
2801 * .cvsignore: Remove.
2802
f5adbb8d
SB
28032002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
2804
2805 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2806 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2807 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2808 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2809 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2810 copyright header.
2811 * lex.h: parse.y is dead, so don't mention it. Also replace the
2812 copyright header with the default GNU copyright header.
2813
f1aba0a5
MM
28142002-12-31 Mark Mitchell <mark@codesourcery.com>
2815
eea9800f
MM
2816 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2817 (lookup_name_namespace_only): Likewise.
2818 (begin_only_namespace_names): Likewise.
2819 (end_only_namespace_names): Likewise.
2820 * decl.c (only_namespace_names): Remove.
2821 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2822 (lookup_name_real): Do not check only_namespace_names.
2823 (lookup_name_namespace_only): Remove.
2824 (begin_only_namespace_names): Likewise.
2825 (end_only_namespace_names): Likewise.
2826 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2827 nested-name-specifiers more gracefully.
2828 (cp_parser_class_or_namespace_name): Avoid looking up namespace
2829 names when they cannot possibly appear.
2830 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2831 (cp_parser_elaborated_type_specifier): Likewise.
2832 (cp_parser_namespace_name): Only look for namespace names.
2833 (cp_parser_lookup_name): Add is_namespace parameter.
2834 (cp_parser_lookup_name_simple): Adjust call to
2835 cp_parser_lookup_name.
2836
f1aba0a5
MM
2837 * parser.c (cp_parser_dependent_type_p): Fix thinko.
2838
eea9800f
MM
28392002-12-31 Neil Booth <neil@daikokuya.co.uk>
2840
2841 * .cvsignore: Update.
2842
3cfabe60
NS
28432002-12-31 Nathan Sidwell <nathan@codesourcery.com>
2844
2845 * class.c (modify_vtable_entry): Remove unused variable.
2846 (get_vcall_index): Always expect a non-thunk.
2847 (update_vtable_entry_for_fn): Combine covariant adjustments, when
2848 overriding a thunk. Pass get_vcall_index a non-thunk.
2849
2850 * decl2.c (finish_file): Mark undefined inlines as extern.
2851
92bc1323
MM
28522002-12-31 Mark Mitchell <mark@codesourcery.com>
2853
2854 * cp-tree.def (RETURN_INIT): Remove.
2855 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2856 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2857 (note_level_for_for): Remove.
2858 (note_level_for_try): Likewise.
2859 (note_level_for_catch): Likewise.
2860 (finish_named_return_value): Likewise.
2861 (do_pushlevel): Change prototype.
2862 (pending_lang_change): Remove.
2863 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2864 sk_for.
2865 (note_level_for_for): Remove.
2866 (note_level_for_try): Likewise.
2867 (note_level_for_catch): Likewise.
2868 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2869 * parser.c (cp_parser_context_free_list): Make it "deletable".
2870 (cp_parser_template_argument): Remove misleading comment.
2871 * pt.c (tsubst_expr): Remove RETURN_INIT code.
2872 * semantics.c (genrtl_named_return_value): Remove.
2873 (do_pushlevel): Take a scope kind as an argument.
2874 (begin_if_stmt): Adjust.
2875 (begin_while_stmt): Likewise.
2876 (begin_for_stmt): Likewise.
2877 (finish_for_init_stmt): Likewise.
2878 (begin_switch_stmt): Likewise.
2879 (begin_handler): Likewise.
2880 (begin_compound_stmt): Likewise.
2881 (finish_named_return_value): Remove.
2882 (cp_expand_stmt): Remove RETURN_INIT case.
2883 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
43c6a96a 2884
abda8efe
MM
28852002-12-31 Mark Mitchell <mark@codesourcery.com>
2886
2887 PR c++/9112
2888 * parser.c (cp_parser_direct_declarator): Handle erroneous
2889 parenthesized declarators correctly.
2890
eddcae5a
GDR
28912002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2892
2893 * cp-tree.h (pending_lang_change): Declare.
2894
c838d82f
MM
28952002-12-30 Mark Mitchell <mark@codesourcery.com>
2896
e5976695
MM
2897 * parser.c (cp_parser_context_free_list): New variable.
2898 (cp_parser_context_new): Use it.
2899 (cp_parser_error): Check return code from
2900 cp_parser_simulate_error.
2901 (cp_parser_simulate_error): Return a value.
2902 (cp_parser_id_expression): Optimize common case.
2903 (cp_parser_class_name): Likewise.
2904 (cp_parser_class_specifier): Adjust call to
2905 cp_parser_late_parsing_default_args.
2906 (cp_parser_lookup_name): Optimize common case.
2907 (cp_parser_late_parsing_for_member): Adjust call to
2908 cp_parser_late_parsing_default_args.
2909 (cp_parser_late_parsing_default_args): Add scope parameter.
2910 (cp_parser_require): Avoid creating the error message unless it's
2911 needed.
2912 (cp_parser_parse_definitely): Place free'd contexts on the free
2913 list.
2914
c838d82f
MM
2915 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2916
c73aecdf
DE
29172002-12-30 David Edelsohn <edelsohn@gnu.org>
2918
2919 * parser.c (cp_parser_parameter_declaration_clause): Treat system
2920 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2921
b599b135
NN
29222002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2923
43c6a96a 2924 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
b599b135
NN
2925 GCC, not GNU CC.
2926
946d5e45
MM
29272002-12-30 Mark Mitchell <mark@codesourcery.com>
2928
afd9b9dd
MM
2929 * parse.y: Remove.
2930 * spew.c: Likewise.
2931 * Make-lang.in (gt-cp-spew.h): Remove.
2932 * cp-tree.h (do_pending_lang_change): Remove.
2933 (do_identifier): Change prototype.
2934 (finish_id_expr): Remove.
2935 * decl.c (lookup_name_real): Remove yylex variable.
2936 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2937 * lex.c (init_cpp_parse): Remove.
2938 (reduce_cmp): Likewise.
2939 (token_cmp): Likewise.
2940 (yychar): Likewise.
2941 (lastiddecl): Likewise.
2942 (token_count): Likewise.
2943 (reduce_count): Likewise.
2944 (yyhook): Likewise.
2945 (print_parse_statistics): Likewise.
2946 (do_pending_lang_change): Likewise.
2947 (do_identifier): Remove parsing parameter.
2948 * lex.h (lastiddecl): Remove.
2949 (looking_for_typename): Remove.
2950 (looking_for_template): Likewise.
2951 (pending_lang_change): Likewise.
2952 (yylex): Likewise.
2953 * semantics.c (finish_id_expr): Remove.
43c6a96a 2954
946d5e45
MM
2955 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2956 thread" correctly.
2957
1c313945
NN
29582002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
2959
2960 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
2961 end, not the C front end.
2962
8e268f72
NS
29632002-12-30 Nathan Sidwell <nathan@codesourcery.com>
2964
2965 * cp-tree.h (THUNK_TARGET): New macro.
2966 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2967 (finish_thunk): Remove offset parms.
2968 * class.c (find_final_overrider): Look through thunks.
2969 (get_vcall_index): Use THUNK_TARGET.
2970 (update_vtable_entry_for_fn): Look through thunks. Set covariant
2971 fixed offset here. Adjust finish_thunk call.
2972 (build_vtbl_initializer): Adjust finish_thunk calls.
2973 * mangle.c (mangle_call_offset): Remove superfluous if.
2974 (mangle_thunk): Adjust.
2975 * method.c (make_thunk): Adjust.
2976 (finish_thunk): Adjust.
2977 (thunk_adjust): Remove assert.
2978 (use_thunk): Use THUNK_TARGET
2979 * dump1.c (cp_dump_tree): Adjust thunk dumping.
2980
2981 PR c++/9054
2982 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2983 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2984
848eed92
GDR
29852002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2986
2987 Remove traditional C constructs 4/n.
2988 * decl2.c (grok_method_quals, warn_if_unknown_interface,
2989 grok_x_components, cp_build_parm_decl, build_artificial_parm,
2990 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2991 delete_sanity, check_member_template, check_java_method,
2992 check_classfn, finish_static_data_member_decl, grokfield,
2993 grokbitfield, grokoptypename, grok_function_init,
2994 cplus_decl_attributes, constructor_name, defer_fn,
2995 build_anon_union_vars, finish_anon_union, coerce_new_type,
2996 coerce_delete_type, comdat_linkage, maybe_make_one_only,
2997 key_method, import_export_vtable, import_export_class,
2998 output_vtable_inherit, import_export_decl, import_export_tinfo,
2999 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3000 set_guard, start_objects, finish_objects,
3001 start_static_storage_duration_function,
3002 finish_static_storage_duration_function, get_priority_info,
3003 start_static_initialization_or_destruction,
3004 finish_static_initialization_or_destruction,
3005 do_static_initialization, do_static_destruction,
3006 prune_vars_needing_no_initialization, write_out_vars,
3007 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3008 add_using_namespace, merge_functions, ambiguous_decl,
3009 lookup_using_namespace, lookup_using_namespace,
3010 qualified_lookup_using_namespace, set_decl_namespace,
3011 decl_namespace, current_decl_namespace, push_decl_namespace,
3012 pop_decl_namespace, push_scope, pop_scope, add_function,
3013 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3014 lookup_arg_dependent, do_namespace_alias,
3015 validate_nonmember_using_decl, do_nonmember_using_decl,
3016 do_toplevel_using_decl, do_local_using_decl,
3017 do_class_using_decl, do_using_directive, check_default_args,
3018 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
3019 * parser.c (cp_parser_class_head): Use booleanss.
3020 * decl.c (walk_globals, walk_vtables): Likewise.
3021 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3022 walk_globals): Change return type from 'int' to 'bool'.
3023 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3024 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3025 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3026 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3027 qualifier_flags, tinfo_base_init, generic_initializer,
3028 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3029 dfs_class_hint_unmark, class_hint_flags, class_initializer,
3030 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3031 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3032 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3033 * repo.c (repo_compile_flags, repo_template_declared,
3034 repo_template_defined, repo_class_defined, repo_get_id,
3035 repo_template_used, repo_vtable_used, repo_inline_used,
3036 repo_tinfo_used, repo_template_instantiated, extract_string,
3037 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3038 finish_repo): Likewise.
3039 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3040 cxx_print_xnode): Likewise..
3041 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3042 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3043 * cxxfilt.c (demangle_it, print_demangler_list, usage,
3044 standard_symbol_characters, hp_symbol_characters, main, fatal):
43c6a96a 3045 Likewise.
848eed92
GDR
3046 (strip_underscore): Change type from 'int' to 'bool'.
3047 (main): Use boolean constants.
3048
b746c5dc
GDR
30492002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3050
3051 Remove traditional C constructs 3/n.
3052 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3053 build_up_reference, warn_ref_binding, convert_to_reference,
3054 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3055 convert_to_void, convert, convert_force, build_type_conversion,
3056 build_expr_type_conversion, type_promotes_to,
3057 perform_qualification_conversions): Use C90 prototyping style.
3058 * decl2.c (grok_array_decl): Use boolean constant.
3059 (delete_sanity): Likewise.
3060 * typeck.c (build_unary_op): Likewise.
3061 * semantics.c (finish_switch_cond): Likewise.
3062 * parser.c (cp_parser_direct_new_declarator): Likewise.
3063 * init.c (build_new): Likewise.
3064
a723baf1
MM
30652002-12-27 Mark Mitchell <mark@codesourcery.com>
3066
3067 * Make-lang.in (po-generated): Remove parse.c.
3068 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
3069 ($(srcdir)/cp/parse.h): Remove target.
3070 ($(srcdir)/cp/parse.c): Likewise.
3071 (gt-cp-parse.h): Likewise.
3072 (gt-cp-parser.h): New target.
3073 (c++.distclean): Do not remove parse.output.
3074 (c++.maintainer-clean): Do not remove parse.c or parse.h.
3075 (cp/spew.o): Remove target.
3076 (cp/lex.o): Adjust dependencies.
3077 (cp/pt.o): Likewise.
3078 (cp/parse.o): Likewise.
3079 (cp/TAGS): Do not mention parse.c.
3080 (cp/parser.o): New target.
3081 * NEWS: Mention the new parser.
3082 * call.c (build_scoped_method_call): Simplify.
3083 (build_method_call): Likewise.
3084 (build_new_function_call): Adjust calls to add_function_candidate
3085 and add_template_candidate.
3086 (build_new_op): Improve handling of erroroneous operands.
3087 (convert_default_arg): Remove circular argument processing.
3088 (name_as_c_string): New function.
3089 (build_new_method_call): Use it.
3090 (perform_implicit_conversion): Use error_operand_p.
3091 * class.c (finish_struct_anon): Use constructor_name_p.
3092 (check_field_decls): Likewise.
3093 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3094 (resolve_address_of_overloaded_function): Likewise.
3095 (instantiate_type): Tweak pointer-to-member handling.
3096 (get_primary_binfo): Remove incorrect assertion.
3097 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3098 * cp-tree.h (DEFARG_TOKENS): New macro.
3099 (default_arg): New structure.
3100 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3101 (lang_tree_node): Add default_arg.
3102 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3103 (type_info_ref_type): New macro.
3104 (saved_scope): Make processing_explicit_instantiation a boolean.
3105 (check_access): New field.
3106 (unparsed_text): Remove.
3107 (language_function): Remove unparsed_inlines.
3108 (error_operand_p): New macro.
3109 (lang_decl): Adjust pending_inline_info.
3110 (DEFARG_POINTER): Remove.
3111 (tag_types): Add typenames.
3112 (lookup_ualified_name): Declare.
3113 (lookup_name_real): Likewise.
3114 (shadow_tag): Adjust prototype.
3115 (get_scope_of_declarator): Declare it.
3116 (process_next_inline): Remove it.
3117 (check_for_missing_semicolon): Likewise.
3118 (maybe_get_template_decl_from_type_decl): Declare it.
3119 (finish_label_stmt): Adjust prototype.
3120 (finish_non_static_data_meber): Declare it.
3121 (finish_pseudo_destructor_call_expr): Rename to ...
3122 (finish_pseudo_destructor_expr): ... this.
3123 (finish_compound_literal): Declare it.
3124 (begin_inline_definitions): Remove it.
3125 (init_spew): Remove.
3126 (peekyylex): Likewise.
3127 (arbitrate_lookup): Likewise.
3128 (frob_opname): Likewise.
3129 (maybe_snarf_defarg): Likewise.
3130 (add_defarg_fn): Likewise.
3131 (do_pending_defargs): Likewise.
3132 (done_pending_defargs): Likewise.
3133 (unprocessed_defarg_fn): Likewise.
3134 (replace_defarg): Likewise.
3135 (end_input): Likewise.
3136 (get_overloaded_fn): Likewise.
3137 * cvt.c (convert_to_reference): Improve error handling.
3138 * decl.c (lookup_name_real): Do not declare it static.
3139 (maybe_push_to_top_level): Set check_access.
3140 (identifier_type_value): Adjust call to lookup_name_real.
3141 (lookup_qualified_name): New method.
3142 (lookup_name_real): Remove special-case parsing code.
3143 (lookup_name-nonclass): Adjust call to lookup_name_real.
3144 (lookup_name_namespace_only): Likewise.
3145 (lookup_name): Likewise.
3146 (check_tag_decl): Return the type declared.
3147 (shadow_tag): Likewise.
3148 (register_dtor_fn): Tweak check_access.
3149 (grokfndecl): Use constructor_name_p.
3150 (get_scope_of_declarator): New function.
3151 (grokdeclarator): Obscure tweaks for slightly different declarator
3152 representations.
3153 (start_method): Return error_mark_node to indicate failure.
43c6a96a 3154 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
a723baf1
MM
3155 * decl2.c (constructor_name_full): Simplify.
3156 (constructor_name): Use it.
3157 (build_expr_from_tree): Adjust for changes to do new parser.
3158 (push_scope): Improve robustness.
3159 (validate_nonmember_using_decl): Process declarations, not names.
3160 (do_class_using_decl): Likewise.
3161 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3162 here.
3163 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3164 * expr.c (cxx_expand_expr): Handle BASELINKs.
3165 * init.c (member_init_ok_or_else): Issue more errors.
3166 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3167 * lex.c: Do not include parse.h.
3168 (yypring): Do not declare.
3169 (yylval): Likewise.
3170 (make_reference_declarator): Remove error-generating code.
3171 (rid_to_yy): Remove.
3172 (cxx_init): Do not call init_spew.
3173 (yypring): Remove.
3174 (check_for_missing_semicolon): Remove.
3175 * lex.h (got_scope): Remove.
3176 (got_object): Remove.
3177 * method.c (hack_identifier): Use finish_non_static_data_member.
3178 (implicitly_declare_fn): Adjust use of constructor_name.
3179 * parser.c: New file.
3180 * pt.c (parse.h): Do not include it.
3181 (maybe_get_template_decl_from_template): Do not declare it.
3182 (finish_member_template_decl): Tweak.
3183 (begin_explicit_instantiation): Adjust for
3184 processing_explicit_instantiation being boolean.
3185 (end_explicit_instantiation): Likewise.
3186 (maybe_process_partial_specialization): Tighten specialization
3187 test.
3188 (retrieve_local_specialization): Adjust ue of hash table.
3189 (eq_local_specializations): New function.
3190 (register_local_specialization): Likewise.
3191 (push_template_decl_real): Remove unnecessary test.
3192 (maybe_get_template_decl_from_type_decl): Don't make it static.
3193 (for_each_template_parm_r): Handle TYPEOF_TYPE.
3194 (tsubst_copy): Use retrieive_local_specialization to handle
3195 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
3196 Handle COMPONENT_REFs with pseudo-destructor-expressions.
3197 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3198 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3199 (unify): Tweak handling of CONST_DECLs.
3200 (regenerate_decl_from_template): Use push_nested_class.
3201 (template_for_substitution): New funciton.
3202 (instantiate_decl): Use it. Register parameters as local
3203 specializations.
3204 * rtti.c (init_rtti_processing): Set type_info_ref_type.
3205 (build_typeid): Use it.
3206 (get_typeid): Likeise.
3207 * search.c (accessible_p): Use check_access, not
3208 flag_access_control.
3209 (adjust_result_of_qualified_name_lookup): Pay attention to the
3210 context_class.
3211 * semantics.c (finish_asm_stmt): Adjust error handling.
3212 (finish_label_stmt): Return the statement.
3213 (finish_non_static_data_member): New function.
3214 (finish_class_expr): Handle BASELINKs.
3215 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3216 (finish_object_call_expr): Simplify handling during templates.
3217 (finish_pseudo_destructor_call_expr): Rename to ...
3218 (finish_pseudo_dtor_expr): ... this.
3219 (finish_compound_literal): New function.
3220 (begin_inline_definitions): Remove.
3221 (finish_sizeof): Remove special template handling.
3222 * spew.c: Do not include parse.h.
3223 * tree.c (get_overloaded_fn): Remove.
3224 * typeck.c (build_class_member_access_expr): Handle
3225 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
3226 (lookup_destructor): New function.
3227 (finish_class_member_access_expr): Use it.
3228 (convert_arguments): Simplify.
3229 (build_unary_op): Handle BASELINKs.
43c6a96a 3230
aac1406f
NS
32312002-12-26 Nathan Sidwell <nathan@codesourcery.com>
3232
eab5474f
NS
3233 PR c++/4803
3234 * decl2.c (mark_used): Defer inline functions.
3235 (finish_file): Merge deferred_fns loops. Check all used
3236 inline functions have a definition.
3237 * method.c (make_thunk): Thunks are not inline.
3238
aac1406f
NS
3239 PR c++/5116, c++/764
3240 * call.c (build_new_op): Make sure template class operands are
3241 instantiated.
3242
b9201622
NS
32432002-12-24 Nathan Sidwell <nathan@codesourcery.com>
3244
3e14cd30
NS
3245 PR C++/7964
3246 * cp-tree.h (resolve_scoped_fn_name): Prototype.
3247 * call.c (resolve_scoped_fn_name): New function. Deal with
3248 more template expansion. Broken out of ...
3249 * parse.y (parse_finish_call_expr): ... here. Call it.
3250 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3251 resolve_scoped_fn_name and build_call_from_tree.
3252
b9201622
NS
3253 PR c++/9053
3254 * decl.c (duplicate_decls): Templates may be disambiguated by
3255 return type.
43c6a96a 3256
b9201622
NS
3257 PR c++/8702
3258 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3259 conversion operators on failure.
3260
94be8403
GDR
32612002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3262
b746c5dc
GDR
3263 Remove traditional C constructs 2/n.
3264 * call.c (tourney, build_field_call, equal_functions, joust,
3265 compare_ics, build_over_call, build_java_interface_fn_ref,
3266 convert_like_real, op_error, build_object_call, resolve_args,
3267 build_vfield_ref, check_dtor_name, build_scoped_method_call,
3268 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3269 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3270 standard_conversion, reference_related_p,
3271 reference_compatible_p, convert_class_to_reference,
3272 direct_reference_binding, reference_binding,
3273 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3274 add_template_conv_candidate, any_viable, any_strictly_viable,
3275 build_this, splice_viable, print_z_candidates,
3276 build_user_type_conversion, build_new_function_call,
3277 conditional_conversion, build_conditional_expr, build_new_op,
3278 build_op_delete_call, enforce_access, call_builtin_trap,
3279 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3280 convert_default_arg, type_passed_as, convert_for_arg_passing,
3281 in_charge_arg_for_name, is_properly_derived_from,
3282 maybe_handle_implicit_object, maybe_handle_ref_bind,
3283 source_type, add_warning, can_convert, can_convert_arg,
3284 perform_implicit_conversion, can_convert_arg_bad,
3285 initialize_reference, add_conv_candidate,
3286 add_template_candidate_real, add_template_candidate): Ansify.
94be8403 3287
081cebb2
NS
32882002-12-22 Nathan Sidwell <nathan@codesourcery.com>
3289
3290 PR c++/8572
3291 * cp-tree.h (grokoptypename): Add SCOPE parameter.
3292 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3293 if in a template scope.
3294 * parse.y (unoperator): Return the scope.
3295 (operator_name): Adjust grokoptypename call.
3296
4f09be91
KL
32972002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3298
3299 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3300 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
3301 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3302
4639c5c6
KH
33032002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3304
3305 * ChangeLog: Fix a typo.
3306 * class.c: Fix comment typos.
3307 * cp-tree.h: Likewise.
3308
0ca7178c
JM
33092002-12-18 Jason Merrill <jason@redhat.com>
3310
3311 Handle anonymous unions at the tree level.
3312 C++ ABI change: Mangle anonymous unions using the name of their
3313 first named field (by depth-first search). Should not cause
3314 binary compatibility problems, though, as the compiler previously
3315 didn't emit anything for affected unions.
3316 * cp-tree.def (ALIAS_DECL): New tree code.
3317 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
3318 first field, not the largest.
3319 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
3320 push the decl, and write it out at namespace scope.
3321 * decl.c (lookup_name_real): See through an ALIAS_DECL.
3322 (pushdecl): Add namespace bindings for ALIAS_DECLs.
3323 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3324 of a decl which doesn't have one.
3325 * typeck.c (build_class_member_access_expr): Don't recurse if
3326 we already have the type we want.
3327
da9701a6
KL
33282002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3329
3330 PR c++/8099
3331 * friend.c (make_friend_class): Allow partial specialization
3332 when declaration is not a template friend.
3333
cab7a9a3
KL
33342002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3335
3336 PR c++/3663
3337 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3338 TREE_PROTECTED to created decl nodes.
3339
50cb9059
MM
33402002-12-18 Mark Mitchell <mark@codesourcery.com>
3341
3342 * class.c (build_base_field): Do not set DECL_PACKED on the
3343 FIELD_DECL.
3344
e220f0a4
GDR
33452002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3346
3347 * cp-tree.h (struct tree_srcloc): Use location_t.
3348 (SOURCE_LOCUS): New.
3349 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3350
efc7052d
JM
33512002-12-17 Jason Merrill <jason@redhat.com>
3352
3353 * decl.c (finish_function): Also complain about no return in
3354 templates.
43c6a96a 3355 * semantics.c (finish_return_stmt): Also call check_return_expr in
efc7052d
JM
3356 templates.
3357 * typeck.c (check_return_expr): In a template, just remember that we
3358 saw a return.
3359
9f175208
JM
33602002-12-16 Jason Merrill <jason@redhat.com>
3361
89ea02fb
JM
3362 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3363 of the CALL_EXPR.
3364
9f175208
JM
3365 * semantics.c (do_pushlevel): Call pushlevel after adding the
3366 SCOPE_STMT.
3367 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3368 * parse.y (function_body): Go back to using compstmt.
3369 * decl.c (pushdecl): Skip another level to get to the parms level.
3370
3371 * call.c (build_new_method_call): Use is_dummy_object to determine
3372 whether or not to evaluate the object parameter to a static member
3373 function.
3374
4977bab6
ZW
33752002-12-14 Jason Merrill <jason@redhat.com>
3376
3377 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3378 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3379 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3380 don't bother with an AGGR_INIT_EXPR.
3381 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3382 just generate a new decl normally. Take return slot parm.
3383 * cp-tree.h: Adjust prototype.
3384
75c525d7
GDR
33852002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3386
3387 PR C++/8031
43c6a96a 3388 * cvt.c (convert_to_pointer_force): Don't try comparing against
75c525d7
GDR
3389 erronous type.
3390
8c6ae51f
GK
33912002-12-13 Geoffrey Keating <geoffk@apple.com>
3392
3393 * cp-tree.h: Have the multiple-include guards around
3394 the entire file.
3395
4977bab6
ZW
33962002-12-10 David Edelsohn <edelsohn@gnu.org>
3397
3398 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3399 for SPEW_DEBUG.
3400 (snarf_method): Same.
3401 (snarf_defarg): Same.
3402
d23faea1
MM
34032002-12-10 Mark Mitchell <mark@codesourcery.com>
3404
3405 PR c++/8372
3406 * pt.c (tsubst_copy): Handle destructor names more correctly.
3407
3932057c 34082002-12-10 Matt Austern <austern@apple.com>
d23faea1 3409
3932057c 3410 * cp-tree.h: get rid of needs_virtual_reinit bit.
43c6a96a 3411
dcba9b0f
MM
34122002-12-09 Mark Mitchell <mark@codesourcery.com>
3413
43c6a96a 3414 * NEWS: Document removal of in-class initialization extension for
dcba9b0f
MM
3415 static data members of non-arithmetic, non-enumeration type.
3416 * decl.c (check_static_variable_definition): Do not allow that
3417 extension.
3418 * decl2.c (grokfield): Do not call digest_init when processing
3419 templates.
3420
42b99e03
KG
34212002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3422
3423 * error.c (dump_expr): Fix format specifier warning.
3424
6c73ad72
GK
34252002-12-04 Geoffrey Keating <geoffk@apple.com>
3426
3427 * class.c (finish_struct_1): Correct comment.
3428 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3429
8c048a52
GDR
34302002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3431
3432 PR C++/8799
3433 * error.c (dump_expr): Don't ever try to dump a non-existent
43c6a96a 3434 expression.
8c048a52 3435
4977bab6
ZW
34362002-12-03 Nathan Sidwell <nathan@codesourcery.com>
3437
3438 Implement covariant returns.
3439 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3440 (struct lang_decl_flags): Add this_thunk_p flag.
3441 Rename vcall_offset to virtual_offset.
3442 (struct lang_decl): Rename delta to fixed_offset.
3443 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3444 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3445 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3446 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3447 (make_thunk): Add this_adjusting arg.
3448 (finish_thunk): Declare.
3449 (mangle_thunk): Add this_adjusting arg.
3450 * class.c (get_vcall_index): Use base function for lookup.
3451 (update_vtable_entry_for_fn): Generate covariant thunk.
3452 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3453 (build_vtbl_initializer): Use base function for lookup.
3454 Finish covariant thunk here. Adjust thunk generation.
3455 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3456 Adjust thunk dumping.
3457 * mangle.c (mangle_call_offset): New function.
3458 (mangle_thunk): Adjust for covariant thunks.
3459 * method.c (make_thunk): Adjust. Do not set name here.
3460 (finish_thunk): New function. Set name here.
3461 (use_thunk): Generate covariant thunks too.
3462 (thunk_adjust): New function.
3463 * search.c (covariant_return_p): Remove. Fold into ...
3464 (check_final_overrider): ... here. Simplify.
3465 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3466
c203334d
JM
34672002-12-03 Jason Merrill <jason@redhat.com>
3468
c246c65d
JM
3469 PR c++/8674
3470 * call.c (build_over_call): Check specifically for TARGET_EXPR
3471 when eliding.
3472
3473 PR c++/8461, c++/8625
3474 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3475 (cp_convert_parm_for_inlining): Remove.
43c6a96a 3476 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
c246c65d
JM
3477 Remove.
3478 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3479 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3480
c203334d
JM
3481 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3482 an ambiguous conversion.
3483
ee7ecb29
MM
34842002-12-03 Mark Mitchell <mark@codesourcery.com>
3485
3486 PR c++/8688
3487 * decl.c (reshape_init): Handle erroneous initializers.
3488
5089de93
MM
34892002-12-02 Mark Mitchell <mark@codesourcery.com>
3490
3491 PR c++/8720
3492 * spew.c (remove_last_token): Make sure that last_chunk is set
3493 correctly.
3494
3495 PR c++/8615
3496 * error.c (dump_expr): Handle character constants with
3497 TREE_OVERFLOW set.
43c6a96a 3498
218e0eb6
KL
34992002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3500
3501 DR 180
3502 * decl.c (grokdeclarator): Require class-key for all friend class.
3503 Output the correct type and context in the error message.
3504
a82d6da5
MM
35052002-12-01 Mark Mitchell <mark@codesourcery.com>
3506
94fc547c
MM
3507 PR c++/5919
3508 * pt.c (unify): Use variably_modified_type_p to test validity of
3509 template argument types.
43c6a96a 3510
a82d6da5
MM
3511 PR c++/8727
3512 * cp-tree.h (lang_type_class): Add typeinfo_var.
3513 (CLASSTYPE_TYPEINFO_VAR): New macro.
3514 * rtti.c (get_tinfo_decl): Use it.
3515
3516 PR c++/8663
3517 * init.c (expand_member_init): Always get the main variant of a
3518 base class.
3519
c9f8536c
MM
35202002-12-01 Mark Mitchell <mark@codesourcery.com>
3521
3522 PR c++/8332
3523 PR c++/8493
3524 * decl.c (cxx_init_decl_processing): Use size_type_node, not
3525 c_size_type_node.
3526 * decl2.c (coerce_new_type): Likewise.
3527 * except.c (do_allocate_exception): Likewise.
3528
4977bab6
ZW
35292002-11-30 Zack Weinberg <zack@codesourcery.com>
3530
3531 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3532 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3533 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3534 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3535 typeck2.c: Include coretypes.h and tm.h.
3536 * Make-lang.in: Update dependencies.
3537
c17707f1
MM
35382002-11-30 Mark Mitchell <mark@codesourcery.com>
3539
328de7c2
MM
3540 PR c++/8227
3541 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3542 (check_initializer): Validate the type of the initialized
3543 variable, even if the initializer is absent.
3544 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
43c6a96a 3545
c17707f1
MM
3546 PR c++/8214
3547 * typeck.c (convert_for_assignment): Do not use
3548 decl_constant_value on the operand.
3549
65f8b0fb
MM
3550 PR c++/8511
3551 * pt.c (instantiate_decl): Handle template friends defined outside
3552 of the class correctly.
3553
f6a83eb0
JB
35542002-11-29 Joe Buck <jbuck@synopsys.com>
3555
3556 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3557 anonymous structs.
43c6a96a 3558
ff944b49
MM
35592002-11-29 Mark Mitchell <mark@codesourcery.com>
3560
3561 * class.c (walk_subobject_offsets): Recur on binfos as well as on
3562 types.
3563 (layout_nonempty_base_or_field): Pass it a binfo when processing a
3564 base class.
3565 (layout_empty_base): Likewise.
3566 (build_base_field): Likewise.
43c6a96a 3567
21b3d0ba
MM
35682002-11-27 Mark Mitchell <mark@codesourcery.com>
3569
3570 * class.c (build_base_field): Make sure we get the canonical base
3571 when descending through primary bases.
3572
a16f2357
GK
35732002-11-26 Geoffrey Keating <geoffk@apple.com>
3574
3575 * decl.c (check_initializer): Don't error on initialisation of
3576 a scalar with a brace-enclosed expression.
3577
688f6688
NS
35782002-11-26 Nathan Sidwell <nathan@codesourcery.com>
3579
3580 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3581 (template_parms_equal): Remove prototype.
3582 * typeck.c (buuld_indirect_ref): Reformat.
3583
4977bab6
ZW
35842002-11-25 Jason Merrill <jason@redhat.com>
3585
3586 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3587 and a DO_STMT.
3588
b82ddab4
MM
35892002-11-25 Mark Mitchell <mark@codesourcery.com>
3590
2003cd37
MM
3591 * tree.c (cp_build_qualified_type_real): Correct handling of
3592 array types.
3593 * class.c (walk_subobject_offsets): Fix thinko.
3594 (build_base_field): Record offsets of empty bases in primary
3595 virtual bases.
3596 (layout_class_type): Record offsets of empty bases in fields.
43c6a96a 3597
b82ddab4
MM
3598 * search.c (is_subobject_of_p_1): Fix thinko.
3599 (lookup_field_queue_p): Likewise.
3600
8a874cb4
MM
36012002-11-24 Mark Mitchell <mark@codesourcery.com>
3602
3603 * class.c (layout_class_type): Reuse tail padding when laying out
3604 virtual bases.
3605
05abed76
MM
36062002-11-22 Mark Mitchell <mark@codesourcery.com>
3607
3608 * rtti.c (qualifier_flags): Fix thinko.
3609
4977bab6
ZW
36102002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3611
3612 Remove traditional C constructs 1/n.
3613 * cp-tree.h (init_method, set_mangled_name_for_decl,
3614 build_opfncall, hack_identifier, make_thunk, use_thunk,
3615 synthesize_method, implicitly_declare_fn,
3616 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3617 maybe_clone_body): Remove use of PARAMS.
3618
3619 * method.c (do_build_assign_ref, do_build_copy_constructor,
3620 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3621 Likewise.
3622 (synthesize_method): Use 'bool' type and constants instead of
3623 'int'.
3624 (locate_copy): Likewise.
3625 (implicitly_declare_fn): Likewise.
3626
3627 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3628 Remove old-style declaration.
3629 (maybe_clone_body): Use 'bool' type and constants.
3630
1c83ea9f
GN
36312002-11-21 Glen Nakamura <glen@imodulo.com>
3632
3633 PR c++/8342
3634 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3635 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3636 of the branches of a COND_EXPR.
3637
ad2ae3b2
MM
36382002-11-19 Mark Mitchell <mark@codesourcery.com>
3639
3640 * pt.c (for_each_template_parm): Free allocated memory.
3641 * search.c (is_subobject_of_p_1): New function.
3642 (is_subobject_of_p): Avoid walking virtual bases multiple times.
3643
f3226a90
JT
36442002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
3645
3646 * g++spec.c (lang_specific_spec_functions): New.
3647
90024bdc
KH
36482002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3649
3650 * ChangeLog: Follow spelling conventions.
3651 * class.c: Likewise.
3652 * decl2.c: Likewise.
3653
fa7b533b
ZW
36542002-11-14 Zack Weinberg <zack@codesourcery.com>
3655
3656 * search.c (dfs_push_decls): Do not try to reorder elements
3657 3..n of method_vec if method_vec has only two elements.
3658 Reverse order of two tests to avoid accessing unallocated
3659 memory.
3660
95675950
MM
36612002-11-14 Mark Mitchell <mark@codesourcery.com>
3662
3663 * class.c (dfs_find_final_overrider): Adjust so that the most
3664 derived object is a binfo, rather than a class type.
3665 (find_final_overrider): Likewise.
3666 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3667 (add_vcall_offset): Likewise.
3668
5c74d5b0
KL
36692002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3670
3671 PR c++/8389
3672 * pt.c (instantiate_template): Push class scope for member
3673 functions.
3674 (get_mostly_instantiated_function_type): Likewise. Don't call
3675 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
3676 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3677 * mangle.c (write_encoding, write_unqualified_name): Adjust.
3678
4f2c9d7e
MM
36792002-11-07 Mark Mitchell <mark@codesourcery.com>
3680
e6a66567
MM
3681 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3682 vcall offfsets. Split out ...
3683 (add_vcall_offset): ... new function.
3684
4f2c9d7e
MM
3685 PR c++/8338
3686 * pt.c (for_each_template_parm): Add htab parameter.
3687 (process_partial_specialization): Adjust call.
3688 (push_template_decl_real): Likewise.
3689 (pair_fn_data): Add visited.
3690 (for_each_template_parm_r): Avoid walking duplicates more than
3691 once.
3692 (uses_template_parms): Adjust call to for_each_template_parm.
3693
f72ab53b
MM
36942002-11-07 Mark Mitchell <mark@codesourcery.com>
3695
3696 * class.c (add_implicitly_declared_members): Put implicitly
3697 declared functions at the end of TYPE_METHODs when -fabi-version
3698 is at least 2.
3699
0a288b9a
GK
37002002-11-05 Geoffrey Keating <geoffk@apple.com>
3701
3702 * decl2.c (finish_file): Correct spelling.
3703
548502d3
MM
37042002-11-03 Mark Mitchell <mark@codesourcery.com>
3705
3706 * call.c (build_special_member_call): Do not try to lookup VTTs by
3707 name.
3708 * class.c (vtbl_init_data): Add generate_vcall_entries.
3709 (get_vtable_decl): Do not look up virtual tables by name.
3710 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3711 (set_primary_base): Do not set CLASSTYPE_RTTI.
3712 (determine_primary_base): Likewise.
3713 (get_matching_virtual): Remove.
3714 (get_vcall_index): New function.
3715 (update_vtable_entry_for_fn): Do not try to use virtual thunks
3716 when they are not required. Assign vcall indices at this point.
3717 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3718 Do update dynamic_classes.
3719 (build_vtt): Do not add VTTs to the symbol table.
3720 (build_ctor_vtbl_group): Likewise.
3721 (build_vtbl_initializer): Simplify handling of vcall indices.
3722 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3723 for the most derived class.
3724 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3725 the vtable.
3726 * cp-tree.h (dynamic_classes): New macro.
3727 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
3728 (CLASSTYPE_RTTI): Remove.
3729 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3730 (CLASSTYPE_VCALL_INDICES): New macro.
3731 (CLASSTYPE_VTABLES): Likewise.
3732 (BV_USE_VCALL_INDEX_P): Remove.
3733 (build_vtable_path): Remove.
3734 * decl2.c (finish_vtable_vardecl): Remove.
3735 (key_method): Remove #if 0'd code.
3736 (finish_vtable_vardecl): Rename to ...
3737 (maybe_emit_vtables): ... this.
3738 (finish_file): Use it.
3739 * search.c (look_for_overrides_here): Update comment.
3740
04d57dd5
ZW
37412002-11-01 Zack Weinberg <zack@codesourcery.com>
3742
3743 PR c/7353 redux
3744 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3745
bab076f7
JM
37462002-10-30 Jason Merrill <jason@redhat.com>
3747
3748 PR c++/8186
3749 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3750 * call.c (convert_for_arg_passing): Set it.
3751 * except.c (stabilize_throw_expr): Recurse for such an arg.
3752
14b4829d
MM
37532002-10-31 Mark Mitchell <mark@codesourcery.com>
3754
3755 * cp-tree.h (lang_decl_flags): Remove init_priority.
3756 (lang_decl): Add delta.
3757 (GLOBAL_INIT_PRIORITY): Remove.
3758 (THUNK_DELTA): Revise definition.
3759 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3760 * dump.c (cp_dump_tree): Don't dump it.
3761
8c081e84
MM
37622002-10-30 Mark Mitchell <mark@codesourcery.com>
3763
3764 PR c++/8160
3765 * typeck2.c (process_init_constructor): Call complete_array_type.
3766
3767 PR c++/8149
3768 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 3769
7088fca9
KL
37702002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3771
3772 Core issue 287, PR c++/7639
3773 * cp-tree.h (lang_type_class): Add decl_list field.
3774 (CLASSTYPE_DECL_LIST): New macro.
3775 (maybe_add_class_template_decl_list): Add declaration.
3776 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3777 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3778 (maybe_add_class_template_decl_list): New function.
3779 (add_implicitly_declared_members): Use it.
3780 * decl.c (maybe_process_template_type_declaration): Likewise.
3781 (pushtag): Likewise.
3782 * friend.c (add_friend): Likewise.
3783 (make_friend_class): Likewise.
3784 * semantics.c (finish_member_declaration): Likewise.
3785 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3786 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3787 to process members and friends in the order of declaration.
3788
5633b37c
MM
37892002-10-29 Mark Mitchell <mark@codesourcery.com>
3790
3791 PR c++/8287
3792 * decl.c (finish_destructor_body): Create the label to jump to
3793 when returning from a destructor here.
3794 (finish_function_body): Rather than here.
3795
f65e1183
ZW
37962002-10-25 Zack Weinberg <zack@codesourcery.com>
3797
3798 PR c++/7266
3799 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3800 SCOPE_REF is not null before dereferencing it.
3801
bb5e8a7f
MM
38022002-10-25 Mark Mitchell <mark@codesourcery.com>
3803
e93ee644
MM
3804 * call.c (build_over_call): Use DECL_CONTEXT, not
3805 DECL_VIRTUAL_CONTEXT.
3806 * class.c (modify_vtable_entry): Don't mess with
3807 DECL_VIRTUAL_CONTEXT.
3808 (set_vindex): Remove.
3809 (set_primary_base): Remove vfuns_p parameter.
3810 (determine_primary_base): Likewise.
3811 (modify_all_vtables): Likewise.
3812 (layout_class_type): Likewise. Adjust calls to other functions
3813 accordingly.
3814 (finish_struct_1): Adjust calls to modified functions. Set
3815 DECL_VINDEX here.
3816 * cp-tree.h (lang_type_class): Remove vsize.
3817 (CLASSTYPE_VSIZE): Remove.
3818 (lang_decl): Remove thunks.
3819 (DECL_THUNKS): Adjust.
3820 (DECL_VIRTUAL_CONTEXT): Remove.
3821 (duplicate_decls): Don't copy it.
3822 * pt.c (build_template_decl): Don't set it.
3823 (tsubst_decl): Likewise.
3824 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 3825
bb5e8a7f
MM
3826 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3827 (build_vtable_entry): Remove.
3828 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3829 (lang_decl): Add thunks.
3830 (DECL_THUNKS): New macro.
3831 * decl.c (duplicate_decls): Copy it.
3832 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3833 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 3834
6eb35968
DE
38352002-10-24 David Edelsohn <edelsohn@gnu.org>
3836
3837 PR c++/7228
3838 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3839 lang_type structure exists before accessing field.
3840 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3841 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3842 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3843 * class.c (check_field_decls): Use new macros.
3844 * typeck2.c (process_init_constructor): Remove redundant check for
3845 existence of lang_type structure.
3846
0cee073d
MM
38472002-10-24 Mark Mitchell <mark@codesourcery.com>
3848
ba9a991f
MM
3849 * class.c (end_of_base): New method.
3850 (end_of_class): Use it. Check indirect virtual bases.
3851
0cee073d
MM
3852 * class.c (check_field_decls): Fix typo.
3853
e6f052b7
MM
38542002-10-23 Mark Mitchell <mark@codesourcery.com>
3855
6b607ffd
MM
3856 PR c++/8067
3857 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3858 related variables.
3859
e6f052b7
MM
3860 PR c++/7679
3861 * spew.c (next_token): Do not return an endless stream of
3862 END_OF_SAVED_INPUT tokens.
3863 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3864 the cached token stream.
3865 (snarf_defarg): Likewise.
3866
8bcefb43
ZW
38672002-10-23 Zack Weinberg <zack@codesourcery.com>
3868
3869 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3870 variably_modified_type_p.
3871 * cp-tree.h: Remove prototype of variably_modified_type_p.
3872 * tree.c (variably_modified_type_p): Remove; now implemented
3873 in language-independent code.
3874
ad4f9910
MM
38752002-10-22 Mark Mitchell <mark@codesourcery.com>
3876
3877 PR c++/6579
3878 * spew.c (snarf_parenthesized_expression): New function.
3879 (snarf_block): Use it.
3880
3961e8fe
RH
38812002-10-22 Richard Henderson <rth@redhat.com>
3882
3883 * method.c (use_thunk): Always compute vcall_value; assert that
3884 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
3885 for vcall thunks as well.
3886
5ec1192e
MM
38872002-10-21 Mark Mitchell <mark@codesourcery.com>
3888
7ba539c6
MM
3889 * class.c (empty_base_at_nonzero_offset_p): New function.
3890 (layout_nonempty_base_or_field): Do not check for conflicts when
3891 laying out a virtual base using the GCC 3.2 ABI.
3892 (build_base_field): Correct checking for presence of empty classes
90024bdc 3893 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 3894
e3ccdd50
MM
3895 * class.c (include_empty_classes): Use normalize_rli.
3896 (layout_class_type): Likewise.
3897
42328048
MM
3898 * decl.c (reshape_init): Tweak handling of character arrays.
3899
5ec1192e
MM
3900 PR c++/8218
3901 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3902 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3903 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3904 (check_field_decls): Likewise.
3905 (layout_class_type): Likewise.
3906 (finish_struct_1): Initialize it.
3907 (walk_subobject_offsets): Use it to prune searches.
3908
eb0424da
MM
39092002-10-20 Mark Mitchell <mark@codesourcery.com>
3910
3911 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3912 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3913 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 3914
4a7510cb
ZW
39152002-10-18 Zack Weinberg <zack@codesourcery.com>
3916
3917 * decl.c (start_decl): Point users of the old initialized-
3918 typedef extension at __typeof__.
3919
483ab821
MM
39202002-10-18 Mark Mitchell <mark@codesourcery.com>
3921
3922 * Make-lang.in (method.o): Depend on TARGET_H.
3923 * method.c (target.h): Include it.
3924 (use_thunk): Use target hooks. Use vcall thunks, if available.
3925
e4f4feba
MM
39262002-10-18 Mark Mitchell <mark@codesourcery.com>
3927
3928 * class.c (base_derived_from): Make sure return value is a bool.
3929
9368208b
MM
39302002-10-18 Mark Mitchell <mark@codesourcery.com>
3931
3932 * class.c (find_final_overrider_data_s): Remove overriding_fn and
3933 overriding_base.
3934 (dfs_base_derived_from): New function.
3935 (base_derived_from): Likewise.
3936 (dfs_find_final_overrider): Use base_derived_from.
3937 (find_final_overrider): Adjust.
3938
5275f2bf
JM
39392002-10-18 Jason Merrill <jason@redhat.com>
3940
3941 PR c++/8080
3942 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3943 with condition decls in a template.
3944
8a188e24
NS
39452002-10-17 Nathan Sidwell <nathan@codesourcery.com>
3946
3947 * class.c (add_method): Compare template parms too.
3948
b216f69b
MM
39492002-10-17 Mark Mitchell <mark@codesourcery.com>
3950
982216be
MM
3951 PR c++/7584
3952 * class.c (handle_using_decl): Allow the declaration used to be
3953 from an ambiguous base.
3954
d768a589
MM
3955 * pt.c (convert_template_argument): Revert this change:
3956 2002-10-16 Mark Mitchell <mark@codesourcery.com>
3957 * pt.c (convert_template_argument): Do not fold non-type
3958 template rguments when inside a template.
3959
b216f69b
MM
3960 * init.c (expand_default_init): Handle brace-enclosed initializers
3961 correctly.
3962
2303a079
MM
39632002-10-16 Mark Mitchell <mark@codesourcery.com>
3964
d3133e68
MM
3965 * mangle.c (write_expression): Correct handling of enumeration
3966 constants.
3967 (write_template_arg): Likewise.
3968 * pt.c (convert_template_argument): Do not fold non-type template
3969 arguments when inside a template.
3970
2303a079
MM
3971 PR c++/7478
3972 * cvt.c (convert_to_reference): Allow references as the incoming
3973 type.
3974
451c0899
MM
39752002-10-16 Mark Mitchell <mark@codesourcery.com>
3976
3977 PR c++/7524
3978 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3979 build_qualified_type.
3980
da6eec72
RH
39812002-10-15 Richard Henderson <rth@redhat.com>
3982
3983 * error.c (dump_expr): Use real_to_decimal directly, and with
3984 the new arguments.
3985
3fa3c4bd
MM
39862002-10-15 Mark Mitchell <mark@codesourcery.com>
3987
3988 * decl.c (reshape_init): Fix typo.
3989
3990 * cp-tree.h (operator_name_info_t): Add arity.
3991 * lex.c (init_operators): Initialize it.
3992 * mangle.c (write_conversion_operator_name): New function.
3993 (write_unqualified_name): Use it.
3994 (write_template_args): Accept template arguments as a TREE_LIST.
3995 (write_expression): Adjust handling of qualified names to match
3996 specification.
3997
1a55127d
JM
39982002-10-15 Jason Merrill <jason@redhat.com>
3999
4000 * call.c (call_builtin_trap): New fn.
4001 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
4002 (build_call): Don't set current_function_returns_abnormally outside
4003 a function.
4004
58731fd1
MM
40052002-10-14 Mark Mitchell <mark@codesourcery.com>
4006
4007 * class.c (check_field_decls): Remove empty_p parameter. Instead,
4008 clear CLASSTYPE_EMPTY_P.
4009 (build_base_field): Likewise.
4010 (build_base_fields): Likewise.
4011 (check_bases_and_members): Likewise.
4012 (create_vtbl_ptr): Likewise.
4013 (layout_class_type): Likewise. Ensure that empty classes have
4014 size zero when used as base classes in the 3.2 ABI.
4015 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4016 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
4017 parameter.
4018 (is_empty_class): Correct definition when using post-3.2 ABI.
4019 * cp-tree.h (lang_type_class): Add empty_p.
4020 (CLASSTYPE_EMPTY_P): New macro.
4021
6742d92b
NS
40222002-10-12 Nathan Sidwell <nathan@codesourcery.com>
4023
4024 * init.c (build_delete): Do not apply save_expr for arrays.
4025 (build_vec_delete): Likewise.
4026
77631fa7
MM
40272002-10-14 Mark Mitchell <mark@codesourcery.com>
4028
4a7510cb 4029 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
4030 whose type is an array with unspecified bounds.
4031
77631fa7
MM
4032 PR c++/7176
4033 * lex.c (do_identifier): Add another option for the parsing
4034 parameter.
4035 * parse.y (do_id): Use it.
4036
2ee366b5
GDR
40372002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
4038
4039 PRs C++/6803, C++/7721 and C++/7803
4040 * decl.c (grokdeclarator): Gracefully handle template-name as
4041 decl-specifier.
4042
01c3fb15
JM
40432002-10-11 Jason Molenda <jmolenda@apple.com>
4044
4045 * init.c (build_field_list): Provide uses_unions_p with a default
4046 value.
4047
8e3df2de
MM
40482002-10-11 Mark Mitchell <mark@codesourcery.com>
4049
dac45b5c
MM
4050 PR c++/5661
4051 * cp-tree.h (variably_modified_type_p): New function.
4052 (grokdeclarator) Tighten check for variably modified types as
4053 fields.
4054 * pt.c (convert_template_argument): Do not allow variably modified
4055 types as template arguments.
4a7510cb 4056 * tree.c (variably_modified_type_p): New function.
dac45b5c 4057
8e3df2de
MM
4058 * NEWS: Document removal of "new X = ..." extension.
4059 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4060 brace-enclosed initializers.
4061 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4062 (initialize_local_var): Remove declaration.
4063 (expand_static_init): Likewise.
4064 * decl.c (next_initializable_field): New function.
4065 (reshape_init): Likewise.
4066 (check_initializer): Use them. Build dynamic initializer for
4067 aggregates here too.
4068 (initialize_local_var): Simplify, and incorporate cleanup
4069 insertion code as well.
4070 (destroy_local_var): Remove.
4071 (cp_finish_decl): Tidy.
4072 (expand_static_init): Fold checks for whether or not a variable
4073 needs initialization into this function. Simplify.
4074 * decl2.c (do_static_initialization): Simplify.
4075 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4076 be done for us automatically.
4077 (expand_default_init): Handle brace-enclosed initializers
4078 correctly.
4079 (expand_aggr_init_1): Remove RTL-generation code.
4080 (build_vec_init): Remove "new X = ..." support.
4081 * parse.y (new_initializer): Likewise.
4082 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4083 brace-enclosed initializer.
4084 (create_pseudo_type_info): Likewise.
4085 * typeck2.c (store_init_value): Don't try to handle digest_init
4086 being called more than once.
4087 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 4088
7bdfd72e
KG
40892002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4090
4091 * decl.c (typename_hash): Use htab_hash_pointer.
4092
e89fe41c
JW
40932002-10-10 Jim Wilson <wilson@redhat.com>
4094
4095 * decl.c (duplicate_decls): Don't call decl_attributes.
4096
95f79357
ZW
40972002-10-09 Zack Weinberg <zack@codesourcery.com>
4098
85cd7be8 4099 PR c/7353
95f79357
ZW
4100 * decl.c (start_decl): Unconditionally issue error for
4101 'typedef foo = bar'.
4102 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4103 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4104
10a38dba
KG
41052002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4106
4107 * decl2.c (prune_vtable_vardecl): Delete unused function.
4108
edebf865
MM
41092002-10-03 Mark Mitchell <mark@codesourcery.com>
4110
4111 PR c++/7754
4112 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4113 procesing template functions.
4114 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4115 type. Call layout_decl.
4116 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4117
01f4137f
RH
41182002-10-07 Richard Henderson <rth@redhat.com>
4119
4120 * decl2.c, pt.c: Revert c++/7754 fix.
4121
eb55ce4b
KL
41222002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4123
4124 PR c++/7804
4125 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4126
bd9bb3d2
MM
41272002-10-03 Mark Mitchell <mark@codesourcery.com>
4128
43c6a96a 4129 PR c++/7931
bd9bb3d2
MM
4130 * pt.c (for_each_template_parm_r): Handle BASELINKs.
4131
4132 PR c++/7754
4133 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4134 procesing template functions.
4135 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4136 type. Call layout_decl.
4137 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4138
6397d80b
MM
41392002-10-03 Mark Mitchell <mark@codesourcery.com>
4140
4141 PR c++/8006
4142 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4143 template parameters.
4144 (globals): Add entity and need_abi_warning.
4145 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4146 CLASSTYPE_TEMPLATE_INFO.
4147 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4148 TYPE_TI_TEMPLATE.
4149 (write_prefix): Handle typename types correctly.
4150 (write_template_prefix): Handle template template parameters
4151 correctly.
4152 (start_mangling): Add entity parameter.
4153 (finish_mangling): Warn about names whose mangling will change.
4154 (mangle_decl_string): Adjust.
4155 (mangle_type_string): Likewise.
4156 (mangle_special_for_type): Likewise.
4157 (mangle_ctor_vtbl_for_type): Likewise.
4158 (mangle_thunk): Likewise.
4159 (mangle_guard_variable): Likewise.
4160 (mangle_ref_init_variable): Likewise.
4161
2282d28d
MM
41622002-10-02 Mark Mitchell <mark@codesourcery.com>
4163
4164 PR c++/7188.
4165 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4166 * cp-tree.h (emit_base_init): Rename to ....
4167 (emit_mem_initializers): ... this.
4168 (expand_member_init): Change prototype.
4169 * init.c (perform_member_init): Compute explicit, rather than
4170 requiring it as a parameter.
4171 (sort_member_init): Rename to ...
4172 (sort_mem_initializers): ... this. Process bases and data members
4173 together.
4174 (sort_base_init): Remove.
4175 (emit_base_init): Rename to ...
4176 (emit_mem_initializers): ... this.
4177 (expand_aggr_vbase_init_1): Remove.
4178 (construct_virtual_bases): Rename to ...
4179 (construct_virtual_base): ... this.
4180 (expand_member_init): Rework handling of base initializers.
4181 * method.c (do_build_copy_constructor): Use
4182 finish_mem_initializers.
4183 * parse.y (member_init): Adjust calls to expand_member_init.
4184 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4185 (tsubst_initializer_list): Use expand_member_init.
4186 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
4187
41882002-10-02 Matt Austern <austern@apple.com>
4189 * decl.c (walk_vtables_r): Fixed typo that caused result to
4190 never get a nonzero value.
95f79357 4191
f963b5d9
RS
41922002-10-02 Roger Sayle <roger@eyesopen.com>
4193
4194 PR optimization/6627
4195 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4196 from here, and move it to tree.h.
4197 * decl.c (cxx_init_decl_processing): If storing the vbit
4198 in function pointers, ensure that force_align_functions_log
4199 is atleast one.
4200
69788039
MA
42012002-10-02 Matt Austern <austern@apple.com>
4202
4203 * class.c (check_field_decls): Changed warning about const member
4204 variables so that it doesn't get issued for a class aggregate.
95f79357 4205
d881ff25
MM
42062002-10-01 Mark Mitchell <mark@codesourcery.com>
4207
4208 * decl.c (cp_finish_decl): Make sure array types are laid out,
4209 even if the array bounds are unknown.
4210
2e88ae22
SE
42112002-10-01 Steve Ellcey <sje@cup.hp.com>
4212
d881ff25 4213 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
4214 to build1.
4215
b4c20e52
MM
42162002-10-01 Mark Mitchell <mark@codesourcery.com>
4217
d881ff25
MM
4218 * decl.c (cp_finish_decl): Make sure array types are laid out,
4219 even if the array bounds are unknown.
4220
b4c20e52
MM
4221 * decl.c (cp_finish_decl): Correct check for dynamic
4222 initialization of thread-local storage.
4223
5a9a1961
NS
42242002-09-30 Nathan Sidwell <nathan@codesourcery.com>
4225
4226 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4227 overloaded.
4228
7befdb9f
SE
42292002-09-30 Steve Ellcey <sje@cup.hp.com>
4230
4231 * class.c (build_vtbl_initializer): Add cast.
4232 (add_vcall_offset_vtbl_entries_1):
4233 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4234
17bbb839
MM
42352002-09-30 Mark Mitchell <mark@codesourcery.com>
4236
4237 * class.c (walk_subobject_offsets): Correct the calculation of
4238 offsets for virtual bases. Correct the counting of array
4239 elements.
4240 (layout_nonempty_base_or_field): Simplify. Correct the
4241 calculation of offsets to be propagated through the binfo
4242 hierarchy.
4243 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4244 Add the FIELD_DECL to TYPE_FIELDS.
4245 (build_base_fields): Adjust accordingly.
4246 (layout_virtual_bases): Use build_base_field.
4247 (end_of_class): Return a tree, not an integer.
4248 (warn_about_ambiguous_direct_bases): Rename to ...
4249 (warn_about_ambiguous_bases): ... this.
4250 (include_empty_classes): New function.
4251 (layout_class_type): Create an alternative version of the type to
4252 be used when as a base class type. Do not call
4253 finish_record_layout until we are done laying out the class.
4254 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
4255 as_base.
4256 (CLASSTYPE_SIZE): Reimplement.
4257 (CLASSTYPE_SIZE_UNIT): Likewise.
4258 (CLASSTYPE_ALIGN): Likweise.
4259 (CLASSTYPE_USER_ALIGN): Likewise.
4260 (CLASSTYPE_AS_BASE): New macro.
4261 (DECL_INITIALIZED_P): Likewise.
4262 (extract_init): Remove prototype.
4263 (build_forced_zero_init): Rename to ...
4264 (build_zero_init): ... this.
4265 (force_store_init_value): Remove.
4266 * decl.c (obscure_complex_init): Remove.
4267 (duplicate_decls): Copy DECL_INITIALIZED_P.
4268 (check_initializer): Do not leave junk in DECL_INITIAL.
4269 (cp_finish_decl): Handle zero-initialization of entities with
4270 static storage duration.
4271 * expr.c (extract_init): Remove.
4272 * init.c (build_forced_zero_init): Remove.
4273 (build_zero_init): New function.
4274 (build_default_init): Use it.
4275 (build_field_list): Skip FIELD_DECLs for base subobjects.
4276 (push_base_cleanups): Likewise.
4277 * method.c (do_build_assign_ref): Likewise.
4278 (synthesize_exception_spec): Likewise.
4279 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4280 (regenerate_decl_from_template): To not set DECL_INITIAL for a
4281 static data member whose initialization took place in its class.
4282 (instantiate_decl): Do not pass an initializer to cp_finish_decl
4283 in that situation.
4284 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4285 (dfs_unuse_fields): Likewise.
4286 * tree.c (pod_type_p): Handle error_mark_node.
4287 (zero_init_p): Likewise.
95f79357 4288 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
4289 subobjects.
4290 * typeck2.c (store_init_value): Remove #if 0'd code.
4291 (force_store_init_value): Remove.
4292 (process_init_constructor): Use build_zero_init.
95f79357 4293
03357c23
NS
42942002-09-29 Nathan Sidwell <nathan@codesourcery.com>
4295
4296 PR c++/7788
4297 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4298
27631dae
KH
42992002-09-29 Kazu Hirata <kazu@cs.umass.edu>
4300
4301 * cp-tree.h: Fix comment typos.
4302 * decl.c: Likewise.
4303 * pt.c: Likewise.
4304
956d9305
MM
43052002-09-25 Mark Mitchell <mark@codesourcery.com>
4306
4307 * cp/class.c (contains_empty_class_p): New method.
4308 (walk_subobject_offsets): Correct computation of field offset.
4309 (layout_empty_base): Correct placement of emtpy base classes.
4310 (layout_class_type): Warn about ABI changes.
4311
2d3e278d
MM
43122002-09-23 Mark Mitchell <mark@codesourcery.com>
4313
4314 * cp/class.c (layout_virtual_bases): Do not round the size of the
4315 type to a multiple of the alignment before laying out virtual bases.
4316 (layout_class_type): Correct handling of bit-fields that are wider
4317 than their type inside unions. Round the size of the type to a
4318 even number of bytes when computing the size without virtual
4319 bases.
4320 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 4321
838dfd8a
KH
43222002-09-21 Kazu Hirata <kazu@cs.umass.edu>
4323
4324 * ChangeLog: Follow spelling conventions.
4325 * ChangeLog.2: Likewise.
4326 * call.c: Likewise.
4327 * class.c: Likewise.
4328 * cp-tree.h: Likewise.
4329 * cvt.c: Likewise.
4330 * decl.c: Likewise.
4331 * decl2.c: Likewise.
4332 * except.c: Likewise.
4333 * friend.c: Likewise.
4334 * g++spec.c: Likewise.
4335 * init.c: Likewise.
4336 * lex.c: Likewise.
4337 * mangle.c: Likewise.
4338 * method.c: Likewise.
4339 * operators.def: Likewise.
4340 * optimize.c: Likewise.
4341 * pt.c: Likewise.
4342 * rtti.c: Likewise.
4343 * search.c: Likewise.
4344 * semantics.c: Likewise.
4345 * spew.c: Likewise.
4346 * tree.c: Likewise.
4347 * typeck.c: Likewise.
4348
9ced0328
DP
43492002-09-18 Devang Patel <dpatel@apple.com>
4350
4351 * cp/cp-tree.h: New prototype for walk_vtabls().
4352 * cp/decl.c (walk_vtables_r): New function.
4353 (struct cp_binding_level): Add new members, namespaces,
4354 names_size and vtables.
4355 (add_decl_to_level): Add decl in namespaces or vtables
4356 chain, if conditions match.
4357 (walk_vtables): New function.
4358 (walk_namespaces_r): Travers separate namespace chain
4359 for namespace decls.
4360 (wrapup_globals_for_namespace): Use names_size instead
4361 of list_length().
4362 * cp/decl2.c (finish_file): Use walk_vtables() instead of
4363 walk_globals() to walk vtable decls.
4364
dd29188b
NS
43652002-09-18 Nathan Sidwell <nathan@codesourcery.com>
4366
4367 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4368 ICE with invalid pointers & references.
4369
f989ed67
ZW
43702002-09-17 Zack Weinberg <zack@codesourcery.com>
4371
4372 * Make-lang.in: Remove all references to the demangler.
4373 * cxxfilt.c: Moved to binutils.
4374
171d2f50
NS
43752002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4376
3ec83083
NS
4377 PR c++/7718
4378 * pt.c (tsubst_decl): Remove assert.
4379
171d2f50
NS
4380 Remove DR 295 implementation.
4381 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4382 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4383 about ignoring volatile qualifiers.
4384
4385 * search.c (lookup_member): Correct documentation.
4386
36a5eadd
GK
43872002-09-16 Geoffrey Keating <geoffk@apple.com>
4388
4389 * cp-tree.h (union lang_tree_node): Add chain_next option.
4390
28c56d25
NS
43912002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4392
7979434d
NS
4393 * parse.y (parse_finish_call_expr): Check lookup_member result.
4394
28c56d25
NS
4395 PR c++/7015
4396 * semantic.c (finish_asm_stmt): Fix operand/output_operands
4397 thinko.
4398 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4399
3baab484
NS
44002002-09-15 Nathan Sidwell <nathan@codesourcery.com>
4401
4402 PR c++/7919
4403 * call.c (build_over_call): Convert this pointer for fns found by
4404 using decls.
4405
d30d6e7a
KH
44062002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4407
4408 * ChangeLog: Follow spelling conventions.
4409 * ChangeLog.1: Likewise.
4410
c8460010
NS
44112002-09-14 Nathan Sidwell <nathan@codesourcery.com>
4412
4413 PR c++/7768
4414 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4415
c6002625
KH
44162002-09-14 Kazu Hirata <kazu@cs.umass.edu>
4417
4418 * error.c: Fix comment formatting.
4419 * except.c: Likewise.
4420 * expr.c: Likewise.
4421 * friend.c: Likewise.
4422 * g++spec.c: Likewise.
4423 * init.c: Likewise.
4424 * lex.c: Likewise.
4425 * mangle.c: Likewise.
4426 * method.c: Likewise.
4427 * optimize.c: Likewise.
4428 * pt.c: Likewise.
4429 * rtti.c: Likewise.
4430 * search.c: Likewise.
4431 * semantics.c: Likewise.
4432 * spew.c: Likewise.
4433 * tree.c: Likewise.
4434 * typeck.c: Likewise.
4435 * typeck2.c: Likewise.
4436
46dd3884
GDR
44372002-09-13 Matt Austern <austern@apple.com>
4438
4a7510cb 4439 PR C++/7828
46dd3884
GDR
4440 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4441 * cp/call.c: Change call-by-const-reference mechanism to use
4442 non_cast_lvalue_p when deciding whether the create a temporary.
4443 We need a temporary when passing, e.g. (long) x by const ref.
4444
712467a4
NS
44452002-09-13 Nathan Sidwell <nathan@codesourcery.com>
4446
4447 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4448
a1c65f9f
KH
44492002-09-13 Kazu Hirata <kazu@cs.umass.edu>
4450
4451 * decl.c: Fix comment formatting.
4452 * decl2.c: Likewise.
4453
00a17e31
KH
44542002-09-12 Kazu Hirata <kazu@cs.umass.edu>
4455
4456 * call.c: Fix comment formatting.
4457 * class.c: Likewise.
4458 * cp-lang.c: Likewise.
4459 * cp-tree.h: Likewise.
4460 * cvt.c: Likewise.
4461
3fd9d606
ZW
44622002-09-11 Zack Weinberg <zack@codesourcery.com>
4463
4464 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4465 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4466 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4467 minor adjustments (use version_string, eliminate yet another
4468 duplicate of xmalloc)
4469
2515a7ea
KG
44702002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4471
4472 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4473
5aa3396c
JM
44742002-09-05 Jason Merrill <jason@redhat.com>
4475
4476 * typeck2.c (add_exception_specifier): Only pedwarn for an
4477 incomplete type.
4478 (require_complete_eh_spec_types): New fn.
4479 (cxx_incomplete_type_diagnostic): Also support pedwarning.
4480 * typeck.c (complete_type_or_diagnostic): Likewise.
4481 * call.c (build_call): Call require_complete_eh_spec_types.
4482 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4483 on an incomplete type.
4484
23ccd1f3
JJ
44852002-09-04 Jakub Jelinek <jakub@redhat.com>
4486
4487 * decl.c (start_cleanup_fn): Clear interface_only before
4488 start_function, restore it afterwards.
4489
4977bab6
ZW
44902002-09-02 Nathan Sidwell <nathan@codesourcery.com>
4491
4492 * cp-tree.h (finish_builtin_type): Remove.
4493 * decl2.c (finish_builtin_type): Move to common code.
4494 * decl.c (build_ptrmemfunc_type): Adjust.
4495 * rtti.c (create_pseudo_type_info): Adjust.
4496 (create_tinfo_types): Adjust.
4497
d99f015c
JM
44982002-08-31 Jason Merrill <jason@redhat.com>
4499
4500 * cp-lang.c (cp_expr_size): Allow initialization from a
4501 CONSTRUCTOR.
4502
8a3c9180
RH
45032002-08-30 Richard Henderson <rth@redhat.com>
4504
c9989d09 4505 PR opt/7515
8a3c9180
RH
4506 * tree.c: Include target.h.
4507 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4508 don't bind locally.
4509 * Makefile.in (tree.o): Update.
4510
eca7f13c
MM
45112002-08-27 Mark Mitchell <mark@codesourcery.com>
4512
4513 * class.c (layout_virtual_bases): Warn about bugs in G++ that
4514 result in incorrect object layouts.
4515 (layout_class_type): Likewise.
f989ed67 4516
13d3f0b6
MA
45172002-08-24 Matt Austern <austern@apple.com>
4518
4519 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4520 are allowable.
4521 (real_lvalue_p): Update caller.
4522 (lvalue_p): Ditto.
4523 (non_cast_lvalue_or_else): New.
4524 * tree.h: Declare it.
f989ed67 4525 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 4526
5b770a96
MM
45272002-08-22 Mark Mitchell <mark@codesourcery.com>
4528
4529 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4530 and COND_EXPR specially; fix error message output.
4531
d65b1d77
JM
45322002-08-22 Jason Merrill <jason@redhat.com>
4533
4534 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4535 * semantics.c (nullify_returns_r): Likewise.
4536
8a5f4379
GDR
45372002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
4538
4539 Fix PR/7621
4540 * typeck.c (finish_class_member_access_expr): Diagnose cases where
4541 name lookup finds nothing.
4542
5d764395
JM
45432002-08-15 Jason Merrill <jason@redhat.com>
4544
4545 * semantics.c (finish_then_clause): Remove redundant assignment.
4546 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4547 extra binding level outside the if/switch statement.
4548 (finish_while_cond, finish_for_cond): Rewrite complex condition
4549 into the loop body.
4550
c01b9ec8
AO
45512002-08-15 Alexandre Oliva <aoliva@redhat.com>
4552
4553 * parse.y (sizeof, alignof, typeof): New non-terminals to
4554 increment skip_evaluation. Replace terminals with them and
4555 decrement skip_evaluation at the end of rules using them.
4556 * decl2.c (mark_used): Don't assemble_external if
4557 skipping evaluation.
4558
e8fe46d4
GDR
45592002-08-15 Gabriel Dos Reis <gdr@nerim.net>
4560
4561 Fix PR/7504
4562 * parse.y (parse_finish_call_expr): Handle incomplete
4563 type used to name a scope.
4564
eac5ce6c
NS
45652002-08-15 Nathan Sidwell <nathan@codesourcery.com>
4566
4567 PR c++/7598
4568 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4569 regression caused by my 2002-08-08 patch.
4570
22eadedb
MM
45712002-08-13 Mark Mitchell <mark@codesourcery.com>
4572
4573 * decl.c (pushdecl_class_level): Honor requests to bind names to
4574 OVERLOADs.
4575
e65e6212
KG
45762002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4577
4578 * decl2.c (build_call_from_tree): Fix uninitialized variable.
4579 * parse.y (parse_finish_call_expr): Likewise.
4580 * repo.c (old_args, old_dir, old_main): Const-ify.
4581
3e72ec9a
GDR
45822002-08-11 Gabriel Dos Reis <gdr@nerim.net>
4583
d78e771d 4584 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
3e72ec9a
GDR
4585 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4586 * optimize.c (maybe_clone_body): Likewise.
4587 * pt.c (tsubst_enum): Likewise.
4588 (lookup_template_class): Likewise.
4589 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4590
f749a36b
NB
45912002-08-10 Neil Booth <neil@daikokuya.co.uk>
4592
4593 * lang-specs.h: Remove -ansi.
4594
3ebf5204
NS
45952002-08-10 Nathan Sidwell <nathan@codesourcery.com>
4596
4597 * tree.c (maybe_dummy_object): Replace // with /* */
4598
9e259dd1
MM
45992002-08-09 Mark Mitchell <mark@codesourcery.com>
4600
4601 * call.c (standard_conversion): Use build_ptrmem_type.
4602 * cp-tree.h (build_ptrmem_type): New function.
4603 (adjust_result_of_qualified_name_lookup): Likewise.
4604 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4605 static data members.
4606 (build_ptrmem_type): New function.
4607 (grokdeclarator): Do not use build_offset_type when encountering a
4608 qualified name.
4609 * parse.y (parse_finish_call_expr): Use
4610 adjust_result_of_qualified_name_lookup.
4611 * search.c (adjust_result_of_qualified_name_lookup): New function.
4612 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4613 accessing OFFSET_TYPEs directly.
f989ed67 4614
0e339752
MS
46152002-08-08 Mike Stump <mrs@apple.com>
4616
4617 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4618 (type_decays_to): Likewise.
4619 * class.c (find_final_overrider): Likewise.
4620 (maybe_note_name_used_in_class): Likewise.
4621 * decl.c (current_tmpl_spec_kind): Likewise.
4622 (add_binding): Likewise.
4623 (push_class_binding): Likewise.
4624 (duplicate_decls): Likewise.
4625 (layout_var_decl): Likewise.
4626 (grokfndecl): Likewise.
4627 (grokdeclarator): Likewise.
4628 (check_default_argument): Likewise.
4629 * decl2.c (handle_class_head): Likewise.
4630 * error.c (dump_template_decl): Likewise.
4631 * init.c (build_offset_ref): Likewise.
4632 * pt.c (check_specialization_scope): Likewise.
4633 (determine_specialization): Likewise.
4634 (check_explicit_specialization): Likewise.
4635 (maybe_check_template_type): Likewise.
4636 (process_partial_specialization): Likewise.
4637 (check_default_tmpl_args): Likewise.
4638 (push_template_decl_real): Likewise.
4639 (convert_template_argument): Likewise.
4640 (try_class_unification): Likewise.
4641 (get_bindings_real): Likewise.
4642 (do_decl_instantiation): Likewise.
4643 * semantics.c (begin_function_definition): Likewise.
4644 (finish_member_declaration): Likewise.
4645 (check_multiple_declarators): Likewise.
4646 * typeck.c (comp_array_types): Likewise.
4647 (comptypes): Likewise.
4648 (expr_sizeof): Likewise.
4649 (build_binary_op): Likewise.
4650 (dubious_conversion_warnings): Likewise.
4651 (check_return_expr): Likewise.
b6ce26ac 4652
a6f5b2d3
MM
46532002-08-08 Mark Mitchell <mark@codesourcery.com>
4654
4655 * typeck.c (build_class_member_access_expr): Do not return
4656 error_mark_node when no error has occurred.
b6ce26ac 4657
c93a26f5
NS
46582002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4659
4660 * typeck.c (build_component_addr): Remove.
4661 (build_unary_op): Just check it's not a bitfield, and then build
4662 an ADDR_EXPR.
4663
5bfc90de
NS
46642002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4665
4666 * class.c (convert_to_base): Correct check for error_mark_node.
4667 (create_vtable_ptr): Remove unused VFUNS_P parm.
4668
22aa533e
NS
46692002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4670
4671 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4672
50ad9642
MM
46732002-08-07 Mark Mitchell <mark@codesourcery.com>
4674
4675 Rework build_component_ref.
4676 * call.c (build_vfield_ref): Do not go through build_component_ref.
4677 (build_field_call): Use build_class_member_access_expr.
4678 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4679 (build_object_call): Likewise.
4680 * class.c (convert_to_base): New function.
4681 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4682 (instantiate_type): Handle BASELINKs.
4683 * cp-tree.def (BASELINK): New tree code.
4684 * cp-tree.h (BASELINK_P): Reimplement.
4685 (SET_BASELINK_P): Remove.
4686 (BASELINK_BINFO): Reimplement.
4687 (BASELINK_FUNCTIONS): Likewise.
4688 (BASELINK_ACCESS_BINFO): Likewise.
4689 (BASELINK_OPTYPE): Likewise.
4690 (convert_to_base): New function.
4691 (name_p): Likewise.
4692 (build_object_ref): Remove.
4693 (build_component_ref_1): Likewise.
4694 (build_component_ref): Likewise.
4695 (build_x_component_ref): Likewise.
4696 (build_class_member_access_expr): New function.
4697 (finish_class_member_access_expr): Likewise.
4698 (build_ptrmemfunc_access_expr): Likewise.
4699 * decl.c (grokdeclarator): Handle BASELINKs.
4700 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4701 finish_class_member_access_expr.
4702 (arg_assoc): Handle BASELINKs.
4703 (do_class_using_decl): Likewise.
4704 * error.c (dump_decl): Likewise.
4705 (dump_expr): Use build_ptrmemfunc_access_expr.
4706 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4707 destructors.
4708 (build_throw): Use BASELINK_FUNCTIONS.
4709 * init.c (perform_member_init): Use
4710 build_class_member_access_expr.
4711 (build_offset_ref): Handle BASELINKs. Use
4712 build_class_member_access_expr.
4713 * method.c (hack_identifier): Likewise.
4714 * parse.y (do_id): Use BASELINK, not TREE_LIST.
4715 (primary): Remove uses of build_object_ref.
4716 * pt.c (lookup_template_function): Handle BASELINKs.
4717 (resolve_overloaded_unification): Likewise.
4718 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4719 (lookup_field): Use BASELINK, not TREE_LIST.
4720 (lookup_fnfiels): Likewise.
4721 (setup_class_bindings): Likewise.
4722 * semantics.c (finish_object_call_expr): Do not use
4723 build_method_call when we already know what function is being
4724 called.
4725 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4726 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4727 TREE_CHAIN.
4728 (name_p): New function.
4729 * typeck.c (build_object_ref): Remove.
4730 (build_component_ref_1): Likewise.
4731 (build_x_component_ref): Likewise.
4732 (build_class_member_access_expr): New function.
4733 (finish_class_member_access_expr): Likewise.
4734 (build_ptrmemfunc_access_expr): Likewise.
4735 (get_member_function_from_ptrfunc): Use
4736 build_ptrmemfunc_access_expr.
4737 (build_binary_op): Likewise.
4738 (build_unary_op): Likewise.
4739 (build_ptrmemfunc): Likewise.
4740 (pfn_from_ptrmemfunc): Likewise.
4741 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 4742
0b6f2917
NB
47432002-08-07 Neil Booth <neil@daikokuya.co.uk>
4744
4745 * Make-lang.in (CXX_C_OBJS): Update.
4746 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4747 * cp-tree.h (cxx_decode_option): Remove.
4748 * decl2.c (compare_options, lang_f_options, unsupported_options,
4749 cxx_decode_option): Remove.
4750
1e14c7f0
GDR
47512002-08-06 Gabriel Dos Reis <gdr@nerim.net>
4752
4753 * typeck.c (build_x_unary_op): Handle pointer-to-member.
4754
b3426eb9
GK
47552002-08-05 Geoffrey Keating <geoffk@redhat.com>
4756
4757 * class.c: Don't include obstack.h.
b6ce26ac 4758 (popclass):
b3426eb9
GK
4759 * decl2.c: Delete bogus comment.
4760 * error.c: Don't include obstack.h.
4761 * except.c: Likewise.
4762 (dump_type): Correct comment.
4763 * method.c: Don't include obstack.h.
4764 * tree.c: Likewise.
4765
201fbb7f
GDR
47662002-08-04 Gabriel Dos Reis <gdr@nerim.net>
4767
4768 Fix PR/2213
4769 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4770 expressions to pointer-to-data-member of pointer-to-member-functions.
4771
6d9f628e
GK
47722002-08-04 Geoffrey Keating <geoffk@redhat.com>
4773
4774 * cvt.c (ocp_convert): Delete obsolete code.
4775 * parse.y (permanent_obstack): Delete declaration.
4776 * pt.c (permanent_obstack): Delete declaration.
4777 * repo.c (permanent_obstack): Delete declaration.
4778 (open_repo_file): Use xmalloc instead of permanent_obstack.
4779 (init_repo): Use xstrdup instead of permanent_obstack.
4780
dd98e14f
NS
47812002-08-04 Nathan Sidwell <nathan@codesourcery.com>
4782
4783 * cp-tree.h (VF_DERIVED_VALUE): Remove.
4784 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4785
e6858a84
NS
47862002-08-03 Nathan Sidwell <nathan@codesourcery.com>
4787
4788 PR 7470.
4789 C++ ABI change - vfunc ordering.
4790 * class.c (add_virtual_function): Remove.
4791 (dfs_modify_all_vtables): Take list of all declared
4792 virtuals. Assign all that are not in primary base.
4793 (check_for_override): Adjust comments.
4794 (create_vtable_ptr): Take single list of virtuals. Build chain
4795 of declared virtuals here.
4796 (layout_class_type): Take single list of virtuals. Adjust.
4797 (finish_struct_1): Keep virtuals on single list. Adjust.
4798
55765de4
MM
47992002-08-02 Mark Mitchell <mark@codesourcery.com>
4800
4801 * init.c (build_member_call): Use build_new_method_call, not
4802 build_method_call.
4803
d0067571
KW
48042002-08-02 Krister Walfridsson <cato@df.lth.se>
4805
4806 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4807
4a34e0e8
MM
48082002-08-02 Mark Mitchell <mark@codesourcery.com>
4809
4810 * call.c (build_method_call): Issue a more helpful error message
4811 about ambiguous method names.
4812
41ab2ae2
NS
48132002-08-02 Nathan Sidwell <nathan@codesourcery.com>
4814
4815 * tree.c (build_shared_int_cst): Make cache file scope, and
4816 GTY it.
4817
367aa585
JM
48182002-08-02 Jason Merrill <jason@redhat.com>
4819
a77a9a18
JM
4820 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4821 (cp_expr_size): New fn.
4822 * call.c (build_over_call): Lose empty class hackery.
4823 (convert_arg_to_ellipsis): Promote non-POD warning to error.
4824 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4825
367aa585
JM
4826 * semantics.c (expand_body): Do tree optimization in the function
4827 context, too.
4828
4078b403
NB
48292002-08-01 Neil Booth <neil@daikokuya.co.uk>
4830
4831 * cp-tree.h: Move all warning and flag declarations to c-common.h.
4832 * decl.c: Move all warning and flag variables to c-common.c.
4833 * decl2.c: Move all warning and flag variables to c-common.c.
4834 * lex.c (flag_digraphs): Remove.
4835 (warn_traditional): Now in c-common.c.
4836
4ba126e4
MM
48372002-07-31 Mark Mitchell <mark@codesourcery.com>
4838
4839 * call.c (build_field_call): Do not look up the field by name.
4840 (build_method_call): Simplify.
4841 (struct z_candidate): Add access_path and conversion_path. Remove
4842 basetype_path.
4843 (convert_class_to_reference): Adjust use of
4844 add_function_candidate.
4845 (add_candidate): Add conversion_path argument.
4846 (add_function_candidate): Use it.
4847 (add_conv_dndidate): Likewise.
4848 (build_builtin_candidate): Likewise.
4849 (add_template_candidate_real): Add conversion_path argument.
4850 (add_template_conv_candidate): Likewise.
4851 (add_template_candidate): Likewise.
4852 (build_user_type_conversion_1): Use it.
4853 (build_new_function_call): Remove name lookup code. Adjust use of
4854 add_template_candidate and add_function_candidate.
4855 (build_new_op): Likewise.
4856 (convert_like_real): Use build_special_member_call.
4857 (build_over_call): Use cand->conversion_path.
4858 (build_special_member_call): New method.
4859 (build_new_method_call): Remove name lookup code.
4860 * cp-tree.def (OFFSET_REF): Update documentation.
4861 (TEMPLATE_ID_EXPR): Likewise.
4862 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4863 (BASELINK_OPTYPE): Likewise.
4864 (build_new_method_call): Adjust prototype.
4865 (build_special_member_call): New method.
4866 (build_baselink): New method.
4867 (build_offset_ref_call_from_tree): Likewise.
4868 (build_call_from_tree): Likewise.
4869 (finish_qualified_call_expr): Remove.
4870 (finish_call_expr): Adjust prototype.
4871 (build_x_function_call): Remove.
4872 * cvt.c (ocp_convert): Use build_special_member_call.
4873 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4874 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4875 CALL_EXPR.
4876 (build_offset_ref_call_from_tree): New function.
4877 (build_call_from_tree): Likewise.
4878 * init.c (expand_cleanup): Use build_special_member_call.
4879 (expand_default_init): Likewise.
4880 (build_member_call): Use finish_call_expr.
4881 (build_new_1): Use build_special_member_call.
4882 (push_base_cleanups): Likewise.
4883 * method.c (do_build_assign_ref): Likewise.
4884 * parse.y (template_id): Do not pass a COMPONENT_REF to
4885 lookup_template_function.
4886 (primary): Use parse_finish_call_epxr, not finish_call_expr.
4887 (parse_finish_call_expr): New function.
4888 * pt.c (lookup_template_function): Add assertions.
4889 * search.c (lookup_base): Allow T to be a binfo.
4890 (build_baselink): New function.
4891 (lookup_member): Use it.
4892 * semantics.c (finish_call_expr): Do not do name lookup.
4893 (finish_object_call_expr): Remove #if 0'd code.
4894 (finish_qualified_call_expr): Remove.
4895 * typeck.c (build_x_function_call): Remove.
4896 (build_static_case): Use build_special_member_call.
4897 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 4898
60b8aa94
FS
48992002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4900
4901 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4902
8a4a7242
GDR
49032002-07-30 Gabriel Dos Reis <gdr@nerim.net>
4904
4905 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4906
03fc215c
NS
49072002-07-30 Nathan Sidwell <nathan@codesourcery.com>
4908
4909 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4910 documentation.
4911
3f16a8f3
AM
49122002-07-29 Alan Modra <amodra@bigpond.net.au>
4913
4914 * cp-tree.h: Comment typo fix.
4915
c03d566f
RE
49162002-07-29 Richard Earnshaw <rearnsha@arm.com>
4917
4918 * spew.c (space_for_token): Allocate zeroed memory for a new token
4919 chunk.
4920
c2ef6d34
RS
49212002-07-27 Roger Sayle <roger@eyesopen.com>
4922
4923 * decl.c (builtin_function_1): No need to explicitly mark
4924 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4925
a3926fe1
RS
49262002-07-27 Roger Sayle <roger@eyesopen.com>
4927
4928 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4929
8e51619a
JM
49302002-07-26 Jason Merrill <jason@redhat.com>
4931
4932 * call.c (build_over_call): Likewise.
4933 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
4934 (convert_for_arg_passing): New fn.
4935 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
4936 (type_passed_as): New fn.
4937 * pt.c (tsubst_decl): Use it.
4938 * decl2.c (cp_build_parm_decl): New fn.
4939 (build_artificial_parm): Use it.
4940 (start_static_storage_duration_function): Likewise.
4941 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4942 (grokparms): Don't mess with DECL_ARG_TYPE.
4943 * typeck.c (convert_arguments): Use convert_for_arg_passing.
4944 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4945 Define.
4946 * cp-tree.h: Declare new fns.
b6ce26ac 4947
c372b0fa
NB
49482002-07-26 Neil Booth <neil@daikokuya.co.uk>
4949
4950 * cp-tree.h (flag_operator_names): Remove.
4951 * decl2.c (flag_operator_names): Remove.
4952 (lang_f_options): Remove operator-names.
4953 * lex.c (D_OPNAME): Remove.
4954 (reswords): Remove operator names.
4955 (rid_to_yy): Remove operator names.
4956 (init_reswords): No need to handle D_OPNAME.
4957 * spew.c (read_process_identifier): There are no operator
4958 names.
4959
558ee214
JM
49602002-07-26 Jason Merrill <jason@redhat.com>
4961
4962 * dump.c (cp_dump_tree): Call c_dump_tree.
4963 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4964
81a1552d
NB
49652002-07-25 Neil Booth <neil@daikokuya.co.uk>
4966
4967 * error.c (print_whitespace): Remove.
4968 * g++spec.c (LIBUNWIND): Move.
4969 * mangle.c (mangled_position, write_signed_number): Remove.
4970
cad2c6b6
NB
49712002-07-25 Neil Booth <neil@daikokuya.co.uk>
4972
4973 * decl2.c (cxx_decode_option): Similarly.
4974
ea793912
GDR
49752002-07-25 Gabriel Dos Reis <gdr@nerim.net>
4976
4977 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4978 (cxx_sizeof_or_alignof_type): Take a third argument.
4979 (cxx_sizeof): Adjust definition.
4980 (cxx_alignof): Likewise.
4981 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4982 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4983 complaining.
4984 (c_sizeof_nowarn): Remove definition.
4985 (build_unary_op): Use cxx_sizeof_nowarn.
4986
3cfab7ec
GK
49872002-07-24 Geoffrey Keating <geoffk@redhat.com>
4988
4989 * tree.c (cp_build_qualified_type_real): When copying
4990 pointer-to-method types, unshare the record that holds
4991 the cached pointer-to-member-function type.
4992
c0667597
NB
49932002-07-23 Neil Booth <neil@daikokuya.co.uk>
4994
4995 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4996
fa72b064
GDR
49972002-07-23 Gabriel Dos Reis <gdr@nerim.net>
4998
4999 Fix PR/7363:
5000 * typeck.c (cxx_sizeof_or_alignof_type): New function.
5001 (c_sizeof): Remove definition.
5002 (expr_sizeof): Use cxx_sizeof.
5003 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5004 * decl.c (finish_destructor_body): Use cxx_sizeof.
5005 * semantics.c (finish_alignof): Likewise.
5006 (finish_alignof): Use cxx_alignof.
5007 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5008 (cxx_sizeof_or_alignof_type): Declare.
5009 (my_friendly_assert): Move to ../c-common.h.
5010
4fa31c2a
NB
50112002-07-23 Neil Booth <neil@daikokuya.co.uk>
5012
5013 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5014
0e902d98
KL
50152002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5016
5017 PR c++/7347, c++/7348
5018 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5019 * decl.c (make_typename_type): Use it.
5020 (make_unbound_class_template): Likewise.
5021 (lookup_name_real): Don't call type_access_control if scope is
5022 template parameter dependent.
5023 * parse.y (template_arg): Call make_unbound_class_template with
5024 tf_parsing set.
5025 (nest_name_specifier): Call make_typename_type with tf_parsing set.
5026 (typename_sub0): Likewise.
5027 (typename_sub1): Likewise.
5028 (instantiate_decl): Push class scope.
5029 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5030 for both static variable and member function template.
5031 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5032 and arguments.
5033 * search.c (type_access_control): Do type access for TEMPLATE_DECL
5034 too.
5035
b886c620
RS
50362002-07-20 Roger Sayle <roger@eyesopen.com>
5037
5038 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5039 test by using positive_option. Make whitespace consistent.
5040
7a561142
GDR
50412002-07-20 Gabriel Dos Reis <gdr@nerim.net>
5042
fa72b064 5043 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
5044 members with 'locus'. Adjust use throughout.
5045 (struct feed): Likewise.
5046 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5047 Adjust use.
5048 (snarf_defarg): Use error(), not error_with_file_and_line().
5049
059ba716
CD
50502002-07-19 Chris Demetriou <cgd@broadcom.com>
5051
5052 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5053 cpp_options is included.
5054
d955f6ea
KL
50552002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5056
5057 PR c++/2862, c++/2863
5058 * pt.c (determine_specialization): Compare the length of
5059 TYPE_ARG_TYPES. Tidy.
5060
d03d18e8
KL
50612002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5062
5063 PR c++/3797
5064 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 5065 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
5066 instantiation olddecl.
5067
ba59df78
KL
50682002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5069
5070 PR c++/4802, c++/5387
5071 * decl.c (make_typename_type): Use enforce_access.
5072
58f05188
SS
50732002-07-17 Scott Snyder <snyder@fnal.gov>
5074
5075 PR c++/7320
5076 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5077
04ec0065
MM
50782002-07-12 Mark Mitchell <mark@codesourcery.com>
5079
5080 * class.c (add_method): Correct handling of conversion operators.
5081
f0ab6bf2
MM
50822002-07-11 Mark Mitchell <mark@codesourcery.com>
5083
5084 PR c++/7224
5085 * class.c (add_method): Simplify.
5086
34902e16
JM
50872002-07-11 Jason Merrill <jason@redhat.com>
5088
5089 PR c++/7279
5090 * tree.c (cp_copy_res_decl_for_inlining): Also copy
5091 TREE_ADDRESSABLE.
5092
6e04241f
GS
50932002-07-10 Graham Stott <graham.stott@btinternet.com>
5094
5095 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 5096 Pass depth as int pointer.
6e04241f 5097
8ac9d31f
TJ
50982002-07-11 Tim Josling <tej@melbpc.org.au>
5099
b6ce26ac 5100 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
5101
5102 * config-lang.in (gtfiles): Add files needed for this front end.
5103
15c7fb9c
MM
51042002-07-10 Mark Mitchell <mark@codesourcery.com>
5105
5106 * cp-tree.h (unqualified_name_lookup_error): Declare it.
5107 (begin_function_definition): Adjust prototype.
5108 * lex.c (unqualified_name_lookup_error): New function, split out
5109 from ...
5110 (do_identifier): ... here.
5111 * parse.y (parse_begin_function_definition): New function.
5112 (fn.def1): Use it.
5113 * semantics.c (begin_function_definition): Accept decl-specifiers
5114 and attributes as separate parameters.
5115
abf92e26
JM
51162002-07-10 Jason Merrill <jason@redhat.com>
5117
5118 PR c++/6255
5119 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5120 modifying the old one.
5121
8ba658ee
MM
51222002-07-09 Mark Mitchell <mark@codesourcery.com>
5123
5124 * cp-tree.h (constructor_name_p): Declare it.
5125 (check_template_template_default_arg): Likewise.
5126 * class.c (handle_using_decl): Use constructor_name_p.
5127 * decl.c (grokdeclarator): Likewise.
5128 * decl2.c (constructor_name_p): Define it.
5129 * init.c (build_member_call): Use constructor_name_p.
5130 * parse.y (template_parm): Use check_template_template_default_arg.
5131 * pt.c (check_explicit_specialization): Use constructor_name_p.
5132 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 5133
d5372501
KL
51342002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5135
5136 * pt.c (can_complete_type_without_circularity): Add static to
5137 function definition.
5138
594bb0e7
MM
51392002-07-08 Mark Mitchell <mark@codesourcery.com>
5140
5141 * cp-tree.h (have_extern_spec): Declare it
5142 * decl.c (have_extern_spec): Define it.
5143 (start_decl): Eliminate use of used_extern_spec.
5144 (start_function): Likewise.
5145 * parse.y (have_extern_spec): Remove declaration.
5146 (used_extern_spec): Likewise.
5147 (frob_specs): Eliminate use of used_extern_spec.
5148 (.hush_warning): Likewise.
5149
eb8845be
MM
51502002-07-07 Mark Mitchell <mark@codesourcery.com>
5151
5152 * Make-lang.in (cp/parse.o): Depend on decl.h.
5153 * cp-tree.h (do_decl_instantiation): Change prototype.
5154 * parse.y: Include decl.h.
5155 (parse_decl_instantiation): New function.
5156 (explicit_instantiation): Use it.
5157 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5158 and DECLSPECS.
b6ce26ac 5159
78abea27
RS
51602002-07-07 Roger Sayle <roger@eyesopen.com>
5161
5162 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5163 constructor and destructor tests when passed a TEMPLATE_DECL.
5164
98c07d7b
JM
51652002-07-05 Jason Merrill <jason@redhat.com>
5166
212e17fd
JM
5167 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5168 pointers.
5169
98c07d7b
JM
5170 PR optimization/7145
5171 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5172
c6f553d1
NS
51732002-07-05 Nathan Sidwell <nathan@codesourcery.com>
5174
5175 Repair damage on weak-impared targets caused by my previous patch.
5176 * cp-tree.h (import_export_tinfo): Add parameter.
5177 * decl2.c (import_export_tinfo): Add parameter, post adjust
5178 DECL_COMDAT.
5179 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5180 import_export_tinfo.
5181
b2153b98
KL
51822002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5183
5184 PR c++/6944
5185 * init.c (build_aggr_init): Remove qualifiers of init before calling
5186 build_vec_init.
5187 (build_vec_init): Flatten multi-dimensional array during cleanup.
5188 (build_vec_delete_1): Abort if the type of each element is array.
5189
492ff760
GS
51902002-07-03 Graham Stott <graham.stott@btinternet.com>
5191
5192 * pt.c (instantiate_class_template): Fix typo.
5193
04c4491d
KL
51942002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5195
06728f70
KL
5196 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5197 by CVS conflict in my last patch.
04c4491d 5198
17f29637
KL
51992002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5200
5201 PR c++/6716
5202 * pt.c (can_complete_type_without_circularity): New function.
5203 (instantiate_class_template): Use it.
06728f70
KL
5204 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5205 message due to incomplete fields.
17f29637 5206
5d69ba1f
MM
52072002-07-01 Mark Mitchell <mark@codesourcery.com>
5208
5209 PR c++/7112
5210 * mangle.c (write_expression): Add mangling for sizeof when
5211 applied to a type.
5212 * operators.def: Remove stale comment.
5213
d689a8f1
NS
52142002-06-30 Nathan Sidwell <nathan@codesourcery.com>
5215
5216 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5217 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5218 (tinfo_decl_type): Replace with ...
5219 (type_info_ptr_type): ... this.
5220 (import_export_tinfo): Declare.
5221 (tinfo_decl_p): Rename to ...
5222 (unemitted_tinfo_decl_p): ... this.
5223 * decl2.c (import_export_decl): Break out tinfo handling into ...
5224 (import_export_tinfo): ... here. New function.
5225 (finish_file): Adjust.
5226 * rtti.c (TINFO_REAL_NAME): New macro.
5227 (init_rtti_processing): Create the tinfo types.
5228 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5229 (get_tinfo_decl): Adjust.
5230 (get_tinfo_ptr): New function.
5231 (get_type_id): Use it.
5232 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5233 (ptr_initializer): Use get_tinfo_ptr.
5234 (ptm_initializer): Likewise.
5235 (synthesize_tinfo_var): Break into ...
5236 (get_pseudo_ti_init): ... this. Just create the initializer.
5237 (get_pseudo_ti_desc): .. and this.
5238 (create_real_tinfo_var): Remove.
5239 (create_pseudo_type_info): Don't create the vtable decl here.
5240 (get_vmi_pseudo_type_info): Remove.
5241 (create_tinfo_types): Adjust.
5242 (tinfo_decl_p): Rename to ...
5243 (unemitted_tinfo_decl_p): ... here. Adjust.
5244 (emit_tinfo_decl): Adjust. Create the initializer.
5245
5ce49b4b
MM
52462002-06-27 Mark Mitchell <mark@codesourcery.com>
5247
5248 PR c++/6695
5249 * pt.c (tsubst_friend_class): Substitute into the context of the
5250 friend before using it.
5251
88e5899c
MM
52522002-06-26 Mark Mitchell <mark@codesourcery.com>
5253
5254 * cp-tree.h (xref_tag): Change prototype.
5255 (handle_class_head): Likewise.
5256 (build_x_component_ref): Likewise.
5257 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5258 (xref_tag): Take attributes as a separate parameter.
5259 (xref_tag_from_type): Adjust call to xref_tag.
5260 * decl2.c (build_expr_from_tree): Adjust call to
5261 build_x_component_ref.
5262 (handle_class_head): Take attributes as a separate parameter.
5263 * parse.y (parse_xref_tag): New function.
5264 (parse_handle_class_head): Likewise.
5265 (primary): Use parse_xref_tag.
5266 (class_head_decl): Use parse_handle_class_head.
5267 (class_head_defn): Likewise.
5268 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5269 (build_dynamic_cast_1): Likewise.
5270 (create_pseudo_type_info): Likewise.
5271 (emit_support_tinfos): Likewise.
5272 * typeck.c (build_object_ref): Adjust call to
5273 build_x_component_ref.
5274 (build_x_component_ref): Remove protect parameter.
b6ce26ac 5275
da15dae6
MM
52762002-06-25 Mark Mitchell <mark@codesourcery.com>
5277
5278 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5279 * class.c (handle_using_decl): Likewise.
5280 (instantiate_type): Likewise.
5281 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5282 (xref_basetypes): Change prototype.
5283 (begin_mem_initializers): New function.
5284 (get_overloaded_fn): Likewise.
5285 * decl.c (xref_basetypes): Simplify.
5286 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5287 * init.c (build_offset_ref): Likewise.
5288 * parse.y (base_init): Use begin_mem_initializers().
5289 (structsp): Adjust call to xref_basetypes.
5290 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5291 (instantiate_class_template): Adjust call to xref_basetypes.
5292 * semantics.c (begin_mem_initializers): New function.
5293 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5294 (really_overlaoded_fn): Likewise.
5295 (get_overloaded_fn): New function.'
5296 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 5297
5f261ba9
MM
52982002-06-24 Mark Mitchell <mark@codesourcery.com>
5299
5300 * cp-tree.h (SCALAR_TYPE_P): New macro.
5301 (check_for_out_of_scope_variable): New function.
5302 (at_class_scope_p): Likewise.
5303 (finish_fname): Likewise.
5304 * class.c (finish_struct): Use at_function_scope_p.
5305 * decl.c (check_for_out_of_scope_variable): New function, split
5306 out from do_identifier.
5307 (finish_enum): Use at_function_scope_p.
5308 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5309 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
5310 (primary): Use at_function_scope_p.
5311 * search.c (at_class_scope_p): New function.
5312 * semantics.c (finish_fname): Likewise.
5313 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 5314
80b1331c
MM
53152002-06-23 Mark Mitchell <mark@codesourcery.com>
5316
5317 * parse.y (parse_scoped_id): New function.
5318 (primary): Use it.
5319 * cp-tree.h (do_scoped_id): Adjust declaration.
5320 * lex.c (do_scoped_id): Remove call to yylex.
5321 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5322 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5323 expanding it inline.
b6ce26ac 5324
08c7ae5a
MT
53252002-06-23 Matt Thomas <matt@3am-software.com>
5326
5327 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5328 "#if VMS_TARGET".
5329
eb6b51b9
KG
53302002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5331
5332 * mangle.c (integer_type_codes): Const-ify.
5333
aa8dea09
RH
53342002-06-20 Richard Henderson <rth@redhat.com>
5335
5336 PR c++/6747
f989ed67
ZW
5337 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5338 Call put_var_into_stack.
aa8dea09 5339
62c71f4b
KG
53402002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5341
5342 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5343 array size calculation.
5344
aa16c0fa
KL
53452002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5346
5347 PR c++/6892
5348 * pt.c (tsubst_expr): Handle FILE_STMT.
5349
342cea95
KL
53502002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5351
5352 PR c++/6723
5353 * pt.c (lookup_template_class): Don't build complete argument of
5354 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5355 argument.
5356
84d901be
AD
53572002-06-19 Akim Demaille <akim@epita.fr>
5358
5359 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5360 decl.h's TYPENAME.
5361 * spew.c, lex.c: Adjust.
5362 * parse.y (explicit_instantiation): Add empty action to override
5363 the default $$ = $1 where it introduces a type clash.
5364
83b14b88
JM
53652002-06-14 Jason Merrill <jason@redhat.com>
5366
18ba380b
JM
5367 * semantics.c (begin_for_stmt): Push the 'for' scope before
5368 adding the FOR_STMT.
5369
83b14b88
JM
5370 C++ ABI changes.
5371 * class.c (build_base_field): Set DECL_PACKED.
5372 (layout_class_type): Don't use tail padding of PODs.
5373 * mangle.c (write_unqualified_name): Fix template conversion op
5374 mangling.
5375
fd852454
RH
53762002-06-16 Richard Henderson <rth@redhat.com>
5377
5378 PR opt/6793
5379 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5380 after template instantiation.
5381
750491fc
RH
53822002-06-16 Richard Henderson <rth@redhat.com>
5383
5384 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5385
f7d3c5f0
GDR
53862002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
5387
5388 * cp-tree.h (compiler_error): Remove declaration.
5389 * lex.c (compiler_error): Remove definition.
5390
893a047c
SE
53912002-06-14 Steve Ellcey <sje@cup.hp.com>
5392
5393 * g++spec.c (LIBUNWIND): New.
5394 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5395
a6f5e048
RH
53962002-06-13 Jessica Han <jessica@cup.hp.com>
5397
5398 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5399 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5400 (build_vbase_offset_vtbl_entries): Likewise.
5401 * rtti.c (build_headof): Likewise.
5402 (get_tinfo_decl_dynamic): Likewise.
5403 (create_pseudo_type_info): Likewise.
5404
e4dadd2a
SS
54052002-06-12 Stan Shebs <shebs@apple.com>
5406
5407 * mpw-config.in: Remove file, no longer used.
5408 * mpw-make.sed: Ditto.
5409
09e77dee
ZW
54102002-06-07 Zack Weinberg <zack@codesourcery.com>
5411
5412 * decl2.c: Update call to cpp_handle_option.
5413
4bafaa6f
L
54142002-06-07 H.J. Lu (hjl@gnu.org)
5415
5416 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5417
3cb8660c
GDR
54182002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5419
5420 * error.c (cp_error_at): Fix typo.
5421
47b69537
GDR
54222002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
5423
5424 * error.c (cp_diagnostic_starter): Adjust call.
5425 (maybe_print_instantiation_context): Change prototype to take a
5426 'diagnostic_info *'.
5427 (print_instantiation_full_context): Likewise.
5428 (print_instantiation_partial_context): Likewise.
5429 (cp_diagnostic_starter): Likewise.
5430 (cp_diagnostic_finalizer): Likewise.
5431 (cp_print_error_function): Likewise.
5432 (cp_printer): Take a secondary parameter as a 'text_info *'.
5433 Remove output_state savings. Adjust calls.
5434
e2500fed
GK
54352002-06-03 Geoffrey Keating <geoffk@redhat.com>
5436
5437 * pt.c (inline_parm_levels): Mark for GC.
5438
5439 * mangle.c (start_mangling): Allocate G.substitutions here...
5440 (init_mangle): ... rather than here.
5441 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
5442 * spew.c (yylexstring): Don't use VARRAY_FREE.
5443 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
5444 * decl2.c (pending_statics): Use gengtype to mark.
5445 (deferred_fns): Likewise.
5446 (ssdf_decls): Likewise.
5447 (init_decl2): Delete.
5448 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5449 (cxx_init_decl_processing): Don't call init_decl2.
5450 (cxx_pop_function_context): Don't use VARRAY_FREE.
5451 * cp-tree.h (struct saved_scope): No need for special marking
5452 of varrays.
5453 (struct language_function): Likewise.
5454 (local_classes): Use gengtype to mark.
5455 (init_decl2): Delete prototype.
5456 * class.c (init_class_processing): Don't use
5457 ggc_add_tree_varray_root.
5458 (build_vtbl_initializer): Don't use VARRAY_FREE.
5459
5460 * decl.c (typename_compare): Don't use same_type_p.
5461
5462 * decl.c: Include hashtab.h instead of hash.h.
5463 (typename_hash): Update to use htab_h.
5464 (typename_compare): Likewise.
5465 (typename_htab): Use gengtype to mark.
5466 (build_typename_type): Update to use htab_h.
5467 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5468
5469 * Make-lang.in (gt-cp-tree.h): New rule.
5470 (cp/tree.o): Depend on gt-cp-tree.h.
5471 * config-lang.in (gtfiles): Add cp/tree.c.
5472 * tree.c: Include gt-cp-tree.h.
5473 (list_hash_table): Use gengtype to mark.
5474 (init_tree): Use gengtype to mark trees.
5475
5476 * Make-lang.in (cp/decl.o): Add debug.h dependency.
5477 * call.c (struct z_candidate): Use gengtype.
5478 (USER_CONV_CAND): Use WRAPPER_ZC.
5479 (convert_class_to_reference): Use build_zc_wrapper.
5480 (build_type_conversion_1): Likewise.
5481 (build_over_call): Use WRAPPER_ZC.
5482 (add_warning): Use build_zc_wrapper.
5483 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5484 * cp-tree.h (struct lang_identifier): Use gengtype.
5485 (struct template_parm_index_s): Likewise.
5486 (struct ptrmem_cst): Likewise.
5487 (struct tree_binding): Likewise.
5488 (struct tree_overload): Likewise.
5489 (struct tree_srcloc): Likewise.
5490 (struct tree_wrapper): Likewise. Also modify to have a pointer
5491 to struct z_candidate rather than void.
5492 (enum cp_tree_node_structure_enum): New.
5493 (union lang_tree_node): New.
5494 (cxx_mark_tree): Delete prototype.
5495 (cp_tree_node_structure): New prototype.
5496 (build_ptr_wrapper): Delete prototype.
5497 (build_int_wrapper): Delete prototype.
5498 (build_zc_wrapper): New prototype.
5499 * decl.c: Include debug.h
5500 (cxx_mark_tree): Delete.
5501 (cp_tree_node_structure): New.
5502 * tree.c (build_ptr_wrapper): Delete.
5503 (build_int_wrapper): Delete.
5504 (build_zc_wrapper): New.
5505
5506 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5507 Correct typo. Patch from k_fukui@highway.ne.jp.
5508
5509 * semantics.c (current_stmt_tree): Update for change to
5510 struct language_function.
5511 (finish_mem_initializers): Likewise.
5512 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5513 * cp-tree.h (struct language_function): Rename from
5514 cp_language_function. Change all uses.
5515 (cp_function_chain): Don't need to cast.
5516
5517 * class.c (duplicate_tag_error): Reset discriminator.
5518 (check_bases_and_members): Update for data structure changes.
5519 * cp-tree.h (struct lang_id2): Use gengtype.
5520 (flagged_type_tree): Likewise.
5521 (SET_LANG_ID): Use GGC on struct lang_id2.
5522 (struct cp_language_function): Use gengtype. Remove field
5523 'x_vcalls_possible_p'.
5524 (current_vcalls_possible_p): Delete.
5525 (struct lang_type_header): New.
5526 (struct lang_type_class): Rename from struct lang_type. Include
5527 struct lang_type_header.
5528 (struct lang_type_ptrmem): New.
5529 (struct lang_type): New.
5530 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
5531 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
5532 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5533 (struct lang_decl_flags): Use gengtype. Add discriminators.
5534 (struct lang_decl): Use gengtype. Add and use discriminators.
5535 Update the macros that reference moved fields.
5536 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
5537 (SET_DECL_THUNK_P): Set discriminator too.
5538 (clear_inline_text_obstack): Delete prototype.
5539 (finish_inline_definitions): Delete prototype.
5540 (mark_pending_inlines): Delete prototype.
5541 (lang_check_failed): New prototype.
5542 * decl.c (struct named_label_use_list): Use gengtype.
5543 (struct named_label_list): Likewise.
5544 (mark_binding_level): Delete.
5545 (mark_named_label_lists): Delete.
5546 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5547 (cxx_init_decl_processing): Use generated marker routine.
5548 (begin_destructor_body): Delete dead set to
5549 current_vcalls_possible_p.
5550 (mark_lang_function): Delete.
5551 (mark_cp_function_context): Delete.
5552 (lang_mark_tree): Use generated marker routines.
5553 * decl2.c (start_objects): Set discriminator when setting
5554 GLOBAL_INIT_PRIORITY.
5555 * lex.c (retrofit_lang_decl): Set discriminators.
5556 (copy_lang_type): Update for changes to lang_type structure.
5557 (cp_make_lang_type): Set discriminator.
5558 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
5559 * search.c: Include ggc.h.
5560 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5561 (finish_inline_definitions): Delete.
5562 * spew.c (struct token): Use gengtype.
5563 (struct token_chunk): New.
5564 (struct unparsed_text): Use gengtype. Store tokens in chunks.
5565 (struct feed): Use gengtype.
5566 (feed_obstack): Delete.
5567 (feed): Mark as GC root.
5568 (pending_inlines): Mark as GC root.
5569 (pending_inlines_tail): Likewise.
5570 (processing_these_inlines): Likewise.
5571 (token_obstack): Make static.
5572 (first_token): Likewise.
d30d6e7a 5573 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
5574 (clear_inline_text_obstack): Delete.
5575 (feed_input): Use GC for struct feed. Update for changes to
5576 struct unparsed_text.
5577 (mark_pending_inlines): Delete.
5578 (next_token): Rename from add_token. Change all callers. Update
5579 for changes to struct unparsed_text.
5580 (space_for_token): New.
5581 (remove_last_token): New.
5582 (alloc_unparsed_text): New.
5583 (snarf_block): Take an unparsed_text. Update for changes to struct
5584 unparsed_text.
5585 (snarf_method): Update for changes to struct unparsed_text.
5586 (snarf_defarg): Update for changes to struct unparsed_text.
5587 * tree.c (lang_check_failed): New.
5588
5589 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5590 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5591 (cp/spew.o): Add dependency on gt-<filename>.h.
5592 (cp/decl2.o): Add dependency on gt-<filename>.h.
5593 (cp/call.o): Add dependency on gt-<filename>.h.
5594 (cp/pt.o): Add dependency on gt-<filename>.h.
5595 (cp/repo.o): Add dependency on gt-<filename>.h.
5596 (cp/parse.o): Add dependency on gt-<filename>.h.
5597 * call.c: Use gengtype for roots.
5598 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5599 decl2.c parse.y pt.c repo.c spew.c.
5600 * cp-tree.h: Use gengtype for roots.
5601 (struct saved_scope): Use GGC, gengtype.
5602 (cp_parse_init): Delete prototype.
5603 (init_pt): Delete prototype.
5604 * decl.c: Use gengtype for roots.
5605 (mark_saved_scope): Delete.
5606 (cxx_init_decl_processing): Don't call deleted initilisation
5607 routines.
5608 (signed_size_zero_node): Delete, unused.
5609 * decl.h: Use gengtype for roots.
5610 * decl2.c: Use gengtype for roots.
5611 * lex.h: Use gengtype for roots.
5612 * parse.y: Use gengtype for roots.
5613 (cp_parse_init): Delete.
5614 * pt.c: Use gengtype for roots.
5615 (init_pt): Delete.
5616 * repo.c: Use gengtype for roots.
5617 * spew.c: Use gengtype for roots.
5618
5619 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
5620 (cp/decl.o): Add dependency on gtype-cp.h.
5621 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5622 Include gtype-cp.h. Allow for filename changes.
5623
5624 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5625 (cp/decl.o): Add cp/gt-decl.h dependency.
5626 * config-lang.in (gtfiles): New.
5627 * tree.h: Rename struct binding_level to struct cp_binding_level.
5628 * decl.c: Rename struct binding_level to struct cp_binding_level.
5629 Include cp/gt-decl.h.
5630 (struct cp_binding_level): Use gengtype.
5631 (make_binding_level): Use GGC on struct cp_binding_level.
5632 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5633 (cxx_init_decl_processing): Mark free_binding_level as
5634 deletable.
5635
5636 * decl.c (mark_cp_function_context): Update calling sequence.
5637
5638 * decl.c (start_function): Don't free 'struct
5639 cp_language_function'.
5640 (pop_cp_function_context): Likewise.
5641 (save_function_data): Allocate it using GC.
5642 * semantics.c (genrtl_start_function): Don't free 'struct
5643 cp_language_function'.
5644
8b968bd1
MW
56452002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
5646
5647 * lang-specs.h: Use cpp_debug_options.
5648
11ad4784
ZW
56492002-05-28 Zack Weinberg <zack@codesourcery.com>
5650
5651 * mangle.c, tree.c: Include real.h.
5652 * Make-lang.in: Update dependency lists.
5653
81a75f0f
NB
56542002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
5655
5656 * lex.c: Don't include c-lex.h.
5657 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5658
a97d1398
NB
56592002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
5660
5661 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5662
6f001fdf
RH
56632002-05-22 Richard Henderson <rth@redhat.com>
5664
5665 * decl.c (obscure_complex_init): Check for VAR_DECL
5666 before using DECL_THREAD_LOCAL.
5667
7a1f3f5f
RH
56682002-05-22 Richard Henderson <rth@redhat.com>
5669
5670 * decl.c (check_tag_decl): Handle RID_THREAD.
5671 (obscure_complex_init): Reject run-time init of tls.
5672 (grokvardecl, grokdeclarator): Handle RID_THREAD.
5673 * lex.c (reswords): Add __thread.
5674 (rid_to_yy): Map RID_THREAD to SCSPEC.
5675
e5f3b786
NB
56762002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
5677
5678 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5679 * cp-tree.h (cxx_post_options): Kill.
5680 * cp-lex.c (cxx_post_options): Kill.
5681
3d78f2e9
RH
56822002-05-21 Richard Henderson <rth@redhat.com>
5683
5684 * lex.c (rid_to_yy): Add RID_THREAD.
5685
c8a3d889
AO
56862002-05-21 Alexandre Oliva <aoliva@redhat.com>
5687
5688 * init.c (build_vec_init): Test for trivial copy-assignment when
5689 copy-assigning arrays.
5690
500abaa8
AJ
56912002-05-20 Andreas Jaeger <aj@suse.de>
5692
5693 * init.c (build_default_init): Remove unused variable.
5694
ecc42c14
AO
56952002-05-20 Alexandre Oliva <aoliva@redhat.com>
5696
5697 * call.c (any_strictly_viable): New.
5698 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5699
4e664ef1
KL
57002002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5701
5702 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5703
07782718
KL
57042002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5705
5706 PR c++/186, DR 259
5707 * pt.c (do_decl_instantiation): Don't complain explicit
5708 instantiation after explicit specialization.
5709 (do_type_instantiation): Likewise.
5710
23b4deba
AO
57112002-05-19 Alexandre Oliva <aoliva@redhat.com>
5712
5713 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5714 renamed from...
5715 (complete_type_or_else): ... this. Redefined as macro.
5716 (cxx_incomplete_type_diagnostic): Declare.
5717 (cxx_incomplete_type_error): Define as macro.
5718 * init.c (build_delete): Warn about incomplete types other than
5719 void, and use the built-in operator delete for them.
5720 * typeck.c (complete_type_or_diagnostic): Renamed from
5721 complete_type_or_else. Added warn_only argument, passed to...
5722 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
5723 warnings or errors depending on new warn_only argument. Renamed
5724 from...
5725 (cxx_incomplete_type_error): ... this. New implementation in
5726 terms of cxx_incomplete_type_diagnostic.
5727
b41d214e
JM
57282002-05-18 Jason Merrill <jason@redhat.com>
5729
98c07d7b 5730 PR c++/6611
b41d214e
JM
5731 * decl2.c (import_export_decl): If we clear
5732 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5733
e2005c8d
KL
57342002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5735
5736 PR c++/6620
5737 * pt.c (verify_class_unification): Don't check if PARM is template
5738 parameter dependent. Simplify.
5739 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5740 parameter dependent expression.
5741
ff48be5c
JM
57422002-05-14 Jason Merrill <jason@redhat.com>
5743
5744 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5745 Do set DECL_COMDAT.
5746 (synthesize_tinfo_var): Take the public decl.
5747 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
5748 (emit_tinfo_decl): Adjust. Call import_export_decl.
5749 * decl2.c (import_export_decl): Simplify tinfo decl handling.
5750
94e6e4c4
AO
57512002-05-14 Alexandre Oliva <aoliva@redhat.com>
5752
5753 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 5754 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
5755 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5756 * class.c (check_field_decls): Test non_zero_init.
5757 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5758 zero-to-NULL conversions.
5759 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5760 type that needs zero-initialization without zeros.
5761 (check_initializer_decl): Compute zero-initializer for types
5762 that require a non-trivial one.
5763 * init.c (build_forced_zero_init): New function.
5764 (build_default_init): Use it.
5765 * tree.c (zero_init_p): New function.
5766 * typeck2.c (force_store_init_value): New function.
5767 (process_init_constructor): Create non-trivial zero-initializers
5768 for array members and class fields.
5769
e5f5feea
NB
57702002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
5771
5772 * lang-specs.h: Remove redundant -lang-c++.
5773
f63ab951
JM
57742002-05-13 Jason Merrill <jason@redhat.com>
5775
5776 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5777 (fixed_type_or_null): See through reference vars.
5778 (build_base_path): Vtable contents are constant.
5779 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5780
0d08ea48
JM
57812002-05-12 Jason Merrill <jason@redhat.com>
5782
5783 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5784 structs are safe.
5785
3df89291
NB
57862002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
5787
5788 * cp-tree.h (flag_ansi): Remove.
5789 * decl2.c (flag_ansi): Remove.
5790 (cxx_decode_option): Set flag_iso and flag_undef.
5791
c87978aa
JM
57922002-05-09 Jason Merrill <jason@redhat.com>
5793
5794 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5795 Use subtraction rather than a bitmask to get the index.
5796 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5797
5798 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5799
a5a49440
NB
58002002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
5801
5802 * Make-lang.in (decl2.o): Update.
5803 * cp-tree.h (warn_multichar): Remove.
5804 * decl2.c: Include c-common.h.
5805 (warn_multichar): Remove.
5806
609688f3
JM
58072002-05-03 Jason Merrill <jason@redhat.com>
5808
0abc082a
JM
5809 * tree.c (build_cplus_array_type): Only const and volatile get
5810 special handling.
5811
609688f3
JM
5812 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5813
8b16faa2
MM
58142002-04-30 Mark Mitchell <mark@codesourcery.com>
5815
394ab947 5816 ABI change, returning simple classes from functions.
8b16faa2
MM
5817 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5818 TYPE_HAS_TRIVIAL_INIT_REF is false or
5819 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5820
ac905924
JM
58212002-04-30 Jason Merrill <jason@redhat.com>
5822
2cb008af 5823 PR debug/6436
ac905924
JM
5824 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5825 anonymous class with a typedef if there are attributes.
5826
e6e81f1c 58272002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 5828
e6e81f1c 5829 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 5830
3a73bffb
JJ
58312002-04-29 Jakub Jelinek <jakub@redhat.com>
5832
5833 PR c++/6477
5834 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5835 non-NULL first.
5836
33dd07ee
MM
58372002-04-29 Mark Mitchell <mark@codesourcery.com>
5838
5839 PR c++/6492
5840 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5841 enter that scope before name lookup.
5842
5843 PR c++/6486
5844 * method.c (do_build_copy_constructor): Avoid building
5845 cv-qualified reference types.
500abaa8 5846
4bd7c270
NS
58472002-04-29 Nathan Sidwell <nathan@codesourcery.com>
5848
5849 PR c++/5719
500abaa8 5850 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
5851 by value. operator% should.
5852
45806a3f
FS
58532002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5854
5855 PR c/6343
5856 * decl.c (duplicate_decls): Call merge_weak.
5857
94a50397
RH
58582002-04-26 Richard Henderson <rth@redhat.com>
5859
5860 * parse.y (malloced_yyss, malloced_yyvs): New.
5861 (yyoverflow): Re-add. Set them.
5862 (free_parser_stacks): New.
5863
7d793e9b
MM
58642002-04-26 Mark Mitchell <mark@codesourcery.com>
5865
5866 PR c++/6497
5867 * method.c (do_build_assign_ref): Pass a derivation to
5868 build_method_call when calling base class assignment operators.
5869
bde3c0c0
RH
58702002-04-26 Richard Henderson <rth@redhat.com>
5871
5872 * parse.y (yyoverflow): Revert.
5873
b84a3874
RH
58742002-04-26 Richard Henderson <rth@redhat.com>
5875
5876 PR c/3581
5877 * parse.y (string): Remove. Update all uses to use STRING
5878 instead, and not call combine_strings.
5879 * rtti.c (tinfo_name): Use fix_string_type.
5880 * semantics.c (finish_asm_stmt): Don't call combine_strings.
5881 * spew.c (yylexstring): New.
5882 (read_token): Use it.
5883
6052bef0
RH
58842002-04-25 Richard Henderson <rth@redhat.com>
5885
5886 PR c/2161
5887 * parse.y (yyoverflow): New.
5888
8d1f0f67
JM
58892002-04-25 Jason Merrill <jason@redhat.com>
5890
5891 PR c++/5607
5892 * search.c (check_final_overrider): No longer static.
5893 * class.c (update_vtable_entry_for_fn): Call it.
5894 * cp-tree.h: Adjust.
5895
ff45c01e
NB
58962002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
5897
5898 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5899 * cp-tree.h (cxx_set_yydebug): Die.
5900 * lex.c (YYDEBUG): Get from c-lex.h.
5901 (cxx_set_yydebug): Remove.
5902 * parse.y: Include c-lex.h.
5903 (YYDEBUG): Get from c-lex.h.
5904
a62d375f
MM
59052002-04-24 Mark Mitchell <mark@codesourcery.com>
5906
5907 PR c++/6438.
5908 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5909 void.
5910
349ae713
NB
59112002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
5912
5913 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5914 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5915 Redefine.
5916 * cp-tree.h (cp_attribute_table): Rename.
5917 * decl.c (lang_attribute_table): Remove declaration.
5918 (cxx_init_decl_processing): Don't set it.
5919 * tree.c (cp_attribute_table): Rename.
5920
b602511f
JM
59212002-04-24 Jason Merrill <jason@redhat.com>
5922
985723ce
JM
5923 PR c++/6331
5924 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5925 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
5926 The pedwarn for array assignment is now unconditional.
5927 * tree.c (build_cplus_array_type_1): Still process simple array types
5928 normally in templates.
985723ce 5929
b602511f
JM
5930 PR c++/6395
5931 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5932 stuff for comdats.
5933
29cece2e
JJ
59342002-04-23 Jakub Jelinek <jakub@redhat.com>
5935
5936 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5937 node with attributes.
5938
515387dc
DB
59392002-2-23 David O'Brien <obrien@FreeBSD.org>
5940
5941 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5942 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5943
77adef84
MM
59442002-04-23 Mark Mitchell <mark@codesourcery.com>
5945
5946 PR c++/6256:
5947 * pt.c (tsubst_friend_class): Handle templates with explicit
5948 nested names.
5949
5950 PR c++/6331:
5951 * typeck.c (merge_types): Remember the cv-qualification of pointer
5952 types when merging them.
5953
b03e38e1
NB
59542002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
5955
5956 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5957 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5958 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5959 cxx_mark_function_context): New.
5960 * decl.c (push_cp_function_context, pop_cp_function_context,
5961 mark_cp_function_context): Rename for consistency.
5962 (cxx_init_decl_processing): Don't set old hooks.
5963
ab393bf1
NB
59642002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
5965
5966 * call.c (convert_type_from_ellipsis): Rename, update.
5967 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5968 * cp-tree.h (convert_type_from_ellipsis): Rename.
5969 * decl.c (cxx_init_decl_processing): Don't set hook.
5970
7a228918
NB
59712002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
5972
5973 * call.c (build_new_method_call): Update.
5974 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5975 * cp-tree.h (cxx_incomplete_type_error): New.
5976 * decl.c (grokdeclarator, grokparms): Update.
5977 * decl2.c (check_classfn): Update.
5978 * pt.c (tsubst): Update.
5979 * typeck.c (complete_type_or_else, expr_sizeof,
5980 decay_conversion): Update.
5981 * typeck2.c (incomplete_type_error): Rename.
5982 (add_exception_specifier): Update.
5983
8152c320
JM
59842002-04-18 Jason Merrill <jason@redhat.com>
5985
5986 PR c++/5658
5987 * search.c (setup_class_bindings): A class template qualifies as a
5988 type binding.
5989
32121b96
JJ
59902002-04-17 Jakub Jelinek <jakub@redhat.com>
5991
5992 PR c++/6316
5993 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5994 before expanding.
5995
b2123dc0
MM
59962002-04-16 Mark Mitchell <mark@codesourcery.com>
5997
5998 * init.c (begin_init_stmts): Remove commented out code.
5999 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6000 * semantics.c (begin_gobal_stmt_expr): Adjust call to
6001 expand_start_stmt_expr.
500abaa8 6002
0f268005
MM
60032002-04-15 Mark Mitchell <mark@codesourcery.com>
6004
6005 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6006 dso_handle itself, to __cxa_atexit.
6007
bd6bec6b
GDR
60082002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6009
6010 * error.c (cxx_print_error_function): Adjust call to macros.
6011
0f490a2b
JJ
60122002-04-14 Jakub Jelinek <jakub@redhat.com>
6013
6014 * class.c (layout_virtual_bases): Do all dsize computation on trees.
6015
85b7def6
JM
60162002-04-14 Jason Merrill <jason@redhat.com>
6017
6018 * typeck.c (get_member_function_from_ptrfunc): Don't do
6019 gratuitious division and multiplication on
6020 ptrmemfunc_vbit_in_delta targets.
6021
0481bc21
MM
60222002-04-12 Mark Mitchell <mark@codesourcery.com>
6023
6024 PR c++/5373.
6025 * semantics.c (finish_expr_stmt): Remember the type of the
6026 expression before any conversions are performed.
6027
9928a3d5
MM
60282002-04-12 Mark Mitchell <mark@codesourcery.com>
6029
6030 PR c++/5189.
6031 * call.c (add_template_candidate_real): Do not treat member
6032 templates as copy constructors.
6033
c740732f
MM
60342002-04-12 Mark Mitchell <mark@codesourcery.com>
6035
6036 * decl.c (duplicate_decls): Do not copy the RTL for a variable
6037 declaration if the old variable had an incomplete type and the new
6038 variable does not.
6039 (complete_vars): Do not call layout_decl for completed variables.
6040
4782bd5b
RS
60412002-04-12 Richard Sandiford <rsandifo@redhat.com>
6042
6043 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6044 with an explicit one.
6045 (follow_tag_typedef): New.
6046 (lookup_tag): Use it to extract the tag of an explicit typedef.
6047 (xref_tag): Likewise.
6048
2f4d058f
AH
60492002-04-11 Andrew Haley <aph@redhat.com>
6050
6051 * typeck.c (type_after_usual_arithmetic_conversions):
6052 If two types have the same variant, return immediately.
500abaa8 6053 When two floating-point operands are the same precision:
2f4d058f
AH
6054 convert to float if one of the operands is float;
6055 if neither operand is one of the standard types, return the type
6056 of the first operand.
500abaa8 6057
ba3307c0
NS
60582002-04-10 Nathan Sidwell <nathan@codesourcery.com>
6059
6060 PR c++/5507
6061 * decl.c (make_typename_type): Remove implicit typenameness.
6062
cd6af0c1
JM
60632002-04-09 Jason Merrill <jason@redhat.com>
6064
edf5cd1d
JM
6065 PR optimization/6189
6066 * semantics.c (genrtl_start_function): Don't free
6067 DECL_SAVED_FUNCTION_DATA for inline functions.
6068
cd6af0c1
JM
6069 * init.c (build_member_call): For now, don't convert to
6070 intermediate base if it would cause an error.
6071
224e6091
PC
60722002-04-08 Paolo Carlini <pcarlini@unitus.it>
6073
6074 * parse.y (namespace_qualifier, maybe_identifier,
6075 begin_explicit_instantiation, end_explicit_instantiation,
6076 apparent_template_type, .finish_template_type,
6077 do_id, maybe_init, defarg_again, component_decl_1):
6078 Add ending ';', in accordance with POSIX.
6079
0154eaa8
MM
60802002-04-06 Mark Mitchell <mark@codesourcery.com>
6081
6082 PR c++/5571
6083 * class.c (layout_class_type): Remember incomplete static
6084 variables.
6085 (finish_struct_1): Call complete_vars, not
6086 hack_incomplete_structures.
6087 * cp-tree.h (hack_incomplete_structures): Rename to ...
6088 (complete_vars): ... this.
6089 (struct saved_scope): Remove incomplete.
6090 (namespace_scope_incomplete): Remove.
6091 * decl.c (struct binding_level): Remove incomplete.
6092 (incomplete_vars): New variable.
6093 (mark_binding_level): Don't mark incomplete.
6094 (print_binding_level): Don't print it.
6095 (mark_saved_scope): Don't mark incomplete.
6096 (pushdecl): Use maybe_register_incopmlete_var.
6097 (cxx_init_decl_processing): Register incomplete_vars for GC.
6098 (start_decl_1): Clarify error message.
6099 (hack_incomplete_vars): Remove.
6100 (maybe_register_incomplete_var): New function.
6101 (complete_vars): Likewise.
6102
f62ea157
JM
61032002-04-06 Jason Merrill <jason@redhat.com>
6104
03da5286
JM
6105 PR c++/4934
6106 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6107 set before checking it.
6108
a29e1034
JM
6109 PR c++/525
6110 * init.c (build_member_call): Use build_scoped_ref.
6111 (resolve_offset_ref): Likewise.
6112 * call.c (build_scoped_method_call): Likewise.
500abaa8 6113 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
6114 wrong.
6115 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6116 * cp-tree.h: Adjust.
500abaa8 6117
a29e1034
JM
6118 * init.c (push_base_cleanups): Just use build_scoped_method_call.
6119
f62ea157 6120 PR c++/6179
500abaa8 6121 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
6122 synthesize_exception_spec.
6123
78ef5b89
NB
61242002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
6125
6126 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6127 * cvt.c: Update comment.
6128 * init.c (expand_cleanup_for_base): Update.
6129 * semantics.c (finish_parenthesized_expr): Update.
6130 * typeck.c (cp_truthvalue_conversion): Update.
6131
dffa4176
JM
61322002-04-04 Jason Merrill <jason@redhat.com>
6133
659e5a7a
JM
6134 * semantics.c (finish_eh_cleanup): New fn.
6135 * cp-tree.h: Add prototype.
500abaa8 6136 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
6137 finish_eh_cleanup.
6138 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6139 * cp-tree.h: Remove references.
6140 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6141 * dump.c (cp_dump_tree): Likewise.
6142 * pt.c (tsubst_expr): Likewise.
6143 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6144 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6145 * tree.c (cp_statement_code_p): Likewise.
6146
6147 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6148
6149 PR c++/5636
6150 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6151 cleanup for nrv.
6152
dffa4176
JM
6153 PR c++/5104
6154 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6155 specifiers.
6156 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6157
ef4f94ac
RH
61582002-04-03 Richard Henderson <rth@redhat.com>
6159
6160 * cp-lang.c (cxx_warn_unused_global_decl): New.
6161 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6162
599bba86
NB
61632002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
6164
6165 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6166 * tree.c (init_tree): Don't set hook.
6167
cba2004a
RS
61682002-04-03 Roger Sayle <roger@eyesopen.com>
6169
6170 PR c++/5998:
6171 * decl.c (duplicate_decls): Don't mess with assembler names when
6172 redeclaring builtin functions as static.
6173
dffd7eb6
NB
61742002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6175
6176 * call.c (build_addr_func): Update.
6177 * class.c (resolve_address_of_overloaded_function): Update.
6178 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6179 * cp-tree.h (cxx_mark_addressable): New.
6180 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6181 * decl2.c (build_cleanup): Update.
6182 * except.c (build_throw): Update.
6183 * init.c (resolve_offset_ref): Update.
6184 * pt.c (convert_nontype_argument): Update.
6185 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6186 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6187 unary_complex_lvalue): Update.
6188 (mark_addressable): Rename.
6189
04a9d080
RS
61902002-04-01 Roger Sayle <roger@eyesopen.com>
6191
6192 PR c++/5998:
6193 * decl.c (duplicate_decls): Overwrite the RTL when (and only
6194 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
6195 but follow the SET_DECL_RTL idiom used elsewhere in the function.
6196
ceef8ce4
NB
61972002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6198
6199 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6200 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6201 * decl.c (grokdeclarator): Update.
6202 * mangle.c (write_integer_cst): Update.
6203 * typeck.c (build_binary_op): Update.
6204
48a7a235
NB
62052002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6206
6207 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6208 * lex.c (cxx_init): Don't set hook.
6209
7cb32822
NB
62102002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6211
6212 * Make-lang.in (error.o): Update.
6213 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6214 * cp-tree.h (struct diagnostic_context): Predeclare.
6215 (cxx_print_error_function): New.
6216 * error.c: Include langhooks-def.h.
6217 (lang_print_error_function): Rename. Update.
6218 (init_error): Don't set hook.
6219
b0c48229
NB
62202002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6221
6222 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6223 Redefine.
6224 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6225 * decl.c (finish_enum): Similarly.
6226 * error.c (dump_type): Similarly.
6227 * lex.c (cxx_init): Similarly.
6228 * mangle.c (write_builtin_type): Similarly.
6229 * typeck.c (comptypes): Similarly.
6230
d52e4867
RS
62312002-03-28 Roger Sayle <roger@eyesopen.com>
6232
6233 PR c++/5998:
6234 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6235 in the g++ front-end.
6236 (duplicate_decl): Allow redefinition of anticipated built-ins.
6237 Fix inlining problem by over-writing the old DECL_RTL.
6238 (lookup_namespace_name): Fail to find an identifier in the
6239 specified namespace if its still anticipated.
6240 (builtin_function_1): New function split out from builtin_function
6241 to create a builtin in the current namespace with given context.
6242 (builtin_function): Call builtin_function_1 to define the
6243 appropriate builtins in both the std and global namespaces.
6244 (select_decl): Don't test for anticipated decls here.
6245 (unqualified_namespace_lookup): Instead ignore them whilst
6246 searching through scopes and namespaces.
6247 * decl2.c (do_nonmember_using_decl): If a using declaration
6248 specifies an anticipated built-in function, mark it as no longer
6249 anticipated in that scope.
6250 (ambiguous_decl): Avoid resolving to an anticipated decl.
6251 * lex.c (do_scoped_id): Fail to find an identifier in the global
6252 namespace if its still anticipated.
6253
f1e639b1
NB
62542002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6255
6256 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6257 * cp-tree.h (cp_make_lang_type): Rename.
6258 * lex.c (cp_make_lang_type): Rename.
6259 (make_aggr_type): Update.
6260 * tree.c (init_tree): Don't set make_lang_type_fn.
6261
c7f4981a
JJ
62622002-03-29 Jakub Jelinek <jakub@redhat.com>
6263
6264 PR c++/6073
6265 * class.c (finish_struct_1): Update static field's DECL_MODE even
6266 if its type is a variant of t.
6267
7ffb4fd2
NB
62682002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6269
6270 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6271 * cp-tree.h (cxx_insert_default_attributes): New.
6272 * decl.c (insert_default_attributes): Rename.
6273
cd4e8331
MM
62742002-03-27 Mark Mitchell <mark@codesourcery.com>
6275
6276 PR c++/4884
6277 * call.c (build_op_delete_call): Allow for the fact the placement
6278 may be a COMPOUND_EXPR.
500abaa8 6279
c9d892a8
NB
62802002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6281
6282 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6283 * cp-tree.h (init_cplus_expand): Remove.
6284 (cxx_expand_expr): New.
6285 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6286 fix prototype.
6287 (init_cplus_expand): Remove.
6288 * lex.c (cxx_init): Don't call init_cplus_expand.
6289
46ff5047
MM
62902002-03-26 Mark Mitchell <mark@codesourcery.com>
6291
6292 PR c++/4884.
6293 * init.c (build_new_1): Allow for the fact the result of
6294 build_function_call may be a COMPOUND_EXPR.
6295
6d4c57a0
NS
62962002-03-26 Nathan Sidwell <nathan@codesourcery.com>
6297
6298 PR c++/5682
6299 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6300 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6301 (dfs_skip_nonprimary_vbases_markedp): Remove.
6302 * search.c (get_shared_vbase_if_not_primary): Remove.
6303 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6304 (dfs_skip_nonprimary_vbases_markedp): Remove.
6305 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6306 (dfs_marked_real_bases_queue_p): Likewise.
6307
4f0ade92
NB
63082002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
6309
6310 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6311 * cp-tree.h (cxx_mark_tree): New.
6312 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6313
c88770e9
NB
63142002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
6315
6316 * cp-tree.h (cxx_maybe_build_cleanup): New.
6317 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6318 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6319 * tree.c (build_target_expr): Update.
7b3e5198 6320 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 6321
aaf93206
NB
63222002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
6323
6324 * decl2.c (cxx_decode_option): Handle -E.
6325 * lang-specs.h (default_compilers): Preprocess with cc1plus.
6326 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6327
e756a7da
JJ
63282002-03-23 Jakub Jelinek <jakub@redhat.com>
6329
6330 PR c++/6037
6331 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6332
ea9264e9
GDR
63332002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6334
6335 * error.c (dump_type): Be careful about implicit typenames.
6336
acb044ee
GDR
63372002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6338
6339 PR C++/3656
6340 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 6341 classes.
acb044ee 6342
b216cd4a
ZW
63432002-03-22 Zack Weinberg <zack@codesourcery.com>
6344
6345 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6346 REAL_IS_NOT_DOUBLE.
6347
9181f8db
JK
63482002-03-22 Jeff Knaggs <jknaggs@redhat.com>
6349
cd6af0c1
JM
6350 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6351 an index into the vtable_entry array regardless of
9181f8db
JK
6352 TARGET_PTRMEMFUNC_VBIT_LOCATION.
6353
e019cf95
AH
63542002-03-21 Aldy Hernandez <aldyh@redhat.com>
6355
84d901be 6356 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 6357
43577e6b
NB
63582002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
6359
6360 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6361 insert_block, getdecls, global_bindings_p): New.
6362
8c152bad
NS
63632002-03-20 Nathan Sidwell <nathan@codesourcery.com>
6364
6365 PR c++/4361
6366 * mangle.c (struct globals) Add internal_mangling_p member.
6367 (write_template_param): Do internal mangling, if needed.
6368 (mangle_conv_op_name_for_type): Request internal mangling.
6369
e3fe84e5
JM
63702002-03-20 Jason Merrill <jason@redhat.com>
6371
6372 PR c++/2136
6373 * init.c (build_delete): Check access for a member op delete here.
6374 * decl2.c (delete_sanity): Not here.
6375
ea122333
JM
63762002-03-19 Jason Merrill <jason@redhat.com>
6377
6378 PR c++/5118
6379 * class.c (get_vfield_name): Use the constructor_name.
6380
7afff7cf
NB
63812002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
6382
6383 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6384 * cp-tree.h (lang_printable_name): Rename.
6385 * error.c (lang_decl_name): Use new hook.
6386 * lex.c (cxx_init): Remove old hook.
6387 * pt.c (tsubst_decl): Use new hook.
6388 * tree.c (lang_printable_name): Rename.
6389
ff77ac85
EB
63902002-03-18 Eric Botcazou <ebotcazou@multimania.com>
6391
6392 PR c++/3882
6393 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6394 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6395 only after recording the declaration.
6396
ffd696af
JM
63972002-03-18 Jason Merrill <jason@redhat.com>
6398
097955f2
JM
6399 PR c++/2039
6400 * init.c (resolve_offset_ref): Hand off to build_component_ref.
6401
b663bcf3
JM
6402 PR c++/4222, c++/5995
6403 * call.c (build_over_call): Fix empty class logic.
6404
0f4237c2
JM
6405 PR c++/3870
6406 * cp-tree.h (struct saved_scope): Add last_parms field.
6407 * decl.c (maybe_push_to_top_level): Save last_function_parms.
6408 (pop_from_top_level): Restore it.
6409
001ad76c
JM
6410 PR c++/4377
6411 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
6412 NON_LVALUE_EXPRs.
6413
6414 PR c++/4003
ed2fa432
JM
6415 * pt.c (tsubst_friend_function): Use decl_namespace_context.
6416
ffd696af
JM
6417 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6418 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6419 type with a nontrivial destructor.
6420
f2606a97
JM
64212002-03-17 Jason Merrill <jason@redhat.com>
6422
6423 PR c++/4460
6424 * class.c (build_base_path): Virtual base layout is fixed in
6425 in-charge [cd]tors.
6426
52dabb6c
NB
64272002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
6428
6429 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6430 * parse.y (yyparse): Remove macro.
6431
beb9c8a2
JM
64322002-03-17 Jason Merrill <jason@redhat.com>
6433
6434 PR c++/5757
6435 * init.c (build_new_1): Pass the right pointer to op delete.
6436
5dd236e2
NS
64372002-03-16 Nathan Sidwell <nathan@codesourcery.com>
6438
6439 PR c++/4361
6440 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6441 conversion operators go.
6442 (struct lang_decl_flags): Add template_conv_p and unused
6443 bitfields.
6444 (DECL_TEMPLATE_CONV_FN_P): New macro.
6445 * call.c (build_user_type_conversion_1): Don't check second type
6446 conversion of overload set first.
6447 * class.c (add_method): Make sure templated conversion operators
6448 all end up on slot 2.
6449 * lex.c (do_identifier): A conversion operator token might be
6450 satisfied by a templated conversion operator.
5dd236e2
NS
6451 * pt.c (check_explicit_specialization): Use
6452 CLASSTYPE_FIRST_CONVERSION_SLOT.
6453 (template_parm_this_level_p): New function.
6454 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 6455 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
6456 the first slot.
6457 * typeck.c (build_component_ref): Preserve the type of an
6458 conversion operator name on the overload type.
6459 (build_x_function_call): Retrieve the conversion operator name.
6460
0ba20759
RH
64612002-03-15 Richard Henderson <rth@redhat.com>
6462
6463 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6464
6e4ae815
MM
64652002-03-15 Mark Mitchell <mark@codesourcery.com>
6466
6467 * cp-tree.h (CLEANUP_DECL): Remove.
6468 (CLEANUP_EXPR): Likewise.
6469 * decl.c (destroy_local_var): Simplify.
6470 (maybe_build_cleanup): Tidy.
6471 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6472 * semantics.c (cp_expand_stmt): Likewise.
6473 * cp/tree.c (cp_statement_code_p): Likewise.
6474
5cc90635
JM
64752002-03-15 Jason Merrill <jason@redhat.com>
6476
6da794e8
JM
6477 PR c++/5857
6478 * decl.c (duplicate_decls): Use merge_types instead of common_type.
6479 * typeck.c (common_type): Just hand off to
6480 type_after_usual_arithmetic_conversions and
6481 composite_pointer_type.
6482 (merge_types): New fn.
6483 (commonparms): Use it instead of common_type.
6484 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6485 (composite_pointer_type): Also handle attributes.
6486 * cp-tree.h: Declare merge_types.
6487
5cc90635
JM
6488 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6489 variables.
6490 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6491
ecb0eece
RH
64922002-03-14 Richard Henderson <rth@redhat.com>
6493
6494 * decl.c: Include c-pragma.h.
6495 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6496 * Make-lang.in: Update dependencies.
6497
d3f129b3
JJ
64982002-03-14 Jakub Jelinek <jakub@redhat.com>
6499
f6562b37 6500 PR c++/5908
d3f129b3
JJ
6501 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6502 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6503
049e6879
RS
65042002-03-12 Richard Sandiford <rsandifo@redhat.com>
6505
6506 * mangle.c (write_builtin_type): Handle 128-bit integers even if
6507 they are not a standard integer type.
6508
872c9284
RS
65092002-03-12 Richard Sandiford <rsandifo@redhat.com>
6510
6511 * cp-tree.h (init_init_processing): Remove declaration.
6512 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6513 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6514
2f9834e8
KG
65152002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6516
6517 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6518 Define.
6519 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6520 tree_code_length.
6521 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6522 cplus_tree_code_name): Delete.
6523 (cxx_init): Don't call add_c_tree_codes, instead set
6524 lang_unsafe_for_reeval. Don't try to copy into the various
6525 tree_code arrays.
6526
df867456
NS
65272002-03-12 Nathan Sidwell <nathan@codesourcery.com>
6528
6529 PR c++/5659
6530 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6531 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6532 definitions.
6533
ab04e34b
NS
65342002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6535
6536 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
6537 DR209 is now not a defect.
6538 * cp-tree.h (skip_type_access_control): Remove.
6539 * decl.c (grokdeclarator): Do type access control for friend
6540 declarations.
6541 * semantics.c (decl_type_access_control): Don't reset
6542 current_type_lookups.
6543 (save_type_access_control): Always save the lookups.
6544 (skip_type_access_control): Remove.
6545 (finish_class_definition): Don't change type_lookups.
6546
999cc24c
NS
65472002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6548
6549 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
6550 It is incorrect.
6551 * typeck.c (build_static_cast): Compare non-qualified types
6552 with pointer to member conversions.
6553
61eece67
DN
65542002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
6555 Daniel Berlin <dan@dberlin.org>
6556
6557 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6558 (cxx_get_alias_set): Use it.
6559
644d28d4
KG
65602002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6561
6562 * cp-tree.h (stabilize_expr): Prototype.
6563
7e326356
CR
65642002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
6565
6566 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6567 conditional return void.
6568
24965e7a
NB
65692002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
6570
6571 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6572 * cp-tree.h (cxx_unsave): New.
6573 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6574 (init_tree): Update.
6575
ca7558fc
KG
65762002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6577
6578 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6579 explicit sizeof/sizeof.
6580 * decl2.c (cxx_decode_option): Likewise.
6581 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6582
fd87b7a7
NS
65832002-03-02 Nathan Sidwell <nathan@codesourcery.com>
6584
6585 PR c++/775
6586 * decl.c (lookup_tag): Only reject enum/class mismatch, not
6587 class/union mismatch.
6588 * parse.y (check_class_key): New function.
6589 (structsp): Call it.
6590
bfba94bd
MM
65912002-03-01 Michael Matz <matz@suse.de>
6592
6593 * typeck.c (cp_pointer_int_sum): Complete inner type which is
6594 used later by size_in_bytes().
6595
fdc9bf29
PE
65962002-03-01 Phil Edwards <pme@gcc.gnu.org>
6597
6598 * cp-tree.h: Require __GNUC__ to be #defined.
6599 (build_init): Add missing prototype.
6600
6f30f1f1
JM
66012002-03-01 Jason Merrill <jason@redhat.com>
6602
6603 * except.c: Don't include decl.h or obstack.h. Do include
6604 tree-inline.h.
6605 (build_throw): Destroy temporaries from the thrown
500abaa8 6606 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
6607 temporary directly into the exception object.
6608 (stabilize_throw_expr): New function.
6609 (wrap_cleanups_r): New function.
6610 * tree.c (stabilize_expr): New function.
6611 * init.c (build_init): New function.
6612 * Make-lang.in (cp/except.o): Adjust .h deps.
6613
46cfb101
JM
66142002-02-28 Jason Merrill <jason@redhat.com>
6615
07f521fc
JM
6616 * search.c (lookup_base_r): Don't clear is_non_public just because
6617 we found a friendly scope.
6618
46cfb101
JM
6619 * decl.c (finish_function): Only warn about missing return
6620 statement with -Wreturn-type.
6621
63e1b1c4
NB
66222002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
6623
6624 * class.c (build_clone): Update.
6625 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6626 * cp-tree.h (cxx_dup_lang_specific_decl): New.
6627 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6628 (copy_decl): Update.
6629 * method.c (make_thunk): Update.
6630
f458d1d5
ZW
66312002-02-27 Zack Weinberg <zack@codesourcery.com>
6632
6633 * decl2.c: Delete traditional-mode-related code copied from
6634 the C front end but not used, or used only to permit the
6635 compiler to link.
6636
500abaa8 66372002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
6638
6639 PR c++/4093
6640 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6641 to void.
6642
25c8b645
JJ
66432002-02-22 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR other/5746
6646 * semantics.c (finish_switch_cond): Don't call get_unwidened
6647 if error_mark_node.
6648
4f2b0fb2
NS
66492002-02-22 Nathan Sidwell <nathan@codesourcery.com>
6650
6651 PR c++/2645, DR 295
6652 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6653 tf_keep_type_decl.
6654 (make_typename_type): Use tsubst_flags_t.
6655 * decl.c (make_typename_type): Adjust. Return non-artificial
6656 TYPE_DECLs, if required.
6657 (grokdeclarator): Simplify CVR qualification handling. Allow bad
6658 qualifiers on typedef types.
6659 * decl2.c (handle_class_head): Adjust make_typename_type call.
6660 * parse.y (nested_name_specifier): Likewise.
6661 (typename_sub0): Likewise.
6662 (typename_sub1): Likewise.
6663 * pt.c (convert_template_argument): Adjust make_typename_type
6664 return value.
6665 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 6666 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
6667 on template type parms.
6668 (instantiate_decl): Recheck substitutions to give warnings on bad
6669 qualifications.
6670 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6671
8fc2ba41
AH
66722002-02-21 Aldy Hernandez <aldyh@redhat.com>
6673
84d901be 6674 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 6675
84d901be
AD
6676 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6677 unless DECL_ALWAYS_INLINE.
8fc2ba41 6678
7552da58
JJ
66792002-02-20 Jakub Jelinek <jakub@redhat.com>
6680
6681 * typeck.c (cp_pointer_int_sum): Renamed from
6682 pointer_int_sum, call pointer_int_sum.
6683
00fae85d
JJ
66842002-02-20 Jakub Jelinek <jakub@redhat.com>
6685
6686 * decl.c (duplicate_decls): Return 0 if issued error about
6687 redeclaration.
6688
6ea868b7
JM
66892002-02-19 Jason Merrill <jason@redhat.com>
6690
500abaa8 6691 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
6692 M1AKFvvE, not MK1AFvvE.
6693 * mangle.c (write_function_type): Write cv-quals for member
6694 function type here.
6695 (write_pointer_to_member_type): Not here.
6696
c02f5e29
JM
66972002-02-18 Jason Merrill <jason@redhat.com>
6698
6699 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6700 (do_decl_instantiation): Likewise.
6701
624a5800
CR
67022002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
6703
6704 PR c++/5685
6705 * decl.c (duplicate_decls): Make warning unconditional
6706 if duplicate default argument declarations are present.
6707
f6f8ada3
JJ
67082002-02-17 Jakub Jelinek <jakub@redhat.com>
6709
6710 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6711 shortening.
6712
8d6e459d
NS
67132002-02-15 Nathan Sidwell <nathan@codesourcery.com>
6714
6715 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6716 remove incorrect comment. Move #if 0'd code to common path. Use
6717 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6718
ca4feb54
JM
67192002-02-13 Jason Merrill <jason@redhat.com>
6720
57d5032b
JM
6721 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6722 (finish_function): Don't warn if current_function_returns_null.
6723
bb26522d
JM
6724 * typeck2.c (digest_init): Do handle values of vector type.
6725
ca4feb54
JM
6726 * typeck2.c (digest_init, process_init_constructor): Treat vectors
6727 like arrays.
6728
e6b9638b
JM
67292002-02-11 Jason Merrill <jason@redhat.com>
6730
6731 * parse.y (reserved_declspecs): Don't handle attributes.
6732 (reserved_typespecquals): Handle them here.
6733 * Make-lang.in (parse.c): Adjust expected conflicts.
6734
1cf537c5
JJ
67352002-02-08 Jakub Jelinek <jakub@redhat.com>
6736
6737 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6738 instead of compstmt.
6739 (compstmt_or_stmtexpr): Renamed from compstmt.
6740 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6741
c2ea3a40
NS
67422002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6743
6744 Rename instantiate_type_flags to tsubst_flags_t & expand use.
6745 * cp-tree.h (instantiate_type_flags): Rename to ...
6746 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6747 add tf_warning flag.
6748 (instantiate_type): Adjust prototype.
6749 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6750 do_type_instantiation, cp_build_qualified_type_real): Likewise.
6751 cp_build_qualified_type: Adjust.
6752 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6753 tf_*.
6754 * call.c (standard_conversion): Rename itf_* to tf_*.
6755 (reference_binding): Likewise.
6756 (convert_like_real): Likewise.
6757 * cvt.c (cp_convert_to_pointer): Likewise.
6758 (convert_to_reference): Likewise.
6759 * decl.c (lookup_namespace_name): Use tf_* flags.
6760 (make_typename_type): Likewise.
6761 (grokdeclarator): Likewise.
6762 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6763 (coerce_template_template_parms, convert_template_argument,
6764 coerce_template_parms, maybe_get_template_decl_from_type_decl,
6765 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
6766 instantiate_class_template, tsubst_template_arg_vector,
6767 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 6768 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 6769 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 6770 instantiate_template, fn_type_unification,
500abaa8
AJ
6771 resolve_overloaded_unification, verify_class_unification,
6772 unify, get_bindings_real, do_type_instantiation,
6773 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
6774 tsubst_initializer_list, tsubst_enum,
6775 get_mostly_instantiated_function_type,
6776 invalid_nontype_parm_type_p): Likewise.
6777 * tree.c (cp_build_qualified_type_real): Likewise.
6778 * typeck.c (build_binary_op): Rename itf_* to tf_*.
6779 (build_ptrmemfunc): Likewise.
6780 (convert_for_assignment): Likewise.
6781
d5614afb
NS
67822002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6783
6784 PR c++/109
6785 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 6786 dependent types.
d5614afb
NS
6787 * decl2.c (handle_class_head): Don't push into template parm contexts.
6788 * pt.c (push_template_decl_real): Template parm contexts are never
6789 being defined.
6790
1af6141b
AO
67912002-02-05 Alexandre Oliva <aoliva@redhat.com>
6792
6793 * class.c: Include target.h.
6794 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6795 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6796 bit-field layout.
6797 * Make-lang.in: Adjust deps.
6798
d8a6f584
JM
67992002-02-05 Jason Merrill <jason@redhat.com>
6800
6801 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6802
6f9fdf4d
JJ
68032002-02-04 Jakub Jelinek <jakub@redhat.com>
6804
6805 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6806 (finish_switch_cond): Set SWITCH_TYPE.
6807
14691f8d
RH
68082002-02-04 Richard Henderson <rth@redhat.com>
6809
6810 * method.c (use_thunk): Always initialize the block tree. Reindent.
6811 * semantics.c (expand_body): Emit thunks after function, not before.
6812
e89a6075
JM
68132002-02-04 Jason Merrill <jason@redhat.com>
6814
6815 * decl.c (start_function): Call cplus_decl_attributes immediately
6816 after grokdeclarator.
6817
6818 * decl.c (start_function): Combine DECL_RESULT handling code.
6819
9780c24f
JM
68202002-02-03 Jason Merrill <jason@redhat.com>
6821
6822 * xref.c: Remove.
6823 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6824 (cp/xref.o): Remove dependencies.
6825 * class.c (finish_struct_1, check_methods): Don't call xref fns.
6826 (finish_struct_1): Likewise.
6827 * friend.c (make_friend_class): Likewise.
6828 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6829 * spew.c (read_process_identifier): Likewise.
6830
65f36ac8
JM
68312002-02-01 Jason Merrill <jason@redhat.com>
6832
efe49da0 6833 PR c++/4872
500abaa8 6834 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
6835 no return statement and no abnormal exit.
6836 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6837 (current_function_returns_abnormally): New macro.
6838 * call.c (build_call): Set it.
6839
f2d9afec
JM
6840 * typeck.c (build_component_ref): Always complain about offsetof
6841 constructs on non-PODs. Only make it an error for members of
6842 virtual bases.
6843
65f36ac8
JM
6844 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6845 (dump_function_decl): Always dump parms.
6846
6847 * decl2.c (finish_static_data_member_decl): Complain about a local
6848 class with a static data member.
6849
6850 PR c++/4286
6851 * search.c (lookup_field_1): Don't xref a static data member
6852 just because we looked it up.
6853
98884b26
JM
68542002-01-31 Jason Merrill <jason@redhat.com>
6855
b88c0704
JM
6856 * Make-lang.in (parse.c): Handle .output file.
6857
a588fe25
JM
6858 PR c++/3395
6859 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6860 not TREE_TYPE.
6861 * semantics.c (finish_class_definition): Adjust.
6862
98884b26
JM
6863 Allow attributes in parms and casts.
6864 * parse.y (named_parm): Don't strip attrs.
6865 (declmods): Remove 'attributes' production.
6866 (nonempty_cv_qualifiers): Accept attributes.
6867 (ATTRIBUTE): Give precedence.
6868 * decl.c (groktypename): Handle attributes.
6869 (grokparms): Likewise.
6870
ffdeea47
JJ
68712002-01-29 Jakub Jelinek <jakub@redhat.com>
6872
6873 * decl2.c (cxx_decode_option): Pass 0 as last argument to
6874 cpp_handle_option.
6875 * lang-specs.h: Use cpp_unique_options instead of cpp_options
6876 when used together with cc1_options.
6877
b8b98c66
NS
68782002-01-29 Nathan Sidwell <nathan@codesourcery.com>
6879
6880 PR c++/5132
6881 * typeck2.c (digest_init): Make sure non-array core type is
6882 instantiated.
6883 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6884 constructor, rather than build a new one.
6885 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6886 PURPOSE of constructor elts.
6887
7437519c
ZW
68882002-01-23 Zack Weinberg <zack@codesourcery.com>
6889
6890 * Make-lang.in (parse.c): Adjust expected number of
6891 shift-reduce conflicts.
6892 (decl.o): Depend on diagnostic.h.
6893 * decl.c: Include diagnostic.h.
6894 (grokdeclarator): Check for null pointer.
6895 (finish_function): Don't abort when
6896 current_binding_level->parm_flag != 1, if errors have
6897 occurred; throw away the statement tree and extra binding
6898 levels, and continue.
6899 * lex.c (note_list_got_semicolon): Check for null pointer.
6900 * method.c (hack_identifier): Just return error_mark_node if
6901 value is error_mark_node.
6902 * parse.y (primary: TYPEID(type_id)): No need to use
6903 TYPE_MAIN_VARIANT here.
6904 (handler_seq): Accept an empty list of catch clauses and
6905 generate a fake handler block to avoid later crashes.
6906 (ansi_raise_identifier): Accept the error token too.
6907 * semantics.c (begin_class_definition,
6908 finish_class_definition): Check for error_mark_node.
6909
c588e52b
ZW
69102002-01-23 Zack Weinberg <zack@codesourcery.com>
6911
6912 * typeck2.c (friendly_abort): Delete definition.
6913 * cp-tree.h (friendly_abort): Don't prototype.
6914 (my_friendly_assert): Use fancy_abort.
6915
d55ecaa4
CR
69162002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6917
6918 * cp-tree.h (my_friendly_abort): Remove.
6919
0a01c261
JJ
69202002-01-23 Jakub Jelinek <jakub@redhat.com>
6921
6922 * spew.c (pending_inlines, pending_inlines_tail,
6923 processing_these_inlines): Make static.
6924 (mark_pending_inlines): Remove static.
6925 (begin_parsing_inclass_inline): If in function, save pi
6926 for GC to cp_function_chain->unparsed_inlines instead.
6927 (process_next_inline): Likewise.
6928 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6929 (mark_pending_inlines): Add prototype.
6930 * decl.c (spew_debug): Remove unused extern.
6931 (mark_lang_function): Call mark_pending_inlines.
6932
a98facb0
CR
69332002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
6934
c588e52b
ZW
6935 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6936 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6937 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
6938 Change my_fancy_abort() to abort().
6939
f893c16e
JM
69402002-01-23 Jason Merrill <jason@redhat.com>
6941
608afcc5
JM
6942 PR c++/5453
6943 * class.c (fixed_type_or_null): Fix thinko.
6944
f893c16e
JM
6945 PR c++/3331
6946 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 6947
b2115575
JM
6948 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6949
f893c16e
JM
69502002-01-22 Jason Merrill <jason@redhat.com>
6951
b5856475
JM
6952 * parse.y (function_body): Suppress the block for the outermost
6953 curly braces.
6954 * decl.c (pushdecl): Don't try to skip it.
6955 (begin_function_body): Keep the block we create, not the next one.
6956 * init.c (emit_base_init): Don't mess with keep_next_level.
6957
6bc34b14
JM
6958 * class.c (build_base_path): Tweak formatting.
6959
3807621a
NS
69602002-01-19 Nathan Sidwell <nathan@codesourcery.com>
6961
6962 Fix regression introduced with patch for c++/775
6963 * parse.y (class_head_defn): Check for template specializations
6964 with a different class-key.
6965
cdd2559c
JM
69662002-01-17 Jason Merrill <jason@redhat.com>
6967
6968 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6969 (begin_function_body): Call them and keep_next_level.
6970 * init.c (emit_base_init): Call keep_next_level.
6971 * semantics.c (setup_vtbl_ptr): Lose.
6972 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6973 (vtbls_set_up_p): Lose.
6974 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6975 * method.c (do_build_copy_constructor): Likewise.
6976 (synthesize_method): Call finish_mem_initializers.
6977 * parse.y (nodecls): Likewise.
ad6b1795
JM
6978
6979 * error.c (dump_type_suffix): Print the exception specs before
6980 recursing.
6981 (dump_function_decl): Here, too.
6982
6983 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6984
195a5def
IR
69852002-01-10 Ira Ruben <ira@apple.com>
6986
6bc34b14 6987 PR c++/907
195a5def
IR
6988 * decl.c (start_method): Handle attrlist.
6989
f21ee879
JJ
69902002-01-10 Jakub Jelinek <jakub@redhat.com>
6991
6992 * decl2.c (max_tinst_depth): Increase default limit to 500.
6993
69942002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
6995
6996 * spew.c (YYCHAR): Uppercase macro parameter and add
6997 parenthesis.
6998 (YYCODE): Likewise.
6999 (NAME): Uppercase macro parameter.
7000
c3af729a
GS
70012002-01-09 Graham Stott <grahams@redhat.com>
7002
6bc34b14 7003 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 7004
c3af729a
GS
7005 * semantics.c (FINISH_COND): Uppercase macro paramaters and
7006 add parenthesis.
7007
91800747
GS
70082002-01-08 Graham Stott <grahams@redhat.com>
7009
7010 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7011 (PALLOC): Uppercase macro parameter and whitespace.
7012 (SALLOC): Uppercase macro parameter.
7013 (SFREE): Uppercase macros parameter, add parenthese and
7014 whitespace.
7015 (STREQL): Uppercase macro parameter and whitespace.
7016 (STRNEQ): Likewise.
7017 (STRLSS): Likewise.
7018 (STRLEQ): Likewise.
7019 (STRGTR): Likewise.
7020 (STRGEQ): Likewise.
7021
7022 * call.c (convert_like): Add parenthesis and wrap.
7023 (convert_like_with_context): Likewise.
7024 (ICS_RANK): Whitespace.
7025 (NEED_TEMPORARY_P): Remove parenthesis.
7026
7027 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7028 whitespace.
7029 (VTT_MARKED_BINFO_P): Likewise.
7030
7031 * decl.c (BINDING_LEVEL): Add parenthesis.
7032 (DEF_OPERATOR): Likewise.
7033
91800747
GS
7034 * mangle.c (MANGLE_TRACE): Add parenthesis.
7035 (MANGLE_TRACE_TREE): Likewise.
7036 (write_signed_number): Likewise.
7037 (write_unsigned_number): Likewise.
7038
7039 * pt.c (ccat): Uppercase macro parameter.
7040 (cat): Likewise
7041
7042 * search.c (SET_BINFO_ACCESS): Add parenthesis.
7043
15eb1e43
JM
70442002-01-07 Jason Merrill <jason@redhat.com>
7045
7046 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7047 to pedwarn.
7048
6bc34b14 7049 PR c++/3536
15eb1e43
JM
7050 * method.c (make_thunk): If !flag_weak, give the thunk the
7051 function's linkage.
7052 (use_thunk): Here, too.
7053
b34c06e3
GS
70542002-01-07 Graham Stott <grahams@redhat.com>
7055
6bc34b14
JM
7056 * error.c: Update copyright date.
7057 (print_scope_operator): Add parenthesis.
7058 (print_left_paren): Likewise.
7059 (print_right_paren): Likewise.
7060 (print_left_bracket): Likewise.
7061 (print_right_bracket): Likewise.
7062 (print_template_argument_list_start): Likewise.
7063 (print_template_argument_list_end): Likewise.
7064 (print_non_consecutive_character): Likewise.
7065 (print_tree_identifier): Likewise.
7066 (print_identifier): Likewise.
7067 (NEXT_CODE): Uppercase macro parameter.
7068 (ident_fndecl): Delete unused.
7069 (GLOBAL_THING): Likewise.
b34c06e3 7070
98e40e83
GS
70712002-01-06 Graham Stott <grahams@redhat.com>
7072
7073 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7074 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7075 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7076 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7077 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7078 (C_IS_RESERVED_WORD): Uppercase macro parameter.
7079 (C_RID_YYCODE) Likewise.
7080 (ptrmem_cst): Use rtx.
7081 (LOCAL_BINDING_P): Add whitespace.
7082 (INHERITED_VALUE_BINDING_P): Likewise.
7083 (BINDING_SCOPE): Wrap long line.
7084 (BINDING_HAS_LEVEL_P): Remove parenthesis.
7085 (BINDING_VALUE): Wrap long line.
7086 (BINDING_TYPE): Whitespace.
7087 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7088 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 7089 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
7090 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7091 (same_type_p): Uppercase macro parameters.
7092 (same_type_ignoring_top_level_qualifiers_p): Likewise.
7093 (OVL_FUNCTION): Wrap long line.
7094 (OVL_CHAIN): Whitespace.
b34c06e3 7095 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
7096 (OVL_NEXT): Whitespace.
7097 (OVL_USED): Likewise.
7098 (IDENTIFIER_TYPE_VALUE): Likewise.
7099 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7100 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7101 (LANG_ID_FIELD): Whitespace.
7102 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7103 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7104 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7105 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7106 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7107 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7108 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7109 (IDENTIFIER_VIRTUAL_P): Likewise.
7110 (IDENTIFIER_OPNAME_P): Likewise.
7111 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7112 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7113 (C_SET_EXP_ORIGINAL_CODE): Likewise.
7114 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7115 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7116 (IS_AGGR_TYPE): Uppercase macro parameter.
7117 (CLASS_TYPE_P): Likewise.
7118 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7119 (IS_AGGR_TYPE_2): Whitespace.
7120 (TAGGED_TYPE_P): Uppercase macro parameter.
7121 (TYPE_BUILT_IN): Whitespace.
7122 (TYPE_FOR_JAVA): Likewise.
7123 (FUNCTION_ARG_CHAIN): Remove parenthesis.
7124 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7125 (FUNCTION_FIRST_USER_PARAM): Likewise.
7126 (PROMOTES_TO_AGGR_TYPE): Whitespace.
7127 (DERIVED_FROM_P): Add parenthesis and wrap.
7128 (UNIQUELY_DERIVED_FROM_P): Likewise.
7129 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7130 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7131 (CLASSTYPE_USE_TEMPLATE): Whitespace.
7132 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7133 (TYPE_GETS_DELETE): Add parenthesis.
7134 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7135 (TYPE_HAS_ASSIGN_REF): Likewise,
7136 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7137 (TYPE_HAS_INIT_REF): Likewise.
7138 (TYPE_HAS_CONST_INIT_REF): Likewise.
7139 (TYPE_BEING_DEFINED): Likewise.
7140 (TYPE_LANG_SPECIFIC): Likewise.
7141 (CLASSTYPE_RTTI): Likewise.
7142 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7143 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7144 (TYPE_OVERLOADS_ARROW): Likewise.
7145 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7146 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7147 (CLASSTYPE_METHOD_VEC): Likewise.
7148 (CLASSTYPE_MARKED_N): Likewise.
7149 (CLASSTYPE_MARKED): Likewise.
7150 (CLASSTYPE_MARKED2): Likewise.
7151 (CLASSTYPE_MARKED3): Likewise.
7152 (CLASSTYPE_MARKED4): Likewise.
7153 (CLASSTYPE_MARKED5): Likewise.
7154 (CLASSTYPE_MARKED6): Likewise.
7155 (SET_CLASSTYPE_MARKED): Whitespace.
7156 (CLEAR_CLASSTYPE_MARKED): Likewise.
7157 (SET_CLASSTYPE_MARKED2): Likewise.
7158 (CLEAR_CLASSTYPE_MARKED2): Likewise.
7159 (SET_CLASSTYPE_MARKED3): Likewise.
7160 (CLEAR_CLASSTYPE_MARKED3): Likewise.
7161 (SET_CLASSTYPE_MARKED4): Likewise.
7162 (CLEAR_CLASSTYPE_MARKED4): Likewise.
7163 (SET_CLASSTYPE_MARKED5): Likewise.
7164 (CLEAR_CLASSTYPE_MARKED5): Likewise.
7165 (SET_CLASSTYPE_MARKED6): Likewise.
7166 (CLEAR_CLASSTYPE_MARKED6): Likewise.
7167 (CLASSTYPE_TAGS): Likewise.
7168 (CLASSTYPE_VSIZE): Likewise.
7169 (CLASSTYPE_VBASECLASSES): Likewise.
7170 (CANONICAL_BINFO): Add parenthesis.
7171 (CLASSTYPE_SIZE(NODE): Likewise.
7172 (CLASSTYPE_SIZE_UNIT): Likewise.
7173 (CLASSTYPE_ALIGN(NODE): Likewise.
7174 (CLASSTYPE_USER_ALIGN): Likewise.
7175 (TYPE_JAVA_INTERFACE): Likewise.
7176 (CLASSTYPE_PURE_VIRTUALS): Likewise.
7177 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7178 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7179 (CLASSTYPE_HAS_MUTABLE): Likewise.
7180 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7181 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7182 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7183 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7184 (CLASSTYPE_INTERFACE_ONLY): Likewise.
7185 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7186 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7187 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7188 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7189 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7190 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7191 (BINFO_UNSHARED_MARKED): Whitespace.
7192 (BINFO_MARKED): Whitespace and wrap.
7193 (SET_BINFO_MARKED): Likewise.
7194 (CLEAR_BINFO_MARKED): Likewise.
7195 (BINFO_VTABLE_PATH_MARKED): Likewise.
7196 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7197 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7198 (BINFO_SUBVTT_INDEX): Remove parenthesis.
7199 (BINFO_VPTR_INDEX): Likewise.
7200 (BINFO_PRIMARY_BASE_OF): Likewise,
7201 (CLASSTYPE_VFIELDS): Whitespace.
7202 (VF_DERIVED_VALUE): Wrap long line.
7203 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
7204 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7205 (DEFARG_POINTER): Whitespace.
7206 (DECL_NEEDED_P): Remove parenthesis.
7207 (DECL_LANGUAGE): Whitespace.
7208 (SET_DECL_LANGUAGE): Add parenthesis.
7209 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7210 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7211 (DECL_IN_AGGR_P): Whitespace.
7212 (DECL_FRIEND_P): Likewise.
7213 (DECL_BEFRIENDING_CLASSES): Likewise.
7214 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7215 (DECL_NONCONVERTING_P): Whitespace.
7216 (DECL_PURE_VIRTUAL_P): Likewise.
7217 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7218 (DECL_PENDING_INLINE_INFO): Whitespace.
7219 (DECL_SORTED_FIELDS): Likewise.
7220 (DECL_DEFERRED_FN): Likewise.
7221 (DECL_TEMPLATE_INFO): Likewise.
7222 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7223 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7224 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7225 (TMPL_ARGS_LEVEL): Likewise.
7226 (SET_TMPL_ARGS_LEVEL): Likewise.
7227 (INNERMOST_TEMPLATE_PARMS): Whitespace.
7228 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7229 (INTEGRAL_CODE_P(CODE): Add parenthesis.
7230 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7231 (TYPE_HAS_CONSTRUCTOR): Whitespace.
7232 (TREE_HAS_CONSTRUCTOR): Likewise.
7233 (TYPE_HAS_DESTRUCTOR): Likewise.
7234 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7235 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7236 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7237 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7238 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7239 (TYPE_PTRMEMFUNC_P): Likewise.
7240 (TYPE_PTRMEMFUNC_FLAG): Likewise.
7241 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7242 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7243 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7244 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7245 (DECL_ACCESS): Whitespace.
7246 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7247 (DECL_GLOBAL_DTOR_P): Likewise.
7248 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 7249 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
7250 (DECL_TEMPLATE_RESULT): Likewise.
7251 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7252 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7253 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7254 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7255 (PRIMARY_TEMPLATE_P): Add parenthesis.
7256 (DECL_USE_TEMPLATE): Whitespace.
7257 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7258 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7259 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7260 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7261 (CALL_DECLARATOR_PARMS): Remove parenthesis.
7262 (CALL_DECLARATOR_QUALS): Likewise.
7263 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7264 (TEMP_NAME_P): Wrap.
7265 (VFIELD_NAME_P): Likewise.
7266 (B_SET): Uppercase macro parameters and add parenthesis.
7267 (B_CLR): Likewise.
7268 (B_TST): Likewise.
7269 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7270 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7271 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7272 (same_or_base_type_p): Likewise.
7273 (cp_deprecated): Likewise.
98e40e83 7274
c28abdf0
RH
72752002-01-05 Richard Henderson <rth@redhat.com>
7276
15eb1e43 7277 * semantics.c (expand_body): Revert last change.
c28abdf0 7278
f11ee281
JM
72792002-01-04 Jason Merrill <jason@redhat.com>
7280
195a5def 7281 PR c++/4122
f11ee281
JM
7282 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7283 lost primary.
7284
7285 * class.c (build_vtbl_initializer): Check for a lost primary
7286 before calculating the vtable entry to throw away.
7287
a4200657
JM
72882002-01-02 Jason Merrill <jason@redhat.com>
7289
7290 * semantics.c (expand_body): Call outlining_inline_function when
7291 emitting an inline function out of line.
7292
40e593d7
NS
72932002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7294
7295 PR c++/5116, c++/764 reversion
7296 * call.c (build_new_op): Revert the instantiations. They are
7297 incorrect.
c588e52b 7298
323728aa
NS
72992002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7300
7301 PR c++/5089
7302 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7303
46c895ac
NS
73042002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7305
7306 PR c++/3716
7307 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7308 (tsubst, case POINTER_TYPE): Handle pmfs here.
7309 (tsubst, case OFFSET_TYPE): Check it is not an offset to
7310 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7311
833aa4c4
NS
73122002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7313
7314 PR c++/35
7315 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7316 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7317 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7318 PARM_DECL.
7319 (tsubst_template_parms): Break up loop statements.
7320 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7321 parm PARM_DECLs don't get promoted.
7322
18976b21
NS
73232002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7324
7325 PR c++/5123
7326 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7327 (build_x_function_call): Cope with a COMPONENT_REF containing a
7328 TEMPLATE_ID_EXPR.
7329
303d1c55
NS
73302002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7331
7332 PR c++/5213
7333 * pt.c (convert_template_argument): Be more careful determining
7334 when RECORD_TYPE templates are or are not templates.
7335
d46a33b3
NS
73362002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7337
7338 PR c++/775
7339 * cp-tree.h (handle_class_head): Adjust prototype.
7340 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7341 parameters. Use for all class heads.
7342 * parse.y (named_class_head_sans_basetype, named_class_head,
7343 named_complex_class_head_sans_basetype,
7344 named_class_head_sans_basetype_defn,
7345 unnamed_class_head): Remove.
7346 (class_head, class_head_apparent_template): Recognize class heads
7347 (class_head_decl, class_head_defn): New reductions. Process class
7348 heads.
7349 (structsp): Adjust class definition and class declaration
7350 reductions.
7351 (maybe_base_class_list): Give diagnostic on empty list.
7352
4542128e
NS
73532002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7354
7355 PR c++/4379
7356 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7357 single non-static member.
7358 (unary_complex_lvalue): If it cannot be a pointer to member, don't
7359 make it so. Check it is not pointer to reference.
7360
903c6234
NS
73612002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7362
7363 PR c++/5132
7364 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7365 are processing a template decl.
7366
477558bf
NS
73672002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7368
7369 PR c++/5116, c++/764
7370 * call.c (build_new_op): Make sure template class operands are
7371 instantiated. Simplify arglist construction.
7372
41f5d4b1
NS
73732001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7374
7375 * call.c (build_user_type_conversion_1): Use my_friendly_assert
7376 rather than if ... abort.
7377 * cvt.c (convert_to_reference): Likewise.
7378 * semantics.c (setup_vtbl_ptr): Likewise.
7379 * pt.c (lookup_template_class): Comment typo.
c588e52b 7380
f3368a90
NS
73812001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7382
7383 PR c++/5125
7384 * pt.c (push_template_decl_real): Make sure DECL has
7385 DECL_LANG_SPECIFIC.
7386
03c9c274
NS
73872001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7388
7389 PR c++/335
7390 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7391 for non-reference fields.
7392 * typeck.c (require_complete_type): Use resolve_offset_ref).
7393
7d8e8369
NS
73942001-12-26 Nathan Sidwell <nathan@codesourcery.com>
7395
7396 PR c++/196
03c9c274 7397 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 7398
a56ca899
NS
73992001-12-24 Nathan Sidwell <nathan@codesourcery.com>
7400
7401 PR c++/160
7402 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7403 up. Don't stabilize_references when initializing a reference.
7404
0b5826ac
KG
74052001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7406
7407 * decl2.c (lang_f_options): Const-ify.
7408
38be19f6
JM
74092001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
7410
7411 * config-lang.in (diff_excludes): Remove.
7412
2e4cf9dc
NS
74132001-12-19 Nathan Sidwell <nathan@codesourcery.com>
7414
7415 PR c++/90
7416 * typeck.c (build_function_call_real): Use original function
7417 expression for errors.
7418
00e4119c
JM
74192001-12-18 Jason Merrill <jason@redhat.com>
7420
195a5def 7421 PR c++/3242
00e4119c
JM
7422 * class.c (add_method): Do compare 'this' quals when trying to match a
7423 used function. Don't defer to another used function.
7424
3ad97789
NS
74252001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7426
7427 * pt.c (instantiate_clone): Remove, fold into ...
7428 (instantiate_template): ... here. Simplify by removing mutual
7429 recursion.
7430 * typeck2.c (build_m_component_ref): Don't cv qualify the function
7431 pointed to by a pointer to function.
7432 * class.c (delete_duplicate_fields_1): Typo.
7433
f21add07
JM
74342001-12-18 Jason Merrill <jason@redhat.com>
7435
7436 C++ ABI change: destroy value arguments in caller.
7437 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7438 create an extra binding level for the parameters.
7439 * decl.c (store_parm_decls): Don't do parameter cleanups.
7440
ea50ad82
NS
74412001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7442
7443 * call.c (build_new_method_call): Use '%#V'.
7444 * error.c (cv_to_string): Use V parameter to determine padding.
7445
3855d0d1
JM
74462001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7447
7448 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7449 spellings in messages.
7450
33bd39a2
ZW
74512001-12-17 Zack Weinberg <zack@codesourcery.com>
7452
7453 * cp-tree.h: Delete #defines for cp_error, cp_warning,
7454 cp_pedwarn, and cp_compiler_error.
7455 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7456 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7457 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7458 typeck2.c: Change calls to the above macros to use their
7459 language-independent equivalents: error, warning, pedwarn, and
7460 internal_error respectively.
7461
317c26c3
NB
74622001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
7463
7464 * decl2.c (finish_file): Remove back_end_hook.
7465
aba649ba
JM
74662001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
7467
7468 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7469 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7470 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7471
1737c953
JM
74722001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
7473
7474 * lang-options.h: Use American spelling in messages.
7475
4a90862e
JM
74762001-12-13 Jason Merrill <jason@redhat.com>
7477
ade3dc07
JM
7478 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7479
7480 Use cleanups to run base and member destructors.
7481 * init.c (push_base_cleanups): New function, split out from...
7482 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
7483 * decl.c (finish_destructor_body): Move vbase destruction code to
7484 push_base_cleanups.
7485 (begin_function_body, finish_function_body): New fns.
7486 (finish_function): Move [cd]tor handling and call_poplevel to
7487 finish_function_body.
7488 (pushdecl): Skip the new level.
7489 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7490 (setup_vtbl_ptr): Call push_base_cleanups.
7491 * method.c (synthesize_method): Call {begin,end}_function_body.
7492 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7493 * cp-tree.h: Declare new fns.
7494 * parse.y (function_body, .begin_function_body): New nonterminals.
7495 (fndef, pending_inline, function_try_block): Use function_body.
7496 (ctor_initializer_opt, function_try_block): No longer has a value.
7497 (base_init): Remove .set_base_init token.
7498 (.set_base_init, compstmt_or_error): Remove.
7499 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7500
4a90862e
JM
7501 * optimize.c (maybe_clone_body): Fix parameter updating.
7502
a0de9d20
JM
75032001-12-12 Jason Merrill <jason@redhat.com>
7504
7505 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7506 * semantics.c (genrtl_start_function): Don't pass
7507 parms_have_cleanups or push an extra binding level.
7508 (genrtl_finish_function): Lose cleanup_label cruft.
7509
7510 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7511 (ctor_label): Remove.
7512 * semantics.c (finish_return_stmt): Lose ctor_label support.
7513 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 7514 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
7515 dtor_label.
7516
7517 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7518 check for [cd]tors.
7519 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7520
7521 * decl.c (finish_function): Check VMS_TARGET, not VMS.
7522
7523 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7524 (end_cleanup_fn): And poplevel.
7525
7526 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7527 if we're in a template.
7528
dc5c569a
JJ
75292001-12-12 Jakub Jelinek <jakub@redhat.com>
7530
7531 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7532 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7533 THIS_NAME_P): Delete.
7534 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7535 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7536 with internal naming scheme.
7537 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7538
ad1a6d45
NS
75392001-12-12 Nathan Sidwell <nathan@codesourcery.com>
7540
7541 * decl.c (grokdeclarator): Deprecated implicit typename use.
7542
270d8c65
NS
75432001-12-11 Nathan Sidwell <nathan@codesourcery.com>
7544
7545 PR g++/51
7546 * parse.y (frob_specs): Indicate it is a language linkage which
7547 contained the extern.
7548 * decl.c (grokdeclarator): Allow extern language linkage with
7549 other specifiers.
7550
9aaceb4b
NS
75512001-12-10 Nathan Sidwell <nathan@codesourcery.com>
7552
7553 PR g++/72
7554 * decl.c (add_binding): Don't reject duplicate typedefs involving
7555 template parameters.
7556
a23c9413
NB
75572001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
7558
7559 * parse.y, semantics.c: Similarly.
7560
9aaceb4b 75612001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
7562
7563 PR g++/87
7564 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7565 (copy_args_p): Rename to ...
7566 (copy_fn_p): ... here.
7567 (grok_special_member_properties): New function.
7568 (grok_op_properties): Lose VIRTUALP parameter.
7569 (copy_assignment_arg_p): Remove.
7570 * call.c (build_over_call): Use copy_fn_p.
7571 * decl.c (grokfndecl): Reformat. Adjust call to
7572 grok_op_properties.
7573 (copy_args_p): Rename to ...
7574 (copy_fn_p): ... here. Reject template functions. Check for pass
7575 by value.
7576 (grok_special_member_properties): Remember special functions.
7577 (grok_ctor_properties): Don't remember them here, just check.
7578 (grok_op_properties): Likewise.
7579 (start_method): Call grok_special_member_properties.
7580 * decl2.c (grokfield): Likewise.
7581 (copy_assignment_arg_p): Remove.
7582 (grok_function_init): Don't remember abstract assignment here.
7583 * pt.c (instantiate_class_template): Call
7584 grok_special_member_properties.
7585 (tsubst_decl): Adjust grok_op_properties call.
7586
bdd8737f
AH
75872001-12-08 Aldy Hernandez <aldyh@redhat.com>
7588
33bd39a2
ZW
7589 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7590 RID_TYPES_COMPATIBLE_P.
bdd8737f 7591
46af705a
JDA
75922001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
7593
7594 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7595 call to build_aggr_init.
7596 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7597
cb97d97d
NB
75982001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
7599
7600 * parse.y: Replace uses of the string non-terminal with STRING.
7601 Don't perform string concatentaion here.
7602 (string): Remove non-terminal.
7603 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7604
742a37d5
JM
76052001-12-05 Jason Merrill <jason@redhat.com>
7606
7607 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7608 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7609 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7610 * pt.c (push_tinst_level): No longer static.
7611 * cp-tree.h: Declare them.
7612
7613 * init.c (resolve_offset_ref): Don't check access for the base
7614 conversion to access a FIELD_DECL.
7615
7616 * cp-tree.h (TYPE_REFFN_P): New macro.
7617 * decl.c (bad_specifiers): Check it, too.
7618
7619 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7620 on the __*_type_info type if we haven't seen a definition.
7621
26f943fd
NB
76222001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
7623
7624 * decl.c: Include c-common.h.
7625 (shadow_warning): Move to c-common.c.
7626
d2a6f3c0 76272001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
37a08a29
RK
7628
7629 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7630
9471d3e2
NS
76312001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7632
7633 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7634
713ccd0c
NS
76352001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7636
7637 PR g++/164
7638 * init.c (sort_base_init): Allow binfos to be directly specified.
7639 * method.c (do_build_copy_constructor): Explicitly convert to the
7640 base instance.
7641 (do_build_assign_ref): Likewise.
7642
591382c4
HPN
76432001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
7644
7645 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7646 declaration and initialization.
7647
c725bd79
NB
76482001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
7649
7650 * typeck2.c: Remove leading capital from diagnostic messages, as
7651 per GNU coding standards.
7652
a5d7c4a3
MK
76532001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
7654
7655 PR c++/3394
9fe038e8
HPN
7656 * decl.c (xref_basetypes): Handle attributes between
7657 'class' and name.
a5d7c4a3 7658
f1880e13
NS
76592001-12-03 Nathan Sidwell <nathan@codesourcery.com>
7660
7661 PR g++/3381
7662 * parse.y (named_complex_class_head_sans_basetype): Add new
7663 reduction.
7664 * Make-lang.in (parse.c): Adjust expected conflict count.
7665
ff668506
JM
76662001-12-03 Jason Merrill <jason@redhat.com>
7667
7668 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7669 immediate binfos for our virtual bases.
7670
1f978f5f
NB
76712001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
7672
7673 * call.c (build_java_interface_fn_ref): Similarly.
7674 * except.c (is_admissible_throw_operand): Similarly.
7675 * init.c (build_java_class_ref): Similarly.
7676 * xref.c (open_xref_file): Similarly.
7677
357351e5
NB
76782001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
7679
7680 * class.c (finish_struct): Remove trailing periods from messages.
7681 * decl.c (check_tag_decl): Similarly.
7682 * lex.c (cxx_set_yydebug): Similarly.
7683 * typeck2.c (friendly_abort): Similarly.
7684
998979e6
MM
76852001-11-29 Mark Mitchell <mark@codesourcery.com>
7686
7687 PR c++/3048
7688 * cp-tree.h (ovl_member): Remove.
33bd39a2 7689 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
7690 specially.
7691 * tree.c (ovl_member): Remove.
7692
7d5b8b11
MM
76932001-11-29 Mark Mitchell <mark@codesourcery.com>
7694
7695 PR c++/4842
7696 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7697 FUNCTION_DECL, as input.
7698 (mark_overriders): Remove.
7699 (warn_hidden): Rework for the new ABI.
7700
b67db529
MM
77012001-11-29 Mark Mitchell <mark@codesourcery.com>
7702
7703 PR c++/3471
7704 * call.c (convert_like_real): Do not build additional temporaries
7705 for rvalues of class type.
7706
2db1ab2d
NS
77072001-11-28 Nathan Sidwell <nathan@codesourcery.com>
7708
7709 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7710 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7711 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7712 (DERIVED_FROM_P): Likewise.
7713 (enum base_access): Renumber, add ba_quiet bit mask.
7714 (get_binfo): Remove.
7715 (get_base_distance): Remove.
7716 (binfo_value): Remove.
7717 (ACCESSIBLY_DERIVED_FROM_P): Remove.
7718 * call.c (standard_conversion): Use lookup_base.
7719 * class.c (strictly_overrides): Likewise.
7720 (layout_virtual_bases): Likewise.
7721 (warn_about_ambiguous_direct_bases): Likewise.
7722 (is_base_of_enclosing_class): Likewise.
7723 (add_vcall_offset_vtbl_entries_1): Likewise.
7724 * cvt.c (build_up_reference): Adjust comment.
7725 * init.c (build_member_call): Reformat.
7726 * search.c (get_binfo): Remove.
7727 (get_base_distance_recursive): Remove.
7728 (get_base_distance): Remove.
7729 (lookup_base_r): Tweak.
7730 (lookup_base): Add ba_quiet control. Complete the types here.
7731 (covariant_return_p): Use lookup_base.
7732 * tree.c (binfo_value): Remove.
7733 (maybe_dummy_object): Use lookup_base.
7734 * typeck.c (build_static_cast): Use lookup_base.
7735 (get_delta_difference): Likewise.
7736 * typeck2.c (binfo_or_else): Use lookup_base.
7737 (build_scoped_ref): Add back error_mark_check.
7738 (build_m_component_ref): Use lookup_base.
7739
d3945f0a
JM
77402001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
7741
7742 * Make-lang.in (c++.generated-manpages): New dummy target.
7743
d2a6f3c0 77442001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ac79cd5a
RK
7745
7746 * Make-lang.in (cp-lang.o): Depends on c-common.h.
7747 * cp-lang.c (c-common.h): Include.
7748 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7749 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7750 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7751
4d6baafa
NB
77522001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
7753
7754 * decl2.c (c_language): Move to c-common.c.
7755 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7756 functions.
7757 (cxx_init): Update.
7758
5b0c5896
JM
77592001-11-26 Jason Merrill <jason@redhat.com>
7760
7761 * call.c (joust): Remove COND_EXPR hack.
7762
4bdd26e6
AH
77632001-11-25 Aldy Hernandez <aldyh@redhat.com>
7764
195a5def 7765 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 7766 space.
33bd39a2 7767
338d90b8
NS
77682001-11-25 Nathan Sidwell <nathan@codesourcery.com>
7769
7770 PR g++/3145
7771 * class.c (build_vbase_pointer): Remove.
7772 (build_vbase_path): Remove.
7773 (build_base_path): New function.
7774 * cp-tree.h (base_access, base_kind): New enumerations.
7775 (build_base_path): Declare.
7776 (convert_pointer_to_real): Remove.
7777 (convert_pointer_to): Remove.
7778 (lookup_base): Declare.
7779 (convert_pointer_to_vbase): Remove.
7780 * call.c (build_scoped_method_call): Use lookup_base &
7781 build_base_path instead of convert_pointer_to_real,
7782 get_base_distance & get_binfo.
7783 (build_over_call): Likewise.
7784 * cvt.c (cp_convert_to_pointer): Likewise.
7785 (convert_to_pointer_force): Likewise.
7786 (build_up_reference): Likewise.
7787 (convert_pointer_to_real): Remove.
7788 (convert_pointer_to): Remove.
7789 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7790 instead of convert_pointer_to_vbase & build_vbase_path.
7791 (emit_base_init): Use build_base_path instead of
7792 convert_pointer_to_real.
7793 (expand_virtual_init): Lose unrequired conversions.
7794 (resolve_offset_ref): Use lookup_base and build_base_path
7795 instead of convert_pointer_to.
7796 * rtti.c (build_dynamic_cast_1): Use lookup_base &
7797 build_base_path instead of get_base_distance & build_vbase_path.
7798 * search.c (get_vbase_1): Remove.
7799 (get_vbase): Remove.
7800 (convert_pointer_to_vbase): Remove.
07f521fc 7801 (lookup_base_r): New function.
338d90b8
NS
7802 (lookup_base): New function.
7803 * typeck.c (require_complete_type): Use lookup_base &
7804 build_base_path instead of convert_pointer_to.
7805 (build_component_ref): Likewise.
7806 (build_x_function_call): Likewise.
7807 (get_member_function_from_ptrfunc): Likewise.
7808 (build_component_addr): Likewise.
7809 * typeck2.c (build_scoped_ref): Likewise.
7810
89d684bb
BM
78112001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7812
7813 * cp-tree.h (CP_TYPE_QUALS): Removed.
7814 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 7815 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 7816 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 7817 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
7818 lang-hooks prototype.
7819 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7820 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7821 CP_TYPE_QUALS changed to cp_type_quals.
7822 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7823 (CXX_C_OBJS): Remove c-dump.o.
7824
12eb9f93 78252001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
7826
7827 PR c++/3637
12eb9f93
MM
7828 * pt.c (lookup_template_class): Ensure that all specializations
7829 are registered on the list corresponding to the most general
7830 template.
7831
78322001-11-20 Mark Mitchell <mark@codesourcery.com>
7833
2d2e8123 7834 * call.c (non_reference): Add documentation.
33bd39a2 7835 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
7836 from conversion operators.
7837 (maybe_handle_ref_bind): Simplify.
7838 (compare_ics): Correct handling of references.
7839
78a40378
MM
78402001-11-19 John Wilkinson <johnw@research.att.com>
7841
7842 * dump.c (dump_op): New function.
7843 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
7844 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7845 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 7846
78a40378
MM
78472001-11-19 Mark Mitchell <mark@codesourcery.com>
7848
7849 PR4629
7850 * semantics.c (finish_sizeof): Make sure that expression created
7851 while processing a template do not have a type.
7852 (finish_alignof): Likewise.
7853 * typeck.c (c_sizeof): Likewise.
7854 (expr_sizeof): Likewise.
7855
22703ccc
NB
78562001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
7857
7858 * lex.c (cxx_finish): Call c_common_finish.
7859 (finish_parse): Remove.
7860
b3faacfd
KL
78612001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7862
7863 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7864 when displaying error message about missing array bounds.
7865
873ff987
KL
78662001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7867
7868 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7869 CONST_CAST_EXPR.
7870 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7871
08f3a861
NB
78722001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
7873
7874 * cp-tree.h (print_class_statistics): Restore.
7875
8a2b77e7
JM
78762001-11-15 Jason Merrill <jason@redhat.com>
7877
3b1a4132
JM
7878 * method.c (use_thunk): Don't emit debugging information for thunks.
7879
8a2b77e7
JM
7880 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7881 * decl.c (make_typename_type): Handle getting a class template.
7882 * search.c (lookup_field_r): A class template is good enough for
7883 want_type.
7884
7885 * call.c (convert_like_real): Only use cp_convert for the bad part.
7886 (standard_conversion): Also allow bad int->enum.
7887 * typeck.c (ptr_reasonably_similar): Also allow functions to
7888 interconvert. Pointers to same-size integers are reasonably
7889 similar.
7890
7891 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7892 give it void type.
7893
36a68fe7
NS
78942001-11-15 Nathan Sidwell <nathan@codesourcery.com>
7895
7896 PR g++/3154
7897 * init.c (sort_base_init): Remove unreachable code.
7898 (expand_member_init): Adjust comment to reflect reality. Simplify
7899 and remove unreachable code.
7900
f5e99456
NB
79012001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
7902
7903 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7904 (cxx_init): Update prototype.
7905 * decl.c (init_decl_processing): Rename. Move null node init
7906 to its creation time.
7907 * lex.c (cxx_init_options): Update.
7908 (cxx_init): Combine with old init_parse; also call
7909 cxx_init_decl_processing.
7910
fe5b6c1c
RS
79112001-11-14 Richard Sandiford <rsandifo@redhat.com>
7912
8a2b77e7
JM
7913 * decl.c (check_initializer): Try to complete the type of an
7914 array element before checking whether it's complete. Don't
7915 complain about arrays with complete element types but an
7916 unknown size.
7917 (cp_finish_decl): Build the hierarchical constructor before
7918 calling maybe_deduce_size_from_array_init.
fe5b6c1c 7919
77bd67cb
JM
79202001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
7921
7922 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7923
b02922a4
NS
79242001-11-13 Nathan Sidwell <nathan@codesourcery.com>
7925
7926 PR g++/4206
7927 * parse.y (already_scoped_stmt): Remove.
7928 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7929
abfc1ef6
L
79302001-11-12 H.J. Lu <hjl@gnu.org>
7931
195a5def 7932 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
7933 function is always `true'.
7934
5d69f816
NB
79352001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7936
7937 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7938 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7939 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7940 * cp-tree.h (print_class_statistics): Remove.
7941 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7942 cxx_print_identifier, cxx_set_yydebug): New.
7943 * lex.c (set_yydebug): Rename c_set_yydebug.
7944 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7945 lang_print_xnode): Rename.
7946 * tree.c (print_lang_statistics): Rename.
7947
4fdc14ca
KG
79482001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7949
7950 * class.c (dump_array): Fix format specifier warning.
7951
3ac88239
NB
79522001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
7953
7954 * cp-lang.c (LANG_HOOKS_NAME): Override.
7955 (struct lang_hooks): Constify.
7956 * lex.c (cxx_init_options): Update.
7957 (lang_identify): Remove.
33bd39a2 7958 * parse.y (language_string): Remove.
3ac88239 7959
b21d216c
AF
79602001-11-08 Andreas Franck <afranck@gmx.de>
7961
7962 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7963 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7964 suggested by autoconf.
7965 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7966 (c++.install-common): Use the transformed target alias names.
7967
d23c55c2
NB
79682001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
7969
7970 * Make-lang.in: Update.
7971 * cp-lang.c: Include langhooks-def.h.
7972
2a2b1d56
KL
79732001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7974
7975 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7976
76648a8b
KG
79772001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7978
7979 * lex.c (copy_lang_type): Add static prototype.
7980
fccef71e
KL
79812001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7982
7983 * pt.c (unify): Handle SCOPE_REF.
7984
19989812
JJ
79852001-11-01 Jakub Jelinek <jakub@redhat.com>
7986
7987 * tree.c (cp_copy_res_decl_for_inlining): Adjust
7988 DECL_ABSTRACT_ORIGIN for the return variable.
7989
5b7874aa
ZW
79902001-10-31 Zack Weinberg <zack@codesourcery.com>
7991
7992 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7993
306ef644
JM
79942001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
7995
7996 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7997 semantics.c, spew.c: Fix spelling errors.
7998
76543000
KL
79992001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8000
8001 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8002
37207ee7
ZW
80032001-10-25 Zack Weinberg <zack@codesourcery.com>
8004
8005 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8006 pop_everything.
8007
d2a6f3c0 80082001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
8009
8010 * cp-lang.c (cxx_get_alias_set): New function.
8011 Point LANG_HOOKS_GET_ALIAS_SET to it.
8012
f1e09fa2 80132001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
8014
8015 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8016 * cp-tree.h (make_unbound_class_template): Prototype new function.
8017 * decl.c (make_unbound_class_template): New function.
8018 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8019 * error.c (dump_type): Likewise.
8020 * mangle.c (write_type): Likewise.
8021 * parse.y (template_parm): Likewise.
8022 (template_argument): Use make_unbound_class_template.
8023 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8024 (tsubst): Likewise.
8025 (tsubst_copy): Likewise.
8026 (unify): Likewise.
8027 * tree.c (walk_tree): Likewise.
8028 * typeck.c (comptypes): Likewise.
8029
0df6c2c7
KG
80302001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8031
8032 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8033 extra calls into fewer ones.
8034
97055d5c
AO
80352001-10-18 Alexandre Oliva <aoliva@redhat.com>
8036
8037 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8038 Warn when merging inline with attribute noinline.
8039 (start_decl, start_function): Warn if inline and attribute
8040 noinline appear in the same declaration.
8041
b5823a44
L
80422001-10-16 H.J. Lu <hjl@gnu.org>
8043
8044 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8045 for tree checking disabled.
8046
dc8ad298
HPN
80472001-10-16 Hans-Peter Nilsson <hp@axis.com>
8048
8049 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8050 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8051
d9f818d9
RS
80522001-10-15 Richard Sandiford <rsandifo@redhat.com>
8053
8054 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8055 (unify): Only handle MINUS_EXPR specially if the above flag is set
8056 and the subtracted constant is 1. Clear the flag on recursive calls.
8057 Set it when unifying the maximum value in an INTEGER_TYPE's range.
8058
e1be26f4
RS
80592001-10-15 Richard Sandiford <rsandifo@redhat.com>
8060
8061 * decl.c (bad_specifiers): Don't allow exception specifications
8062 on any typedefs.
8063
a5da89c6
NB
80642001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
8065
8066 * cp/lex.c (init_cp_pragma): Similarly.
8067
4f96ff63
KL
80682001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8069
8070 * pt.c (lookup_template_class): Build complete template arguments
8071 for BOUND_TEMPLATE_TEMPLATE_PARM.
8072
11e74ea6
KL
80732001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8074
8075 * cp-tree.h (TYPE_BINFO): Update comment.
8076 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8077 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8078 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8079 (copy_type): Prototype new function.
8080 * lex.c (copy_lang_decl): Gather tree node statistics.
8081 (copy_lang_type): New function.
8082 (copy_type): Likewise.
8083 (cp_make_lang_type): Create lang_type for
8084 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
8085 and BOUND_TEMPLATE_TEMPLATE_PARM.
8086 * pt.c (tsubst): Use copy_type instead of copy_node.
8087 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8088
f5d47abd
KL
80892001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8090
8091 * pt.c (determine_specialization): Ignore functions without
8092 DECL_TEMPLATE_INFO.
8093
e60505a5
NS
80942001-10-12 Nathan Sidwell <nathan@codesourcery.com>
8095
8096 PR g++/4476
8097 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8098
6f32162a
JM
80992001-10-11 Jason Merrill <jason_merrill@redhat.com>
8100
8101 * typeck2.c (store_init_value): Don't re-digest a bracketed
8102 initializer.
8103
8104 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8105 ANON_AGGR_TYPE_P.
8106
4a8d0c9c
RH
81072001-10-11 Richard Henderson <rth@redhat.com>
8108
8109 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8110 of an asm statement.
8111 (build_vtbl_ref_1): Split out from build_vtbl_ref.
8112 (build_vfn_ref): Use it to handle vtable descriptors before
8113 calling build_vtable_entry_ref.
8114 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8115
84b72302
RH
81162001-10-10 Richard Henderson <rth@redhat.com>
8117
37207ee7 8118 * parse.y (asm_operand): Allow named operands.
84b72302 8119 * semantics.c (finish_asm_stmt): Tweek for changed location
4639c5c6 8120 of the operand constraint.
84b72302 8121
48c8b0be 81222001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
8123
8124 * call.c (standard_conversion): Add bad conversion between
8125 integers and pointers.
8126 (convert_like_real): Don't use convert_for_initialization for bad
8127 conversions; complain here and use cp_convert.
8128 (build_over_call): Don't handle bad conversions specially.
8129 (perform_implicit_conversion): Allow bad conversions.
8130 (can_convert_arg_bad): New fn.
8131 * cp-tree.h: Declare it.
8132 * typeck.c (convert_for_assignment): Use it.
8133 (ptr_reasonably_similar): Any target type is similar to void.
8134
19551f29
AO
81352001-10-08 Alexandre Oliva <aoliva@redhat.com>
8136
8137 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8138 (cp/cp-lang.o): New rule.
8139 * cp-tree.h: Declare hooks.
8140 * tree.c: Make hooks non-static.
8141 (init_tree): Don't initialize hooks here.
8142 * lex.c: Likewise. Move definition of lang_hooks to...
8143 * cp-lang.c: ... new file.
8144
31ed8fea
RH
81452001-10-08 Richard Henderson <rth@redhat.com>
8146
8147 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8148 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8149
8b60264b
KG
81502001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8151
8152 * class.c (build_vtable_entry_ref): Const-ify.
8153 * decl.c (predefined_identifier,
37207ee7 8154 initialize_predefined_identifiers): Likewise.
8b60264b
KG
8155 * init.c (build_new_1): Likewise.
8156 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8157 Likewise.
8158
bc4c7159
AO
81592001-10-05 Alexandre Oliva <aoliva@redhat.com>
8160
8161 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8162 (INSNS_PER_STMT): Likewise.
8163 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8164 (copy_body, initialize_inlined_parameters): Likewise.
8165 (declare_return_variable, inlinable_function_p): Likewise.
8166 (expand_call_inline, expand_calls_inline): Likewise.
8167 (optimize_inline_calls, clone_body): Likewise.
8168 * tree.c (walk_tree): Moved to ../tree-inline.c.
8169 (walk_tree_without_duplicates): Likewise.
8170 (copy_tree_r, remap_save_expr): Likewise.
8171
25af8512
AO
81722001-10-04 Alexandre Oliva <aoliva@redhat.com>
8173
8174 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8175 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8176 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8177 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8178 (flag_inline_trees): Moved declaration to ../tree-inline.h.
8179 (walk_tree): Moved declaration to ../tree-inline.h.
8180 (walk_tree_without_duplicates, copy_tree_r): Likewise.
8181 (remap_save_expr): Likewise.
8182 * decl.c: Include tree-inline.h.
8183 (lang_mark_tree): Don't mark inlined_fns.
8184 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8185 * optimize.c: Include tree-inline.h.
8186 (optimize_inline_calls): Move declaration to ../tree.h, as
8187 non-static.
8188 (remap_decl): Use language-independent constructs and hooks.
8189 (remap_block, copy_body_r, declare_return_variable): Likewise.
8190 (inlinable_function_p): Likewise. Don't test for
8191 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8192 no longer language-specific.
8193 (optimize_inline_calls): Likewise. Make it non-static. Moved
8194 call of dump_function to...
8195 (optimize_function): Here...
8196 (clone_body): New function, extracted from...
8197 (maybe_clone_body): ... here. Build decl_map locally and pass
8198 it on to clone_body.
8199 * pt.c, semantics.c: Include tree-inline.h.
8200 * tree.c: Likewise.
8201 (cp_walk_subtrees): New language-specific hook for tree inlining.
8202 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8203 cp_is_overload_p, cp_auto_var_in_fn_p,
8204 cp_copy_res_decl_for_inlining): Likewise.
8205 (walk_tree): Move language-specific constructs into...
8206 (cp_walk_subtrees): this new function.
8207 (copy_tree_r): Use language-independent constructs and hooks.
8208 (init_tree): Initialize tree inlining hooks.
8209 (remap_save_expr): Adjust prototype so that the declaration
8210 does not require the definition of splay_tree.
8211
6a4af81f
JDA
82122001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
8213
8214 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8215 to build the declaration instead of the declaration itself.
8216
0caee1c6
JM
82172001-10-02 Jason Merrill <jason_merrill@redhat.com>
8218
48c8b0be
JM
8219 * decl2.c (cxx_decode_option): Add 'else'.
8220
0caee1c6
JM
8221 * spew.c (end_input): No longer static.
8222 * cp-tree.h: Declare it.
8223 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8224
80a497e4
JM
82252001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8226
8227 * call.c (build_over_call), typeck.c (build_function_call_real):
8228 Pass type attributes to check_function_format rather than name or
8229 assembler name. Don't require there to be a name or assembler
8230 name to check formats.
8231
6431177a
JM
82322001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8233
8234 * decl.c (init_decl_processing): Don't call
8235 init_function_format_info. Initialize lang_attribute_table
8236 earlier.
8237 (builtin_function): Call decl_attributes.
8238 (insert_default_attributes): New.
8239
55b3d665
JM
82402001-10-01 Jason Merrill <jason_merrill@redhat.com>
8241
8242 * decl.c (grokdeclarator): Copy array typedef handling from C
8243 frontend.
8244
8245 * decl.c (grokdeclarator): Copy too-large array handling from C
8246 frontend.
8247
9f57ca19
AO
82482001-09-29 Alexandre Oliva <aoliva@redhat.com>
8249
8250 * config-lang.in (target_libs): Added target-gperf, so that we
8251 don't try to build it if C++ is disabled.
8252
749ced52
ZW
82532001-09-23 Zack Weinberg <zack@codesourcery.com>
8254
8255 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8256 (cp/errfn.o): Delete rule.
8257 (cp/error.o): Depend on flags.h.
8258 * errfn.c: Delete file.
8259 * cp-tree.h: Declare warn_deprecated. Remove definitions of
8260 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8261 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8262 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8263 internal_error respectively. Make cp_deprecated into a macro.
8264 Don't define cp_printer typedef or declare cp_printers.
8265 * error.c: Include flags.h.
8266 Delete: struct tree_formatting_info, print_function_argument_list,
8267 print_declaration, print_expression, print_function_declaration,
8268 print_function_parameter, print_type_id, print_cv_qualifier_seq,
8269 print_type_specifier_seq, print_simple_type_specifier,
8270 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8271 print_parameter_declaration_clause, print_exception_specification,
8272 print_nested_name_specifier, and definition of cp_printers.
8273 (locate_error): New function.
8274 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8275 rewritten in terms of locate_error and diagnostic.c.
8276 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8277 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
8278 (init_error): Adjust to match.
8279
d2a6f3c0 82802001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
bb9f8221
RK
8281
8282 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8283
67231816
RH
82842001-09-21 Richard Henderson <rth@redhat.com>
8285
8286 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8287 (build_vtbl_initializer): Likewise.
8288 (build_vfn_ref): New.
8289 * cp-tree.h: Declare it.
8290 * call.c (build_over_call): Use it.
8291 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8292 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8293
d2a6f3c0 82942001-09-21 J"orn Rennecke <amylaar@redhat.com>
c9574c9f
R
8295
8296 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8297
91d231cb
JM
82982001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
8299
8300 Table-driven attributes.
8301 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8302 * decl2.c (cplus_decl_attributes): Only take one attributes
8303 parameter.
8304 * cp-tree.c (cplus_decl_attributes): Update prototype.
8305 * class.c (finish_struct), decl.c (start_decl, start_function),
8306 decl2.c (grokfield), friend.c (do_friend), parse.y
8307 (parse_bitfield): Update calls to cplus_decl_attributes.
8308 * decl.c (grokdeclarator): Take a pointer to a single ordinary
8309 attribute list.
8310 * decl.h (grokdeclarator): Update prototype.
8311 * decl2.c (grokfield): Take a single ordinary attribute list.
8312 * friend.c (do_friend): Likewise.
8313 * decl.c (shadow_tag, groktypename, start_decl,
8314 start_handler_parms, grokdeclarator, grokparms, start_function,
8315 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8316 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8317 (process_template_parm, do_decl_instantiation): Pass single
8318 ordinary attribute lists around.
8319 * decl.c (grokdeclarator): Correct handling of nested attributes.
8320 Revert the patch
8321 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
8322 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8323 not the left.
8324 .
8325 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8326 (cp_attribute_table): Declare.
8327 * decl.c (valid_lang_attribute): Don't define.
8328 (lang_attribute_table): Define.
8329 (init_decl_processing): Initialize lang_attribute_table instead of
8330 valid_lang_attribute.
8331 * tree.c (cp_valid_lang_attribute): Remove.
8332 (handle_java_interface_attribute, handle_com_interface_attribute,
8333 handle_init_priority_attribute): New functions.
8334 (cp_attribute_table): New array.
8335 * decl2.c (import_export_class): Don't use
8336 targetm.valid_type_attribute.
8337
a1bda5f1
GDR
83382001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8339
e6b9638b
JM
8340 * Make-lang.in (cp/error.o): Depend on real.h
8341 * error.c: #include "real.h"
a1bda5f1 8342
cb6edbcb
KG
83432001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8344
8345 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8346 xmalloc/strcpy/strcat.
8347
83182544
KG
83482001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8349
8350 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8351 Const-ification.
8352 * pt.c (tsubst_decl): Likewise.
8353
40008eda
KG
83542001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8355
8356 * decl2.c (lang_f_options): Const-ification.
8357 * lex.c (cplus_tree_code_name): Likewise.
8358 * spew.c (yyerror): Likewise.
8359
39e78d8b
NS
83602001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8361
8362 PR c++/3986
8363 * class.c (force_canonical_binfo_r): Check & move an indirect
8364 primary base first.
8365 (force_canonical_binfo): Check that it's not already
8366 canonical.
8367 (mark_primary_virtual_base): Remove BINFO parameter.
8368 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8369
6d0a3f67
NS
83702001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8371
8372 Remove TYPE_NONCOPIED_PARTS.
8373 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8374 CLASSTYPE_PURE_VIRTUALS.
8375 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8376 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 8377 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
8378 (finish_struct_1): ... call it here.
8379
4f8e1232
MM
83802001-09-04 Mark Mitchell <mark@codesourcery.com>
8381
8382 * decl.c (duplicate_decls): Remove code deadling with
8383 DECL_SAVED_INSNS.
8384 * decl2.c (finish_file): Likewise.
8385 * pt.c (instantiate_decl): Likewise.
8386 * semantics.c (expand_body): Don't defer local functions if
8387 they wouldn't be deferred for some other reason. Don't
8388 generate RTL for functions that will not be emitted.
8389 (genrtl_start_function): Remove code deadling with
8390 DECL_SAVED_INSNS.
8391 (genrtl_finish_function): Likewise.
8392
da86f08f
NS
83932001-09-04 Nathan Sidwell <nathan@codesourcery.com>
8394
8395 PR c++/4203
8396 * call.c (build_over_call): Do not optimize any empty base
8397 construction.
8398
38066e83
KL
83992001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8400
8401 * error.c (dump_template_decl): Output template parameters
8402 together with their specifiers.
8403 Output `class' prefix for template template parameter.
8404 (dump_decl): Fix formatting.
8405
598e9ba5 84062001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 8407
598e9ba5
KG
8408 * optimize.c (inlinable_function_p): Allow only smaller single
8409 functions. Halve inline limit after reaching recursive limit.
749ced52 8410
f232e4a5
JR
84112001-08-30 Joern Rennecke <amylaar@redhat.com>
8412 Jason Merrill <jason_merrill@redhat.com>
8413
8414 * class.c (build_vtable_entry_ref): Subtract in char*, not
8415 ptrdiff_t.
8416
0213a355
JM
84172001-08-23 Jason Merrill <jason_merrill@redhat.com>
8418
8419 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8420 (build_cplus_array_type): Use cp_build_qualified_type, not
8421 TYPE_MAIN_VARIANT, to get an unqualified version.
8422
8423 * decl2.c (grok_alignof): Lose.
8424 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8425 * typeck.c (c_alignof): Lose.
8426 * semantics.c (finish_sizeof, finish_alignof): New.
8427 * parse.y: Use them.
8428 * cp-tree.h: Declare them.
8429
fd10dd09
JM
84302001-08-22 Jason Merrill <jason_merrill@redhat.com>
8431
8432 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8433 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8434 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8435
baeb4732
JJ
84362001-08-19 Jakub Jelinek <jakub@redhat.com>
8437
8438 * typeck2.c (add_exception_specifier): Only require complete type if
8439 not in processing template declaration.
8440
1c0cc57e
KG
84412001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8442
8443 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8444 GNU_xref_start_scope and GNU_xref_end_scope.
8445
8446 * tree.c (TYPE_HASH): Moved to ../tree.h.
8447
9a52d09b
MM
84482001-08-16 Mark Mitchell <mark@codesourcery.com>
8449
8450 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8451 on COMPOUND_EXPRs.
8452
b5d1cbd2
RH
84532001-08-14 Richard Henderson <rth@redhat.com>
8454
8455 * class.c, cp-tree.h (build_vfn_ref): Remove.
8456 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8457
63d6f87a
MM
84582001-08-13 Mark Mitchell <mark@codesourcery.com>
8459
8460 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8461 empty class assignment as having side-effects to avoid
8462 spurious warnings.
8463
e78d8e51
ZW
84642001-08-13 Zack Weinberg <zackw@panix.com>
8465
8466 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8467 * except.c: Include libfuncs.h.
8468
a60af04a
GDR
84692001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8470
8471 * decl.c (grokdeclarator): Clarify diagnostic message.
8472
3605b283
KL
84732001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8474
8475 * decl2.c (do_nonmember_using_decl): Replace using directive
8476 with using declaration in the error message.
8477
4d5f3fbd
KL
84782001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8479
8480 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8481 criterion to avoid rebuilding expression tree instead of
8482 processing_template_decl.
8483
07b2f2fd
JM
84842001-08-07 Jason Merrill <jason_merrill@redhat.com>
8485
8486 Support named return value optimization for inlines, too.
8487 * decl.c (finish_function): Nullify returns here.
8488 * semantics.c (genrtl_start_function): Not here.
8489 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8490 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
8491 Also nullify the CLEANUP_STMT for the nrv.
8492 * cp-tree.h: Declare it.
8493 * optimize.c (declare_return_variable): Replace the nrv with the
8494 return variable.
8495 * typeck.c (check_return_expr): Be more flexible on alignment check.
8496 Ignore cv-quals when checking for a matching type.
8497
2cc07db4
RH
84982001-08-09 Richard Henderson <rth@redhat.com>
8499
8500 * decl2.c (finish_objects): Use target hooks instead of
8501 assemble_constructor and assemble_destructor.
8502
0ca179b2
JDA
85032001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8504
8505 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8506
0830ae44
NS
85072001-08-07 Nathan Sidwell <nathan@codesourcery.com>
8508
8509 PR c++/3820
8510 Stop using TYPE_NONCOPIED_PARTS.
8511 * call.c (build_over_call): Be careful when copy constructing
8512 or assigning to an empty class.
8513 * class.c (check_bases_and_members): It has a
8514 COMPLEX_ASSIGN_REF if it has a vptr.
8515 (layout_class_type): Don't add empty class padding to
8516 TYPE_NONCOPIED_PARTS.
8517 (finish_struct_1): Don't add the VFIELD either.
8518 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8519 initialization.
8520
59a13e0f
JM
85212001-08-07 Jason Merrill <jason_merrill@redhat.com>
8522
8523 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8524
47907859
RH
85252001-08-06 Richard Henderson <rth@redhat.com>
8526
8527 * decl2.c (finish_objects): Pass a symbol_ref and priority to
8528 assemble_{constructor,destructor}. Remove priority handling.
8529
eac69b8a
GDR
85302001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8531
8532 Don't allow template-id in using-declaration.
8533 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8534 (do_class_using_decl): Likewise.
8535
ef6e958a
NB
85362001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8537
8538 * cp/spew.c (read_token): No need to pop buffers.
8539
dff94ad7
SS
85402001-08-02 Stan Shebs <shebs@apple.com>
8541
8542 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8543 (fnaddr_from_vtable_entry): Remove decl.
8544 * method.c (use_thunk): Update comment.
8545
026c3f13
AC
85462001-08-01 Andrew Cagney <ac131313@redhat.com>
8547
8548 * repo.c (get_base_filename): Change return value to const char
8549 pointer.
8550
1dbb6023
NS
85512001-08-02 Nathan Sidwell <nathan@codesourcery.com>
8552
8553 Kill -fhonor-std.
8554 * NEWS: Document.
8555 * cp-tree.h (flag_honor_std): Remove.
8556 (CPTI_FAKE_STD): Remove.
8557 (std_node): Remove comment about it being NULL.
8558 (fake_std_node): Remove.
8559 * decl.c (in_fake_std): Remove.
8560 (walk_namespaces_r): Remove fake_std_node check.
8561 (push_namespace): Remove in_fake_std code.
8562 (pop_namespace): Likewise.
8563 (lookup_name_real): Remove fake_std_node check.
8564 (init_decl_processing): Always create std_node. Always add
8565 std:: things there.
8566 (builtin_function): Always put non '_' fns in std.
8567 * decl2.c (flag_honor_std): Remove.
8568 (lang_f_options): Remove honor-std.
8569 (unsupported_options): Add honor-std.
8570 (set_decl_namespace): Remove fake_std_node check.
8571 (validate_nonmember_using_decl): Likewise.
8572 (do_using_directive): Likewise.
8573 (handle_class_head): Likewise.
8574 * dump.c (cp_dump_tree): Likewise.
8575 * except.c (init_exception_processing): Adjust.
8576 * init.c (build_member_call): Remove fake_std_node check.
8577 (build_offset_ref): Likewise.
8578 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8579 * rtti.c (init_rtti_processing): Adjust.
8580
6ad7895a
APB
85812001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
8582
8583 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8584 operand while calling cp_tree_equal.
8585
befe7c61
NS
85862001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8587
8588 The 3.0 ABI no longer has vbase pointer fields.
8589 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8590 FORMAT_VBASE_NAME): Remove.
8591 * method.c (do_build_copy_constructor): Adjust.
8592 (do_build_assign_ref): Adjust.
8593 * search.c (lookup_field_r): Adjust.
8594 * typeck.c (build_component_ref): Adjust.
8595
8596 The 3.0 ABI always has a vtable pointer at the start of every
8597 polymorphic class.
8598 * rtti.c (build_headof_sub): Remove.
8599 (build_headof): Adjust.
8600 (get_tinfo_decl_dynamic): No need to check flag_rtti
8601 here. Adjust.
8602 (create_real_tinfo_var): Explain why we need a hidden name.
8603
20dde49d
NS
86042001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8605
8606 PR c++/3631
8607 * class.c (update_vtable_entry_for_fn): The fixed adjustment
8608 of a virtual thunk should be from declaring base.
8609
b7ad2f8b
NS
86102001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8611
8612 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8613 the shared virtual base, so preserving inheritance graph order.
8614
57cb6d52
AJ
86152001-07-30 Andreas Jaeger <aj@suse.de>
8616
749ced52 8617 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 8618
594280a3
RH
86192001-07-28 Richard Henderson <rth@redhat.com>
8620
8621 * method.c (pending_inlines): Remove.
8622
0ab142b0
NS
86232001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8624
8625 * class.c (mark_primary_virtual_base): Don't adjust base
8626 offsets here.
8627 (dfs_unshared_virtual_bases): Adjust them here.
8628 (mark_primary_bases): Explain why we adjust at the end.
8629
d60d223b
NS
86302001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8631
8632 * class.c (finish_struct_1): When copying the primary base's
8633 VFIELD, make sure we find it is at offset zero.
8634
db3ef87b
KL
86352001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8636
8637 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8638 tsubst_expr for default template arguments.
8639
312b7c9d
NS
86402001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8641
d60d223b 8642 PR c++/3621
312b7c9d 8643 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 8644 nonzero.
312b7c9d 8645
648c2206
NS
86462001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8647
8648 PR c++/3624
8649 * call.c (resolve_args): Simplify, call
8650 convert_from_reference.
8651 (build_new_op): Resolve and convert from reference ARG1
8652 earlier. Adjust ARG2 & ARG3 resolve and conversion.
8653
969fd501
NS
86542001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8655
8656 * decl.c (last_function_parm_tags): Remove.
8657 (current_function_parm_tags): Remove.
8658 (init_decl_processing): Adjust.
8659 (start_function): Adjust.
8660 (store_parm_decls): Adjust.
8661
8662 PR c++/3152
8663 * decl.c (grokdeclarator): Detect when a function typedef is
8664 declaring a function, and create last_function_parms correctly.
8665
08ac397c 86662001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 8667
08ac397c
JM
8668 * call.c (joust): Only prefer a non-builtin candidate to a builtin
8669 one if they have the same signature.
8670
8671 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
8672 it rather than toplevel_bindings_p. Give it a mangled name if static.
8673 (convert_to_reference): Adjust.
8674 * decl2.c (get_temp_name): Lose.
8675 * mangle.c (mangle_ref_init_variable): New fn.
8676 (mangle_guard_variable): Strip the ref-init header.
8677 * cp-tree.h: Adjust.
8678 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8679 initializer.
8680 (grok_reference_init): Always use DECL_INITIAL.
8681
40260429
NS
86822001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8683
8684 PR c++/3416
8685 * call.c (build_conditional_expr): Recheck args after
8686 conversions.
8687 * cp-tree.h (build_conditional_expr): Move to correct file.
8688 * typeck.c (decay_conversion): Diagnose any unknown types
8689 reaching here.
8690 (build_binary_op): Don't do initial decay or default
8691 conversions on overloaded functions.
8692 (build_static_cast): Don't do a decay conversion here.
8693
ab085207
NS
86942001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8695
8696 PR c++/3543
8697 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8698 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8699
0abe00c5
NS
87002001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8701
8702 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8703 (create_vtbl_ptr): ... here.
8704
90b1ca2f
NS
87052001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8706
8707 * class.c (build_vbase_offset_vbtl_entries): Look for
8708 non-primary base of which we are a sub vtable.
8709
cfe5dc31
PE
87102001-07-24 Phil Edwards <pme@sources.redhat.com>
8711
8712 * semantics.c (finish_this_expr): Remove unused code.
8713
7f54a851
NS
87142001-07-24 Nathan Sidwell <nathan@codesourcery.com>
8715
8716 Simplify rtti, now we've only one ABI.
8717 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8718 CPTI_TINFO_VAR_ID.
8719 (tinfo_decl_id, tinfo_var_id): Remove.
8720 (get_typeid_1): Remove.
8721 * rtti.c
8722 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8723 (typeid_ok_p): New function.
8724 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8725 (get_tinfo_decl): Remove old abi documentation.
8726 (tinfo_from_decl): Remove.
8727 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8728 (get_typeid_1): Remove.
8729 (get_base_offset): Remove.
8730 (synthesize_tinfo_var): Absorb get_base_offset.
8731 (create_real_tinfo_var): Don't use tinfo_decl_id.
8732
18fee3ee
GS
87332001-07-23 Graham Stott <grahams@redhat.com>
8734
d30d6e7a 8735 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
8736 variable has_two_argument_delete_p.
8737
c4372ef4
NS
87382001-07-21 Nathan Sidwell <nathan@codesourcery.com>
8739
8740 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8741 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8742 (CPTI_INDEX_IDENTIFIER): Remove.
8743 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8744 (delta2_identifier): Remove.
8745 (index_identifier): Remove.
8746 (pfn_or_delta2_identifier): Remove.
8747 (flag_vtable_thunks): Remove.
8748 (VTABLE_DELTA2_NAME): Remove.
8749 (VTABLE_INDEX_NAME): Remove.
8750 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8751 (vfunc_ptr_type_node): Adjust.
8752 (VTABLE_NAME_PREFIX): Adjust.
8753 (build_vfn_ref): Lose first parameter.
8754 (fixup_all_virtual_upcast_offsets): Remove.
8755 * decl.c (initialize_predefined_identifiers): Remove
8756 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8757 (init_decl_processing): Remove no-vtable-thunk code.
8758 * decl2.c (flag_vtable_thunks): Remove.
8759 (mark_vtable_entries): Remove no-vtable-thunk code.
8760 * error.c (dump_decl): Remove no-vtable-thunk code.
8761 (dump_expr): Adjust ptr to member function code.
8762 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8763 code.
8764 * rtti.c (build_headof): Remove no-vtable-thunk code.
8765 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8766 * search.c (get_base_distance): Remove expand_upcast_fixups case.
8767 (virtual_context) Remove.
8768 (expand_upcast_fixups): Remove.
8769 (fixup_virtual_upcast_offsets): Remove.
8770 (fixup_all_virtual_upcast_offsets): Remove.
8771 * typeck.c (get_member_function_from_ptrfunc): Remove
8772 no-vtable-thunk code.
8773 * call.c (build_over_call): Adjust call to build_vfn_ref.
8774 * class.c (build_vfn_ref): Lose first parameter. Remove
8775 no-vtable-thunk code.
8776 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8777 (build_vtable_entry): Remove no-vtable-thunk code.
8778
3461fba7
NS
87792001-07-20 Nathan Sidwell <nathan@codesourcery.com>
8780
8781 Remove old-abi remnants. Remove comments about old abi
838dfd8a 8782 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
8783 * cp-tree.h: Adjust comments.
8784 (vbase_offsets_in_vtable_p): Delete.
8785 (vcall_offsets_in_vtable_p): Delete.
8786 (vptrs_present_everywhere_p): Delete.
8787 (all_overridden_vfuns_in_vtables_p): Delete.
8788 (merge_primary_and_secondary_vtables_p): Delete.
8789 (TYPE_CONTAINS_VPTR_P): Adjust.
8790 (VTT_NAME_PREFIX): Remove.
8791 (CTOR_VTBL_NAME_PREFIX): Remove.
8792 (init_vbase_pointers): Remove.
8793 * class.c: Adjust coments.
8794 (build_vbase_pointer_fields): Delete.
8795 (build_vbase_pointer): Remove old-abi code.
8796 (build_secondary_vtable): Likewise.
8797 (modify_all_vtables): Likewise.
8798 (create_vtable_ptr): Likewise.
8799 (layout_class_type): Likewise.
8800 (finish_struct_1): Likewise.
8801 (finish_vtbls): Likewise.
8802 (dfs_finish_vtbls): Delete.
8803 (build_vbase_offset_vtbl_entries): Remove old-abi code.
8804 * cvt.c: Adjust comments.
8805 * decl.c: Adjust comments.
8806 * decl2.c: Adjust comments.
8807 * init.c: Adjust comments.
8808 (construct_virtual_bases): Remove old-abi code.
8809 * lang-specs.h: Remove -fno-new-abi.
8810 * mangle.c: Adjust comments.
8811 * rtti.c: Adjust comments.
8812 (get_base_offset): Remove old-abi-code.
8813 * search.c: Adjust comments.
8814 (dfs_init_vbase_pointers): Remove.
8815 (dfs_vtable_path_unmark): Remove.
8816 (init_vbase_pointers): Remove.
8817 * semantics.c: Adjust comments.
8818 (emit_associated_thunks): Remove old-abi code.
8819 * typeck.c: Adjust comments.
8820
1c432a87
DB
88212001-07-20 Daniel Berlin <dan@cgsoftware.com>
8822
8823 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8824 params.h.
8825
b7076960
MM
88262001-07-19 Mark Mitchell <mark@codesourcery.com>
8827
8828 * class.c (finish_struct_anon): Forbid nested classes.
8829
2b85879e
NB
88302001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8831
8832 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8833 * optimize.c: Include debug.h.
8834 (maybe_clone_body): Use debug hook.
8835 * semantics.c: Include debug.h.
8836 (expand_body): Use debug hook.
8837
c60e94a7
NB
88382001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8839
8840 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8841
dbc957f1
MM
88422001-07-18 Mark Mitchell <mark@codesourcery.com>
8843
8844 * class.c (type_requires_array_cookie): New function.
8845 (check_methods): Don't try to figure out whether the type needs a
8846 cookie here.
8847 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8848 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8849 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8850 * pt.c (instantiate_class_template): Don't set
8851 TYPE_VEC_DELETE_TAKES_SIZE.
8852 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 8853
7ba0b0f7 88542001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 8855 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
8856
8857 * NEWS (Changes in GCC 3.0): Fix typo.
8858
59387d2e
JM
88592001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
8860
8861 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8862 which attributes are to be attached, and a flags argument. Update
8863 call to decl_attributes.
8864 (grokfield): Update call to decl_attributes.
8865 * class.c (finish_struct): Update call to cplus_decl_attributes.
8866 * cp-tree.h (cplus_decl_attributes): Update prototype.
8867 * decl.c (start_decl, grokdeclarator, start_function): Update
8868 calls to decl_attributes and cplus_decl_attributes.
8869 * friend.c (do_friend): Update call to cplus_decl_attributes.
8870 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8871
7ed47c04
MM
88722001-07-12 Mark Mitchell <mark@codesourcery.com>
8873
8874 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8875 for `register' variables with an asm-specification.
8876
40b18c0a
MM
88772001-07-11 Mark Mitchell <mark@codesourcery.com>
8878
8879 * semantics.c (finish_asm_stmt): Mark the output operands
8880 to an asm addressable, if necessary.
8881
517c3b80
BE
88822001-07-11 Ben Elliston <bje@redhat.com>
8883
219670f1
BE
8884 * Revert this change -- there is a subtle bug.
8885
517c3b80
BE
8886 PR c++/80
8887 * decl.c (finish_enum): New "attributes" argument; pass it to
8888 cplus_decl_attributes. Use a narrower type if the enum is packed.
8889 * cp-tree.h (finish_enum): Adjust prototype.
8890 * parse.y (enum_head): New non-terminal.
8891 (structsp): Use it. Enums now may be preceded or followed by
8892 optional attributes -- pass their chained tree to finish_enum().
8893 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8894
2ba9c47e
MM
88952001-07-10 Mark Mitchell <mark@codesourcery.com>
8896
8897 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8898 variables.
8899
35241192
JM
89002001-07-10 Jason Merrill <jason_merrill@redhat.com>
8901
8902 * semantics.c (cp_expand_stmt): Fix for null
8903 current_function_return_value.
8904
07167a18
JM
89052001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
8906
8907 * call.c (build_op_delete_call): Initialize fn.
8908 (convert_like_real): Delete conditional.
8909 (joust): Initialize *w and *l.
8910 * class.c: Add prototype for binfo_ctor_vtable.
8911 (get_primary_binfo): Initialize result.
8912 * init.c (build_java_class_ref): Initialize name.
ae818d3b 8913
35241192
JM
89142001-07-09 Erik Rozendaal <dlr@acm.org>
8915
ae818d3b
ER
8916 * typeck.c (unary_complex_lvalue): Do not duplicate the
8917 argument to modify, pre-, or post-increment when used as an
8918 lvalue and when the argument has side-effects.
8919
12a68f1f
JM
89202001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8921
8922 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8923 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
8924 cplus_decl_attributes even if attrs is NULL.
8925 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8926
f7a4cec0
JM
89272001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
8928
8929 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8930 calls to decl_attributes.
8931
c80106a4
IR
89322001-07-06 Ira Ruben <ira@apple.com>
8933
ae818d3b 8934 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
8935 be DECL_TEMPLATE_RESULT.
8936
dac65501
KL
89372001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8938
8939 * cp-tree.h (copy_template_template_parm): Rename to ...
8940 (bind_template_template_parm): ... here.
8941 * tree.c (copy_template_template_parm): Rename to ...
8942 (bind_template_template_parm): ... here. Remove the case when
8943 NEWARGS is NULL_TREE.
8944 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8945 BOUND_TEMPLATE_TEMPLATE_PARM.
8946 * pt.c (lookup_template_class): Adjust.
8947
01f9e964
JM
89482001-07-05 Jason Merrill <jason_merrill@redhat.com>
8949
8950 * cvt.c (convert_lvalue): New fn.
8951 * cp-tree.h: Declare it.
8952 * method.c (do_build_assign_ref): Use it.
8953 (do_build_copy_constructor): Convert parm to base types
8954 before calling base constructors.
8955
8956 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8957 DECL_USER_ALIGN. Check flag_elide_constructors instead of
8958 optimize.
8959 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8960
6be77748
NS
89612001-07-02 Nathan Sidwell <nathan@codesourcery.com>
8962
8963 * optimize.c (optimize_inline_calls): New function, broken out
8964 of ...
8965 (optimize_function): ... here. Call it. Don't inline if it is
8966 a thunk.
8967 (dump_function): Print name of dump flag causing this dump.
8968 * semantics.c (expand_body): Move thunk inline check to
8969 optimize_function.
8970
8d8e52be
JM
89712001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
8972
8973 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8974 (comptypes): Use target.comp_type_attributes.
8975
5a0db193
NS
89762001-06-29 Nathan Sidwell <nathan@codesourcery.com>
8977
8978 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8979
46f018e1
GDR
89802001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8981
8982 * error.c (lang_print_error_function): Add a `diagnostic_context *'
8983 parameter. Tweak.
8984
501990bb
NB
89852001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8986
8987 * decl2.c (import_export_class): Update.
8988
f68fc4db
GDR
89892001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8990
8991 * error.c (init_error): Adjust settings.
8992
9596ddd6
GDR
89932001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
8994
8995 * error.c (init_error): Adjust settings.
8996
c93586fa
RS
89972001-06-19 Richard Sandiford <rsandifo@redhat.com>
8998
8999 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9000 return pointers to data members by reference rather than by value.
9001
0d97bf4c
JM
90022001-06-18 Jason Merrill <jason_merrill@redhat.com>
9003
9004 Implement the Named Return Value optimization.
9005 * cp-tree.h (struct cp_language_function): Add x_return_value.
9006 (current_function_return_value): Now a macro.
9007 * decl.c: Don't define it.
9008 (define_label, finish_case_label): Don't clear it.
9009 (init_decl_processing): Don't register it with GC.
9010 * semantics.c (genrtl_finish_function): Don't check it for
9011 no_return_label. Copy the RTL from the return value to
9012 current_function_return_value and walk, calling...
9013 (nullify_returns_r): ...this new fn.
9014 * typeck.c (check_return_expr): Set current_function_return_value.
9015
13de7ec4
JM
90162001-06-15 Jason Merrill <jason_merrill@redhat.com>
9017
9018 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9019 sharing a ctor vtable with. Merge code for cases 1 and 2.
9020 (binfo_ctor_vtable): New fn.
9021 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9022
3ea099f1
JM
90232001-06-14 Jason Merrill <jason_merrill@redhat.com>
9024
9025 * class.c (dfs_find_final_overrider): Fix logic.
9026
9027 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9028 virtual thunk instead of non-virtual.
9029 (get_matching_virtual): Uncomment.
9030
9031 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9032 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
9033 PARM, not ARG.
9034
87326ba8
NS
90352001-06-14 Nathan Sidwell <nathan@codesourcery.com>
9036
9037 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9038 we've not emerged from the hierarchy of RTTI_BINFO on reaching
9039 a non-virtual base.
9040
e065a36e
MM
90412001-06-13 Mark Mitchell <mark@codesourcery.com>
9042
9043 * NEWS: Update release number.
9044
623fe76a
NS
90452001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9046
9047 PR c++/3130, c++/3131, c++/3132
9048 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9049 * class.c (force_canonical_binfo_r): Move
9050 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9051 virtual bases unless they're primary and what they're primary
9052 too has been moved.
9053 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9054 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9055 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9056 derived binfo.
9057 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9058 (layout_nonempty_base_or_field): Add most derived type
9059 parameter. Adjust.
9060 (layout_empty_base): Likewise.
9061 (build_base_field): Likewise.
9062 (build_base_fields): Likewise.
9063 (propagate_binfo_offsets): Add most derived type
9064 parameter. Skip non canonical virtual bases too.
9065 (dfs_set_offset_for_unshared_vbases): Don't skip primary
9066 bases. Do skip canonical bases.
9067 (layout_virtual_bases): Adjust.
9068 (layout_class_type): Adjust.
9069 (dfs_get_primary_binfo): Build list of virtual primary base
9070 candidates.
9071 (get_primary_binfo): Check that the shared virtual primary
9072 base candidate was found first.
9073 (accumulate_vtbl_inits): Don't do anything for non-vptr
9074 containing binfos. For case 1 primary virtual bases, keep
9075 checking that we've not emerged from the hierarchy of RTTI_BINFO.
9076
7bdcf888
NS
90772001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9078
9079 PR c++/3089
9080 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9081 hierarchy looking for primary bases for a ctor
9082 vtable. Recursively call oneself, if we meet our primary via
9083 this route and haven't met it yet via inheritance graph order.
9084
25b5b465
MM
90852001-06-11 Mark Mitchell <mark@codesourcery.com>
9086
9087 * lang-options.h: Emit documentation for -fno-honor-std, not
9088 -fhonor-std.
9089
eb2d0614
AO
90902001-06-10 Alexandre Oliva <aoliva@redhat.com>
9091
9092 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9093 Don't clobber delta.
9094 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9095
2a2b2d43
GDR
90962001-06-10 Mark Mitchell <mark@codesourcery.com>
9097 Gabriel Dos Reis <gdr@codesourcery.com>
9098
9099 * Make-lang.in (cp/call.o): Depend on diagnostic.h
9100 (cp/typeck.o): Depend on diagnostic.h
9101 (cp/typeck2.o): Depend on diagnostic.h
07167a18 9102 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
9103 * typeck.c: #include diagnostic.h
9104 (convert_for_initialization): Remove extern declaration for
9105 warningcount and errorcount.
9106
9107 * call.c: #include diagnostic.h
9108 (convert_like_real): Remove extern declaration for warnincount and
07167a18 9109 errorcount.
2a2b2d43
GDR
9110
9111 * repo.c: #include diagnostic.h
9112 * typeck2.c: #include diagnostic.h
9113
06d5e633
NS
91142001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9115
9116 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9117 in previous change.
9118
9ac1bd2e
NS
91192001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9120
9121 PR c++/2929
9122 * friend.c (do_friend): Use push_decl_namespace for classes at
9123 namespace scope.
9124
85a9a0a2
NS
91252001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9126 Jason Merrill <jason_merrill@redhat.com>
9127
9128 PR c++/3061
9129 * class.c (build_secondary_vtable): Use assert, rather than an error
9130 message.
9131 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9132 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9133 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9134 Don't set BINFO_VTABLE for a primary virtual base.
9135
daa8df65
MM
91362001-06-07 Mark Mitchell <mark@codesourcery.com>
9137
9138 * decl.c (duplicate_decls): Update source position information
9139 when a template function is defined.
9140
37344b9b
PE
91412001-06-07 Phil Edwards <pme@sources.redhat.com>
9142
9143 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
9144
fcebb2dd
NS
91452001-06-07 Nathan Sidwell <nathan@codesourcery.com>
9146
9147 PR c++/2914
9148 * decl.c (pushtag): Don't push into a complete type's scope.
9149
d0cd8b44
JM
91502001-06-06 Jason Merrill <jason_merrill@redhat.com>
9151
9152 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9153 (struct lang_decl_flags): Lose generate_with_vtable_p.
9154 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9155 * class.c (copy_virtuals): Adjust.
9156 * decl2.c (mark_vtable_entries): Adjust.
9157 * method.c (make_thunk, build_vtable_entry): Adjust.
9158 * class.c (update_vtable_entry_for_fn): Only look as far as the
9159 first defining class.
07167a18 9160 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 9161 defined in a lost primary virtual base.
07167a18 9162 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
9163 the lost primary case and the normal case.
9164 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9165 (get_vfield_offset, get_derived_offset): Lose.
9166 (dfs_find_final_overrider): Use look_for_overrides_here.
9167 (get_matching_virtual): New fn.
9168 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9169 not BV_VCALL_INDEX.
9170 * search.c (look_for_overrides_here): Split out from...
9171 (look_for_overrides_r): Here.
9172
9173 * class.c (find_final_overrider): Return error_mark_node on error.
9174
9175 * decl2.c (key_method): #if 0 accidental change.
9176
acf97e0b
JDA
91772001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
9178
9179 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9180 (build_over_call): Likewise.
9181 * decl.c (grokparms): Likewise.
9182 * pt.c (tsubst_decl): Likewise.
9183 * typeck.c (convert_arguments): Likewise.
9184
7e9abee9
MM
91852001-06-05 Mark Mitchell <mark@codesourcery.com>
9186
47ee8904
MM
9187 * semantics.c (begin_class_definition): Robustify.
9188
7e9abee9
MM
9189 * pt.c (instantiate_decl): Tell the repository code about the
9190 clones, not the cloned functions.
9191 * repo.c (repo_template_used): Explicitly instantiate the cloned
9192 function, not the clones.
9193
bea09693
NS
91942001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9195
9196 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9197 ICS_BAD_FLAG on created conversion.
9198 (compare_ics): Break out rank.
9199
8f7550ca
NS
92002001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9201
9202 * decl.c (xref_tag): Remove extraneous %s on dependent name
9203 lookup warning.
9204
442e01b6
NS
92052001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9206
9207 * class.c (layout_vtable_decl): Fix off by one error on
9208 build_index_type.
9209 (build_vtt): Likewise.
9210 (build_ctor_vtbl_group): Likewise.
9211
b7442fb5
NS
92122001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9213
9214 * class.c (maybe_indent_hierarchy): New function.
9215 (dump_class_hierarchy_r): Add flags. Dump extra binfo
9216 information, if enabled. Use maybe_indent_hierarchy. Adjust
9217 output format.
9218 (dump_class_hierarchy): Adjust prototype. Adjust output format.
9219 (dump_array, dump_vtable, dump_vtt): New functions.
9220 (finish_struct_1): Adjust hierarchy dumping.
9221 (initialize_vtable): Call dump_vtable.
9222 (build_vtt): Call dump_vtt.
9223 (build_ctor_vtbl_group): Call dump_vtable.
9224 * decl2.c (flag_dump_class_layout): Remove.
9225 (cxx_decode_option): Remove dump translation unit
9226 and dump class hierarchy check. Call dump_switch_p.
9227 (finish_file): Adjust dumping.
9228 (dump.c): Only dump base classes if not TDF_SLIM.
9229 Only dump namespace members if not TDF_SLIM.
9230 * optimize.c (dump_function): New function.
9231 (optimize_function): Call dump_function.
9232 * semantics.c (expand_body): Use dump_enabled_p.
9233
e5410b32
NS
92342001-06-01 Nathan Sidwell <nathan@codesourcery.com>
9235
9236 PR g++/2936
9237 Part missed from first commit
9238 * decl2.c (finish_anon_union): Copy context.
9239
e97c9488
NS
92402001-05-30 Nathan Sidwell <nathan@codesourcery.com>
9241
9242 PR g++/2936
e97c9488
NS
9243 * optimize.c (remap_decl): Remap anonymous aggregate members too.
9244
87d9ac49
NS
92452001-05-26 Nathan Sidwell <nathan@codesourcery.com>
9246
9247 PR g++/2823
9248 * semantics.c (expand_body): Don't optimize thunks.
9249
88657302
RH
92502001-05-25 Sam TH <sam@uchicago.edu>
9251
9252 * cp-tree.h lex.h: Fix header include guards.
9253
92542001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
9255
9256 * decl.c (init_decl_processing): Tweak.
9257
0b1161fc
MM
92582001-05-24 Mark Mitchell <mark@codesourcery.com>
9259
9260 * decl.c (duplicate_decls): Tidy.
9261 (init_decl_processing): Always set flag_no_builtin.
9262
6f56d925
NS
92632001-05-24 Nathan Sidwell <nathan@codesourcery.com>
9264
9265 PR c++/2184
9266 * decl2.c (do_local_using_decl): Push the decls, even in a
9267 template.
9268
39e0656d
MM
92692001-05-22 Mark Mitchell <mark@codesourcery.com>
9270
9271 * optimize.c (initialize_inlined_parameters): Don't set
9272 TREE_READONLY for a VAR_DECL taking the place of an inlined
9273 PARM_DECL.
9274
0401d499
JM
92752001-05-22 Jason Merrill <jason_merrill@redhat.com>
9276
9277 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9278 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9279 attribute.
9280
14fc3426
JM
92812001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
9282
9283 * parse.y: Refer to compound literals as such, not as
9284 constructor-expressions.
9285
3f41ffd8
MM
92862001-05-21 Mark Mitchell <mark@codesourcery.com>
9287
9288 * call.c (build_op_delete_call): Ignore exception-specifications
9289 when looking for matching delete operators.
9290 * init.c (build_new_1): Compute whether or not the allocation
9291 function used is a placement allocation function or not, and
9292 communicate this information to build_op_delete_call.
9293
1a6025b4
JM
92942001-05-21 Jason Merrill <jason_merrill@redhat.com>
9295
90ecce3e
JM
9296 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
9297 (build_vtbl_ref): Adjust.
9298 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9299 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9300 Re-add vtable-gc.
9301 (unsupported_options): Correspondingly.
9302
9303 * decl2.c (maybe_make_one_only): Check flag_weak, not
9304 supports_one_only().
9305
1a6025b4
JM
9306 * cp-tree.def (START_CATCH_STMT): Lose.
9307 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
9308 * tree.c (cp_statement_code_p): Don't case it.
9309 * semantics.c (cp_expand_stmt): Likewise.
9310 * cp-tree.h (START_CATCH_TYPE): Lose.
9311 (HANDLER_TYPE): New.
9312 * except.c (expand_start_catch_block): Don't start any blocks.
9313 Return the type.
9314 (expand_end_catch_block): Don't end any blocks.
9315 * parse.y (handler): Don't pass anything from finish_handler_parms
9316 to finish_handler.
9317 * pt.c (tsubst_expr): Likewise.
9318 * semantics.c (begin_handler): Call note_level_for_catch here.
9319 (finish_handler_parms): Don't return anything.
9320 (genrtl_catch_block, begin_catch_block): Lose.
9321 (genrtl_handler): Call expand_start_catch here.
9322
93232001-05-18 Jason Merrill <jason_merrill@redhat.com>
9324
9325 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9326 (get_vtable_decl, build_vtt): Not here.
9327
d30a825a
NS
93282001-05-20 Nathan Sidwell <nathan@codesourcery.com>
9329
9330 PR c++/2781
9331 * optimize.c (update_cloned_parm): Copy addressability and other
9332 flags.
9333
3b82c249
KL
93342001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9335
9336 * pt.c (determine_specialization): Ignore artificial functions.
9337
2a967f3d
NB
93382001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
9339
9340 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9341 (C_RID_CODE): Remove.
9342 * lex.c (cxx_init_options): Call set_identifier_size. Update.
9343 (init_parse): Don't do it here.
9344
f99df08e
DN
93452001-05-18 Diego Novillo <dnovillo@redhat.com>
9346
9347 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9348 function declaration to avoid stripping the symbol's attributes.
9349
2b0cbc5d
NS
93502001-05-18 Nathan Sidwell <nathan@codesourcery.com>
9351
9352 * decl.c (pushdecl): Adjust error string.
9353 (xref_tag): Adjust friend class injection warning. Remove the
9354 inherited name from the class shadowed scope.
9355
e6855a2d
MM
93562001-05-17 Mark Mitchell <mark@codesourcery.com>
9357
9358 * except.c (cp_protect_cleanup_actions): New function.
07167a18 9359 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
9360 here. Do set lang_protect_cleanup_actions.
9361
cc469ee9
NS
93622001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9363
9364 * spew.c (read_token): Call yyerror on all unexpected tokens.
9365
3f0a9b35
NS
93662001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9367
9368 * init.c (member_init_ok_or_else): Take a tree rather than
9369 string for name.
9370 (expand_member_init): Adjust.
9371
8d0cb60d
NC
93722001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
9373
9374 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 9375 decls if the first decl is a friend.
8d0cb60d 9376
1f730ff7
ZW
93772001-05-12 Zack Weinberg <zackw@stanford.edu>
9378
9379 * except.c (choose_personality_routine): Export. Add
9380 explanatory comment. Take an enum languages, not a boolean.
9381 (initialize_handler_parm): Adjust to match.
9382 * cp-tree.h: Prototype choose_personality_routine.
9383 * lex.c (handle_pragma_java_exceptions): New function.
9384 (init_cp_pragma): Register #pragma GCC java_exceptions.
9385
90e0c410
NB
93862001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9387
9388 * method.c (build_mangled_C99_name): Remove unused prototype.
9389
cb7fdde2
AO
93902001-05-12 Alexandre Oliva <aoliva@redhat.com>
9391
9392 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9393 * typeck.c (get_member_function_from_ptrfunc,
9394 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9395 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
9396
9397 Reverted Geoff Keating's 2001-05-03's patch.
9398
401deb20
IR
93992001-05-11 Ira Ruben <ira@apple.com>
9400
9401 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9402
8e93d446
NB
94032001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
9404
9405 * cp-tree.h (finish_label_expr, lookup_label): Delete.
9406 * parse.y: Update for '&&'; don't issue warning here.
9407 * semantics.c (finish_label_expr): Delete.
9408
5cdba4ff
MM
94092001-05-07 Mark Mitchell <mark@codesourcery.com>
9410
9411 * splay-tree.h (splay_tree_max): New function.
9412 (splay_tree_min): Likewise.
9413
8e9eff6b
GK
94142001-05-03 Geoffrey Keating <geoffk@redhat.com>
9415
9416 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9417 (pfn_vflag_identifier): Define.
9418 Update comment about layout of pointer functions.
9419 (build_ptrmemfunc1): Update prototype.
9420 (expand_ptrmemfunc_cst): Update prototype.
9421 * decl.c (initialize_predefined_identifiers): Initialize
9422 pfn_vflag_identifier.
9423 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9424 an extra field to the type.
07167a18 9425 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
9426 expand_ptrmemfunc_cst and build_ptrmemfunc1.
9427 * typeck.c (get_member_function_from_ptrfunc): When
9428 FUNCTION_BOUNDARY < 16, look at additional field to determine
9429 if a pointer-to-member is a real pointer or a vtable offset.
9430 (build_ptrmemfunc1): Add new parameter to contain extra field.
9431 (build_ptrmemfunc): Pass the extra field around.
9432 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9433 (pfn_from_ptrmemfunc): Ignore the extra field.
9434
acc72c37
MM
94352001-05-03 Mark Mitchell <mark@codesourcery.com>
9436
9437 * cp-tree.h (flag_inline_trees): Update documentation.
9438 * decl.c (init_decl_processing): Adjust handling of
9439 flag_inline_functions and flag_inline_trees to support -O3.
9440 (grokfndecl): Set DECL_INLINE on all functions if that's what
9441 the user requested.
9442 (save_function_data): Clear DECL_INLINE in
9443 current_function_cannot_inline is non-NULL.
9444 * decl2.c (flag_inline_trees): Update documentation.
9445
5158d7ee
NS
94462001-05-03 Nathan Sidwell <nathan@codesourcery.com>
9447
9448 * dump.c (cp_dump_tree, USING_STMT case): New case.
9449 * tree.c (cp_statement_code_p): Add USING_STMT.
9450 * decl2.c (do_using_directive): Add the using directive statement.
9451
9452 * tree.c (walk_tree): Reformat an if block.
9453
80f5bb34
MM
94542001-05-02 Mark Mitchell <mark@codesourcery.com>
9455
9456 * decl.c (compute_array_index_type): Don't try to do anything with
9457 the indices when processing a template.
9458
3e411c3f
KG
94592001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9460
9461 * call.c: NULL_PTR -> NULL.
9462 * class.c: Likewise.
9463 * cvt.c: Likewise.
9464 * decl.c: Likewise.
9465 * decl2.c: Likewise.
9466 * except.c: Likewise.
9467 * init.c: Likewise.
9468 * rtti.c: Likewise.
9469 * search.c: Likewise.
9470 * tree.c: Likewise.
9471 * typeck.c: Likewise.
9472 * typeck2.c: Likewise.
9473
46188dca
MM
94742001-05-02 Mark Mitchell <mark@codesourcery.com>
9475
9476 * decl2.c (do_using_directive): Revert previous patch.
9477
9da99f7d
NS
94782001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9479
9480 * cp-tree.def (USING_STMT): New statement node.
9481 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9482 * decl2.c (do_using_directive): Add USING_STMT to statement
9483 tree. Don't emit errors when processing template decl.
9484 * pt.c (tsubst_expr, USING_STMT case): New case.
9485 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9486
4b48a93e
NS
94872001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9488
9489 * call.c (build_new_op): Convert args from reference here.
9490 (build_conditional_expr): Don't convert here.
9491
1bcea8d7
NS
94922001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9493
9494 * spew.c (last_token_id): New static variable.
9495 (read_token): Set it here.
9496 (yyerror): Use it here.
9497
d72040f5
RH
94982001-04-30 Richard Henderson <rth@redhat.com>
9499
749ced52 9500 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
9501 * decl.c: Likewise.
9502
c3aac512
MM
95032001-04-30 Mark Mitchell <mark@codesourcery.com>
9504
9505 * gxxint.texi: Remove.
9506 * Make-lang.in: Remove all traces of gxxint.texi.
9507
d2a6f3c0 95082001-04-30 Mark P Mitchell <mark@codesourcery.com>
5fd893d5
MM
9509
9510 * decl2.c (start_static_initialization_or_destruction): Correct
9511 logic to handle the -fno-use-cxa-atexit case.
9512
d60e5448
MM
95132001-04-30 Mark Mitchell <mark@codesourcery.com>
9514
9515 * optimize.c (update_cloned_parm): New function.
9516 (maybe_clone_body): Use it. Update the `this' parameter too.
9517
7200764f
JM
95182001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
9519
9520 * decl2.c (unsupported_options): Add new-abi.
9521 * lang-options.h: Remove no longer supported options.
9522
2d46ec83
NS
95232001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9524
9525 * except.c (can_convert_eh): Don't check template parms,
9526 typename types etc.
9527
02a1a68c
NS
95282001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9529
9530 * optimize.c (maybe_clone_body): Copy parameter names and locations.
9531
5f6eeeb3
NS
95322001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9533
9534 * cp-tree.h (adjust_clone_args): Prototype new function.
9535 * class.c (adjust_clone_args): New function.
9536 * decl.c (start_function): Call it for in charge ctors.
9537
1b28d441
MM
95382001-04-26 Mark Mitchell <mark@codesourcery.com>
9539
9540 * method.c (use_thunk): Make sure that thunks really are emitted
9541 when requested.
9542
0576ec13
NS
95432001-04-26 Nathan Sidwell <nathan@codesourcery.com>
9544
9545 * mangle.c (write_chars): New macro.
9546 (hwint_to_ascii): New function
9547 (write_number): Use it.
9548 (write_integer_cst): Deal with really big numbers.
9549
b96ada87
MM
95502001-04-25 Mark Mitchell <mark@codesourcery.com>
9551
9552 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9553 the clone.
9554
6bda7a5e
NS
95552001-04-25 Nathan Sidwell <nathan@codesourcery.com>
9556
9557 * decl.c (grokdeclarator): Set context of namespace scope
9558 TYPE_DECLS.
9559
11fe225a
ZW
95602001-04-24 Zack Weinberg <zackw@stanford.edu>
9561
9562 * cp/optimize.c: Include hashtab.h.
9563 (struct inline_data): Add tree_pruner.
9564 (expand_call_inline, expand_calls_inline): Use it when calling
9565 walk_tree.
9566 (optimize_function): Initialize and free tree_pruner.
9567
0ba8a114
NS
95682001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9569
9570 Lazy __FUNCTION__ generation.
9571 * cp-tree.def (FUNCTION_NAME): Remove.
9572 * cp-tree.h (function_name_declared_p): Remove.
9573 (cp_fname_init): Prototype.
9574 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9575 don't call declare_function_name. Call start_fname_decls.
9576 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9577 clobber the line number.
9578 (cp_fname_init): New function.
9579 (start_function): Call start_fname_decls.
9580 (finish_function): Call finish_fname_decls.
9581 * lex.c (reswords): Add slots for __FUNCTION__ et al.
9582 (rid_to_yy): Add mappings for __FUNCTION__ et al.
9583 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9584 * parse.y (VAR_FUNC_NAME): New token.
9585 (primary): Add VAR_FUNC_NAME.
9586 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9587 generation.
9588 (tsubst, FUNCTION_NAME case): Remove.
9589 (tsubst_copy, FUNCTION_NAME case): Remove.
9590 (tsubst_expr, DECL_STMT case): Be careful with a
9591 DECL_PRETTY_FUNCTION_P.
9592 (instantiate_decl): Remove function_name_declared_p.
9593 * semantics.c (begin_compound_statement): Don't call
9594 declare_function_name here.
9595 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9596 (finish_translation_unit): Call finish_fname_decls.
9597 (expand_body): Remove function_name_declared_p.
9598 * typeck2.c (digest_init): Allow any ERROR_MARK.
9599
dfbb4f34
NS
96002001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9601
9602 * pt.c (tsubst_decl): Use VOID_TYPE_P.
9603 * semantics.c: Fix some typos.
9604
e2584c52
PE
96052001-04-23 Phil Edwards <pme@sources.redhat.com>
9606
9607 * cp/decl2.c (flag_honor_std): Always initialize to 1.
9608
d4c3ec27
KG
96092001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9610
9611 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9612
2ac8a0f9
JM
96132001-04-23 Jason Merrill <jason_merrill@redhat.com>
9614
9615 * except.c (build_throw): Wrap the initialization of the exception
9616 object in a MUST_NOT_THROW_EXPR.
9617 (do_free_exception): #if 0.
9618
968b956a
MM
96192001-04-20 Mark Mitchell <mark@codesourcery.com>
9620
9621 * cp-tree.h (finish_enum): Change prototype.
9622 * decl.c (finish_enum): Reorganize.
9623 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 9624
aa1826e2
NS
96252001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9626
9627 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9628 't' case.
9629
06d9f09f
NS
96302001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9631
9632 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9633 (layout_empty_base): Return at end flag.
9634 (build_base_field): Likewise.
9635 (build_base_fields): Likewise.
9636 (layout_virtual_bases): Don't add 1 to eoc value.
9637 (end_of_class): Use full size for empty bases.
9638 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9639 empty bases. Don't add 1 to eoc value. Only add trailing padding
9640 if we're an empty class with no empty bases.
9641 (dump_class_hierarchy): Dump size and alignment.
9642
351a0f00
JJ
96432001-04-20 Jakub Jelinek <jakub@redhat.com>
9644
9645 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9646 ICS_BAD_FLAG.
9647
881cae05
JJ
96482001-04-20 Jakub Jelinek <jakub@redhat.com>
9649
9650 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9651 is found, look first if name does not match the structure name.
9652
5d2ed28c
MM
96532001-04-19 Mark Mitchell <mark@codesourcery.com>
9654
9655 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9656 set.
9657 (SET_DECL_LANGUAGE): New macro.
9658 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9659 (pushdecl): Likewise.
9660 (build_library_fn_1): Likewise.
9661 (build_cp_library_fn): Likewise.
9662 (grokfndecl): Likewise.
9663 (grokvardecl): Mark `extern "C"' variables as having C linkage.
9664 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9665 * lex.c (retrofit_lang_decl): Likewise.
9666 * mangle.c (mangle_decl_string): Don't mangle the names of
9667 variables declared with C language linkage.
9668 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 9669
41251458
JDA
96702001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
9671
9672 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9673 flag_access_control from uninitialized storage.
9674
1b4a93f7
MM
96752001-04-15 Mark Mitchell <mark@codesourcery.com>
9676
24272dc0
MM
9677 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9678 * mangle.c (write_pointer_to_member_type): Fix mangling of
9679 pointers to cv-qualified member function types.
9680
1b4a93f7
MM
9681 * init.c (build_delete): Create a SAVE_EXPR for the address if
9682 we're going to use it more than once.
9683
530ec96d
MM
96842001-04-13 Mark Mitchell <mark@codesourcery.com>
9685
9686 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9687 (expand_ptremfunc_cst): Change prototype.
9688 (delta2_from_ptrmemfunc): Remove.
9689 * expr.c (cplus_expand_constant): Adjust call to
9690 expand_ptrmemfunc_cst.
9691 * typeck.c (build_ptrmemfunc1): Simplify.
9692 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9693 results in a constant.
9694 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9695 (delta2_from_ptrmemfunc): Remove.
9696 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 9697
ee8fc32b
JM
96982001-04-12 Jason Merrill <jason_merrill@redhat.com>
9699
9700 * cp-tree.h (decl_namespace_list): New macro.
9701 (struct saved_scope): Add decl_ns_list.
9702 * decl.c (mark_saved_scope): Mark it.
9703 * decl2.c: Lose static decl_namespace_list.
9704 (init_decl2): Don't save it.
9705
48857160
KG
97062001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9707
9708 * cp-tree.h (warn_return_type, yylex): Delete redundant
9709 declarations.
11fe225a 9710
48857160
KG
9711 * decl.c (current_class_depth, global_namespace): Likewise.
9712
9713 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9714
9715 * repo.c (flag_use_repository): Likewise.
9716
845e14ed
KG
97172001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9718
9719 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9720 set_block, pushdecl, getdecls, gettags, init_decl_processing,
9721 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9722 lvalue_or_else, print_lang_statistics, comp_target_types,
9723 unsigned_type, signed_type, signed_or_unsigned_type,
9724 build_function_call, mark_addressable, incomplete_type_error):
9725 Delete redundant declarations.
9726
1951a1b6
JM
97272001-04-11 Jason Merrill <jason_merrill@redhat.com>
9728
9729 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9730 (TYPE_ANONYMOUS_P): New macro.
9731 (TAGGED_TYPE_P): New macro.
9732 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9733 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9734 * tree.c (no_linkage_helper): Likewise.
9735 * semantics.c (begin_class_definition): Likewise.
9736 * pt.c (convert_template_argument): Likewise.
9737 * lex.c (check_for_missing_semicolon): Likewise.
9738
0fb3018c
NS
97392001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9740
9741 * class.c (dfs_unshared_virtual_bases): New function.
9742 (mark_primary_bases): Call it.
9743 (check_bases): Ignore virtual bases when determining
9744 nearly-emptiness.
9745
bbb53468
NS
97462001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9747
9748 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9749
9b7949d5
MM
97502001-04-11 Mark Mitchell <mark@codesourcery.com>
9751
9752 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9753 cloned function to the clone.
9754
d6684bc8
KG
97552001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9756
9757 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9758
9759 * semantics.c: Include expr.h.
9760
a2095778
NS
97612001-04-11 Nathan Sidwell <nathan@codesourcery.com>
9762
9763 * method.c (implicitly_declare_fn): Commonize code for copy ctor
9764 and assignment op. Set TREE_USED for parameter.
9765
78b45a24
MM
97662001-04-10 Mark Mitchell <mark@codesourcery.com>
9767
9768 * class.c (find_final_overrider_data): Add `candidates'.
9769 (dfs_find_final_overrider): Don't issue error messages
9770 prematurely.
9771 (find_final_overrider): Issue error messages here.
9772 (build_base_field): Don't warn about amgibuous direct bases here.
9773 (warn_about_ambiguous_direct_bases): New function.
9774 (layout_class_type): Use it.
9775
0450d74d
RH
97762001-04-10 Richard Henderson <rth@redhat.com>
9777
9778 * typeck.c (build_array_ref): Push the array reference inside
9779 COMPOUND_EXPR and COND_EXPR.
9780
79065db2
MM
97812001-04-05 Mark Mitchell <mark@codesourcery.com>
9782
9783 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9784 * decl.c (duplicate_decls): Adjust accordingly.
9785 (maybe_commonize_var): Likewise.
9786 (grokfndecl): Likewise.
9787 (start_function): Likewise.
9788 (start_method): Likewise.
9789 * decl2.c (key_method): Likewise.
9790 (import_export_decl): Likewise.
9791 * method.c (implicitly_declare_fn): Likewise.
9792 * optimize.c (maybe_clone_body): Likewise.
11fe225a 9793
fdecbf8a
BK
97942001-04-05 Benjamin Kosnik <bkoz@redhat.com>
9795
b03eced6 9796 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 9797
d2a6f3c0 97982001-04-05 J"orn Rennecke <amylaar@redhat.com>
0b4c1646
R
9799
9800 * search.c (get_dynamic_cast_base_type): When building a new
9801 constant, set its type to ssizetype.
9802
e59d6709
JJ
98032001-04-04 Jakub Jelinek <jakub@redhat.com>
9804
9805 * optimize.c (expand_call_inline): Only add newly inlined statements
9806 into inlined_stmts.
9807
0c918ce5
MM
98082001-04-03 Mark Mitchell <mark@codesourcery.com>
9809
9810 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9811 (OPERATOR_FORMAT): Likewise.
9812 (OPERATOR_TYPENAME_FORMAT): Likewise.
9813 * operators.def: Remove old name-mangling information.
9814 * decl.c (grok_op_properties): Adjust accordingly.
9815 * lex.c (init_operators): Likewise.
9816 * rtti.c (get_tinfo_decl): Issue error messages about types that
9817 have variable size.
9818
92788413
MM
98192001-04-03 Mark Mitchell <mark@codesourcery.com>
9820
11fe225a 9821 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
9822 when processing an inline member function.
9823 * semantics.c (expand_body): Call import_export_decl before
9824 emitting inline functions.
9825
52a11cbf
RH
98262001-03-28 Richard Henderson <rth@redhat.com>
9827
9828 IA-64 ABI Exception Handling:
9829 * cp-tree.def (EH_SPEC_BLOCK): New.
9830 (MUST_NOT_THROW_EXPR): New.
9831 * cp-tree.h: Update changed function declarations.
9832 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9833 (CPTI_CALL_UNEXPECTED): New.
9834 (struct cp_language_function): Rename x_eh_spec_try_block
9835 to x_eh_spec_block.
9836 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 9837 * decl.c (current_binding_level): If no current function
52a11cbf
RH
9838 bindings, revert to scope_chain.
9839 (initialize_predefined_identifiers): Remove __cp_push_exception.
9840 (store_parm_decls): Use begin_eh_spec_block.
9841 (finish_function): Use finish_eh_spec_block.
9842 (mark_lang_function): Update for name changes.
9843 * decl2.c (finish_file): No mark_all_runtime_matches.
9844 * dump.c (cp_dump_tree): Handle new tree codes.
9845 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9846 * except.c (catch_language_init, catch_language): Remove.
9847 (init_exception_processing): Don't set language code.
9848 Initialize call_unexpected_node, protect_cleanup_actions,
9849 eh_personality_libfunc, lang_eh_runtime_type.
9850 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9851 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9852 (prepare_eh_type): Split out type canonicalizations ...
9853 (build_eh_type_type): ... from here.
9854 (build_eh_type_type_ref): Remove.
9855 (mark_all_runtime_matches): Remove.
9856 (build_exc_ptr): New.
9857 (do_begin_catch, do_end_catch): New.
9858 (do_pop_exception): Remove.
9859 (build_terminate_handler): Remove.
9860 (choose_personality_routine): Split out language choice from ...
9861 (initialize_handler_parm): ... here.
9862 Use MUST_NOT_THROW_EXPR.
9863 (expand_start_catch_block): Use do_begin_catch. Simplify Java
9864 exception object handling.
9865 (expand_start_eh_spec, expand_end_eh_spec): Remove.
9866 (expand_exception_blocks, alloc_eh_object): Remove.
9867 (begin_eh_spec_block, finish_eh_spec_block): New.
9868 (do_allocate_exception, do_free_exception): New.
9869 (expand_throw): Merge into ...
9870 (build_throw): ... here. Update for abi.
9871 * expr.c (cplus_expand_expr): No expand_internal_throw.
9872 Handle MUST_NOT_THROW_EXPR.
9873 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9874 * semantics.c (*) Update for except.h name changes.
9875 (genrtl_try_block): No protect_with_terminate.
9876 (genrtl_eh_spec_block): New.
9877 (genrtl_handler): Don't emit the goto here.
9878 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9879 (genrtl_finish_function): Don't expand_exception_blocks.
9880 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9881
826840d9
RH
98822001-03-28 Richard Henderson <rth@redhat.com>
9883
9884 * decl.c (struct named_label_list): Rename eh_region to
9885 in_try_scope, add in_catch_scope.
9886 (struct binding_level): Rename eh_region to is_try_scope,
9887 add is_catch_scope.
9888 (note_level_for_try): Rename from note_level_for_eh.
9889 (note_level_for_catch): New.
9890 (poplevel): Copy both is_try_scope and is_catch_scope to
9891 the named_label_list struct.
9892 (check_previous_goto_1): Don't check for catch block via
9893 DECL_ARTIFICIAL; use in_try_scope instead.
9894 (check_goto): Likewise.
9895 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9896 * except.c (expand_start_catch_block): Call note_level_for_catch.
9897 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9898
531073e7
RH
98992001-03-27 Richard Henderson <rth@redhat.com>
9900
9901 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9902 exceptions_via_longjmp.
9903
8653a2c3
PE
99042001-03-27 Phil Edwards <pme@sources.redhat.com>
9905
9906 * pt.c (check_default_tmpl_args): Make error messages clearer.
9907
99082001-03-26 Phil Edwards <pme@sources.redhat.com>
9909
9910 * error.c: Also undefine 'A' macro used for cp_printers definition.
9911
911e6107
KG
99122001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9913
9914 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9915
005a5cb0
MY
99162001-03-26 Mike Yang <yang@research.att.com>
9917 Mark Mitchell <mark@codesourcery.com>
9918
9919 * dump.c (dump_access): New function.
9920 (cp_dump_tree): Use it. Dump basetype information for class
9921 types.
9922
b850de4f
MM
99232001-03-26 Mark Mitchell <mark@codesourcery.com>
9924
9925 * Makefile.in (optimize.o): Depend on params.h.
9926 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9927 (init_decl_processing): Set flag_no_inline when doing
9928 inlining-on-trees.
9929 * optimize.c: Include params.h.
9930 (struct inline_data): Improve documentation of FNS. Add
9931 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9932 (INSNS_PER_STMT): New macro.
9933 (remap_block): Use CLONING_P.
9934 (inlinable_function_p): Don't inline big functions.
9935 (expand_call_inline): Keep track of how much inlining we've done.
9936 (optimize_function): Set FIRST_INLINED_FN.
9937 (maybe_clone_body): Set CLONING_P.
9938 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9939 tree nodes.
9940 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9941 rest_of_compilation. Clear DECL_RTL for local variables
9942 afterwards.
9943 (clear_decl_rtl): New function.
11fe225a 9944
788bf0e3
NS
99452001-03-26 Nathan Sidwell <nathan@codesourcery.com>
9946
9947 Implement DR 209
9948 * cp-tree.h (skip_type_access_control,
9949 reset_type_access_control): Prototype.
9950 * decl.c (grokdeclarator): Access of friends is not checked.
9951 * parse.y (component_decl_list): Reset type access control.
9952 * semantics.c (decl_type_access_control): Clear
9953 current_type_lookups.
9954 (save_type_access_control): Don't save if not deferring.
9955 (skip_type_access_control, reset_type_access_control): New
9956 functions.
9957 (begin_class_definition): Do type access control for basetypes.
9958 Start deferred access control.
9959 (finish_class_definition): Resume immediate access control if
9960 this is a local class.
9961
730e1556
KG
99622001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9963
9964 * class.c (add_method): Use memcpy/memmove, not bcopy.
9965
9966 * decl.c (duplicate_decls): Likewise.
9967
f1a0345c
JJ
99682001-03-23 Jakub Jelinek <jakub@redhat.com>
9969
9970 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9971 not `_'.
9972
8e4ce833
JJ
99732001-03-23 Jakub Jelinek <jakub@redhat.com>
9974
9975 * decl.c (local_names): Define.
9976 (push_local_name): New.
9977 (grok_reference_init): Return init if initializing static reference
9978 variable with non-constant instead of emitting it.
9979 Move expand_static_init call to cp_finish_decl.
9980 (layout_var_decl): Call push_local_name.
9981 (maybe_commonize_var): Allow inlining functions even if they have
9982 static local variables, use comdat_linkage for them if flag_weak.
9983 (check_initializer): Call obscure_complex_init if
838dfd8a 9984 grok_reference_init returned nonzero.
8e4ce833
JJ
9985 (save_function_data): Clear x_local_names.
9986 (pop_cp_function_context): Free x_local_names.
9987 (mark_inlined_fns): Remove.
9988 (mark_lang_function): Mark x_local_names.
9989 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9990 Mark inlined_fns as tree, remove call to mark_inlined_fns.
9991 * class.c (alter_access): Ensure DECL_ACCESS is never set if
9992 DECL_DISCRIMINATOR_P.
9993 * cp-tree.h (cp_language_function): Add x_local_names.
9994 (lang_decl_flags): Add discriminator into u2.
9995 (lang_decl_inlined_fns): Remove.
9996 (lang_decl): inlined_fns is now a TREE_VEC.
9997 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9998 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9999 TREE_VEC, not a custom structure.
10000 (optimize_function): Likewise.
10001 * mangle.c (discriminator_for_local_entity): Discriminate among
10002 VAR_DECL local entities.
10003 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10004 is not valid.
10005
60c87482
BM
100062001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
10007
10008 Add support for Java interface method calls.
10009 * cp-tree.h (struct lang_type): Add java_interface flag.
10010 (TYPE_JAVA_INTERFACE): New macro.
10011 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10012 by setting TYPE_JAVA_INTERFACE.
10013 * call.c (java_iface_lookup_fn): New static.
11fe225a 10014 (build_over_call): If calling a method declared in a
60c87482
BM
10015 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10016 expression which resolves the function address.
10017 (build_java_interface_fn_ref): New function.
10018
94c7f30b
RH
100192001-03-22 Richard Henderson <rth@redhat.com>
10020
10021 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10022 * except.c: Don't include it.
10023
fd8b7a0e 100242001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 10025 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
10026
10027 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10028 New nonterminals.
10029 (data_def, component_decl): Add reductions to bad_decl.
10030
a1c2b86d
JJ
100312001-03-22 Jakub Jelinek <jakub@redhat.com>
10032
10033 * method.c (do_build_assign_ref): Don't use build_modify_expr for
10034 anonymous aggregates, since they don't have assignment operator
10035 method.
10036 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10037 assignment operators for anonymous structure fields.
10038
46ccf50a
JM
100392001-03-21 Jason Merrill <jason@redhat.com>
10040
10041 * pt.c (instantiate_decl): Abort if we see a member constant
10042 instantiation that doesn't already have its initializer.
10043 Downgrade explicit instantiation without definition to pedwarn.
10044
10045 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10046 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10047 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10048
10049 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10050 (pending_vtables): Remove.
10051 * decl2.c (pending_vtables): Remove.
10052 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10053 CLASSTYPE_VTABLE_NEEDS_WRITING.
10054 (import_export_class): Likewise.
10055 (init_decl2): Don't mark pending_vtables.
10056 * lex.c (handle_pragma_vtable): Just sorry.
10057 * pt.c (instantiate_class_template): Don't mess with
10058 CLASSTYPE_VTABLE_NEEDS_WRITING.
10059 (mark_class_instantiated): Likewise.
10060 * ptree.c (print_lang_type): Don't print it.
10061 * semantics.c (begin_class_definition): Don't set it.
10062
10063 * pt.c (template_tail): Replace with last_pending_template.
10064 (maybe_templates, maybe_template_tail): Remove.
10065 (add_pending_template): Adjust.
10066 (instantiate_pending_templates): Adjust.
10067
10068 * cp-tree.h (struct saved_scope): Remove lang_stack field.
10069 (current_lang_stack): Remove.
10070 * decl.c (maybe_push_to_top_level): Don't initialize it.
10071 (duplicate_decls): Use current_lang_depth.
10072 (xref_basetypes): Likewise.
10073 * class.c (current_lang_depth): New fn.
10074 (push_lang_context): Use more varray functionality.
10075 (pop_lang_context): Likewise.
64d9c3fe
JM
10076
10077 * error.c (GLOBAL_THING): Always use '__'.
10078
1c06710a
MM
100792001-03-21 Mark Mitchell <mark@codesourcery.com>
10080
71cb9286
MM
10081 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10082
1c06710a
MM
10083 * mangle.c (mangle_decl_string): Mangle the names of overloaded
10084 operators, even when they have `extern "C"' linkage.
10085
92643fea
MM
100862001-03-19 Mark Mitchell <mark@codesourcery.com>
10087
10088 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10089 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10090 where it's not necessary.
10091 (add_method): Remove optimization involving comparison of
10092 DECL_ASSEMBLER_NAME.
10093 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10094 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10095 where it's not necessary.
10096 (check_methods): Likewise.
10097 (build_clone): Likewise.
10098 (built_vtt): Likewise.
10099 * cp-tree.h (DECL_NEEDED_P): Likewise.
10100 * decl.c (pushtag): Likewise.
10101 (duplicate_decls): Likewise.
10102 (pushdecl): Likewise.
10103 (builtin_function): Likewise.
10104 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10105 (build_cp_library_fn): Likewise.
10106 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10107 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10108 where it's not necessary.
10109 (make_rtl_for_nonlocal_decl): Likewise.
10110 (cp_finish_decl): Likewise.
10111 (grokfndecl): Likewise.
10112 (grokvardecl): Likewise.
10113 (grokdeclarator): Likewise.
10114 (start_function): Likewise.
10115 (cp_missing_return_ok_p): Likewise.
10116 * decl2.c (grokclassfn): Likewise.
10117 (check_classfn): Likewise.
10118 (finish_static_data_member_decl): Likewise.
10119 (grokfield): Likewise.
10120 * error.c (GLOBAL_IORD_P): Remove.
10121 (dump_global_iord): Improve output.
10122 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10123 * except.c (nothrow_libfn_p): Summarily reject any function not in
10124 namespace-scope.
10125 * init.c (build_java_class_ref): Don't explicitly set
10126 DECL_ASSEMBLER_NAME after calling mangle_decl.
10127 * mangle.c (mangle_decl_string): Handle extern "C" functions.
10128 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10129 * method.c (set_mangled_name_for_decl): Don't explicitly set
10130 DECL_ASSEMBLER_NAME after calling mangle_decl.
10131 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10132 IDENTIFIER_GLOBAL_VALUE for the thunk.
10133 * pt.c (set_mangled_name_for_template_decl): Remove.
10134 (check_explicit_specialization): Don't use it.
10135 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10136 (tsubst_friend_function): Likewise.
10137 (tsubst_decl): Likewise.
10138 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10139 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10140 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10141 where it's not necessary.
10142 (tinfo_base_init): Likewise.
10143 (create_real_tinfo_var): Likewise.
10144 * search.c (looup_field_1): Likewise.
10145 * semantics.c (finish_named_return_value): Likewise.
10146 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 10147
d064d75a
GDR
101482001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
10149
10150 Correct semantics restrictions checking in throw-expression.
10151 * except.c (is_admissible_throw_operand): New function.
10152 (build_throw): Use it.
10153
a3eab619
MM
101542001-03-14 Mark Mitchell <mark@codesourcery.com>
10155
10156 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10157 and its ilk.
10158
19e7881c
MM
101592001-03-14 Mark Mitchell <mark@codesourcery.com>
10160
10161 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10162 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10163 * decl.c (duplicate_decls): Likewise.
10164 (builtin_function): Likewise.
10165 (build_library_fn): Likewise.
10166 (build_cp_library_fn): Likewise.
10167 (check_initializer): Likewise.
10168 (cp_finish_decl): Likewise.
10169 * decl2.c (grokfield): Likewise.
10170 (grok_function_init): Remove #if 0'd code.
10171 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10172 * friend.c (do_friend): Likewise.
10173 * init.c (get_temp_regvar): Likewise.
10174 * method.c (make_thunk): Likewise.
10175 * pt.c (tsubst_friend_function): Likewise.
10176 (tsubst_decl): Likewise.
10177 (regenerate_decl_from_template): Likewise.
10178 * semantics.c (genrtl_named_return_value): Likewise.
10179 (expand_body): Likewise.
10180 (genrtl_finish_function): Likewise.
10181 * tree.c (cp_tree_equal): Likewise.
11fe225a 10182
78fe06c2
NS
101832001-03-12 Nathan Sidwell <nathan@codesourcery.com>
10184
10185 * call.c (convert_like_real): Add extra semantics to INNER
10186 parameter. Don't convert to temporary if a user conversion
10187 gives us an lvalue that we're about to bind to a reference.
10188 Set INNER to indicate pending reference binding on recursive
10189 calls.
10190
b3e68a79
NB
101912001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10192
10193 * cp/lex.c: Delete duplicate pending_lang_change.
10194
101952001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10196
10197 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10198 Similarly.
10199 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10200 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10201
11642c3a
ZW
102022001-03-09 Zack Weinberg <zackw@stanford.edu>
10203
10204 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10205
bb6852eb 102062001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
10207
10208 * cp-tree.h (set_identifier_local_value): Remove unused decl.
10209
cc937581
ZW
102102001-03-06 Zack Weinberg <zackw@stanford.edu>
10211
10212 * spew.c: Remove references to CPP_OSTRING.
10213
d1188d91
AH
102142001-03-06 Andrew Haley <aph@redhat.com>
10215
10216 * typeck.c (convert_arguments): Check that we have an fndecl.
10217
4eaf1d5b
AH
102182001-03-05 Andrew Haley <aph@redhat.com>
10219
10220 * typeck.c (convert_arguments): Don't do ellipsis conversion for
10221 __built_in_constant_p.
10222
7eeb553c
NS
102232001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10224
10225 * typeck.c (build_static_cast): Allow enum to enum conversions
10226 as per DR 128.
10227
d282fcb2
NS
102282001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10229
10230 * class.c (check_field_decls): Pointers to member do not a
10231 non-pod struct make, as per DR 148.
10232
f86fdf68
NS
102332001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10234
10235 * call.c (joust): cp_pedwarn when using gnu extension concerning
10236 worst conversion sequences.
10237
d6edb99e
ZW
102382001-03-01 Zack Weinberg <zackw@stanford.edu>
10239
10240 * decl.c: Replace all uses of 'boolean' with 'bool'.
10241
f7143427
ZW
102422001-03-01 Zack Weinberg <zackw@stanford.edu>
10243
10244 * lang-specs.h: Add zero initializer for cpp_spec field to
10245 all array elements that need one. Don't put an #ifdef inside
10246 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10247 use it.
10248
fbfe8c9e
NS
102492001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10250
10251 Implement using decls inside template functions.
10252 * decl2.c (validate_nonmember_using_decl): Don't special case
10253 fake_std_node in the global namespace. Don't reject early when
10254 processing a template.
10255 (do_local_using_decl): Add to statement tree. Don't do further
10256 processing when building a template.
10257 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10258
4d24a889
NS
102592001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10260
10261 * decl2.c (do_nonmember_using_decl): Don't complain if we find
10262 same function. Do complain about ambiguating extern "C"
10263 declarations.
10264
e5844e6d
NS
102652001-02-28 Nathan Sidwell <nathan@codesourcery.com>
10266
10267 Remove floating point and complex type template constant parms.
10268 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10269 COMPLEX_TYPE extensions.
10270 (invalid_nontype_parm_type_p): Likewise.
10271
788f238c
JO
102722001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
10273
10274 * except.c (call_eh_info): Revert "match_function"'s type.
10275
73ea87d7
NS
102762001-02-27 Nathan Sidwell <nathan@codesourcery.com>
10277
10278 Fix ctor vtable vcall offsets.
10279 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10280 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10281 (get_matching_base): Remove.
10282 (get_original_base): New function.
11fe225a 10283 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
10284 Use a virtual thunk for a ctor vtable with an index
10285 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10286 primary base within a constructor vtable. Only set
10287 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10288 when primary base has been lost.
10289 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10290
fe730161
JO
102912001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
10292
10293 * call.c (joust): Ensure more_specialized()'s argument length
10294 parameter has correct value for constructors.
10295
e5dd4aad
NS
102962001-02-26 Nathan Sidwell <nathan@codesourcery.com>
10297
10298 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 10299
e5dd4aad
NS
10300 * decl.c (mark_inlined_fns): Prototype.
10301
25200ab2
MM
103022001-02-22 Mark Mitchell <mark@codesourcery.com>
10303
10304 * spew.c (yylex): Correct handling of friends.
10305
f58c04ac
MM
103062001-02-22 Mark Mitchell <mark@codesourcery.com>
10307
10308 * mangle.c (write_encoding): Pass write_function_type the
10309 FUNCTION_DECL for the function being encoded.
10310 (write_function_type): Pass it along to write_bare_function_type.
10311 (write_bare_function_type): Pass it along to write_method_parms.
10312 (write_method_parms): Don't mangle the compiler-generated
10313 parameters to a constructor or destructor.
10314
9c96f3f8
AJ
103152001-02-22 Andreas Jaeger <aj@suse.de>
10316
10317 * optimize.c: Include toplev.h for
10318 note_deferral_of_defined_inline_function prototype.
10319
b3bae5e2
JJ
103202001-02-22 Jakub Jelinek <jakub@redhat.com>
10321
10322 * cp-tree.h (struct lang_decl_inlined_fns): New.
10323 (struct lang_decls): Add inlined_fns.
10324 (DECL_INLINED_FNS): New macro.
10325 * optimize.c (struct inline_data): Add inlined_fns.
10326 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10327 (inlinable_function_p): Likewise, fix typo in comment,
10328 function is not inlinable if it already inlined function currently
10329 being optimized.
306ef644 10330 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
10331 (optimize_function): Initialize inlined_fns.
10332 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10333 * decl.c (mark_inlined_fns): New function.
10334 (lang_mark_tree): Call it.
10335
5daf7c0a
JM
103362001-02-21 Jason Merrill <jason@redhat.com>
10337
10338 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10339 (DECL_UNINLINABLE): Move to middle-end.
10340
10341 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10342 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10343 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10344 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10345 parms and outer BLOCK. note_deferral_of_defined_inline_function.
10346
10347 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10348 second parm of op=.
10349
2c0fc02d
MM
103502001-02-19 Mark Mitchell <mark@codesourcery.com>
10351
10352 * decl2.c (set_decl_namespace): Allow explicit instantiations in
10353 any namespace.
10354
612164eb
KL
103552001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10356
10357 * optimize.c (expand_call_inline): Don't walk subtrees of type
10358 nodes.
10359
69a59a49
MM
103602001-02-18 Mark Mitchell <mark@codesourcery.com>
10361
10362 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10363 for a destructor.
10364
e0fff4b3
JM
103652001-02-18 Jason Merrill <jason@redhat.com>
10366
10367 Do put the VTT parameter in DECL_ARGUMENTS.
10368 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10369 (current_vtt_parm): New macro.
10370 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10371 (DECL_HAS_VTT_PARM_P): New macro.
10372 (DECL_VTT_PARM): Remove.
10373 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10374 * decl.c (duplicate_decls): Only copy the operator code if
10375 appropriate.
10376 (start_function): Set current_vtt_parm.
10377 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 10378 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
10379 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
10380 * class.c (build_clone): Maybe remove the VTT parm.
10381 * optimize.c (maybe_clone_body): Set up the VTT parm.
10382 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10383 * call.c (build_over_call): Just allow the VTT arg.
10384 * method.c (make_thunk): Don't set DECL_VTT_PARM.
10385 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10386 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10387 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10388 * error.c (dump_function_decl): Likewise.
10389 * call.c (build_user_type_conversion_1, convert_like_real): Abort
10390 if we try to call a constructor with in-charge or VTT parms.
10391 * method.c (skip_artificial_parms_for): New fn.
10392 * call.c (add_function_candidate, build_over_call): Call it.
10393 * call.c (build_new_method_call): Use current_vtt_parm.
10394 * init.c (expand_virtual_init): Likewise.
10395 * class.c (same_signature_p): No longer static.
10396 * cp-tree.h: Declare it.
10397 * search.c (look_for_overrides_r): Use it.
10398
c750255c
MM
103992001-02-17 Mark Mitchell <mark@codesourcery.com>
10400
8fa33dfa
MM
10401 * cp-tree.h (new_abi_rtti_p): Remove.
10402 (name_mangling_version): Likewise.
10403 (flag_do_squangling): Likewise.
10404 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10405 * decl.c (grokfndecl): Likewise.
10406 * decl2.c (name_mangling_version): Remove.
10407 (flag_do_squangling): Likewise.
10408 (lang_f_options): Remove `squangle'.
10409 (unsupported_options): Add `squangle'.
10410 (cxx_decode_option): Issue a warning about uses of
10411 -fname-mangling-version.
10412 (finish_file): Remove old ABI support.
10413 * pt.c (check_explicit_specialization): Likewise.
10414 (tsubst_decl): Likewise.
10415 * rtti.c (init_rtti_processing): Likewise.
10416 (build_headof): Likewise.
10417 (get_tinfo_decl_dynamic): Likewise.
10418 (tinfo_from_decl): Likewise.
10419 (build_dynamic_cast_1): Likewise.
10420 (synthesize_tinfo_var): Likewise.
12fa82db
MM
10421 * init.c (build_new): Allow enumeration types for the array-bounds
10422 in a direct-new-declarator.
10423
10424 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10425
c750255c
MM
10426 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10427 TREE_PROTECTED from the template being specialized.
10428
a714e5c5
JM
104292001-02-17 Jason Merrill <jason@redhat.com>
10430
10431 * decl2.c (build_artificial_parm): Set TREE_READONLY.
10432
9c96f3f8 10433 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
10434 pointer-to-function or -member-function type.
10435 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10436 a pmf.
10437
8084b91e
MM
104382001-02-17 Mark Mitchell <mark@codesourcery.com>
10439
10440 * call.c (check_dtor_name): Handle template names correctly.
10441
48f22ed2
JM
104422001-02-16 Jason Merrill <jason@redhat.com>
10443
10444 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10445 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10446 * optimize.c (maybe_clone_body): Don't substitute it.
10447 * call.c (build_new_method_call): Check in_chrg instead.
10448 * init.c (expand_virtual_init): Likewise.
10449
e8186ecf
GDR
104502001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
10451
10452 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10453 class-type introduces at least a type-name.
10454
2c1be322
JJ
104552001-02-16 Jakub Jelinek <jakub@redhat.com>
10456
10457 * call.c (convert_like_real): Create a temporary for non-lvalue.
10458
aab8454a
JO
104592001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
10460
10461 * cp-tree.h: Fix typos in comments.
10462
a901fa64
JM
104632001-02-16 Jason Merrill <jason@redhat.com>
10464
10465 * optimize.c (remap_block): If we're compiling a clone, pass the
10466 new block to insert_block.
10467
8853373c
MM
104682001-02-16 Mark Mitchell <mark@codesourcery.com>
10469
10470 * semantics.c (finish_asm_stmt): Robustify.
10471
b60ecc04
MM
104722001-02-15 Mark Mitchell <mark@codesourcery.com>
10473
10474 * pt.c (push_template_decl_real): Don't remangle the name of a
10475 class template.
10476
e658449e
JM
104772001-02-15 Jim Meyering <meyering@lucent.com>
10478
fd48c9b5
DD
10479 * Make-lang.in (c++.install-common): Depend on installdirs.
10480 (c++.install-info): Likewise.
10481 (c++.install-man): Likewise.
e658449e 10482
f1a3f197
MM
104832001-02-15 Mark Mitchell <mark@codesourcery.com>
10484
10485 * typeck2.c (build_m_component_ref): Robustify.
10486
8826b15b
AO
104872001-02-15 Alexandre Oliva <aoliva@redhat.com>
10488
10489 * friend.c (do_friend): Don't take the nested [template] class
10490 into account when deciding whether to warn about the friend
10491 function not referring to a template function.
10492
7161c1a5
JJ
104932001-02-14 Jakub Jelinek <jakub@redhat.com>
10494
10495 * typeck.c (build_unary_op): Clarify error message.
10496
4806765e
AH
104972001-02-08 Aldy Hernandez <aldyh@redhat.com>
10498
a901fa64
JM
10499 * parse.y (component_constructor_declarator): allow optional
10500 parentheses around constructor class name.
4806765e 10501
bfc8e1e2
NS
105022001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10503
10504 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10505 section.
10506 * init.c (emit_base_init): Remove incorrect comment about
10507 virtual bases.
10508 * method.c (make_thunk): Fix comment alignment.
10509
394fd776
NS
105102001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10511
10512 Kill remnants of this is variable.
10513 * cp-tree.h (flag_this_is_variable): Remove.
10514 * decl2.c (flag_this_is_variable): Remove.
10515 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10516 (build_vbase_path): The path is non-static, even in a cdtor.
10517 (resolves_to_fixed_type_p): Add additional return value.
10518 * search.c (init_vbase_pointers): Adjust.
10519 * tree.c (lvalue_p_1): Adjust.
10520 * typeck.c (mark_addressable): Adjust.
10521
d0ab7624
NS
105222001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10523
10524 * pt.c (unify): Don't check cv quals of array types.
10525
7773899b
NS
105262001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10527
10528 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10529 check whether we already have the type.
10530
52682a1b
MM
105312001-02-13 Mark Mitchell <mark@codesourcery.com>
10532
10533 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10534 * call.c (build_op_delete_call): Simplify to remove duplicate
10535 code.
10536 * class.c (clone_function_decl): Don't build the deleting variant
10537 of a non-virtual destructor.
10538 * decl.c (finish_destructor_body): Don't call delete if this is a
10539 non-virtual destructor.
10540 * init.c (build_delete): Explicitly call `operator delete' when
10541 deleting an object with a non-virtual destructor.
9c96f3f8 10542
3b6bd115
JM
105432001-02-13 Jason Merrill <jason@redhat.com>
10544
10545 * lang-specs.h: Add more __EXCEPTIONS.
10546
45abaea8
NS
105472001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10548
10549 * typeck2.c (process_init_constructor): Check
10550 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10551
996065b4
NS
105522001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10553
10554 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10555 Remove spurious information in comment. Allow further
10556 adjustments of REFERENCE_TYPE args.
10557
82c18d5c
NS
105582001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10559
10560 * errfn.c (cp_deprecated): Tweak diagnostic text.
10561 * parse.y (new_initializer): Deprecate initializer lists
10562 extension.
10563
1f84ec23
MM
105642001-02-12 Mark Mitchell <mark@codesourcery.com>
10565
10566 Remove old ABI support.
10567
8c310e3f
MM
105682001-02-11 Mark Mitchell <mark@codesourcery.com>
10569
b1012f1b
MM
10570 * decl2.c (flag_vtable_thunks): Always set it to 1.
10571 (flag_new_abi): Likewise.
10572 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 10573
8c310e3f
MM
10574 * Makefile.in (g++spec.o): Fix typo.
10575
3b635dfc
JM
105762001-02-09 Jason Merrill <jason@redhat.com>
10577
10578 * lang-specs.h: Restore definition of __EXCEPTIONS.
10579
bd0d5d4a
JM
105802001-02-08 Jason Merrill <jason@redhat.com>
10581
10582 * search.c (shared_member_p): New function.
10583 (lookup_field_r): Use it.
10584 * cp-tree.h (SHARED_MEMBER_P): Remove.
10585
10586 * method.c (process_overload_item): Handle template-dependent array
10587 bounds.
10588 * pt.c (type_unification_real): If we end up with undeduced nontype
10589 parms, try again.
10590
10591 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10592 types.
10593
10594 * typeck2.c (friendly_abort): Don't say anything if we have
10595 earlier errors or sorries.
10596
9c96f3f8 10597 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
10598 wchar_t. Ignore if in_system_header.
10599
10600 * decl.c (maybe_push_cleanup_level): New fn...
10601 (start_decl_1): ...split out from here.
10602 * cvt.c (build_up_reference): Use it.
10603 * cp-tree.h: Declare it.
10604
a9374841
MM
106052001-02-07 Mark Mitchell <mark@codesourcery.com>
10606
9c96f3f8 10607 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
10608 spec.
10609
a87b4257
NS
106102001-02-06 Nathan Sidwell <nathan@codesourcery.com>
10611
10612 * pt.c (lookup_template_class): Make sure it's a primary
10613 template or template_template_parm when called from the parser.
10614 (instantiate_template_class): Add assertion.
10615
518fed76
AO
106162001-02-05 Alexandre Oliva <aoliva@redhat.com>
10617
10618 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10619 from error_mark_node.
10620
9965d119
NS
106212001-02-05 Nathan Sidwell <nathan@codesourcery.com>
10622
10623 Fix specification and implementation bugs in V3 ABI
10624 construction vtables.
10625 * cp-tree.h (flag_dump_class_layout): New flag.
10626 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10627 (BINFO_LOST_PRIMARY_P): New flag.
10628 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10629 (BINFO_PRIMARY_MARKED_P): Rename to ...
10630 (BINFO_PRIMARY_P): ... here.
10631 (binfo_via_virtual): New prototype.
10632 * decl2.c (flag_dump_class_layout): New flag.
10633 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10634 use `=' as a file name separator.
10635 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10636 bases.
10637 (build_vtbl_address): If this is a virtual primary base, then
10638 get the vtbl of what it is ultimately primary for.
10639 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10640 for BINFO_PRIMARY_P.
10641 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10642 (get_shared_vbase_if_not_primary): Likewise.
10643 (dfs_get_pure_virtuals): Likewise.
10644 (expand_upcast_fixups): Likewise.
10645 (fixup_virtual_upcast_offsets): Likewise.
10646 (dfs_find_vbase_instance): Likewise.
10647 (find_vbase_instance): Likewise.
10648 (binfo_from_vbase): Adjust comment to reflect reality.
10649 (binfo_via_virtual): New function.
10650 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10651 for binfo walking during VTT construction.
10652 (dfs_mark_primary_bases): Remove.
10653 (force_canonical_binfo_r): New function.
10654 (force_canonical_binfo): New function.
10655 (mark_primary_virtual_base): New function.
10656 (mark_primary_bases): Walk in inheritance graph order, use
10657 mark_primary_virtual_base.
10658 (determine_primary_base): Use some more intermediate variables.
10659 (dfs_find_final_overrider): Don't check for overriding along a
10660 virtual path.
10661 (dfs_modify_vtables): Walk into primary virtual bases too.
10662 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10663 (build_base_fields): Likewise.
10664 (dfs_set_offset_for_unshared_vbases): Likewise.
10665 (layout_virtual_bases): Likewise.
10666 (end_of_class): Likewise.
10667 (finish_struct_1): Call dump_class_hierarchy, if requested.
10668 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10669 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10670 (dump_class_hierarchy): Add file parameter. Append to file, if
10671 required.
10672 (finish_vtbls): Adjust accumulate_vtbl_inits call.
10673 Use canonical base for virtual bases.
10674 (build_vtt): Add more comments. Adjust build_vtt_inits call.
10675 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10676 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10677 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10678 virtual VTTs.
10679 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10680 from DATA. We want virtual primary bases and all bases via virtual.
10681 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10682 virtual base when not a construction vtable.
10683 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10684 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10685 Use canonical bases when processing virtual bases.
10686 (accumulate_vtbl_inits): We're interested in any base via a
10687 virtual path.
10688 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10689 within a construction vtable, determine what is being overridden.
10690 (build_vtbl_initializer): Add more comments
10691 (add_vcall_offset_vtbl_entries_1): Adjust comment.
10692 (build_rtti_vtbl_entries): Check if the base has lost its
10693 primary.
10694
39d6f2e8
MM
106952001-02-05 Mark Mitchell <mark@codesourcery.com>
10696
10697 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10698
d2a6f3c0 106992001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
10700
10701 * decl.c (pushdecl): Call abort instead of fatal.
10702 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10703 * init.c (build_new_1): Likewise.
10704 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10705 * decl.c (build_typename_type): hash_table_init now returns void.
10706 decl.c (init_decl_processing): Make an error non-fatal.
10707
97458258
MM
107082001-02-04 Mark Mitchell <mark@codesourcery.com>
10709
10710 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10711 Document.
10712 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10713 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10714 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10715 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10716 * decl.c (maybe_commonize_var): Use the new name-mangling where
10717 appropriate.
10718 * decl2.c (comdat_linkage): Enhance comments. Make all
10719 compiler-generated things static, if COMDAT is not available.
10720 (get_tinfo_decl): Do not make typeinfo objects that belong in the
10721 library COMDAT.
10722 (tinfo_base_init): Use the correct mangled name for typeinfo
10723 strings, and push them into the global scope.
10724 (typeinfo_in_lib_p): New function.
10725 (synthesize_tinfo_var): Use it.
10726 (create_real_tinfo_var): Likewise.
9c96f3f8 10727
55de1b66
JJ
107282001-02-03 Jakub Jelinek <jakub@redhat.com>
10729
10730 * decl.c (push_class_binding): Use context_for_name_lookup instead
10731 of CP_DECL_CONTEXT.
10732 * search.c (context_for_name_lookup): Remove static. Check for NULL
10733 context in the loop.
10734 * cp-tree.h (context_for_name_lookup): Add prototype.
10735
e92730aa
JJ
107362001-02-02 Jakub Jelinek <jakub@redhat.com>
10737
10738 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10739 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10740 Remove.
10741 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10742 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10743
049f6ec9
MM
107442001-02-02 Mark Mitchell <mark@codesourcery.com>
10745
10746 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10747 of macros used when compiling g++spec.c.
10748 * g++spec.c (lang_specific_driver): Link with the shared
10749 libgcc by default.
10750
718b8ea5
JM
107512001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
10752
10753 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10754 make_reference_declarator, make_call_declarator), method.c
10755 (implicitly_declare_fn), parse.y (namespace_using_decl,
10756 notype_unqualified_id, expr_or_declarator, new_type_id,
10757 after_type_declarator, direct_after_type_declarator,
10758 notype_declarator, complex_notype_declarator,
10759 complex_direct_notype_declarator, qualified_id,
10760 notype_qualified_id, overqualified_id, direct_new_declarator,
10761 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10762 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10763 instead of build_parse_node.
10764
f2d1f0ba
KG
107652001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10766
10767 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10768 (minus_one_node): Moved to top level gcc directory. Renamed
10769 to integer_minus_one_node.
10770
10771 * init.c (init_init_processing): Don't set minus_one_node.
10772 (build_vec_init): Use integer_minus_one_node.
10773
10774 * rtti.c (get_tinfo_decl_dynamic): Likewise.
10775
6001735e
JJ
107762001-01-28 Jakub Jelinek <jakub@redhat.com>
10777
10778 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10779 identical and they would be replaced with constant, remove
10780 MODIFY_EXPR from the tree.
10781
c913b6f1
KG
107822001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10783
10784 * Make-lang.in: Remove all dependencies on defaults.h.
10785 * call.c: Don't include defaults.h.
10786 * decl.c: Likewise.
10787 * decl2.c: Likewise.
10788 * except.c: Likewise.
10789 * pt.c: Likewise.
10790 * rtti.c: Likewise.
10791 * tree.c: Likewise.
10792 * typeck.c: Likewise.
10793
324ffb8c
JJ
107942001-01-25 Jakub Jelinek <jakub@redhat.com>
10795
10796 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10797 operators even in "C" linkage.
10798 * method.c (set_mangled_name_for_decl): Likewise.
10799 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10800 overloaded operators in "C" linkage.
10801
4b2811e9
NS
108022001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10803
10804 * pt.c (tsubst_decl): Remove IN_DECL parameter.
10805 (tsubst_arg_types): Check parameter is not void.
10806 (tsubst): Adjust tsubst_decl call.
10807
d8caf48e
NS
108082001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10809
10810 * call.c (add_builtin_candidate): Quote std properly, from
10811 previous change.
10812
08511114
KL
108132001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10814
10815 * pt.c (check_explicit_specialization): Clone constructors and
10816 destructors.
10817
92ecdfb7
NS
108182001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10819
10820 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10821 indicates anything special about template depth. Make sure we
10822 only count the user visible template classes.
10823
4cff6abe
NS
108242001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10825
10826 * call.c (build_conv): Typo in comment.
10827 (add_builtin_candidate): Add more explanation.
10828 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10829 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10830 when we have enumeral types.
10831 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10832 candidates for relops and eqops.
10833 (joust): Simplify control flow. Allow a non-template user
10834 function to hide a builtin.
10835
62e4a758
NS
108362001-01-22 Nathan Sidwell <nathan@codesourcery.com>
10837
10838 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10839 (more_specialized): Add deduction parameter.
10840 * call.c (joust): Adjust more_specialized call.
10841 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10842 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10843 (get_bindings_order): Remove.
10844 (get_bindings_real): Add DEDUCE parameter.
10845 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10846 REFERENCE_TYPE jig for DEDUCE_ORDER.
10847 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10848 maybe_adjust_types_for_deduction.
10849 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10850 directly.
10851 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10852 (check_cv_quals_for_unify): Use new unify qualifier flags.
10853 (unify): Clear new unify qualifier flags.
10854 (get_bindings_real): Add DEDUCE parameter.
10855 (get_bindings): Adjust call to get_bindings_real.
10856 (get_bindings_overload): Likewise.
10857 (most_specialized_instantiation): Adjust call to
10858 more_specialized.
10859
2a2a9e5a
JM
108602001-01-19 Jason Merrill <jason@redhat.com>
10861
10862 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10863
10864 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10865 -fnew-abi.
10866
60696c53
JM
108672001-01-19 Ute Pelkmann <scope.muc@t-online.de>
10868
10869 * decl2.c (arg_assoc_class): Fix double iteration logic.
10870
108712001-01-19 Jason Merrill <jason@redhat.com>
10872
10873 * init.c (build_delete): Always call convert_force to strip cv-quals.
10874
10875 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10876 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10877 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10878
1e00f18c
NS
108792001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10880
10881 * search.c (get_vbase_1): Count only virtual bases.
10882
e13bced2
NS
108832001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10884
10885 * class.c (duplicate_tag_error): Robustify flag clearing.
10886
f9c244b8
NS
108872001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10888
10889 * cp-tree.h (lookup_template_class): Add complain parm.
10890 * decl.c (lookup_namespace_name): Adjust call to
10891 lookup_template_class.
10892 (make_typename_type): Likewise.
10893 * semantics.c (finish_template_type): Likewise.
10894 * pt.c (lookup_template_class): Add complain parm. Adjust.
10895 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10896 (tsubst): Likewise.
10897
08c2df0f
NS
108982001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10899
10900 * pt.c (copy_default_args_to_explicit_spec): Preserve
10901 object's CV quals. Reorganize.
10902
f5ceeec8
NS
109032001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10904
10905 * typeck.c (build_modify_expr): Say `initialization' for
10906 INIT_EXPRs.
10907 * init.c (build_default_init): Convert to enumeral type, if
10908 needed.
10909
a1cfa434
JJ
109102001-01-18 Jakub Jelinek <jakub@redhat.com>
10911
10912 * parse.y (nomods_initdcl0): Properly set things up for
10913 initdcl0_innards.
10914
028d1f20
NS
109152001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10916
10917 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10918 (type_unification_real): Set it.
10919 (unify): Use it.
10920
9f724b6a
NS
109212001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10922
10923 * decl.c (finish_destructor_body): Convert to vbase pointer here.
10924
522d6614
NS
109252001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10926
10927 * semantics.c (begin_class_definition): Check we're not inside a
10928 template parm list.
10929
7f805b8f
NS
109302001-01-18 Nathan Sidwell <nathan@codesourcery.com>
10931
10932 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10933 BASELINK_P.
10934
dc3799c1
KL
109352001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10936
10937 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10938 * call.c (build_over_call): Add comment.
10939
bb37c4a5
DB
109402001-01-16 Daniel Berlin <dberlin@redhat.com>
10941
826840d9
RH
10942 * cvt.c (ocp_convert): Handle vector type conversion
10943 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 10944
a26e7fb5
PE
109452001-01-16 Phil Edwards <pme@sources.redhat.com>
10946
10947 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
10948 was given.
10949
11b810f1
NS
109502001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10951
10952 * pt.c (check_nontype_parm): Rename to ...
10953 (invalid_nontype_parm_type_p): ... here.
10954 (process_template_parm): Adjust.
10955 (convert_template_argument): Adjust.
10956
db3f4e4e
NS
109572001-01-15 Nathan Sidwell <nathan@codesourcery.com>
10958
10959 * pt.c (check_nontype_parm): New function.
10960 (process_template_parm): Use it.
10961 (convert_template_argument): Use it.
10962 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10963 member.
10964
ea4f1fce
JO
109652001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
10966
10967 * tree.c: Add defaults.h
10968 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10969 * Make-lang.in (cp/tree.o): Add defaults.h.
10970
1312c143
JM
109712001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10972
10973 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10974
4bc1997b
JM
109752001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10976
10977 * g++.1: Change to be ".so man1/gcc.1".
10978
23de1fbf
JM
109792001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
10980
10981 * Make-lang.in (c++.info, c++.install-info): Build and install g++
10982 internals info.
10983 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10984 ($(srcdir)/cp/g++int.info): New target.
10985 * gxxint.texi: Add info directory entry. Use @@ in email address.
10986 * .cvsignore: Update.
10987
0949f723
NS
109882001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10989
10990 * typeck.c (build_c_cast): Do template processing earlier.
10991 Always pedwarn on array casts.
10992
a8641661
NS
109932001-01-12 Nathan Sidwell <nathan@codesourcery.com>
10994
10995 * friend.c (make_friend_class): Make sure a templated class is
10996 actually a template.
10997
844511c8
NS
109982001-01-11 Nathan Sidwell <nathan@codesourcery.com>
10999
11000 * decl2.c (get_guard): Set linkage from guarded decl.
11001
96a1e32d
NS
110022001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11003
11004 * call.c (convert_default_arg): Check for unprocessed
11005 DEFAULT_ARG.
11006 * cp-tree.h (replace_defarg): Move to spew.c.
11007 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11008 spew.c, which is where they really are.
11009 (done_pending_defargs): Declare.
11010 (unprocessed_defarg_fn): Declare.
11011 * decl.c (replace_defarg): Move to spew.c
11012 * parse.y (structsp): Call done_pending_defargs.
11013 * spew.c (defarg_fns): Rearrange list structure.
11014 (defarg_fnsdone): New static variable.
11015 (defarg_depfns): New static variable.
11016 (init_spew): Adjust.
11017 (add_defarg_fn): Store the type in TREE_TYPE.
11018 (do_pending_defargs): Detect and deal with ordering constraints
11019 and circularity.
11020 (done_pending_defargs): New function.
11021 (unprocessed_defarg_fn): New function.
11022 (replace_defarg): Moved from decl.c. Robustify. Don't save
11023 if circularity detected.
11024
34e225a3
NS
110252001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11026
11027 * pt.c (unify): Check array has a domain, before checking
11028 whether it is variable sized.
11029
98979fe0
NS
110302001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11031
11032 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11033 parameters with pointers to arrays of unknown bound.
11034
b37bf5bd
NS
110352001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11036
11037 * parse.y (template_parm_header, template_spec_header): New
11038 reductions. Split out from ...
11039 (template_header): ... here. Use them.
11040 (template_template_parm): Use template_parm_header.
11041 * semantics.c (finish_template_template_parm): Add assert.
11042
6c418184
MM
110432001-01-10 Mark Mitchell <mark@codesourcery.com>
11044
792508b5
MM
11045 * mangle.c (write_builtin_type): Fix thinko.
11046
8afa707f
MM
11047 * pt.c (copy_default_args_to_explicit_spec_1): New function.
11048 (copy_default_args_to_explicit_spec): Likewise.
11049 (check_explicit_specialization): Use it.
11050
6c418184
MM
11051 * class.c (finish_struct_1): Remove last argument in call to
11052 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11053 * decl.c (builtin_function): Likewise.
11054 (build_cp_library_fn): Likewise.
11055 (check_initializer): Likewise.
11056 (make_rtl_for_nonlocal_decl): Likewise.
11057 (cp_finish_decl): Likewise.
11058 (start_function): Likewise.
11059 * decl2.c (finish_anon_union): Likewise.
11060 * friend.c (do_friend): Likewise.
11061 * init.c (build_java_class_ref): Likewise.
11062 * method.c (make_thunk): Likewise.
11063 * pt.c (tsubst_friend_function): Likewise.
11064 * semantics.c (expand_body): Likewise.
11065
31d95fc6
MM
110662001-01-10 Mark Mitchell <mark@codesourcery.com>
11067
11068 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11069 looking at DECL_CLONED_FUNCTION for non-functions.
11070
31bb3027
NS
110712001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11072
11073 * error.c (dump_template_parameter): Use parm to determine how
11074 to print default value.
11075
fd3f43e7
NS
110762001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11077
11078 * class.c (duplicate_tag_error): Clear more flags.
11079
042b4c4e
NS
110802001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11081
11082 * call.c (build_new_method_call): Use binfo_for_vbase.
11083
a7537031
JM
110842001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
11085
11086 * cp-tree.h (flag_cond_mismatch): Don't declare.
11087 * decl2.c (flag_cond_mismatch): Don't define.
11088 (lang_f_options): Remove cond-mismatch.
11089 (unsupported_options): Add cond-mismatch.
11090
186c0fbe
NS
110912001-01-09 Nathan Sidwell <nathan@codesourcery.com>
11092
11093 * class.c (handle_using_decl): Reject using of constructor name
11094 of sourcing class. Allow injecting of a method with same name as
11095 nested class. Fixup error messages.
11096
28ec8d6b
JM
110972001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
11098
11099 * decl2.c (lang_decode_option): Handle -Wformat=2.
11100
3febd123
NS
111012001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11102
11103 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11104 initialized_in_class.
11105 (DECL_DEFINED_IN_CLASS_P): Rename to ...
11106 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11107 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11108 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11109 * pt.c (check_default_tmpl_args): Adjust for
11110 DECL_INITIALIZED_IN_CLASS_P.
11111 (instantiate_class_template): Likewise.
11112 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 11113
3febd123
NS
11114 * class.c (finish_struct): Constify saved_filename.
11115
1f0d71c5
NS
111162001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11117
11118 * class.c (duplicate_tag_error): Adjust diagnostic.
11119 (finish_struct): Locally set location to start of struct.
11120 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11121
5bf15e84 111222001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
11123
11124 * decl.c (struct binding_level): Adjust class_shadowed comments
11125 to reflect reality.
aba649ba 11126 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
11127 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11128 Don't set TREE_VALUE on the class_shadowed list.
11129
23d4e4cc 111302001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
11131
11132 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
11133 * init.c (build_java_class_ref): When using the new ABI, search
11134 `class$' and have it mangled with `mangle_decl.'
11135 * mangle.c (write_java_integer_type_codes): New function.
11136 (write_builtin_type): Detect and mangle Java integer and real
11137 types.
9c96f3f8 11138
0c58da3e
MM
111392001-01-07 Mark Mitchell <mark@codesourcery.com>
11140
11141 * decl2.c (grokfield): Don't accept `asm' specifiers for
11142 non-static data members.
11143
45b8ddb4
KG
111442001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11145
11146 * expr.c (cplus_expand_expr): Don't reset `target'.
11147
96302433
NB
111482001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
11149
826840d9 11150 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 11151
220bce48
NS
111522001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11153
11154 * parse.y (template_datadef): Check for error_mark_node.
11155
bfa2cb33
NS
111562001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11157
11158 * cp-tree.def (DEFAULT_ARG): Make `x' class.
11159
eaa7c03f
JM
111602001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
11161
11162 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11163 (record_builtin_type): Make non-static.
11164 (flag_short_double): Don't declare.
11165 (init_decl_processing): Remove the creation of many tree nodes now
11166 in c_common_nodes_and_builtins.
11167 (build_void_list_node): New function.
11168 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11169 * cp-tree.h (flag_short_wchar): Don't declare.
11170
3af4c257
MM
111712001-01-04 Mark Mitchell <mark@codesourcery.com>
11172
11173 * call.c (build_conv): Don't use build1 for USER_CONV.
11174 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11175
03dc0325
JM
111762001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
11177
11178 * lex.c (lang_init): Call c_common_lang_init.
11179
3c505507
NS
111802001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11181
11182 * search.c (lookup_fnfields_here): Remove.
11183 (look_for_overrides_r): Use lookup_fnfields_1.
11184 Ignore functions from using declarations.
11185
03378143
NS
111862001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11187
11188 Implement exceptions specifiers for implicit member functions.
11189 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11190 * method.c (synthesize_exception_spec): New function.
11191 (locate_dtor, locate_ctor, locate_copy): New functions.
11192 (implicitly_declare_fn): Generate the exception spec too.
11193 * search.c (check_final_overrider): Check artificial functions
11194 too.
9c96f3f8 11195 * typeck2.c (merge_exception_specifiers): New function.
03378143 11196
f30efcb7
JM
111972001-01-03 Jason Merrill <jason@redhat.com>
11198
11199 * init.c (build_default_init): New fn.
11200 (perform_member_init): Split out from here.
11201 (build_new_1): Use it. Simplify initialization logic.
11202 (build_vec_init): Take an array, rather than a pointer and maxindex.
11203 Speed up simple initializations. Don't clean up if we're assigning.
11204 * cp-tree.h: Adjust.
11205 * decl2.c (do_static_initialization): Remove TREE_VEC case.
11206 * parse.y (new_initializer): Return void_zero_node for ().
11207 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11208 * typeck2.c (digest_init): Only complain about user-written
11209 CONSTRUCTORs.
11210
a412bf75
MS
112112000-12-22 Mike Stump <mrs@wrs.com>
11212
11213 * decl2.c: (max_tinst_depth): Increase to 50.
11214
4890c2f4
MM
112152001-01-02 Mark Mitchell <mark@codesourcery.com>
11216
11217 * class.c (invalidate_class_lookup_cache): Zero the
11218 previous_class_values.
11219 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11220 TREE_INT_CST_HIGH.
11221 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11222 * decl.c (free_bindings): New variable.
11223 (push_binding): Don't create a new binding if we have one on the
11224 free list.
11225 (pop_binding): Put old bindings on the free list.
11226 (init_decl_processing): Use size_int, not build_int_2.
11227 Register free_bindings as a GC root.
11228 (cp_make_fname_decl): Use size_int, not build_int_2.
11229 (push_inline_template_parms_recursive): Likewise.
11230 (end_template_parm_list): Likewise.
688f6688 11231 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
11232 (tsubst_template_parms): Use size_int, not build_int_2.
11233 (tsubst): Likewise.
11234 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 11235
4f78b9a8
RH
112362001-01-02 Richard Henderson <rth@redhat.com>
11237
11238 * parse.y (asm): Set ASM_INPUT_P.
11239
3c8c2a0a
JM
112402001-01-02 Jason Merrill <jason@redhat.com>
11241
96d6c610
JM
11242 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11243 for v3 ABI.
11244
11245 * typeck.c (cp_truthvalue_conversion): New fn.
11246 * cvt.c (ocp_convert): Use it.
11247
11248 * cp-tree.h: Lose c-common.c decls.
11249
11250 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11251 * cvt.c (convert_to_void): Use type_unknown_p.
11252
9c96f3f8 11253 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
11254 pointer-to-member types.
11255
11256 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
11257 parse.y as C.
11258
11259 * call.c (build_new_method_call): Do evaluate the object parameter
11260 when accessing a static member.
11261 * typeck.c (build_component_ref): Likewise.
11262
d363e7bf
AJ
112632001-01-02 Andreas Jaeger <aj@suse.de>
11264
11265 * decl.c (cp_missing_noreturn_ok_p): New.
11266 (init_decl_processing): Set lang_missing_noreturn_ok_p.
11267
77f5250d
JJ
112682000-12-29 Jakub Jelinek <jakub@redhat.com>
11269
11270 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11271
31a714f6
MM
112722000-12-29 Mark Mitchell <mark@codesourcery.com>
11273
11274 * class.c (pushclass): Remove #if 0'd code.
11275 * cp-tree.h (overload_template_name): Remove.
11276 * decl.c (store_bindings): Simplify.
11277 (pop_from_top_level): Likewise.
11278 * pt.c (overload_template_name): Remove.
d363e7bf 11279 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
11280 needed.
11281
414ea4aa
MM
112822000-12-28 Mark Mitchell <mark@codesourcery.com>
11283
11284 * pt.c (register_local_specialization): Don't return a value.
11285 (lookup_template_class): Use move-to-front heuristic when looking
11286 up template instantiations.
11287 (instantiate_decl): Only push_to_top_level when we're actually
11288 going to instantiate the template.
11289
6f18f7e9
HPN
112902000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
11291
11292 * search.c (binfo_for_vtable): Return least derived class, not
11293 most. Handle secondary vtables.
11294
e5214479
JM
112952000-12-22 Jason Merrill <jason@redhat.com>
11296
3c8c2a0a
JM
11297 * pt.c (more_specialized): Don't optimize len==0.
11298 (fn_type_unification): If we're adding the return type, increase len.
11299
ebb1abc3
JM
11300 * typeck.c (build_binary_op): Fix pmf comparison logic.
11301
c939ca5f
JM
11302 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11303 DECL_STATIC_FUNCTION_P.
11304
e6fe680d
JM
11305 * semantics.c (genrtl_finish_function): Don't try to jump to
11306 return_label unless it exists.
11307
e5214479
JM
11308 In partial ordering for a call, ignore parms for which we don't have
11309 a real argument.
11310 * call.c (joust): Pass len to more_specialized.
11311 (add_template_candidate_real): Strip 'this', pass len.
11312 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
11313 (get_bindings_order): New fn. Pass len down.
11314 (get_bindings_real): Strip 'this', pass len.
11315 (fn_type_unification): Likewise.
11316 (type_unification_real): Succeed after checking 'len' args.
11317 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 11318 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
11319 pass len.
11320
113212000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
11322
11323 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11324 DECL_TEMPLATE_RESULT.
11325
11326 * search.c (lookup_field_r): Call lookup_fnfields_1, not
11327 lookup_fnfields_here.
11328
11329 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11330
11331 * call.c (build_object_call): Also allow conversions that return
11332 reference to pointer to function.
11333 (add_conv_candidate): Handle totype being ref to ptr to fn.
11334 (build_field_call): Also allow members of type reference to function.
11335 Lose support for calling pointer to METHOD_TYPE fields.
11336
11337 * error.c (dump_expr): Handle *_CAST_EXPR.
11338
11339 * typeck2.c (build_scoped_ref): Always convert to the naming class.
11340
11341 * tree.c (break_out_cleanups): Lose.
11342 * cp-tree.h: Remove prototype.
11343 * typeck.c (build_component_ref): Don't break_out_cleanups.
11344 (build_compound_expr): Likewise.
11345 * semantics.c (finish_expr_stmt): Likewise.
11346
3e4d04a1
RH
113472000-12-20 Richard Henderson <rth@redhat.com>
11348
11349 * cp-tree.h: Update declarations.
11350 * decl.c (finish_case_label): Return the new stmt node.
11351 * semantics.c (finish_goto_stmt): Likewise.
11352 (finish_expr_stmt, finish_return_stmt): Likewise.
11353 (finish_break_stmt, finish_continue_stmt): Likewise.
11354 (finish_asm_stmt): Likewise.
11355 * parse.y (already_scoped_stmt): Set STMT_LINENO.
11356 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11357 (simple_if, simple_stmt): Return the new stmt node.
11358 (save_lineno): New.
11359
20d380b1
JM
113602000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11361
11362 * cp-tree.h: Don't declare warn_long_long.
11363
221c7a7f
KL
113642000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11365
11366 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11367 IS_AGGR_TYPE.
11368
b429fdf0
KL
113692000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11370
11371 * pt.c (unify): Handle when both ARG and PARM are
11372 BOUND_TEMPLATE_TEMPLATE_PARM.
11373
c2beae77
KL
113742000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11375
11376 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11377 DECL_TEMPLATE_PARM_P.
11378
c3e899c1
JM
113792000-12-15 Jason Merrill <jason@redhat.com>
11380
96790071
JM
11381 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
11382
8d42565b
JM
11383 * init.c (build_new_1): Don't strip quals from type.
11384
fab09a24
JM
11385 * decl.c (pushdecl): Don't check for linkage on a non-decl.
11386
c3e899c1
JM
11387 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11388
11389 * call.c (build_new_function_call): Lose space before paren in
11390 error message.
11391 (build_new_method_call): Likewise.
11392
11393 * typeck2.c (build_m_component_ref): Propagate quals from datum.
11394
edac124d
KL
113952000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11396
11397 * pt.c (check_explicit_specialization): Propagate default
11398 function arguments to explicit specializations.
11399
31750649 114002000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
11401
11402 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11403 and <? operators.
11404
5e818b93
JM
114052000-12-08 Jason Merrill <jason@redhat.com>
11406
11407 * error.c (dump_function_name): Don't let the user see __comp_ctor.
11408
11409 Clean up copy-initialization in overloading code.
11410 * call.c (build_user_type_conversion_1): Die if we are asked to
11411 convert to the same or a base type.
11412 (implicit_conversion): Avoid doing so. Lose reference binding code.
11413 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11414 direct-initialization. Also do direct-init part of copy-init.
11415 (build_user_type_conversion): Don't provide context to convert_like.
11416 * cvt.c (ocp_convert): build_user_type_conversion will now provide
11417 the constructor call for copy-init.
11418
11419 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11420 instantiation of a member template.
11421 (do_decl_instantiation): Not here.
11422
38da6039
NS
114232000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11424
11425 * class.c (check_field_decls): Don't special case anonymous
11426 fields in error messages.
c9407e4c 11427 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 11428
38da6039
NS
11429 * tree.c (pod_type_p): Use strip_array_types.
11430 (cp_valid_lang_attribute): Likewise.
11431 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11432 multiple evaluations.
d363e7bf 11433 (cp_has_mutable_p): Use strip_array_types.
38da6039 11434
a11d04b5
NS
114352000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11436
11437 * cp-tree.h (sufficient_parms_p): Declare new function.
11438 * call.c (sufficient_parms_p): New function, broken out of ...
11439 (add_function_candidate): ... here. Use it.
11440 (add_conv_candidate): Use it.
11441 * decl.c (grok_ctor_properties): Use it.
11442
5eec2847
JJ
114432000-12-07 Jakub Jelinek <jakub@redhat.com>
11444
11445 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11446
c907e684
JM
114472000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
11448
11449 * decl2.c (lang_decode_option): Handle -Wformat-security.
11450
74601d7c
KL
114512000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11452
11453 * pt.c (verify_class_unification): New function.
11454 (get_class_bindings): Use it.
11455 (try_class_unification): Tidy.
11456 (unify): Handle when argument of a template-id is not
11457 template parameter dependent.
11458 (template_args_equal): Handle when TREE_CODE's do not match.
11459
8954e858
AO
114602000-12-06 Alexandre Oliva <aoliva@redhat.com>
11461
11462 * lang-specs.h (c++): When invoking the stand-alone preprocessor
11463 for -save-temps, pass all relevant -Defines to it, and then don't
11464 pass them to cc1plus.
11465
3dc9aec6
WC
114662000-12-05 Will Cohen <wcohen@redhat.com>
11467
11468 * decl.c (finish_case_label): Cleared
11469 more_cleanups_ok in surrounding function scopes.
11470 (define_label): Likewise.
11471
cbb40945
NS
114722000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11473
11474 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11475 (get_matching_virtual): Remove.
11476 (look_for_overrides): Declare new function.
11477 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11478 DECL_VINDEX here.
11479 * class.c (check_for_override): Move base class iteration code
11480 to look_for_overrides.
11481 * search.c (next_baselink): Remove.
11482 (get_virtuals_named_this): Remove.
11483 (get_virtual_destructor): Remove.
11484 (tree_has_any_destructors_p): Remove.
11485 (struct gvnt_info): Remove.
11486 (check_final_overrider): Remove `virtual' from error messages.
11487 (get_matching_virtuals): Remove. Move functionality to ...
11488 (look_for_overrides): ... here, and ...
11489 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11490 to be overriding.
11491
61402b80
NS
114922000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11493
11494 * typeck.c (get_delta_difference): If via a virtual base,
11495 return zero.
11496 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11497 adjustment.
11498
39abc9a6
RH
114992000-12-04 Richard Henderson <rth@redhat.com>
11500
11501 * error.c (dump_tree): Use output_add_string not OB_PUTS.
11502
c00996a3
JM
115032000-12-04 Jason Merrill <jason@redhat.com>
11504
11505 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 11506 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
11507 type_for_mode.
11508 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11509 Pass intSI_type_node and the like through type_for_mode.
11510 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11511 * pt.c (tsubst, unify): Likewise.
11512 * tree.c (walk_tree): Likewise.
11513 * error.c (dump_type): Likewise.
11514 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 11515
c00996a3
JM
11516 * Make-lang.in: Tweak top comment for emacs.
11517 (cp/TAGS): Restore.
11518
11519 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11520
c00996a3
JM
11521 * class.c (clone_function_decl): Robustify.
11522
115232000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
11524
11525 * decl.c (store_bindings): Only search in the non modified
11526 old_bindings for duplicates.
11527
00bb3dad
NS
115282000-12-04 Nathan Sidwell <nathan@codesourcery.com>
11529
11530 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11531 TYPE_POLYMORPHIC_P.
d363e7bf 11532
00bb3dad
NS
11533 * typeck.c (build_static_cast): Remove unused variable.
11534
dc957d14
KL
115352000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11536
11537 * pt.c: Fix typo in comment.
11538
4d808927
JM
115392000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11540
11541 * decl2.c (warn_format): Remove definition.
11542 (lang_decode_option): Handle -Wformat-nonliteral,
11543 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
11544
5fd8e536
JM
115452000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11546
11547 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11548 (init_decl_processing): Don't create string_type_node,
11549 const_string_type_node, wint_type_node, intmax_type_node,
11550 uintmax_type_node, default_function_type, ptrdiff_type_node and
11551 unsigned_ptrdiff_type_node. Adjust position of call to
11552 c_common_nodes_and_builtins.
11553 (identifier_global_value): New function.
11554
13f9714b
NS
115552000-12-01 Nathan Sidwell <nathan@codesourcery.com>
11556
11557 * call.c (standard_conversion): Reject pointer to member
11558 conversions from ambiguous, inaccessible or virtual bases.
11559 * typeck.c (build_static_cast): Don't check pointers to members
11560 specially.
11561
31b1b957
NS
115622000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11563
11564 * method.c (do_build_copy_constructor): Preserve cv
11565 qualifications when accessing source object members.
11566 (do_build_assign_ref): Likewise. Remove separate diagnostics for
11567 unnamed fields.
11568
717e3f73
NS
115692000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11570
11571 * method.c (do_build_assign_ref): Construct appropriately
11572 CV-qualified base reference. Don't allow const casts in base
11573 conversion.
11574
2c92b94d
NS
115752000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11576
11577 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11578 incomplete return type.
11579
bb92901d
NS
115802000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11581
11582 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11583 * semantics.c (finish_base_specifier): Accept a _TYPE not a
11584 _DECL.
11585
2f3608c3
NS
115862000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11587
11588 * spew.c (yyerror): Cope if yylval.ttype is NULL.
11589
eeb75383
NS
115902000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11591
11592 * decl.c (grokdeclarator): Diagnose undefined template contexts.
11593
5ee4cc26
NS
115942000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11595
11596 * decl.c (grokdeclarator): Do type access control on friend
11597 class.
11598
76e57b45
NS
115992000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11600
11601 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11602 bison parser ickiness.
11603 * pt.c (tsubst_friend_function): Enter namespace scope when
11604 tsubsting the function name.
11605 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11606
f9825168
NS
116072000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11608
11609 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11610 * cvt.c (cp_convert_to_pointer): Add force parameter.
11611 Allow conversions via virtual base if forced.
11612 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11613 (ocp_convert): Likewise.
11614 * search.c (binfo_from_vbase): Return the virtual base's binfo.
11615 * typeck.c (get_delta_difference): Adjust handling of virtual
11616 bases.
11617
9ccb25d5
MM
116182000-11-26 Mark Mitchell <mark@codesourcery.com>
11619
11620 * tree.c (struct list_hash): Remove.
11621 (list_hash_table): Make it be an htab.
11622 (struct list_proxy): New type.
11623 (list_hash_eq): New function.
11624 (list_hash_pieces): Renamed from ...
11625 (list_hash): ... this.
11626 (list_hash_lookup): Remove.
11627 (list_hash_add): Remove.
11628 (hash_tree_cons): Use the generic hashtable.
11629 (mark_list_hash): Remove.
11630 (init_tree): Create the hashtable.
11631
9399bad3
JM
116322000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
11633
11634 * method.c (build_mangled_C9x_name): Rename to
11635 build_mangled_C99_name. Change C9X references in comments to
11636 refer to C99.
11637
2f401cc8
NS
116382000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11639
11640 * parse.y (unary_expr): Move VA_ARG from here ...
11641 (primary): ... to here.
11642
3d7e9ba4
NS
116432000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11644
11645 * semantics.c (finish_id_expr): If type is error_mark, return
11646 error_mark.
11647
ab097535
NS
116482000-11-23 Nathan Sidwell <nathan@codesourcery.com>
11649
11650 * pt.c (lookup_template_class): Simplify loop exit constructs.
11651 Cope when there is no partial instantiation of a template
11652 template member.
11653
d2a6f3c0 116542000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
11655
11656 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11657
cac78ea2
MM
116582000-11-22 Mark Mitchell <mark@codesourcery.com>
11659
6e1b44bc
MM
11660 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11661 prefix.
11662
cac78ea2
MM
11663 * pt.c (do_decl_instantiate): Explicitly clone constructors and
11664 destructors that haven't already been cloned.
11665
3aac38d7
RH
116662000-11-20 Richard Henderson <rth@redhat.com>
11667
11668 * parse.y (yyparse_1): Rename the parser entry point.
11669
116702000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
11671
11672 * mangle.c (write_name): Use <unscoped-name> for names directly in
11673 function scope.
11674 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 11675
447306fa
NS
116762000-11-20 Nathan Sidwell <nathan@codesourcery.com>
11677
11678 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11679 * parse.y (extdef): Add EXPORT reduction.
11680 * spew.c (yylex): Don't skip export here.
11681
2650255a
MM
116822000-11-19 Mark Mitchell <mark@codesourcery.com>
11683
11684 * decl.c (init_decl_processing): Correct name of pure virtual
11685 function under the new ABI.
11686 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11687 (throw_bad_typeid): Likewise for bad typeid function.
11688
0657c69c
MM
116892000-11-18 Mark Mitchell <mark@codesourcery.com>
11690
04f3dc2b
MM
11691 * decl.c (grokparms): Don't even function types of `void' type,
11692 either.
11693 * mangle.c (write_type): Don't crash when confronted with the
11694 error_mark_node.
11695
0657c69c
MM
11696 * decl.c (grokparms): Don't create parameters of `void' type.
11697
a8a05998
ZW
116982000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11699
11700 * lex.c (mark_impl_file_chain): Delete.
11701 (init_parse): Remove call to ggc_add_string_root. No need to
11702 ggc_strdup a string constant. Do not add impl_file_chain to GC
11703 roots.
11704 (handle_pragma_implementation): No need to ggc_strdup main_filename.
11705
35728a80
NS
117062000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11707
11708 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11709
5cce22b6
NS
117102000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11711
11712 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11713 * decl.c (grokdeclarator): Don't reject void parms here.
11714 (require_complete_types_for_parms): Simplify, use
11715 complete_type_or_else.
11716 (grokparms): Remove bitrot. Remove funcdef parm.
11717 Deal with ellipsis parm lists here.
11718 * semantics.c (finish_parmlist): Don't append void_list_node
11719 here. Set PARMLIST_ELLIPSIS_P.
11720
146c8d60
NS
117212000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11722
d30d6e7a 11723 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
11724 excessive diagnostics.
11725
520a57c8
ZW
117262000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11727
11728 * lex.c (struct impl_files, internal_filename): Constify a char *.
11729
43048a06
MM
117302000-11-16 Mark Mitchell <mark@codesourcery.com>
11731
11732 * mangle.c (write_special_name_constructor): Don't generate
11733 assembler junk when confronted with an old-style constructor.
11734 (write_special_name_destructor): Likewise.
11735 (mangle_decl_string): Do it here instead.
11736
cdb71673
NS
117372000-11-16 Nathan Sidwell <nathan@codesourcery.com>
11738
11739 * call.c (op_error): Make error messages clearer.
11740
62136084
MM
117412000-11-15 Mark Mitchell <mark@codesourcery.com>
11742
11743 * decl.c (wrapup_globals_for_namespace): Don't mark things
11744 TREE_ASM_WRITTEN when they're not.
11745
ee3400e8
JM
117462000-11-15 Jason Merrill <jason@redhat.com>
11747
11748 * typeck2.c (friendly_abort): Uncount the error before handing
11749 off to fancy_abort.
11750
71631a1f
NS
117512000-11-15 Nathan Sidwell <nathan@codesourcery.com>
11752
11753 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11754
79cda2d1
MM
117552000-11-14 Mark Mitchell <mark@codesourcery.com>
11756
11757 * class.c (build_vtbl_initializer): Fix typo in comment.
11758 * typeck.c (expr_sizeof): Don't crash on errors.
11759
2567bc56
JW
117602000-11-14 Jim Wilson <wilson@redhat.com>
11761
11762 * lang-specs.h: Add %2 after %(cc1_options).
11763
8422942c
RH
117642000-11-14 Richard Henderson <rth@redhat.com>
11765
11766 * typeck.c (c_sizeof): Be strict about casting result value
11767 back to c_size_type_node.
11768 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11769
19552aa5
JM
117702000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11771
11772 * typeck.c (build_unary_op): Use boolean_increment from
11773 c-common.c, moving the relevant code there.
11774
d96a6d1a
JM
117752000-11-11 Jason Merrill <jason@redhat.com>
11776
11777 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
11778
11779 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11780 in inlines.
11781
4e135bdd
KG
117822000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11783
11784 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11785 * lex.c (copy_lang_decl): Likewise.
11786
0a7394bc
MM
117872000-11-09 Mark Mitchell <mark@codesourcery.com>
11788
13507bd8
MM
11789 * dump.c (cp_dump_tree): Don't dump function bodies here.
11790
0a7394bc
MM
11791 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11792 (dump.o): Update dependency list.
11793 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11794 (flag_dump_translation_unit): Likewise.
11795 (CP_TYPE_QUALS): Adjust definition.
11796 (DECL_C_BIT_FIELD): Remove.
11797 (SET_DECL_C_BIT_FIELD): Likewise.
11798 (CLEAR_DECL_C_BIT_FIELD): Likewise.
11799 (add_maybe_template): Likewise.
11800 (strip_array_types): Likewise.
11801 (dump_node_to_file): Likewise.
11802 (cp_dump_tree): New function.
11803 * decl.c (init_decl_processing): Set lang_dump_tree.
11804 * decl2.c (flag_dump_translation_unit): Remove.
11805 * dump.c: Move most of it to ../c-dump.c.
11806 (cp_dump_tree): New function.
11807 * pt.c (add_maybe_template): Remove.
11808 * typeck.c (strip_array_types): Likewise.
a8a05998 11809
5362b086
EC
118102000-11-07 Eric Christopher <echristo@redhat.com>
11811
492cca24
JM
11812 * decl.c (init_decl_processing): Change definition of
11813 __wchar_t to wchar_t. Remove artificial declaration of
11814 wchar_t.
11815 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 11816
5361cbb7
NS
118172000-11-09 Nathan Sidwell <nathan@codesourcery.com>
11818
11819 * lex.c (do_identifier): Don't lookup_name for operators.
11820 * parse.y (operator): Save looking_for_typename.
11821 (unoperator): Restore it.
11822 * spew.c (frob_opname): Use nth_token for lookahead.
11823
36791f1e
NS
118242000-11-08 Nathan Sidwell <nathan@codesourcery.com>
11825
11826 * decl.c (grok_op_properties): Always use coerce_new_type and
11827 coerce_delete_type.
11828 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11829 exception specification. Tidy up.
11830 (coerce_delete_type): Preserve exception specification. Tidy up.
11831
961192e1
JM
118322000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11833
11834 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11835 (push_binding_level), error.c (cp_tree_printer), pt.c
11836 (process_partial_specialization, tsubst_template_arg_vector),
11837 search.c (lookup_member): Use memset () instead of bzero ().
11838
d48ebde1
NS
118392000-11-07 Nathan Sidwell <nathan@codesourcery.com>
11840
11841 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11842
436a88a6
JM
118432000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11844
11845 * Make-lang.in (c++.distdir): Remove.
11846
7a4e5091
MM
118472000-11-04 Mark Mitchell <mark@codesourcery.com>
11848
11849 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11850 declarations from different namespaces to be combined.
11851
0e9295cf
ZW
118522000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
11853
11854 * decl.c: Include tm_p.h.
11855
da61dec9
JM
118562000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
11857
11858 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11859
9473c522
JM
118602000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
11861
11862 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11863 (build_overload_value), repo.c (open_repo_file), xref.c
11864 (open_xref_file): Use strchr () and strrchr () instead of index ()
11865 and rindex ().
11866
b0b3afb2
BS
118672000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
11868
11869 * call.c (build_over_call): Call fold on the CALL_EXPR.
11870
faafaee6
GDR
118712000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
11872
11873 * error.c (dump_template_decl): Separate template hearders with
11874 space not comma.
11875
761f0855
GDR
118762000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
11877
11878 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
11879 TS_* flags with corresponding TFF_*. Adjust prototypes of
11880 functions (which used to take a tree_string_flags) to take an int.
11881
11882 * cp-tree.h (enum tree_string_flags): Remove
11883 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11884 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11885 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11886 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11887 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11888 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11889 (type_as_string, decl_as_string, expr_as_string,
11890 context_as_string): Adjust prototype.
11891
11892 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11893 instead of TS_PLAIN.
11894
11895 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11896 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11897 plain `0'.
11898
ad50e811
MM
118992000-10-30 Mark Mitchell <mark@codesourcery.com>
11900
11901 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11902 (linkage_kind): New enumeration.
11903 (decl_linkage): New function.
11904 * decl2.c (comdat_linkage): Extend comment.
11905 * error.c (dump_function_decl): Print the arguments used to
11906 instantiate a template, even when not printing the type of the
11907 function.
11908 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11909 not TREE_PUBLIC, to test for external linkage.
11910 * tree.c (decl_linkage): New function.
11911
930cd796
MM
119122000-10-28 Mark Mitchell <mark@codesourcery.com>
11913
11914 * pt.c (instantiate_decl): Always instantiate static data members
11915 initialized in-class.
11916
b8dad04b
ZW
119172000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11918
11919 * Make-lang.in: Move all build rules here from Makefile.in,
11920 adapt to new context. Wrap all rules that change the current
11921 directory in parentheses. Expunge all references to $(P).
11922 When one command depends on another and they're run all at
11923 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11924 all object-file generation rules. Delete obsolete variables.
11925
11926 * Makefile.in: Delete.
11927 * config-lang.in: Delete outputs= line.
11928
5f9cd837
GDR
119292000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
11930
11931 * error.c (dump_function_decl): Print no space between
11932 `ptr-operator' the `type-specifier' of the return type.
11933 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 11934 place.
5f9cd837 11935
6c6ed0ef
JM
119362000-10-23 Jason Merrill <jason@redhat.com>
11937
11938 * call.c (equal_functions): Also call decls_match for extern "C" fns.
11939
119402000-10-22 Jason Merrill <jason@redhat.com>
11941
11942 * call.c (build_conditional_expr): Use ocp_convert to force
11943 rvalue conversion.
11944
e36308b0
MM
119452000-10-22 Mark Mitchell <mark@codesourcery.com>
11946
583ca5a0
MM
11947 * call.c (standard_conversion): Use RVALUE_CONVs for all
11948 expressions that satisfy lvalue_p, not just those that satisfy
11949 real_lvalue_p.
11950
f9808f81
MM
11951 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11952
5362b086 11953 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
11954 not one with TYPE_IS_SIZETYPE set.
11955 (dubious_conversion_warnings): Remove special-case code.
11956
3b9ae6f0
GK
119572000-10-21 Geoffrey Keating <geoffk@cygnus.com>
11958
7a0f14e5
GK
11959 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11960 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11961 (dump_type_prefix): Print vector-of-int as 'int vector'.
11962 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11963 * tree.c (walk_tree): Handle VECTOR_TYPE.
11964
3b9ae6f0 11965 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 11966
aca77bd1
JM
119672000-10-21 Jason Merrill <jason@redhat.com>
11968
11969 * parse.y (operator): Set got_object from got_scope.
11970 Set looking_for_typename.
11971 * decl.c (lookup_name_real): Clear val after setting from_obj.
11972 Reorganize diagnostic.
11973
ba523395
JM
119742000-10-20 Jason Merrill <jason@redhat.com>
11975
11976 * tree.c (walk_tree): Don't walk into default args.
11977
11978 * error.c (dump_expr): Use host_integerp.
11979
2e44948d
DE
119802000-10-20 David Edelsohn <edelsohn@gnu.org>
11981
11982 * typeck2.c (abstract_virtuals_error): Use "because" instead of
11983 "since" in error message.
11984
d2a6f3c0 119852000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44475138
RK
11986
11987 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11988
11306230
JO
119892000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
11990
11991 * decl.c (revert_static_member_fn): Fixed typo.
11992
97ba1e3c
MM
119932000-10-19 Mark Mitchell <mark@codesourcery.com>
11994
c20118a8
MM
11995 * class.c (subobject_offset_fn): New type.
11996 (dfs_record_base_offsets): Remove.
11997 (record_base_offsets): Likewise.
11998 (dfs_search_base_offsets): Likewise.
11999 (record_subobject_offset): New function.
12000 (check_subobject_offset): Likewise.
12001 (walk_subobject_offsets): Likewise.
12002 (record_subobject_offsets): Likewise.
12003 (layout_conflict_p): Reimplement.
12004 (layout_nonempty_base_or_field): Correct handling of type
12005 conflicts during layout.
12006 (layout_empty_base): Likewise.
12007 (build_base_field): Adjust to handle new representation of empty
12008 base offset table.
12009 (build_base_fields): Likewise.
12010 (layout_virtual_bases): Likewise.
12011 (splay_tree_compare_integer_csts): New function.
12012 (layout_class_type): Use a splay_tree, rather than a varray, to
12013 represent the offsets of empty bases.
5362b086 12014
97ba1e3c
MM
12015 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12016 * decl.c (select_decl): Don't return declarations that are
12017 DECL_ANTICIPATED.
12018
6bcedb4e
MM
120192000-10-18 Mark Mitchell <mark@codesourcery.com>
12020
12021 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12022 (fake_std_node): New macro.
12023 * decl.c (in_std): Rename to ...
12024 (in_fake_std): ... this.
12025 (flag_no_builtin): Remove.
12026 (flag_no_nonansi_builtin): Likewise.
12027 (walk_namespaces_r): Use fake_std_node.
12028 (push_namespace): Use std_identifier.
12029 (pop_namespace): Use in_fake_std.
12030 (lookup_name_real): Use fake_std_node.
12031 (init_decl_processing): When -fhonor-std, create the `std'
12032 namespace. Don't create a dummy fake_std_node in that case.
12033 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
12034 (builtin_function): Put builtins whose names don't begin
12035 with `_' in the std namespace.
12036 * decl2.c (flag_no_builtin): Remove.
12037 (flag_no_nonansi_builtin): Likewise.
12038 (set_decl_namespace): Use fake_std_node.
12039 (validate_nonmember_using_decl): Likewise.
12040 (do_using_directive): Likewise.
12041 (handle_class_head): Likewise.
12042 * dump.c (dequeue_and_dump): Likewise.
12043 * except.c (init_exception_processing): Use std_identifier.
12044 * init.c (build_member_call): Use fake_std_node.
12045 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 12046
67673f5c
MM
120472000-10-17 Mark Mitchell <mark@codesourcery.com>
12048
12049 * cp-tree.h (back_end_hook): Remove declaration.
12050 * decl2.c (back_end_hook): Remove definition.
12051
12052 * dump.c (dequeue_and_dump): Dump TREE_USED.
12053
d2a6f3c0 120542000-10-17 Brad Lucier <lucier@math.purdue.edu>
8fef2e47
BL
12055
12056 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12057
652469d0
JM
120582000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12059
12060 * decl.c (WINT_TYPE): Define.
12061 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12062 c_size_type_node, signed_size_type_node and wint_type_node.
12063
74ff4629
JM
120642000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12065
12066 * decl2.c (warn_missing_format_attribute): New variable.
12067 (lang_decode_option): Decode -Wmissing-format-attribute.
12068
634790f4
MM
120692000-10-16 Mark Mitchell <mark@codesourcery.com>
12070
12071 * typeck.c (qualify_type): Remove.
12072 (composite_pointer_type): Fix handling of conversions to `cv void*'.
12073
bb12da9d
KG
120742000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12075
12076 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12077
4b945402
KG
120782000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12079
12080 * Makefile.in (parse.c, parse.h): Create atomically.
12081
1f8f4a0b
MM
120822000-10-12 Mark Mitchell <mark@codesourcery.com>
12083
12084 * class.c (current_obstack): Remove.
12085 * decl.c (ggc_p): Remove.
12086 (start_decl): Don't use decl_tree_cons.
12087 (grokdeclarator): Don't use build_decl_list.
12088 (start_function): Don't use decl_tree_cons.
12089 (finish_function): Don't mess with obstacks.
12090 * decl2.c (grok_x_components): Don't use build_decl_list.
12091 * lex.c (make_call_declarator): Don't call decl_tree_cons.
12092 (implicitly_declare_fn): Don't call build_decl_list.
12093 * parse.y (frob_specs): Don't call build_decl_list or
12094 decl_tree_cons.
12095 (expr_or_declarator_intern): Don't call decl_tree_cons.
12096 (primary): Don't call build_decl_list.
12097 (fcast_or_absdcl): Likewise.
12098 (typed_declspecs): Don't call decl_tree_cons.
12099 (reserved_declspecs): Don't call build_decl_list.
12100 (declmods): Likewise.
12101 (reserved_typespecquals): Likewise.
12102 (aggr): Likewise.
12103 (new_type_id): Likewise.
12104 (cv_qualifiers): Likewise.
12105 (after_type_declarator_intern): Likewise.
12106 (notype_declarator_intern): Likewise.
12107 (absdcl_intern): Likewise.
12108 (named_parm): Likewise.
12109 * pt.c (most_specialized_class): Likewise.
12110 * repo.c (temporary_obstack): Make it a structure, not a pointer.
12111 (init_repo): Initialize it.
12112 * search.c (current_obstack): Remove.
12113 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 12114
8dc54971
RH
121152000-10-09 Richard Henderson <rth@cygnus.com>
12116
12117 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12118 (c++ language support bits for libgcc): Remove.
12119 (c++.clean): Remove cplib2.txt cleanup.
12120 * config-lang.in (headers, lib2funcs): Remove.
12121
12122 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12123 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12124 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12125 * inc/new.h, inc/typeinfo: Remove files.
12126
b15ad712
JM
121272000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
12128
12129 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12130 defined.
12131 (init_decl_processing): Initialize intmax_type_node and
12132 uintmax_type_node.
12133
156ce211
RH
121342000-10-06 Richard Henderson <rth@cygnus.com>
12135
12136 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12137 (original_result_rtx): Remove.
12138 * decl.c (save_function_data): Don't clear x_result_rtx.
12139 (mark_lang_function): Don't mark it either.
12140 * expr.c (fixup_result_decl): Remove.
12141 * semantics.c (genrtl_named_return_value): Frob the return decl
12142 before calling emit_local_var.
12143 (genrtl_finish_function): Don't call fixup_result_decl.
12144 Always emit the jump to return_label.
12145
92777ce4
NS
121462000-10-06 Nathan Sidwell <nathan@codesourcery.com>
12147
12148 * pt.c (lookup_template_class): Set current access for enum.
12149 (tsubst_enum): Set file & line for enum decl.
5362b086 12150
92777ce4
NS
12151 * spew.c (yylex): Remove unused variable.
12152
63c16fc5
RH
121532000-10-05 Richard Henderson <rth@cygnus.com>
12154
12155 * semantics.c (genrtl_finish_function): Don't init or check
12156 can_reach_end; remove noreturn and return value checks.
12157
d1a458c4
TT
121582000-10-05 Tom Tromey <tromey@cygnus.com>
12159
12160 * init.c (build_java_class_ref): Use `build_static_name' with a
12161 suffix, not a prefix, to build the class object's name.
12162
509fc277
NS
121632000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12164
12165 * cp-tree.h (access_kind): Fix comment typo.
12166 * decl2.c (grokfield): Fix diagnostic typo.
12167 * semantics.c (finish_template_type): Fix comment typo.
12168 (finish_qualified_object_call_expr): Likewise.
12169
ce2e5191
NS
121702000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12171
12172 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 12173 tsubsting fails.
ce2e5191 12174
79cc5312
NS
121752000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12176
12177 * spew.c (frob_id): New static function.
12178 (frob_opname): Use it.
12179 (yylex): Use it.
12180
f15b9af9
MM
121812000-10-01 Mark Mitchell <mark@codesourcery.com>
12182
12183 * decl.c (lang_mark_false_label_stack): Remove.
12184 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 12185
28e6b1c2
JM
121862000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
12187
12188 * gxxint.texi: Use @email for formatting email addresses.
12189
99885b3f
GDR
121902000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
12191
12192 * error.c: Remove direct obstack manipulation. Replace with
12193 output_buffer-based formatting. Adjust calls to removed macros.
12194 (obstack_chunk_alloc, obstack_chunk_free): Remove.
12195 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12196 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12197
c06aa51e
MM
121982000-09-24 Mark Mitchell <mark@codesourcery.com>
12199
12200 * ir.texi: Move to ../c-tree.texi.
12201
99fada40
JM
122022000-09-20 Jason Merrill <jason@redhat.com>
12203
12204 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12205
bb20cc46
AJ
122062000-09-21 Andreas Jaeger <aj@suse.de>
12207
12208 * errfn.c: Move declaration of cp_printer and cp_printers to ...
12209 * cp-tree.h: ... here.
12210
12211 * error.c: Remove declaration of cp_printer.
12212
fab701da
MM
122132000-09-20 Mark Mitchell <mark@codesourcery.com>
12214
12215 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12216
0370fea1
HPN
122172000-09-20 Hans-Peter Nilsson <hp@axis.com>
12218
12219 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12220 users.
12221
78c120b5
MM
122222000-09-18 Mark Mitchell <mark@codesourcery.com>
12223
12224 * decl.c (start_function): Robustify.
12225
3f80e6ac
KG
122262000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12227
12228 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 12229
3f80e6ac
KG
12230 * call.c, typeck.c: Updates calls to `check_function_format'.
12231
fc928afe
GK
122322000-09-17 Geoffrey Keating <geoffk@cygnus.com>
12233
12234 * decl2.c (handle_class_head): Always push some scope even
12235 in the error case.
12236
8f17b5c5
MM
122372000-09-16 Mark Mitchell <mark@codesourcery.com>
12238
12239 * cp-tree.h (struct cp_language_function): Remove
12240 x_scope_stmt_stack and name_declared.
12241 (current_scope_stmt_stack): Remove.
12242 (function_name_declared_p): New macro.
12243 (struct lang_decl_flags): Use c_lang_decl as a base class.
12244 (context): Remove.
12245 (struct lang_decl): Replace saved_tree with context.
12246 (DECL_FRIEND_CONTEXT): Adjust accordingly.
12247 (SET_DECL_FRIEND_CONTEXT): Likewise.
12248 (DECL_VIRTUAL_CONTEXT): Likewise.
12249 (DECL_SAVED_TREE): Remove.
12250 (C_DECLARED_LABEL_FLAG): Likewise.
12251 (cplus_expand_expr_stmt): Don't declare.
12252 (add_decl_stmt): Likewise.
12253 (add_scope_stmt): Likewise.
12254 * decl.c (mark_stmt_tree): Remove.
12255 (case_compare): Likewise.
12256 (finish_case_label): Use c_add_case_label.
12257 (init_decl_processing): Set more language-specific hooks.
12258 (build_enumerator): Fix typo in comment.
12259 (cplus_expand_expr_stmt): Remove.
12260 (mark_lang_function): Use mark_c_language_function.
12261 (lang_mark_tree): Use c_mark_lang_decl.
12262 * decl2.c: Change order of inclusion.
12263 * except.c: Likewise.
12264 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
12265 back on c_expand_expr.
12266 * friend.c: Include expr.h.
12267 * init.c: Change order of inclusion.
12268 * Makefile.in: Update dependencies.
12269 * lex.h (free_lang_decl_chain): Remove.
12270 * optimize.c (maybe_clone_body): Use function_name_declared_p.
12271 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12272 it doesn't exist.
12273 (instantiate_decl): Use function_name_declared_p.
12274 * semantics.c (lang_expand_expr_stmt): Remove.
12275 (set_current_function_name_declared): Likewise.
12276 (current_function_name_declared): Likewise.
12277 (begin_compound_stmt): Use function_name_declared_p.
12278 (add_decl_stmt): Remove.
12279 (setup_vtbl_ptr): Use function_name_declared_p.
12280 (add_scope_stmt): Remove.
12281 (current_scope_stmt_stack): New function.
12282 (cp_expand_stmt): Don't handle SCOPE_STMTs.
12283 (expand_body): Use function_name_declared_p.
12284 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12285 * typeck.c: Change order of includes.
12286 (convert_sequence): Remove.
bb20cc46 12287
d9dbd9b1
JM
122882000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
12289
12290 * lex.c (reswords): Add _Complex.
12291
d2a6f3c0 122922000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9985f210
RK
12293
12294 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12295
f903ebb1
DA
122962000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
12297
12298 * init.c (begin_init_stmts): Don't use // comments.
12299
f2ae0c45
JM
123002000-09-12 Jason Merrill <jason@redhat.com>
12301
12302 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12303 all non-extern arrays.
12304
12305 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12306 typenames, too. Downgrade complaint to pedwarn.
12307 (xref_tag): Warn about surprising behavior of 'friend struct T'.
12308 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12309 'class This::Inherited'.
12310
71ad4a16
MM
123112000-09-12 Mark Mitchell <mark@codesourcery.com>
12312
12313 * decl.c (finish_case_label): Given the LABEL_DECL a
12314 DECL_CONTEXT.
12315
c3e76028
GDR
123162000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
12317
12318 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12319 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12320 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12321 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12322 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12323 New macros.
12324 (sorry_for_unsupported_tree, print_scope_operator,
12325 print_left_paren, print_right_paren, print_left_bracket,
12326 print_right_bracket, print_whitespace): Likewise.
12327 (aggr_variety): Rename to class_key_or_enum.
12328 (print_type): Rename to print_type_id.
12329 (print_type_specifier_seq, print_simple_type_specifier,
12330 print_elaborated_type_specifier,
12331 print_rest_of_abstract_declarator,
12332 print_parameter_declaration_clause, print_exception_specification,
12333 print_nested_name_specifier, print_template_id,
12334 typedef_original_name, print_template_argument_list_start,
12335 print_template_argument_list_end): New functions.
12336
eb50138b
GDR
123372000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
12338
a8a05998 12339 * ir.texi: Add more documentation.
eb50138b 12340
f444e36b
MM
123412000-09-11 Mark Mitchell <mark@codesourcery.com>
12342
12343 * cp-tree.h (struct saved_scope): Remove x_function_parms.
12344 (current_function_parms): Don't define.
12345 (struct cp_language_function): Remove parms_stored.
12346 (current_function_just_assigned_this): Don't define.
12347 (current_function_parms_stored): Likewise.
12348 (static_ctors): Declare.
12349 (static_dtors): Likewise.
12350 (SF_EXPAND): Don't define.
12351 (expand_start_early_try_stmts): Remove declaration.
12352 (store_parm_decls): Likewise.
12353 * decl.c (static_ctors): Don't declare.
12354 (static_dtors): Likewise.
12355 (struct binding_level): Remove this_block.
12356 (poplevel): Remove dead code.
12357 (set_block): Likewise.
12358 (mark_binding_level): Don't mark this_block.
12359 (mark_saved_scope): Don't mark x_function_parms.
12360 (init_decl_processing): Don't add current_function_parms as a GC
12361 root.
12362 (check_function_type): Change prototype.
12363 (start_function): Remove RTL-generation code.
12364 (expand_start_early_try_stmts): Remove.
12365 (store_parm_decls): Give it internal linkage. Remove
12366 RTL-generation code.
12367 (finish_function): Remove RTL-generation code.
12368 * decl2.c (static_ctors): Fix formatting.
12369 (static_dtors): Likewise.
12370 * method.c (use_thunk): Don't call store_parm_decls.
12371 (synthesize_method): Likewise.
12372 * optimize.c (maybe_clone_body): Likewise.
12373 * parse.y (fn.def2): Likewise.
12374 (.set_base_init): Likewise.
12375 (nodecls): Likewise.
12376 * pt.c (instantiate_decl): Likewise.
12377 * rtti.c (synthesize_tinfo_fn): Likewise.
12378 * semantics.c (genrtl_try_block): Simplify.
12379 (expand_body): Use genrtl_start_function and
12380 genrtl_finish_function.
12381 (genrtl_start_function): New function.
12382 (genrtl_finish_function): Likewise.
12383
181d2ba0
NS
123842000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12385
12386 * error.c (cp_tree_printer, case 'P'): Append break.
12387
f2d71db6
NS
123882000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12389
12390 * cp-tree.h (frob_opname): Declare.
12391 * parse.y (saved_scopes): New static variable.
12392 (cp_parse_init): Adjust.
12393 (do_id): If lastiddecl is NULL, do do_identifier.
12394 (operator): Save scope information.
aca77bd1 12395 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
12396 (operator_name): Append unoperator. Call frob_opname.
12397 * spew.c (frob_opname): Define.
12398
d8ea8f28
ZW
123992000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12400
12401 * decl.c, rtti.c: Include defaults.h if not already included.
12402 Don't define the *_TYPE_SIZE macros.
12403
56cb9733
MM
124042000-09-09 Mark Mitchell <mark@codesourcery.com>
12405
12406 * cp-tree.h (push_switch): Change prototype.
12407 (check_cp_case_value): Remove declaration.
12408 (decl_constant_value): Likewise.
12409 * decl.c (struct cp_switch): Add switch_stmt and cases.
12410 (case_compare): New function.
12411 (push_switch): Set switch_stmt. Initialize cases.
12412 (pop_switch): Clean up cases.
12413 (define_case_label): Rename to ...
12414 (finish_case_label): ... this. Do semantic analysis for case
12415 labels here.
12416 (start_function): Correct comment.
12417 * decl2.c (check_cp_case_value): Remove.
12418 * expr.c (do_case): Remove.
12419 * pt.c (tsubst_expr): Adjust call to finish_case_label.
12420 * semantics.c (genrtl_do_poplevel): Remove declaration.
12421 (RECHAIN_STMTS): Remove.
12422 (finish_break_stmt): Use build_break_stmt.
12423 (finish_continue_stmt): Use build_continue_stmt.
12424 (finish_switch_cond): Adjust condition here, rater than in
12425 c_expand_start_case.
12426 (finish_case_label): Remove.
12427 * typeck.c (c_expand_return): Remove.
12428 (c_expand_start_case): Likewise.
bb20cc46 12429
990a9693
GDR
124302000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
12431
12432 * ir.texi: Document type nodes.
12433
ae499cce
MM
124342000-09-06 Mark Mitchell <mark@codesourcery.com>
12435
54f7877c
MM
12436 * cp-tree.h (init_cp_semantics): Declare.
12437 (genrtl_try_block): Don't declare.
12438 (genrtl_handler): Likewise.
12439 (genrtl_catch_block): Likewise.
12440 (genrtl_ctor_stmt): Likewise.
12441 (genrtl_subobject): Likewise.
12442 (genrtl_do_poplevel): Likewise.
12443 (genrtl_named_return_value): Likewise.
12444 * lex.c (init_parse): Call init_cp_semantics.
12445 * semantics.c (genrtl_try_block): Give it internal linkage.
12446 (genrtl_handler): Likewise.
12447 (genrtl_catch_block): Likewise.
12448 (genrtl_ctor_stmt): Likewise.
12449 (genrtl_subobject): Likewise.
12450 (genrtl_do_poplevel): Likewise.
12451 (genrtl_named_return_value): Likewise.
12452 (lang_expand_stmt): Rename to ...
12453 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
12454 (init_cp_semantics): Define.
12455
3a0d3e1e
MM
12456 * decl.c (initialize_local_var): Remove RTL-generating code.
12457 * semantics.c (genrtl_try_block): Fix formatting.
12458
ae499cce
MM
12459 Move statement-tree facilities from C++ to C front-end.
12460 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12461 (void_zero_node): Remove.
12462 (stmt_tree): Likewise.
12463 (scope_chain): Adjust.
12464 (language_function): Rename to cp_language_function.
12465 (cp_function_chain): Adjust.
12466 (current_stmt_tree): Remove.
12467 (last_tree): Likewise.
12468 (last_expr_type): Likewise.
12469 (struct lang_decl): Adjust.
12470 (STMT_IS_FULL_EXPR_P): Remove.
12471 (add_tree): Remove.
12472 (begin_stmt_tree): Likewise.
12473 (finish_stmt_tree): Likewise.
12474 (walk_tree_fn): Likewise.
12475 (walk_stmt_tree): Likewise.
12476 * class.c (finish_struct): Replace use of add_tree with add_stmt.
12477 * decl.c (mark_stmt_tree): Adjust type.
12478 (init_decl_processing): Don't build void_zero_node.
12479 (initialize_local_var): Adjust usage of current_stmt_tree.
12480 (finish_enum): Use add_stmt, not add_tree.
12481 (save_function_data): Adjust use of language_function.
12482 (finish_constructor_body): Use add_stmt, not add_tree.
12483 (finish_destructor_body): Likewise.
12484 (push_cp_function_context): Adjust use of language_function.
12485 (pop_cp_function_context): Likewise.
12486 (mark_lang_function): Likewise.
12487 (mark_cp_function_context): Likewise.
12488 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12489 (build_vec_init): Likewise.
12490 * semantics.c (SET_LAST_STMT): Remove.
12491 (RECHAIN_STMTS): Don't use it.
12492 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12493 (current_stmt_tree): Define.
12494 (add_tree): Remove.
12495 (finish_goto_stmt): Use add_stmt, not add_tree.
12496 (finish_expr_stmt): Likewise.
12497 (begin_if_stmt): Likewise.
12498 (finish_then_clause): Likewise.
12499 (begin_while_stmt): Likewise.
12500 (begin_do_stmt): Likewise.
12501 (finish_return_stmt): Likewise.
12502 (begin_for_stmt): Likewise.
12503 (finish_break_stmt): Likewise.
12504 (finish_continue_stmt): Likewise.
12505 (begin_switch_stmt): Likewise.
12506 (finish_case_label): Likewise.
12507 (begin_try_block): Likewise.
12508 (begin_function_try_block): Likewise.
12509 (begin_handler): Likewise.
12510 (begin_catch_block): Likewise.
12511 (begin_compound_stmt): Likewise.
12512 (begin_asm_stmt): Likewise.
12513 (finish_asm_stmt): Likewise.
12514 (finish_label_stmt): Likewise.
12515 (add_decl_stmt): Likewise.
12516 (finish_subobject): Likewise.
12517 (finish_decl_cleanup): Likewise.
12518 (finish_named_return_value): Likewise.
12519 (setup_vtbl_ptr): Likewise.
12520 (add_scope_stmt): Likewise.
12521 (finish_stmt_expr): Likewise.
12522 (prune_unused_decls): Remove.
12523 (begin_stmt_tree): Likewise.
12524 (finish_stmt_tree): Likewise.
12525 (prep_stmt): Adjust use of current_stmt_tree.
12526 (lang_expand_stmt): Likewise.
12527 * tree.c (statement_code_p): Remove.
12528 (cp_statement_code_p): New function.
12529 (walk_stmt_tree): Remove.
12530 (init_tree): Set lang_statement_code_p.
bb20cc46 12531
0e5921e8
ZW
125322000-09-06 Zack Weinberg <zack@wolery.cumb.org>
12533
12534 Integrated preprocessor.
12535
12536 * Make-lang.in, Makefile.in: Remove all references to input.c,
12537 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
12538 * gxx.gperf, hash.h, input.c: Delete.
12539 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12540 initialized properly.
12541
12542 * class.c (fixup_pending_inline): Take a tree, not a
12543 struct pending_inline *. All callers changed.
12544 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12545 RID_PROTECTED entries in ridpointers[] array here.
12546 * decl.c (duplicate_decls): Do not refer to struct
12547 pending_inline.
12548 (record_builtin_type, init_decl_processing): Use RID_MAX not
12549 CP_RID_MAX.
12550 (grokdeclarator): Use C_IS_RESERVED_WORD.
12551 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12552 cpplib.
12553 (grok_x_components): Do not inspect pending_inlines chain.
12554
12555 * cp-tree.h (struct lang_identifier): Add rid_code entry.
12556 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12557 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12558 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12559 TIME_IDENTIFIER_FILEINFO): Kill.
12560 Update prototypes.
12561 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
12562 single 32-bit word.
12563 * parse.y: Call do_pending_inlines unconditionally.
12564 reinit_parse_for_method is now snarf_method. fn.defpen is no
12565 longer necessary. Remove unnecessary <itype> annotation on
12566 SCOPE. Do not refer to end_of_file or struct pending_inline.
12567 * semantics.c (begin_inline_definitions): Call
12568 do_pending_inlines unconditionally.
12569
12570 * lex.c: Remove all code now shared with C front end.
12571 Initialize cpplib properly if USE_CPPLIB. Put reserved words
12572 into the get_identifier table. Rewrite pragma handling to
12573 work with the registry. Move code to save tokens for later
12574 processing to spew.c.
12575
12576 * spew.c: Rewrite everything in terms of token streams instead
12577 of text. Move routines here from lex.c / input.c as
12578 appropriate. GC-mark trees hanging off the pending inlines
12579 chain.
12580
44835fdd
MM
125812000-09-06 Mark Mitchell <mark@codesourcery.com>
12582
12583 * NEWS: Mention that the named return value extension has been
12584 deprecated.
12585 * cp-tree.h (original_result_rtx): Define.
12586 (TREE_REFERENCE_EXPR): Remove.
12587 (DECL_VPARENT): Likewise.
12588 (pushdecl_nonclass_level): Likewise.
12589 (store_return_init): Likewise.
12590 (reinit_lang_specific): Likewise.
12591 (genrtl_named_return_value): Change prototype.
12592 * decl.c (original_result_rtx): Remove.
12593 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12594 Do not generate RTL for local variables here.
12595 (store_return_init): Remove.
12596 * semantics.c (genrtl_named_return_value): Simplify. Fold in
12597 store_return_init.
12598 (finish_named_return_value): Adjust accordingly. Warn that this
12599 extension is deprecated.
12600 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12601
d7c4edd0
NS
126022000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12603
12604 * pt.c (type_unification_real): Replace switch with if.
12605 (unify): Tsubst non-type parms before comparing.
12606
46e2747c
NS
126072000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12608
12609 * error.c (dump_typename): New function, broken out of ...
12610 (dump_type): ... here. Use it.
12611 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12612
c833d2be
NS
126132000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12614
12615 * init.c (build_offset_ref): Deal with namespace scoped
12616 TEMPLATE_ID_EXPRs.
12617
b1ce3eb2
NS
126182000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12619
12620 * class.c (resolve_address_of_overloaded_function): Add
12621 explanation message.
12622 * decl.c (define_case_label): Reformat explanation.
12623 * decl2.c (finish_static_data_member_decl): Likewise.
12624 (grokfield): Likewise.
12625 * friend.c (do_friend): Likewise.
12626
11f53b6a
ZW
126272000-09-05 Zack Weinberg <zack@wolery.cumb.org>
12628
12629 * tree.c (walk_tree): Expose tail recursion.
12630 (walk_stmt_tree): New function.
12631 * cp-tree.h: Prototype walk_stmt_tree.
12632 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12633 the BLOCKs directly. If a BLOCK has no variables after
12634 pruning, discard it.
12635 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
12636 restore the line number.
12637
ee94fce6
MM
126382000-09-05 Mark Mitchell <mark@codesourcery.com>
12639
12640 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12641 (pt.o): Remove dependency on HTAB_H.
12642 * cp-tree.h: Include hashtab.h.
12643 (walk_tree): Change prototype.
12644 (walk_tree_without_duplicates): New function.
12645 * decl.c (check_default_argument): Use it.
12646 * optimize.c (remap_decl): Adjust calls to walk_tree.
12647 (copy_body): Likewise.
12648 (expand_calls_inline): Likewise.
12649 (calls_setjmp_p): Use walk_tree_without_duplicates.
12650 * pt.c: Don't include hashtab.h.
12651 (for_each_template_parm): Use walk_tree_without_duplicates.
12652 * semantics.c (finish-stmt_tree): Likewise.
12653 (expand_body): Likewise.
12654 * tree.c (walk_tree): Add additional parameter.
12655 (walk_tree_without_duplicates): New function.
12656 (count_trees): Use it.
12657 (verify_stmt_tree): Adjust call to walk_tree.
12658 (find_tree): Use walk_tree_without_duplicates.
12659 (no_linkage_check): Likewise.
12660 (break_out_target_exprs): Adjust call to walk_tree.
12661 (cp_unsave): Likewise.
12662
a1281f45
KL
126632000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12664
12665 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12666 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12667 * cp-tree.h (TYPE_BINFO): Adjust comment.
12668 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12669 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12670 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12671 (TYPE_TEMPLATE_INFO): Likewise.
12672 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12673 * class.c (push_nested_class): Likewise.
12674 * decl.c (lookup_name_real): Likewise.
12675 (grokdeclarator): Likewise.
12676 (grok_op_properties): Likewise.
12677 (xref_tag): Likewise.
12678 (xref_basetypes): Likewise.
12679 * decl2.c (constructor_name_full): Likewise.
12680 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12681 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12682 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12683 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12684 (dump_type_suffix): Likewise.
12685 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12686 instead.
12687 (get_aggr_from_typedef): Likewise.
12688 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12689 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12690 (write_template_parm): Likewise.
12691 (write_template_template_parm): Check tree code instead of
12692 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 12693 * method.c (build_overload_nested_name): Add
a1281f45
KL
12694 BOUND_TEMPLATE_TEMPLATE_PARM.
12695 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12696 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12697 * pt.c (convert_template_argument): Check tree code instead of
12698 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12699 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12700 (for_each_template_parm): Adjust comment.
12701 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
12702 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12703 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
12704 template_args_equal to compare template template parameter cases.
12705 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12706 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12707 instead.
12708 * tree.c (copy_template_template_parm): Decide whether to create
12709 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12710 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12711 (copy_tree_r): Likewise.
12712 * typeck.c (comptypes): Likewise. Check tree code instead of
12713 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12714
c9672d45
ME
127152000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
12716
12717 * decl.c (finish_function): Move the code for handling functions
12718 marked with the constructor and destructor attributes inside the
12719 expand_p block.
12720
67804825
NS
127212000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12722
12723 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12724
1bc0793e
NS
127252000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12726
12727 * pt.c (lookup_template_class): Remove abort.
12728 * tree.c (get_type_decl): Allow error_mark_node.
12729
3338663b
NS
127302000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12731
12732 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12733 TEMPLATE_ID_EXPRs.
12734
1b84dc37
MM
127352000-09-03 Mark Mitchell <mark@codesourcery.com>
12736
12737 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 12738 new ABI mangling.
1b84dc37 12739
9687f8f4
NS
127402000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12741
12742 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 12743 union tag mismatch error reporting.
9687f8f4 12744
4f8025eb
NS
127452000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12746
c9672d45 12747 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 12748
495d26d6
JM
127492000-08-30 Jason Merrill <jason@redhat.com>
12750
12751 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12752
12753 * tree.c (bot_manip): Check TREE_CONSTANT rather than
12754 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
12755 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12756
12757 * decl.c (start_function): Always call make_function_rtl.
12758
7efcf466
ZW
127592000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12760
495d26d6 12761 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
12762 (finish_stmt_tree): Call it via walk_tree.
12763
63ad61ed
ZW
127642000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12765
12766 * class.c (build_secondary_vtable): Constify a char *.
12767 * decl.c (init_decl_processing): Initialize function_id_node,
12768 pretty_function_id_node, and func_id_node.
12769 * input.c (struct input_source): Constify 'str'.
12770 (feed_input): Constify first argument.
12771 * mangle.c (write_identifier): Constify argument.
12772 * pt.c (mangle_class_name_for_template): Constify argument.
12773
4361b41d
MM
127742000-08-29 Mark Mitchell <mark@codesourcery.com>
12775
12776 * typeck.c (mark_addressable): Remove code that pokes around in
12777 RTL.
12778
881c6935
JM
127792000-08-28 Jason Merrill <jason@redhat.com>
12780
12781 * lex.c (file_name_nondirectory): Move to toplev.c.
12782
12783 * cp-tree.h (LOCAL_CLASS_P): New macro.
12784 * class.c (finish_struct_1): Use it.
12785
f0f33848
AS
127862000-08-27 Alex Samuel <samuel@codesourcery.com>
12787
12788 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12789 (write_encoding): Pass another argument to write_name.
12790 (write_name): Add ignore_local_scope parameter. Fix handling of
12791 local names.
12792 (write_nested_name): Use write_unqualified_name.
12793 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
12794 (write_template_prefix): Use write_unqualified_name.
12795 (write_component): Remove.
12796 (write_local_name): Add parameter. Use direct local entity to
12797 discriminator calculation.
0e5921e8 12798 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
12799 (write_template_template_arg): Likewise.
12800 (make_guard_variable): Likewise.
0e5921e8 12801
94dfccd1
JM
128022000-08-27 Jason Merrill <jason@redhat.com>
12803
12804 * decl.c (pushdecl): Matching decls for local externs are found in
12805 the current level. Propagate linkage information from previous
12806 declarations.
12807
14fdf4b6
GDR
128082000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
12809
12810 * ir.texi (Expressions): Fix typo.
12811
b5232c64
GM
128122000-08-25 Greg McGary <greg@mcgary.org>
12813
12814 * tree.c (init_tree): Use ARRAY_SIZE.
12815
22a4158c
GDR
128162000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12817
12818 * error.c (cp_tree_printer): Rework.
12819
f22967f3
MM
128202000-08-25 Mark Mitchell <mark@codesourcery.com>
12821
a0c182fe
MM
12822 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12823 dyn-string.o.
12824 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12825 (cp-demangle.o): Remove target.
12826 (dyn-string.o): Likewise.
12827
f22967f3
MM
12828 * decl.c (grokfndecl): Require that `main' return an `int'.
12829 * mangle.c (write_encoding): Don't mangle return types for
12830 conversion functions.
12831
a1066c99
GDR
128322000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12833
12834 * error.c (tree_formatting_info): New data type.
12835 (tree_being_formatted): New macro.
12836 (tree_formatting_flags): Likewise.
12837 (put_whitespace): Likewise.
12838 (print_tree_identifier): Likewise.
12839 (print_identifier): Likewise.
12840 (cp_tree_printer, print_function_argument_list, print_declaration,
12841 print_expression, print_function_declaration,
12842 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 12843 functions.
a1066c99
GDR
12844 (init_error): Initialize lang_printer.
12845
3f2b640a
JM
128462000-08-24 Jason Merrill <jason@redhat.com>
12847
12848 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12849 adjustment necessary.
12850
7ec09bf7
GM
128512000-08-24 Greg McGary <greg@mcgary.org>
12852
12853 * cp-tree.h (MAIN_NAME_P): Remove macro.
12854
2ab99c46
GDR
128552000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
12856
12857 * error.c (print_instantiation_context): Don't forget to flush the
12858 buffer.
12859
7def1251
JM
128602000-08-23 Jason Merrill <jason@redhat.com>
12861
12862 * typeck.c (build_ptrmemfunc): Save the input pmf.
12863
12864 * method.c (process_modifiers): Use same_type_p.
12865
94350948
MM
128662000-08-23 Mark Mitchell <mark@codesourcery.com>
12867
12868 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12869 * mangle.c (write_function_type): Change prototype.
12870 (write_encoding): Don't mangle return types for
12871 constructors or destructors.
12872 (write_type): Adjust call to write_function_type.
12873 * pt.c (instantiate_template): Instantiate alternate entry points
12874 when instantiating the main function.
0e5921e8 12875
a64e7329
GDR
128762000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12877
12878 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 12879 output_printf.
a64e7329 12880
a72462a4
GDR
128812000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12882
12883 * decl.c (init_decl_processing): Remove bogus initialization.
12884 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
12885 (init_error): Initialize print_error_function.
12886
3add6264
TP
128872000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12888
12889 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12890
cb753e49
GDR
128912000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
12892
12893 * Makefile.in (error.o): Depends on diagnostic.h
12894
12895 * cp-tree.h (problematic_instantiation_changed,
12896 record_last_problematic_instantiation, current_instantiation,
12897 print_instantiation_context): Declare.
12898 (maybe_print_template_context): Remove.
12899
12900 * decl.c (init_decl_processing): Set print_error_function to NULL.
12901 (lang_print_error_function): Remove, since we're using a new
12902 machinery.
12903
12904 * error.c: #include diagnostic.h
12905 (function_category): New function.
12906 (cp_diagnostic_starter): Likewise.
12907 (cp_diagnostic_finalizer): Likewise.
12908 (cp_print_error_function): Likewise.
12909 (maybe_print_instantiation_context): Likewise.
12910 (print_instantiation_full_context): Likewise.
12911 (print_instantiation_partial_context): Likewise.
12912 (print_instantiation_context): Define.
12913 (init_error): Initialize diagnostic pager and finalizer.
12914
12915 * pt.c (problematic_instantiation_changed): Define.
12916 (record_last_problematic_instantiation): Likewise.
12917 (current_instantiation): Likewise.
12918 (maybe_print_template_context): Remove.
12919 (print_template_context): Likewise.
12920 (current_tinst_level): Make static to reflect Brendan Kehoe's
12921 change of 1995-04-13.
0e5921e8
ZW
12922 (push_tinst_level): Call print_instantiation_context.
12923
05a3d06e 129242000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 12925
05a3d06e
N
12926 * lang-specs.h: Do not process -o or run the assembler if
12927 -fsyntax-only.
12928
93e2382f
JM
129292000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
12930
12931 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12932 variables.
12933 * decl2.c (lang_decode_option): Disable gettext attributes for
12934 -ansi.
12935
24805e80
GDR
129362000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
12937
12938 * lex.c (lang_init_options): Default diagnostic message maximum
12939 length to 80, when line-wrapping.
12940
b485e15b
MM
129412000-08-20 Mark Mitchell <mark@codesourcery.com>
12942
12943 * class.c (build_vtbl_initializer): Clear the entire
12944 vtbl_init_data. Start keeping track of the functions for which we
12945 have created vcall offsets here.
12946 (dfs_build_vcall_offset_vtbl_entries): Remove.
12947 (build_vcall_offset_vtbl_entries): Reimplement.
12948 (add_vcall_offset_vtbl_entries_r): New function.
12949 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
12950 computing when vcall offsets are necessary.
12951
2ae7bada
NS
129522000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12953
12954 * decl.c (member_function_or_else): Use cp_error ... %T.
12955 (grokdeclarator): Likewise.
12956 (start_method): Likewise.
0e5921e8 12957 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 12958
7a8b1375
NS
129592000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12960
12961 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 12962 TYPE_DECLs.
7a8b1375 12963
19420d00
NS
129642000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12965
12966 * cp-tree.h (PTRMEM_OK_P): New macro.
12967 (itf_ptrmem_ok): New enumeration value.
12968 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12969 argument. Diagnose implicit pointer to member.
12970 (instantiate_type): Don't diagnose implicit pointer to member
12971 here. Pass itf_ptrmem_ok if ok. Adjust calls to
12972 resolve_address_of_overloaded_function.
12973 * init.c (build_offset_ref): Set PTRMEM_OK_P.
12974 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12975 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12976 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12977 (build_unary_op): Deal with single non-static member in
12978 microsoft-land.
12979
66081283
NS
129802000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12981
12982 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12983
fa40aa12
NS
129842000-08-18 Nathan Sidwell <nathan@codesourcery.com>
12985
12986 * cp-tree.h (enum_name_string): Remove prototype.
12987 (report_case_error): Remove prototype.
12988 * cp/typeck2.c (enum_name_string): Remove.
12989 (report_case_error): Remove.
12990 * error.c (dump_expr): Deal with enum values directly.
12991 Correctly negate integer constant.
12992
d13b34e9
NS
129932000-08-17 Nathan Sidwell <nathan@codesourcery.com>
12994
12995 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12996 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12997 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12998 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12999 (__cxa_vec_new): Use __cxa_vec_new2.
13000 (__cxa_vec_delete): Use __cxa_vec_delete2.
13001
2f1b80af
NS
130022000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13003
13004 * vec.cc (__cxa_vec_new): Set "C" linkage.
13005 (__cxa_vec_ctor): Likewise.
13006 (__cxa_vec_cctor): Likewise.
13007 (__cxa_vec_dtor): Likewise.
13008 (__cxa_vec_delete): Likewise.
13009 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13010 (__cxa_vec_ctor): Likewise.
13011 (__cxa_vec_cctor): Likewise.
13012 (__cxa_vec_dtor): Likewise.
13013 (__cxa_vec_delete): Likewise.
13014
105d8e1f
NS
130152000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13016
13017 * class.c (instantiate_type): Reinstate local variable
13018 deleted in previous change.
0e5921e8 13019
f1819d9a
NS
13020 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13021 itf_no_attributes.
105d8e1f 13022
5e76004e
NS
130232000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13024
13025 * cp-tree.h (instantiate_type_flags): New enumeration.
13026 (instantiate_type): Change parameter.
13027 * class.c (instantiate_type): Adjust prototype. Adjust.
13028 * call.c (standard_conversion): Adjust instantiate_type call.
13029 (reference_binding): Likewise.
13030 (build_op_delete_call): Likewise.
13031 (convert_like_real): Likewise.
13032 * cvt.c (cp_convert_to_pointer): Likewise.
13033 (convert_to_reference): Likewise.
13034 * pt.c (convert_nontype_argument): Likewise.
13035 * typeck.c (build_binary_op): Likewise.
13036 (build_ptrmemfunc): Likewise.
13037 (convert_for_assignment): Likewise.
13038
4b054b80
NS
130392000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13040
13041 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13042 (current_aggr): Define.
13043 * decl.c (grokdeclarator): Make sure a friend class is an
13044 elaborated type specifier.
13045 * parse.y (current_aggr): Remove static definition.
13046 (cp_parse_init): Adjust.
13047 (structsp): Clear and restore current_aggr.
13048 (component_decl_list): Clear current_aggr.
0e5921e8 13049
4b054b80
NS
13050 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13051 aggregate tag on the typename's context.
0e5921e8 13052
321cba97
NS
13053 * pt.c (tsubst_friend_class): Return error_mark_node, if
13054 parms becomes NULL.
13055 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 13056
08aead78
NS
130572000-08-14 Nathan Sidwell <nathan@codesourcery.com>
13058
13059 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 13060 (convert_to_reference): ... here. Use it.
08aead78 13061
fa1f3ebc
KL
130622000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13063
13064 * parse.y (template_arg): Add rule for template qualified with
13065 global scope.
13066
9845b52b
TP
130672000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13068
13069 * decl2.c (add_function): Reorganize.
13070 (arg_assoc): Do not consider function template decls.
13071
e69c8072
JM
130722000-08-11 Jason Merrill <jason@redhat.com>
13073
13074 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13075 looking inside.
13076
5c1e5476
NS
130772000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13078
13079 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13080 (lookup_nested_tag): Likewise.
0e5921e8 13081
5c1e5476
NS
13082 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13083 can be produced.
13084
5426aa7f
NS
130852000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13086
13087 * parse.y (named_complex_class_head_sans_basetype): Remove
13088 always true if.
13089
fd037e0d
NS
130902000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13091
13092 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13093 explicit TEMPLATE_ID_EXPR args.
13094 (build_expr_from_tree, case CALL_EXPR): Likewise.
13095
73ae5c34
NS
130962000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13097
13098 * decl.c (check_tag_decl): Diagnose typename's which don't
13099 declare anything.
13100
aa54df09
NS
131012000-08-10 Nathan Sidwell <nathan@codesourcery.com>
13102
13103 * init.c (build_aggr_init): Reject bogus array initializers
13104 early.
13105
7e8dad18
NS
131062000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13107
13108 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13109 runtime.
13110 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 13111 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 13112
0f586b9b
NS
131132000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13114
13115 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 13116 attempting to cast from ambiguous base.
0f586b9b 13117
08e72a19
JM
131182000-08-08 Jason Merrill <jason@redhat.com>
13119
13120 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13121 (tsubst_template_arg_vector): Likewise.
13122
13123 * decl2.c (build_anon_union_vars): Choose the largest field; don't
13124 assume that one will be as large as the union.
13125
0811ea8f
KH
131262000-08-07 Kazu Hirata <kazu@hxi.com>
13127
13128 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13129 * decl.c (pop_labels): Likewise.
13130
f9fcf62b
JO
131312000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
13132
13133 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13134 specifications.
13135 (__pointer_to_member_type_info): Likewise.
13136 (__base_class_info): Likewise.
13137 (__class_type_info): Likewise.
13138 (__si_class_type_info): Likewise.
13139 (__vmi_class_type_info): Likewise.
13140 * tinfo.cc (__si_class_type_info::__do_find_public_src):
13141 Changed member names to match specifications.
13142 (__vmi_class_type_info::__do_find_public_src): Likewise.
13143 (__si_class_type_info::__do_dyncast): Likewise.
13144 (__vmi_class_type_info::__do_dyncast): Likewise.
13145 (__si_class_type_info::__do_upcast): Likewise.
13146 (__vmi_class_type_info::__do_upcast): Likewise.
13147 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13148 (__pbase_type_info::__pointer_catch): Likewise.
13149 (__pointer_type_info::__pointer_catch): Likewise.
13150 (__pointer_to_member_type_info::__pointer_catch): Likewise.
13151
a36556a8
ZW
131522000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13153
0e5921e8
ZW
13154 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13155 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13156 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 13157
452a394b
MM
131582000-08-04 Mark Mitchell <mark@codesourcery.com>
13159
13160 * cp-tree.h (add_method): Change prototype.
13161 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
13162 Don't double the size of the method vector in the error case.
13163 (handle_using_decl): Adjust call to add_method.
13164 (add_implicitly_declared_members): Likewise.
13165 (clone_function_decl): Likewise.
13166 * decl2.c (check_classfn): Likewise.
13167 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 13168
b8458e3e
JM
131692000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
13170
13171 * decl.c (flag_isoc94): New variable.
13172
a1bcc528
JM
131732000-08-02 Jason Merrill <jason@redhat.com>
13174
13175 * pt.c (do_type_instantiation): Add complain parm; don't complain
13176 if called recursively.
13177 * cp-tree.h, parse.y: Adjust.
13178
50e60bc3
ZW
131792000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13180
eae51189
ZW
13181 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13182 -Wno-strict-prototypes.
13183
37620334
ZW
13184 * g++spec.c: Adjust type of second argument to
13185 lang_specific_driver, and update code as necessary.
13186
50e60bc3
ZW
13187 * cp-tree.h: Don't prototype min_precision here.
13188 (my_friendly_assert): Cast expression to void.
13189 * semantics.c (do_poplevel): Initialize scope_stmts.
13190
3f954fc3
MM
131912000-08-02 Mark Mitchell <mark@codesourcery.com>
13192
13193 * cp-tree.h (DECL_NEEDED_P): Tweak.
13194
ab4fa7ed
JM
131952000-07-28 Jason Merrill <jason@redhat.com>
13196
13197 * lang-specs.h: Use %i in rule for .ii files.
13198
4871239e
ZW
131992000-07-31 Zack Weinberg <zack@wolery.cumb.org>
13200
13201 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13202
911a71a7
MM
132032000-07-30 Mark Mitchell <mark@codesourcery.com>
13204
13205 Allow indirect primary bases.
13206 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
13207 primary_base.
13208 (CLASSTYPE_VFIELD_PARENT): Remove.
13209 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13210 (BINFO_PRIMARY_BINFO): Remove.
13211 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13212 (BINFO_VBASE_PRIMARY_P): Likewise.
13213 (BINFO_PRIMARY_BASE_OF): New macro.
13214 (BINFO_INDIRECT_PRIMARY_P): Likewise.
13215 (get_primary_binfo): New function.
13216 * decl.c (lang_mark_tree): Make lang_type::primary_base.
13217 * class.c (vcall_offset_data_s): Rename to ...
13218 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
13219 and add ctor_vtbl_p.
13220 (get_derived_offset): Use get_primary_binfo.
13221 (dfs_mark_primary_bases): Adjust handling of virtual primary
13222 bases.
13223 (mark_primary_bases): Likewise.
13224 (set_primary_base): Take a binfo, not an integer, as a
13225 representation of the primary base.
13226 (indirect_primary_base_p): Remove.
13227 (determine_primary_base): Adjust for indirect primary bases.
13228 (dfs_find_final_overrider): Fix typo in coment.
13229 (update_vtable_entry_for_fn): Use get_primary_binfo.
13230 (layout_nonempty_base_or_field): Tweak.
13231 (build_base_fields): Adjust for new primary base semantics.
13232 (dfs_propagate_binfo_offsets): Remove.
13233 (propagate_binfo_offsets): Rewrite.
13234 (dfs_set_offset_for_shared_vbases): Remove.
13235 (layout_virtual_bases): Don't use it.
13236 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13237 ABI.
13238 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13239 CLASSTYPE_VFIELD_PARENT.
13240 (dfs_get_primary_binfo): New function.
13241 (get_primary_binfo): Likewise.
13242 (dump_class_hierarchy_r): Tweak printing of primary bases.
13243 (build_vtbl_initializer): Fix typo in comments. Use
13244 vtbl_init_data.
13245 (build_vcall_and_vbase_vtbl_entries): Likewise.
13246 (build_vbaes_offset_vtbl_entries): Likewise.
13247 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13248 BV_VCALL_INDEX to handle indirect primary bases.
13249 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13250 (build_rtti_vtbl_entries): Likewise.
13251 * search.c (get_shared_vbase_if_not_primary): Tweak.
13252 (find_vbase_instance): Likewise.
13253 (binfo_for_vtable): Simplify.
13254 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13255 (make_binfo): Make it have 11 entries.
0e5921e8 13256
722bed0f
AS
132572000-07-30 Alex Samuel <samuel@codesourcery.com>
13258
13259 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13260 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13261 ascertaining primaryness.
13262 (G): Remove template_args.
13263 (decl_is_template_id): New function.
13264 (write_encoding): Use decl_is_template_id.
13265 (write_name): Likewise. Handle type_decls. Get main variant of
13266 type decls.
13267 (write_nested_name): Likewise.
13268 (write_prefix): Likewise.
13269 (write_template_prefix): Likewise.
13270 (write_special_name_constructor): Remove defunct production from
13271 comment.
13272 (write_bare_function_type): Remove comment about absent parameter.
13273 (write_template_template_arg): Add missing grammar production to
13274 comment.
13275
9076e292
JM
132762000-07-27 Jason Merrill <jason@redhat.com>
13277
13278 * decl.c (duplicate_decls): If common_type produces a non-typedef
13279 type for a typedef, just use the old type.
13280
b2244c65
MM
132812000-07-27 Mark Mitchell <mark@codesourcery.com>
13282
13283 * cp-tree.h (function_depth): Declare.
13284 (verify_stmt_tree): Likewise.
13285 (find_tree): Likewise.
13286 * decl.c (function_depth): Give it external linkage.
13287 * optimize.c (optimize_function): Increment and decrement it.
13288 * tree.c (verify_stmt_tree_r): New function.
13289 (verify_stmt_tree): Likewise.
13290 (find_tree_r): Likewise.
13291 (find_tree): Likewise.
13292
62e3bf54
JM
132932000-07-27 Jason Merrill <jason@redhat.com>
13294
9076e292
JM
13295 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13296 TYPE_PTRMEMFUNC_P.
13297 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 13298
5a728aca
MM
132992000-07-26 Mark Mitchell <mark@codesourcery.com>
13300
13301 * decl.c (start_cleanup_fn): Mark the function as `inline'.
13302 * decl2.c (get_guard): Call cp_finish_decl, not
13303 rest_of_decl_compilation, for local guards.
13304 * lex.c (do_identifier): Remove unused variable.
13305
d2a6f3c0 133062000-07-26 Marc Espie <espie@cvs.openbsd.org>
6a1fa5f9
ME
13307
13308 * parse.y: Add missing ';'.
13309
0c10a805
MM
133102000-07-26 Mark Mitchell <mark@codesourcery.com>
13311
13312 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13313 of `extern "C++"'.
13314
8b27e9ef
NS
133152000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13316
13317 Kill strict_prototype. Backwards compatibility only for
13318 non NO_IMPLICIT_EXTERN_C systems.
13319 * cp-tree.h (flag_strict_prototype): Remove.
13320 (strict_prototype): Remove.
13321 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13322 * decl.c (maybe_push_to_top_level): Adjust.
13323 (pop_from_top_level): Adjust.
13324 (decls_match): Only allow sloppy parm matching for ancient
13325 system headers.
13326 (init_decl_processing): Adjust.
13327 (grokdeclarator): Adjust.
13328 * decl2.c (flag_strict_prototype): Remove.
13329 (strict_prototype): Remove.
13330 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13331 (lang_f_options): Remove "strict-prototype".
13332 (unsupported-options): Add "strict-prototype".
13333 * lex.c (do_identifier): Adjust.
13334 (do_scoped_id): Adjust.
13335 * parse.y (empty_parms): Adjust.
13336 * class.c (push_lang_context): Adjust.
13337 (pop_lang_context): Adjust.
13338 * typeck.c (comp_target_parms): Adjust.
13339
c3783399
NS
133402000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13341
13342 * decl.c (poplevel): Deal with anonymous variables at for scope.
13343 (maybe_inject_for_scope_var): Likewise.
13344
a7023245
ZW
133452000-07-25 Zack Weinberg <zack@wolery.cumb.org>
13346
13347 * decl.c: Remove all signal handling code, now done in toplev.c.
13348
95ee998c
MM
133492000-07-23 Mark Mitchell <mark@codesourcery.com>
13350
13351 * decl.c (make_rtl_for_nonlocal_decl): Rework.
13352
13353 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13354 correctly.
13355
1b493b81
ZW
133562000-07-20 Zack Weinberg <zack@wolery.cumb.org>
13357
13358 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13359 Define my_friendly_assert and my_friendly_abort as macros
13360 which may call friendly_abort. Prototype friendly abort, not
13361 my_friendly_abort or my_friendly_assert.
13362 * decl.c (signal_catch): Report the signal caught in the error
13363 message. Call fatal directly.
13364 * typeck2.c (ack, my_friendly_assert): Delete.
13365 (my_friendly_abort): Rename to friendly_abort. Expect file,
13366 line, and function parameters. Report the abort code, then
13367 call fancy_abort. Do not mask an abort if errors have
13368 already occurred.
13369
a306451c
NS
133702000-07-18 Nathan Sidwell <nathan@codesourcery.com>
13371
13372 * typeck.c (comp_target_parms): Remove obsolete parameter.
13373 (comp_target_types): Adjust.
13374
f49fad00
JM
133752000-07-17 Jason Merrill <jason@redhat.com>
13376
13377 * typeck.c (mark_addressable): Never set TREE_USED.
13378 * call.c (build_call): Don't abort on calls to library functions
13379 that have been declared normally.
13380
13381 * typeck.c (build_binary_op): Fix grammar in warning.
13382
13383 * exception.cc (__eh_free): Fix prototype.
13384
13385 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13386
0e5921e8 13387 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
13388 IDENTIFIER_NAMESPACE_VALUE.
13389
69690d98
MM
133902000-07-16 Mark Mitchell <mark@codesourcery.com>
13391
13392 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13393 * method.c (use_thunk): Correct handling of vcall offsets.
13394
bfbbc080
ZW
133952000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13396
13397 * .cvsignore: parse.h and parse.c have no cp- prefix.
13398
83a90717
MM
133992000-07-13 Mark Mitchell <mark@codesourcery.com>
13400
13401 * .cvsignore: New file.
13402
ea414c97
ZW
134032000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13404
13405 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13406
792abd35
MM
134072000-07-12 Mark Mitchell <mark@codesourcery.com>
13408
13409 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13410 * parse.c: Remove.
13411 * parse.h: Likewise.
13412
72a50ab0
MM
134132000-07-11 Mark Mitchell <mark@codesourcery.com>
13414
13415 * class.c (layout_class_type): Add pointers to virtual bases after
13416 base classes under the old ABI.
13417
0dfdeca6
BC
134182000-07-10 Benjamin Chelf <chelf@codesourcery.com>
13419
13420 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13421 (finish_continue_stmt): Likewise.
13422 (begin_for_stmt): Remove call to note_level_for_for.
13423 (finish_goto_stmt): Change call from build_min_nt
13424 to build_stmt.
13425 (finish_expr_stmt): Likewise.
13426 (begin_if_stmt): Likewise.
13427 (begin_while_stmt): Likewise.
13428 (finish_while_stmt): Likewise.
13429 (finish_return_stmt): Likewise.
13430 (begin_for_stmt): Likewise.
13431 (finish_for_stmt): Likewise.
13432 (finish_break_stmt): Likewise.
13433 (begin_switch_stmt): Likewise.
13434 (finish_case_label): Likewise.
13435 (genrtl_try_block): Likewise.
13436 (begin_try_block): Likewise.
13437 (begin_handler): Likewise.
13438 (begin_compound_stmt): Likewise.
13439 (finish_asm_stmt): Likewise.
13440 (finish_label_stmt): Likewise.
13441 (add_decl_stmt): Likewise.
13442 (finish_subobject): Likewise.
13443 (finish_decl_cleanup): Likewise.
13444 (finish_named_return_value): Likewise.
13445 (setup_vtbl_ptr): Likewise.
13446 (add_scope_stmt): Likewise.
13447 * decl.c (finish_constructor_body): Likewise.
13448 (finish_destructor_body): Likewise.
13449 * optimize.c (copy_body_r): Likewise.
13450 (initialize_inlined_parameters): Likewise.
13451 (declare_return_variable): Likewise.
13452 (expand_call_inline): Likewise.
0e5921e8 13453
f12eef58
JJ
134542000-07-10 Jakub Jelinek <jakub@redhat.com>
13455
13456 * semantics.c (expand_body): Sync interface information
13457 at the end of function body expansion.
13458
2bb5d995
JM
134592000-07-09 Jason Merrill <jason@redhat.com>
13460
13461 * init.c (build_new_1): Bail early if the call to new fails.
13462
0e5921e8 13463 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
13464 an INTEGER_CST, not just TREE_CONSTANT.
13465
0e5921e8 13466 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
13467 the DECL_TEMPLATE_RESULT.
13468 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13469 codes.
13470
13471 * error.c (dump_template_bindings): Don't crash if we had an
13472 invalid argument list.
13473
13474 * typeck.c (c_expand_start_case): Do narrowing here.
13475 * semantics.c (finish_switch_cond): Not here.
13476
134772000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
13478
13479 * parse.y (asm_clobbers): Do string concatenation.
13480
089acd57
MM
134812000-07-09 Mark Mitchell <mark@codesourcery.com>
13482
13483 * decl.c (pushtag): Don't put local classes in template functions
13484 on the local_classes list.
13485
134862000-07-04 Scott Snyder <snyder@fnal.gov>
13487
13488 * decl2.c (get_guard): Add missing return for old ABI local
13489 variable case.
13490
7b019c19
MM
134912000-07-09 Mark Mitchell <mark@codesourcery.com>
13492
13493 * cp-tree.h (char_type_p): New function.
13494 * decl.c (init_decl_processing): Don't initialize
13495 signed_wchar_type_node or unsigned_wchar_type_node.
13496 (complete_array_type): Handle brace-enclosed string-constants.
13497 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13498 * tree.c (char_type_p): New function.
13499 * typeck2.c (digest_init): Use char_type_p.
13500
a5f1c5f8
NS
135012000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13502
13503 * pt.c (tsubst): Don't layout type, if it's error_mark.
13504
84e5ca0f
NS
135052000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13506
13507 * pt.c (instantiate_pending_templates): Reset template level.
13508
ab785305
JM
135092000-07-05 Jason Merrill <jason@redhat.com>
13510
13511 * call.c (joust): Don't complain about `operator char *()' beating
13512 `operator const char *() const'.
13513
90418208
JM
135142000-07-04 scott snyder <snyder@fnal.gov>
13515 Jason Merrill <jason@redhat.com>
13516
0e5921e8 13517 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
13518 bases has a null TYPE_BINFO_VTABLE.
13519
135202000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
13521 Jason Merrill <jason@redhat.com>
13522
13523 * parse.y (member_init): Just pass in the type.
13524 * init.c (expand_member_init): Handle getting a type.
13525
13526